commit ba1629912dc172d6dfe5d0c09cb1e60c15c01899 from: Stefan Sperling via: Thomas Adam date: Tue Sep 28 23:20:09 2021 UTC make 'got merge' interrupt the merge upon undeleted and unversioned files commit - 0ef688596bd8c81c1cf6abdee7aedc07e1cbcbbc commit + ba1629912dc172d6dfe5d0c09cb1e60c15c01899 blob - 4243f23b50091364bbf6e6385566ba2a1d0e3cb9 blob + 243ec3f29a0ff1dcb5f15112f6890755b0ce698b --- got/got.c +++ got/got.c @@ -10824,24 +10824,26 @@ cmd_merge(int argc, char *argv[]) if (error) goto done; printf("Merge of %s interrupted on request\n", branch_name); - } else if (upa.conflicts > 0 || upa.missing > 0) { + } else if (upa.conflicts > 0 || upa.missing > 0 || + upa.not_deleted > 0 || upa.unversioned > 0) { error = got_worktree_merge_postpone(worktree, fileindex); if (error) goto done; - if (upa.conflicts > 0 && upa.missing == 0) { + if (upa.conflicts > 0 && upa.missing == 0 && + upa.not_deleted == 0 && upa.unversioned == 0) { error = got_error_msg(GOT_ERR_CONFLICTS, "conflicts must be resolved before merging " "can continue"); } else if (upa.conflicts > 0) { error = got_error_msg(GOT_ERR_CONFLICTS, "conflicts must be resolved before merging " - "can continue; changes destined for missing " + "can continue; changes destined for some " "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 " + "changes destined for some " "files were not yet merged and should be " "merged manually if required before the " "merge operation is continued"); blob - 9ccf58a99fdd79c9cbff150bd8b95494b4706cd0 blob + be7e58787cda7e3de992a5142542bebcf76ab385 --- regress/cmdline/merge.sh +++ regress/cmdline/merge.sh @@ -997,7 +997,7 @@ test_merge_missing_file() { return 1 fi - echo -n "got: changes destined for missing files " \ + echo -n "got: changes destined for some files " \ > $testroot/stderr.expected echo -n "were not yet merged and should be merged manually if " \ >> $testroot/stderr.expected