1. 29 Nov, 2016 2 commits
    • David Aguilar's avatar
      mergetools/vimdiff: trust Vim's exit code · 29672844
      David Aguilar authored
      Allow vimdiff users to signal that they do not want to use the
      result of a merge by exiting with ":cquit", which tells Vim to
      exit with an error code.
      
      This is better than the current behavior because it allows users
      to directly flag that the merge is bad, using a standard Vim
      feature, rather than relying on a timestamp heuristic that is
      unforgiving to users that save in-progress merge files.
      
      The original behavior can be restored by configuring
      mergetool.vimdiff.trustExitCode to false.
      Reported-by: Dun Peal's avatarDun Peal <dunpealer@gmail.com>
      Signed-off-by: David Aguilar's avatarDavid Aguilar <davvid@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      29672844
    • David Aguilar's avatar
      mergetool: honor mergetool.$tool.trustExitCode for built-in tools · 7c10605d
      David Aguilar authored
      Built-in merge tools contain a hard-coded assumption about
      whether or not a tool's exit code can be trusted to determine
      the success or failure of a merge.  Tools whose exit codes are
      not trusted contain calls to check_unchanged() in their
      merge_cmd() functions.
      
      A problem with this is that the trustExitCode configuration is
      not honored for built-in tools.
      
      Teach built-in tools to honor the trustExitCode configuration.
      Extend run_merge_cmd() so that it is responsible for calling
      check_unchanged() when a tool's exit code cannot be trusted.
      Remove check_unchanged() calls from scriptlets since they are no
      longer responsible for calling it.
      
      When no configuration is present, exit_code_trustable() is
      checked to see whether the exit code should be trusted.
      The default implementation returns false.
      
      Tools whose exit codes can be trusted override
      exit_code_trustable() to true.
      Reported-by: Dun Peal's avatarDun Peal <dunpealer@gmail.com>
      Signed-off-by: David Aguilar's avatarDavid Aguilar <davvid@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      7c10605d
  2. 12 Feb, 2016 1 commit
  3. 22 Apr, 2014 1 commit
  4. 29 Jan, 2013 1 commit
  5. 28 Jan, 2013 1 commit
  6. 19 Aug, 2011 1 commit