Improve our usage of --no-ext-diff with git.

Review Request #5372 — Created Jan. 31, 2014 and submitted

Information

RBTools
master

Reviewers

Improve our usage of --no-ext-diff with git.

At some point in the past, we added --no-ext-diff to the git command line. This
was intended to make things work when people had set their diff tool to
something that didn't produce a diff, such as graphical tools like 'p4merge'.
Unfortunately, this removes a bunch of functionality with legitimate uses.

This change adds a flag for .reviewboardrc, GIT_USE_EXT_DIFF, which can be set
to True to allow using external diff commands.

Posted some changes with git using --debug. Saw that without the config
setting, it passed --no-ext-diff on the command lin, and with it, it didn't.

Description From Last Updated

You could probably simplify this with: if self.user_config.get('GIT_USE_EXT_DIFF', False):

chipx86chipx86
chipx86
  1. What happens when a graphical diff tool (say, Kaleidoscope) is used? Won't it launch the process?

    1. It will launch it, and there's not really anything we can do about that. The nice thing about this is that once they quit that, it'll go through and post it using --no-ext-diff.

    2. Hmm, that seems like an annoying regression. Though, they should be using git difftool for such things.

      Forcing a standard git diff is right for most situations, but clearly not all (the example of a filtering script in the bug is one such example).

      Instead of trying both with and without, and possibly causing problems (showing a graphical app, running through less, etc.), what are your thoughts on keeping --no-ext-diff by default, and having a .reviewboardrc option for turning this off?

  2. 
      
david
chipx86
  1. Looks good. One suggestion.

  2. rbtools/clients/git.py (Diff revision 2)
     
     
     
    Show all issues

    You could probably simplify this with:

    if self.user_config.get('GIT_USE_EXT_DIFF', False):
    
  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (7160581).