All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Add more tests for git-clean
Date: Sun, 04 Nov 2007 16:17:47 -0800	[thread overview]
Message-ID: <7vr6j5r1ec.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071104234617.GG4207@artemis.corp> (Pierre Habouzit's message of "Mon, 05 Nov 2007 00:46:17 +0100")

Pierre Habouzit <madcoder@debian.org> writes:

> On Sun, Nov 04, 2007 at 11:35:42PM +0000, Junio C Hamano wrote:
>> Shawn Bohrer <shawn.bohrer@gmail.com> writes:
>> 
>> > +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.

  reply	other threads:[~2007-11-05  0:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-04 19:02 [RFC] Second attempt at making git-clean a builtin Shawn Bohrer
2007-11-04 19:02 ` [PATCH] Add more tests for git-clean Shawn Bohrer
2007-11-04 19:02   ` [PATCH] Make git-clean a builtin Shawn Bohrer
2007-11-04 19:41     ` Pierre Habouzit
2007-11-04 20:24       ` [PATCH 3/2] Use parse-options in builtin-clean Johannes Schindelin
2007-11-04 21:16         ` Pierre Habouzit
2007-11-05 21:14     ` [PATCH] Make git-clean a builtin Junio C Hamano
2007-11-05 22:10       ` Carlos Rica
2007-11-05 23:54         ` Junio C Hamano
2007-11-06  5:05       ` Shawn Bohrer
2007-11-06  5:30         ` Junio C Hamano
2007-11-04 23:35   ` [PATCH] Add more tests for git-clean Junio C Hamano
2007-11-04 23:46     ` Pierre Habouzit
2007-11-05  0:17       ` Junio C Hamano [this message]
2007-11-04 23:49     ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2007-11-05  4:28 Shawn Bohrer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr6j5r1ec.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=madcoder@debian.org \
    --cc=shawn.bohrer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.