1. 05 6月, 2017 12 次提交
    • J
      Merge branch 'jn/credential-doc-on-clear' into maint · 9a73c958
      Junio C Hamano 提交于
      Doc update.
      
      * jn/credential-doc-on-clear:
        credential doc: make multiple-helper behavior more prominent
      9a73c958
    • J
      Merge branch 'jk/url-insteadof-config' into maint · 7dab7c5b
      Junio C Hamano 提交于
      The interaction of "url.*.insteadOf" and custom URL scheme's
      whitelisting is now documented better.
      
      * jk/url-insteadof-config:
        docs/config: mention protocol implications of url.insteadOf
      7dab7c5b
    • J
      Merge branch 'jk/unbreak-am-h' into maint · f72e075e
      Junio C Hamano 提交于
      "git am -h" triggered a BUG().
      
      * jk/unbreak-am-h:
        am: handle "-h" argument earlier
      f72e075e
    • J
      Merge branch 'ab/sha1dc-maint' into maint · d0506fc4
      Junio C Hamano 提交于
      The "collision detecting" SHA-1 implementation shipped with 2.13
      was quite broken on some big-endian platforms and/or platforms that
      do not like unaligned fetches.  Update to the upstream code which
      has already fixed these issues.
      
      * ab/sha1dc-maint:
        sha1dc: update from upstream
      d0506fc4
    • J
      Merge branch 'js/bs-is-a-dir-sep-on-windows' into maint · e6f80aee
      Junio C Hamano 提交于
      "foo\bar\baz" in "git fetch foo\bar\baz", even though there is no
      slashes in it, cannot be a nickname for a remote on Windows, as
      that is likely to be a pathname on a local filesystem.
      
      * js/bs-is-a-dir-sep-on-windows:
        Windows: do not treat a path with backslashes as a remote's nick name
        mingw.h: permit arguments with side effects for is_dir_sep
      e6f80aee
    • J
      Merge branch 'jk/alternate-ref-optim' into maint · a07148db
      Junio C Hamano 提交于
      A test allowed both "git push" and "git receive-pack" on the other
      end write their traces into the same file.  This is OK on platforms
      that allows atomically appending to a file opened with O_APPEND,
      but on other platforms led to a mangled output, causing
      intermittent test failures.  This has been fixed by disabling
      traces from "receive-pack" in the test.
      
      * jk/alternate-ref-optim:
        t5400: avoid concurrent writes into a trace file
      a07148db
    • J
      Merge branch 'bm/interpret-trailers-cut-line-is-eom' into maint · 00c0e40f
      Junio C Hamano 提交于
      "git interpret-trailers", when used as GIT_EDITOR for "git commit
      -v", looked for and appended to a trailer block at the very end,
      i.e. at the end of the "diff" output.  The command has been
      corrected to pay attention to the cut-mark line "commit -v" adds to
      the buffer---the real trailer block should appear just before it.
      
      * bm/interpret-trailers-cut-line-is-eom:
        interpret-trailers: honor the cut line
      00c0e40f
    • J
      Merge branch 'kn/ref-filter-branch-list' into maint · fd8567c9
      Junio C Hamano 提交于
      "git for-each-ref --format=..." with %(HEAD) in the format used to
      resolve the HEAD symref as many times as it had processed refs,
      which was wasteful, and "git branch" shared the same problem.
      
      * kn/ref-filter-branch-list:
        ref-filter: resolve HEAD when parsing %(HEAD) atom
      fd8567c9
    • J
      Merge branch 'rs/checkout-am-fix-unborn' into maint · a207ad70
      Junio C Hamano 提交于
      A few codepaths in "checkout" and "am" working on an unborn branch
      tried to access an uninitialized piece of memory.
      
      * rs/checkout-am-fix-unborn:
        am: check return value of resolve_refdup before using hash
        checkout: check return value of resolve_refdup before using hash
      a207ad70
    • J
      Merge branch 'jn/clone-add-empty-config-from-command-line' into maint · c8c33216
      Junio C Hamano 提交于
      "git clone --config var=val" is a way to populate the
      per-repository configuration file of the new repository, but it did
      not work well when val is an empty string.  This has been fixed.
      
      * jn/clone-add-empty-config-from-command-line:
        clone: handle empty config values in -c
      c8c33216
    • J
      Merge branch 'ab/c-translators-comment-style' into maint · b19174e2
      Junio C Hamano 提交于
      Update the C style recommendation for notes for translators, as
      recent versions of gettext tools can work with our style of
      multi-line comments.
      
      * ab/c-translators-comment-style:
        C style: use standard style for "TRANSLATORS" comments
      b19174e2
    • J
      Merge branch 'ls/travis-doc-asciidoctor' into maint · 916a3387
      Junio C Hamano 提交于
      Travis CI gained a task to format the documentation with both
      AsciiDoc and AsciiDoctor.
      
      * ls/travis-doc-asciidoctor:
        travis-ci: check AsciiDoc/AsciiDoctor stderr output
        travis-ci: unset compiler for jobs that do not need one
        travis-ci: parallelize documentation build
        travis-ci: build documentation with AsciiDoc and Asciidoctor
      916a3387
  2. 04 6月, 2017 21 次提交
    • J
      Prepare for 2.13.1; more topics to follow · e215bd91
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e215bd91
    • J
      Merge branch 'tg/stash-push-fixup' into maint · 5ecbaaf1
      Junio C Hamano 提交于
      The shell completion script (in contrib/) learned "git stash" has
      a new "push" subcommand.
      
      * tg/stash-push-fixup:
        completion: add git stash push
      5ecbaaf1
    • J
      Merge branch 'km/log-showsignature-doc' into maint · b522c33b
      Junio C Hamano 提交于
      Doc update.
      
      * km/log-showsignature-doc:
        config.txt: add an entry for log.showSignature
      b522c33b
    • J
      Merge branch 'jt/use-trailer-api-in-commands' into maint · e2ae5ec1
      Junio C Hamano 提交于
      "git cherry-pick" and other uses of the sequencer machinery
      mishandled a trailer block whose last line is an incomplete line.
      This has been fixed so that an additional sign-off etc. are added
      after completing the existing incomplete line.
      
      * jt/use-trailer-api-in-commands:
        sequencer: add newline before adding footers
      e2ae5ec1
    • J
      Merge branch 'jt/push-options-doc' into maint · 058d655f
      Junio C Hamano 提交于
      The receive-pack program now makes sure that the push certificate
      records the same set of push options used for pushing.
      
      * jt/push-options-doc:
        receive-pack: verify push options in cert
        docs: correct receive.advertisePushOptions default
      058d655f
    • J
      Merge branch 'js/plug-leaks' into maint · 34bbe2ed
      Junio C Hamano 提交于
      Fix memory leaks pointed out by Coverity (and people).
      
      * js/plug-leaks: (26 commits)
        checkout: fix memory leak
        submodule_uses_worktrees(): plug memory leak
        show_worktree(): plug memory leak
        name-rev: avoid leaking memory in the `deref` case
        remote: plug memory leak in match_explicit()
        add_reflog_for_walk: avoid memory leak
        shallow: avoid memory leak
        line-log: avoid memory leak
        receive-pack: plug memory leak in update()
        fast-export: avoid leaking memory in handle_tag()
        mktree: plug memory leaks reported by Coverity
        pack-redundant: plug memory leak
        setup_discovered_git_dir(): plug memory leak
        setup_bare_git_dir(): help static analysis
        split_commit_in_progress(): simplify & fix memory leak
        checkout: fix memory leak
        cat-file: fix memory leak
        mailinfo & mailsplit: check for EOF while parsing
        status: close file descriptor after reading git-rebase-todo
        difftool: address a couple of resource/memory leaks
        ...
      34bbe2ed
    • J
      Merge branch 'js/eol-on-ourselves' into maint · 7ba4fa5c
      Junio C Hamano 提交于
      Make sure our tests would pass when the sources are checked out
      with "platform native" line ending convention by default on
      Windows.  Some "text" files out tests use and the test scripts
      themselves that are meant to be run with /bin/sh, ought to be
      checked out with eol=LF even on Windows.
      
      * js/eol-on-ourselves:
        t4051: mark supporting files as requiring LF-only line endings
        Fix the remaining tests that failed with core.autocrlf=true
        t3901: move supporting files into t/t3901/
        completion: mark bash script as LF-only
        git-new-workdir: mark script as LF-only
        Fix build with core.autocrlf=true
      7ba4fa5c
    • J
      Merge branch 'jk/update-links-in-docs' into maint · 970fb22d
      Junio C Hamano 提交于
      A few http:// links that are redirected to https:// in the
      documentation have been updated to https:// links.
      
      * jk/update-links-in-docs:
        doc: use https links to Wikipedia to avoid http redirects
      970fb22d
    • J
      Merge branch 'jk/ignore-broken-tags-when-ignoring-missing-links' into maint · 8d958b97
      Junio C Hamano 提交于
      Tag objects, which are not reachable from any ref, that point at
      missing objects were mishandled by "git gc" and friends (they
      should silently be ignored instead)
      
      * jk/ignore-broken-tags-when-ignoring-missing-links:
        revision.c: ignore broken tags with ignore_missing_links
      8d958b97
    • J
      Merge branch 'jk/doc-config-include' into maint · aa5439d6
      Junio C Hamano 提交于
      Clarify documentation for include.path and includeIf.<condition>.path
      configuration variables.
      
      * jk/doc-config-include:
        docs/config: consistify include.path examples
        docs/config: avoid the term "expand" for includes
        docs/config: give a relative includeIf example
        docs/config: clarify include/includeIf relationship
      aa5439d6
    • J
      Merge branch 'jk/disable-pack-reuse-when-broken' into maint · f305016f
      Junio C Hamano 提交于
      "pack-objects" can stream a slice of an existing packfile out when
      the pack bitmap can tell that the reachable objects are all needed
      in the output, without inspecting individual objects.  This
      strategy however would not work well when "--local" and other
      options are in use, and need to be disabled.
      
      * jk/disable-pack-reuse-when-broken:
        t5310: fix "; do" style
        pack-objects: disable pack reuse for object-selection options
      f305016f
    • J
      Merge branch 'jk/am-leakfix' into maint · 70d19a43
      Junio C Hamano 提交于
      The codepath in "git am" that is used when running "git rebase"
      leaked memory held for the log message of the commits being rebased.
      
      * jk/am-leakfix:
        am: shorten ident_split variable name in get_commit_info()
        am: simplify allocations in get_commit_info()
        am: fix commit buffer leak in get_commit_info()
      70d19a43
    • J
      Merge branch 'jc/read-tree-empty-with-m' into maint · 8a17b259
      Junio C Hamano 提交于
      "git read-tree -m" (no tree-ish) gave a nonsense suggestion "use
      --empty if you want to clear the index".  With "-m", such a request
      will still fail anyway, as you'd need to name at least one tree-ish
      to be merged.
      
      * jc/read-tree-empty-with-m:
        read-tree: "read-tree -m --empty" does not make sense
      8a17b259
    • J
      Merge branch 'jc/apply-fix-mismerge' into maint · 34a75ccb
      Junio C Hamano 提交于
      Mismerge fix.
      
      * jc/apply-fix-mismerge:
        apply.c: fix whitespace-only mismerge
      34a75ccb
    • J
      Merge branch 'ja/do-not-ask-needless-questions' into maint · 0501b7e7
      Junio C Hamano 提交于
      Git sometimes gives an advice in a rhetorical question that does
      not require an answer, which can confuse new users and non native
      speakers.  Attempt to rephrase them.
      
      * ja/do-not-ask-needless-questions:
        git-filter-branch: be more direct in an error message
        read-tree -m: make error message for merging 0 trees less smart aleck
        usability: don't ask questions if no reply is required
      0501b7e7
    • J
      Merge branch 'bw/submodule-with-bs-path' into maint · c95f0d2f
      Junio C Hamano 提交于
      A hotfix to a topic that is already in v2.13.
      
      * bw/submodule-with-bs-path:
        t7400: add !CYGWIN prerequisite to 'add with \\ in path'
      c95f0d2f
    • J
      Merge branch 'ah/log-decorate-default-to-auto' into maint · fb11de9e
      Junio C Hamano 提交于
      Setting "log.decorate=false" in the configuration file did not take
      effect in v2.13, which has been corrected.
      
      * ah/log-decorate-default-to-auto:
        builtin/log: honor log.decorate
      fb11de9e
    • J
      Merge branch 'ab/fix-poison-tests' into maint · 6c940eb9
      Junio C Hamano 提交于
      Update tests to pass under GETTEXT_POISON (a mechanism to ensure
      that output strings that should not be translated are not
      translated by mistake), and tell TravisCI to run them.
      
      * ab/fix-poison-tests:
        travis-ci: add job to run tests with GETTEXT_POISON
        travis-ci: setup "prove cache" in "script" step
        tests: fix tests broken under GETTEXT_POISON=YesPlease
      6c940eb9
    • J
      Merge branch 'ab/doc-replace-gmane-links' into maint · 16b4a48f
      Junio C Hamano 提交于
      The Web interface to gmane news archive is long gone, even though
      the articles are still accessible via NTTP.  Replace the links with
      ones to public-inbox.org.  Because their message identification is
      based on the actual message-id, it is likely that it will be easier
      to migrate away from it if/when necessary.
      
      * ab/doc-replace-gmane-links:
        doc: replace more gmane links
        doc: replace a couple of broken gmane links
      16b4a48f
    • J
      Merge branch 'ab/aix-needs-compat-regex' into maint · 9102f423
      Junio C Hamano 提交于
      Build fix.
      
      * ab/aix-needs-compat-regex:
        config.mak.uname: set NO_REGEX=NeedsStartEnd on AIX
      9102f423
    • J
      Merge branch 'pw/rebase-i-regression-fix' into maint · 19a23d6d
      Junio C Hamano 提交于
      Just the first one of three? new tests that follows up a regression
      fix.
      
      * pw/rebase-i-regression-fix:
        rebase -i: add missing newline to end of message
        rebase -i: silence stash apply
        rebase -i: fix reflog message
      19a23d6d
  3. 01 6月, 2017 1 次提交
    • J
      docs/config: mention protocol implications of url.insteadOf · 2c9a2ae2
      Jeff King 提交于
      If a URL rewrite switches the protocol to something
      nonstandard (like "persistent-https" for "https"), the user
      may be bitten by the fact that the default protocol
      restrictions are different between the two. Let's drop a
      note in insteadOf that points the user in the right
      direction.
      
      It would be nice if we could make this work out of the box,
      but we can't without knowing the security implications of
      the user's rewrite. Only the documentation for a particular
      remote helper can advise one way or the other. Since we do
      include the persistent-https helper in contrib/ (and since
      it was the helper in the real-world case that inspired that
      patch), let's also drop a note there.
      Suggested-by: NElliott Cable <me@ell.io>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2c9a2ae2
  4. 31 5月, 2017 1 次提交
    • Æ
      C style: use standard style for "TRANSLATORS" comments · 66f5f6dc
      Ævar Arnfjörð Bjarmason 提交于
      Change all the "TRANSLATORS: [...]" comments in the C code to use the
      regular Git coding style, and amend the style guide so that the
      example there uses that style.
      
      This custom style was necessary back in 2010 when the gettext support
      was initially added, and was subsequently documented in commit
      cbcfd4e3 ("i18n: mention "TRANSLATORS:" marker in
      Documentation/CodingGuidelines", 2014-04-18).
      
      GNU xgettext hasn't had the parsing limitation that necessitated this
      exception for almost 3 years. Since its 0.19 release on 2014-06-02
      it's been able to recognize TRANSLATOR comments in the standard Git
      comment syntax[1].
      
      Usually we'd like to keep compatibility with software that's that
      young, but in this case literally the only person who needs to be
      using a gettext newer than 3 years old is Jiang Xin (the only person
      who runs & commits "make pot" results), so I think in this case we can
      make an exception.
      
      This xgettext parsing feature was added after a thread on the Git
      mailing list[2] which continued on the bug-gettext[3] list, but we
      never subsequently changed our style & styleguide, do so.
      
      There are already longstanding changes in git that use the standard
      comment style & have their TRANSLATORS comments extracted properly
      without getting the literal "*"'s mixed up in the text, as would
      happen before xgettext 0.19.
      
      Commit 7ff26832 ("builtin-am: implement -i/--interactive",
      2015-08-04) added one such comment, which in commit df0617bf ("l10n:
      git.pot: v2.6.0 round 1 (123 new, 41 removed)", 2015-09-05) got picked
      up in the po/git.pot file with the right format, showing that Jiang
      already runs a modern xgettext.
      
      The xgettext parser does not handle the sort of non-standard comment
      style that I'm amending here in sequencer.c, but that isn't standard
      Git comment syntax anyway. With this change to sequencer.c & "make
      pot" the comment in the pot file is now correct:
      
           #. TRANSLATORS: %s will be "revert", "cherry-pick" or
          -#. * "rebase -i".
          +#. "rebase -i".
      
      1. http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=10af7fe6bd
      2. <2ce9ec406501d112e032c8208417f8100bed04c6.1397712142.git.worldhello.net@gmail.com>
         (https://public-inbox.org/git/2ce9ec406501d112e032c8208417f8100bed04c6.1397712142.git.worldhello.net@gmail.com/)
      3. https://lists.gnu.org/archive/html/bug-gettext/2014-04/msg00016.htmlSigned-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Acked-by: NJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      66f5f6dc
  5. 30 5月, 2017 1 次提交
    • J
      am: handle "-h" argument earlier · f3a2fffe
      Jeff King 提交于
      If the user provides "-h" on the command line, then our
      parse_options() invocation will show a usage message and
      quit. But if "-h" is the only argument, the git wrapper
      behaves specially: it ignores our RUN_SETUP flag and calls
      cmd_am() without having done repository setup at all.  This
      is due to 99caeed0 (Let 'git <command> -h' show usage
      without a git dir, 2009-11-09).
      
      Before cmd_am() calls parse_options(), though, it runs a few
      other setup functions. One of these is am_state_init(),
      which uses git_pathdup() to set up the default rebase-apply
      path. But calling git_pathdup() when we haven't done
      repository setup will fall back to using ".git". That's
      mostly harmless (since we won't use the value anyway), but
      is forbidden since b1ef400e ("setup_git_env: avoid blind
      fall-back to ".git"", 2016-10-20), and we now BUG().
      
      We can't easily move that setup to after the parse_options()
      call; the point is to set up defaults that are overwritten
      by the option parsing. Instead, we'll detect the "-h" case
      early and show the usage then. This matches the behavior of
      other builtins which have a similar setup-ordering issue
      (e.g., git-branch).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f3a2fffe
  6. 26 5月, 2017 1 次提交
    • J
      Windows: do not treat a path with backslashes as a remote's nick name · d9244ecf
      Johannes Sixt 提交于
      On Windows, the remote repository name in, e.g., `git fetch foo\bar`
      is clearly not a nickname for a configured remote repository. However,
      the function valid_remote_nick() does not account for backslashes.
      Use is_dir_sep() to check for both slashes and backslashes on Windows.
      
      This was discovered while playing with Duy's patches that warn after
      fopen() failures. The functions that read the branches and remotes
      files are protected by a valid_remote_nick() check. Without this
      change, a Windows style absolute path is incorrectly regarded as
      nickname and is concatenated to a prefix and used with fopen(). This
      triggers warnings because a colon in a path name is not allowed:
      
      C:\Temp\gittest>git fetch C:\Temp\gittest
      warning: unable to access '.git/remotes/C:\Temp\gittest': Invalid argument
      warning: unable to access '.git/branches/C:\Temp\gittest': Invalid argument
      From C:\Temp\gittest
       * branch            HEAD       -> FETCH_HEAD
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d9244ecf
  7. 23 5月, 2017 1 次提交
  8. 22 5月, 2017 1 次提交
  9. 20 5月, 2017 1 次提交
    • J
      revision.c: ignore broken tags with ignore_missing_links · a3ba6bf1
      Jeff King 提交于
      When peeling a tag for prepare_revision_walk(), we do not
      respect the ignore_missing_links flag. This can lead to a
      bogus error when pack-objects walks the possibly-broken
      unreachable-but-recent part of the object graph.
      
      The other link-following all happens via traverse_commit_list(),
      which explains why this case was missed. And our tests
      covered only broken links from commits. Let's be more
      comprehensive and cover broken tree entries (which do work)
      and tags (which shows off this bug).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a3ba6bf1