"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: improve logmsg ref heuristics
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Sat, 28 Jan 2023 12:28:27 +0100

Download raw body.

Thread
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.