<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.c, branch v2.22.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.22.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.22.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-07-29T19:38:20Z</updated>
<entry>
<title>Merge branch 'pw/rebase-abort-clean-rewritten' into maint</title>
<updated>2019-07-29T19:38:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-29T19:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=649cae69bc8cc99fd5a9e72f8a08ae301d0d5e16'/>
<id>urn:sha1:649cae69bc8cc99fd5a9e72f8a08ae301d0d5e16</id>
<content type='text'>
"git rebase --abort" used to leave refs/rewritten/ when concluding
"git rebase -r", which has been corrected.

* pw/rebase-abort-clean-rewritten:
  rebase --abort/--quit: cleanup refs/rewritten
  sequencer: return errors from sequencer_remove_state()
  rebase: warn if state directory cannot be removed
  rebase: fix a memory leak
</content>
</entry>
<entry>
<title>rebase: fix garbled progress display with '-x'</title>
<updated>2019-06-27T19:58:20Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-06-27T13:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d7d90885e0aeb50eb4acc221ee43301b2a43aa3e'/>
<id>urn:sha1:d7d90885e0aeb50eb4acc221ee43301b2a43aa3e</id>
<content type='text'>
When running a command with the 'exec' instruction during an
interactive rebase session, or for a range of commits using 'git
rebase -x', the output can be a bit garbled when the name of the
command is short enough:

  $ git rebase -x true HEAD~5
  Executing: true
  Executing: true
  Executing: true
  Executing: true
  Executing: true)
  Successfully rebased and updated refs/heads/master.

Note the ')' at the end of the last line.  It gets more garbled as the
range of commits increases:

  $ git rebase -x true HEAD~50
  Executing: true)
  [ repeated 3 more times ]
  Executing: true0)
  [ repeated 44 more times ]
  Executing: true00)
  Successfully rebased and updated refs/heads/master.

Those extra numbers and ')' are remnants of the previously displayed
"Rebasing (N/M)" progress lines that are usually completely
overwritten by the "Executing: &lt;cmd&gt;" lines, unless 'cmd' is short and
the "N/M" part is long.

Make sure that the previously displayed "Rebasing (N/M)" line is
cleared by using the term_clear_line() helper function added in the
previous patch.  Do so only when not being '--verbose', because in
that case these "Rebasing (N/M)" lines are not printed as progress
(i.e. as lines with '\r' at the end), but as "regular" output (with
'\n' at the end).

A couple of other rebase commands print similar messages, e.g.
"Stopped at &lt;abbrev-oid&gt;... &lt;subject&gt;" for the 'edit' or 'break'
commands, or the "Successfully rebased and updated &lt;full-ref&gt;." at the
very end.  These are so long that they practically always overwrite
that "Rebasing (N/M)" progress line, but let's be prudent, and clear
the last line before printing these, too.

In 't3420-rebase-autostash.sh' two helper functions prepare the
expected output of four tests that check the full output of 'git
rebase' and thus are affected by this change, so adjust their
expectations to account for the new line clearing.

Note that this patch doesn't completely eliminate the possibility of
similar garbled outputs, e.g. some error messages from rebase or the
"Auto-merging &lt;file&gt;" message from within the depths of the merge
machinery might not be long enough to completely cover the last
"Rebasing (N/M)" line.  This patch doesn't do anything about them,
because dealing with them individually would result in way too much
churn, while having a catch-all term_clear_line() call in the common
code path of pick_commits() would hide the "Rebasing (N/M)" line way
too soon, and it would either flicker or be invisible.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: return errors from sequencer_remove_state()</title>
<updated>2019-05-15T01:59:33Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2019-05-14T18:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=37e9ee5cb90db0831d5d58bed82149ba67917d73'/>
<id>urn:sha1:37e9ee5cb90db0831d5d58bed82149ba67917d73</id>
<content type='text'>
If there is an error when removing the state directory then we should
report it. This matches what the non-interactive rebase does.

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/clean-sequencer-state-upon-final-commit'</title>
<updated>2019-05-13T14:50:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b51a0fdc3822c2ef260f6d496b6df6d33b101e8a'/>
<id>urn:sha1:b51a0fdc3822c2ef260f6d496b6df6d33b101e8a</id>
<content type='text'>
"git chery-pick" (and "revert" that shares the same runtime engine)
that deals with multiple commits got confused when the final step
gets stopped with a conflict and the user concluded the sequence
with "git commit".  Attempt to fix it by cleaning up the state
files used by these commands in such a situation.

* pw/clean-sequencer-state-upon-final-commit:
  fix cherry-pick/revert status after commit
  commit/reset: try to clean up sequencer state
</content>
</entry>
<entry>
<title>Merge branch 'pw/rebase-i-internal'</title>
<updated>2019-05-13T14:50:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-13T14:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ba06bc3d026cee54437db5cfddfffe7b4d7a187'/>
<id>urn:sha1:7ba06bc3d026cee54437db5cfddfffe7b4d7a187</id>
<content type='text'>
The internal implementation of "git rebase -i" has been updated to
avoid forking a separate "rebase--interactive" process.

