Re: [PATCH] rebase [-i --exec | -ix] <CMD>...
- From
- konglu@minatec.inpg.fr <konglu@minatec.inpg.fr>
- Date
- Jun 5, 2012, 17:59 UTC
- Message-ID
- <20120605195959.Horde.h42jfHwdC4BPzkkfVQizm9A@webmail.minatec.grenoble-inp.fr>
- In-Reply-To
- <7vhaurt1m6.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> a écrit :
Show 24 quoted lines
>> + if orig_head=$(git rev-parse -q --verify "$2") ||
>> + test `expr substr "$2" 1 1` = -
>> + then
>> + echo "You must specify a command after --exec option\n"
>> + usage
>> + else
>> + if test -n "$cmd"
>> + then
>> + cmd="$2,$cmd"
>> + else
>> + cmd="$2"
>> + fi
>> + fi
>> + shift
>> + ;;
>
> Are you telling me that I cannot have a branch named "make"? Drop
> this nonsense, and just write it in a more straightforward way, e.g.
>
> -x)
> test 2 -le "$#" || usage
> cmd="${cmd:+"$cmd$LF"} $2"
> shift
> ;;I agree with the fact that the code must not restrain you in naming branches. But shouldn't we keep the "test `expr substr "$2" 1 1` = -" part so that options can't be right after the "--exec" ?