Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Add more tests for git-clean

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:47

Possibly related (same subject, not in this thread)

Pierre Habouzit [off-list ref] writes:
On Sun, Nov 04, 2007 at 11:35:42PM +0000, Junio C Hamano wrote:
quoted
Shawn Bohrer [off-list ref] writes:
quoted
+test_expect_success 'git-clean with prefix' '
+
+	mkdir -p build docs &&
+	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
+	cd src/ &&
+	git-clean &&
+	cd - &&
This is wrong for two reasons.

 - Is "cd -" portable?
  this is POSIX:
That actually doesn't matter.  What the real world shells do
matters more.

In addition, "cd -" is a nice shorthand for interactive use but
it is a bad discipline to use it in a script anyway.

	...
	( cd src && git-clean ) &&
	...

would be the best way to write this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help