From: "Torgil Svensson" <torgil.svensson@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH] submodule update - don't run git-fetch if sha1 available
Date: Sun, 12 Aug 2007 02:03:17 +0200 [thread overview]
Message-ID: <e7bda7770708111703u40f89c1fx17bfac4b9aed9d2e@mail.gmail.com> (raw)
In-Reply-To: <7vfy2pn9eb.fsf@assigned-by-dhcp.cox.net>
On 8/11/07, Junio C Hamano <gitster@pobox.com> wrote:
> This is wrong. Existence of the commit object alone does not
> mean the necessary tree and blob objects to check out that
> commit, let alone all the history that leads to the commit,
> exist in the repository (think of a commit walker fetch that was
> interrupted in the middle). You need to make sure that the
> commit exists *AND* is reachable from one of the refs.
That made sense. Good point. Consider this case:
$ git clone <superproject>
$ git submodule init
$ git submodule update
$ cd <submodule>
$ git checkout master
$ cd ..
$ git status
Modified <submodule>
$ git submodule update
Do we know in this state that the ref can be reached from a reference?
Say you've managed to do this:
$ cd <submodule>
$ git checkout master
$ work.. commit .. work ..commit
$ cd ..
$ git add <submodule>
$ git commit
$ cd <submodule>
$ git reset --hard HEAD~2
Is it okay to fail the supermodule update in this state? Obviously
we've thrown away things for a purpose.
//Torgil
next prev parent reply other threads:[~2007-08-12 0:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 17:48 [PATCH] submodule update - don't run git-fetch if sha1 available Torgil Svensson
2007-08-11 18:23 ` Torgil Svensson
2007-08-11 19:44 ` Junio C Hamano
2007-08-12 0:03 ` Torgil Svensson [this message]
2007-08-12 1:19 ` Junio C Hamano
2007-08-19 18:57 ` Torgil Svensson
2007-08-19 20:56 ` Junio C Hamano
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=e7bda7770708111703u40f89c1fx17bfac4b9aed9d2e@mail.gmail.com \
--to=torgil.svensson@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).