Download raw body.
improve logmsg ref heuristics
On Sat, Jan 28, 2023 at 10:17:57PM +1100, Mark Jamsek wrote: > The below diff fixes a case where we add an unrelated log message to the > preopulated editor. > > If the user cherrypicked or backed-out a commit but also has unrelated > local changes in the work tree, and then specifies paths to 'got commit' > that are not in the set of paths that were changed in the cherrypicked > or backed-out commit, we should not add the log message of the bo/cy > commit. > > This is fixed by checking if the path was indeed passed to 'got commit'. Yes, ok, makes sense. We should only use the cherrypicked/backed-out log message templates if relevant paths are being committed. And this commit won't be clearing these templates, right? And a future commit of an affected path would still use the template, as I would expect? There will be edge cases where a cherrypick affects multiple paths and the user chooses to only commit one of them. In that case, I would expect the log message template to be used during this initial commit of some affected path, and then removed. This would leave changes on other affected paths without a log message template. This is a consequence of the design decisions we've made, where changes are tracked per-path, rather than as content diffs. I think this is acceptable as long as users are made aware of this limitation. The man page should mention this somewhere. I will try to remember this when I get a chance to look over the relevant bits of documentation again and perhaps adjust them a bit.
improve logmsg ref heuristics