When trying to diff a branch against master when master does not exist but the repo is not empty, pygit2 may raise an exception. Let's catch it and set the compare_branch to None as if the repo was empty.
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr
:thumbsup: :clap:
:thumbsup:
LGTM, but I recommend tests for this change.
I have just spent most of my morning trying to replicate this in tests without luck :(
So going to merge as is as I know it fixes an issue I just couldn't reproduce it really.
rebased onto 02494c5e155a7444bc492ef6352793188e59df1e
Pull-Request has been merged by pingou
When trying to diff a branch against master when master does not exist
but the repo is not empty, pygit2 may raise an exception. Let's catch
it and set the compare_branch to None as if the repo was empty.
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr