From: Felipe Contreras Date: Mon, 12 Nov 2012 17:41:07 +0000 (+0100) Subject: remote-hg: try the 'tip' if no checkout present X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=55dd56e042f96832327e07ee500a60db7fd244b9;p=git.git 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 Signed-off-by: Jeff King --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index bf5e5b473..a9a1e8fa5 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -439,6 +439,8 @@ def list_head(repo, cur): # fake bookmark from current branch head = cur node = repo['.'] + if not node: + node = repo['tip'] if not node: return if head == 'default':