Re: [PATCH] rebase -i: add exec command to launch a shell command
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 2, 2010, 15:51 UTC
- Message-ID
- <AANLkTik3JQMCoDr==9HV9-sd4Yh7Lta9LmbACByVGpzd@mail.gmail.com>
- In-Reply-To
- <1280743433-27803-1-git-send-email-Matthieu.Moy@imag.fr>
On Mon, Aug 2, 2010 at 10:03, Matthieu Moy <Matthieu.Moy@imag.fr> 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"
Show 27 quoted lines
> +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.