Tay Ray Chuan home archive

commit summary shows non-abbreviated SHA-1s

Wed, 26 May 2010 23:22:59 +0800 | Filed under git

Recently, I noticed that after resolving merge conflicts, git commit showed the full SHA-1.

For example, in my working tree for rctay-blog:

$ git log -1 # whereami?
f1a0068 (Merge branch 'rc/fix-atom' into rc/master, Tue May 25 13:29:30 2010 +0800, Tay Ray Chuan)
$ git merge rc/atom-last-modified
Auto-merging generators.py
CONFLICT (content): Merge conflict in generators.py
Auto-merging static.py
Automatic merge failed; fix conflicts and then commit the result.
$ # resolve...
$ git commit
[rc/master 26f53b93fec7293698d3b1793e6ab61be2fe7daf] Merge branch 'rc/atom-last-modified' into rc/master

I just left it alone - until last weekend, where I spent some time looking at it.

Turns out that git commit --allow-empty is affected too.

You can see the resulting tests and fix for this here (I plan to send a new iteration soon, though). I also picked up some trivial issues (this and this) along the way.

Right now, I'm running 1.7.1.352.g12d15, which is next with this branch merged in. That means I'm also getting my -m-appends-to---log feature for git merge - yeah!

blog comments powered by Disqus