Fix checking for file existence when the file is empty on Git.

Review Request #2788 — Created Jan. 10, 2012 and submitted

Information

Review Board
release-1.6.x

Reviewers

Fix checking for file existence when the file is empty on Git.

Git was using the file contents as an indicator as to whether a file
exists when using raw file URLs. However, this fails on empty files,
such as a standard __init__.py.

What we really care about is whether we can successfully fetch a file,
or whether we'll get an HTTP error. So, ignore the contents, and assume
the file exists if there's no error.
No testing, but it *looks* like it'll work!
Description From Last Updated

The code looks good, but I don't feel like I'd really understand this comment a year from now. Can you …

daviddavid
david
  1. 
      
  2. reviewboard/scmtools/git.py (Diff revision 1)
     
     
    Show all issues
    The code looks good, but I don't feel like I'd really understand this comment a year from now. Can you be a little more verbose and explain?
  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed