git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] "git apply --3way"
@ 2012-05-10 22:32 Junio C Hamano
  2012-05-10 22:32 ` [PATCH v2 1/9] apply: clear_image() clears things a bit more Junio C Hamano
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Junio C Hamano @ 2012-05-10 22:32 UTC (permalink / raw)
  To: git

Here is its second round.  Changes from the previous one are:

 - The series has been reordered to have refactoring patches early.

 - The option name is corrected to "--3way" and also takes short-and-sweet
   "-3" to parallel "am".

 - An invocation to ask "--3way" together with "--reject" is rejected.

 - The rerere machinery is given a chance to work on the resulting
   conflicts.

 - The option is now documented.

There are minor things that I still find suboptimal, but as a standalone
new feature, I consider it more or less good to go otherwise.

Here are some things people might be interested in enhancing (hint, hint):

 - Buffer error() messages from the first pass (i.e. attempting to apply
   to your current version) if the command is running under --3way mode,
   and show them if it turns out that we cannot fall back to the three-way
   logic (e.g. when the preimage on which the patch was allegedly based is
   not available, or the patch fails to apply to such a preimage).
   Otherwise discard the error messages from the first pass and show only
   the messages from the three-way merge phase.

 - Probably support add/add conflicts.  Note that this is prevented much
   earlier in the codepath and some surgery is needed to allow us to skip
   the first pass and go directly to the three-way codepath.

 - Similarly, a patch that attempts to delete a path that you no longer
   have is rejected early in the codepath. I have a hunch that it is not
   worth worrying about, because we do not know what we removed and cannot
   tell if what they removed is compatible with our earlier removal.

Junio C Hamano (9):
  apply: clear_image() clears things a bit more
  apply: refactor read_file_or_gitlink()
  apply: split load_preimage() helper function out
  apply: accept -3/--3way command line option
  apply: fall back on three-way merge
  apply: plug the three-way merge logic in
  apply: register conflicted stages to the index
  apply: allow rerere() upon --3way results
  apply: document --3way option

 Documentation/git-apply.txt |  10 ++-
 builtin/apply.c             | 202 +++++++++++++++++++++++++++++++++++++++-----
 t/t4108-apply-threeway.sh   | 103 ++++++++++++++++++++++
 t/t4117-apply-reject.sh     |   8 ++
 4 files changed, 303 insertions(+), 20 deletions(-)
 create mode 100755 t/t4108-apply-threeway.sh

-- 
1.7.10.1.574.g840b38f

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-10 22:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 22:32 [PATCH v2 0/9] "git apply --3way" Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 1/9] apply: clear_image() clears things a bit more Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 2/9] apply: refactor read_file_or_gitlink() Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 3/9] apply: split load_preimage() helper function out Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 4/9] apply: accept -3/--3way command line option Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 5/9] apply: fall back on three-way merge Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 6/9] apply: plug the three-way merge logic in Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 7/9] apply: register conflicted stages to the index Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 8/9] apply: allow rerere() upon --3way results Junio C Hamano
2012-05-10 22:32 ` [PATCH v2 9/9] apply: document --3way option Junio C Hamano

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).