stop caring about obstructed versioned files in 'got merge' Tyring to write a test to cover this case I found that obstructed files are (correctly) detected as local modifications in the work tree. Thus they trigger the pre-condition check for local modications and 'got merge' will not even start to do any work in the presence of obstructed files.
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
diff --git a/got/got.1 b/got/got.1
index 55846aa..ad59381 100644
--- a/got/got.1
+++ b/got/got.1
@@ -2179,7 +2179,7 @@ using the following status codes:
.Pp
If merge conflicts occur, the merge operation is interrupted and conflicts
must be resolved before the merge operation can continue.
-If any files with destined changes are found to be missing or obstructed,
+If any files with destined changes are found to be missing,
the merge operation will be interrupted to prevent potentially incomplete
changes from being committed to the repository without user intervention.
The work tree may be modified as desired and the merge can be continued
diff --git a/got/got.c b/got/got.c
index dc1487a..66b864f 100644
--- a/got/got.c
+++ b/got/got.c
@@ -10776,12 +10776,11 @@ cmd_merge(int argc, char *argv[])
print_update_progress_stats(&upa);
}
- if (upa.conflicts > 0 || upa.obstructed > 0 || upa.missing > 0) {
+ if (upa.conflicts > 0 || upa.missing > 0) {
error = got_worktree_merge_postpone(worktree, fileindex);
if (error)
goto done;
- if (upa.conflicts > 0 &&
- upa.obstructed == 0 && upa.missing == 0) {
+ if (upa.conflicts > 0 && upa.missing == 0) {
error = got_error_msg(GOT_ERR_CONFLICTS,
"conflicts must be resolved before merging "
"can continue");
@@ -10789,12 +10788,12 @@ cmd_merge(int argc, char *argv[])
error = got_error_msg(GOT_ERR_CONFLICTS,
"conflicts must be resolved before merging "
"can continue; changes destined for missing "
- "or obstructed files were not yet merged and "
+ "files were not yet merged and "
"should be merged manually if required before the "
"merge operation is continued");
} else {
error = got_error_msg(GOT_ERR_CONFLICTS,
- "changes destined for missing or obstructed "
+ "changes destined for missing "
"files were not yet merged and should be "
"merged manually if required before the "
"merge operation is continued");
diff --git a/regress/cmdline/merge.sh b/regress/cmdline/merge.sh
index 67bc1f7..0e1a94a 100755
--- a/regress/cmdline/merge.sh
+++ b/regress/cmdline/merge.sh
@@ -942,7 +942,7 @@ test_merge_missing_file() {
return 1
fi
- echo -n "got: changes destined for missing or obstructed files " \
+ echo -n "got: changes destined for missing files " \
> $testroot/stderr.expected
echo -n "were not yet merged and should be merged manually if " \
>> $testroot/stderr.expected