Merge branch 'cb/transfer-no-progress' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2012 23:14:37 +0000 (15:14 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2012 23:14:37 +0000 (15:14 -0800)
* cb/transfer-no-progress:
push/fetch/clone --no-progress suppresses progress output

1  2 
builtin/clone.c
diff --combined builtin/clone.c
index df8ae750dd33e83d2d207854b02465d7eab5d7fd,b9e882d3022ff78c7992d0f5b288109fab3803b7..0fb5956b48a77767e650d85f0818790736a4f94d
@@@ -45,7 -45,7 +45,7 @@@ static char *option_branch = NULL
  static const char *real_git_dir;
  static char *option_upload_pack = "git-upload-pack";
  static int option_verbosity;
- static int option_progress;
+ static int option_progress = -1;
  static struct string_list option_config;
  static struct string_list option_reference;
  
@@@ -60,8 -60,8 +60,8 @@@ static int opt_parse_reference(const st
  
  static struct option builtin_clone_options[] = {
        OPT__VERBOSITY(&option_verbosity),
-       OPT_BOOLEAN(0, "progress", &option_progress,
-                       "force progress reporting"),
+       OPT_BOOL(0, "progress", &option_progress,
+                "force progress reporting"),
        OPT_BOOLEAN('n', "no-checkout", &option_no_checkout,
                    "don't create a checkout"),
        OPT_BOOLEAN(0, "bare", &option_bare, "create a bare repository"),
@@@ -105,7 -105,7 +105,7 @@@ static const char *argv_submodule[] = 
  
  static char *get_repo_path(const char *repo, int *is_bundle)
  {
 -      static char *suffix[] = { "/.git", ".git", "" };
 +      static char *suffix[] = { "/.git", "", ".git/.git", ".git" };
        static char *bundle_suffix[] = { ".bundle", "" };
        struct stat st;
        int i;
                path = mkpath("%s%s", repo, suffix[i]);
                if (stat(path, &st))
                        continue;
 -              if (S_ISDIR(st.st_mode)) {
 +              if (S_ISDIR(st.st_mode) && is_git_directory(path)) {
                        *is_bundle = 0;
                        return xstrdup(absolute_path(path));
                } else if (S_ISREG(st.st_mode) && st.st_size > 8) {