Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx> --- examples/gitconfig | 4 ++++ stgit/utils.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/examples/gitconfig b/examples/gitconfig index cd9b569..c16f786 100644 --- a/examples/gitconfig +++ b/examples/gitconfig @@ -95,6 +95,10 @@ # The maximum length of an automatically generated patch name #namelenth = 30 + # Extra options to pass to "git diff" (extend/override with + # -O/--diff-opts). For example, -M turns on rename detection. + #diff-opts = -M + [mail "alias"] # E-mail aliases used with the 'mail' command git = git@xxxxxxxxxxxxxxx diff --git a/stgit/utils.py b/stgit/utils.py index 00776b0..69203dc 100644 --- a/stgit/utils.py +++ b/stgit/utils.py @@ -320,7 +320,8 @@ def make_diff_opts_option(): else: parser.values.diff_flags = [] return [optparse.make_option( - '-O', '--diff-opts', dest = 'diff_flags', default = [], + '-O', '--diff-opts', dest = 'diff_flags', + default = (config.get('stgit.diff-opts') or '').split(), action = 'callback', callback = diff_opts_callback, type = 'string', metavar = 'OPTIONS', help = 'extra options to pass to "git diff"')] - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html