Re: git add -N vs. git stash

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

 



Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx> writes:

> I'd say that's not a feature, is it?

I think that is a sign that "add -N" came much later than "stash",
and whoever added the former was not a heavy user of "stash" ;-)

As the state of the "tracked files in the working tree" and "staged
contents in the index" are both stored as tree objects, I think the
necessary fix would involve

 - record the contents of the "intent-to-add" paths to the tree
   object for the working tree.

 - record the fact that the "intent-to-add" paths are "not in the
   index yet" by removing them from the tree object for the index.

on the recording side (i.e. "stash create"), and then teach the
replay side (i.e. "stash apply") to pay attention to such strange
"exists in the tree for the working tree, but missing from the tree
for the index" paths and mark them with the "intent-to-add" bit.






[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