forum/Automatic commit messages for git annex syncgit-annexhttp://git-annex.branchable.com/forum/Automatic_commit_messages_for_git_annex_sync/git-annexikiwiki2013-11-27T22:47:37Zcomment 1http://git-annex.branchable.com/forum/Automatic_commit_messages_for_git_annex_sync/comment_1_ea2ec57bc695da4df8a30a35d433959d/joey2013-11-27T22:47:37Z2012-02-24T20:52:51Z
<p>Took me a minute to see this is not about <span class="createlink"><a href="http://git-annex.branchable.com/ikiwiki.cgi?do=create&from=forum%2FAutomatic_commit_messages_for_git_annex_sync%2Fcomment_1_ea2ec57bc695da4df8a30a35d433959d&page=bugs%2Fwishlist__58___more_descriptive_commit_messages_in_git-annex_branch" rel="nofollow">?</a>wishlist: more descriptive commit messages in git-annex branch</span>, but about the "git-annex automatic sync" message that is used when committing any changes currently on the master branch before doing the rest of the sync.</p>
<p>So.. It would be pretty easy to <code>ls-files</code> the relevant files before the commit and make a message. Although this would roughly double the commit time in a large tree, since that would walk the whole tree again (git commit -a already does it once). Smarter approaches could be faster.. perhaps it could find unstaged files, stage them, generate the message, and then <code>git commit</code> the staged changes.</p>
<p>But, would this really be useful? It's already easy to get <code>git log</code> to show a summary of the changes made in such a commit. So it's often seen as bad form to unnecessarily mention which files a commit changes in the commit message.</p>
<p>Perhaps more useful would be to expand the current message with details like where the sync is being committed, or what
remotes it's going to sync from, or something like that.</p>
comment 2http://git-annex.branchable.com/forum/Automatic_commit_messages_for_git_annex_sync/comment_2_af71f53dbbca35d5a5c66ff131887ada/nomeata2013-11-27T22:47:37Z2012-02-24T23:09:03Z
Yes, it is really a minor point. And indeed, "git log --summary" is pretty good already. But I’d still think that at least the title could deserves some love. Including the Hostname or the name of the repository there is a good idea as well.