Permalink
Browse files

Check remote branches when attempting to prevent a messy rebase.

  • Loading branch information...
joshuajabbour committed Oct 26, 2011
1 parent f3ff553 commit 639bd345c616291fd2617c3c863338f1a0d29c2f
Showing with 1 addition and 1 deletion.
  1. +1 −1 assets/hooks/git-prevent-messy-rebase
@@ -6,7 +6,7 @@
target_branch = ARGV[0]
latest_commit = %x{git rev-list #{target_branch}..HEAD}.split("\n").last
-other_branches_with_commit = %x{git branch --contains #{latest_commit}}.split("\n").select { |l| ! /^ *\*/.match(l) }.map {|b| b.strip }
+other_branches_with_commit = %x{git branch -a --contains #{latest_commit}}.split("\n").select { |l| ! /^ *\*/.match(l) }.map {|b| b.strip }
if other_branches_with_commit.empty?
exit 0
else

0 comments on commit 639bd34

Please sign in to comment.