Re: [PATCH] git-filter-branch.sh: Allow running in bare repositories
Hi,
On Wed, Jul 23, 2008 at 12:27:07AM +0100, Johannes Schindelin wrote:
Show 8 quoted lines
> 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.
Show 6 quoted lines
> > +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