Re: Tracking empty directories

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

 



Nguyen Thai Ngoc Duy wrote:
> On Wed, Feb 2, 2011 at 12:28 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:

>> I have ideas about how to resolve those tricky corner cases, but not
>> about what the UI should look like. ÂHow does one go about adding a
>> directory? ÂDoes it ever get implicitly removed?
>
> I suppose a special command for it is appropriate (git-keepdir?). Many
> index-related commands are recursive by default and hard to change.
>
> Yes I think it should be automatically removed from index when a file
> is added inside tracked directories. Removing those files will also
> remove the containing directory though.

Okay, I'm convinced.  This fits a "worse is better" point of view
nicely.

To add, one would use "git update-index --add".  The magic disappears
when you register a file within that directory; to tell git you want
to keep it, one would mkdir and "git update-index --add" again.  Once
it's working, we can think about if there is a need for making that
last step automatic after all (my guess: "no"). ;-)

Use case: [1]
Nice starting point: [2]
Motivational word of wisdom: [3]

This treatment leaves out the backward compatibility detail.  I still
think that's the easy part (at worst, we can always implement read
support, wait a year, and then turn on write support).

Jonathan

[1] http://thread.gmane.org/gmane.comp.version-control.git/46947/focus=47278
[2] http://thread.gmane.org/gmane.comp.version-control.git/52813/focus=52908
[3] http://thread.gmane.org/gmane.comp.version-control.git/53494
--
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]