Re: Git commit won't add an untracked file given on the command line

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

 



On Wed, 19 Nov 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > On Wed, 19 Nov 2008, Mark Burton wrote:
> >
> >> Having said that, I still like the concept of being able to add named 
> >> files without touching the index.
> >
> > That's just impossible.  You cannot create a tree object, let alone a 
> > commit object, without touching the index (AKA staging area).
> 
> I do not think Mark really _means_ "not in the index".
> 
> The wish is more like "I want to let git know that I am interested in this
> path, but I'm not ready to say what exact content I want for that path in
> the next commit, not just yet".
> 
> I do not think that is an unreasonable wish.  On the other hand, it is
> unreasonable for anybody to insist that we satisfy the wish without
> touching the index.  The index is the most natural place to do that.

I don't think that's what Mark wants, in this case. He's looking for the 
ability to have "git commit" act on a temporary index created by adding to 
the parent commit explicitly named files which aren't in the non-temporary 
index. That is, Mark doesn't want to touch *the* index, which is fine; git 
can commit with *an* index.

> We have a half (probably a quarter) of what we need for that implemented
> already, by the way.

I've looked into what you're suggesting on occasion; the main issue is 
getting the various index users to avoid getting confused. I was stumped 
by the diff code, which was confusing the "intent to add something" token 
with its "compare against the work tree" token. I'd say, it's half 
implemented, but testing is a major unstarted undertaking.

	-Daniel
*This .sig left intentionally blank*
--
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]

  Powered by Linux