Re: [PATCH] replace: fix replacing object with itself

2014-11-16 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com writes: The patch is not wrong per-se, but I wonder how useful this do not replace itself but all other forms of loops are not checked at all would be in practice. If your user did this: git replace A B ;# pretend as if what is in B is in

Re: [PATCH] replace: fix replacing object with itself

2014-11-15 Thread Christian Couder
[Sorry to resend this. I am really bad at making gmail on my Android smartphone send plain text emails.] On Fri, Nov 14, 2014 at 11:45 PM, Junio C Hamano gits...@pobox.com wrote: Manzur Mukhitdinov manzu...@gmail.com writes: When object is replaced with itself git shows unhelpful messages

Re: [PATCH] replace: fix replacing object with itself

2014-11-14 Thread Junio C Hamano
Manzur Mukhitdinov manzu...@gmail.com writes: When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). Signed-off-by: Manzur

[PATCH] replace: fix replacing object with itself

2014-11-13 Thread Manzur Mukhitdinov
When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). Signed-off-by: Manzur Mukhitdinov manzu...@gmail.com --- builtin/replace.c | 8

[PATCH] replace: fix replacing object with itself

2014-11-10 Thread Manzur Mukhitdinov
When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). --- builtin/replace.c | 8 +++- t/t6050-replace.sh | 8 2 files

Re: [PATCH] replace: fix replacing object with itself

2014-11-10 Thread Jeff King
On Tue, Nov 11, 2014 at 12:20:56AM +0100, Manzur Mukhitdinov wrote: When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). Thanks,

Re: [PATCH] replace: fix replacing object with itself

2014-11-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: I think all of the callers of replace_object_sha1 do this same check now. Can we just move the check into that function instead of adding another instance of it? Good thinking. Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body

[PATCH] replace: fix replacing object with itself

2014-11-08 Thread Manzur Mukhitdinov
When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). Signed-off-by: Manzur Mukhitdinov manzu...@gmail.com --- builtin/replace.c | 3

Re: [PATCH] replace: fix replacing object with itself

2014-11-08 Thread Jeff King
On Sun, Nov 09, 2014 at 01:05:31AM +0100, Manzur Mukhitdinov wrote: When object is replaced with itself git shows unhelpful messages like(git log): fatal: replace depth too high for object SHA1 Prevents user from replacing object with itself(with test for checking this case). I