{"thread":{"id":"17361","subject":"[PATCH 0/2] rebase -i --root cleanups","startedAt":"2009-01-25T23:31:35Z","lastAt":"2009-02-02T08:39:21Z","messageCount":22,"participants":["Johannes Schindelin","Thomas Rast","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"101904","messageId":"alpine.DEB.1.00.0901260029480.14855@racer","threadId":"17361","inReplyTo":null,"subject":"[PATCH 0/2] rebase -i --root cleanups","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-25T23:31:35Z","receivedAt":"2009-01-25T23:31:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThis is just the first part of my rebase revamp; it would be good to\nget the trivial stuff out of the way early, so that I do not have to\nsend a large patch series nobody wants to read because of its size.\n\nThomas, these two patches happen to touch your --root realm, maybe you \nhave comments.\n\nJohannes Schindelin (2):\n  rebase -i --root: simplify code\n  rebase -i --root: fix check for number of arguments\n\n git-rebase--interactive.sh |   20 ++++++++------------\n 1 files changed, 8 insertions(+), 12 deletions(-)\n"},{"id":"101905","messageId":"alpine.DEB.1.00.0901260031460.14855@racer","threadId":"17361","inReplyTo":"alpine.DEB.1.00.0901260029480.14855@racer","subject":"[PATCH 1/2] rebase -i --root: simplify code","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-25T23:31:55Z","receivedAt":"2009-01-25T23:31:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWhen we rebase with --root, what we are actually picking are the commits\nin $ONTO..$HEAD.  So $ONTO is really our $UPSTREAM.  Spell it out.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n git-rebase--interactive.sh |   17 ++++++-----------\n 1 files changed, 6 insertions(+), 11 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 21ac20c..6e2bf25 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -581,13 +581,15 @@ first and then run 'git rebase --continue' again.\"\n \t\tif test -z \"$REBASE_ROOT\"\n \t\tthen\n \t\t\tUPSTREAM_ARG=\"$1\"\n-\t\t\tUPSTREAM=$(git rev-parse --verify \"$1\") || die \"Invalid base\"\n+\t\t\tUPSTREAM=$(git rev-parse --verify \"$1\") ||\n+\t\t\t\tdie \"Invalid base\"\n \t\t\ttest -z \"$ONTO\" && ONTO=$UPSTREAM\n \t\t\tshift\n \t\telse\n \t\t\tUPSTREAM_ARG=--root\n \t\t\ttest -z \"$ONTO\" &&\n \t\t\t\tdie \"You must specify --onto when using --root\"\n+\t\t\tUPSTREAM=$ONTO\n \t\tfi\n \t\trun_pre_rebase_hook \"$UPSTREAM_ARG\" \"$@\"\n \n@@ -648,16 +650,9 @@ first and then run 'git rebase --continue' again.\"\n \n \t\tSHORTHEAD=$(git rev-parse --short $HEAD)\n \t\tSHORTONTO=$(git rev-parse --short $ONTO)\n-\t\tif test -z \"$REBASE_ROOT\"\n-\t\t\t# this is now equivalent to ! -z \"$UPSTREAM\"\n-\t\tthen\n-\t\t\tSHORTUPSTREAM=$(git rev-parse --short $UPSTREAM)\n-\t\t\tREVISIONS=$UPSTREAM...$HEAD\n-\t\t\tSHORTREVISIONS=$SHORTUPSTREAM..$SHORTHEAD\n-\t\telse\n-\t\t\tREVISIONS=$ONTO...$HEAD\n-\t\t\tSHORTREVISIONS=$SHORTHEAD\n-\t\tfi\n+\t\tSHORTUPSTREAM=$(git rev-parse --short $UPSTREAM)\n+\t\tREVISIONS=$UPSTREAM...$HEAD\n+\t\tSHORTREVISIONS=$SHORTUPSTREAM..$SHORTHEAD\n \t\tgit rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \\\n \t\t\t--abbrev=7 --reverse --left-right --topo-order \\\n \t\t\t$REVISIONS | \\\n-- \n1.6.1.482.g7d54be\n"},{"id":"101906","messageId":"alpine.DEB.1.00.0901260032000.14855@racer","threadId":"17361","inReplyTo":"alpine.DEB.1.00.0901260029480.14855@racer","subject":"[PATCH 2/2] rebase -i --root: fix check for number of arguments","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-25T23:32:13Z","receivedAt":"2009-01-25T23:32:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n git-rebase--interactive.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 6e2bf25..5df35b2 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -571,7 +571,8 @@ first and then run 'git rebase --continue' again.\"\n \t\t;;\n \t--)\n \t\tshift\n-\t\ttest ! -z \"$REBASE_ROOT\" -o $# -eq 1 -o $# -eq 2 || usage\n+\t\ttest -z \"$REBASE_ROOT\" -a $# -ge 1 -a $# -le 2 ||\n+\t\ttest ! -z \"$REBASE_ROOT\" -a $# -le 1 || usage\n \t\ttest -d \"$DOTEST\" &&\n \t\t\tdie \"Interactive rebase already started\"\n \n-- \n1.6.1.482.g7d54be\n"},{"id":"101915","messageId":"200901260049.25563.trast@student.ethz.ch","threadId":"17361","inReplyTo":"alpine.DEB.1.00.0901260031460.14855@racer","subject":"Re: [PATCH 1/2] rebase -i --root: simplify code","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-25T23:49:22Z","receivedAt":"2009-01-25T23:49:22Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Johannes Schindelin wrote:\n> \n> When we rebase with --root, what we are actually picking are the commits\n> in $ONTO..$HEAD.  So $ONTO is really our $UPSTREAM.  Spell it out.\n[...]\n> +\t\t\tUPSTREAM=$ONTO\n\nWhile I think the simplification is reasonable, it breaks this check:\n\n  get_saved_options () {\n  # ...\n          test ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n  }\n\nSo you'll have to change that too.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"101916","messageId":"200901260053.06315.trast@student.ethz.ch","threadId":"17361","inReplyTo":"200901260049.25563.trast@student.ethz.ch","subject":"Re: [PATCH 1/2] rebase -i --root: simplify code","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-25T23:53:03Z","receivedAt":"2009-01-25T23:53:03Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Thomas Rast wrote:\n>           test ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n\nActually, I think that test never worked (and it's clearly my fault).\n\nThe corresponding 'echo $UPSTREAM > \"$DOTEST\"/upstream' just expanded\nto 'echo > ...', resulting in a file containing a single newline, but\nnever a zero-length file.  Duh.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"101918","messageId":"200901260108.07402.trast@student.ethz.ch","threadId":"17361","inReplyTo":"alpine.DEB.1.00.0901260032000.14855@racer","subject":"Re: [PATCH 2/2] rebase -i --root: fix check for number of arguments","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-26T00:07:55Z","receivedAt":"2009-01-26T00:07:55Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Johannes Schindelin wrote:\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>  git-rebase--interactive.sh |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 6e2bf25..5df35b2 100755\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -571,7 +571,8 @@ first and then run 'git rebase --continue' again.\"\n>  \t\t;;\n>  \t--)\n>  \t\tshift\n> -\t\ttest ! -z \"$REBASE_ROOT\" -o $# -eq 1 -o $# -eq 2 || usage\n> +\t\ttest -z \"$REBASE_ROOT\" -a $# -ge 1 -a $# -le 2 ||\n> +\t\ttest ! -z \"$REBASE_ROOT\" -a $# -le 1 || usage\n>  \t\ttest -d \"$DOTEST\" &&\n>  \t\t\tdie \"Interactive rebase already started\"\n\nAcked-by: Thomas Rast <trast@student.ethz.ch>\n\nI'll postpone 1/2 till I've had enough sleep to check whether\n--continue ever needed to know about --root, and either remove or fix\nthe remembering.  (Sorry for the noise.)\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"101923","messageId":"alpine.DEB.1.00.0901260143540.14855@racer","threadId":"17361","inReplyTo":"200901260049.25563.trast@student.ethz.ch","subject":"Re: [PATCH 1/2] rebase -i --root: simplify code","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-26T00:44:15Z","receivedAt":"2009-01-26T00:44:15Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 26 Jan 2009, Thomas Rast wrote:\n\n> Johannes Schindelin wrote:\n> > \n> > When we rebase with --root, what we are actually picking are the commits\n> > in $ONTO..$HEAD.  So $ONTO is really our $UPSTREAM.  Spell it out.\n> [...]\n> > +\t\t\tUPSTREAM=$ONTO\n> \n> While I think the simplification is reasonable, it breaks this check:\n> \n>   get_saved_options () {\n>   # ...\n>           test ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n>   }\n> \n> So you'll have to change that too.\n\nWill fix tomorrow.\n\nThanks,\nDscho\n"},{"id":"101924","messageId":"alpine.DEB.1.00.0901260148290.14855@racer","threadId":"17361","inReplyTo":"200901260108.07402.trast@student.ethz.ch","subject":"Re: [PATCH 2/2] rebase -i --root: fix check for number of arguments","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-26T00:49:45Z","receivedAt":"2009-01-26T00:49:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 26 Jan 2009, Thomas Rast wrote:\n\n> Johannes Schindelin wrote:\n> > \n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >  git-rebase--interactive.sh |    3 ++-\n> >  1 files changed, 2 insertions(+), 1 deletions(-)\n> > \n> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> > index 6e2bf25..5df35b2 100755\n> > --- a/git-rebase--interactive.sh\n> > +++ b/git-rebase--interactive.sh\n> > @@ -571,7 +571,8 @@ first and then run 'git rebase --continue' again.\"\n> >  \t\t;;\n> >  \t--)\n> >  \t\tshift\n> > -\t\ttest ! -z \"$REBASE_ROOT\" -o $# -eq 1 -o $# -eq 2 || usage\n> > +\t\ttest -z \"$REBASE_ROOT\" -a $# -ge 1 -a $# -le 2 ||\n> > +\t\ttest ! -z \"$REBASE_ROOT\" -a $# -le 1 || usage\n> >  \t\ttest -d \"$DOTEST\" &&\n> >  \t\t\tdie \"Interactive rebase already started\"\n> \n> Acked-by: Thomas Rast <trast@student.ethz.ch>\n> \n> I'll postpone 1/2 till I've had enough sleep to check whether\n> --continue ever needed to know about --root, and either remove or fix\n> the remembering.  (Sorry for the noise.)\n\nIt does need to remember, as pick_one wants to look at the parent to be \nable to fast-forward.\n\nBut the sane fix is to add a file \"$DOTEST\"/root in case we're running \nunder --root.\n\nCiao,\nDscho\n"},{"id":"101943","messageId":"7vtz7ma9z1.fsf@gitster.siamese.dyndns.org","threadId":"17361","inReplyTo":"200901260053.06315.trast@student.ethz.ch","subject":"Re: [PATCH 1/2] rebase -i --root: simplify code","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T05:54:10Z","receivedAt":"2009-01-26T05:54:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> Thomas Rast wrote:\n>>           test ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n>\n> Actually, I think that test never worked (and it's clearly my fault).\n>\n> The corresponding 'echo $UPSTREAM > \"$DOTEST\"/upstream' just expanded\n> to 'echo > ...', resulting in a file containing a single newline, but\n> never a zero-length file.  Duh.\n\nSince you never use the value stored in \"$DOTEST/upstream\" for anything\nelse anyway, how about doing something like this instead?  It would make\nthe meaning of the file used as a state variable much clearer.\n\nIt may break hooks and outside scripts that look at $DOTEST/upstream.  I\ndidn't check.\n\nThe hunk in the middle is to protect you against an environment variable\nUPSTREAM the user may have before starting \"rebase -i\".  There could be\nother state variables you added in recent commit d911d14 (rebase -i: learn\nto rebase root commit, 2009-01-02) that needs similar protection.  Please\ncheck.\n\n git-rebase--interactive.sh |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git c/git-rebase--interactive.sh w/git-rebase--interactive.sh\nindex 21ac20c..17cf0e5 100755\n--- c/git-rebase--interactive.sh\n+++ w/git-rebase--interactive.sh\n@@ -456,7 +456,7 @@ get_saved_options () {\n \ttest -d \"$REWRITTEN\" && PRESERVE_MERGES=t\n \ttest -f \"$DOTEST\"/strategy && STRATEGY=\"$(cat \"$DOTEST\"/strategy)\"\n \ttest -f \"$DOTEST\"/verbose && VERBOSE=t\n-\ttest ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n+\ttest -f \"$DOTEST\"/rebase-root && REBASE_ROOT=t\n }\n \n while test $# != 0\n@@ -585,6 +585,7 @@ first and then run 'git rebase --continue' again.\"\n \t\t\ttest -z \"$ONTO\" && ONTO=$UPSTREAM\n \t\t\tshift\n \t\telse\n+\t\t\tUPSTREAM=\n \t\t\tUPSTREAM_ARG=--root\n \t\t\ttest -z \"$ONTO\" &&\n \t\t\t\tdie \"You must specify --onto when using --root\"\n@@ -611,7 +612,12 @@ first and then run 'git rebase --continue' again.\"\n \t\t\techo \"detached HEAD\" > \"$DOTEST\"/head-name\n \n \t\techo $HEAD > \"$DOTEST\"/head\n-\t\techo $UPSTREAM > \"$DOTEST\"/upstream\n+\t\tcase \"$REBASE_ROOT\" in\n+\t\t'')\n+\t\t\trm -f \"$DOTEST\"/rebase-root ;;\n+\t\t*)\n+\t\t\t: >\"$DOTEST\"/rebase-root ;;\n+\t\tesac\n \t\techo $ONTO > \"$DOTEST\"/onto\n \t\ttest -z \"$STRATEGY\" || echo \"$STRATEGY\" > \"$DOTEST\"/strategy\n \t\ttest t = \"$VERBOSE\" && : > \"$DOTEST\"/verbose\n"},{"id":"101953","messageId":"1232960722-17480-1-git-send-email-trast@student.ethz.ch","threadId":"17361","inReplyTo":"7vtz7ma9z1.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-26T09:05:22Z","receivedAt":"2009-01-26T09:05:22Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nd911d14 (rebase -i: learn to rebase root commit, 2009-01-02) tried to\nremember the --root flag across a merge conflict in a broken way.\nIntroduce a flag file $DOTEST/rebase-root to fix and clarify.\n\nWhile at it, also make sure $UPSTREAM is always initialized to guard\nagainst existing values in the environment.\n\n[tr: added tests]\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n\nJunio C Hamano wrote:\n> Since you never use the value stored in \"$DOTEST/upstream\" for anything\n> else anyway, how about doing something like this instead?  It would make\n> the meaning of the file used as a state variable much clearer.\n\nYes, thanks, a patch precisely \"like this\" is in fact the right fix.\n\nI came up with some tests that try a conflicted --root rebase of each\nflavour, to guard against the problem in the future.  I wasn't\nentirely sure how to shape this into a patch, but here's a version\nthat forges patch message and sign-off in your name.\n\nDscho, with that confusion cleared, you can add my Ack to your 1/2\n(unchanged, though I'm afraid you'll get a textual conflict).\n\n\n git-rebase--interactive.sh |   10 ++++-\n t/t3412-rebase-root.sh     |   88 ++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 96 insertions(+), 2 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 21ac20c..17cf0e5 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -456,7 +456,7 @@ get_saved_options () {\n \ttest -d \"$REWRITTEN\" && PRESERVE_MERGES=t\n \ttest -f \"$DOTEST\"/strategy && STRATEGY=\"$(cat \"$DOTEST\"/strategy)\"\n \ttest -f \"$DOTEST\"/verbose && VERBOSE=t\n-\ttest ! -s \"$DOTEST\"/upstream && REBASE_ROOT=t\n+\ttest -f \"$DOTEST\"/rebase-root && REBASE_ROOT=t\n }\n \n while test $# != 0\n@@ -585,6 +585,7 @@ first and then run 'git rebase --continue' again.\"\n \t\t\ttest -z \"$ONTO\" && ONTO=$UPSTREAM\n \t\t\tshift\n \t\telse\n+\t\t\tUPSTREAM=\n \t\t\tUPSTREAM_ARG=--root\n \t\t\ttest -z \"$ONTO\" &&\n \t\t\t\tdie \"You must specify --onto when using --root\"\n@@ -611,7 +612,12 @@ first and then run 'git rebase --continue' again.\"\n \t\t\techo \"detached HEAD\" > \"$DOTEST\"/head-name\n \n \t\techo $HEAD > \"$DOTEST\"/head\n-\t\techo $UPSTREAM > \"$DOTEST\"/upstream\n+\t\tcase \"$REBASE_ROOT\" in\n+\t\t'')\n+\t\t\trm -f \"$DOTEST\"/rebase-root ;;\n+\t\t*)\n+\t\t\t: >\"$DOTEST\"/rebase-root ;;\n+\t\tesac\n \t\techo $ONTO > \"$DOTEST\"/onto\n \t\ttest -z \"$STRATEGY\" || echo \"$STRATEGY\" > \"$DOTEST\"/strategy\n \t\ttest t = \"$VERBOSE\" && : > \"$DOTEST\"/verbose\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 6359580..29bb6d0 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -184,4 +184,92 @@ test_expect_success 'pre-rebase hook stops rebase -i' '\n \ttest 0 = $(git rev-list other...stops2 | wc -l)\n '\n \n+test_expect_success 'remove pre-rebase hook' '\n+\trm -f .git/hooks/pre-rebase\n+'\n+\n+test_expect_success 'set up a conflict' '\n+\tgit checkout master &&\n+\techo conflict > B &&\n+\tgit add B &&\n+\tgit commit -m conflict\n+'\n+\n+test_expect_success 'rebase --root with conflict (first part)' '\n+\tgit checkout -b conflict1 other &&\n+\ttest_must_fail git rebase --root --onto master &&\n+\tgit ls-files -u | grep \"B$\"\n+'\n+\n+test_expect_success 'fix the conflict' '\n+\techo 3 > B &&\n+\tgit add B\n+'\n+\n+cat > expect-conflict <<EOF\n+6\n+5\n+4\n+3\n+conflict\n+2\n+1\n+EOF\n+\n+test_expect_success 'rebase --root with conflict (second part)' '\n+\tgit rebase --continue &&\n+\tgit log --pretty=tformat:\"%s\" > conflict1 &&\n+\ttest_cmp expect-conflict conflict1\n+'\n+\n+test_expect_success 'rebase -i --root with conflict (first part)' '\n+\tgit checkout -b conflict2 other &&\n+\tGIT_EDITOR=: test_must_fail git rebase -i --root --onto master &&\n+\tgit ls-files -u | grep \"B$\"\n+'\n+\n+test_expect_success 'fix the conflict' '\n+\techo 3 > B &&\n+\tgit add B\n+'\n+\n+test_expect_success 'rebase -i --root with conflict (second part)' '\n+\tgit rebase --continue &&\n+\tgit log --pretty=tformat:\"%s\" > conflict2 &&\n+\ttest_cmp expect-conflict conflict2\n+'\n+\n+sed 's/#/ /g' > expect-conflict-p <<'EOF'\n+*   Merge branch 'third' into other\n+|\\##\n+| * 6\n+* |   Merge branch 'side' into other\n+|\\ \\##\n+| * | 5\n+* | | 4\n+|/ /##\n+* | 3\n+|/##\n+* conflict\n+* 2\n+* 1\n+EOF\n+\n+test_expect_success 'rebase -i -p --root with conflict (first part)' '\n+\tgit checkout -b conflict3 other &&\n+\tGIT_EDITOR=: test_must_fail git rebase -i -p --root --onto master &&\n+\tgit ls-files -u | grep \"B$\"\n+'\n+\n+test_expect_success 'fix the conflict' '\n+\techo 3 > B &&\n+\tgit add B\n+'\n+\n+test_expect_success 'rebase -i -p --root with conflict (second part)' '\n+\tgit rebase --continue &&\n+\tgit log --graph --topo-order --pretty=tformat:\"%s\" > conflict3 &&\n+\ttest_cmp expect-conflict-p conflict3\n+'\n+\n test_done\n-- \n1.6.1.469.g6f3d5\n"},{"id":"102045","messageId":"7viqo14wwx.fsf@gitster.siamese.dyndns.org","threadId":"17361","inReplyTo":"1232960722-17480-1-git-send-email-trast@student.ethz.ch","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T20:47:26Z","receivedAt":"2009-01-26T20:47:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> From: Junio C Hamano <gitster@pobox.com>\n>\n> d911d14 (rebase -i: learn to rebase root commit, 2009-01-02) tried to\n> remember the --root flag across a merge conflict in a broken way.\n> Introduce a flag file $DOTEST/rebase-root to fix and clarify.\n>\n> While at it, also make sure $UPSTREAM is always initialized to guard\n> against existing values in the environment.\n>\n> [tr: added tests]\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n> ---\n>\n> Junio C Hamano wrote:\n>> Since you never use the value stored in \"$DOTEST/upstream\" for anything\n>> else anyway, how about doing something like this instead?  It would make\n>> the meaning of the file used as a state variable much clearer.\n>\n> Yes, thanks, a patch precisely \"like this\" is in fact the right fix.\n>\n> I came up with some tests that try a conflicted --root rebase of each\n> flavour, to guard against the problem in the future.  I wasn't\n> entirely sure how to shape this into a patch, but here's a version\n> that forges patch message and sign-off in your name.\n>\n> Dscho, with that confusion cleared, you can add my Ack to your 1/2\n> (unchanged, though I'm afraid you'll get a textual conflict).\n\nOk, so I'll queue this to 'master' as a bugfix.\n\nThanks.\n"},{"id":"102049","messageId":"7veiyp4w2m.fsf@gitster.siamese.dyndns.org","threadId":"17361","inReplyTo":"1232960722-17480-1-git-send-email-trast@student.ethz.ch","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T21:05:37Z","receivedAt":"2009-01-26T21:05:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> +test_expect_success 'rebase -i --root with conflict (first part)' '\n> +\tgit checkout -b conflict2 other &&\n> +\tGIT_EDITOR=: test_must_fail git rebase -i --root --onto master &&\n> +\tgit ls-files -u | grep \"B$\"\n> +'\n\nMaybe I am misrecalling things but didn't we have reports from people on\nsome platforms that single-shot exporting of the environment like this one\ndoes not work for them?\n\n> +test_expect_success 'fix the conflict' '\n> +\techo 3 > B &&\n> +\tgit add B\n> +'\n> +\n> +test_expect_success 'rebase -i --root with conflict (second part)' '\n> +\tgit rebase --continue &&\n> +\tgit log --pretty=tformat:\"%s\" > conflict2 &&\n> +\ttest_cmp expect-conflict conflict2\n> +'\n> +\n> +sed 's/#/ /g' > expect-conflict-p <<'EOF'\n> +*   Merge branch 'third' into other\n> +|\\##\n> +| * 6\n> +* |   Merge branch 'side' into other\n> +|\\ \\##\n> +| * | 5\n> +* | | 4\n> +|/ /##\n> +* | 3\n> +|/##\n> +* conflict\n> +* 2\n> +* 1\n> +EOF\n\nI do not like this very much.  Future improvements of the graph drawing\nalgorithm (one obvious \"flaw\" you are exposing by the above is that it has\ntrailing whitespaces that can be trimmed, and somebody else may be\ninclined to fix) would break the expectation this test vector has.\n\nDo you have to compare the topology this way, or are there other more\nreliable ways?\n"},{"id":"102050","messageId":"20090126210942.GH27604@coredump.intra.peff.net","threadId":"17361","inReplyTo":"7veiyp4w2m.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-01-26T21:09:42Z","receivedAt":"2009-01-26T21:09:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 26, 2009 at 01:05:37PM -0800, Junio C Hamano wrote:\n\n> > +test_expect_success 'rebase -i --root with conflict (first part)' '\n> > +\tgit checkout -b conflict2 other &&\n> > +\tGIT_EDITOR=: test_must_fail git rebase -i --root --onto master &&\n> > +\tgit ls-files -u | grep \"B$\"\n> > +'\n> \n> Maybe I am misrecalling things but didn't we have reports from people on\n> some platforms that single-shot exporting of the environment like this one\n> does not work for them?\n\nI don't think you are misrecalling. The problem is with one-shot\nvariables and functional calls. See 09b78bc1.\n\n-Peff\n"},{"id":"102052","messageId":"20090126211212.GB28354@coredump.intra.peff.net","threadId":"17361","inReplyTo":"20090126210942.GH27604@coredump.intra.peff.net","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-01-26T21:12:12Z","receivedAt":"2009-01-26T21:12:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 26, 2009 at 04:09:42PM -0500, Jeff King wrote:\n\n> > Maybe I am misrecalling things but didn't we have reports from people on\n> > some platforms that single-shot exporting of the environment like this one\n> > does not work for them?\n> \n> I don't think you are misrecalling. The problem is with one-shot\n> variables and functional calls. See 09b78bc1.\n\nErr, _function_ calls. Need sleep badly.\n\n-Peff\n"},{"id":"102061","messageId":"200901262228.13104.trast@student.ethz.ch","threadId":"17361","inReplyTo":"7veiyp4w2m.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-26T21:28:08Z","receivedAt":"2009-01-26T21:28:08Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Junio C Hamano wrote:\n> Thomas Rast <trast@student.ethz.ch> writes:\n> > +\tGIT_EDITOR=: test_must_fail git rebase -i --root --onto master &&\n> \n> Maybe I am misrecalling things but didn't we have reports from people on\n> some platforms that single-shot exporting of the environment like this one\n> does not work for them?\n\nThen that deserves a fix, though I should point out that the original\npatches (now on master) have the same code in them.\n\n[So many quirks and so little time!]\n\n> > +sed 's/#/ /g' > expect-conflict-p <<'EOF'\n> > +*   Merge branch 'third' into other\n> > +|\\##\n> > +| * 6\n> > +* |   Merge branch 'side' into other\n> > +|\\ \\##\n> > +| * | 5\n> > +* | | 4\n> > +|/ /##\n> > +* | 3\n> > +|/##\n> > +* conflict\n> > +* 2\n> > +* 1\n> > +EOF\n> \n> I do not like this very much.  Future improvements of the graph drawing\n> algorithm (one obvious \"flaw\" you are exposing by the above is that it has\n> trailing whitespaces that can be trimmed, and somebody else may be\n> inclined to fix) would break the expectation this test vector has.\n> \n> Do you have to compare the topology this way, or are there other more\n> reliable ways?\n\nIt would certainly be possible to test the SHA1 of the resulting\nbranch tip, but t/README says I shouldn't.  Or we could spell it out\nas a series of 'parent of X is Y' and 'message of Y is foo' tests,\nwhich seems rather messy.\n\nThe above approach at least has the advantage that a test failure due\nto format change can be diagnosed very quickly just from the diff that\nis shown with -v.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"102063","messageId":"7vzlhd3fh7.fsf@gitster.siamese.dyndns.org","threadId":"17361","inReplyTo":"7veiyp4w2m.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-26T21:49:24Z","receivedAt":"2009-01-26T21:49:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Thomas Rast <trast@student.ethz.ch> writes:\n> ...\n>> +sed 's/#/ /g' > expect-conflict-p <<'EOF'\n>> +*   Merge branch 'third' into other\n>> +|\\##\n>> +| * 6\n>> +* |   Merge branch 'side' into other\n>> +|\\ \\##\n>> +| * | 5\n>> +* | | 4\n>> +|/ /##\n>> +* | 3\n>> +|/##\n>> +* conflict\n>> +* 2\n>> +* 1\n>> +EOF\n>\n> I do not like this very much.  Future improvements of the graph drawing\n> algorithm (one obvious \"flaw\" you are exposing by the above is that it has\n> trailing whitespaces that can be trimmed, and somebody else may be\n> inclined to fix) would break the expectation this test vector has.\n>\n> Do you have to compare the topology this way, or are there other more\n> reliable ways?\n\nPerhaps something like this.\n\n t/t3412-rebase-root.sh |   36 +++++++++++++++++++++---------------\n 1 files changed, 21 insertions(+), 15 deletions(-)\n\ndiff --git i/t/t3412-rebase-root.sh w/t/t3412-rebase-root.sh\nindex 29bb6d0..2408cf8 100755\n--- i/t/t3412-rebase-root.sh\n+++ w/t/t3412-rebase-root.sh\n@@ -240,19 +240,24 @@ test_expect_success 'rebase -i --root with conflict (second part)' '\n '\n \n sed 's/#/ /g' > expect-conflict-p <<'EOF'\n-*   Merge branch 'third' into other\n-|\\##\n-| * 6\n-* |   Merge branch 'side' into other\n-|\\ \\##\n-| * | 5\n-* | | 4\n-|/ /##\n-* | 3\n-|/##\n-* conflict\n-* 2\n-* 1\n+commit conflict3 conflict3~1 conflict3^2\n+Merge branch 'third' into other\n+commit conflict3^2 conflict3~4\n+6\n+commit conflict3~1 conflict3~2 conflict3~1^2\n+Merge branch 'side' into other\n+commit conflict3~1^2 conflict3~3\n+5\n+commit conflict3~2 conflict3~3\n+4\n+commit conflict3~3 conflict3~4\n+3\n+commit conflict3~4 conflict3~5\n+conflict\n+commit conflict3~5 conflict3~6\n+2\n+commit conflict3~6\n+1\n EOF\n \n test_expect_success 'rebase -i -p --root with conflict (first part)' '\n@@ -268,8 +273,9 @@ test_expect_success 'fix the conflict' '\n \n test_expect_success 'rebase -i -p --root with conflict (second part)' '\n \tgit rebase --continue &&\n-\tgit log --graph --topo-order --pretty=tformat:\"%s\" > conflict3 &&\n-\ttest_cmp expect-conflict-p conflict3\n+\tgit rev-list --topo-order --parents --pretty=\"tformat:%s\" HEAD |\n+\tgit name-rev --stdin --name-only --refs=refs/heads/conflict3 >out &&\n+\ttest_cmp expect-conflict-p out\n '\n \n test_done\n"},{"id":"102069","messageId":"7v7i4h382q.fsf@gitster.siamese.dyndns.org","threadId":"17361","inReplyTo":"200901262228.13104.trast@student.ethz.ch","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-27T00:29:17Z","receivedAt":"2009-01-27T00:29:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> It would certainly be possible to test the SHA1 of the resulting\n> branch tip, but t/README says I shouldn't.\n\nCorrect.  The test should convert the SHA-1 back to some symbolic form\nthat is stable for comparison.\n"},{"id":"102651","messageId":"200901302343.39921.trast@student.ethz.ch","threadId":"17361","inReplyTo":"7vzlhd3fh7.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] rebase -i: correctly remember --root flag across --continue","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-30T22:43:34Z","receivedAt":"2009-01-30T22:43:34Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Junio C Hamano wrote:\n> Perhaps something like this.\n> +\tgit rev-list --topo-order --parents --pretty=\"tformat:%s\" HEAD |\n> +\tgit name-rev --stdin --name-only --refs=refs/heads/conflict3 >out &&\n\nClever.  I'll follow up with cleanup patches for the rest of the\ntest.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"102653","messageId":"1233355621-4783-1-git-send-email-trast@student.ethz.ch","threadId":"17361","inReplyTo":"200901302343.39921.trast@student.ethz.ch","subject":"[PATCH 1/2] t3412: clean up GIT_EDITOR usage","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-30T22:47:00Z","receivedAt":"2009-01-30T22:47:00Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"a6c7a27 (rebase -i: correctly remember --root flag across --continue,\n2009-01-26) introduced a more portable GIT_EDITOR usage, but left the\nold tests unchanged.\n\nSince we never use the editor (all tests run the rebase script as\nproposed by rebase -i), just disable it outright, which simplifies the\ntests.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n t/t3412-rebase-root.sh |   38 +++++++++++++-------------------------\n 1 files changed, 13 insertions(+), 25 deletions(-)\n\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 9fc528f..8a9154a 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -6,6 +6,10 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.\n '\n . ./test-lib.sh\n \n+# we always run the interactive rebases unchanged, so just disable the editor\n+GIT_EDITOR=:\n+export GIT_EDITOR\n+\n test_expect_success 'prepare repository' '\n \ttest_commit 1 A &&\n \ttest_commit 2 A &&\n@@ -59,7 +63,7 @@ test_expect_success 'pre-rebase got correct input (2)' '\n \n test_expect_success 'rebase -i --root --onto <newbase>' '\n \tgit checkout -b work3 other &&\n-\tGIT_EDITOR=: git rebase -i --root --onto master &&\n+\tgit rebase -i --root --onto master &&\n \tgit log --pretty=tformat:\"%s\" > rebased3 &&\n \ttest_cmp expect rebased3\n '\n@@ -70,7 +74,7 @@ test_expect_success 'pre-rebase got correct input (3)' '\n \n test_expect_success 'rebase -i --root --onto <newbase> <branch>' '\n \tgit branch work4 other &&\n-\tGIT_EDITOR=: git rebase -i --root --onto master work4 &&\n+\tgit rebase -i --root --onto master work4 &&\n \tgit log --pretty=tformat:\"%s\" > rebased4 &&\n \ttest_cmp expect rebased4\n '\n@@ -81,7 +85,7 @@ test_expect_success 'pre-rebase got correct input (4)' '\n \n test_expect_success 'rebase -i -p with linear history' '\n \tgit checkout -b work5 other &&\n-\tGIT_EDITOR=: git rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto master &&\n \tgit log --pretty=tformat:\"%s\" > rebased5 &&\n \ttest_cmp expect rebased5\n '\n@@ -111,7 +115,7 @@ EOF\n \n test_expect_success 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n-\tGIT_EDITOR=: git rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto master &&\n \tgit log --graph --topo-order --pretty=tformat:\"%s\" > rebased6 &&\n \ttest_cmp expect-side rebased6\n '\n@@ -142,7 +146,7 @@ EOF\n \n test_expect_success 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n-\tGIT_EDITOR=: git rebase -i -p --root --onto master &&\n+\tgit rebase -i -p --root --onto master &&\n \tgit log --graph --topo-order --pretty=tformat:\"%s\" > rebased7 &&\n \ttest_cmp expect-third rebased7\n '\n@@ -158,22 +162,14 @@ EOF\n \n test_expect_success 'pre-rebase hook stops rebase' '\n \tgit checkout -b stops1 other &&\n-\t(\n-\t\tGIT_EDITOR=:\n-\t\texport GIT_EDITOR\n-\t\ttest_must_fail git rebase --root --onto master\n-\t) &&\n+\ttest_must_fail git rebase --root --onto master &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops1\n \ttest 0 = $(git rev-list other...stops1 | wc -l)\n '\n \n test_expect_success 'pre-rebase hook stops rebase -i' '\n \tgit checkout -b stops2 other &&\n-\t(\n-\t\tGIT_EDITOR=:\n-\t\texport GIT_EDITOR\n-\t\ttest_must_fail git rebase --root --onto master\n-\t) &&\n+\ttest_must_fail git rebase --root --onto master &&\n \ttest \"z$(git symbolic-ref HEAD)\" = zrefs/heads/stops2\n \ttest 0 = $(git rev-list other...stops2 | wc -l)\n '\n@@ -218,11 +214,7 @@ test_expect_success 'rebase --root with conflict (second part)' '\n \n test_expect_success 'rebase -i --root with conflict (first part)' '\n \tgit checkout -b conflict2 other &&\n-\t(\n-\t\tGIT_EDITOR=:\n-\t\texport GIT_EDITOR\n-\t\ttest_must_fail git rebase -i --root --onto master\n-\t) &&\n+\ttest_must_fail git rebase -i --root --onto master &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n@@ -260,11 +252,7 @@ EOF\n \n test_expect_success 'rebase -i -p --root with conflict (first part)' '\n \tgit checkout -b conflict3 other &&\n-\t(\n-\t\tGIT_EDITOR=:\n-\t\texport GIT_EDITOR\n-\t\ttest_must_fail git rebase -i -p --root --onto master\n-\t) &&\n+\ttest_must_fail git rebase -i -p --root --onto master &&\n \tgit ls-files -u | grep \"B$\"\n '\n \n-- \n1.6.1.2.464.g6066\n"},{"id":"102652","messageId":"1233355621-4783-2-git-send-email-trast@student.ethz.ch","threadId":"17361","inReplyTo":"1233355621-4783-1-git-send-email-trast@student.ethz.ch","subject":"[PATCH 2/2] t3412: use log|name-rev instead of log --graph","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-01-30T22:47:01Z","receivedAt":"2009-01-30T22:47:01Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Replace all 'git log --graph' calls for history verification with the\ncombination of 'git log ...| git name-rev' first introduced by a6c7a27\n(rebase -i: correctly remember --root flag across --continue,\n2009-01-26).  This should be less susceptible to format changes than\nthe --graph code.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n t/t3412-rebase-root.sh |   65 ++++++++++++++++++++++++++++-------------------\n 1 files changed, 39 insertions(+), 26 deletions(-)\n\ndiff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\nindex 8a9154a..57a3cad 100755\n--- a/t/t3412-rebase-root.sh\n+++ b/t/t3412-rebase-root.sh\n@@ -10,6 +10,12 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.\n GIT_EDITOR=:\n export GIT_EDITOR\n \n+log_with_names () {\n+\tgit rev-list --topo-order --parents --pretty=\"tformat:%s\" HEAD |\n+\tgit name-rev --stdin --name-only --refs=refs/heads/$1\n+}\n+\n+\n test_expect_success 'prepare repository' '\n \ttest_commit 1 A &&\n \ttest_commit 2 A &&\n@@ -102,21 +108,25 @@ test_expect_success 'set up merge history' '\n \tgit merge side\n '\n \n-sed 's/#/ /g' > expect-side <<'EOF'\n-*   Merge branch 'side' into other\n-|\\##\n-| * 5\n-* | 4\n-|/##\n-* 3\n-* 2\n-* 1\n+cat > expect-side <<'EOF'\n+commit work6 work6~1 work6^2\n+Merge branch 'side' into other\n+commit work6^2 work6~2\n+5\n+commit work6~1 work6~2\n+4\n+commit work6~2 work6~3\n+3\n+commit work6~3 work6~4\n+2\n+commit work6~4\n+1\n EOF\n \n test_expect_success 'rebase -i -p with merge' '\n \tgit checkout -b work6 other &&\n \tgit rebase -i -p --root --onto master &&\n-\tgit log --graph --topo-order --pretty=tformat:\"%s\" > rebased6 &&\n+\tlog_with_names work6 > rebased6 &&\n \ttest_cmp expect-side rebased6\n '\n \n@@ -129,25 +139,29 @@ test_expect_success 'set up second root and merge' '\n \tgit merge third\n '\n \n-sed 's/#/ /g' > expect-third <<'EOF'\n-*   Merge branch 'third' into other\n-|\\##\n-| * 6\n-* |   Merge branch 'side' into other\n-|\\ \\##\n-| * | 5\n-* | | 4\n-|/ /##\n-* | 3\n-|/##\n-* 2\n-* 1\n+cat > expect-third <<'EOF'\n+commit work7 work7~1 work7^2\n+Merge branch 'third' into other\n+commit work7^2 work7~4\n+6\n+commit work7~1 work7~2 work7~1^2\n+Merge branch 'side' into other\n+commit work7~1^2 work7~3\n+5\n+commit work7~2 work7~3\n+4\n+commit work7~3 work7~4\n+3\n+commit work7~4 work7~5\n+2\n+commit work7~5\n+1\n EOF\n \n test_expect_success 'rebase -i -p with two roots' '\n \tgit checkout -b work7 other &&\n \tgit rebase -i -p --root --onto master &&\n-\tgit log --graph --topo-order --pretty=tformat:\"%s\" > rebased7 &&\n+\tlog_with_names work7 > rebased7 &&\n \ttest_cmp expect-third rebased7\n '\n \n@@ -263,8 +277,7 @@ test_expect_success 'fix the conflict' '\n \n test_expect_success 'rebase -i -p --root with conflict (second part)' '\n \tgit rebase --continue &&\n-\tgit rev-list --topo-order --parents --pretty=\"tformat:%s\" HEAD |\n-\tgit name-rev --stdin --name-only --refs=refs/heads/conflict3 >out &&\n+\tlog_with_names conflict3 >out &&\n \ttest_cmp expect-conflict-p out\n '\n \n-- \n1.6.1.2.464.g6066\n"},{"id":"102786","messageId":"alpine.DEB.1.00.0902012322490.3586@pacific.mpi-cbg.de","threadId":"17361","inReplyTo":"1233355621-4783-1-git-send-email-trast@student.ethz.ch","subject":"Re: [PATCH 1/2] t3412: clean up GIT_EDITOR usage","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-01T22:24:13Z","receivedAt":"2009-02-01T22:24:13Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 30 Jan 2009, Thomas Rast wrote:\n\n> a6c7a27 (rebase -i: correctly remember --root flag across --continue,\n> 2009-01-26) introduced a more portable GIT_EDITOR usage, but left the\n> old tests unchanged.\n> \n> Since we never use the editor (all tests run the rebase script as\n> proposed by rebase -i), just disable it outright, which simplifies the\n> tests.\n> \n> Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n> ---\n>  t/t3412-rebase-root.sh |   38 +++++++++++++-------------------------\n>  1 files changed, 13 insertions(+), 25 deletions(-)\n> \n> diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh\n> index 9fc528f..8a9154a 100755\n> --- a/t/t3412-rebase-root.sh\n> +++ b/t/t3412-rebase-root.sh\n> @@ -6,6 +6,10 @@ Tests if git rebase --root --onto <newparent> can rebase the root commit.\n>  '\n>  . ./test-lib.sh\n>  \n> +# we always run the interactive rebases unchanged, so just disable the editor\n> +GIT_EDITOR=:\n> +export GIT_EDITOR\n> +\n\nAccording to my analysis, this is unneeded.  Just leave GIT_EDITOR alone \nin the whole test.\n\nCiao,\nDscho\n"},{"id":"102845","messageId":"200902020939.24131.trast@student.ethz.ch","threadId":"17361","inReplyTo":"alpine.DEB.1.00.0902012322490.3586@pacific.mpi-cbg.de","subject":"Re: [PATCH 1/2] t3412: clean up GIT_EDITOR usage","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-02T08:39:21Z","receivedAt":"2009-02-02T08:39:21Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Johannes Schindelin wrote:\n> On Fri, 30 Jan 2009, Thomas Rast wrote:\n> > +# we always run the interactive rebases unchanged, so just disable the editor\n> > +GIT_EDITOR=:\n> > +export GIT_EDITOR\n> > +\n> \n> According to my analysis, this is unneeded.  Just leave GIT_EDITOR alone \n> in the whole test.\n\nYou're right, test-lib.sh sets GIT_EDITOR= and EDITOR=:, so the above\nis unneeded (but harmless).\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}