<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.h, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-03-31T21:10:50Z</updated>
<entry>
<title>sequencer: fix edit handling for cherry-pick and revert messages</title>
<updated>2021-03-31T21:10:50Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2021-03-31T06:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39edfd5cbc4d168db19ec1bc867d78ec7211ec39'/>
<id>urn:sha1:39edfd5cbc4d168db19ec1bc867d78ec7211ec39</id>
<content type='text'>
save_opts() should save any non-default values.  It was intended to do
this, but since most options in struct replay_opts default to 0, it only
saved non-zero values.  Unfortunately, this does not always work for
options.edit.  Roughly speaking, options.edit had a default value of 0
for cherry-pick but a default value of 1 for revert.  Make save_opts()
record a value whenever it differs from the default.

options.edit was also overly simplistic; we had more than two cases.
The behavior that previously existed was as follows:

                       Non-conflict commits    Right after Conflict
    revert             Edit iff isatty(0)      Edit (ignore isatty(0))
    cherry-pick        No edit                 See above
    Specify --edit     Edit (ignore isatty(0)) See above
    Specify --no-edit  (*)                     See above

    (*) Before stopping for conflicts, No edit is the behavior.  After
        stopping for conflicts, the --no-edit flag is not saved so see
        the first two rows.

However, the expected behavior is:

                       Non-conflict commits    Right after Conflict
    revert             Edit iff isatty(0)      Edit iff isatty(0)
    cherry-pick        No edit                 Edit iff isatty(0)
    Specify --edit     Edit (ignore isatty(0)) Edit (ignore isatty(0))
    Specify --no-edit  No edit                 No edit

In order to get the expected behavior, we need to change options.edit
to a tri-state: unspecified, false, or true.  When specified, we follow
what it says.  When unspecified, we need to check whether the current
commit being created is resolving a conflict as well as consulting
options.action and isatty(0).  While at it, add a should_edit() utility
function that compresses options.edit down to a boolean based on the
additional information for the non-conflict case.

continue_single_pick() is the function responsible for resuming after
conflict cases, regardless of whether there is one commit being picked
or many.  Make this function stop assuming edit behavior in all cases,
so that it can correctly handle !isatty(0) and specific requests to not
edit the commit message.

Reported-by: Renato Botelho &lt;garga@freebsd.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Reviewed-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/merge-ort-api-null-impl'</title>
<updated>2020-11-18T21:32:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-18T21:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1f95951efc55c97477e32287b06e204553be5c2'/>
<id>urn:sha1:a1f95951efc55c97477e32287b06e204553be5c2</id>
<content type='text'>
Preparation for a new merge strategy.

* en/merge-ort-api-null-impl:
  merge,rebase,revert: select ort or recursive by config or environment
  fast-rebase: demonstrate merge-ort's API via new test-tool command
  merge-ort-wrappers: new convience wrappers to mimic the old merge API
  merge-ort: barebones API of new merge strategy with empty implementation
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-orig-head'</title>
<updated>2020-11-18T21:32:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-18T21:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c042c455d4ffb9b5ed0c280301b5661f3efad572'/>
<id>urn:sha1:c042c455d4ffb9b5ed0c280301b5661f3efad572</id>
<content type='text'>
"git rebase -i" did not store ORIG_HEAD correctly.

* pw/rebase-i-orig-head:
  rebase -i: simplify get_revision_ranges()
  rebase -i: use struct object_id when writing state
  rebase -i: use struct object_id rather than looking up commit
  rebase -i: stop overwriting ORIG_HEAD buffer
</content>
</entry>
<entry>
<title>Merge branch 'jk/committer-date-is-author-date-fix-simplify'</title>
<updated>2020-11-09T22:06:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-09T22:06:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a44c9c0d05839d6402c84a80acd0c2525f3a85e'/>
<id>urn:sha1:6a44c9c0d05839d6402c84a80acd0c2525f3a85e</id>
<content type='text'>
Code simplification.

* jk/committer-date-is-author-date-fix-simplify:
  am, sequencer: stop parsing our own committer ident
