summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4866ccf)
raw | patch | inline | side by side (parent: 4866ccf)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 24 Aug 2005 21:31:36 +0000 (14:31 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 24 Aug 2005 21:31:36 +0000 (14:31 -0700) |
Some callers to rev-parse were using the output selection flags
inconsistently.
Signed-off-by: Junio C Hamano <junkio@cox.net>
inconsistently.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff --git a/git-bisect-script b/git-bisect-script
index 29b25f4a4ce67a9d2532c617b93a9e5297cc4249..0c5c10750e34f76327df0f57ce26417b18dd8963 100755 (executable)
--- a/git-bisect-script
+++ b/git-bisect-script
bisect_bad() {
bisect_autostart
case "$#" in 0 | 1) ;; *) usage ;; esac
- rev=$(git-rev-parse --revs-only --verify --default HEAD "$@") || exit
+ rev=$(git-rev-parse --verify --default HEAD "$@") || exit
echo "$rev" > "$GIT_DIR/refs/bisect/bad"
bisect_auto_next
}
bisect_autostart
case "$#" in
0) revs=$(git-rev-parse --verify HEAD) || exit ;;
- *) revs=$(git-rev-parse --revs-only "$@") || exit ;;
+ *) revs=$(git-rev-parse --revs-only --no-flags "$@") || exit ;;
esac
for rev in $revs
do
diff --git a/git-branch-script b/git-branch-script
index a6dfeaf55fb917de346132a94e9d3d123223eecd..0ecbd239acf0d035ba1a7c9471c2b29b3bb4b884 100755 (executable)
--- a/git-branch-script
+++ b/git-branch-script
head="$2^0" ;;
esac
branchname="$1"
-rev=$(git-rev-parse --revs-only --verify "$head") || exit
+rev=$(git-rev-parse --verify "$head") || exit
[ -e "$GIT_DIR/refs/heads/$branchname" ] && die "$branchname already exists"
diff --git a/git-log-script b/git-log-script
index 9260f920559578feac9922a7c2ef781252567952..5716b29941bb5c005d0de63f916708a3fc774e01 100755 (executable)
--- a/git-log-script
+++ b/git-log-script
#!/bin/sh
-revs=$(git-rev-parse --revs-only --default HEAD "$@") || exit
+revs=$(git-rev-parse --revs-only --no-flags --default HEAD "$@") || exit
[ "$revs" ] || die "No HEAD ref"
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}
index 919081522942a1817b669422f28e045a2849d866..ae6cd272bab01ba7fa9ac7378fe33e07e853d307 100755 (executable)
--- a/git-request-pull-script
+++ b/git-request-pull-script
[ "$revision" ] || usage
[ "$url" ] || usage
-baserev=`git-rev-parse --verify $revision^0` &&
-headrev=`git-rev-parse --verify $head^0` || exit
+baserev=`git-rev-parse --verify "$revision"^0` &&
+headrev=`git-rev-parse --verify "$head"^0` || exit
echo "The following changes since commit $baserev:"
git log --max-count=1 --pretty=short "$baserev" |
diff --git a/git-revert-script b/git-revert-script
index dc2dea48987dce1e266cdb8da2086293b4811d68..22f2082fb1d9612fdc41b0edd7ec90327cfcf004 100755 (executable)
--- a/git-revert-script
+++ b/git-revert-script
die "Your working tree is dirty; cannot revert a previous patch." ;;
esac
-rev=$(git-rev-parse --no-flags --verify --revs-only "$@") &&
+rev=$(git-rev-parse --verify "$@") &&
commit=$(git-rev-parse --verify "$rev^0") || exit
if git-diff-tree -R -M -p $commit | git-apply --index &&
msg=$(git-rev-list --pretty=oneline --max-count=1 $commit)