1. 20 5月, 2015 1 次提交
    • J
      progress: treat "no terminal" as being in the foreground · a4fb76ce
      Jeff King 提交于
      progress: treat "no terminal" as being in the foreground
      
      Commit 85cb8906 (progress: no progress in background,
      2015-04-13) avoids sending progress from background
      processes by checking that the process group id of the
      current process is the same as that of the controlling
      terminal.
      
      If we don't have a terminal, however, this check never
      succeeds, and we print no progress at all (until the final
      "done" message). This can be seen when cloning a large
      repository; instead of getting progress updates for
      "counting objects", it will appear to hang then print the
      final count.
      
      We can fix this by treating an error return from tcgetpgrp()
      as a signal to show the progress.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a4fb76ce
  2. 16 4月, 2015 1 次提交
  3. 14 7月, 2014 1 次提交
  4. 25 2月, 2014 1 次提交
  5. 11 4月, 2013 1 次提交
    • A
      strbuf: create strbuf_humanise_bytes() to show byte sizes · 079b546a
      Antoine Pelisse 提交于
      Humanization of downloaded size is done in the same function as text
      formatting in 'process.c'. The code cannot be reused easily elsewhere.
      
      Separate text formatting from size simplification and make the
      function public in strbuf so that it can easily be used by other
      callers.
      
      We now can use strbuf_humanise_bytes() for both downloaded size and
      download speed calculation. One of the drawbacks is that speed will
      now look like this when download is stalled: "0 bytes/s" instead of
      "0 KiB/s".
      Signed-off-by: NAntoine Pelisse <apelisse@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      079b546a
  6. 14 10月, 2009 1 次提交
  7. 14 9月, 2009 1 次提交
  8. 25 4月, 2009 1 次提交
  9. 09 6月, 2008 1 次提交
    • B
      progress.c: avoid use of dynamic-sized array · d4c44443
      Boyd Lynn Gerber 提交于
      Dynamically sized arrays are gcc and C99 construct.  Using them hurts
      portability to older compilers, although using them is nice in this case
      it is not desirable.  This patch removes the only use of the construct
      in stop_progress_msg(); the function is about writing out a single line
      of a message, and the existing callers of this function feed messages
      of only bounded size anyway, so use of dynamic array is simply overkill.
      Signed-off-by: NBoyd Lynn Gerber <gerberb@zenez.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d4c44443
  10. 21 11月, 2007 1 次提交
    • J
      Flush progress message buffer in display(). · 137a0d0e
      Johannes Sixt 提交于
      This will make progress display from pack-objects (invoked via
      upload-pack) more responsive on platforms with an implementation
      of stdio whose stderr is line buffered.
      
      The standard error stream is defined to be merely "not fully
      buffered"; this is different from "unbuffered".  If the
      implementation of the stdio library chooses to make it line
      buffered, progress reports that end with CR but do not contain
      LF will accumulate in the stdio buffer before written out.  A
      fflush() after each progress display gives a nice continuous
      progress.
      Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      137a0d0e
  11. 09 11月, 2007 1 次提交
  12. 08 11月, 2007 1 次提交
    • N
      make display of total transferred fully accurate · 53ed7b5a
      Nicolas Pitre 提交于
      The minimum delay of 1/2 sec between successive throughput updates might
      not have been elapsed when display_throughput() is called for the last
      time, potentially making the display of total transferred bytes not
      right when progress is said to be done.
      
      Let's force an update of the throughput display as well when the
      progress is complete.  As a side effect, the total transferred will
      always be displayed even if the actual transfer rate doesn't have time
      to kickin.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53ed7b5a
  13. 06 11月, 2007 1 次提交
    • N
      make display of total transferred more accurate · 218558af
      Nicolas Pitre 提交于
      The throughput display needs a delay period before accounting and
      displaying anything.  Yet it might be called after some amount of data
      has already been transferred.  The display of total data is therefore
      accounted late and therefore smaller than the reality.
      
      Let's call display_throughput() with an absolute amount of transferred
      data instead of a relative number, and let the throughput code find the
      relative amount of data by itself as needed.  This way the displayed
      total is always exact.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      218558af
  14. 02 11月, 2007 2 次提交
    • N
      Show total transferred as part of throughput progress · 81f6654a
      Nicolas Pitre 提交于
      Right now it is infeasible to offer to the user a reasonable concept
      of when a clone will be complete as we aren't able to come up with
      the final pack size until after we have actually transferred the
      entire thing to the client.  However in many cases users can work
      with a rough rule-of-thumb; for example it is somewhat well known
      that git.git is about 16 MiB today and that linux-2.6.git is over
      120 MiB.
      
      We now show the total amount of data we have transferred over
      the network as part of the throughput meter, organizing it in
      "human friendly" terms like `ls -h` would do.  Users can glance at
      this, see that the total transferred size is about 3 MiB, see the
      throughput of X KiB/sec, and determine a reasonable figure of about
      when the clone will be complete, assuming they know the rough size
      of the source repository or are able to obtain it.
      
      This is also a helpful indicator that there is progress being made
      even if we stall on a very large object.  The thoughput meter may
      remain relatively constant and the percentage complete and object
      count won't be changing, but the total transferred will be increasing
      as additional data is received for this object.
      
      [from an initial proposal from Shawn O. Pearce]
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      81f6654a
    • N
      make sure throughput display gets updated even if progress doesn't move · 3e935d19
      Nicolas Pitre 提交于
      Currently the progress/throughput display update happens only through
      display_progress().  If the progress based on object count remains
      unchanged because a large object is being received, the latest throughput
      won't be displayed.  The display update should occur through
      display_throughput() as well.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3e935d19
  15. 31 10月, 2007 3 次提交
  16. 17 10月, 2007 1 次提交
  17. 24 5月, 2007 1 次提交
  18. 23 4月, 2007 3 次提交