Skip to content

Commit 4b02688

Browse files
committed
New option 'mergediffs'.
``--mergediffs <branches>`` Lists branches for which merges should include the full diff, including all changes that are already part of branch commits. ``<branches>`` is a list of command-separated names of heads to treat this way.
1 parent 2110474 commit 4b02688

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
0.3-16 | 2011-08-18 10:31:05 -0700
3+
4+
* Now showing diffs for merges as well. (Robin Sommer)
5+
26
0.3-15 | 2011-08-12 09:07:27 -0700
37

48
* Updating CHANGES. (Robin Sommer)

README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ address, do ``git config hooks.mailinglist [email protected]``:
194194
(re-)generation of this output, and does not change the
195195
current notifier state in any way.
196196

197+
``--mergediffs <branches>``
198+
Lists branches for which merges should include the full diff,
199+
including all changes that are already part of branch commits.
200+
``<branches>`` is a list of command-separated names of heads
201+
to treat this way.
202+
197203
``--maxdiffsize <size in KB>``
198204
Limits the size of mails by giving a maximum number of bytes
199205
that a diff may have. If the diff for a change is larger

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3-15
1+
0.3-16

git-notifier

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Options = [
3939
("updateonly", False, False, "update state file only, no mails"),
4040
("users", True, None, "location of a user-to-email mapping file"),
4141
("replyto", True, None, "email address for reply-to header"),
42+
("mergediffs", True, set(), "branches for which complete merge diffs are to be included"),
4243
]
4344

4445
class State:
@@ -116,6 +117,9 @@ class GitConfig:
116117
if self.allchanges and not isinstance(self.allchanges, set):
117118
self.allchanges = set([head.strip() for head in self.allchanges.split(",")])
118119

120+
if self.mergediffs and not isinstance(self.mergediffs, set):
121+
self.mergediffs = set([head.strip() for head in self.mergediffs.split(",")])
122+
119123
if not self.debug:
120124
self.log = open(self.log, "a")
121125
else:
@@ -404,7 +408,7 @@ def commit(current, rev, force=False, subject_head=None):
404408
merge_diff = "--cc"
405409

406410
for head in heads:
407-
if head in head in Config.allchanges:
411+
if head in Config.allchanges or head in Config.mergediffs:
408412
merge_diff = "-m"
409413

410414
subject = git("show '--pretty=format:%%s (%%h)' -s %s" % rev)

0 commit comments

Comments
 (0)