Revert part of the reverted commit that we want to keep.
[stgit] / stgit / commands / pull.py
index b20c37e..fe3b67d 100644 (file)
@@ -77,9 +77,13 @@ def func(parser, options, args):
     check_conflicts()
     check_head_top_equal()
 
-    if (policy != 'pull') \
-           and (policy != 'fetch-rebase') \
-           and (policy != 'rebase'):
+    if policy == 'pull':
+        must_rebase = 0
+    elif policy == 'fetch-rebase':
+        must_rebase = 1
+    elif policy == 'rebase':
+        must_rebase = 1
+    else:
         raise GitConfigException, 'Unsupported pull-policy "%s"' % policy
 
     applied = prepare_rebase(force=options.force)