[PATCH 1/1] merge-recursive: give notice when submodule commit gets fast-forwarded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Leif Middelschulte <Leif.Middelschulte@xxxxxxxxx>

Since submodules are treated similarly to ordinary files (i.e. not as 'dumb'
pointers), an automatic merge should be mentioned if the user asks for it.
Just as it is mentioned for oridnary files.

Signed-off-by: Leif Middelschulte <Leif.Middelschulte@xxxxxxxxx>
---
 merge-recursive.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/merge-recursive.c b/merge-recursive.c
index a4b91d17f..0990a135b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1093,10 +1093,20 @@ static int merge_submodule(struct merge_options *o,
 	/* Case #1: a is contained in b or vice versa */
 	if (in_merge_bases(commit_a, commit_b)) {
 		oidcpy(result, b);
+		if (show(o, 2))
+			output(o, 2, _("Auto-merging %s"), path);
+		else
+			; /* no output */
+
 		return 1;
 	}
 	if (in_merge_bases(commit_b, commit_a)) {
 		oidcpy(result, a);
+		if (show(o, 2))
+			output(o, 2, _("Auto-merging %s"), path);
+		else
+			; /* no output */
+
 		return 1;
 	}
 
-- 
2.15.1 (Apple Git-101)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux