Skip to content

Commit 56ba624

Browse files
committed
Merge branch 'en/ort-unused-code-removal'
Code clean-up. * en/ort-unused-code-removal: merge-ort: remove code obsoleted by other changes
2 parents 10ccb50 + ff033db commit 56ba624

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

merge-ort.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ enum conflict_and_info_types {
507507
CONFLICT_FILE_DIRECTORY,
508508
CONFLICT_DISTINCT_MODES,
509509
CONFLICT_MODIFY_DELETE,
510-
CONFLICT_PRESENT_DESPITE_SKIPPED,
511510

512511
/* Regular rename */
513512
CONFLICT_RENAME_RENAME, /* same file renamed differently */
@@ -553,8 +552,6 @@ static const char *type_short_descriptions[] = {
553552
[CONFLICT_FILE_DIRECTORY] = "CONFLICT (file/directory)",
554553
[CONFLICT_DISTINCT_MODES] = "CONFLICT (distinct modes)",
555554
[CONFLICT_MODIFY_DELETE] = "CONFLICT (modify/delete)",
556-
[CONFLICT_PRESENT_DESPITE_SKIPPED] =
557-
"CONFLICT (upgrade your version of git)",
558555

559556
/*** Regular rename ***/
560557
[CONFLICT_RENAME_RENAME] = "CONFLICT (rename/rename)",
@@ -770,8 +767,7 @@ static void path_msg(struct merge_options *opt,
770767
/* Sanity checks */
771768
assert(omittable_hint ==
772769
!starts_with(type_short_descriptions[type], "CONFLICT") ||
773-
type == CONFLICT_DIR_RENAME_SUGGESTED ||
774-
type == CONFLICT_PRESENT_DESPITE_SKIPPED);
770+
type == CONFLICT_DIR_RENAME_SUGGESTED);
775771
if (opt->record_conflict_msgs_as_headers && omittable_hint)
776772
return; /* Do not record mere hints in headers */
777773
if (opt->priv->call_depth && opt->verbosity < 5)
@@ -4424,22 +4420,8 @@ static int record_conflicted_index_entries(struct merge_options *opt)
44244420
* the CE_SKIP_WORKTREE bit and manually write those
44254421
* files to the working disk here.
44264422
*/
4427-
if (ce_skip_worktree(ce)) {
4428-
struct stat st;
4429-
4430-
if (!lstat(path, &st)) {
4431-
char *new_name = unique_path(opt,
4432-
path,
4433-
"cruft");
4434-
4435-
path_msg(opt, CONFLICT_PRESENT_DESPITE_SKIPPED, 1,
4436-
path, NULL, NULL, NULL,
4437-
_("Note: %s not up to date and in way of checking out conflicted version; old copy renamed to %s"),
4438-
path, new_name);
4439-
errs |= rename(path, new_name);
4440-
}
4423+
if (ce_skip_worktree(ce))
44414424
errs |= checkout_entry(ce, &state, NULL, NULL);
4442-
}
44434425

44444426
/*
44454427
* Mark this cache entry for removal and instead add

0 commit comments

Comments
 (0)