Re: [PATCH 3/3] Add support for GIT_ONE_FILESYSTEM

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

 



On Sun, Mar 28, 2010 at 05:22:54AM -0400, Jeff King wrote:

> > --- a/setup.c
> > +++ b/setup.c
> > @@ -390,6 +392,11 @@ const char *setup_git_directory_gently(int *nongit_ok)
> >  	 *   etc.
> >  	 */
> >  	offset = len = strlen(cwd);
> > +	if ((one_filesystem = git_env_bool("GIT_ONE_FILESYSTEM", 0))) {
> > +		if (stat(".", &buf))
> > +			die_errno("failed to stat '.'");
> > +		current_device = buf.st_dev;
> > +	}
> 
> Style nit. I know you did the proper () to silence the compiler warning,
> but we usually avoid assignment-inside-conditional altogether.
> Personally I don't really care either way.

Actually I take this back. It is in our CodingStyle guide, but we
violate it all over the place (my grep counted 522). Perhaps it should
be removed from CodingStyle.

-Peff
--
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]