Re: [PATCH] Reallow git-rebase --interactive --continue if commit is unnecessary

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Reallow git-rebase --interactive --continue if commit is unnecessary

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:00

"Shawn O. Pearce" [off-list ref] writes:
quoted hunk
During git-rebase --interactive's --continue implementation we used
to silently restart the rebase if the user had made the commit
for us.  This is common if the user stops to edit a commit and
does so by amending it.  My recent change to watch git-commit's
exit status broke this behavior.

Thanks to Bernt Hansen for catching it in 1.5.4-rc1.

Signed-off-by: Shawn O. Pearce <redacted>
---
 git-rebase--interactive.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 47581ce..39f32b1 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -372,8 +372,9 @@ do
 			test ! -f "$DOTEST"/amend || git reset --soft HEAD^
 		} &&
 		export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
-		git commit --no-verify -F "$DOTEST"/message -e ||
+		if ! git commit --no-verify -F "$DOTEST"/message -e
 			die "Could not commit staged changes."
+		fi
This looks like a syntax error to me.

Re: [PATCH] Reallow git-rebase --interactive --continue if commit is unnecessary

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:00

Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 47581ce..39f32b1 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -372,8 +372,9 @@ do
 			test ! -f "$DOTEST"/amend || git reset --soft HEAD^
 		} &&
 		export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
-		git commit --no-verify -F "$DOTEST"/message -e ||
+		if ! git commit --no-verify -F "$DOTEST"/message -e
 			die "Could not commit staged changes."
+		fi
This looks like a syntax error to me.
Whoops.  This looks like a syntax error to me too.

Its late.  I totally missed a "then".  Would you mind doing an amend?

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help