<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/sequencer.h, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-12-05T18:20:51Z</updated>
<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>rebase -i: rearrange fixup/squash lines using the rebase--helper</title>
<updated>2017-07-27T22:35:06Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c44a4c650c66eb7b8d50c57fd4e1bff1add7bf77'/>
<id>urn:sha1:c44a4c650c66eb7b8d50c57fd4e1bff1add7bf77</id>
<content type='text'>
This operation has quadratic complexity, which is especially painful
on Windows, where shell scripts are *already* slow (mainly due to the
overhead of the POSIX emulation layer).

Let's reimplement this with linear complexity (using a hash map to
match the commits' subject lines) for the common case; Sadly, the
fixup/squash feature's design neglected performance considerations,
allowing arbitrary prefixes (read: `fixup! hell` will match the
commit subject `hello world`), which means that we are stuck with
quadratic performance in the worst case.

The reimplemented logic also happens to fix a bug where commented-out
lines (representing empty patches) were dropped by the previous code.

While at it, clarify how the fixup/squash feature works in `git rebase
-i`'s man page.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: skip unnecessary picks using the rebase--helper</title>
<updated>2017-07-27T22:35:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:45:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdac2b01ff77d32305610aeb26396e25bffa9dba'/>
<id>urn:sha1:cdac2b01ff77d32305610aeb26396e25bffa9dba</id>
<content type='text'>
In particular on Windows, where shell scripts are even more expensive
than on MacOSX or Linux, it makes sense to move a loop that forks
Git at least once for every line in the todo list into a builtin.

Note: The original code did not try to skip unnecessary picks of root
commits but punts instead (probably --root was not considered common
enough of a use case to bother optimizing). We do the same, for now.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: check for missing commits in the rebase--helper</title>
<updated>2017-07-27T22:35:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=943999493fd4084d00bd5b5decc85b68eb64785f'/>
<id>urn:sha1:943999493fd4084d00bd5b5decc85b68eb64785f</id>
<content type='text'>
In particular on Windows, where shell scripts are even more expensive
than on MacOSX or Linux, it makes sense to move a loop that forks
Git at least once for every line in the todo list into a builtin.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: also expand/collapse the SHA-1s via the rebase--helper</title>
<updated>2017-07-27T22:35:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3546c8d927d31048f0d6f41aa132ebdb82cf8bda'/>
<id>urn:sha1:3546c8d927d31048f0d6f41aa132ebdb82cf8bda</id>
<content type='text'>
This is crucial to improve performance on Windows, as the speed is now
mostly dominated by the SHA-1 transformation (because it spawns a new
rev-parse process for *every* line, and spawning processes is pretty
slow from Git for Windows' MSYS2 Bash).

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rebase -i: generate the script via rebase--helper</title>
<updated>2017-07-27T22:35:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62db5247790f2612c0b407a15d1901d88789d35a'/>
<id>urn:sha1:62db5247790f2612c0b407a15d1901d88789d35a</id>
<content type='text'>
The first step of an interactive rebase is to generate the so-called "todo
script", to be stored in the state directory as "git-rebase-todo" and to
be edited by the user.

Originally, we adjusted the output of `git log &lt;options&gt;` using a simple
sed script. Over the course of the years, the code became more
complicated. We now use shell scripting to edit the output of `git log`
conditionally, depending whether to keep "empty" commits (i.e. commits
that do not change any files).

On platforms where shell scripting is not native, this can be a serious
drag. And it opens the door for incompatibilities between platforms when
it comes to shell scripting or to Unix-y commands.

Let's just re-implement the todo script generation in plain C, using the
revision machinery directly.

This is substantially faster, improving the speed relative to the
shell script version of the interactive rebase from 2x to 3x on Windows.

Note that the rearrange_squash() function in git-rebase--interactive
relied on the fact that we set the "format" variable to the config setting
rebase.instructionFormat. Relying on a side effect like this is no good,
hence we explicitly perform that assignment (possibly again) in
rearrange_squash().

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sequencer (rebase -i): learn about the 'verbose' mode</title>
<updated>2017-01-09T22:57:29Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-01-02T15:26:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=556907f1e1057292e5cfc1f14e68167b43ff4761'/>
<id>urn:sha1:556907f1e1057292e5cfc1f14e68167b43ff4761</id>
<content type='text'>
When calling `git rebase -i -v`, the user wants to see some statistics
after the commits were rebased. Let's show some.

The strbuf we use to perform that task will be used for other things
in subsequent commits, hence it is declared and initialized in a wider
scope than strictly needed here.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
