aboutsummaryrefslogtreecommitdiff
path: root/git-arr
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-01-01 05:41:37 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2015-01-11 22:18:22 +0100
commitbebc7fa3f00e9e9d11db488bef6a76836ac6730c (patch)
treec9c6555e110c8f285d5daef190abffbc91657a81 /git-arr
parent9ef78aaffd9ca5100659b8737cbd41523be330e2 (diff)
downloadgit-arr-fork-bebc7fa3f00e9e9d11db488bef6a76836ac6730c.zip
repo: diff: add option to show "creation event" diff for root commit
At its inception, Git did not show a "creation event" diff for a project's root commit since early projects, such as the Linux kernel, were already well established, and a large root diff was considered uninteresting noise. On the other hand, new projects adopting Git typically have small root commits, and such a "creation event" is likely to have meaning, rather than being pure noise. Consequently, git-diff-tree gained a --root flag in dc26bd89 (diff-tree: add "--root" flag to show a root commit as a big creation event, 2005-05-19), though it was disabled by default. Displaying the root "creation event" diff, however, became the default behavior when configuration option 'log.showroot' was added to git-log in 0f03ca94 (config option log.showroot to show the diff of root commits; 2006-11-23). And, gitk (belatedly) followed suit when it learned to respect 'log.showroot' in b2b76d10 (gitk: Teach gitk to respect log.showroot; 2011-10-04). By default, these tools now all show the root diff as a "creation event", however, git-arr suppresses it unconditionally. Resolve this shortcoming by adding a new git-arr configuration option "rootdiff" to control the behavior (enabled by default). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'git-arr')
-rwxr-xr-xgit-arr2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-arr b/git-arr
index 902bb89..95455ec 100755
--- a/git-arr
+++ b/git-arr
@@ -46,6 +46,7 @@ def load_config(path):
"""
defaults = {
'tree': 'yes',
+ 'rootdiff': 'yes',
'desc': '',
'recursive': 'no',
'commits_in_summary': '10',
@@ -108,6 +109,7 @@ def load_config(path):
if r.info.max_pages <= 0:
r.info.max_pages = sys.maxint
r.info.generate_tree = config.getboolean(s, 'tree')
+ r.info.root_diff = config.getboolean(s, 'rootdiff')
r.info.web_url = config.get(s, 'web_url')
web_url_file = fullpath + '/' + config.get(s, 'web_url_file')