From: Ævar Arnfjörð Bjarmason Date: Mon, 02 Aug 2010 15:51:29 GMT Subject: Re: [PATCH] rebase -i: add exec command to launch a shell command Message-ID: In-Reply-To: <1280743433-27803-1-git-send-email-Matthieu.Moy@imag.fr> On Mon, Aug 2, 2010 at 10:03, Matthieu Moy wrote: > +use usual shell commands like "cd". The commands are ran from the same "are run from the same" > +directory as "rebase -i" was started (this directory is temporarily > +re-created if needed). "was started in" > +file_must_exist () { > +    if ! [ -f "$1" ]; then > +       echo "file $1 not created." > +       false > +    fi > +} > + > +file_must_not_exist () { > +    if [ -f "$1" ]; then > +       echo "file $1 created while it shouldn't have. $2" > +       false > +    fi > +} > + > +dir_must_exist () { > +    if ! [ -d "$1" ]; then > +       echo "dir $1 does not exist." > +       false > +    fi > +} > + > +dir_must_not_exist () { > +    if [ -d "$1" ]; then > +       echo "dir $1 exists while it shouldn't. $2" > +       false > +    fi > +} Leftover debugging code? Looks useful, but probably something we should have in test-lib.sh as "git_test" as a wrapper for the "test" built-in.