summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-bz8
-rw-r--r--git-bz.txt7
2 files changed, 13 insertions, 2 deletions
diff --git a/git-bz b/git-bz
index b51bb65..ebfc09f 100755
--- a/git-bz
+++ b/git-bz
@@ -253,6 +253,12 @@ def get_default_component():
except CalledProcessError:
return None
+def get_add_url():
+ try:
+ return git.config('bz.add-url', get=True) == 'true'
+ except CalledProcessError:
+ return True
+
def get_add_url_method():
try:
return git.config('bz.add-url-method', get=True)
@@ -2087,7 +2093,7 @@ else:
global_options, args = parser.parse_args()
if hasattr(global_options, 'add_url') and global_options.add_url is None:
- global_options.add_url = True
+ global_options.add_url = get_add_url()
if len(args) < min_args or len(args) > max_args:
parser.print_usage()
diff --git a/git-bz.txt b/git-bz.txt
index e318cc2..654d7c6 100644
--- a/git-bz.txt
+++ b/git-bz.txt
@@ -94,7 +94,8 @@ COMMON OPTIONS
-u;;
--add-url;;
Rewrite commits to add the bug URL. (This is the default and will not normally
- need to be specified.)
+ need to be specified; you can change the default using the bz.add-url config
+ variable.)
-n;;
--no-add-url;;
@@ -302,6 +303,10 @@ git config bz.add-url-method body-append:%u
git config bz.add-url-method subject-prepend:Bug %d -
----------------------------------------
+If you want to disable adding URLs by default, you can use the +bz.add-url+
+config variable, which defaults to false. The -u/--add-url and -n/--no-add-url
+command line options override the config variable.
+
ALIASES
-------
You can create short aliases for different bug trackers as follows