@@ -50,7 +50,8 @@ Examples:
50
50
git when-merged 0a1b -n releases # Use whenmerged.releases.pattern
51
51
git when-merged 0a1b -s # Use whenmerged.default.pattern
52
52
53
- git when-merged 0a1b -d feature-1 # Show diff for each merge commit
53
+ git when-merged 0a1b -l feature-1 # Show log for the merge commit
54
+ git when-merged 0a1b -d feature-1 # Show diff for the merge commit
54
55
git when-merged 0a1b -v feature-1 # Display merge commit in gitk
55
56
56
57
Configuration:
@@ -353,6 +354,10 @@ def main(args):
353
354
'--no-abbrev' , dest = 'abbrev' , action = 'store_const' , const = None ,
354
355
help = 'Do not abbreviate commit SHA1s.' ,
355
356
)
357
+ parser .add_option (
358
+ '--log' , '-l' , action = 'store_true' , default = False ,
359
+ help = 'Show the log for the merge commit.' ,
360
+ )
356
361
parser .add_option (
357
362
'--diff' , '-d' , action = 'store_true' , default = False ,
358
363
help = 'Show the diff for the merge commit.' ,
@@ -420,8 +425,11 @@ def main(args):
420
425
continue
421
426
422
427
if merge :
428
+ if options .log :
429
+ subprocess .check_call (['git' , '--no-pager' , 'log' , '--no-walk' , merge ])
430
+
423
431
if options .diff :
424
- subprocess .check_call (['git' , 'show' , merge ])
432
+ subprocess .check_call (['git' , '--no-pager' , ' show' , merge ])
425
433
426
434
if options .visualize :
427
435
subprocess .check_call (['gitk' , '--all' , '--select-commit=%s' % (merge ,)])
0 commit comments