This project is mirrored from https://github.com/git/git. Updated .
  1. 25 Mar, 2013 4 commits
  2. 13 Mar, 2013 1 commit
    • Kevin Bracey's avatar
      mergetools/p4merge: create a base if none available · 4549162e
      Kevin Bracey authored
      Originally, with no base, Git gave P4Merge $LOCAL as a dummy base:
      
         p4merge "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED"
      
      Commit 0a0ec7bd changed this to:
      
         p4merge "empty file" "$LOCAL" "$REMOTE" "$MERGED"
      
      to avoid the problem of being unable to save in some circumstances with
      similar inputs.
      
      Unfortunately this approach produces much worse results on differing
      inputs. P4Merge really regards the blank file as the base, and once you
      have just a couple of differences between the two branches you end up
      with one a massive full-file conflict. The 3-way diff is not readable,
      and you have to invoke "difftool MERGE_HEAD HEAD" manually to get a
      useful view.
      
      The original approach appears to have invoked special 2-way merge
      behaviour in P4Merge that occurs only if the base filename is "" or
      equal to the left input.  You get a good visual comparison, and it does
      not auto-resolve differences. (Normally if one branch matched the base,
      it would autoresolve to the other branch).
      
      But there appears to be no way of getting this 2-way behaviour and being
      able to reliably save. Having base==left appears to be triggering other
      assumptions. There are tricks the user can use to force the save icon
      on, but it's not intuitive.
      
      So we now follow a suggestion given in the original patch's discussion:
      generate a virtual base, consisting of the lines common to the two
      branches. This is the same as the technique used in resolve and octopus
      merges, so we relocate that code to a shared function.
      
      Note that if there are no differences at the same location, this
      technique can lead to automatic resolution without conflict, combining
      everything from the 2 files.  As with the other merges using this
      technique, we assume the user will inspect the result before saving.
      Signed-off-by: default avatarKevin Bracey <kevin@bracey.fi>
      Reviewed-by: David Aguilar's avatarDavid Aguilar <davvid@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      4549162e
  3. 24 Feb, 2013 1 commit
  4. 06 Oct, 2011 1 commit
  5. 29 Apr, 2011 1 commit
    • Jeff King's avatar
      merge-one-file: fix broken merges with alternate work trees · 6aaeca90
      Jeff King authored
      The merge-one-file tool predates the invention of
      GIT_WORK_TREE. By the time GIT_WORK_TREE was invented, most
      people were using the merge-recursive strategy, which
      handles resolving internally. Therefore these features have
      had very little testing together.
      
      For the most part, merge-one-file just works with
      GIT_WORK_TREE; most of its heavy lifting is done by plumbing
      commands which do respect GIT_WORK_TREE properly. The one
      exception is a shell redirection which touches the worktree
      directly, writing results to the wrong place in the presence
      of a GIT_WORK_TREE variable.
      
      This means that merges won't even fail; they will silently
      produce incorrect results, throwing out the entire "theirs"
      side of files which need content-level merging!
      
      This patch makes merge-one-file chdir to the toplevel of the
      working tree (and exit if we don't have one). This most
      closely matches the assumption made by the original script
      (before separate work trees were invented), and matches what
      happens when the script is called as part of a merge
      strategy.
      
      While we're at it, we'll also error-check the call to cat.
      Merging a file in a subdirectory could in fact fail, as the
      redirection relies on the "checkout-index" call just prior
      to create leading directories. But we never noticed, since
      we ignored the error return from running cat.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      6aaeca90
  6. 05 Jun, 2010 1 commit
  7. 31 May, 2010 1 commit
  8. 10 Nov, 2009 1 commit
  9. 09 May, 2009 1 commit
  10. 30 Apr, 2009 1 commit
  11. 19 Mar, 2008 1 commit
  12. 11 Dec, 2007 1 commit
    • Junio C Hamano's avatar
      Support a merge with conflicting gitlink change · ff72af00
      Junio C Hamano authored
      merge-recursive did not support merging trees that have conflicting
      changes in submodules they contain, and died.  Support it exactly the
      same way as how it handles conflicting symbolic link changes --- mark it
      as a conflict, take the tentative result from the current side, and
      letting the caller resolve the conflict, without dying in merge_file()
      function.
      
      Also reword the error message issued when merge_file() has to die
      because it sees a tree entry of type it does not support yet.
      
      [jc: fixed up initial draft by Finn Arne Gangstad]
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      ff72af00
  13. 09 Jul, 2007 1 commit
  14. 03 Jul, 2007 1 commit
  15. 07 Jun, 2007 1 commit
    • Junio C Hamano's avatar
      War on whitespace · a6080a0a
      Junio C Hamano authored
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      a6080a0a
  16. 22 Dec, 2006 1 commit
  17. 28 Oct, 2006 1 commit
    • Junio C Hamano's avatar
      merge: loosen overcautious "working file will be lost" check. · ed93b449
      Junio C Hamano authored
      The three-way merge complained unconditionally when a path that
      does not exist in the index is involved in a merge when it
      existed in the working tree.  If we are merging an old version
      that had that path tracked, but the path is not tracked anymore,
      and if we are merging that old version in, the result will be
      that the path is not tracked.  In that case we should not
      complain.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      ed93b449
  18. 10 Jul, 2006 1 commit
  19. 13 Apr, 2006 1 commit
  20. 06 Jan, 2006 1 commit
  21. 07 Dec, 2005 1 commit
    • Junio C Hamano's avatar
      git-merge-one: new merge world order. · b539c5e8
      Junio C Hamano authored
      This does two things:
      
       - Use new --stage=2 option to create the working tree file with
         leading paths and correct permission bits using
         checkout-index, as before.
      
       - Make sure we do not confuse "merge" program when the file
         being merged has an unfortunate name, '-L'.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      b539c5e8
  22. 06 Dec, 2005 1 commit
    • Junio C Hamano's avatar
      git-merge-one-file: resurrect leading path creation. · be61db92
      Junio C Hamano authored
      Since we do not use git-update-index followed by
      git-checkout-index -u to create the half-merged file on
      conflicting case anymore, we need to make sure the leading
      directories are created here.
      
      Maybe a better solution would be to allow update-index to add to
      higher stage, and checkout-index to extract from such, but that
      is a change slightly bigger than I would like to have so close
      to 1.0, so this should do for now.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      be61db92
  23. 02 Dec, 2005 3 commits
  24. 30 Nov, 2005 1 commit
  25. 20 Nov, 2005 2 commits
  26. 12 Nov, 2005 3 commits
  27. 08 Sep, 2005 1 commit
    • Junio C Hamano's avatar
      Big tool rename. · 215a7ad1
      Junio C Hamano authored
      As promised, this is the "big tool rename" patch.  The primary differences
      since 0.99.6 are:
      
        (1) git-*-script are no more.  The commands installed do not
            have any such suffix so users do not have to remember if
            something is implemented as a shell script or not.
      
        (2) Many command names with 'cache' in them are renamed with
            'index' if that is what they mean.
      
      There are backward compatibility symblic links so that you and
      Porcelains can keep using the old names, but the backward
      compatibility support  is expected to be removed in the near
      future.
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      215a7ad1
  28. 30 Aug, 2005 1 commit
    • Linus Torvalds's avatar
      [PATCH] Make "git resolve" less scary · cdcb0ed4
      Linus Torvalds authored
      When we resolve a merge between two branches, and it removes a file in the
      current branch, we notify the person doing the resolve with a big nice
      notice like
      
      	Removing xyzzy
      
      which is all well and good.
      
      HOWEVER, we also do this when the file was actually removed in the current
      branch, and we're merging with another branch that didn't have it removed
      (or, indeed, if the other branch _did_ have it removed, but the common
      parent was far enough back that the file still existed in there).
      
      And that just doesn't make sense. In that case we're not removing
      anything: the file didn't exist in the branch we're merging into in the
      first place. So the message just makes people nervous, and makes no sense.
      
      This has been around forever, but I never bothered to do anything about
      it.
      
      Until now.
      
      The trivial fix is to only talk about removing files if the file existed
      in the branch we're merging into, but will not exist in the result.
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      cdcb0ed4
  29. 30 Jul, 2005 1 commit
  30. 25 Jun, 2005 1 commit
    • Junio C Hamano's avatar
      [PATCH] git-merge-one-file-script: do not misinterpret rm failure. · aacc15ec
      Junio C Hamano authored
      When a merge adds a file DF and removes a directory there by
      deleting a path DF/DF, git-merge-one-file-script can be called
      for the removal of DF/DF when the path DF is already created by
      "git-read-tree -m -u".  When this happens, we get confused by a
      failure return from 'rm -f -- "$4"' (where $4 is DF/DF); finding
      file DF there the "rm -f" command complains that DF is not a
      directory.
      
      What we want to ensure is that there is no file DF/DF in this
      case. Avoid getting ourselves confused by first checking if
      there is a file, and only then try to remove it (and check for
      failure from the "rm" command).
      Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      aacc15ec
  31. 09 Jun, 2005 2 commits
    • Linus Torvalds's avatar
      One more time.. Clean up git-merge-one-file-script · 98a96b00
      Linus Torvalds authored
      This uses git-checkout-file to make sure that the full pathname is
      created, instead of the script having to verify it by hand.  Also,
      simplify the 3-way merge case by just writing to the right file and
      setting the initial index contents early.
      98a96b00
    • Linus Torvalds's avatar
      Fix up git-merge-one-file-script · e0226add
      Linus Torvalds authored
      Junio points out that we may need to create the path leading
      up the the file we merge.
      
      And we need to be more careful with the "exec"s we've done
      to exit on success - only do the on the last command in the
      pipeline, not the first one ;)
      e0226add