From: "Neal Kreitzinger" <neal@rsss.com>
To: git@vger.kernel.org
Subject: Re: Can I checkout a single file without altering index?
Date: Fri, 15 Oct 2010 13:30:06 -0500 [thread overview]
Message-ID: <i9a6kn$d7o$1@dough.gmane.org> (raw)
In-Reply-To: loom.20101014T095743-275@post.gmane.org
"Christian Halstrick" <christian.halstrick@gmail.com> wrote in message
news:loom.20101014T095743-275@post.gmane.org...
> Thank's a lot for all your responses. I know now how to solve my problem.
> I'll
> definitely not going to commit my unit-test before my fix and publish that
> because then I would have commits in the history where tests fail. But
> other
> suggested solutions do work.
>
> Still, all that sounds like workarounds for a lacking feature. Checkout
> content
> to the worktree without altering the index. What do you think, couldn't
> that be
> added as an option to checkout?
>
> -- Chris
FWIW, my understanding of the index is that it is the middle-man for moving
things from your work-tree to the object-store AND for moving things from
the object-store to your work-tree. Therefore, when you checkout the blob,
it first gets copied from the object-store to your index and then from the
index to your work-tree.
However, there is an option in git-commit to copy files directly from the
working-tree to the object-store by totally bypassing the index, but no one
seems to do this or recommend doing this as normative practice. None the
less, this "exception" in the git-commit manpage does seem to set the
precedent, so maybe it is also conceivable to copy objects directly from the
object-store to the work-tree by totally bypassing the index.
Please note that I am responding because I am interested in the discussion
and not because I know the answer. I am not a git programmer so my
observations only symptomatic and/or theoretical as a user.
v/r,
Neal
next prev parent reply other threads:[~2010-10-15 18:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-12 10:03 Can I checkout a single file without altering index? Christian Halstrick
2010-10-12 10:19 ` Michael J Gruber
2010-10-12 11:14 ` Stefan Naewe
2010-10-13 17:09 ` Jared Hance
2010-10-12 15:39 ` Alex Riesen
2010-10-12 16:39 ` Tomas Carnecky
2010-10-14 8:03 ` Christian Halstrick
2010-10-15 18:30 ` Neal Kreitzinger [this message]
2010-10-15 18:43 ` Jonathan Nieder
2010-10-15 18:55 ` Jeff King
2010-10-15 19:32 ` Jonathan Nieder
2010-10-15 19:48 ` Jeff King
2010-10-15 18:57 ` Neal Kreitzinger
2010-10-15 19:02 ` Andreas Schwab
2010-10-15 23:22 ` Junio C Hamano
2010-10-15 23:40 ` Jonathan Nieder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i9a6kn$d7o$1@dough.gmane.org' \
--to=neal@rsss.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).