From: "Theodore Ts'o" <tytso@mit.edu>
To: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Cc: git@vger.kernel.org
Subject: [PATCH] Fix guilt to work correctly even if the refs are packed
Date: Fri, 06 Jul 2007 10:57:07 -0400 [thread overview]
Message-ID: <E1I6pF5-0003V9-2R@candygram.thunk.org> (raw)
Explicitly referencing .git/refs/heads/$branch is bad; use git
show-ref -h instead.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
guilt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/guilt b/guilt
index 814f755..54f9087 100755
--- a/guilt
+++ b/guilt
@@ -247,7 +247,7 @@ head_check()
# if the expected hash is empty, just return
[ -z "$1" ] && return 0
- if [ "`cat "$GIT_DIR/refs/heads/$branch"`" != "$1" ]; then
+ if [ "`git show-ref -s "refs/heads/$branch"`" != "$1" ]; then
echo "Expected HEAD commit $1" >&2
echo " got `cat "$GIT_DIR/refs/heads/$branch"`" >&2
return 1
--
1.5.3.rc0.11.ge2b1a
next reply other threads:[~2007-07-06 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 14:57 Theodore Ts'o [this message]
2007-07-06 15:12 ` [PATCH] Fix guilt to work correctly even if the refs are packed Josef Sipek
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=E1I6pF5-0003V9-2R@candygram.thunk.org \
--to=tytso@mit.edu \
--cc=git@vger.kernel.org \
--cc=jsipek@cs.sunysb.edu \
/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