Merge branch 'js/chain-lint-attrfix'
[gitweb.git] / builtin / pull.c
index 7197b22b165576ed599f1d01528c5ca2527032b1..53bc5facfdabd05934a351091f2040744b2575ca 100644 (file)
@@ -48,11 +48,11 @@ static enum rebase_type parse_config_rebase(const char *key, const char *value,
                return REBASE_FALSE;
        else if (v > 0)
                return REBASE_TRUE;
-       else if (!strcmp(value, "preserve"))
+       else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
                return REBASE_PRESERVE;
-       else if (!strcmp(value, "merges"))
+       else if (!strcmp(value, "merges") || !strcmp(value, "m"))
                return REBASE_MERGES;
-       else if (!strcmp(value, "interactive"))
+       else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
                return REBASE_INTERACTIVE;
 
        if (fatal)
@@ -765,10 +765,13 @@ static int get_octopus_merge_base(struct object_id *merge_base,
 {
        struct commit_list *revs = NULL, *result;
 
-       commit_list_insert(lookup_commit_reference(curr_head), &revs);
-       commit_list_insert(lookup_commit_reference(merge_head), &revs);
+       commit_list_insert(lookup_commit_reference(the_repository, curr_head),
+                          &revs);
+       commit_list_insert(lookup_commit_reference(the_repository, merge_head),
+                          &revs);
        if (!is_null_oid(fork_point))
-               commit_list_insert(lookup_commit_reference(fork_point), &revs);
+               commit_list_insert(lookup_commit_reference(the_repository, fork_point),
+                                  &revs);
 
        result = get_octopus_merge_bases(revs);
        free_commit_list(revs);
@@ -944,9 +947,11 @@ int cmd_pull(int argc, const char **argv, const char *prefix)
                        struct commit_list *list = NULL;
                        struct commit *merge_head, *head;
 
-                       head = lookup_commit_reference(&orig_head);
+                       head = lookup_commit_reference(the_repository,
+                                                      &orig_head);
                        commit_list_insert(head, &list);
-                       merge_head = lookup_commit_reference(&merge_heads.oid[0]);
+                       merge_head = lookup_commit_reference(the_repository,
+                                                            &merge_heads.oid[0]);
                        if (is_descendant_of(merge_head, list)) {
                                /* we can fast-forward this without invoking rebase */
                                opt_ff = "--ff-only";