Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Oct 01, 2012

  1. Junio C Hamano

    Merge branch 'da/mergetool-custom'

    The actual external command to run for mergetool backend can be
    specified with difftool/mergetool.$name.cmd configuration
    variables, but this mechanism was ignored for the backends we
    natively support.
    
    * da/mergetool-custom:
      mergetool--lib: Allow custom commands to override built-ins
    authored

Sep 25, 2012

  1. David Aguilar

    mergetool--lib: Allow custom commands to override built-ins

    Allow users to override the default commands provided by the
    mergetools/* scriptlets.
    
    Users occasionally run into problems where they expect to be
    able to override the built-in tool names.  The documentation
    does not explicitly mention that built-ins cannot be overridden,
    so it's easy to assume that it should work.
    
    Lift this restriction so that built-in tools are handled the
    same way as user-configured tools.  Add tests to guarantee this
    behavior.
    
    A nice benefit of this change is that it protects users from
    having future versions of git trump their custom configuration
    with a new built-in tool.
    
    C.f.:
    
    http://stackoverflow.com/questions/7435002/mergetool-from-gitconfig-being-ignored
    http://thread.gmane.org/gmane.comp.version-control.msysgit/13188
    http://thread.gmane.org/gmane.comp.version-control.git/148267
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Aug 27, 2012

  1. Junio C Hamano

    Merge branch 'da/difftool-updates'

    "git difftool --dir-diff" learned to use symbolic links to prepare
    temporary copy of the working tree when available.
    
    * da/difftool-updates:
      difftool: silence warning
      Add Code Compare v2.80.4 as a merge / diff tool for Windows
      mergetool,difftool: Document --tool-help consistently
      difftool: Disable --symlinks on cygwin
      difftool: Handle compare() returning -1
      difftool: Wrap long lines for readability
      difftool: Check all return codes from compare()
      difftool: Handle finding mergetools/ in a path with spaces
      difftool: Use symlinks when diffing against the worktree
      difftool: Call the temp directory "git-difftool"
      difftool: Move option values into a hash
      difftool: Eliminate global variables
      difftool: Simplify print_tool_help()
    authored

Aug 10, 2012

  1. Sebastian Schuberth

    Add Code Compare v2.80.4 as a merge / diff tool for Windows

    Code Compare is a commercial file comparison tool for Windows, see
    
        http://www.devart.com/codecompare/
    
    Version 2.80.4 added support for command line arguments preceded by a
    dash instead of a slash. This is required for Git for Windows because
    slashes in command line arguments get mangled with according to these
    rules:
    
        http://www.mingw.org/wiki/Posix_path_conversion
    
    Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Jul 23, 2012

  1. Junio C Hamano

    mergetool: support --tool-help option like difftool does

    This way we do not have to risk the list of tools going out of sync
    between the implementation and the documentation.
    
    In the same spirit as bf73fc2 (difftool: print list of valid tools
    with '--tool-help', 2012-03-29), trim the list of merge backends in
    the documentation.  We do not want to have a complete list of valid
    tools; we only want a list to help people guess what kind of things
    the tools do to be specified there, and refer them to --tool-help
    for a complete list.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored

Sep 20, 2011

  1. Junio C Hamano

    Merge branch 'maint'

    * maint:
      git-mergetool: check return value from read
    authored
  2. Jay Soffian

    git-mergetool: check return value from read

    Mostly fixed already by 6b44577 (mergetool: check return value
    from read, 2011-07-01). Catch two uses it missed.
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Aug 19, 2011

  1. David Aguilar

    mergetool--lib: Refactor tools into separate files

    Individual merge tools are now defined in a mergetools/$tool
    file which is sourced at runtime.
    
    The individual files are installed into $(git --exec-path)/mergetools/.
    New tools can be added by creating a new file instead of editing the
    git-mergetool--lib.sh scriptlet.
    
    http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
  2. David Aguilar

    mergetool--lib: Make style consistent with git

    Use the predominant conditional style where "then" appears
    alone on the line after the test expression.
    Remove spaces after ">" output redirections.
    Remove unnecessary parentheses around the kdiff3 commands.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Aug 05, 2011

  1. jonseymour

    misc-sh: fix up whitespace in some other .sh files.

    I found that the patched 4 files were different when this
    filter is applied.
    
    	expand -i | unexpand --first-only
    
    This patch contains the corrected files.
    
    Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Jun 30, 2011

  1. Junio C Hamano

    Merge branch 'da/git-prefix-everywhere' into next

    * da/git-prefix-everywhere:
      t/t7503-pre-commit-hook.sh: Add GIT_PREFIX tests
      git-mergetool--lib: Make vimdiff retain the current directory
      git: Remove handling for GIT_PREFIX
      setup: Provide GIT_PREFIX to built-ins
    authored

May 26, 2011

  1. David Aguilar

    git-mergetool--lib: Make vimdiff retain the current directory

    When using difftool with vimdiff it can be unexpected that
    the current directory changes to the root of the project.
    Tell vim to chdir to the value of $GIT_PREFIX to fix this.
    
    Care is taken to quote the variable so that vim expands it.
    This avoids problems when directory names contain spaces.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Reported-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

May 01, 2011

  1. Ciaran Jessup

    Pass empty file to p4merge where no base is suitable.

    Modify the p4merge client command to pass a reference to an empty file
    instead of the local file when no base revision available.
    
    In the situation where a merge tries to add a file from one branch
    into a branch that already contains that file (by name), p4merge
    currently seems to have successfully automatically resolved the
    'conflict' when it is opened (correctly if the files differed by
    just whitespace for example) but leaves the save button disabled. This
    means the user of the p4merge client cannot commit the resolved
    changes back to disk and merely exits, leaving the original
    (merge-conflicted) file intact on the disk.
    
    Provide an empty base file to p4merge so that it leaves the save
    button enabled.  This will allow saving of the auto-resolution to
    disk.
    
    Signed-off-by: Ciaran Jessup <ciaranj@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Mar 20, 2011

  1. Junio C Hamano

    Merge branch 'ss/mergetool--lib'

    * ss/mergetool--lib:
      mergetool--lib: Add Beyond Compare 3 as a tool
      mergetool--lib: Sort tools alphabetically for easier lookup
    authored

Feb 28, 2011

  1. Sebastian Schuberth

    mergetool--lib: Add Beyond Compare 3 as a tool

    Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
    Tested-by: Chris Packham <judge.packham@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
  2. Sebastian Schuberth

    mergetool--lib: Sort tools alphabetically for easier lookup

    Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
    Tested-by: Chris Packham <judge.packham@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Feb 25, 2011

  1. Michael J Gruber

    mergetool-lib: call vim in readonly mode for diffs

    When [g]vimdiff is called for files which are opened already, the editor
    complains about the existing swap file. But we do not want to write
    anything when called from difftool. So, make difftool use "-R" for the
    vim family. This
    
    - prevents the use of a swap file and
    - marks the buffers readonly.
    
    Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Sep 29, 2010

  1. Dan McGee

    mergetool-lib: make the three-way diff the default for vim/gvim

    The original vimdiff/gvimdiff configuration is now available by using
    'vimdiff2' or 'gvimdiff2' as the preferred merge tool.
    
    Signed-off-by: Dan McGee <dpmcgee@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Sep 15, 2010

  1. Dan McGee

    mergetool-lib: add a three-way diff view for vim/gvim

    When the base version is available, use a three-way, four panel view by
    default. This shows the (local, base, remote) revisions up top and the
    merged result by itself in the lower pane. All revisions will still scroll
    together by default, and the cursor still defaults to the merged result edit
    pane.
    
    Signed-off-by: Dan McGee <dpmcgee@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
  2. Dan McGee

    mergetool-lib: combine vimdiff and gvimdiff run blocks

    They are nearly identical outside of the foreground flag, which can safely
    be passed to both vim and gvim. The merge tool itself is named in
    $merge_tool_path.
    
    Signed-off-by: Dan McGee <dpmcgee@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Aug 20, 2010

  1. Charles Bailey

    mergetool: Remove explicit references to /dev/tty

    mergetool used /dev/tty to switch back to receiving input from the user
    via inside a block with a redirected stdin.
    
    This harms testability, so change mergetool to save its original stdin
    to an alternative fd in this block and restore it for those sub-commands
    that need the original stdin.
    
    Includes additional compatibility fix from Jonathan Nieder.
    
    Tested-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Charles Bailey <charles@hashpling.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Jan 29, 2010

  1. Jeff King

    add shebang line to git-mergetool--lib.sh

    Even though this script is expected to be sourced instead of
    executed on its own, the #!/bin/sh line provides simple
    documentation about what format the file is in.
    
    In particular, the lack of such a line was confusing the
    valgrind support of our test scripts, which assumed that any
    executable without a #!-line should be intercepted and run
    through valgrind. So during valgrind-enabled tests, any
    script sourcing this file actually sourced the valgrind
    interception script instead.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Nov 25, 2009

  1. Junio C Hamano

    Merge branch 'rs/work-around-grep-opt-insanity'

    * rs/work-around-grep-opt-insanity:
      Protect scripted Porcelains from GREP_OPTIONS insanity
      mergetool--lib: simplify guess_merge_tool()
    
    Conflicts:
    	git-instaweb.sh
    authored

Nov 23, 2009

  1. mergetool--lib: simplify guess_merge_tool()

    Use a case statement instead of calling grep to find out if the editor's
    name contains the string "vim".  Remove the check for emacs, as this
    branch did the same as the default one anyway.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Oct 28, 2009

  1. Scott Chacon

    mergetool--lib: add p4merge as a pre-configured mergetool option

    Add p4merge to the set of built-in diff/merge tools, and update
    bash completion and documentation.
    
    Signed-off-by: Scott Chacon <schacon@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

May 24, 2009

  1. David Aguilar

    mergetool--lib: add support for araxis merge

    Araxis merge is now a built-in diff/merge tool.
    This adds araxis to git-completion and updates
    the documentation to mention araxis.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

May 09, 2009

  1. David Aguilar

    mergetool--lib: specialize diff options for emerge and ecmerge

    The ecmerge documentation mentions the following form:
    
    	ecmerge --mode=diff2 $1 $2
    
    Since git-difftool is about diffing, we should use that instead
    of --mode=merge2.  Likewise, this drops the $MERGED argument to
    emerge, as discussed on the git list ($gmane/117930).
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Apr 12, 2009

  1. David Aguilar

    mergetool--lib: simplify API usage by removing more global variables

    The mergetool--lib scriplet was tricky to use because it relied upon
    the existance of several global shell variables.  This removes more
    global variables so that things are simpler for callers.
    
    A side effect is that some variables are recomputed each time
    run_merge_tool() is called, but the overhead for recomputing
    them is justified by the simpler implementation.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed

Apr 08, 2009

  1. David Aguilar

    difftool/mergetool: refactor commands to use git-mergetool--lib

    This consolidates the common functionality from git-mergetool and
    git-difftool--helper into a single git-mergetool--lib scriptlet.
    
    Signed-off-by: David Aguilar <davvid@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    authored gitster committed
Something went wrong with that request. Please try again.