Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for multiple issues (both 9 and 10) related the git backend of pyvcs.
The primary way to see the issue(s) has been to create a new empty git repo and then perform a couple of adds/commits on some new files. I pulled in pbiggar's changes to handle not blowing up upon hitting a commit with no parent and fixing the deprecation warnings. I fixed the long line.
Like issue 11 (with the hg backend), there is also a problem with showing the diff of the first commit because it then defaulted to comparing that commit to the current HEAD instead of to an empty file set of empty files.
I essentially created a new special name for this situation and called it 'NULL'. So when diff'ing a commit that has no parent, it now uses 'NULL' as the "name" for the commit instead of None (which would get the HEAD). So viewing the first commit in history now correctly shows the add of files and their contents... because it's now comparing them to empty filesets.
But None still works correctly in the case of just getting the contents of a file without a commit id/name (i.e. getting the latest and greatest). With this change, both the hg and git backends will now behave identically with regard to commits without parents.