[PATCH] add: Use struct argv_array in run_add_interactive()

2014-03-15 Thread Fabian Ruch
run_add_interactive() in builtin/add.c manually computes array bounds and allocates a static args array to build the add--interactive command line, which is error-prone. Use the argv-array helper functions instead. Signed-off-by: Fabian Ruch baf...@gmail.com --- builtin/add.c | 21

Re: [PATCH] add: Use struct argv_array in run_add_interactive()

2014-03-15 Thread Fabian Ruch
On 03/15/2014 12:14 PM, Fabian Ruch wrote: run_add_interactive() in builtin/add.c manually computes array bounds and allocates a static args array to build the add--interactive command line, which is error-prone. Use the argv-array helper functions instead. Signed-off-by: Fabian Ruch baf

[PATCH v2 21/23] rebase -i: teach do_pick the option --reset-author

2014-08-06 Thread Fabian Ruch
-commit command line which creates the final commit. If `--amend` is not passed as well, the fresh authorship effect is achieved by the mere fact that we are creating a new commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 23 ++- 1 file

[PATCH v2 11/23] rebase -i: log the replay of root commits

2014-08-06 Thread Fabian Ruch
`-q` option was probably introduced as a copy-and-paste error stemming from that part of the root commit handling code. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-rebase--interactive.sh b

[PATCH v2 17/23] rebase -i: prepare for squash in terms of do_pick --amend

2014-08-06 Thread Fabian Ruch
. Might be squashed into the subsequent commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 0fbf773..601a2ff 100644

[PATCH v2 22/23] rebase -i: teach do_pick the option --signoff

2014-08-06 Thread Fabian Ruch
-cherry-pick option `--signoff` to the `do_pick` interface. It appends a Signed-off-by: line using the committer identity to the log message of the picked commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 12 +++- 1 file changed, 11 insertions(+), 1 deletion

[PATCH v2 10/23] rebase -i: implement reword in terms of do_pick

2014-08-06 Thread Fabian Ruch
the same steps as the case arm for `reword` in `do_next` so far. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index aed2f93..8e1730c

[PATCH v2 12/23] rebase -i: root commits are replayed with an unnecessary option

2014-08-06 Thread Fabian Ruch
-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 91ef0f7..71571c8 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -511,7

[PATCH v2 07/23] rebase -i: squash skips commit-msg hook

2014-08-06 Thread Fabian Ruch
to the existing test checking that the pre-commit hook is disabled when simply picking a commit, provide a test checking that the commit-msg hook is disabled as well. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 2 +- t/t3404-rebase-interactive.sh | 78

[PATCH v2 14/23] rebase -i: do not die in do_pick

2014-08-06 Thread Fabian Ruch
whether there are conflicts or not and in-depth troubleshooting is still possible using the `--verbose` option. Remove the commit message title argument from `do_pick`'s interface, which has become unused. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 34

[PATCH v2 19/23] rebase -i: explicitly distinguish replay commands and exec tasks

2014-08-06 Thread Fabian Ruch
to a new function `do_replay` which assumes the first argument to be a commit hash and make no more such assumptions in `do_next`. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 42 -- 1 file changed, 28 insertions(+), 14

[PATCH v2 13/23] rebase -i: commit only once when rewriting picks

2014-08-06 Thread Fabian Ruch
either because its commit message can be altered as for any other pick. Since the orphaned root commit gets a temporary parent, it is always rewritten. Safely use the rewrite infrastructure of `do_pick` to create the final commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase

[PATCH v2 18/23] rebase -i: implement squash in terms of do_pick

2014-08-06 Thread Fabian Ruch
`. However, `do_pick` does not execute the verification hooks anyway because it solely replays commits and assumes that they have been verified before. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 32 ++-- 1 file changed, 6 insertions(+), 26

[PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword

2014-08-06 Thread Fabian Ruch
still do not accept user options as the interplay of `--reset-author` and the author script are yet to be determined. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/git-rebase

Re: [PATCH v1 09/19] rebase -i: commit only once when rewriting picks

2014-08-06 Thread Fabian Ruch
Hi Jeff, Jeff King writes: On Tue, Jul 29, 2014 at 01:18:09AM +0200, Fabian Ruch wrote: The options passed to `do_pick` determine whether the picked commit will be rewritten or not. If the commit gets rewritten, because the user requested to edit the commit message for instance, let

Re: [PATCH v2 02/23] rebase -i: allow squashing empty commits without complaints

2014-08-11 Thread Fabian Ruch
Hi Eric, Eric Sunshine writes: On Wed, Aug 6, 2014 at 7:59 PM, Fabian Ruch baf...@gmail.com wrote: The to-do list commands `squash` and `fixup` apply the changes introduced by the named commit to the tree but instead of creating a new commit on top of the current head it replaces the previous

Re: [PATCH v2 04/23] rebase -i: hide interactive command messages in verbose mode

2014-08-11 Thread Fabian Ruch
Hi Thomas, Thomas Rast writes: Fabian Ruch baf...@gmail.com writes: @@ -923,6 +923,8 @@ EOF ;; esac +mkdir -p $state_dir || die Could not create temporary $state_dir + git var GIT_COMMITTER_IDENT /dev/null || die You need to set your committer info first @@ -938,7

Re: [PATCH v2 08/23] rebase -i: reword executes pre-commit hook on interim commit

2014-08-11 Thread Fabian Ruch
Hi Thomas, Thomas Rast writes: Fabian Ruch baf...@gmail.com writes: Subject: Re: [PATCH v2 08/23] rebase -i: reword executes pre-commit hook on interim commit I think the change makes sense, but can you reword the subjects that it describes the state after the commit (i.e. what you

Re: [PATCH v2 20/23] rebase -i: parse to-do list command line options

2014-08-11 Thread Fabian Ruch
Hi Thomas, an updated patch is attached below. Thomas Rast writes: Fabian Ruch baf...@gmail.com writes: [...] are not supported at the moment. Neither are options that contain spaces because the shell expansion of `args` in `do_next` interprets white space characters as argument separator

Re: [PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword

2014-08-12 Thread Fabian Ruch
Hi Thomas, Thomas Rast writes: Fabian Ruch baf...@gmail.com writes: @@ -634,21 +644,24 @@ do_replay () { comment_for_reflog pick mark_action_done -do_pick $sha1 || die_with_patch $sha1 Could not apply $sha1... $rest +eval do_pick $opts

Re: [PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword

2014-08-14 Thread Fabian Ruch
Hi, Michael Haggerty writes: On 08/07/2014 01:59 AM, Fabian Ruch wrote: Lift the general unknown option blockade for the pick and reword commands. If `do_cmd` comes across one of the options `--signoff` and `--reset-author` while parsing a to-do entry and the scheduled command is either

[PATCH v3 00/27] Enable options --signoff, --reset-author for pick, reword, edit

2014-08-18 Thread Fabian Ruch
documented both in the git-rebase man page and the to-do list help text. Thanks for your time, Fabian Fabian Ruch (27): rebase -i: allow replaying commits with empty log messages rebase -i: allow squashing empty commits without complaints rebase -i: allow rewording empty commits without

[PATCH v3 03/27] rebase -i: allow rewording empty commits without complaints

2014-08-18 Thread Fabian Ruch
way but nothing more and the unchanged to-do list entry would not fail. Handle `reword` by cherry-picking the named commit and editing the log message using git commit --allow-empty --amend instead of git commit --amend. Add test. Signed-off-by: Fabian Ruch baf...@gmail.com --- git

[PATCH v3 04/27] fake_editor: leave standard output unchanged

2014-08-18 Thread Fabian Ruch
to come up with a different solution. The less convenient possibility that always remains is to store the debug output in a file in the trash directory or even keeping copies of the edited files before and after editing. Signed-off-by: Fabian Ruch baf...@gmail.com --- t/lib-rebase.sh

[PATCH v3 01/27] rebase -i: allow replaying commits with empty log messages

2014-08-18 Thread Fabian Ruch
` result. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 10 ++ t/t3404-rebase-interactive.sh | 38 ++ t/t3412-rebase-root.sh| 16 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/git

[PATCH v3 08/27] rebase -i: verify squash messages using commit-msg

2014-08-18 Thread Fabian Ruch
in `fixup` mode. Add tests. In addition to the existing test checking that the pre-commit hook is disabled when simply picking a commit, provide a test checking that the commit-msg hook is disabled as well. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 2 +- t

[PATCH v3 02/27] rebase -i: allow squashing empty commits without complaints

2014-08-18 Thread Fabian Ruch
notification. Add tests. Reported-by: Peter Krefting pe...@softwolves.pp.se Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 20 +++--- t/t3404-rebase-interactive.sh | 62 +++ 2 files changed, 79 insertions(+), 3

[PATCH v3 05/27] rebase -i: hide interactive command messages in verbose mode

2014-08-18 Thread Fabian Ruch
. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 9 + git-rebase.sh | 13 +++-- t/t3406-rebase-message.sh | 18 ++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase

[PATCH v3 06/27] rebase -i: discard redundant message when rewording fails

2014-08-18 Thread Fabian Ruch
be to keep track of the failed hooks in their output so that the user knows which of her hooks require improvement. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase

[PATCH v3 25/27] rebase -i: do not overwrite user author information

2014-08-18 Thread Fabian Ruch
the git environment variables until in the `do_with_author` subshell. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 73c97a1

[PATCH v3 24/27] rebase -i: teach do_pick the option --signoff

2014-08-18 Thread Fabian Ruch
-cherry-pick option `--signoff` to the `do_pick` interface. It appends a Signed-off-by: line using the committer identity to the log message of the picked commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 13 - 1 file changed, 12 insertions(+), 1 deletion

[PATCH v3 23/27] rebase -i: teach do_pick the option --reset-author

2014-08-18 Thread Fabian Ruch
environment variables. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 8b39f2d..6c75bc5 100644 --- a/git-rebase

[PATCH v3 27/27] rebase -i: enable --signoff, --reset-author for pick, reword, edit

2014-08-18 Thread Fabian Ruch
to be determined. Document the new options by listing them in the to-do help and giving a usage example in the INTERACTIVE MODE section of the git-rebase man page. Add tests. Signed-off-by: Fabian Ruch baf...@gmail.com --- Documentation/git-rebase.txt | 13 +++ git-rebase--interactive.sh | 38

[PATCH v3 07/27] commit: allow disabling pre-commit and commit-msg separately

2014-08-18 Thread Fabian Ruch
commits using git-tag for easy reference. The `--notag` option skips this step. Add tests. Signed-off-by: Fabian Ruch baf...@gmail.com --- Documentation/git-commit.txt | 8 - builtin/commit.c | 32 ++--- t/t7503-pre-commit-hook.sh | 65

[PATCH v3 16/27] rebase -i: teach do_pick the option --amend

2014-08-18 Thread Fabian Ruch
conflicts. It is not a mistake to do the initialization regardless of any conflicts because `amend` is always cleared before the next to-do item is processed. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 18 +- 1 file changed, 17 insertions(+), 1

[PATCH v3 09/27] rebase -i: do not verify reworded patches using pre-commit

2014-08-18 Thread Fabian Ruch
replayed and the new log message in `$GIT_DIR/COMMIT_EDITMSG`. Add tests. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 2 +- t/t3404-rebase-interactive.sh | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh

[PATCH v3 26/27] rebase -i: refuse to commit when resuming with updated head

2014-08-18 Thread Fabian Ruch
-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 35 +-- t/t3404-rebase-interactive.sh | 12 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 8fbfe6d..51ee80c

[PATCH v3 18/27] rebase -i: remove no-op do_with_author git commit --amend

2014-08-18 Thread Fabian Ruch
and until we decide to use other authorships for squash commits than the one of the first commit, unwrap `git commit --amend`. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 17 +++-- t/t3404-rebase-interactive.sh | 23 +++ 2 files

[PATCH v3 22/27] rebase -i: parse to-do list command line options

