Fix --revision-range=SINGLE_COMMIT on git.

Review Request #3926 — Created March 2, 2013 and discarded

Information

nh2
RBTools
master

Reviewers

Fix --revision-range=SINGLE_COMMIT on git.

Before this, we would generate a diff with

    git diff SINGLE_COMMIT..CURRENT_HEAD

but this is not what was intended and what we write in the docs.
Now, we use

    git show SINGLE_COMMIT

to really only generate the diff of the given commit.
Things like `rbtools/postreview.py -n --revision-range=master^` work as expected now.
Description From Last Updated

git show is very different from git diff, and will provide a different sort of patch to Review Board. We …

chipx86chipx86

Using show breaks something with our parent diffs.

SM smacleod
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        rbtools/clients/git.py
      Ignored Files:
    
    
  2. 
      
mike_conley
  1. This looks OK, but someone more familiar with RBTools and our SCM clients should probably give it a ship-it too.
    1. Also, great work, and thanks for the patch. :)
  2. 
      
chipx86
  1. 
      
  2. rbtools/clients/git.py (Diff revision 1)
     
     
    Show all issues
    git show is very different from git diff, and will provide a different sort of patch to Review Board.
    
    We should be using git diff only, with the appropriate arguments for diffing just the revision we want.
  3. 
      
chipx86
  1. Ship It!
  2. 
      
NH
NH
SM
  1. This change breaks diff generation when using --parent. I've reverted the change in master (9cd8d411e0b754e1653de765659573417d21880d)
  2. rbtools/clients/git.py (Diff revision 1)
     
     
    Show all issues
    Using show breaks something with our parent diffs.
  3. 
      
NH
Review request changed
Status:
Discarded