Re: Octopus merge: unique (?) to git, but is it useful?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: SZEDER <szeder@...>
Cc: Linus Torvalds <torvalds@...>, <git@...>
Date: Tuesday, June 3, 2008 - 6:08 pm

SZEDER Gábor <szeder@ira.uka.de> writes:


Thanks, this is good enough.

I think the problem comes from the global removal of the two environment
variables, GIT_COMMITTER_{EMAIL,NAME} by an ealier bb1ae3f (commit: Show
committer if automatic, 2008-05-04).

Here is a potential fix.

The first hunk is the more relevant one; although the second one is also a
fix, it is independent.  It is a fix to unnecessarily loosely written test
that was done in early February.

 t/t7502-commit.sh |   44 ++++++++++++++++++++++++--------------------
 1 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 22a13f7..7b659b9 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -171,13 +171,16 @@ sed '$d' < expect.tmp > expect
 rm -f expect.tmp
 echo "# Committer:
 #" >> expect
-unset GIT_COMMITTER_EMAIL
-unset GIT_COMMITTER_NAME
 
 test_expect_success 'committer is automatic' '
 
 	echo >>negative &&
-	git commit -e -m "sample"
+	(
+		unset GIT_COMMITTER_EMAIL
+		unset GIT_COMMITTER_NAME
+		# must fail because there is no change
+		test_must_fail git commit -e -m "sample"
+	) &&
 	head -n 8 .git/COMMIT_EDITMSG |	\
 	sed "s/^# Committer: .*/# Committer:/" >actual &&
 	test_cmp expect actual
@@ -193,23 +196,24 @@ chmod +x .git/FAKE_EDITOR
 
 test_expect_success 'do not fire editor in the presence of conflicts' '
 
-	git clean
-	echo f>g
-	git add g
-	git commit -myes
-	git branch second
-	echo master>g
-	echo g>h
-	git add g h
-	git commit -mmaster
-	git checkout second
-	echo second>g
-	git add g
-	git commit -msecond
-	git cherry-pick -n master
-	echo "editor not started" > .git/result
-	GIT_EDITOR=`pwd`/.git/FAKE_EDITOR git commit && exit 1  # should fail
-	test "`cat .git/result`" = "editor not started"
+	git clean -f &&
+	echo f >g &&
+	git add g &&
+	git commit -myes &&
+	git branch second &&
+	echo master >g
+	echo g >h
+	git add g h &&
+	git commit -mmaster &&
+	git checkout second &&
+	echo second >g
+	git add g &&
+	git commit -msecond &&
+	# Must fail due to conflict
+	test_must_fail git cherry-pick -n master &&
+	echo "editor not started" >.git/result &&
+	test_must_fail GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" git commit &&
+	test "$(cat .git/result)" = "editor not started"
 '
 
 pwd=`pwd`

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Octopus merge: unique (?) to git, but is it useful?, Jakub Narebski, (Mon Jun 2, 9:14 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Jakub Narebski, (Tue Jun 3, 7:27 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Daniel Villeneuve, (Mon Jun 2, 10:16 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Linus Torvalds, (Mon Jun 2, 10:05 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Jakub Narebski, (Tue Jun 3, 3:32 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Linus Torvalds, (Tue Jun 3, 3:54 pm)
Re: Commit annotations (was:: Octopus merge: unique (?) to g..., Johannes Schindelin, (Tue Jun 3, 4:33 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 3:53 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 12:29 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Jakub Narebski, (Tue Jun 3, 2:39 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 3:11 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Mon Jun 2, 11:56 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Linus Torvalds, (Tue Jun 3, 10:40 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 8:33 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 1:17 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 3:30 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 6:08 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 9:02 pm)
Re: Octopus merge: unique (?) to git, but is it useful?, Johannes Schindelin, (Tue Jun 3, 1:28 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Junio C Hamano, (Tue Jun 3, 1:42 am)
Re: Octopus merge: unique (?) to git, but is it useful?, Johannes Schindelin, (Tue Jun 3, 4:31 am)