]> git.ipfire.org Git - thirdparty/git.git/commit
built-in rebase: call `git am` directly
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 18 Jan 2019 15:09:27 +0000 (07:09 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jan 2019 18:11:45 +0000 (10:11 -0800)
commit21853626eac565dd42572d90724b29863f61eb3b
tree32a358ae033aff39d216a954d1bd3b6e280acdff
parent414f336069adfaea76217387cd03beefb4d73a20
built-in rebase: call `git am` directly

While the scripted `git rebase` still has to rely on the
`git-rebase--am.sh` script to implement the glue between the `rebase`
and the `am` commands, we can go a more direct route in the built-in
rebase and avoid using a shell script altogether.

This patch represents a straight-forward port of `git-rebase--am.sh` to
C, along with the glue code to call it directly from within
`builtin/rebase.c`.

This reduces the chances of Git for Windows running into trouble due to
problems with the POSIX emulation layer (known as "MSYS2 runtime",
itself a derivative of the Cygwin runtime): when no shell script is
called, the POSIX emulation layer is avoided altogether.

Note: we pass an empty action to `reset_head()` here when moving back to
the original branch, as no other action is applicable, really. This
parameter is used to initialize `unpack_trees()`' messages.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c