From bca66acfd8220bd3e9340c3b213b9b051ac00b06 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Feb 2024 14:09:49 -0400 Subject: [PATCH] comment --- ..._c7a888605dd063fe7df7c569f1193f8c._comment | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/todo/make_annex___34__respect__34___.git__47__hooks__47__prepare-commit-msg/comment_5_c7a888605dd063fe7df7c569f1193f8c._comment diff --git a/doc/todo/make_annex___34__respect__34___.git__47__hooks__47__prepare-commit-msg/comment_5_c7a888605dd063fe7df7c569f1193f8c._comment b/doc/todo/make_annex___34__respect__34___.git__47__hooks__47__prepare-commit-msg/comment_5_c7a888605dd063fe7df7c569f1193f8c._comment new file mode 100644 index 0000000000..6b250668f9 --- /dev/null +++ b/doc/todo/make_annex___34__respect__34___.git__47__hooks__47__prepare-commit-msg/comment_5_c7a888605dd063fe7df7c569f1193f8c._comment @@ -0,0 +1,36 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2024-02-09T17:33:10Z" + content=""" +I think this needs two things: + +1. A hook to get the commit message when committing to + the git-annex branch. Apparently none of the git hooks + are well suited to be reused for that. +2. Ensure that the assistant always waits to commit the git-annex branch + until after it's committed changes to the working tree. + +Then you could do a variety of things... + +You could make the git-annex branch commit hook look for the last +change committed to the master branch, and reuse its commit message. +(If it's sufficiently close to the present that it's probably for +the same change.) + +You could use the git commit hook to generate a git commit message but also +store the message or a list of files somewhere for later use in the +git-annex branch commit hook. + +You could write a description of your current task to a file somewhere, +and have both hooks use that as their commit message. (Note that this does +not need #2 above actually, only needs the hook.) + +--- + +Does the assistant always wait to commit to the git-annex branch until +after committing changes to the working tree? I'm unsure. A quick test +indiciated it usually does, but I'm not sure why or if that's always the +case. It would take some analysis and making this behavior more explicit to +be able to rely on it. +"""]]