{"thread":{"id":"4575","subject":"Packing empty subtrees: good/bad/indifferent?","startedAt":"2006-06-20T00:09:59Z","lastAt":"2006-06-20T00:09:59Z","messageCount":1,"participants":["Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22087","messageId":"20060620000958.GA4877@spearce.org","threadId":"4575","inReplyTo":null,"subject":"Packing empty subtrees: good/bad/indifferent?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-06-20T00:09:59Z","receivedAt":"2006-06-20T00:09:59Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"So in my Eclipse plugin/Java GIT implementation I'm trying to figure\nout what to do if the API caller feeds me a subtree which is empty.\n\nCore GIT won't store an empty subtree simply because the subtree\ncan't exist in the index without at least one file in the tree.\nBut my Java implementation doesn't suffer from that limitation and\nwill happily store an empty subtree (and checkout an empty directory)\nif that is what the caller gave it.  :-)\n\nIn the plugin's UI level I'm trying relatively hard to refuse putting\nan empty directory into the repository as an empty subtree but I'm\nnow wondering if I should enforce that even lower (like down in\nthe actual tree writer) just to be on the safe side.\n\nAnyone have two cents they could share on the matter?\n\n-- \nShawn.\n"}]}