chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use the dashed for of git commands
[stgit]
/
contrib
/
stg-gitk
diff --git
a/contrib/stg-gitk
b/contrib/stg-gitk
index cb264e523cf38ac51e01083b84e2e44282c35363..e3ddfb17933a3a6475c5a636954516ba031f2dc6 100755
(executable)
--- a/
contrib/stg-gitk
+++ b/
contrib/stg-gitk
@@
-40,7
+40,7
@@
if [ $allbranches = 1 ] && [ "$branches" != "" ]; then
usage
fi
usage
fi
-GIT_DIR=$(git
-
rev-parse --git-dir)
+GIT_DIR=$(git
rev-parse --git-dir)
GIT_DIR_SPKIPLEN=$(printf "$GIT_DIR/X" | wc -c)
refdirs=''
GIT_DIR_SPKIPLEN=$(printf "$GIT_DIR/X" | wc -c)
refdirs=''
@@
-64,9
+64,9
@@
else
elif [ -e "$GIT_DIR/refs/heads/$b" ]; then
# other GIT branch
refdirs="$refdirs $GIT_DIR/refs/heads/$b"
elif [ -e "$GIT_DIR/refs/heads/$b" ]; then
# other GIT branch
refdirs="$refdirs $GIT_DIR/refs/heads/$b"
- elif [ $(git
-
for-each-ref "refs/$b" | wc -l) != 0 ]; then
+ elif [ $(git
for-each-ref "refs/$b" | wc -l) != 0 ]; then
# other ref
# other ref
- refdirs="$refdirs $(git
-
for-each-ref --format="$GIT_DIR/%(refname)" "refs/$b")"
+ refdirs="$refdirs $(git
for-each-ref --format="$GIT_DIR/%(refname)" "refs/$b")"
else
echo >&2 "ERROR: no such ref '$b'"
usage
else
echo >&2 "ERROR: no such ref '$b'"
usage