[1.8.0] Tracking empty directories

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

 



See "Tracking empty directories" subthread on git mailing list,
starting with

  http://thread.gmane.org/gmane.comp.version-control.git/165655/focus=165831

The idea is for git to be able to track empty directories without the
.keepme (or empty .gitignore) file trick.  This was one of the most
requested features is native support for tracking empty directories,
with 35.2% support (from those who answered question) in 
"Git User's Survey 2010":

  https://git.wiki.kernel.org/index.php/GitSurvey2010#17._Which_of_the_following_features_would_you_like_to_see_implemented_in_git.3F


There were some concerns about *backwards compatibility* of this
feature, see for example this email (which I would summarize here).

  http://thread.gmane.org/gmane.comp.version-control.git/165655/focus=165847

That's why it is in 1.8.0 proposals.

The problem with backward compatibility is twofold.  First and more
important is while git supports empty tree object (it has it hardcoded
for some time, as it is necessary e.g. for initial diff, or merging
unrelated branches without common ancestor), and there is no problem
with entry for empty tree in a tree object

  040000 tree 22d5826c087c4b9dcc72e2131c2cfb061403f7eb	empty

there is (supposedly) problem when checking out such tree (see email
referenced above) with an old git.

Second is that tracking empty directories would require extension to the
git index (storing trees in index, like we store submodules)... but that
is purely local matter.

There is also issue with pre-change git automatically removing empty
directories, but that is probably matter for pre-commit hook to check,
or pre-receive hook in publishing repository.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
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]