<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.h, branch v2.17.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.17.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.17.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-02-13T21:39:15Z</updated>
<entry>
<title>Merge branch 'pw/sequencer-in-process-commit'</title>
<updated>2018-02-13T21:39:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-13T21:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f57f731ea2a540a4c82b476054e8a36aebb2314'/>
<id>urn:sha1:0f57f731ea2a540a4c82b476054e8a36aebb2314</id>
<content type='text'>
The sequencer infrastructure is shared across "git cherry-pick",
"git rebase -i", etc., and has always spawned "git commit" when it
needs to create a commit.  It has been taught to do so internally,
when able, by reusing the codepath "git commit" itself uses, which
gives performance boost for a few tens of percents in some sample
scenarios.

* pw/sequencer-in-process-commit:
  sequencer: run 'prepare-commit-msg' hook
  t7505: add tests for cherry-pick and rebase -i/-p
  t7505: style fixes
  sequencer: assign only free()able strings to gpg_sign
  sequencer: improve config handling
  t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
  sequencer: try to commit without forking 'git commit'
  sequencer: load commit related config
  sequencer: simplify adding Signed-off-by: trailer
  commit: move print_commit_summary() to libgit
  commit: move post-rewrite code to libgit
  Add a function to update HEAD after creating a commit
  commit: move empty message checks to libgit
  t3404: check intermediate squash messages
</content>
</entry>
<entry>
<title>sequencer: run 'prepare-commit-msg' hook</title>
<updated>2018-01-24T19:01:31Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2018-01-24T12:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66618a50f9c9f008d7aef751418f12ba9bfc6b85'/>
<id>urn:sha1:66618a50f9c9f008d7aef751418f12ba9bfc6b85</id>
<content type='text'>
Commit 356ee4659b ("sequencer: try to commit without forking 'git
commit'", 2017-11-24) forgot to run the 'prepare-commit-msg' hook when
creating the commit. Fix this by writing the commit message to a
different file and running the hook. Using a different file means that
if the commit is cancelled the original message file is
unchanged. Also move the checks for an empty commit so the order
matches 'git commit'.

Reported-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Helped-by: Ramsay Jones &lt;ramsay@ramsayjones.plus.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: improve config handling</title>
<updated>2017-12-13T19:15:14Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2017-12-13T11:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28d6daed4f119940ace31e523b3b272d3d153d04'/>
<id>urn:sha1:28d6daed4f119940ace31e523b3b272d3d153d04</id>
<content type='text'>
The previous config handling relied on global variables, called
git_default_config() even when the key had already been handled by
git_sequencer_config() and did not initialize the diff configuration
variables. Improve this by: i) loading the default values for message
cleanup and gpg signing of commits into struct replay_opts;
ii) restructuring the code to return immediately once a key is
handled; and iii) calling git_diff_basic_config(). Note that
unfortunately it is not possible to return early if the key is handled
by git_gpg_config() as it does not indicate to the caller if the key
has been handled or not.

The sequencer should probably have been calling
git_diff_basic_config() before as it creates a patch when there are
conflicts. The shell version uses 'diff-tree' to create the patch so
calling git_diff_basic_config() should match that. Although 'git
commit' calls git_diff_ui_config() I don't think the output of
print_commit_summary() is affected by anything that is loaded by that
as print_commit_summary() always turns on rename detection so would
ignore the value in the user's configuration anyway. The other values
loaded by git_diff_ui_config() are about the formatting of patches so
are not relevant to print_commit_summary().

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: learn to abbreviate command names</title>
<updated>2017-12-05T18:20:51Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2017-12-05T17:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8ae6c84da52a210e84b3734bb93c575638236d3'/>
<id>urn:sha1:d8ae6c84da52a210e84b3734bb93c575638236d3</id>
<content type='text'>
`git rebase -i` already know how to interpret single-letter command
names. Teach it to generate the todo list with these same abbreviated
names.

