remove the symlink conflict header feature; it causes noise for little benefit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
diff --git a/lib/worktree.c b/lib/worktree.c
index 134290f..0a07293 100644
--- a/lib/worktree.c
+++ b/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 : "",
diff --git a/regress/cmdline/cherrypick.sh b/regress/cmdline/cherrypick.sh
index eb45b1b..cb7dd89 100755
--- a/regress/cmdline/cherrypick.sh
+++ b/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
diff --git a/regress/cmdline/update.sh b/regress/cmdline/update.sh
index 64b8fab..80b89ad 100755
--- a/regress/cmdline/update.sh
+++ b/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