Not really important (who reads git annex commit messages anyways ;-)), but nice to have and maybe a nice task for someone who wants to play around with Haskell and git annex: It would be shiny if the auto-commit done by git annex sync would automatically create a sensible commmit message and description. E.g. if just one file is added, it could say „Added blubb“. If a few files are added, it could say „Added blubb, bla and n other files“, based on the file name length, and list the files in the long description. Lots of room for playing around
Took me a minute to see this is not about ?wishlist: more descriptive commit messages in git-annex branch, 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.
So.. It would be pretty easy to
ls-files
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 thengit commit
the staged changes.But, would this really be useful? It's already easy to get
git log
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.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.