chiark
/
gitweb
/
~ian
/
topgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tg export (quilt): Implement flattening patch paths
[topgit.git]
/
tg-info.sh
diff --git
a/tg-info.sh
b/tg-info.sh
index 6c00d83b8804c2788665d17cc977ccf42dc556a8..7d6a34ca617bc8d6ffc44f81613d30715905688c 100644
(file)
--- a/
tg-info.sh
+++ b/
tg-info.sh
@@
-12,7
+12,7
@@
while [ -n "$1" ]; do
arg="$1"; shift
case "$arg" in
-*)
arg="$1"; shift
case "$arg" in
-*)
- echo "Usage: tg info [NAME]" >&2
+ echo "Usage: tg
[...]
info [NAME]" >&2
exit 1;;
*)
[ -z "$name" ] || die "name already specified ($name)"
exit 1;;
*)
[ -z "$name" ] || die "name already specified ($name)"
@@
-20,7
+20,7
@@
while [ -n "$1" ]; do
esac
done
esac
done
-[ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/
heads
/##')"
+[ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/
\(heads\|top-bases\)
/##')"
base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
die "not a TopGit-controlled branch"
base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" ||
die "not a TopGit-controlled branch"
@@
-32,11
+32,11
@@
if [ "$(git rev-parse --short "$name")" = "$base_rev" ]; then
exit 0
fi
exit 0
fi
-git cat-file blob "$name:.topmsg" | grep ^Subject:
+git cat-file blob "$name:.topmsg" | grep ^Subject:
|| :
echo "Base: $base_rev"
branch_contains "$name" "$base_rev" ||
echo "Base: $base_rev"
branch_contains "$name" "$base_rev" ||
- echo "* Base is newer than head! Please run \`tg update\`."
+ echo "* Base is newer than head! Please run \`
$
tg update\`."
if has_remote "$name"; then
echo "Remote Mate: $base_remote/$name"
if has_remote "$name"; then
echo "Remote Mate: $base_remote/$name"
@@
-73,3
+73,5
@@
else
echo "Up-to-date."
fi
rm "$depcheck"
echo "Up-to-date."
fi
rm "$depcheck"
+
+# vim:noet