Signed-off-by: Michael J Gruber <g...@drmicha.warpmail.net>
---
 refs/files-backend.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index f020c52..1614854 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1780,6 +1780,8 @@ static int do_head_ref_worktrees(const char *submodule, 
each_ref_fn fn, void *cb
        worktrees = get_worktrees();
        retval = 0;
        for (i=0; worktrees[i]; i++) {
+               if (is_null_sha1(worktrees[i]->head_sha1))
+                       continue;
                hashcpy(oid.hash, worktrees[i]->head_sha1);
                retval = retval || fn("HEAD", &oid, worktrees[i]->is_detached ? 
0 : REF_ISSYMREF, cb_data);
        }
-- 
2.7.2.618.g7a61b68

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to