From: Junio C Hamano <gitster@pobox.com>
To: Ryan Biesemeyer <ryan@yaauie.com>
Cc: git@vger.kernel.org,
"Matthieu Moy" <Matthieu.Moy@grenoble-inp.fr>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state
Date: Fri, 10 Jan 2014 16:20:39 -0800 [thread overview]
Message-ID: <xmqqha9b74iw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1389228344-38813-4-git-send-email-ryan@yaauie.com> (Ryan Biesemeyer's message of "Thu, 9 Jan 2014 00:45:43 +0000")
Ryan Biesemeyer <ryan@yaauie.com> writes:
> + write_script "$HOOK" <<-EOF &&
> + if [ -s "$(git rev-parse --git-dir)/MERGE_HEAD" ]; then
> + exit 0
> + else
> + exit 1
> + fi
> + EOF
The script can be a one-liner
write_scirpt "$HOOK" <<-\EOF &&
test -s "$(git rev-parse --git-dir)/MERGE_HEAD"
EOF
can't it? I also do not think you want to have the rev-parse run
while writing the script (rather, you would want it run inside the
script, no?)
> + git merge other &&
> + test "`git log -1 --pretty=format:%s`" = "Merge branch '"'"'other'"'"'" &&
> + test ! -s "$(git rev-parse --git-dir)/MERGE_HEAD"
> +
> +'
> +
> test_done
next prev parent reply other threads:[~2014-01-11 0:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 19:00 [PATCH] merge: make merge state available to prepare-commit-msg hook Ryan Biesemeyer
2014-01-08 19:02 ` Ryan Biesemeyer
2014-01-08 20:06 ` Matthieu Moy
2014-01-08 20:21 ` Ryan Biesemeyer
2014-01-08 20:29 ` Jonathan Nieder
2014-01-08 21:30 ` Matthieu Moy
2014-01-08 22:01 ` Jonathan Nieder
2014-01-09 13:25 ` Matthieu Moy
2014-01-08 19:03 ` Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 0/4] " Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 1/4] t7505: add missing && Ryan Biesemeyer
2014-01-09 0:45 ` [PATCH v2 2/4] t7505: ensure cleanup after hook blocks merge Ryan Biesemeyer
2014-01-09 13:00 ` Matthieu Moy
2014-01-10 23:40 ` Junio C Hamano
2014-01-09 0:45 ` [PATCH v2 3/4] merge: make prepare_to_commit responsible for write_merge_state Ryan Biesemeyer
2014-01-11 0:11 ` Junio C Hamano
2014-01-11 0:20 ` Junio C Hamano [this message]
2014-01-09 0:45 ` [PATCH v2 4/4] merge: drop unused arg from abort_commit method signature Ryan Biesemeyer
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=xmqqha9b74iw.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=ryan@yaauie.com \
/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.