Re: [RFC/PATCH] Fast forward strategies allow, never, and only
- From
Sverre Hvammen Johansen <hvammen@gmail.com>
- Date
- Mar 14, 2008, 02:35 UTC
- Message-ID
- <402c10cd0803131935g6cf2b224k6a36f75101a03f31@mail.gmail.com>
- In-Reply-To
- <7vk5k9eqax.fsf@gitster.siamese.dyndns.org>
On Mon, Mar 10, 2008 at 10:19 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> "Sverre Hvammen Johansen" <hvammen@gmail.com> writes: > > --ff) > > - allow_fast_forward=t ;; > > + case "$2" in > > + allow|never|only) > > + fast_forward=$2 squash= no_commit= ; shift ;; > > + -*) > > + fast_forward=allow squash= no_commit= ;; > > + *) > > + die "available fast-forward strategies are: allow, newer, and only" ;; > > How does this code parse "git merge --ff my_other_branch"?
git rev-parse (in git-sh-setup.sh) will rewrite this to "git merge --ff -- my_other_branch". However, it will also rewrite "git merge --ff=only my_other_branch" to "git merge --ff only -- my_other_branch". Options in the config file are parsed directly by parse_config without these rewrites. This means that second case above is the case where --ff don't have any arguments. First and last case is the case where --ff have an argument.
-- Sverre Hvammen Johansen