Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-03 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: I would agree with more strict is it was about rejecting the input (to catch errors), but here we're still accepting it without complaining Yes, by more strict, I meant that I would prefer to keep things we do not understand as intact as

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-02 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: In any case, I wouldn't have much time during the remainder of the day to requeue and/or comment; please check what I push out on 'pu'. BTW, I do agree with this hunk: @@ -1068,18 +1064,20 @@ static void abbrev_sha1_in_line(struct strbuf *line) static

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-02 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Actually, we can do simpler: we still have the original line available, ... I took this (modulo s/line.len[0]/line.buf[0]/, and s/rtrim/trim/ to be robust to leading whitespace (not really important,

[PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Matthieu Moy
From: Guillaume Pagès guillaume.pa...@ensimag.grenoble-inp.fr git status gives more information during rebase -i, about the list of command that are done during the rebase. It displays the two last commands executed and the two next lines to be executed. It also gives hints to find the whole

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 12:36 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: I was about to mention the same shortcoming, but you beat me to it. Perhaps be more strict and do this instead (without leading strbuf_trim): if

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Junio C Hamano
Matthieu Moy matthieu@imag.fr writes: +/* + * Turn + * pick d6a2f0303e897ec257dd0e0a39a5ccb709bc2047 some message + * into + * pick d6a2f03 some message + */ +static void abbrev_sha1_in_line(struct strbuf *line) +{ + struct strbuf **split; + int i; + + if

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@imag.fr writes: +strbuf_trim(split[1]); +if (!get_sha1(split[1]-buf, sha1)) { +abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV); +strbuf_reset(split[1]); +

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Actually, we can do simpler: we still have the original line available, ... I took this (modulo s/line.len[0]/line.buf[0]/, and s/rtrim/trim/ to be robust to leading whitespace (not really important, but doesn't harm). I'd prefer us to be

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: I was about to mention the same shortcoming, but you beat me to it. Perhaps be more strict and do this instead (without leading strbuf_trim): if (!get_sha1_hex(split[1]-buf, sha1) !strcmp(split[1]-buf + 40, ) {

Re: [PATCH v5 3/4] status: give more information during rebase -i

2015-07-01 Thread Eric Sunshine
On Wed, Jul 1, 2015 at 12:18 PM, Junio C Hamano gits...@pobox.com wrote: Matthieu Moy matthieu@imag.fr writes: +/* + * Turn + * pick d6a2f0303e897ec257dd0e0a39a5ccb709bc2047 some message + * into + * pick d6a2f03 some message + */ +static void abbrev_sha1_in_line(struct strbuf *line)