summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd9500e)
raw | patch | inline | side by side (parent: fd9500e)
author | Avery Pennarun <apenwarr@gmail.com> | |
Fri, 24 Apr 2009 18:52:27 +0000 (14:52 -0400) | ||
committer | Avery Pennarun <apenwarr@gmail.com> | |
Fri, 24 Apr 2009 18:52:27 +0000 (14:52 -0400) |
git-subtree.sh | patch | blob | history |
diff --git a/git-subtree.sh b/git-subtree.sh
index 256946b0de8dfe268f278d32cbd3d6f269fbc5f4..5f8b0f6c598601756a68fe9df5cc065b791627d9 100755 (executable)
--- a/git-subtree.sh
+++ b/git-subtree.sh
{
oldrev="$1"
newrev="$2"
- if [ -e "$cachedir/$oldrev" ]; then
+ if [ "$oldrev" != "latest" -a -e "$cachedir/$oldrev" ]; then
die "cache for $oldrev already exists!"
fi
echo "$newrev" >"$cachedir/$oldrev"
newrev=$(copy_commit $rev $tree "$p") || exit $?
debug " newrev is: $newrev"
cache_set $rev $newrev
+ cache_set latest $newrev
done || exit $?
done || exit $?
-
+ latest=$(cache_get latest)
+ if [ -z "$latest" ]; then
+ die "No new revisions were found"
+ fi
+ echo $latest
exit 0
}