On Thu, 2012-02-02 at 16:59 -0500, Jeff King wrote: > On Tue, Jan 31, 2012 at 04:22:58PM -0600, Jonathan Nieder wrote: > > > Anyway, thanks for explaining. Hopefully I can get to this soon and > > factor out a common function for get_repo_path and enter_repo to call > > so playing with the ordering becomes a little less scary. ;-) > > So here's what I think we should apply to fix the particular issue that > Richard mentioned at the start of this thread. > > Besides tweaking the ordering, the main contribution is a set of tests > that actually check some of these ambiguous cases (especially checking > the fact that both code paths behave identically!). I didn't factor the > logic into a common function, but doing so should be a little safer on > top of these tests, if you're still interested. I didn't have much to add to the discussion yesterday but this solution looks good to me and should resolve the problems I was seeing. Thanks! Richard -- 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