Skip to content

Commit 744cb06

Browse files
committed
Remove unused fetch_head() function
Signed-off-by: Peter Grayson <[email protected]>
1 parent b4b2588 commit 744cb06

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

stgit/git.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -826,31 +826,6 @@ def identify_remote(branchname):
826826
return None
827827

828828

829-
def fetch_head():
830-
"""Return the git id for the tip of the parent branch as left by
831-
'git fetch'.
832-
"""
833-
fetch_head = None
834-
stream = open(os.path.join(basedir.get(), 'FETCH_HEAD'), "r")
835-
for line in stream:
836-
# Only consider lines not tagged not-for-merge
837-
m = re.match('^([^\t]*)\t\t', line)
838-
if m:
839-
if fetch_head:
840-
raise GitException(
841-
'StGit does not support multiple FETCH_HEAD'
842-
)
843-
else:
844-
fetch_head = m.group(1)
845-
stream.close()
846-
847-
if not fetch_head:
848-
out.warn('No for-merge remote head found in FETCH_HEAD')
849-
850-
# here we are sure to have a single fetch_head
851-
return fetch_head
852-
853-
854829
def all_refs():
855830
"""Return a list of all refs in the current repository.
856831
"""

0 commit comments

Comments
 (0)