Based-on-patch-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i -x: add exec commands via the rebase--helper</title>
<updated>2017-12-05T18:20:51Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2017-12-05T17:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cce4a2756eb2c66544615e5ccd74671afb33256'/>
<id>urn:sha1:0cce4a2756eb2c66544615e5ccd74671afb33256</id>
<content type='text'>
Recent work on `git-rebase--interactive` aims to convert shell code to
C. Even if this is most likely not a big performance enhancement, let's
convert it too since a coming change to abbreviate command names
requires it to be updated.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: update functions to use a flags parameter</title>
<updated>2017-12-05T18:20:51Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2017-12-05T17:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=313a48eaca58ecd170bef9e6a5a55001c7511f08'/>
<id>urn:sha1:313a48eaca58ecd170bef9e6a5a55001c7511f08</id>
<content type='text'>
Update functions used in the rebase--helper so that they take a generic
'flags' parameter instead of a growing list of options.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: refactor transform_todo_ids</title>
<updated>2017-12-05T18:20:50Z</updated>
<author>
<name>Liam Beguin</name>
<email>liambeguin@gmail.com</email>
</author>
<published>2017-12-05T17:52:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8dccc7a6b2deb05783ea5d57b53548dab32d99ae'/>
<id>urn:sha1:8dccc7a6b2deb05783ea5d57b53548dab32d99ae</id>
<content type='text'>
The transform_todo_ids function is a little hard to read. Lets try
to make it easier by using more of the strbuf API. Also, since we'll
soon be adding command abbreviations, let's rename the function so
it's name reflects that change.

Signed-off-by: Liam Beguin &lt;liambeguin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer: load commit related config</title>
<updated>2017-11-24T13:44:18Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2017-11-24T11:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b36c5908135889bd9c48a8d44d4e07f59bf799ef'/>
<id>urn:sha1:b36c5908135889bd9c48a8d44d4e07f59bf799ef</id>
<content type='text'>
Load default values for message cleanup and gpg signing of commits in
preparation for committing without forking 'git commit'. Note that we
interpret commit.cleanup=scissors to mean COMMIT_MSG_CLEANUP_SPACE to
be consistent with 'git 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>
<entry>
<title>commit: move print_commit_summary() to libgit</title>
<updated>2017-11-24T13:44:18Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2017-11-24T11:07:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e47c6cafcb5a2223ea3de3d0b65f668f717cb2ab'/>
<id>urn:sha1:e47c6cafcb5a2223ea3de3d0b65f668f717cb2ab</id>
<content type='text'>
Move print_commit_summary() from builtin/commit.c to sequencer.c so it
can be shared with other commands. The function is modified by
changing the last argument to a flag so callers can specify whether
they want to show the author date in addition to specifying if this is
an initial commit.

If the sequencer dies in print_commit_summary() (which can only happen
when cherry-picking or reverting) then neither the todo list nor the
abort safety file are updated to reflect the commit that was just
made. print_commit_summary() can die if:

 - The commit that was just created cannot be found or parsed.

 - HEAD cannot be resolved either because some other process is
   updating it (which is bad news in the middle of a cherry-pick) or
   because it is corrupt.

 - log_tree_commit() cannot read some objects.

In all those cases dying will leave the sequencer in a sane state for
aborting; 'git cherry-pick --abort' will rewind HEAD to the last
successful commit before there was a problem with HEAD or the object
database. If the user somehow fixes the problem and runs 'git
cherry-pick --continue' then the sequencer will try and pick the same
commit again which may or may not be what the user wants depending on
what caused print_commit_summary() to die. If print_commit_summary()
returned an error instead then update_abort_safety_file() would try to
resolve HEAD which may or may not be successful. If it is successful
then running 'git rebase --abort' would not rewind HEAD to the last
successful commit which is not what we want.

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>commit: move post-rewrite code to libgit</title>
<updated>2017-11-18T03:38:10Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2017-11-17T11:34:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a87a6f3c98ea80740fa31d2559b78f75f8138132'/>
<id>urn:sha1:a87a6f3c98ea80740fa31d2559b78f75f8138132</id>
<content type='text'>
Move run_rewrite_hook() from bulitin/commit.c to sequencer.c so it can
be shared with other commands and add a new function
commit_post_rewrite() based on the code in builtin/commit.c that
encapsulates rewriting notes and running the post-rewrite hook. Once
the sequencer learns how to create commits without forking 'git
commit' these functions will be used when squashing commits.

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>
