Fixes #4571
This allows using blame with unborn head repositories while an identifier argument is passed and uses the actual default branch when master branch exists but is not the default one.
identifier
rebased onto c4937434dd9ea86a5adf2743cc189c80267745b1
rebased onto 07024c4bf551cf3081a53b0351fd25475820be0f
rebased onto 53ff2627c2e7bbd9312357622ceecdeb9318cc83
The tag case is not working, but I found more problems looking on that like being able to ask for unexistent tag blames: https://pagure.io/pagure/blame/pagure/ui/repo.py?identifier=v6.6.6
We should block this too, or at least explicitly say that this is coming from head not from an unexistent tag =)
A little proof on https://stg.pagure.io/blame-test/ Navigating to blame view on branch master works properly, it points to: https://stg.pagure.io/blame-test/blame/file?identifier=master and shows the correct blame version. Navitaging to blame view on tag v1.0 works properly, it points to https://stg.pagure.io/blame-test/blame/file?identifier=835ccd9cf7de755514b0418c45f98b345204aef2 and shows the correct blame version.
Using tag v1.0 as identifier arg (the failing test) fails: https://stg.pagure.io/blame-test/blame/file?identifier=v1.0 It's showing the blame for repo_obj.head.target, so master, not for v1.0 tag
2 new commits added
tests: cover more blame view cases
tests: allow easy change of author|committer signature on add_content_to_git()
rebased onto b38ce7cc229353a7df3e4c6623a65c1a32ab6c2e
Fixed the problems when using tags as identifiers
rebased onto 5b7068cdaddd3524d6b6cfe9c58aefa737ecba91
3 new commits added
Move to own test file and refactor view_blame_file tests
Change default head selection behaviour to allow using blame with unborn HEAD or non master default branch repos
Jenkins will not be happy due to the broken arrow 0.15 thing, but otherwise this is ready to review
rebased onto 7a4125c04b17e864443fc0702d59d830a0f67904
Looks like I can't rebase this one :(
rebased onto c9c857269f09ce194d30d5f655b30fa89cd54fe9
Pull-Request has been merged by pingou
Fixes #4571
This allows using blame with unborn head repositories while an
identifierargument is passed and uses the actual default branch when master branch exists but is not the default one.