Re: Tracking empty directories

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

 



On Wed, Feb 2, 2011 at 12:28 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Jakub Narebski wrote:
>
>> Also one needs to remember that this would require adding extension
>> to git index, because currently it tracks only files, and not
>> directories. ÂExplicitly tracking directories in the index could be
>> useful for other purposes...
>>
>> The major difficulty of this is IMHO not the UI, but tracking all those
>> tricky corner cases (like directory/file conflict, etc.).
>
> 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.

> Would this actually require an index extension, strictly speaking?

Could it be done with an index extension? Interesting.

> Certainly one ought to register an extension name or bump the version
> number to avoid confusing gits that don't know about the feature.

Index extension with lowercase name are "necessary for correct
operation". Older git will abort on unknown required extensions. If
you add to the main part of the index, better bump version number.

> But after that, couldn't we (e.g.) allow the directory name (ending
> with '/') as index entry?

You could. You also need to strip '/' sometimes because certain part
of git does not expect '/' to be there (traverse_trees or
unpack_trees, I don't remember).
-- 
Duy
--
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]