On Thu, 17 Jan 2008, Johannes Schindelin wrote: > > > Ok, here's the ugliest idea *ever*: > > Okay, you won. "I would like to thank the Academy for giving me this honor. I couldn't have done this without my parents, my teachers in high school, and the girl next-door.." > > + attr_len = getxattr(".", "user.git-dir", git_dir, sizeof(git_dir)-1); > > + if (attr_len > 0) { > > + git_dir[attr_len] = 0; > > + if (is_git_directory(git_dir)) { > > + setenv(GIT_DIR_ENVIRONMENT, git_dir, 1); > > + break; > > What's this break all about? Without the break, it will consider it a failure, and try to go up the directory structure ("..") to find the next thing. In other words, that "break" is exactly the same break as the one just a few lines earlier: if (is_git_directory(DEFAULT_GIT_DIR_ENVIRONMENT)) break; ie if we found a good git directory, we want to use it. Linus - 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