From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: Octopus merge: unique (?) to git, but is it useful?
Date: Tue, 03 Jun 2008 15:08:48 -0700 [thread overview]
Message-ID: <7vk5h6189b.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080603203924.GA6588@neumann> (SZEDER Gábor's message of "Tue, 3 Jun 2008 22:39:24 +0200")
SZEDER Gábor <szeder@ira.uka.de> writes:
> On Tue, Jun 03, 2008 at 12:30:34PM -0700, Junio C Hamano wrote:
>> > ... It
>> > fails at the line 'EDITOR=: git commit -a'.
>>
>> Sorry, because it works for me (and presumably for many others --- I
>> haven't seen anybody else reporting the breakage you have), you need to
>> help others to diagnose it with a bit more details.
> With debug and verbose options it says following:
>
> * expecting success:
>
> git rev-parse second master >expect &&
> test_must_fail git merge second master &&
> git checkout master g &&
> echo "here comes the breakage" &&
> EDITOR=: git commit -a &&
> echo "survived!" &&
> git cat-file commit HEAD | sed -n -e "s/^parent //p" -e "/^$/q" >actual &&
> test_cmp expect actual
>
>
>
> *** Please tell me who you are.
> ...
> * failed 1 among 18 test(s)
> make: *** [t7502-commit.sh] Error 1
>
> My /bin/sh is dash, but it breaks with bash, too.
>
> What else could/should I provide?
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`
next prev parent reply other threads:[~2008-06-03 22:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 1:14 Octopus merge: unique (?) to git, but is it useful? Jakub Narebski
2008-06-03 2:05 ` Linus Torvalds
2008-06-03 3:56 ` Junio C Hamano
2008-06-03 5:17 ` Junio C Hamano
2008-06-03 5:28 ` Johannes Schindelin
2008-06-03 5:42 ` Junio C Hamano
2008-06-03 8:31 ` Johannes Schindelin
2008-06-03 10:40 ` SZEDER Gábor
2008-06-03 19:30 ` Junio C Hamano
2008-06-03 20:39 ` SZEDER Gábor
2008-06-03 22:08 ` Junio C Hamano [this message]
2008-06-03 23:10 ` SZEDER Gábor
2008-06-04 0:35 ` Jeff King
2008-06-04 1:02 ` Junio C Hamano
2008-06-03 14:40 ` Linus Torvalds
2008-06-03 23:11 ` Miklos Vajna
2008-06-04 0:33 ` Junio C Hamano
2008-06-03 4:29 ` Junio C Hamano
2008-06-03 6:39 ` Jakub Narebski
2008-06-03 7:11 ` Junio C Hamano
2008-06-03 7:32 ` Jakub Narebski
2008-06-03 7:53 ` Junio C Hamano
2008-06-03 19:54 ` Linus Torvalds
2008-06-03 20:27 ` Commit annotations (was:: Octopus merge: unique (?) to git, but is it useful?) Jakub Narebski
2008-06-03 20:33 ` Johannes Schindelin
2008-06-03 23:59 ` Johan Herland
2008-06-03 2:16 ` Octopus merge: unique (?) to git, but is it useful? Daniel Villeneuve
2008-06-03 10:06 ` Matthieu Moy
2008-06-03 11:27 ` Jakub Narebski
2008-06-03 11:53 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk5h6189b.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=szeder@ira.uka.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.