Subject: Re: [PATCH] Several tests: cd inside subshell instead of around

From: Jens Lehmann <[email-masked]>
Date: Mon, 06 Sep 2010 22:12:38 +0200

Am 06.09.2010 21:06, schrieb Jonathan Nieder:
> Do you think it would be a bad idea if I send a follow-on patch that
> changes code like this:
> 
> 	(cd dir &&
>  	git update-index --add two &&
>  	case "`git ls-files`" in
>  	two) echo pass two ;;
>  	*) echo bad two; exit 1 ;;
> 	esac
> 	) &&
> 
> to this:
> 
> 	(
> 		cd dir &&
> 		git update-index --add two &&
> 		case "`git ls-files`" in
> 		two) echo pass two ;;
> 		*) echo bad two; exit 1 ;;
> 		esac
> 	)
> 
> It would have the benefit of touching all code in the subshell, so we
> could see the effect on "exit" commands and whatnot.

I think that makes a lot of sense. I think you would not only end up
changing the indentation of many subshells (not only those that I
added), you will also have to deal with tests using spaces instead of
tabs for indentation. But these issues have to be addressed anyway ...