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

2014-11-16 Thread Junio C Hamano
Christian Couder 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 A >> gi

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 wrote: > Manzur Mukhitdinov writes: > >> When object is replaced with itself git shows unhelpful messages like(git >> log): >> "fatal: re

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

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

[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 " Prevents user from replacing object with itself(with test for checking this case). Signed-off-by: Manzur Mukhitdinov --- builtin/replace.c | 8 +++- t/t6050-repl

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 " > > Prevents user from replacing object with itself(with test for checking > this case). Than

[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 " Prevents user from replacing object with itself(with test for checking this case). --- builtin/replace.c | 8 +++- t/t6050-replace.sh | 8 2 files changed,

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

2014-11-09 Thread Junio C Hamano
Jeff King 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 of a mes

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 " > > Prevents user from replacing object with itself(with test for checking > this case). I th

[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 " Prevents user from replacing object with itself(with test for checking this case). Signed-off-by: Manzur Mukhitdinov --- builtin/replace.c | 3 +++ t/t6050-replace.sh