Commit Diff


commit - f9eec9d5cdd0cbb22e0d3ed2d1cb55569afafce9
commit + 283102fc7ecc50b874240654162793c0bd07a028
blob - 134290f1370f5e99df41c487409828fdcb55a14d
blob + 0a072932c20e3ee4dec70243cb7cdc3739d3c8ba
--- lib/worktree.c
+++ lib/worktree.c
@@ -924,12 +924,7 @@ install_symlink_conflict(const char *deriv_target,
 	if (err)
 		goto done;
 
-	if (fprintf(f, "%s: Could not install symbolic link because of merge "
-	    "conflict.\nln(1) may be used to fix the situation. If this is "
-	    "intended to be a\nregular file instead then its expected "
-	    "contents may be filled in.\nThe following conflicting symlink "
-	    "target paths were found:\n"
-	    "%s %s\n%s\n%s%s%s%s%s\n%s\n%s\n", getprogname(),
+	if (fprintf(f, "%s %s\n%s\n%s%s%s%s%s\n%s\n%s\n",
 	    GOT_DIFF_CONFLICT_MARKER_BEGIN, label_deriv,
 	    deriv_target ? deriv_target : "(symlink was deleted)",
 	    orig_target ? label_orig : "",
blob - eb45b1bbd4a5793290cac2e8dbc68456aab8018e
blob + cb7dd89554f0b55182721b03135d3a63add638f9
--- regress/cmdline/cherrypick.sh
+++ regress/cmdline/cherrypick.sh
@@ -541,15 +541,8 @@ function test_cherrypick_symlink_conflicts {
 		return 1
 	fi
 
-	cat > $testroot/symlink-conflict-header <<EOF
-got: Could not install symbolic link because of merge conflict.
-ln(1) may be used to fix the situation. If this is intended to be a
-regular file instead then its expected contents may be filled in.
-The following conflicting symlink target paths were found:
-EOF
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "beta" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -590,9 +583,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "gamma" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -635,9 +627,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "../gamma/delta" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -711,9 +702,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "alpha" >> $testroot/content.expected
 	echo "=======" >> $testroot/content.expected
 	echo "beta" >> $testroot/content.expected
blob - 64b8fab61a492d7a1035d3082da449c5bb41d027
blob + 80b89ada1f0b16289f55b21fccf251a40d0bd17b
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
@@ -2058,15 +2058,8 @@ function test_update_symlink_conflicts {
 		return 1
 	fi
 
-	cat > $testroot/symlink-conflict-header <<EOF
-got: Could not install symbolic link because of merge conflict.
-ln(1) may be used to fix the situation. If this is intended to be a
-regular file instead then its expected contents may be filled in.
-The following conflicting symlink target paths were found:
-EOF
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "beta" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -2091,9 +2084,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "gamma" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -2136,9 +2128,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "../gamma/delta" >> $testroot/content.expected
 	echo "3-way merge base: commit $commit_id1" \
 		>> $testroot/content.expected
@@ -2164,9 +2155,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "(symlink was deleted)" >> $testroot/content.expected
 	echo "=======" >> $testroot/content.expected
 	echo "nonexistent2" >> $testroot/content.expected
@@ -2233,9 +2223,8 @@ EOF
 		return 1
 	fi
 
-	cp $testroot/symlink-conflict-header $testroot/content.expected
 	echo "<<<<<<< merged change: commit $commit_id2" \
-		>> $testroot/content.expected
+		> $testroot/content.expected
 	echo "alpha" >> $testroot/content.expected
 	echo "=======" >> $testroot/content.expected
 	echo "beta" >> $testroot/content.expected