projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a6ea5c
)
improved rev_is_descendant_of_branch() function
author
Jakub Suder
<jakub.suder@gmail.com>
Tue, 12 Jan 2010 22:34:52 +0000
(23:34 +0100)
committer
Jakub Suder
<jakub.suder@gmail.com>
Tue, 12 Jan 2010 22:34:52 +0000
(23:34 +0100)
git-subtree.sh
patch
|
blob
|
history
diff --git
a/git-subtree.sh
b/git-subtree.sh
index 48bc570390248c0ccbeeab754e442f9f305568a6..66ce251eaafc41e607ee0dec37e8b172bf8f6c93 100755
(executable)
--- a/
git-subtree.sh
+++ b/
git-subtree.sh
@@
-166,9
+166,9
@@
rev_is_descendant_of_branch()
newrev="$1"
branch="$2"
branch_hash=$(git rev-parse $branch)
- match=$(git rev-list
$newrev | grep $branch_hash
)
+ match=$(git rev-list
-1 $branch_hash ^$newrev
)
- if [ -
n
"$match" ]; then
+ if [ -
z
"$match" ]; then
return 0
else
return 1