Re: [RFC/PATCH] Fast forward strategies allow, never, and only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 10, 2008 at 10:19 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "Sverre Hvammen Johansen" <hvammen@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux