On Thu, Feb 04, 2016 at 02:55:00AM -0500, Jeff King wrote: > [resend; sorry, I forgot to cc Michael on the first one] > > On Thu, Jan 07, 2016 at 02:24:41PM -0500, Karl Moskowski wrote: > > > The problem is, deleting a branch whose name contains slashes doesn’t > > delete the directories in .git/refs/heads/. > > Yes. Git's model is to leave the directories in place, and remove them > only when they get in the way of creating another ref. In theory, the > effect is the same as deleting the directories proactively. > > But as you noticed, it does funny things with case-preserving > filesystems. It also can cause performance problems if you have a very > large number of empty directories (because git has to open each of them > just to find out they're empty). > > We can into the latter case at GitHub. Michael Haggerty (cc'd) worked up > some patches recently for this, but I don't now if they're yet polished > enough to send upstream. > > > It seems like git branch -d ascend the hierarchy (up to > > .git/refs/heads/), deleting any empty directories. > > Yes, though it needs to be coupled with making the branch-creation > process more robust to races (since we might create "refs/heads/foo" in > order to make "refs/heads/foo/bar" while somebody else is deleting it to > get rid of "refs/heads/foo/baz"). Can't we come up with a system that would update packed-refs directly instead of creating files? Mike -- 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