1. 14 2月, 2018 31 次提交
    • J
      Merge branch 'tz/doc-show-defaults-to-head' · 8195303c
      Junio C Hamano 提交于
      Doc update.
      
      * tz/doc-show-defaults-to-head:
        doc: mention 'git show' defaults to HEAD
      8195303c
    • J
      Merge branch 'ew/svn-branch-segfault-fix' · 9cd5320d
      Junio C Hamano 提交于
      Workaround for segfault with more recent versions of SVN.
      
      * ew/svn-branch-segfault-fix:
        git-svn: control destruction order to avoid segfault
      9cd5320d
    • J
      Merge branch 'sg/travis-linux32-sanity' · 798224a1
      Junio C Hamano 提交于
      Travis updates.
      
      * sg/travis-linux32-sanity:
        travis-ci: don't fail if user already exists on 32 bit Linux build job
        travis-ci: don't run the test suite as root in the 32 bit Linux build
        travis-ci: don't repeat the path of the cache directory
        travis-ci: use 'set -e' in the 32 bit Linux build job
        travis-ci: use 'set -x' for the commands under 'su' in the 32 bit Linux build
      798224a1
    • J
      Merge branch 'nd/list-merge-strategy' · 8df7f755
      Junio C Hamano 提交于
      Completion of "git merge -s<strategy>" (in contrib/) did not work
      well in non-C locale.
      
      * nd/list-merge-strategy:
        completion: fix completing merge strategies on non-C locales
      8df7f755
    • J
      Merge branch 'jt/long-running-process-doc' · 417c04c5
      Junio C Hamano 提交于
      Doc updates.
      
      * jt/long-running-process-doc:
        Docs: split out long-running subprocess handshake
      417c04c5
    • J
      Merge branch 'jk/daemon-fixes' · 1772ad11
      Junio C Hamano 提交于
      Assorted fixes to "git daemon".
      
      * jk/daemon-fixes:
        daemon: fix length computation in newline stripping
        t/lib-git-daemon: add network-protocol helpers
        daemon: handle NULs in extended attribute string
        daemon: fix off-by-one in logging extended attributes
        t/lib-git-daemon: record daemon log
        t5570: use ls-remote instead of clone for interp tests
      1772ad11
    • J
      Merge branch 'pw/sequencer-in-process-commit' · 0f57f731
      Junio C Hamano 提交于
      The sequencer infrastructure is shared across "git cherry-pick",
      "git rebase -i", etc., and has always spawned "git commit" when it
      needs to create a commit.  It has been taught to do so internally,
      when able, by reusing the codepath "git commit" itself uses, which
      gives performance boost for a few tens of percents in some sample
      scenarios.
      
      * pw/sequencer-in-process-commit:
        sequencer: run 'prepare-commit-msg' hook
        t7505: add tests for cherry-pick and rebase -i/-p
        t7505: style fixes
        sequencer: assign only free()able strings to gpg_sign
        sequencer: improve config handling
        t3512/t3513: remove KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
        sequencer: try to commit without forking 'git commit'
        sequencer: load commit related config
        sequencer: simplify adding Signed-off-by: trailer
        commit: move print_commit_summary() to libgit
        commit: move post-rewrite code to libgit
        Add a function to update HEAD after creating a commit
        commit: move empty message checks to libgit
        t3404: check intermediate squash messages
      0f57f731
    • J
      Merge branch 'nd/shared-index-fix' · dd0c256b
      Junio C Hamano 提交于
      Code clean-up.
      
      * nd/shared-index-fix:
        read-cache: don't write index twice if we can't write shared index
        read-cache.c: move tempfile creation/cleanup out of write_shared_index
        read-cache.c: change type of "temp" in write_shared_index()
      dd0c256b
    • J
      Merge branch 'po/http-push-error-message' · 39a1dd80
      Junio C Hamano 提交于
      Debugging aid.
      
      * po/http-push-error-message:
        http-push: improve error log
      39a1dd80
    • J
      Merge branch 'po/clang-format-functype-weight' · 0c13c4f1
      Junio C Hamano 提交于
      Prevent "clang-format" from breaking line after function return type.
      
      * po/clang-format-functype-weight:
        clang-format: adjust penalty for return type line break
      0c13c4f1
    • J
      Merge branch 'jc/mailinfo-cleanup-fix' · 46e915c4
      Junio C Hamano 提交于
      Corner case bugfix.
      
      * jc/mailinfo-cleanup-fix:
        mailinfo: avoid segfault when can't open files
      46e915c4
    • J
      Merge branch 'sg/cocci-move-array' · cbf0240f
      Junio C Hamano 提交于
      Code clean-up.
      
      * sg/cocci-move-array:
        Use MOVE_ARRAY
      cbf0240f
    • J
      Merge branch 'tg/split-index-fixes' · e75c8621
      Junio C Hamano 提交于
      The split-index mode had a few corner case bugs fixed.
      
      * tg/split-index-fixes:
        travis: run tests with GIT_TEST_SPLIT_INDEX
        split-index: don't write cache tree with null oid entries
        read-cache: fix reading the shared index for other repos
      e75c8621
    • J
      Merge branch 'rs/strbuf-cocci-workaround' · 73df1b34
      Junio C Hamano 提交于
      Update Coccinelle rules to catch and optimize strbuf_addf(&buf, "%s", str)
      
      * rs/strbuf-cocci-workaround:
        cocci: use format keyword instead of a literal string
      73df1b34
    • J
      Merge branch 'mr/packed-ref-store-fix' · 2b72ea0a
      Junio C Hamano 提交于
      Crash fix for a corner case where an error codepath tried to unlock
      what it did not acquire lock on.
      
      * mr/packed-ref-store-fix:
        files_initial_transaction_commit(): only unlock if locked
      2b72ea0a
    • J
      Merge branch 'jt/http-redact-cookies' · 53274637
      Junio C Hamano 提交于
      The http tracing code, often used to debug connection issues,
      learned to redact potentially sensitive information from its output
      so that it can be more safely sharable.
      
      * jt/http-redact-cookies:
        http: support omitting data from traces
        http: support cookie redaction when tracing
      53274637
    • J
      Merge branch 'ds/use-get-be64' · 2dc69eef
      Junio C Hamano 提交于
      Code clean-up.
      
      * ds/use-get-be64:
        packfile: use get_be64() for large offsets
      2dc69eef
    • J
      Merge branch 'cc/sha1-file-name' · 92389416
      Junio C Hamano 提交于
      Code clean-up.
      
      * cc/sha1-file-name:
        sha1_file: improve sha1_file_name() perfs
        sha1_file: remove static strbuf from sha1_file_name()
      92389416
    • J
      Merge branch 'nd/trace-with-env' · 3efeec3a
      Junio C Hamano 提交于
      The tracing machinery learned to report tweaking of environment
      variables as well.
      
      * nd/trace-with-env:
        run-command.c: print new cwd in trace_run_command()
        run-command.c: print env vars in trace_run_command()
        run-command.c: print program 'git' when tracing git_cmd mode
        run-command.c: introduce trace_run_command()
        trace.c: move strbuf_release() out of print_trace_line()
        trace: avoid unnecessary quoting
        sq_quote_argv: drop maxlen parameter
      3efeec3a
    • J
      Merge branch 'pc/submodule-helper' · ead8dbe2
      Junio C Hamano 提交于
      Rewrite two more "git submodule" subcommands in C.
      
      * pc/submodule-helper:
        submodule: port submodule subcommand 'deinit' from shell to C
        submodule: port submodule subcommand 'sync' from shell to C
      ead8dbe2
    • J
      Merge branch 'rb/hashmap-h-compilation-fix' · 922ffec6
      Junio C Hamano 提交于
      Code clean-up.
      
      * rb/hashmap-h-compilation-fix:
        hashmap.h: remove unused variable
      922ffec6
    • J
      Merge branch 'nd/diff-flush-before-warning' · 17c8e0b3
      Junio C Hamano 提交于
      Avoid showing a warning message in the middle of a line of "git
      diff" output.
      
      * nd/diff-flush-before-warning:
        diff.c: flush stdout before printing rename warnings
      17c8e0b3
    • J
      Merge branch 'tb/crlf-conv-flags' · 9bc89b17
      Junio C Hamano 提交于
      Code clean-up.
      
      * tb/crlf-conv-flags:
        convert_to_git(): safe_crlf/checksafe becomes int conv_flags
      9bc89b17
    • J
      Merge branch 'rs/describe-unique-abbrev' · 8fe806bc
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/describe-unique-abbrev:
        describe: use strbuf_add_unique_abbrev() for adding short hashes
      8fe806bc
    • J
      Merge branch 'ks/submodule-doc-updates' · ab5a940d
      Junio C Hamano 提交于
      Doc updates.
      
      * ks/submodule-doc-updates:
        Doc/git-submodule: improve readability and grammar of a sentence
        Doc/gitsubmodules: make some changes to improve readability and syntax
      ab5a940d
    • J
      Merge branch 'cl/t9001-cleanup' · f5536f1c
      Junio C Hamano 提交于
      Test clean-up.
      
      * cl/t9001-cleanup:
        t9001: use existing helper in send-email test
      f5536f1c
    • J
      Merge branch 'gs/retire-mru' · 86762239
      Junio C Hamano 提交于
      Retire mru API as it does not give enough abstraction over
      underlying list API to be worth it.
      
      * gs/retire-mru:
        mru: Replace mru.[ch] with list.h implementation
      86762239
    • J
      Merge branch 'ot/mru-on-list' · afc8aa3f
      Junio C Hamano 提交于
      The first step to getting rid of mru API and using the
      doubly-linked list API directly instead.
      
      * ot/mru-on-list:
        mru: use double-linked list from list.h
      afc8aa3f
    • J
      Merge branch 'jh/partial-clone' · 6bed209a
      Junio C Hamano 提交于
      The machinery to clone & fetch, which in turn involves packing and
      unpacking objects, have been told how to omit certain objects using
      the filtering mechanism introduced by the jh/object-filtering
      topic, and also mark the resulting pack as a promisor pack to
      tolerate missing objects, taking advantage of the mechanism
      introduced by the jh/fsck-promisors topic.
      
      * jh/partial-clone:
        t5616: test bulk prefetch after partial fetch
        fetch: inherit filter-spec from partial clone
        t5616: end-to-end tests for partial clone
        fetch-pack: restore save_commit_buffer after use
        unpack-trees: batch fetching of missing blobs
        clone: partial clone
        partial-clone: define partial clone settings in config
        fetch: support filters
        fetch: refactor calculation of remote list
        fetch-pack: test support excluding large blobs
        fetch-pack: add --no-filter
        fetch-pack, index-pack, transport: partial clone
        upload-pack: add object filtering for partial clone
      6bed209a
    • J
      Merge branch 'jh/fsck-promisors' · f3d618d2
      Junio C Hamano 提交于
      In preparation for implementing narrow/partial clone, the machinery
      for checking object connectivity used by gc and fsck has been
      taught that a missing object is OK when it is referenced by a
      packfile specially marked as coming from trusted repository that
      promises to make them available on-demand and lazily.
      
      * jh/fsck-promisors:
        gc: do not repack promisor packfiles
        rev-list: support termination at promisor objects
        sha1_file: support lazily fetching missing objects
        introduce fetch-object: fetch one promisor object
        index-pack: refactor writing of .keep files
        fsck: support promisor objects as CLI argument
        fsck: support referenced promisor objects
        fsck: support refs pointing to promisor objects
        fsck: introduce partialclone extension
        extension.partialclone: introduce partial clone extension
      f3d618d2
    • J
      Merge branch 'ab/simplify-perl-makefile' · ed1b87ef
      Junio C Hamano 提交于
      The build procedure for perl/ part has been greatly simplified by
      weaning ourselves off of MakeMaker.
      
      * ab/simplify-perl-makefile:
        perl: treat PERLLIB_EXTRA as an extra path again
        perl: avoid *.pmc and fix Error.pm further
        Makefile: replace perl/Makefile.PL with simple make rules
      ed1b87ef
  2. 31 1月, 2018 7 次提交
    • S
      travis-ci: don't fail if user already exists on 32 bit Linux build job · 6b995760
      SZEDER Gábor 提交于
      The 32 bit Linux build job runs in a Docker container, which lends
      itself to running and debugging locally, too.  Especially during
      debugging one usually doesn't want to start with a fresh container
      every time, to save time spent on installing a bunch of dependencies.
      However, that doesn't work quite smootly, because the script running
      in the container always creates a new user, which then must be removed
      every time before subsequent executions, or the build script fails.
      
      Make this process more convenient and don't try to create that user if
      it already exists and has the right user ID in the container, so
      developers don't have to bother with running a 'userdel' each time
      before they run the build script.
      
      The build job on Travis CI always starts with a fresh Docker
      container, so this change doesn't make a difference there.
      Signed-off-by: NSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6b995760
    • S
      travis-ci: don't run the test suite as root in the 32 bit Linux build · 53303302
      SZEDER Gábor 提交于
      Travis CI runs the 32 bit Linux build job in a Docker container, where
      all commands are executed as root by default.  Therefore, ever since
      we added this build job in 88dedd5e (Travis: also test on 32-bit
      Linux, 2017-03-05), we have a bit of code to create a user in the
      container matching the ID of the host user and then to run the test
      suite as this user.  Matching the host user ID is important, because
      otherwise the host user would have no access to any files written by
      processes running in the container, notably the logs of failed tests
      couldn't be included in the build job's trace log.
      
      Alas, this piece of code never worked, because it sets the variable
      holding the user name ($CI_USER) in a subshell, meaning it doesn't
      have any effect by the time we get to the point to actually use the
      variable to switch users with 'su'.  So all this time we were running
      the test suite as root.
      
      Reorganize that piece of code in 'ci/run-linux32-build.sh' a bit to
      avoid that problematic subshell and to ensure that we switch to the
      right user.  Furthermore, make the script's optional host user ID
      option mandatory, so running the build accidentally as root will
      become harder when debugging locally.  If someone really wants to run
      the test suite as root, whatever the reasons might be, it'll still be
      possible to do so by explicitly passing '0' as host user ID.
      
      Finally, one last catch: since commit 7e72cfce (travis-ci: save prove
      state for the 32 bit Linux build, 2017-12-27) the 'prove' test harness
      has been writing its state to the Travis CI cache directory from
      within the Docker container while running as root.  After this patch
      'prove' will run as a regular user, so in future build jobs it won't
      be able overwrite a previously written, still root-owned state file,
      resulting in build job failures.  To resolve this we should manually
      delete caches containing such root-owned files, but that would be a
      hassle.  Instead, work this around by changing the owner of the whole
      contents of the cache directory to the host user ID.
      Signed-off-by: NSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53303302
    • S
      travis-ci: don't repeat the path of the cache directory · b2cbaa09
      SZEDER Gábor 提交于
      Some of our 'ci/*' scripts repeat the name or full path of the Travis
      CI cache directory, and the following patches will add new places
      using that path.
      
      Use a variable to refer to the path of the cache directory instead, so
      it's hard-coded only in a single place.
      
      Pay extra attention to the 32 bit Linux build: it runs in a Docker
      container, so pass the path of the cache directory from the host to
      the container in an environment variable.  Note that an environment
      variable passed this way is exported inside the container, therefore
      its value is directly available in the 'su' snippet even though that
      snippet is single quoted.  Furthermore, use the variable in the
      container only if it's been assigned a non-empty value, to prevent
      errors when someone is running or debugging the Docker build locally,
      because in that case the variable won't be set as there won't be any
      Travis CI cache.
      Signed-off-by: NSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b2cbaa09
    • S
      travis-ci: use 'set -e' in the 32 bit Linux build job · 04d47e96
      SZEDER Gábor 提交于
      The script 'ci/run-linux32-build.sh' running inside the Docker
      container of the 32 bit Linux build job uses an && chain to break the
      build if one of the commands fails.  This is problematic for two
      reasons:
      
        - The && chain is broken, because there is this in the middle:
      
          test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) &&
      
          Luckily it is broken in a way that it didn't lead to false
          successes.  If installing dependencies fails, then the rest of the
          first && chain is skipped and execution resumes  after the ||
          operator.  At that point $HOST_UID is still unset, causing
          'useradd' to error out with "invalid user ID 'ci'", which in turn
          causes the second && chain to abort the script and thus break the
          build.
      
        - All other 'ci/*' scripts use 'set -e' to break the build if one of
          the commands fails.  This inconsistency among these scripts is
          asking for trouble: I forgot about the && chain more than once
          while working on this patch series.
      
      Enable 'set -e' for the whole script and for the commands executed
      under 'su' as well.
      
      While touching every line in the 'su' command block anyway, change
      their indentation to use a tab instead of spaces.
      Signed-off-by: NSZEDER Gábor <szeder.dev@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      04d47e96
    • S
    • E
      git-svn: control destruction order to avoid segfault · 7f6f75e9
      Eric Wong 提交于
      It seems necessary to control destruction ordering to avoid a
      segfault with SVN 1.9.5 when using "git svn branch".  I've also
      reported the problem against libsvn-perl to Debian [Bug #888791],
      but releasing the SVN::Client instance can be beneficial anyways to
      save memory.
      
      ref: https://bugs.debian.org/888791Tested-by: NTodd Zullinger <tmz@pobox.com>
      Reported-by: Nbrian m. carlson <sandals@crustytoothpaste.net>
      Signed-off-by: NEric Wong <e@80x24.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7f6f75e9
    • T
      doc: mention 'git show' defaults to HEAD · 9f5258cb
      Todd Zullinger 提交于
      When 'git show' is called without any object it defaults to HEAD.  This
      has been true since d4ed9793 ("Simplify common default options setup
      for built-in log family.", 2006-04-16).
      
      The SYNOPSIS suggests that the object argument is required.  Clarify
      that it is not required and note the default.
      Signed-off-by: NTodd Zullinger <tmz@pobox.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9f5258cb
  3. 27 1月, 2018 1 次提交
  4. 26 1月, 2018 1 次提交
    • J
      daemon: fix length computation in newline stripping · ed15e58e
      Jeff King 提交于
      When git-daemon gets a pktline request, we strip off any
      trailing newline, replacing it with a NUL. Clients prior to
      5ad312be (in git v1.4.0) would send:
      
        git-upload-pack repo.git\n
      
      and we need to strip it off to understand their request.
      After 5ad312be, we send the host attribute but no newline,
      like:
      
        git-upload-pack repo.git\0host=example.com\0
      
      Both of these are parsed correctly by git-daemon. But if
      some client were to combine the two:
      
        git-upload-pack repo.git\n\0host=example.com\0
      
      we don't parse it correctly. The problem is that we use the
      "len" variable to record the position of the NUL separator,
      but then decrement it when we strip the newline. So we start
      with:
      
        git-upload-pack repo.git\n\0host=example.com\0
                                   ^-- len
      
      and end up with:
      
        git-upload-pack repo.git\0\0host=example.com\0
                                 ^-- len
      
      This is arguably correct, since "len" tells us the length of
      the initial string, but we don't actually use it for that.
      What we do use it for is finding the offset of the extended
      attributes; they used to be at len+1, but are now at len+2.
      
      We can solve that by just leaving "len" where it is. We
      don't have to care about the length of the shortened string,
      since we just treat it like a C string.
      
      No version of Git ever produced such a string, but it seems
      like the daemon code meant to handle this case (and it seems
      like a reasonable thing for somebody to do in a 3rd-party
      implementation).
      Reported-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ed15e58e