1. 14 Jul, 2014 6 commits
    • Karsten Blees's avatar
      trace: add current timestamp to all trace output · b72be02c
      Karsten Blees authored
      This is useful to tell apart trace output of separate test runs.
      
      It can also be used for basic, coarse-grained performance analysis. Note
      that the accuracy is tainted by writing to the trace file, and you have to
      calculate the deltas yourself (which is next to impossible if multiple
      threads or processes are involved).
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      b72be02c
    • Karsten Blees's avatar
      trace: disable additional trace output for unit tests · 124647c4
      Karsten Blees authored
      Some unit-tests use trace output to verify internal state, and unstable
      output such as timestamps and line numbers are not useful there.
      
      Disable additional trace output if GIT_TRACE_BARE is set.
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      124647c4
    • Karsten Blees's avatar
      trace: add infrastructure to augment trace output with additional info · c69dfd24
      Karsten Blees authored
      To be able to add a common prefix or suffix to all trace output (e.g.
      a timestamp or file:line of the caller), factor out common setup and
      cleanup tasks of the trace* functions.
      
      When adding a common prefix, it makes sense that the output of each trace
      call starts on a new line. Add '\n' in case the caller forgot.
      
      Note that this explicitly limits trace output to line-by-line, it is no
      longer possible to trace-print just part of a line. Until now, this was
      just an implicit assumption (trace-printing part of a line worked, but
      messed up the trace file if multiple threads or processes were involved).
      
      Thread-safety / inter-process-safety is also the reason why we need to do
      the prefixing and suffixing in memory rather than issuing multiple write()
      calls. Write_or_whine_pipe() / xwrite() is atomic unless the size exceeds
      MAX_IO_SIZE (8MB, see wrapper.c). In case of trace_strbuf, this costs an
      additional string copy (which should be irrelevant for performance in light
      of actual file IO).
      
      While we're at it, rename trace_strbuf's 'buf' argument, which suggests
      that the function is modifying the buffer. Trace_strbuf() currently is the
      only trace API that can print arbitrary binary data (without barfing on
      '%' or stopping at '\0'), so 'data' seems more appropriate.
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      c69dfd24
    • Karsten Blees's avatar
      sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API · 67dc598e
      Karsten Blees authored
      This changes GIT_TRACE_PACK_ACCESS functionality as follows:
       * supports the same options as GIT_TRACE (e.g. printing to stderr)
       * no longer supports relative paths
       * appends to the trace file rather than overwriting
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      67dc598e
    • Karsten Blees's avatar
      Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables · eb9250df
      Karsten Blees authored
      Separate GIT_TRACE description into what it prints and how to configure
      where trace output is printed to. Change other GIT_TRACE_* descriptions to
      refer to GIT_TRACE.
      
      Add descriptions for GIT_TRACE_SETUP and GIT_TRACE_SHALLOW.
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      eb9250df
    • Karsten Blees's avatar
      trace: improve trace performance · 6aa30857
      Karsten Blees authored
      The trace API currently rechecks the environment variable and reopens the
      trace file on every API call. This has the ugly side effect that errors
      (e.g. file cannot be opened, or the user specified a relative path) are
      also reported on every call. Performance can be improved by about factor
      three by remembering the environment state and keeping the file open.
      
      Replace the 'const char *key' parameter in the API with a pointer to a
      'struct trace_key' that bundles the environment variable name with
      additional, trace-internal state. Change the call sites of these APIs to
      use a static 'struct trace_key' instead of a string constant.
      
      In trace.c::get_trace_fd(), save and reuse the file descriptor in 'struct
      trace_key'.
      
      Add a 'trace_disable()' API, so that packet_trace() can cleanly disable
      tracing when it encounters packed data (instead of using unsetenv()).
      Signed-off-by: default avatarKarsten Blees <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      6aa30857
  2. 17 Jun, 2014 3 commits
  3. 16 Jun, 2014 31 commits
    • Junio C Hamano's avatar
      Third batch for 2.1 · cb682f8c
      Junio C Hamano authored
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      cb682f8c
    • Junio C Hamano's avatar
      Merge branch 'ib/test-selectively-run' · 7e1a5381
      Junio C Hamano authored
      Allow specifying only certain individual test pieces to be run
      using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'").
      
      * ib/test-selectively-run:
        t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests
        test-lib: '--run' to run only specific tests
        test-lib: tests skipped by GIT_SKIP_TESTS say so
        test-lib: document short options in t/README
      7e1a5381
    • Junio C Hamano's avatar
      Merge branch 'ta/string-list-init' · c6d3abbf
      Junio C Hamano authored
      * ta/string-list-init:
        string-list: spell all values out that are given to a string_list initializer
      c6d3abbf
    • Junio C Hamano's avatar
      Merge branch 'jm/dedup-test-config' · bbfa0cc7
      Junio C Hamano authored
      * jm/dedup-test-config:
        t/t7810-grep.sh: remove duplicate test_config()
      bbfa0cc7
    • Junio C Hamano's avatar
      Merge branch 'dt/refs-check-refname-component-optim' · ae7dd1a4
      Junio C Hamano authored
      * dt/refs-check-refname-component-optim:
        refs.c: optimize check_refname_component()
      ae7dd1a4
    • Junio C Hamano's avatar
      Merge branch 'sk/test-cmp-bin' · c651ccc9
      Junio C Hamano authored
      * sk/test-cmp-bin:
        t5000, t5003: do not use test_cmp to compare binary files
      c651ccc9
    • Junio C Hamano's avatar
      Merge branch 'sh/enable-preloadindex' · 96b29bde
      Junio C Hamano authored
      * sh/enable-preloadindex:
        environment.c: enable core.preloadindex by default
      96b29bde
    • Junio C Hamano's avatar
      Merge branch 'rs/read-ref-at' · bb0ced75
      Junio C Hamano authored
      * rs/read-ref-at:
        refs.c: change read_ref_at to use the reflog iterators
      bb0ced75
    • Junio C Hamano's avatar
      Merge branch 'jk/error-resolve-conflict-advice' · d0d5ba7e
      Junio C Hamano authored
      * jk/error-resolve-conflict-advice:
        error_resolve_conflict: drop quotations around operation
        error_resolve_conflict: rewrap advice message
      d0d5ba7e
    • Junio C Hamano's avatar
      Merge branch 'rs/pack-objects-no-unnecessary-realloc' · 57a2eee9
      Junio C Hamano authored
      Avoid unnecessary copy of previous contents when extending the
      hashtable used in pack-objects.
      
      * rs/pack-objects-no-unnecessary-realloc:
        pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
      57a2eee9
    • Junio C Hamano's avatar
      Merge branch 'lt/log-auto-decorate' · 3009afd5
      Junio C Hamano authored
      * lt/log-auto-decorate:
        git log: support "auto" decorations
      3009afd5
    • Junio C Hamano's avatar
      Merge branch 'jm/doc-wording-tweaks' · 668668ad
      Junio C Hamano authored
      * jm/doc-wording-tweaks:
        Documentation: wording fixes in the user manual and glossary
      668668ad
    • Junio C Hamano's avatar
      Merge branch 'jm/format-patch-mail-sig' · f18871dc
      Junio C Hamano authored
      * jm/format-patch-mail-sig:
        format-patch: add "--signature-file=<file>" option
        format-patch: make newline after signature conditional
      f18871dc
    • Junio C Hamano's avatar
      Merge branch 'jk/http-errors' · 2075a0c2
      Junio C Hamano authored
      Propagate the error messages from the webserver better to the
      client coming over the HTTP transport.
      
      * jk/http-errors:
        http: default text charset to iso-8859-1
        remote-curl: reencode http error messages
        strbuf: add strbuf_reencode helper
        http: optionally extract charset parameter from content-type
        http: extract type/subtype portion of content-type
        t5550: test display of remote http error messages
        t/lib-httpd: use write_script to copy CGI scripts
        test-lib: preserve GIT_CURL_VERBOSE from the environment
      2075a0c2
    • Junio C Hamano's avatar
      Merge branch 'ow/config-mailmap-pathname' · c37d3269
      Junio C Hamano authored
      mailmap.file configuration names a pathname, hence should honor
      ~/path and ~user/path as its value.
      
      * ow/config-mailmap-pathname:
        config: respect '~' and '~user' in mailmap.file
      c37d3269
    • Junio C Hamano's avatar
      Merge branch 'fc/remote-helper-refmap' · c9fc3a6a
      Junio C Hamano authored
      Allow remote-helper/fast-import based transport to rename the refs
      while transferring the history.
      
      * fc/remote-helper-refmap:
        transport-helper: remove unnecessary strbuf resets
        transport-helper: add support to delete branches
        fast-export: add support to delete refs
        fast-import: add support to delete refs
        transport-helper: add support to push symbolic refs
        transport-helper: add support for old:new refspec
        fast-export: add new --refspec option
        fast-export: improve argument parsing
      c9fc3a6a
    • Junio C Hamano's avatar
      Merge branch 'nd/daemonize-gc' · 1a81f6ce
      Junio C Hamano authored
      "git gc --auto" was recently changed to run in the background to
      give control back early to the end-user sitting in front of the
      terminal, but it forgot that housekeeping involving reflogs should
      be done without other processes competing for accesses to the refs.
      
      * nd/daemonize-gc:
        gc --auto: do not lock refs in the background
      1a81f6ce
    • Junio C Hamano's avatar
      Merge branch 'jm/t9138-style-fix' · 8dbd3133
      Junio C Hamano authored
      * jm/t9138-style-fix:
        t9138-git-svn-authors-prog.sh fixups
      8dbd3133
    • Junio C Hamano's avatar
      Merge branch 'jm/instaweb-apache-24' · bf2941be
      Junio C Hamano authored
      * jm/instaweb-apache-24:
        git-instaweb: add support for Apache 2.4
      bf2941be
    • Junio C Hamano's avatar
      Merge branch 'jl/remote-rm-prune' · 474df928
      Junio C Hamano authored
      "git remote rm" and "git remote prune" can involve removing many
      refs at once, which is not a very efficient thing to do when very
      many refs exist in the packed-refs file.
      
      * jl/remote-rm-prune:
        remote prune: optimize "dangling symref" check/warning
        remote: repack packed-refs once when deleting multiple refs
        remote rm: delete remote configuration as the last
      474df928
    • Junio C Hamano's avatar
      Merge branch 'jk/complete-merge-pull' · 5cf2c571
      Junio C Hamano authored
      The completion code did not know about quite a few options that are
      common between "git merge" and "git pull", and a couple of options
      unique to "git merge".
      
      * jk/complete-merge-pull:
        completion: add missing options for git-merge
        completion: add a note that merge options are shared
      5cf2c571
    • Junio C Hamano's avatar
      Merge branch 'bg/xcalloc-nmemb-then-size' · a634a6d2
      Junio C Hamano authored
      Like calloc(3), xcalloc() takes nmemb and then size.
      
      * bg/xcalloc-nmemb-then-size:
        transport-helper.c: rearrange xcalloc arguments
        remote.c: rearrange xcalloc arguments
        reflog-walk.c: rearrange xcalloc arguments
        pack-revindex.c: rearrange xcalloc arguments
        notes.c: rearrange xcalloc arguments
        imap-send.c: rearrange xcalloc arguments
        http-push.c: rearrange xcalloc arguments
        diff.c: rearrange xcalloc arguments
        config.c: rearrange xcalloc arguments
        commit.c: rearrange xcalloc arguments
        builtin/remote.c: rearrange xcalloc arguments
        builtin/ls-remote.c: rearrange xcalloc arguments
      a634a6d2
    • Junio C Hamano's avatar
      Merge branch 'jl/status-added-submodule-is-never-ignored' · 6d681f0a
      Junio C Hamano authored
      submodule.*.ignore and diff.ignoresubmodules are used to ignore all
      submodule changes in "diff" output, but it can be confusing to
      apply these configuration values to status and commit.
      
      This is a backward-incompatible change, but should be so in a good
      way (aka bugfix).
      
      * jl/status-added-submodule-is-never-ignored:
        commit -m: commit staged submodules regardless of ignore config
        status/commit: show staged submodules regardless of ignore config
      6d681f0a
    • Junio C Hamano's avatar
      Merge branch 'cb/byte-order' · 83a4904f
      Junio C Hamano authored
      Compatibility enhancement for Solaris.
      
      * cb/byte-order:
        compat/bswap.h: fix endianness detection
        compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN
        compat/bswap.h: detect endianness on more platforms that don't use BYTE_ORDER
      83a4904f
    • Junio C Hamano's avatar
      Merge branch 'jk/strbuf-tolower' · b4bba8de
      Junio C Hamano authored
      * jk/strbuf-tolower:
        strbuf: add strbuf_tolower function
      b4bba8de
    • Junio C Hamano's avatar
      Merge branch 'jk/daemon-tolower' · b4516df9
      Junio C Hamano authored
      * jk/daemon-tolower:
        daemon/config: factor out duplicate xstrdup_tolower
      b4516df9
    • Junio C Hamano's avatar
      Merge branch 'as/pretty-truncate' · 09e13ad5
      Junio C Hamano authored
      * as/pretty-truncate:
        pretty.c: format string with truncate respects logOutputEncoding
        t4205, t6006: add tests that fail with i18n.logOutputEncoding set
        t4205 (log-pretty-format): use `tformat` rather than `format`
        t4041, t4205, t6006, t7102: don't hardcode tested encoding value
        t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
      09e13ad5
    • Junio C Hamano's avatar
      Merge branch 'jk/diff-follow-must-take-one-pathspec' · b0e2c999
      Junio C Hamano authored
      * jk/diff-follow-must-take-one-pathspec:
        move "--follow needs one pathspec" rule to diff_setup_done
      b0e2c999
    • Junio C Hamano's avatar
      Merge branch 'sk/windows-unc-path' · b8316364
      Junio C Hamano authored
      * sk/windows-unc-path:
        Windows: allow using UNC path for git repository
      b8316364
    • Junio C Hamano's avatar
      Merge branch 'rr/rebase-autostash-fix' · 4a43d4f9
      Junio C Hamano authored
      * rr/rebase-autostash-fix:
        rebase -i: test "Nothing to do" case with autostash
        rebase -i: handle "Nothing to do" case with autostash
      4a43d4f9
    • Junio C Hamano's avatar
      Merge branch 'jk/report-fail-to-read-objects-better' · 9d1d882e
      Junio C Hamano authored
      * jk/report-fail-to-read-objects-better:
        open_sha1_file: report "most interesting" errno
      9d1d882e