2014-08-18 Thread Fabian Ruch
when invoked by git-rebase. Add a test case that checks that unknown options are refused and can be corrected using `--edit-todo`. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 95 +++--- t/lib-rebase.sh| 20

[PATCH v3 15/27] rebase -i: do not die in do_pick

2014-08-18 Thread Fabian Ruch
whether there are conflicts or not and in-depth troubleshooting is still possible using the `--verbose` option. Remove the commit message title argument from `do_pick`'s interface, which has become unused. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 34

[PATCH v3 19/27] rebase -i: prepare for squash in terms of do_pick --amend

2014-08-18 Thread Fabian Ruch
. Might be squashed into the subsequent commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index ab807e5..614579c 100644

[PATCH v3 17/27] rebase -i: teach do_pick the option --file

2014-08-18 Thread Fabian Ruch
`rewrite_message` and relay the option --file $rewrite_message to the git-commit command line which creates the commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/git

[PATCH v3 21/27] rebase -i: explicitly distinguish replay commands and exec tasks

2014-08-18 Thread Fabian Ruch
to a new function `do_replay` which assumes the first argument to be a commit hash and make no more such assumptions in `do_next`. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 42 -- 1 file changed, 28 insertions(+), 14

[PATCH v3 13/27] rebase -i: do not use -C when --no-edit is sufficient

2014-08-18 Thread Fabian Ruch
-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index f4bb822..6561831 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -511,7

[PATCH v3 11/27] rebase -i: implement reword in terms of do_pick

2014-08-18 Thread Fabian Ruch
the same steps as the case arm for `reword` in `do_next` so far. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 8a89ced..2d768b3

[PATCH v3 14/27] rebase -i: commit only once when rewriting picks

2014-08-18 Thread Fabian Ruch
either because its commit message can be altered as for any other pick. Since the orphaned root commit gets a temporary parent, it is always rewritten. Safely use the rewrite infrastructure of `do_pick` to create the final commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase

[PATCH v3 20/27] rebase -i: implement squash in terms of do_pick

2014-08-18 Thread Fabian Ruch
`. However, `do_pick` does not execute the verification hooks anyway because it solely replays commits and assumes that they have been verified before. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 32 ++-- 1 file changed, 6 insertions(+), 26

[PATCH v3 10/27] rebase -i: teach do_pick the option --edit

2014-08-18 Thread Fabian Ruch
the substituted command output with control sequences. Execute the `reword` code from `do_next` instead if the option `--edit` is specified. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 43 +++ 1 file changed, 43 insertions(+) diff

[PATCH v3 12/27] rebase -i: log the replay of root commits

2014-08-18 Thread Fabian Ruch
`-q` option was probably introduced as a copy-and-paste error stemming from that part of the root commit handling code. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-rebase--interactive.sh b

Re: [RFC/PATCH 0/3] Teach revert/cherry-pick the --no-verify option

2014-09-05 Thread Fabian Ruch
Hi Johan, Johan Herland writes: A colleague of mine noticed that cherry-pick does not accept the --no-verify option to skip running the pre-commit/commit-msg hooks. neither git-cherry-pick nor git-revert execute the pre-commit or commit-msg hooks at the moment. The underlying rationale can be

Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

2014-09-14 Thread Fabian Ruch
Hi David, On 09/14/2014 10:30 AM, David Aguilar wrote: Ensure that rev-parse --verify --quiet is silent when asked about deleted reflog entries. Signed-off-by: David Aguilar dav...@gmail.com --- This verifies and depends on refs: make rev-parse --quiet actually quiet.

Re: Please help provide clarity on git rebase internals

2014-09-19 Thread Fabian Ruch
Hi Colin, On 09/08/2014 01:25 PM, Colin Yates wrote: My understanding is that rebasing branch B onto branch A unrolls all of branch B's commits and then reduces them onto the HEAD of branch A. For example, I took featureA branch from develop three days ago. develop subsequently had commits

Re: [PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword

2014-09-21 Thread Fabian Ruch
Hi Michael, On 08/13/2014 02:47 PM, Michael Haggerty wrote: On 08/07/2014 01:59 AM, Fabian Ruch wrote: pick and reword are atomic to-do list commands in the sense that they open a new task which is closed after the respective command is completed. squash and fixup are not atomic. They create

[PATCH v1] rebase -m: Use empty tree base for parentless commits

2014-10-09 Thread Fabian Ruch
`. Add a test. The test case rebases a single disconnected commit which creates an isolated file on master and, therefore, does not require a specific merge strategy. It is a mere sanity check. Reported-by: David M. Lloyd david.ll...@redhat.com Signed-off-by: Fabian Ruch baf...@gmail.com --- Hi David

