Skip to content

Commit 42da227

Browse files
committed
Don't revere-merge heading in commit messages, when doing a straight merge with "summary" template
1 parent dd969dd commit 42da227

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1414
### Fixed
1515
- Attempt to print commit history of paths copied to themselves (e.g. trunk > branches/something > trunk) resulted in a recursion.
1616
- The `--no-merges` option of `merge` command wasn't used during actual merge, but only to display to be merged revisions.
17+
- The `Reverse-merge of ...` heading was shown even on strait merges (not reverse ones), when `commit` command was using `summary` merge template.
1718

1819
## [0.5.2] - 2019-06-20
1920
### Fixed

src/SVNBuddy/Repository/CommitMessage/SummaryMergeTemplate.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,21 @@ public function apply($wc_path)
5050
$ret = '';
5151

5252
foreach ( $merged_revisions as $path => $revisions ) {
53+
// No changes on particular path.
54+
if ( !$revisions ) {
55+
continue;
56+
}
57+
5358
$source = $this->getMomentInTime($path, max($revisions));
5459
$ret .= PHP_EOL . 'Merge of "' . $source . '" to "' . $target . '".' . PHP_EOL;
5560
}
5661

5762
foreach ( $unmerged_revisions as $path => $revisions ) {
63+
// No changes on particular path.
64+
if ( !$revisions ) {
65+
continue;
66+
}
67+
5868
$source = $this->getMomentInTime($path, max($revisions));
5969
$ret .= PHP_EOL . 'Reverse-merge of "' . $source . '" to "' . $target . '".' . PHP_EOL;
6070
}

0 commit comments

Comments
 (0)