We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20df09b commit 2a85947Copy full SHA for 2a85947
1 file changed
src/utils/MergeUtils.js
@@ -1,6 +1,20 @@
1
const MergeUtils = {
2
getMergeMessage(toBranch, fromBranch) {
3
- return `Merged ${fromBranch.shorthand()} into ${toBranch.shorthand()}`;
+ let mergeDecorator;
4
+ if (fromBranch.isTag()) {
5
+ mergeDecorator = 'tag';
6
+ } else if (fromBranch.isRemote()) {
7
+ mergeDecorator = 'remote-tracking branch';
8
+ } else {
9
+ mergeDecorator = 'branch';
10
+ }
11
+
12
+ const message = `Merge ${mergeDecorator} '${fromBranch.shorthand()}'`;
13
14
+ // https://github.com/git/git/blob/master/builtin/fmt-merge-msg.c#L456-L459
15
+ return toBranch.shorthand() !== 'master'
16
+ ? `${message} into ${toBranch.shorthand()}`
17
+ : message;
18
}
19
};
20
0 commit comments