Re: [PATCH v1] rebase -m: Use empty tree base for parentless commits

2014-10-09 Thread Fabian Ruch
Hi Junio, On 10/09/2014 09:05 PM, Junio C Hamano wrote: Fabian Ruch baf...@gmail.com writes: diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh index d3fb67d..3f754ae 100644 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@ -67,7 +67,13 @@ call_merge

Re: [PATCH v1] rebase -m: Use empty tree base for parentless commits

2014-10-13 Thread Fabian Ruch
Hi, Junio C Hamano writes: Fabian Ruch baf...@gmail.com writes: diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh index d3fb67d..3f754ae 100644 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@ -67,7 +67,13 @@ call_merge () { GIT_MERGE_VERBOSITY=1 export

[RFC 2/3] rebase -i: Reschedule tasks that failed before the index was touched

2014-05-26 Thread Fabian Ruch
not continue until they are resolved or the changes are not recorded in the index (return value neither 0 nor 1) and `rebase` has to try again with the same task. Reported-by: Phil Hord ho...@cisco.com Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 27

[RFC 1/3] sequencer: Signal failed ff as an aborted, not a conflicted merge

2014-05-26 Thread Fabian Ruch
in which the sequencer encounters an error. Signed-off-by: Fabian Ruch baf...@gmail.com --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 90cac7b..97cecca 100644 --- a/sequencer.c +++ b/sequencer.c @@ -278,7 +278,7 @@ static int

[RFC 3/3] tests: Add 'rebase -i commits that overwrite untracked files'

2014-05-26 Thread Fabian Ruch
case for regression testing to the rebase-interactive test suite. Reported-by: Phil Hord ho...@cisco.com Signed-off-by: Fabian Ruch baf...@gmail.com --- t/t3404-rebase-interactive.sh | 44 +++ 1 file changed, 44 insertions(+) diff --git a/t/t3404-rebase

Re: [PATCH 4/4] git-ack: record an ack

2014-06-03 Thread Fabian Ruch
Hi Michael, I have some inline comments below. Also, some parts of the patch do not adhere to the style rules - tabs for indentation - $(...) for command substitution - no space after redirection operators - double-quotes around redirection targets for shell scripts (from the file

Re: [RFC 1/3] sequencer: Signal failed ff as an aborted, not a conflicted merge

2014-06-09 Thread Fabian Ruch
Hi Junio, On 05/27/2014 08:42 PM, Junio C Hamano wrote: Fabian Ruch baf...@gmail.com writes: [..] In order to signal the three possible situations (not only success and failure to complete) after a pick through porcelain commands such as `cherry-pick`, exit with a return value

[PATCH] rebase -i: Remember merge options beyond continue actions

2014-06-09 Thread Fabian Ruch
If the user explicitly specified a merge strategy or strategy options, rebase --interactive started using the default merge strategy again after rebase --continue. This problem gets fixed by this commit. Add test. Since the rebase options -s and -X imply --merge, we can simply remove the

Re: [PATCH] rebase -i: Remember merge options beyond continue actions

2014-06-09 Thread Fabian Ruch
state variables strategy and strategy_opts. Reported-by: Diogo de Campos cam...@esss.com.br Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 18 +++--- t/t3404-rebase-interactive.sh | 16 2 files changed, 23 insertions(+), 11 deletions

Re: [PATCH 0/4] ack recoding in commit log

2014-06-11 Thread Fabian Ruch
Hi Michael, On 05/18/2014 11:17 PM, Michael S. Tsirkin wrote: As a maintainer, I often get patches by mail, then acked-by,reviewed-by etc responses are sent by separate mail. I like making acks commits, this way they are easy to keep track of as part of git history. In order to fully

[RFC] rebase --root: Empty root commit is replaced with sentinel

2014-06-18 Thread Fabian Ruch
-empty`. Signed-off-by: Fabian Ruch baf...@gmail.com --- Notes: Hi, This is not a fix yet. We are currently special casing in `do_pick` and whether the current head is the sentinel commit is not a special case that would fit into `do_pick`'s interface description

[RFC PATCH 2/7] rebase -i: Teach do_pick the option --edit

2014-06-18 Thread Fabian Ruch
-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh| 52 --- t/t3404-rebase-interactive.sh | 8 +++ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index ea5514e..fffdfa5

[RFC PATCH 0/7] rebase -i: Implement `reword` and `squash` in terms of `do_pick`

2014-06-18 Thread Fabian Ruch
to run the post-rewrite hook, something I could not figure out myself. Thanks for your time, Fabian [1] pick, reword, squash, fixup Fabian Ruch (7): rebase -i: Make option handling in pick_one more flexible rebase -i: Teach do_pick the option --edit rebase -i: Stop on root commits

[RFC PATCH 1/7] rebase -i: Make option handling in pick_one more flexible

2014-06-18 Thread Fabian Ruch
parameter left on the list. If an option is not supported, ignore it and issue a warning on the console. Construct a new arguments list `extra_args` of recognized options that shall be passed to `cherry-pick` on the command line. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase

[RFC PATCH 3/7] rebase -i: Stop on root commits with empty log messages

2014-06-18 Thread Fabian Ruch
these flags in the git-commit command line either. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 4 ++-- t/t3412-rebase-root.sh | 39 +++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/git-rebase--interactive.sh b

[RFC PATCH 6/7] rebase -i: Prepare for squash in terms of do_pick --amend

2014-06-18 Thread Fabian Ruch
be squashed into the subsequent commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index e4992dc..ada520d 100644

[RFC PATCH 4/7] rebase -i: Commit only once when rewriting picks

2014-06-18 Thread Fabian Ruch
, it is always rewritten. Safely use the rewrite infrastructure of `do_pick` to create the final commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/git-rebase--interactive.sh

[RFC PATCH 7/7] rebase -i: Teach do_pick the options --amend and --file

2014-06-18 Thread Fabian Ruch
the initialization regardless of any conflicts because `$amend` is always cleared before the next to-do item is processed. Signed-off-by: Fabian Ruch baf...@gmail.com --- Notes: A question about when to enable the post-rewrite hook. `rebase` collects the hashes of all processed commits

[RFC PATCH 5/7] rebase -i: Do not die in do_pick

2014-06-18 Thread Fabian Ruch
`$squash_msg` as commit message. Indicate an error in `do_pick` using return statements and properly kill the script at the call sites. Remove unused commit message title argument from `do_pick`'s signature. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 33

Re: [RFC] rebase --root: Empty root commit is replaced with sentinel

2014-06-19 Thread Fabian Ruch
Hi Michael, thanks for your reply. On 06/19/2014 01:35 PM, Michael Haggerty wrote: On 06/18/2014 02:10 PM, Fabian Ruch wrote: `rebase` supports the option `--root` both with and without `--onto`. The case where `--onto` is not specified is handled by creating a sentinel commit and squashing

Re: [RFC PATCH 1/7] rebase -i: Make option handling in pick_one more flexible

2014-06-21 Thread Fabian Ruch
Hi Michael, On 06/20/2014 03:40 PM, Michael Haggerty wrote: On 06/19/2014 05:28 AM, Fabian Ruch wrote: `pick_one` and `pick_one_preserving_merges` are wrappers around `cherry-pick` in `rebase --interactive`. They take the hash of a commit and build a `cherry-pick` command line

Re: [RFC PATCH 2/7] rebase -i: Teach do_pick the option --edit

2014-06-21 Thread Fabian Ruch
Hi Michael, On 06/20/2014 03:41 PM, Michael Haggerty wrote: On 06/19/2014 05:28 AM, Fabian Ruch wrote: The to-do list command `reword` replays a commit like `pick` but lets the user also edit the commit's log message. If one thinks of `pick` entries as scheduled `cherry-pick` command lines

Re: [RFC PATCH 3/7] rebase -i: Stop on root commits with empty log messages

2014-06-21 Thread Fabian Ruch
Hi Eric, On 06/21/2014 02:33 AM, Eric Sunshine wrote: On Wed, Jun 18, 2014 at 11:28 PM, Fabian Ruch baf...@gmail.com wrote: When `rebase` is executed with `--root` but no `--onto` is specified, `rebase` creates a sentinel commit which is replaced with the root commit in three steps

Re: [RFC PATCH 1/7] rebase -i: Make option handling in pick_one more flexible

2014-06-22 Thread Fabian Ruch
Hi Junio, On 06/20/2014 09:53 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: pick_one () { ff=--ff + extra_args= + while test $# -gt 0 + do + case $1 in + -n) + ff= + extra_args=$extra_args -n +

Re: [PATCH v2] git-am: add option to extract email Message-Id: tag into commit log

2014-07-02 Thread Fabian Ruch
Hi Avi, On 07/02/2014 10:51 AM, Avi Kivity wrote: Some workflows prefer to track exactly which email message was used to generate a commit. This can be used, for example, to generate an automated acknowledgement when a patch is committed as a response to the patch email, or as a reference to

[PATCH RFC v2 00/19] Enable options --signoff, --reset-author for pick, reword

2014-07-02 Thread Fabian Ruch
a security and a usability issue. For this reason, the patch series still hasn't graduated from being RFC. Fabian Fabian Ruch (19): rebase -i: Failed reword prints redundant error message rebase -i: reword complains about empty commit despite --keep-empty rebase -i: reword executes pre-commit hook

[PATCH RFC v2 03/19] rebase -i: reword executes pre-commit hook on interim commit

2014-07-02 Thread Fabian Ruch
. Caveat: In case the commit-msg hook finds the new log message ill-formatted, the user is only notified of the failed commit-msg hook but the log message is used for the commit anyway. git-commit ought to offer more fine-grained control over which hooks are executed. Signed-off-by: Fabian Ruch baf

[PATCH RFC v2 01/19] rebase -i: Failed reword prints redundant error message

2014-07-02 Thread Fabian Ruch
be to keep track of the failed hooks in their output so that the user knows which of her hooks require improvement. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase

[PATCH RFC v2 02/19] rebase -i: reword complains about empty commit despite --keep-empty

2014-07-02 Thread Fabian Ruch
way but nothing more and the unchanged to-do list entry would not fail. Handle `reword` by cherry-picking the named commit and editing the log message using git commit --allow-empty --amend instead of git commit --amend. Add test. Signed-off-by: Fabian Ruch baf...@gmail.com --- git

[PATCH RFC v2 05/19] rebase -i: Implement reword in terms of do_pick

2014-07-02 Thread Fabian Ruch
the same steps as the case arm for `reword` in `do_next` so far. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index e06d9b6

[PATCH RFC v2 10/19] rebase -i: Do not die in do_pick

2014-07-02 Thread Fabian Ruch
whether there are conflicts or not and in-depth troubleshooting is still possible using the `--verbose` option. Remove the commit message title argument from `do_pick`'s interface, which has become unused. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 37

[PATCH RFC v2 04/19] rebase -i: Teach do_pick the option --edit

2014-07-02 Thread Fabian Ruch
the substituted command output with control sequences. Execute the `reword` code from `do_next` instead if the option `--edit` is specified. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 52 ++ 1 file changed, 52 insertions(+) diff

[PATCH RFC v2 15/19] rebase -i: Explicitly distinguish replay commands and exec tasks

2014-07-02 Thread Fabian Ruch
to a new function `do_replay` which assumes the first argument to be a commit hash and make no more such assumptions in `do_next`. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 42 -- 1 file changed, 28 insertions(+), 14

[PATCH RFC v2 09/19] rebase -i: Commit only once when rewriting picks

2014-07-02 Thread Fabian Ruch
. Since the orphaned root commit gets a temporary parent, it is always rewritten. Safely use the rewrite infrastructure of `do_pick` to create the final commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 55 +++--- 1 file

[PATCH RFC v2 19/19] rebase -i: Enable options --signoff, --reset-author for pick, reword

2014-07-02 Thread Fabian Ruch
still do not accept user options as the interplay of `--reset-author` and the author script are yet to be determined. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/git-rebase

[PATCH RFC v2 07/19] rebase -i: The replay of root commits is not shown with --verbose

2014-07-02 Thread Fabian Ruch
is a detail of git-rebase--interactive's implementation. The option `-q` was probably introduced as a copy-and-paste error stemming from that part of the root commit handling code. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH RFC v2 17/19] rebase -i: Teach do_pick the option --reset-author

2014-07-02 Thread Fabian Ruch
-commit command line which creates the final commit. If `--amend` is not passed as well, the fresh authorship effect is achieved by the mere fact that we are creating a new commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 23 ++- 1 file

[PATCH RFC v2 14/19] rebase -i: Implement squash in terms of do_pick

2014-07-02 Thread Fabian Ruch
`. However, `do_pick` does not execute the verification hooks anyway because it solely replays commits and assumes that they have been verified before. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 30 ++ 1 file changed, 6 insertions(+), 24

[PATCH RFC v2 18/19] rebase -i: Teach do_pick the option --signoff

2014-07-02 Thread Fabian Ruch
-cherry-pick option `--signoff` to the `do_pick` interface. It appends a Signed-off-by: line using the committer identity to the log message of the picked commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 12 +++- 1 file changed, 11 insertions(+), 1 deletion

[PATCH RFC v2 12/19] rebase -i: Teach do_pick the option --file

2014-07-02 Thread Fabian Ruch
`rewrite_message` and relay the option --file $rewrite_message to the git-commit command line which creates the commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/git

[PATCH RFC v2 11/19] rebase -i: Teach do_pick the option --amend

2014-07-02 Thread Fabian Ruch
conflicts. It is not a mistake to do the initialization regardless of any conflicts because `amend` is always cleared before the next to-do item is processed. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 18 +- 1 file changed, 17 insertions(+), 1

[PATCH RFC v2 16/19] rebase -i: Parse to-do list command line options

2014-07-02 Thread Fabian Ruch
as in `do_cmd` with the exception that we only care about where the options stop and the commit hash begins. Do not reject any options when transforming the commit hashes. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 49

[PATCH RFC v2 13/19] rebase -i: Prepare for squash in terms of do_pick --amend

2014-07-02 Thread Fabian Ruch
. Might be squashed into the subsequent commit. Signed-off-by: Fabian Ruch baf...@gmail.com --- git-rebase--interactive.sh | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 47e3edf..37800be 100644

[PATCH v1] rebase -p: Command line option --no-ff is ignored

2014-07-06 Thread Fabian Ruch
holds for fast_forward might be turned off due to a use of --no-ff. To correctly notice squashes, explicitly check for -n. Add test. Signed-off-by: Fabian Ruch baf...@gmail.com --- Hi, The code checking force_rebase is copied from pick_one, although using a ternary operator to initialise

Re: [PATCH RFC v2 00/19] Enable options --signoff, --reset-author for pick, reword

2014-07-09 Thread Fabian Ruch
On 07/08/2014 10:45 PM, Junio C Hamano wrote: Fabian Ruch baf...@gmail.com writes: Fabian Ruch (19): rebase -i: Failed reword prints redundant error message rebase -i: reword complains about empty commit despite --keep-empty rebase -i: reword executes pre-commit hook on interim commit

Re: [PATCH RFC v2 02/19] rebase -i: reword complains about empty commit despite --keep-empty

2014-07-09 Thread Fabian Ruch
Junio C Hamano writes: Fabian Ruch baf...@gmail.com writes: Subject: rebase -i: reword complains about empty commit despite --keep-empty I had to read the title and then the log twice before understanding that the above is not change the complaint message (i.e. reword complaints spelled

  1   2   >