Fix guilt to work correctly even if the refs are packed
PATCH 1/1 Fix guilt to work correctly even if the refs are packed
Explicitly referencing .git/refs/heads/$branch is bad; use git show-ref -h instead.
Signed-off-by "Theodore Ts'o" <[email protected]>
--- guilt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
guilt +1 -1
@@ -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
Signature · 1 line
1.5.3.rc0.11.ge2b1a
Josef Sipek
AppliedQuoted 3 lines · Theodore Ts'o
Explicitly referencing .git/refs/heads/$branch is bad; use git show-ref -h instead.
Applied, I fixed up the commit message; you say -h but the code used -s.
Thanks.
Josef "Jeff" Sipek.
Signature · 2 lines
If I have trouble installing Linux, something is wrong. Very wrong. - Linus Torvalds