Re: [PATCH 1/2] Changed rebasing safety check to look for reachability of stack base (gna bug #9181).

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

 



Yann Dirson <ydirson@xxxxxxxxxx> writes:

> --- a/stgit/commands/pull.py
> +++ b/stgit/commands/pull.py
> @@ -77,16 +77,12 @@ def func(parser, options, args):
>      check_conflicts()
>      check_head_top_equal()
>  
> -    if policy == 'pull':
> -        must_rebase = 0
> -    elif policy == 'fetch-rebase':
> -        must_rebase = 1
> -    elif policy == 'rebase':
> -        must_rebase = 1
> -    else:
> +    if (policy != 'pull') \
> +           and (policy != 'fetch-rebase') \
> +           and (policy != 'rebase'):
>          raise GitConfigException, 'Unsupported pull-policy "%s"' % policy

Minor nit: I think this is much more clearly written as

    if policy not in ('pull', 'fetch-rebase', 'rebase'):

-- 
David Kågedal

-
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