Skip to content

Commit

Permalink
improved rev_is_descendant_of_branch() function
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Jan 12, 2010
1 parent 4a6ea5c commit 6bd910a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bd910a

Please sign in to comment.