summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2012-11-12 18:41:07 +0100
committerLibravatar Jeff King <peff@peff.net>2012-11-12 15:34:53 -0500
commit55dd56e042f96832327e07ee500a60db7fd244b9 (patch)
treeb4dceb1491720bf3a1161ad62cab606388edc414 /contrib
parentremote-hg: fix compatibility with older versions of hg (diff)
downloadtgif-55dd56e042f96832327e07ee500a60db7fd244b9.tar.xz
remote-hg: try the 'tip' if no checkout present
There's no concept of HEAD in mercurial, but let's try our best to do something sensible. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index bf5e5b473d..a9a1e8fa58 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -440,6 +440,8 @@ def list_head(repo, cur):
head = cur
node = repo['.']
if not node:
+ node = repo['tip']
+ if not node:
return
if head == 'default':
head = 'master'