Don't crash when .git/refs/heads/master doesn't exist
authorMagnus Hagander <magnus@hagander.net>
Fri, 13 Oct 2017 09:15:51 +0000 (11:15 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 13 Oct 2017 09:15:51 +0000 (11:15 +0200)
commit24d3a5881e01fa4e028aa1289b6f3a7ac5c80179
treeb075571f20cba87d360695f14519a11a88877cc4
parentd0cd663459c6ac360a1a32a9429dc169298c7edb
Don't crash when .git/refs/heads/master doesn't exist

This happens after a git gc which moves this into packed-refs. So when
this happens, look in packed-refs. If packed-refs also cannot be found,
just return a made up value instead of crashing.
pgweb/util/contexts.py