Re: Can I checkout a single file without altering index?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Christian Halstrick" <christian.halstrick@xxxxxxxxx> wrote in message 
news:loom.20101014T095743-275@xxxxxxxxxxxxxxxxx
> 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 



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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]