From: Bruno Haible <bruno@clisp.org>
To: git@vger.kernel.org
Subject: GIT_EXTERNAL_DIFF invoked with undocumented calling convention after unstashing conflicts
Date: Sun, 30 Sep 2007 21:17:37 +0200 [thread overview]
Message-ID: <200709302117.37422.bruno@clisp.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
Hi,
"git diff --uncached" invokes the GIT_EXTERNAL_DIFF variable with just one
argument (instead of 7 arguments, as documented) in a particular situation:
when there are conflicts after "git stash apply".
To reproduce:
- Set environment variable GIT_EXTERNAL_DIFF to point to the attached
script.
- Make a clean gnulib checkout, 1 day old.
- Add a entry to the top of the ChangeLog.
- $ git pull
fails due a conflict.
- $ git stash
- $ git pull
- $ git stash apply
- $ git-diff --cached | cat
yields:
my-diff-for-git ChangeLog
diff --cc ChangeLog
index 443ad76,991c26b..0000000
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,7 -1,6 +1,11 @@@
2007-09-30 Bruno Haible <bruno@clisp.org>
++<<<<<<< Updated upstream:ChangeLog
+ * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
+ Needed on BeOS.
++=======
+ * Some other changes.
++>>>>>>> Stashed changes:ChangeLog
2007-09-30 Bruno Haible <bruno@clisp.org>
As you can see from the output of the script's line 2, it was called with
just one argument. This is not enough information for producing output
in a different way than the built-in way - defeating the purpose of
GIT_EXTERNAL_DIFF.
Can the GIT_EXTERNAL_DIFF invocation be done with 7 or more arguments?
It'd be OK to extend the calling convention.
Bruno
[-- Attachment #2: my-diff-for-git --]
[-- Type: application/x-shellscript, Size: 981 bytes --]
next reply other threads:[~2007-09-30 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 19:17 Bruno Haible [this message]
2007-09-30 19:59 ` GIT_EXTERNAL_DIFF invoked with undocumented calling convention after unstashing conflicts Junio C Hamano
2007-09-30 21:25 ` Bruno Haible
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=200709302117.37422.bruno@clisp.org \
--to=bruno@clisp.org \
--cc=git@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).