public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse•cz>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: gitster@pobox•com, git@vger•kernel.org
Subject: Re: [PATCH] git-filter-branch.sh: Allow running in bare repositories
Date: Wed, 23 Jul 2008 01:36:52 +0200	[thread overview]
Message-ID: <20080722233652.GT10151@machine.or.cz> (raw)
In-Reply-To: <alpine.DEB.1.00.0807230025050.8986@racer>

  Hi,

On Wed, Jul 23, 2008 at 12:27:07AM +0100, Johannes Schindelin wrote:
> On Wed, 23 Jul 2008, Petr Baudis wrote:
> 
> > This also fixes suspicious shell boolean expression during a check
> > for dirty working tree.
> 
> If you are talking about X && Y || Z, it is well established (and should 
> not be suspicious to a shell hacker like the creator of Cogito) that Z is 
> executed if either X fails, or X succeeds and Y fails.

  um, oops. I actually never got to know these by heart since I learnt
to expliciply group the expressions early on. I guess my only excuse is
that I've stumbled at 0bdf93cbf earlier and understood it the _wrong_
way around since I'm getting really sleepy. ;-)

  I still think my change improves the code readibility so it could be
kept, but I'm fairly neutral on this.

> > +test_expect_success 'rewrite bare repository identically' '
> > +	(git config core.bare true && cd .git && git-filter-branch branch)
> > +'
> > +git config core.bare false
> 
> Any reason why this is done outside the test?

  If the test fails in the middle, not resetting this might negatively
affect the rest of the testsuite.

-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie

  reply	other threads:[~2008-07-22 23:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 22:37 [PATCH] git-filter-branch.sh: Allow running in bare repositories Petr Baudis
2008-07-22 23:27 ` Johannes Schindelin
2008-07-22 23:36   ` Petr Baudis [this message]
2008-07-23  0:09     ` Junio C Hamano
2008-07-23 21:55       ` Petr Baudis
2008-07-23 21:59         ` Johannes Schindelin
2008-07-23 22:06           ` Petr Baudis
2008-07-23 22:15             ` [PATCHv3] " Petr Baudis
2008-07-23 22:29               ` Junio C Hamano
2008-07-23 22:29         ` [PATCH] " Junio C Hamano

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=20080722233652.GT10151@machine.or.cz \
    --to=pasky@suse$(echo .)cz \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox