[PATCH v2 0/9] "git apply --3way"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Newbies FAQ]     [Linux Kernel Development]     [Free Online Dating]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Free Online Dating]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]     [Linux Resources]

Add to Google