From c296800d1583023c05cac62ad5d101cccac56708 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Mon, 15 Aug 2016 16:27:32 +0200 Subject: [PATCH 1/2] git-cherry-menu: set a specific upstream branch to blacklist --- bin/git-cherry-menu | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/git-cherry-menu b/bin/git-cherry-menu index bb3332a..94368dc 100755 --- a/bin/git-cherry-menu +++ b/bin/git-cherry-menu @@ -40,6 +40,11 @@ suggested options: issue tracker without getting in the way during repeated runs of cherry-menu. + -c cherry-menu.skip-branch= + The blacklist default setting is to blacklist a commit for 'all' + upstream branches. If one wants to blacklist a commit for a specific + branch by default when doing a run of cherry-menu, then specify it here. + COMMAND is typically "git icing -v2" or "git cherry" but can be anything which gives output in the same format, e.g. @@ -253,12 +258,16 @@ cherry_menu () { ;; b) if ! has_note "$sha1"; then - safe_run git notes append -m'skip: all + branch="$(git config cherry-menu.skip-branch)" + if test -z $branch; then + branch="all" + fi + safe_run git notes append -m "skip: `echo $branch` XXX (you can optionally change the "all" above to the name of the XXX upstream branch if you want to limit blacklisting to that upstream) XXX Enter your justification for blacklisting here or -XXX remove the whole note to cancel blacklisting.' "$sha1" +XXX remove the whole note to cancel blacklisting." "$sha1" fi safe_run git notes edit "$sha1" <&3 echo From f1d9cc8783a9a61e376fbe5b02a8c2839d62da84 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Mon, 15 Aug 2016 16:30:10 +0200 Subject: [PATCH 2/2] git-cherry-menu: make note edit comment compatible with git behaviour Use '#' instead of 'XXX' to save a few keystrokes. --- bin/git-cherry-menu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/git-cherry-menu b/bin/git-cherry-menu index 94368dc..7708769 100755 --- a/bin/git-cherry-menu +++ b/bin/git-cherry-menu @@ -263,11 +263,11 @@ cherry_menu () { branch="all" fi safe_run git notes append -m "skip: `echo $branch` -XXX (you can optionally change the "all" above to the name of the -XXX upstream branch if you want to limit blacklisting to that upstream) +### (you can optionally change the "all" above to the name of the +### upstream branch if you want to limit blacklisting to that upstream) -XXX Enter your justification for blacklisting here or -XXX remove the whole note to cancel blacklisting." "$sha1" +### Enter your justification for blacklisting here or +### remove the whole note to cancel blacklisting." "$sha1" fi safe_run git notes edit "$sha1" <&3 echo