1. 24 8月, 2016 3 次提交
    • J
      release_delta_base_cache: reuse existing detach function · f92dd60f
      Jeff King 提交于
      This function drops an entry entirely from the cache,
      meaning that aside from the freeing of the buffer, it is
      exactly equivalent to detach_delta_base_cache_entry(). Let's
      build on top of the detach function, which shortens the code
      and will make it simpler when we change out the underlying
      storage in future patches.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f92dd60f
    • J
      clear_delta_base_cache_entry: use a more descriptive name · 4a5397ca
      Jeff King 提交于
      The delta base cache entries are stored in a fixed-length
      hash table. So the way to remove an entry is to "clear" the
      slot in the table, and that is what this function does.
      
      However, the name is a leaky abstraction. If we were to
      change the hash table implementation, it would no longer be
      about "clearing". We should name it after _what_ it does,
      not _how_ it does it. I.e., something like "remove" instead
      of "clear".
      
      But that does not tell the whole story, either. The subtle
      thing about this function is that it removes the entry, but
      does not free the entry data. So a more descriptive name is
      "detach"; we give ownership of the data buffer to the
      caller, and remove any other resources.
      
      This patch uses the name detach_delta_base_cache_entry().
      We could further model this after functions like
      strbuf_detach(), which pass back all of the detached
      information. However, since there are so many bits of
      information in the struct (the data, the size, the type),
      and so few callers (only one), it's not worth that
      awkwardness. The name change and a comment can make the
      intent clear.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4a5397ca
    • J
      cache_or_unpack_entry: drop keep_cache parameter · 85fe35ab
      Jeff King 提交于
      There is only one caller of cache_or_unpack_entry() and it
      always passes 1 for the keep_cache parameter. We can
      simplify it by dropping the "!keep_cache" case.
      
      Another call, which did pass 0, was dropped in abe601bb
      (sha1_file: remove recursion in unpack_entry, 2013-03-27),
      as unpack_entry() now does more complicated things than a
      simple unpack when there is a cache miss.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      85fe35ab
  2. 20 8月, 2016 7 次提交
    • J
      Git 2.10-rc1 · 2632c897
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2632c897
    • J
      Merge branch 'lt/gpg-show-long-key-in-signature-verification' · 83d9eb0a
      Junio C Hamano 提交于
      "git log --show-signature" and other commands that display the
      verification status of PGP signature now shows the longer key-id,
      as 32-bit key-id is so last century.
      
      * lt/gpg-show-long-key-in-signature-verification:
        gpg-interface: prefer "long" key format output when verifying pgp signatures
      83d9eb0a
    • J
      Merge branch 'ab/hooks' · d05d0e99
      Junio C Hamano 提交于
      "git rev-parse --git-path hooks/<hook>" learned to take
      core.hooksPath configuration variable (introduced during 2.9 cycle)
      into account.
      
      * ab/hooks:
        rev-parse: respect core.hooksPath in --git-path
      d05d0e99
    • J
      Merge branch 'jk/difftool-command-not-found' · 331f06d6
      Junio C Hamano 提交于
      "git difftool" by default ignores the error exit from the backend
      commands it spawns, because often they signal that they found
      differences by exiting with a non-zero status code just like "diff"
      does; the exit status codes 126 and above however are special in
      that they are used to signal that the command is not executable,
      does not exist, or killed by a signal.  "git difftool" has been
      taught to notice these exit status codes.
      
      * jk/difftool-command-not-found:
        difftool: always honor fatal error exit codes
      331f06d6
    • J
      Merge branch 'sb/checkout-explit-detach-no-advice' · e6dab9f6
      Junio C Hamano 提交于
      "git checkout --detach <branch>" used to give the same advice
      message as that is issued when "git checkout <tag>" (or anything
      that is not a branch name) is given, but asking with "--detach" is
      an explicit enough sign that the user knows what is going on.  The
      advice message has been squelched in this case.
      
      * sb/checkout-explit-detach-no-advice:
        checkout: do not mention detach advice for explicit --detach option
      e6dab9f6
    • J
      Merge branch 'tb/t0027-raciness-fix' · 643b6221
      Junio C Hamano 提交于
      The t0027 test for CRLF conversion was timing dependent and flaky.
      
      * tb/t0027-raciness-fix:
        convert: Correct NNO tests and missing `LF will be replaced by CRLF`
      643b6221
    • J
      Merge branch 'rs/pull-signed-tag' · aeb1b7f5
      Junio C Hamano 提交于
      When "git merge-recursive" works on history with many criss-cross
      merges in "verbose" mode, the names the command assigns to the
      virtual merge bases could have overwritten each other by unintended
      reuse of the same piece of memory.
      
      * rs/pull-signed-tag:
        commit: use FLEX_ARRAY in struct merge_remote_desc
        merge-recursive: fix verbose output for multiple base trees
        commit: factor out set_merge_remote_desc()
        commit: use xstrdup() in get_merge_parent()
      aeb1b7f5
  3. 18 8月, 2016 8 次提交
  4. 17 8月, 2016 4 次提交
    • J
      Merge branch 'lt/gpg-show-long-key-in-signature-verification-maint' into... · af2b21ec
      Junio C Hamano 提交于
      Merge branch 'lt/gpg-show-long-key-in-signature-verification-maint' into lt/gpg-show-long-key-in-signature-verification
      
      Linus's original was rebased to apply to the maintenance track just
      in case binary distributors that are stuck in the past want to take
      it to their older codebase.  Let's merge it up to more modern
      codebase that has Peff's gpg-interface clean-up topic that appeared
      after Git 2.9 was tagged.
      
      * lt/gpg-show-long-key-in-signature-verification-maint:
        gpg-interface: prefer "long" key format output when verifying pgp signatures
      af2b21ec
    • L
      gpg-interface: prefer "long" key format output when verifying pgp signatures · b624a3e6
      Linus Torvalds 提交于
      Yes, gpg2 already uses the long format by default, but most
      distributions seem to still have "gpg" be the older 1.x version due to
      compatibility reasons.  And older versions of gpg only show the 32-bit
      short ID, which is quite insecure.
      
      This doesn't actually matter for the _verification_ itself: if the
      verification passes, the pgp signature is good.  But if you don't
      actually have the key yet, and want to fetch it, or you want to check
      exactly which key was used for verification and want to check it, we
      should specify the key with more precision.
      
      In fact, we should preferentially specify the whole key fingerprint, but
      gpg doesn't actually support that.  Which is really quite sad.
      
      Showing the "long" format improves things to at least show 64 bits of
      the fingerprint.  That's a lot better, even if it's not perfect.
      
      This change the log format for "git log --show-signature" from
      
          commit 2376d317
          merged tag 'v2.9.3'
          gpg: Signature made Fri 12 Aug 2016 09:17:59 AM PDT using RSA key ID 96AFE6CB
          gpg: Good signature from "Junio C Hamano <gitster@pobox.com>"
          gpg:                 aka "Junio C Hamano <jch@google.com>"
          gpg:                 aka "Junio C Hamano <junio@pobox.com>"
          Merge: 2807cd7b e0c1ceaf
          Author: Junio C Hamano <gitster@pobox.com>
          Date:   Fri Aug 12 10:02:18 2016 -0700
      
      to
      
          commit 2376d317
          merged tag 'v2.9.3'
          gpg: Signature made Fri 12 Aug 2016 09:17:59 AM PDT
          gpg:                using RSA key B0B5E88696AFE6CB
          gpg: Good signature from "Junio C Hamano <gitster@pobox.com>"
          gpg:                 aka "Junio C Hamano <jch@google.com>"
          gpg:                 aka "Junio C Hamano <junio@pobox.com>"
          Merge: 2807cd7b e0c1ceaf
          Author: Junio C Hamano <gitster@pobox.com>
          Date:   Fri Aug 12 10:02:18 2016 -0700
      
      (note the longer key ID, but also the reflowing of the text) and also
      changes the format in the merge messages when merging a signed
      tag.
      
      If you already use gpg2 (either because it's installed by default, or
      because you have set your gpg_program configuration to point to gpg2),
      that already used the long format, you'll also see a change: it will now
      have the same formatting as gpg 1.x, and the verification string looks
      something like
      
          gpg: Signature made Sun 24 Jul 2016 12:24:02 PM PDT
          gpg:                using RSA key 79BE3E4300411886
          gpg: Good signature from "Linus Torvalds <torvalds@linux-foundation.org>" [ultimate]
      
      where it used to be on one line:
      
          gpg: Signature made Sun 24 Jul 2016 12:24:02 PM PDT using RSA key ID 79BE3E4300411886
          gpg: Good signature from "Linus Torvalds <torvalds@linux-foundation.org>" [ultimate]
      
      so there is certainly a chance this could break some automated scripting.
      But the 32-bit key ID's really are broken. Also note that because of the
      differences between gpg-1.x and gpg-2.x, hopefully any scripted key ID
      parsing code (if such code exists) is already flexible enough to not care.
      
      This was triggered by the fact that the "evil32" project keys ended up
      leaking to the public key servers, so now there are 32-bit aliases for
      just about every open source developer that you can easily get by
      mistake if you use the 32-bit short ID format.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b624a3e6
    • J
      rev-parse: respect core.hooksPath in --git-path · 9445b492
      Johannes Schindelin 提交于
      The idea of the --git-path option is not only to avoid having to
      prefix paths with the output of --git-dir all the time, but also to
      respect overrides for specific common paths inside the .git directory
      (e.g. `git rev-parse --git-path objects` will report the value of the
      environment variable GIT_OBJECT_DIRECTORY, if set).
      
      When introducing the core.hooksPath setting, we forgot to adjust
      git_path() accordingly. This patch fixes that.
      
      While at it, revert the special-casing of core.hooksPath in
      run-command.c, as it is now no longer needed.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9445b492
    • J
      t/Makefile: ensure that paths are valid on platforms we care · c2cafd39
      Johannes Schindelin 提交于
      Some pathnames that are okay on ext4 and on HFS+ cannot be checked
      out on Windows. Tests that want to see operations on such paths on
      filesystems that support them must do so behind appropriate test
      prerequisites, and must not include them in the source tree (instead
      they should create them when they run). Otherwise, the source tree
      cannot even be checked out.
      
      Make sure that double-quotes, asterisk, colon, greater/less-than,
      question-mark, backslash, tab, vertical-bar, as well as any non-ASCII
      characters never appear in the pathnames with a new test-lint-* target
      as part of a `make test`. To that end, we call `git ls-files` (ensuring
      that the paths are quoted properly), relying on the fact that paths
      containing non-ASCII characters are quoted within double-quotes.
      
      In case that the source code does not actually live in a Git
      repository (e.g. when extracted from a .zip file), or that the `git`
      executable cannot be executed, we simply ignore the error for now; In
      that case, our trusty Continuous Integration will be the last line of
      defense and catch any problematic file name.
      
      Noticed when a topic wanted to add a pathname with '>' in it.  A
      check like this will prevent a similar problems from happening in the
      future.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c2cafd39
  5. 16 8月, 2016 4 次提交
  6. 15 8月, 2016 2 次提交
    • J
      Git 2.10-rc0 · 726cc2ba
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      726cc2ba
    • T
      convert: Correct NNO tests and missing `LF will be replaced by CRLF` · a0ad53c1
      Torsten Bögershausen 提交于
      When a non-reversible CRLF conversion is done in "git add",
      a warning is printed on stderr (or Git dies, depending on checksafe)
      
      The function commit_chk_wrnNNO() in t0027 was written to test this,
      but did the wrong thing: Instead of looking at the warning
      from "git add", it looked at the warning from "git commit".
      
      This is racy because "git commit" may not have to do CRLF conversion
      at all if it can use the sha1 value from the index (which depends on
      whether "add" and "commit" run in a single second).
      
      Correct t0027 and replace the commit for each and every file with a commit
      of all files in one go.
      The function commit_chk_wrnNNO() should be renamed in a separate commit.
      
      Now that t0027 does the right thing, it detects a bug in covert.c:
      This sequence should generate the warning `LF will be replaced by CRLF`,
      but does not:
      
      $ git init
      $ git config core.autocrlf false
      $ printf "Line\r\n" >file
      $ git add file
      $ git commit -m "commit with CRLF"
      $ git config core.autocrlf true
      $ printf "Line\n" >file
      $ git add file
      
      "git add" calls crlf_to_git() in convert.c, which calls check_safe_crlf().
      When has_cr_in_index(path) is true, crlf_to_git() returns too early and
      check_safe_crlf() is not called at all.
      
      Factor out the code which determines if "git checkout" converts LF->CRLF
      into will_convert_lf_to_crlf().
      
      Update the logic around check_safe_crlf() and "simulate" the possible
      LF->CRLF conversion at "git checkout" with help of will_convert_lf_to_crlf().
      Thanks to Jeff King <peff@peff.net> for analyzing t0027.
      Reported-By: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
      Signed-off-by: NTorsten Bögershausen <tboegi@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a0ad53c1
  7. 14 8月, 2016 7 次提交
  8. 13 8月, 2016 5 次提交