summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Avery Pennarun <apenwarr@gmail.com>2011-02-28 16:49:42 -0800
committerLibravatar Avery Pennarun <apenwarr@gmail.com>2011-02-28 16:49:42 -0800
commit856bea1f71db30339539b0c917d6d7dc32729d0f (patch)
tree49fb24d535dc3e47f2d43b156e43a6e336e9fd63
parentAdded check to order of processed commits. (diff)
downloadtgif-856bea1f71db30339539b0c917d6d7dc32729d0f.tar.xz
It's also okay if an expected tree object is actually a commit.
...that happens with submodules sometimes, so don't panic. Reported by Sum-Wai Low.
-rwxr-xr-xgit-subtree.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-subtree.sh b/git-subtree.sh
index cf50de150c..fa4e3e3661 100755
--- a/git-subtree.sh
+++ b/git-subtree.sh
@@ -397,7 +397,7 @@ subtree_for_commit()
git ls-tree "$commit" -- "$dir" |
while read mode type tree name; do
assert [ "$name" = "$dir" ]
- assert [ "$type" = "tree" ]
+ assert [ "$type" = "tree" -o "$type" = "commit" ]
echo $tree
break
done