Fix for commits without a parent not returning a diff
Review Request #7054 — Created March 12, 2015 and submitted
Currently, the route /repos/{repo}/commits/{id} will not return a diff if the commit has no parent. This fixes that.
Made sure that a diff is returned even when the commit has no parent.
Description | From | Last Updated |
---|---|---|
What happens in the case where there are multiple parents (i.e., a merge commit)? If we aren't going to support … |
brennie | |
I don't know if this is against gofmt but can you align the parameters like we do in Python, e.g. … |
brennie | |
Can this be refactored so that we only have one call of gitRepo.DiffTreeToTree (after the if/else)? |
brennie |
-
-
What happens in the case where there are multiple parents (i.e., a merge commit)? If we aren't going to support this we should error out somehow (that doesn't break RB).
-
I don't know if this is against
gofmt
but can you align the parameters like we do in Python, e.g.gitRepo.DiffTreeToTree(parentTree, commitTree, &diffOptions)
If this is against
gofmt
, please drop this issue.
-
I am interested in the path, is it for github only? or all git repositories in general? Because paths might vary in different git services.
- Change Summary:
-
Minor format/style changes
- Commit:
-
3ebc652a2efac878e992254562fd8d88b00fa4829e744ef0de54ea047920f07364ce32ac724e8de9
- Diff:
-
Revision 2 (+35 -28)
-
Tool: PEP8 Style Checker Ignored Files: git_repository.go Tool: Pyflakes Ignored Files: git_repository.go
- Change Summary:
-
Barret's suggestion + a bit more tidy up.
- Commit:
-
9e744ef0de54ea047920f07364ce32ac724e8de9023801eeb90e431d97f7c44d959fcce8f66c3a41
- Diff:
-
Revision 3 (+31 -32)