]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Early exit from post-merge git hook script when not merging to master
authorrl1987 <rl1987@sdf.lonestar.org>
Tue, 2 Jul 2019 17:06:23 +0000 (20:06 +0300)
committerrl1987 <rl1987@sdf.lonestar.org>
Tue, 2 Jul 2019 17:06:23 +0000 (20:06 +0300)
changes/bug31040 [new file with mode: 0644]
scripts/git/post-merge.git-hook

diff --git a/changes/bug31040 b/changes/bug31040
new file mode 100644 (file)
index 0000000..81f6d7e
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (developer tooling):
+    - Only log git script changes in post-merge script when merge was to the
+      master branch. Fixes bug 31040; bugfix on 0.4.1.1-alpha.
index 176b7c9bbdd92170f71981f79fee44f41184cc46..eae4f999e79c4ade2caa75575841f80f03ad4ea7 100755 (executable)
@@ -35,6 +35,12 @@ check_for_script_update() {
         fi
 }
 
+cur_branch=$(git rev-parse --abbrev-ref HEAD)
+if [ "$cur_branch" != "master" ]; then
+  echo "post-merge: Not a master branch. Skipping."
+  exit 0
+fi
+
 check_for_diffs "pre-push"
 check_for_diffs "pre-commit"
 check_for_diffs "post-merge"