Merge branch 'jk/maint-push-config'
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Nov 2009 20:31:42 +0000 (12:31 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Nov 2009 20:31:42 +0000 (12:31 -0800)
* jk/maint-push-config:
push: always load default config

1  2 
builtin-push.c
diff --combined builtin-push.c
index 8631c06ed6cfdfe12286c5c72ee3f2b733be8986,8a19f10354e7e6779baf24ef359bb9be8516a339..752121f2479eb9d3d9e60726645f204f676a5bd3
@@@ -10,7 -10,7 +10,7 @@@
  #include "parse-options.h"
  
  static const char * const push_usage[] = {
 -      "git push [--all | --mirror] [-n | --dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]",
 +      "git push [<options>] [<repository> <refspec>...]",
        NULL,
  };
  
@@@ -66,7 -66,6 +66,6 @@@ static void setup_push_tracking(void
  
  static void setup_default_push_refspecs(void)
  {
-       git_config(git_default_config, NULL);
        switch (push_default) {
        default:
        case PUSH_DEFAULT_MATCHING:
@@@ -173,7 -172,6 +172,6 @@@ int cmd_push(int argc, const char **arg
        int tags = 0;
        int rc;
        const char *repo = NULL;        /* default repository */
        struct option options[] = {
                OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
                OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
                OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL),
                OPT_BIT( 0 , "mirror", &flags, "mirror all refs",
                            (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
 -              OPT_BOOLEAN( 0 , "tags", &tags, "push tags"),
 +              OPT_BOOLEAN( 0 , "tags", &tags, "push tags (can't be used with --all or --mirror)"),
                OPT_BIT('n' , "dry-run", &flags, "dry run", TRANSPORT_PUSH_DRY_RUN),
                OPT_BIT( 0,  "porcelain", &flags, "machine-readable output", TRANSPORT_PUSH_PORCELAIN),
                OPT_BIT('f', "force", &flags, "force updates", TRANSPORT_PUSH_FORCE),
                OPT_END()
        };
  
+       git_config(git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options, push_usage, 0);
  
        if (tags)