Re: I don't want the .git directory next to my code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 17 Jan 2008, Linus Torvalds wrote:

> 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.

> > > +		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

-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux