Re: I don't want the .git directory next to my code.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 17, 2008, 18:10 UTC
- Message-ID
- <alpine.LSU.1.00.0801171809400.5731@racer.site>
- In-Reply-To
- <alpine.LFD.1.00.0801170958550.14959@woody.linux-foundation.org>
Hi,
On Thu, 17 Jan 2008, Linus Torvalds wrote:
Show 9 quoted lines
> 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.."
You forgot the tears.
Show 11 quoted lines
> > > + 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.Ah, but of course. For some reason I expected this code outside of the loop, but it _has_ to be inside.
Thanks for enlightening a poor schmock, Dscho