Merge "Use more robust command for getting branches that a commit is on"
diff --git a/tools/archive.py b/tools/archive.py
index 0ae7233..4e36724 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -29,7 +29,7 @@
   return subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
 
 def IsMaster(version):
-  branches = subprocess.check_output(['git', 'show', '-s', '--pretty=%d',
+  branches = subprocess.check_output(['git', 'branch', '-r', '--contains',
                                       'HEAD'])
   if not version.endswith('-dev'):
     # Sanity check, we don't want to archive on top of release builds EVER