On Tue, Apr 20, 2010 at 16:52, Jay Soffian <jaysoffian@xxxxxxxxx> wrote: > On Tue, Apr 20, 2010 at 10:24 AM, Jeff King <peff@xxxxxxxx> wrote: >> On Tue, Apr 20, 2010 at 09:33:42AM -0400, Jay Soffian wrote: >> I like how the user would interact with that, but what happens with: >> >> git checkout -b topic/subtopic >> >> The reflog of the deleted branch is in the way. > > Handle it just as gracefully as we do today. This is what happens when > you try to create a branch with a similar collision: > > $ git branch foo/bar > $ git branch foo > error: there are still refs under 'refs/heads/foo' > fatal: Failed to lock ref for update: Is a directory > > So the reflog analog would be: > > $ git branch topic/subtopic > error: there are still logs under 'logs/refs/heads/topic' > fatal: Failed to lock log for update: Is a directory > > I think it's an edge case; thus I think it's okay to fail as long as > we give a reasonable error and a way to rename it. No it is not. Creation of the reflog is not the purpose of git branch operation (creation of the branch itself is). It will be just annoyance, especially if the user will have to do a rename which could be done automatically. -- 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