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

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

 



Jens Lehmann wrote:

> Fixed all places where it was a straightforward change from cd'ing into a
> directory and back via "cd .." to a cd inside a subshell.

Thanks, Jens.

> Found these places with "git grep -w "cd \.\.".

I assume that "sed"-ing out all parentheses would make the diff very
small and readable.

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