Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-25 Thread Johannes Schindelin
Hi Peff, On Thu, 24 Jan 2019, Jeff King wrote: > On Tue, Jan 22, 2019 at 12:23:55PM -0800, Junio C Hamano wrote: > > > Johannes Schindelin writes: > > > > >> +sha1_abbr_src=$(GIT_DIR="$name/.git" git rev-parse > > >> --short $sha1_src) > > > > > > How about `git -C "$name" rev

Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-24 Thread Jeff King
On Tue, Jan 22, 2019 at 12:23:55PM -0800, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> + sha1_abbr_src=$(GIT_DIR="$name/.git" git rev-parse --short > >> $sha1_src) > > > > How about `git -C "$name" rev-parse --short`? That would less likely run > > over 80 columns/line, e

Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-22 Thread Sven van Haastregt
On 22/01/19 20:22, Junio C Hamano wrote: One thing it is not clear to me is that this codepath is prepared to handle sha1_src and sha1_dst referring to an object that does not exist (i.e. $missing_(src|dst)=t); the original code will still give us 7 hexdigit to show on the headline, but does the

Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-22 Thread Junio C Hamano
Johannes Schindelin writes: >> +sha1_abbr_src=$(GIT_DIR="$name/.git" git rev-parse --short >> $sha1_src) > > How about `git -C "$name" rev-parse --short`? That would less likely run > over 80 columns/line, either. That would be a separate patch, either as a preliminary or a follow-u

Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-22 Thread Junio C Hamano
Sven van Haastregt writes: > Until now, `git submodule summary` was always emitting 7-character > SHA-1s that have a higher chance of being ambiguous for larger > repositories. Use `git rev-parse --short` instead, which will > determine suitable short SHA-1 lengths. In general I think it is a g

Re: [PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-22 Thread Johannes Schindelin
Hi Sven, On Sun, 20 Jan 2019, Sven van Haastregt wrote: > Until now, `git submodule summary` was always emitting 7-character > SHA-1s that have a higher chance of being ambiguous for larger > repositories. Use `git rev-parse --short` instead, which will > determine suitable short SHA-1 lengths.

[PATCH] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-21 Thread Sven van Haastregt
Until now, `git submodule summary` was always emitting 7-character SHA-1s that have a higher chance of being ambiguous for larger repositories. Use `git rev-parse --short` instead, which will determine suitable short SHA-1 lengths. Signed-off-by: Sven van Haastregt --- git-submodule.sh | 4 ++--