Merge branch 'tc/clone-v-progress'
authorJunio C Hamano <gitster@pobox.com>
Sun, 17 Jan 2010 23:58:58 +0000 (15:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Jan 2010 23:58:58 +0000 (15:58 -0800)
* tc/clone-v-progress:
  clone: use --progress to force progress reporting
  clone: set transport->verbose when -v/--verbose is used
  git-clone.txt: reword description of progress behaviour
  check stderr with isatty() instead of stdout when deciding to show progress

Conflicts:
transport.c

1  2 
builtin-clone.c
transport-helper.c
transport.c
transport.h

diff --cc builtin-clone.c
Simple merge
Simple merge
diff --cc transport.c
@@@ -471,15 -469,15 +471,15 @@@ static int fetch_refs_via_pack(struct t
        struct ref *refs_tmp = NULL;
  
        memset(&args, 0, sizeof(args));
 -      args.uploadpack = data->uploadpack;
 -      args.keep_pack = data->keep;
 +      args.uploadpack = data->options.uploadpack;
 +      args.keep_pack = data->options.keep;
        args.lock_pack = 1;
 -      args.use_thin_pack = data->thin;
 -      args.include_tag = data->followtags;
 +      args.use_thin_pack = data->options.thin;
 +      args.include_tag = data->options.followtags;
        args.verbose = (transport->verbose > 0);
        args.quiet = (transport->verbose < 0);
-       args.no_progress = args.quiet || (!transport->progress && !isatty(1));
+       args.no_progress = args.quiet || (!transport->progress && !isatty(2));
 -      args.depth = data->depth;
 +      args.depth = data->options.depth;
  
        for (i = 0; i < nr_heads; i++)
                origh[i] = heads[i] = xstrdup(to_fetch[i]->name);
diff --cc transport.h
@@@ -74,14 -26,8 +74,14 @@@ struct transport 
        int (*disconnect)(struct transport *connection);
        char *pack_lockfile;
        signed verbose : 3;
-       /* Force progress even if the output is not a tty */
+       /* Force progress even if stderr is not a tty */
        unsigned progress : 1;
 +      /*
 +       * If transport is at least potentially smart, this points to
 +       * git_transport_options structure to use in case transport
 +       * actually turns out to be smart.
 +       */
 +      struct git_transport_options *smart_options;
  };
  
  #define TRANSPORT_PUSH_ALL 1