1 --- a/git_slug/gitrepo.py.org 2014-11-20 12:53:31.342320473 +0100
2 +++ b/git_slug/gitrepo.py 2014-11-20 12:53:15.482453868 +0100
3 @@ -82,12 +82,21 @@ class GitRepo:
4 'refs/notes/*:refs/notes/*'])
6 def check_remote(self, ref, remote=REMOTE_NAME):
8 ref = ref.replace(REFFILE, os.path.join('remotes', remote))
10 with open(os.path.join(self.gdir, ref), 'r') as f:
11 localref = f.readline().strip()
13 - localref = EMPTYSHA1
15 + with open(os.path.join(self.gdir, 'packed-refs')) as f:
17 + line_data = line.split()
18 + if len(line_data) == 2 and line_data[1] == ref:
19 + localref = line_data[0].strip()
25 def showfile(self, filename, ref="/".join([REMOTE_NAME, "master"])):