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

2019-01-27 Thread Junio C Hamano
Eric Sunshine writes: > This could be made a bit easier to follow by using indentation and || > rather than &&. For instance, rewriting the entire block as: > > # Shorten with hard-coded fallback if rev-parse fails > sha1_abbr_src=$(GIT_DIR="$name/.git" git rev-parse --short $sha1_src ||

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

2019-01-27 Thread Eric Sunshine
On Sun, Jan 27, 2019 at 2:28 PM 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 v2] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-01-27 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. We cannot rely on always successfully invoking `git rev-parse` in