On Sun, Feb 3, 2019 at 4:01 PM Sven van Haastregt <svenvh@xxxxxxxxx> 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. > > We cannot always rely on successfully invoking `git rev-parse` in the > submodule directory. Keep the old method using `cut` as a fallback. Reviewers and future readers of this patch are left in the dark regarding the circumstances in which git-rev-parse may fail in the submodule directory. It would be helpful for the commit message to explain this potential failure in enough detail for someone working in this area in the future to understand any implications of changes to this code. > Signed-off-by: Sven van Haastregt <svenvh@xxxxxxxxx> > --- > Differences since v2: Simplify code as suggested by Eric > Sunshine <sunshine@xxxxxxxxxxxxxx> and suppress stderr. This version looks better. Thanks.