Skip to content

commit: fix abbrev-sha regression

Tay Ray Chuan git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- move cleanup commands into separate function in patch #1.
- add a cleanup command to patch #1 to accomodate tests #20 and #22.
- changed shell syntax in patch #2 (based on Junio's suggestion).
- used a more "aggressive" fix in patch #3.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t7502-commit: add tests for summary outputt/t7502-commit.sh+43 -00 replies
2/3t7502-commit: add summary output tests for empty and merge commitst/t7502-commit.sh+27 -20 replies
3/3commit::print_summary(): set rev_info.always_show_header to 1builtin/commit.c t/t7502-commit.sh+6 -113 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] commit: fix abbrev-sha regression

After c197702 (pretty: Respect --abbrev option), the summary output for git-commit began to throw up non-abbreviated SHA-1s.

For example,

  $ git commit --allow-empty -m "empty"
  [master f869bf09c8eefee54094bb21387241aaf5f10324] empty

I also notice that this happens for merges after conflict resolutions.

This afflicts 'master', but not any release.

Changes from v1:

- move cleanup commands into separate function in patch #1.
- add a cleanup command to patch #1 to accomodate tests #20 and #22.
- changed shell syntax in patch #2 (based on Junio's suggestion).
- used a more "aggressive" fix in patch #3.

Contents:
[PATCH v2 1/3] t7502-commit: add tests for summary output
[PATCH v2 2/3] t7502-commit: add summary output tests for empty and merge commits [PATCH v2 3/3] commit::print_summary(): set rev_info.always_show_header to 1