</content>
</entry>
<entry>
<title>rebase -i: use struct object_id when writing state</title>
<updated>2020-11-04T22:10:41Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2020-11-04T15:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a2bb10d06db8a90920f1f518705a0bb9d39aa1db'/>
<id>urn:sha1:a2bb10d06db8a90920f1f518705a0bb9d39aa1db</id>
<content type='text'>
Rather than passing a string around pass the struct object_id that the
string was created from call oid_hex() when we write the file.

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: use struct object_id rather than looking up commit</title>
<updated>2020-11-04T22:10:41Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2020-11-04T15:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3e27a02d598084a0ef5c8dd6b410bd6a5c5299f'/>
<id>urn:sha1:f3e27a02d598084a0ef5c8dd6b410bd6a5c5299f</id>
<content type='text'>
We already have a struct object_id containing the oid that we want to
set ORIG_HEAD to so use that rather than converting it to a string and
then calling get_oid() on that string.

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,rebase,revert: select ort or recursive by config or environment</title>
<updated>2020-11-03T00:35:50Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2020-11-02T23:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14c4586c2dfa94d86d71a60481dd20bc5b56e562'/>
<id>urn:sha1:14c4586c2dfa94d86d71a60481dd20bc5b56e562</id>
<content type='text'>
Allow the testsuite to run where it treats requests for "recursive" or
the default merge algorithm via consulting the environment variable
GIT_TEST_MERGE_ALGORITHM which is expected to either be "recursive" (the
old traditional algorithm) or "ort" (the new algorithm).

Also, allow folks to pick the new algorithm via config setting.  It
turns out builtin/merge.c already had a way to allow users to specify a
different default merge algorithm: pull.twohead.  Rather odd
configuration name (especially to be in the 'pull' namespace rather than
'merge') but it's there.  Add that same configuration to rebase,
cherry-pick, and revert.

This required updating the various callsites that called merge_trees()
or merge_recursive() to conditionally call the new API, so this serves
as another demonstration of what the new API looks and feels like.
There are almost certainly some callsites that have not yet been
modified to work with the new merge algorithm, but this represents the
ones that I have been testing with thus far.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>am, sequencer: stop parsing our own committer ident</title>
<updated>2020-10-26T16:59:57Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-10-23T07:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2020451c5bcc5289b8e6f25c7092d4fdb702257a'/>
<id>urn:sha1:2020451c5bcc5289b8e6f25c7092d4fdb702257a</id>
<content type='text'>
For the --committer-date-is-author-date option of git-am and git-rebase,
we format the committer ident, then re-parse it to find the name and
email, and then feed those back to fmt_ident().

We can simplify this by handling it all at the time of the fmt_ident()
call. We pass in the appropriate getenv() results, and if they're not
present, then our WANT_COMMITTER_IDENT flag tells fmt_ident() to fill in
the appropriate value from the config. Which is exactly what
git_committer_ident() was doing under the hood.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-more-options'</title>
<updated>2020-09-03T19:37:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-03T19:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c31b19dd00981fcea435de1cd05eab179039a8d'/>
<id>urn:sha1:9c31b19dd00981fcea435de1cd05eab179039a8d</id>
<content type='text'>
"git rebase -i" learns a bit more options.

* pw/rebase-i-more-options:
  t3436: do not run git-merge-recursive in dashed form
  rebase: add --reset-author-date
  rebase -i: support --ignore-date
  rebase -i: support --committer-date-is-author-date
  am: stop exporting GIT_COMMITTER_DATE
  rebase -i: add --ignore-whitespace flag
</content>
</entry>
<entry>
<title>rebase -i: support --ignore-date</title>
<updated>2020-08-19T22:19:59Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2020-08-17T17:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3894aad67df655a9c7f3b511093f681d3a01fb7'/>
<id>urn:sha1:a3894aad67df655a9c7f3b511093f681d3a01fb7</id>
<content type='text'>
Rebase is implemented with two different backends - 'apply' and
'merge' each of which support a different set of options. In
particular the apply backend supports a number of options implemented
by 'git am' that are not implemented in the merge backend. This means
that the available options are different depending on which backend is
used which is confusing. This patch adds support for the --ignore-date
option to the merge backend. This option uses the current time as the
author date rather than reusing the original author date when
rewriting commits. We take care to handle the combination of
--ignore-date and --committer-date-is-author-date in the same way as
the apply backend.

Original-patch-by: Rohit Ashiwal &lt;rohit.ashiwal265@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>
</feed>