* pw/rebase-i-internal:
  rebase -i: run without forking rebase--interactive
  rebase: use a common action enum
  rebase -i: use struct rebase_options in do_interactive_rebase()
  rebase -i: use struct rebase_options to parse args
  rebase -i: use struct object_id for squash_onto
  rebase -i: use struct commit when parsing options
  rebase -i: remove duplication
  rebase -i: combine rebase--interactive.c with rebase.c
  rebase: use OPT_RERERE_AUTOUPDATE()
  rebase: rename write_basic_state()
  rebase: don't translate trace strings
  sequencer: always discard index after checkout
</content>
</entry>
<entry>
<title>Merge branch 'dl/merge-cleanup-scissors-fix'</title>
<updated>2019-05-08T15:37:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b877cb4a7ec2fafd03b6a3a70c26370744a32c1b'/>
<id>urn:sha1:b877cb4a7ec2fafd03b6a3a70c26370744a32c1b</id>
<content type='text'>
The list of conflicted paths shown in the editor while concluding a
conflicted merge was shown above the scissors line when the
clean-up mode is set to "scissors", even though it was commented
out just like the list of updated paths and other information to
help the user explain the merge better.

* dl/merge-cleanup-scissors-fix:
  cherry-pick/revert: add scissors line on merge conflict
  sequencer.c: save and restore cleanup mode
  merge: add scissors line on merge conflict
  merge: cleanup messages like commit
  parse-options.h: extract common --cleanup option
  commit: extract cleanup_mode functions to sequencer
  t7502: clean up style
  t7604: clean up style
  t3507: clean up style
  t7600: clean up style
</content>
</entry>
<entry>
<title>Merge branch 'pw/sequencer-cleanup-with-signoff-x-fix'</title>
<updated>2019-05-08T15:37:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-05-08T15:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f757794d9dbd1152c0a557d3a07617ac2fa5bc09'/>
<id>urn:sha1:f757794d9dbd1152c0a557d3a07617ac2fa5bc09</id>
<content type='text'>
"git cherry-pick" run with the "-x" or the "--signoff" option used
to (and more importantly, ought to) clean up the commit log message
with the --cleanup=space option by default, but this has been
broken since late 2017.  This has been fixed.

* pw/sequencer-cleanup-with-signoff-x-fix:
  sequencer: fix cleanup with --signoff and -x
</content>
</entry>
<entry>
<title>Merge branch 'pw/cherry-pick-continue'</title>
<updated>2019-04-25T07:41:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d2dba18ced8e4939a3cd135998c54874ce73adc1'/>
<id>urn:sha1:d2dba18ced8e4939a3cd135998c54874ce73adc1</id>
<content type='text'>
"git cherry-pick --options A..B", after giving control back to the
user to ask help resolving a conflicted step, did not honor the
options it originally received, which has been corrected.

* pw/cherry-pick-continue:
  cherry-pick --continue: remember options
  cherry-pick: demonstrate option amnesia
  sequencer: break some long lines
</content>
</entry>
<entry>
<title>Merge branch 'ag/sequencer-reduce-rewriting-todo'</title>
<updated>2019-04-25T07:41:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e62e68d35949235435ea7f7d22ab6ea678fd46b0'/>
<id>urn:sha1:e62e68d35949235435ea7f7d22ab6ea678fd46b0</id>
<content type='text'>
The scripted version of "git rebase -i" wrote and rewrote the todo
list many times during a single step of its operation, and the
recent C-rewrite made a faithful conversion of the logic to C.  The
implementation has been updated to carry necessary information
around in-core to avoid rewriting the same file over and over
unnecessarily.

* ag/sequencer-reduce-rewriting-todo:
  rebase--interactive: move transform_todo_file()
  sequencer: use edit_todo_list() in complete_action()
  rebase-interactive: rewrite edit_todo_list() to handle the initial edit
  rebase-interactive: append_todo_help() changes
  rebase-interactive: use todo_list_write_to_file() in edit_todo_list()
  sequencer: refactor skip_unnecessary_picks() to work on a todo_list
  rebase--interactive: move rearrange_squash_in_todo_file()
  rebase--interactive: move sequencer_add_exec_commands()
  sequencer: change complete_action() to use the refactored functions
  sequencer: make sequencer_make_script() write its script to a strbuf
  sequencer: refactor rearrange_squash() to work on a todo_list
  sequencer: refactor sequencer_add_exec_commands() to work on a todo_list
  sequencer: refactor check_todo_list() to work on a todo_list
  sequencer: introduce todo_list_write_to_file()
  sequencer: refactor transform_todos() to work on a todo_list
  sequencer: remove the 'arg' field from todo_item
  sequencer: make the todo_list structure public
  sequencer: changes in parse_insn_buffer()
</content>
</entry>
<entry>
<title>rebase -i: use struct commit when parsing options</title>
<updated>2019-04-19T08:32:10Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2019-04-17T14:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d3488eb893ba53186770181171ee8ebc8100e18'/>
<id>urn:sha1:7d3488eb893ba53186770181171ee8ebc8100e18</id>
<content type='text'>
This is in preparation for using `struct rebase_options` when parsing
options in cmd_rebase__interactive(). Using a string for onto,
restrict_revision and upstream, was a hangover from the scripted version
of rebase. The functions that use these variables are updated to take a
`struct commit`.

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>
