git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: skimo@liacs.nl, git@vger.kernel.org,
	Louis-Noel Pouchet <louis-noel.pouchet@inria.fr>
Subject: Re: [PATCH] git-clone: fetch possibly detached HEAD over dumb http
Date: Sun, 1 Jul 2007 18:40:16 +0200	[thread overview]
Message-ID: <20070701164016.GA3661@steel.home> (raw)
In-Reply-To: <7vy7i0amnn.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano, Sun, Jul 01, 2007 04:22:04 +0200:
> Alex Riesen <raa.lkml@gmail.com> writes:
> 
> > The check for .git validity includes checking if HEAD contains
> > something sane, and this check is very simple: the HEAD is read
> > (readlink(2) or plain read(2)) and tested if it contains a
> > reference starting with "refs/", which maybe inconsistent with
> > resolve_gitlink_ref, but probably ok.
> 
> Ah, I was not paying close attention to resolve_gitlink_ref();
> if it does not require HEAD to point at refs/ I would say it is
> a bug.

yes, thats why I think its ok.

> Come to think of it, I would further say that we probably should
> tighten it up a bit: HEAD must be either a valid commit object
> name (i.e. detached)

That (HEAD must point to a _valid_ commit) will make accidentally
corrupted repositories harder to fix. The tool which require a valid
repository (cat-file, update-ref, read-tree) are the same tools which
you need to fix small problems which can happen, like the commit
pointed by HEAD is accidentally pruned from parent repo.

      reply	other threads:[~2007-07-01 16:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 10:52 [PATCH] git-clone: fetch possibly detached HEAD over dumb http Sven Verdoolaege
2007-06-29  0:02 ` Junio C Hamano
2007-06-29  8:11   ` Sven Verdoolaege
2007-06-29  8:31   ` Sven Verdoolaege
2007-06-30 13:33     ` Alex Riesen
2007-06-30 13:45       ` Sven Verdoolaege
2007-06-30 22:23         ` Alex Riesen
2007-07-01  2:22           ` Junio C Hamano
2007-07-01 16:40             ` Alex Riesen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070701164016.GA3661@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=louis-noel.pouchet@inria.fr \
    --cc=skimo@liacs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).