<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.h, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-06-20T22:45:15Z</updated>
<entry>
<title>Merge branch 'pw/rebase-i-error-message'</title>
<updated>2024-06-20T22:45:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-06-20T22:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83ac567781b53f7101c2a9b44462df447bbdc2c6'/>
<id>urn:sha1:83ac567781b53f7101c2a9b44462df447bbdc2c6</id>
<content type='text'>
When the user adds to "git rebase -i" instruction to "pick" a merge
commit, the error experience is not pleasant.  Such an error is now
caught earlier in the process that parses the todo list.

* pw/rebase-i-error-message:
  rebase -i: improve error message when picking merge
  rebase -i: pass struct replay_opts to parse_insn_line()
</content>
</entry>
<entry>
<title>rebase -i: pass struct replay_opts to parse_insn_line()</title>
<updated>2024-05-30T17:02:56Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2024-05-30T13:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c26738aa4a8256b40a46476c2433c03a562124f'/>
<id>urn:sha1:0c26738aa4a8256b40a46476c2433c03a562124f</id>
<content type='text'>
This new parameter will be used in the next commit. As adding the
parameter requires quite a few changes to plumb it through the call
chain these are separated into their own commit to avoid cluttering up
the next commit with incidental changes.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-m-signoff-fix'</title>
<updated>2024-04-30T21:49:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-04-30T21:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c9f43012a10c4c4b26b8966fcf8497d8db0a0c06'/>
<id>urn:sha1:c9f43012a10c4c4b26b8966fcf8497d8db0a0c06</id>
<content type='text'>
"git rebase --signoff" used to forget that it needs to add a
sign-off to the resulting commit when told to continue after a
conflict stops its operation.

* pw/rebase-m-signoff-fix:
  rebase -m: fix --signoff with conflicts
  sequencer: store commit message in private context
  sequencer: move current fixups to private context
  sequencer: start removing private fields from public API
  sequencer: always free "struct replay_opts"
</content>
</entry>
<entry>
<title>sequencer: move current fixups to private context</title>
<updated>2024-04-18T20:33:41Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2024-04-18T13:14:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=497a01a2d3d2bef45dd76d76c769a0a2a3c80b57'/>
<id>urn:sha1:497a01a2d3d2bef45dd76d76c769a0a2a3c80b57</id>
<content type='text'>
The list of current fixups is an implementation detail of the sequencer
and so it should not be stored in the public options struct.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: start removing private fields from public API</title>
<updated>2024-04-18T20:33:41Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2024-04-18T13:14:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3152edc97ff37f61387c6b222c68bc4f8b19bee'/>
<id>urn:sha1:a3152edc97ff37f61387c6b222c68bc4f8b19bee</id>
<content type='text'>
"struct replay_opts" has a number of fields that are for internal
use. While they are marked as private having them in a public struct is
a distraction for callers and means that every time the internal details
are changed we have to recompile all the files that include sequencer.h
even though the public API is unchanged. This commit starts the process
of removing the private fields by adding an opaque pointer to a "struct
replay_ctx" to "struct replay_opts" and moving the "reflog_message"
member to the new private struct.

The sequencer currently updates the state files on disc each time it
processes a command in the todo list. This is an artifact of the
scripted implementation and makes the code hard to reason about as it is
not possible to get a complete view of the state in memory. In the
future we will add new members to "struct replay_ctx" to remedy this and
avoid writing state to disc unless the sequencer stops for user
interaction.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: stop setting GIT_CHERRY_PICK_HELP</title>
<updated>2024-02-27T18:33:36Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2024-02-27T14:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72a8d3f027a5ea04ac453583105b368cd88648cd'/>
<id>urn:sha1:72a8d3f027a5ea04ac453583105b368cd88648cd</id>
<content type='text'>
Setting this environment variable causes the sequencer to display a
custom message when it stops for the user to resolve conflicts and
remove CHERRY_PICK_HEAD. Setting it in "git rebase" is a vestige of
the scripted implementation, now that it is a builtin command we do
not need to communicate with the sequencer machinery via environment
variables.

