From: Tim Henigan <tim.henigan@gmail.com>
To: git@vger.kernel.org, gitster@poxbox.com
Cc: tim.henigan@gmail.com
Subject: [PATCH 1/4] contrib/diffall: change comment to reflect actual reason for 'cdup'
Date: Tue, 13 Mar 2012 13:45:30 -0400 [thread overview]
Message-ID: <1331660734-10538-1-git-send-email-tim.henigan@gmail.com> (raw)
The comment from an earlier commit did not reflect the actual reason this
operation is needed.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
---
contrib/diffall/git-diffall | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/diffall/git-diffall b/contrib/diffall/git-diffall
index 9bbd27f..d706a6d 100755
--- a/contrib/diffall/git-diffall
+++ b/contrib/diffall/git-diffall
@@ -36,7 +36,9 @@ fi
start_dir=$(pwd)
-# needed to access tar utility
+# All the file paths returned by the diff command are relative to the root
+# of the working copy. So if the script is called from a subdirectory, it
+# must switch to the root of working copy before trying to use those paths.
cdup=$(git rev-parse --show-cdup) &&
cd "$cdup" || {
echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree"
--
1.7.10.rc0
next reply other threads:[~2012-03-13 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 17:45 Tim Henigan [this message]
2012-03-13 17:45 ` [PATCH 2/4] contrib/diffall: teach diffall to create tmp dirs without using mktemp Tim Henigan
2012-03-13 17:45 ` [PATCH 3/4] contrib/diffall: teach diffall to handle working copy changes without tar Tim Henigan
2012-03-13 17:45 ` [PATCH 4/4] contrib/diffall: eliminate duplicate while loops Tim Henigan
2012-03-13 17:49 ` [PATCH 1/4] contrib/diffall: change comment to reflect actual reason for 'cdup' Tim Henigan
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=1331660734-10538-1-git-send-email-tim.henigan@gmail.com \
--to=tim.henigan@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@poxbox.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 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).