git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 0/7] unresolve removal
Date: Mon, 31 Jul 2023 15:44:02 -0700	[thread overview]
Message-ID: <20230731224409.4181277-1-gitster@pobox.com> (raw)

This series is a culmination of various draft patches I have sent
out recently and have queued in two topics near the tip of 'seen'.

The primary objective is to allow undoing conflict resolution that
was done via "git rm".  When a conflicted path is resolved with "git
add" (i.e. replace higher stage index entries with stage #0 entry),
"git checkout -m -- path" and "git update-index --unresolve path"
worked using the resolve-undo information stored in the index, but a
conflicted path that is resolved with "git rm" (i.e. remove higher
stage index, without adding any stage #0 entry for the path), these
two commands did not work at all, or did not function correctly.


Junio C Hamano (7):
  update-index: do not read HEAD and MERGE_HEAD unconditionally
  resolve-undo: allow resurrecting conflicted state that resolved to
    deletion
  update-index: use unmerge_index_entry() to support removal
  update-index: remove stale fallback code for "--unresolve"
  checkout/restore: refuse unmerging paths unless checking out of the
    index
  checkout/restore: add basic tests for --merge
  checkout: allow "checkout -m path" to unmerge removed paths

 Documentation/git-checkout.txt |   9 ++-
 Documentation/git-restore.txt  |   4 ++
 builtin/checkout.c             |  15 +++--
 builtin/update-index.c         |  98 ++++----------------------------
 rerere.c                       |   2 +-
 resolve-undo.c                 | 101 ++++++++++++---------------------
 resolve-undo.h                 |   5 +-
 t/t2030-unresolve-info.sh      |  45 +++++++++++++--
 t/t2070-restore.sh             |  71 ++++++++++++++++++++++-
 t/t7201-co.sh                  |  47 +++++++++++++++
 10 files changed, 230 insertions(+), 167 deletions(-)

-- 
2.41.0-478-gee48e70a82


             reply	other threads:[~2023-07-31 22:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 22:44 Junio C Hamano [this message]
2023-07-31 22:44 ` [PATCH 1/7] update-index: do not read HEAD and MERGE_HEAD unconditionally Junio C Hamano
2023-07-31 22:44 ` [PATCH 2/7] resolve-undo: allow resurrecting conflicted state that resolved to deletion Junio C Hamano
2023-07-31 22:44 ` [PATCH 3/7] update-index: use unmerge_index_entry() to support removal Junio C Hamano
2023-07-31 23:14   ` Junio C Hamano
2023-07-31 22:44 ` [PATCH 4/7] update-index: remove stale fallback code for "--unresolve" Junio C Hamano
2023-07-31 22:44 ` [PATCH 5/7] checkout/restore: refuse unmerging paths unless checking out of the index Junio C Hamano
2023-07-31 22:44 ` [PATCH 6/7] checkout/restore: add basic tests for --merge Junio C Hamano
2023-07-31 22:44 ` [PATCH 7/7] checkout: allow "checkout -m path" to unmerge removed paths Junio C Hamano
2023-08-04 19:03 ` [PATCH 0/7] unresolve removal Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230731224409.4181277-1-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).