Move the conflicts advice to use when rebasing into
sequencer.c so we do not need to pass it via the environment.

Note that we retain the changes in e4301f73fff (sequencer: unset
GIT_CHERRY_PICK_HELP for 'exec' commands, 2024-02-02) just in case
GIT_CHERRY_PICK_HELP is set in the environment when "git rebase" is
run.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: introduce functions to handle autostashes via refs</title>
<updated>2024-01-19T19:10:41Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-19T10:40:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35122daebc8030ccc42f54fe4f08272091e4aa94'/>
<id>urn:sha1:35122daebc8030ccc42f54fe4f08272091e4aa94</id>
<content type='text'>
We're about to convert the MERGE_AUTOSTASH ref to become non-special,
using the refs API instead of direct filesystem access to both read and
write the ref. The current interfaces to write autostashes is entirely
path-based though, so we need to extend them to also support writes via
the refs API instead.

Ideally, we would be able to fully replace the old set of path-based
interfaces. But the sequencer will continue to write state into
"rebase-merge/autostash". This path is not considered to be a ref at all
and will thus stay is-is for now, which requires us to keep both path-
and refs-based interfaces to handle autostashes.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -m: cleanup --strategy-option handling</title>
<updated>2023-04-10T16:53:19Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2023-04-10T09:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4a8bc9860aa09942dd0e6540d53102219a7e920d'/>
<id>urn:sha1:4a8bc9860aa09942dd0e6540d53102219a7e920d</id>
<content type='text'>
When handling "--strategy-option" rebase collects the commands into a
struct string_list, then concatenates them into a string, prepending "--"
to each one before splitting the string and removing the "--" prefix.
This is an artifact of the scripted rebase and the need to support
"rebase --preserve-merges". Now that "--preserve-merges" no-longer
exists we can cleanup the way the argument is handled.

The tests for a bad strategy option are adjusted now that
parse_strategy_opts() is no-longer called when starting a rebase. The
fact that it only errors out when running "git rebase --continue" is a
mixed blessing but the next commit will fix the root cause of the
parsing problem so lets not worry about that here.

Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: use struct strvec to store merge strategy options</title>
<updated>2023-04-10T16:53:19Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2023-04-10T09:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb60b9f37f87241a886e183f0ec6261debb9c1c5'/>
<id>urn:sha1:fb60b9f37f87241a886e183f0ec6261debb9c1c5</id>
<content type='text'>
The sequencer stores the merge strategy options in an array of strings
which allocated with ALLOC_GROW(). Using "struct strvec" avoids manually
managing the memory of that array and simplifies the code.

Aside from memory allocation the changes to the sequencer are largely
mechanical, changing xopts_nr to xopts.nr and xopts[i] to xopts.v[i]. A
new option parsing macro OPT_STRVEC() is also added to collect the
strategy options.  Hopefully this can be used to simplify the code in
builtin/merge.c in the future.

Note that there is a change of behavior to "git cherry-pick" and "git
revert" as passing “--no-strategy-option” will now clear any previous
strategy options whereas before this change it did nothing.

Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: remove unnecessary cache.h includes</title>
<updated>2023-02-24T01:25:28Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba3d1c73daa02152acf4729d45ca7fe4d71d5747'/>
<id>urn:sha1:ba3d1c73daa02152acf4729d45ca7fe4d71d5747</id>
<content type='text'>
We had several header files include cache.h unnecessarily.  Remove
those.  These have all been verified via both ensuring that
    gcc -E $HEADER | grep '"cache.h"'
found no hits and that
    cat &gt;temp.c &lt;&lt;EOF &amp;&amp;
    #include "git-compat-util.h"
    #include "$HEADER"
    int main() {}
    EOF
    gcc -c temp.c
successfully compiles without warnings.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
