From: Phillip Wood
This function was declared in commit.h but was implemented in
builtin/commit.c so was not part of libgit. Move it to libgit so we can
use it in the sequencer. This simplifies the implementation of
run_prepare_commit_msg_hook() and will be used in the next commit.
Signed-off-by
From: Phillip Wood
Commit 65850686cf ("rebase -i: rewrite write_basic_state() in C",
2018-08-28) accidentially added new function declarations after
the #endif at the end of the include guard.
Signed-off-by: Phillip Wood
---
sequencer.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Phillip Wood
As $EDITOR is exported setting it in one test affects all subsequent
tests. Avoid this by always setting it in a subshell. This commit leaves
20 calls to set_fake_editor that are not in subshells as they can
safely be removed in the next commit once all the other editor setting
When I converted the sequencer to avoid forking git commit i forgot about
the post-commit hook. These patches are based on
pw/rebase-i-show-HEAD-to-reword, otherwise the new test fails as that branch
changes the number of commits we make.
Thanks to Dscho & Junio for their comments on V1. I've made
From: Phillip Wood
Neither of the commands executed in the subshell change any shell
variables or the current directory so there is no need for them to be
executed in a subshell.
Signed-off-by: Phillip Wood
---
t/t3404-rebase-interactive.sh | 6 ++
1 file changed, 2 insertions(+), 4 deleti
From: Phillip Wood
Prior to commit 356ee4659b ("sequencer: try to commit without forking
'git commit'", 2017-11-24) the sequencer would always run the
post-commit hook after each pick or revert as it forked `git commit` to
create the commit. The conversion to committing without forking `git
commi
From: Phillip Wood
Some tests were calling set_fake_editor to ensure they had a sane no-op
editor set. Now that all the editor setting is done in subshells these
tests can rely on EDITOR=: and so do not need to call set_fake_editor.
Also add a test at the end to detect any future additions messi
From: Phillip Wood
Prior to commit 356ee4659b ("sequencer: try to commit without forking
'git commit'", 2017-11-24) the sequencer would always run the
post-commit hook after each pick or revert as it forked `git commit` to
create the commit. The conversion to committing without forking `git
commi
From: Phillip Wood
Commit 65850686cf ("rebase -i: rewrite write_basic_state() in C",
2018-08-28) accidentially added new function declarations after
the #endif at the end of the include guard.
Signed-off-by: Phillip Wood
---
sequencer.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Phillip Wood
This simplifies the implementation of run_prepare_commit_msg_hook() and
will be used in the next commit.
Signed-off-by: Phillip Wood
---
builtin/commit.c | 22 --
commit.h | 3 ---
sequencer.c | 45 ++-
When I converted the sequencer to avoid forking git commit i forgot about
the post-commit hook. These patches are based on
pw/rebase-i-show-HEAD-to-reword, otherwise the new test fails as that branch
changes the number of commits we make.
Phillip Wood (3):
sequencer.h fix placement of #endif
s
This series contains a couple of patches to make the C version of rebase
--interactive behave more like the scripted version. The third patch is not
strictly related to the first two but is included here to avoid merge
conflicts.
Phillip Wood (3):
rebase -i: always update HEAD before rewording
From: Phillip Wood
If the user runs git log while rewording a commit it is confusing if
sometimes we're amending the commit that's being reworded and at other
times we're creating a new commit depending on whether we could
fast-forward or not[1]. Fix this inconsistency by always committing the
pi
From: Phillip Wood
Adapt try_to_commit() to create a new root commit rather than special
casing this in run_git_commit(). The significantly reduces the amount of
special case code for creating the root commit and reduces the number of
commit code paths we have to worry about.
Signed-off-by: Phil
From: Phillip Wood
While a rebase is stopped for the user to edit a commit message it can
be convenient for them to also edit the todo list. The scripted version
of rebase supported this but the C version does not. We already check to
see if the todo list has been updated by an exec command so ex
From: Phillip Wood
Some of the tests check the output of rebase is what we expect. These
were added after a regression that added unwanted stash output when
using --autostash. They are useful as they prevent unintended changes to
the output of the various rebase commands. However they also includ
Remove ugliness in the tests that check the output of git rebase
I've updated this to avoid repeated calls to printf as suggested by Junio
Based-On: sg/rebase-progress
Phillip Wood (1):
t3420: remove progress lines before comparing output
t/t3420-rebase-autostash.sh | 19 +++
From: Phillip Wood
If the user commits or resets a conflict resolution in the middle of a
sequence of cherry-picks or reverts then CHERRY_PICK_HEAD/REVERT_HEAD
will be removed and so in the absence of those files we need to check
.git/sequencer/todo to see if there is a cherry-pick or revert in
p
Fix the detection of in-progress cherry-picks and reverts when the user
commits or resets a conflict resolution in the middle of a sequence of
picks/reverts.
Phillip Wood (1):
git-prompt: improve cherry-pick/revert detection
contrib/completion/git-prompt.sh | 37 ---
From: Phillip Wood
Some of the tests check the output of rebase is what we expect. These
were added after a regression that added unwanted stash output when
using --autostash. They are useful as they prevent unintended changes to
the output of the various rebase commands. However they also includ
Remove ugliness in the tests that check the output of git rebase
Based-On: sg/rebase-progress Cc: SZEDER Gábor szeder@gmail.com
[szeder@gmail.com]
Phillip Wood (1):
t3420: remove progress lines before comparing output
t/t3420-rebase-autostash.sh | 16 +---
1 file changed,
From: Phillip Wood
commit 4a72486de9 ("fix cherry-pick/revert status after commit",
2019-04-16) used parse_insn_line() to parse the first line of the todo
list to check if it was a pick or revert. However if the todo list is
left over from an old cherry-pick or revert and references a commit that
From: Phillip Wood
Factor out the code that parses the name of the command at the start of
each line in the todo file into its own function so that it can be used
in the next commit.
As I don't want to burden other callers with having to pass in a pointer
to the end of the line the test for an a
From: Phillip Wood
The code that parses the todo list allows an unabbreviated command name
to be followed by a space or a tab, but if the command name is
abbreviated it only allows a space after it. Fix this inconsistency.
Signed-off-by: Phillip Wood
---
sequencer.c | 2 +-
1 file changed, 1 i
Thanks for the comments on v1. I've updated the commit message of the second
patch to try and explain why the new function is not a straight-forward copy
of the old code
If we cannot parse the oid in the sequencer todo file do not show an error
when running git status but instead report that a che
If we cannot parse the oid in the sequencer todo file do not show an error
when running git status but instead report that a cherry-pick or revert is
in progress. This addresses a confusing error message reported in
https://public-inbox.org/git/3bc58c33-4268-4e7c-bf1a-fe349b3cb...@www.fastmail.com
From: Phillip Wood
Factor out the code that parses the name of the command at the start of
each line in the todo file into it's own function so that it can be used
in the next commit.
Signed-off-by: Phillip Wood
---
sequencer.c | 19 +--
1 file changed, 13 insertions(+), 6 dele
From: Phillip Wood
The code that parses the todo list allows an unabbreviated command name
to be followed by a space or a tab, but if the command name is
abbreviated it only allows a space after it. Fix this inconsistency.
Signed-off-by: Phillip Wood
---
sequencer.c | 2 +-
1 file changed, 1 i
From: Phillip Wood
commit 4a72486de9 ("fix cherry-pick/revert status after commit",
2019-04-16) used parse_insn_line() to parse the first line of the todo
list to check if it was a pick or revert. However if the todo list is
left over from an old cherry-pick or revert and references a commit that
From: Phillip Wood
Commit fecc6f3a68 ("add -p: adjust offsets of subsequent hunks when one is
skipped", 2018-03-01) fixed adding hunks in the correct place when a
previous hunk has been skipped. However it did not address patches that
are applied in reverse. In that case we need to adjust the pre
When I fixed the hunk offsets in add -p when hunks are skipped I forgot that
the reverse patch case needs to be handled differently.
Phillip Wood (1):
add -p: fix checkout -p with pathological context
git-add--interactive.perl | 6 +-
t/t3701-add-interactive.sh | 8
2 files chang
31 matches
Mail list logo