chiark
/
gitweb
/
~ian
/
topgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'refs/top-bases/i/basis-merge' into i/basis-merge
[topgit.git]
/
tg-info.sh
diff --git
a/tg-info.sh
b/tg-info.sh
index 72091694d89b238f21b4af8a18cf5addcc82928a..10e257e635308cfb1f997f3ea9acd906907aa479 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"
@@
-28,28
+28,30
@@
measure="$(measure_branch "$name" "$base_rev")"
echo "Topic Branch: $name ($measure)"
if [ "$(git rev-parse --short "$name")" = "$base_rev" ]; then
echo "Topic Branch: $name ($measure)"
if [ "$(git rev-parse --short "$name")" = "$base_rev" ]; then
- echo "No commits."
+ echo "
*
No commits."
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"
branch_contains "$base_rev" "refs/remotes/$base_remote/top-bases/$name" ||
if has_remote "$name"; then
echo "Remote Mate: $base_remote/$name"
branch_contains "$base_rev" "refs/remotes/$base_remote/top-bases/$name" ||
- echo "Local base is out of date wrt. the remote base."
+ echo "
*
Local base is out of date wrt. the remote base."
branch_contains "$name" "refs/remotes/$base_remote/$name" ||
branch_contains "$name" "refs/remotes/$base_remote/$name" ||
- echo "Local head is out of date wrt. the remote head."
+ echo "* Local head is out of date wrt. the remote head."
+ branch_contains "refs/remotes/$base_remote/$name" "$name" ||
+ echo "* Local head is ahead of the remote head."
fi
git cat-file blob "$name:.topdeps" |
sed '1{ s/^/Depends: /; n; }; s/^/ /;'
fi
git cat-file blob "$name:.topdeps" |
sed '1{ s/^/Depends: /; n; }; s/^/ /;'
-depcheck="$(
mktemp -t tg-depcheck.XXXXXX
)"
+depcheck="$(
get_temp tg-depcheck
)"
missing_deps=
needs_update "$name" >"$depcheck" || :
if [ -n "$missing_deps" ]; then
missing_deps=
needs_update "$name" >"$depcheck" || :
if [ -n "$missing_deps" ]; then
@@
-70,4
+72,5
@@
if [ -s "$depcheck" ]; then
else
echo "Up-to-date."
fi
else
echo "Up-to-date."
fi
-rm "$depcheck"
+
+# vim:noet