1. 09 2月, 2018 2 次提交
    • J
      always check for NULL return from packet_read_line() · bb1356dc
      Jon Simons 提交于
      The packet_read_line() function will die if it sees any
      protocol or socket errors. But it will return NULL for a
      flush packet; some callers which are not expecting this may
      dereference NULL if they get an unexpected flush. This would
      involve the other side breaking protocol, but we should
      flag the error rather than segfault.
      Signed-off-by: NJon Simons <jon@jonsimons.org>
      Reviewed-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bb1356dc
    • J
      correct error messages for NULL packet_read_line() · bc9d4dc5
      Jeff King 提交于
      The packet_read_line() function dies if it gets an
      unexpected EOF. It only returns NULL if we get a flush
      packet (or technically, a zero-length "0004" packet, but
      nobody is supposed to send those, and they are
      indistinguishable from a flush in this interface).
      
      Let's correct error messages which claim an unexpected EOF;
      it's really an unexpected flush packet.
      
      While we're here, let's also check "!line" instead of
      "!len" in the second case. The two events should always
      coincide, but checking "!line" makes it more obvious that we
      are not about to dereference NULL.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bc9d4dc5
  2. 22 1月, 2018 3 次提交
  3. 20 1月, 2018 1 次提交
    • B
      repository: pre-initialize hash algo pointer · e26f7f19
      brian m. carlson 提交于
      There are various git subcommands (among them, clone) which don't set up
      the repository (that is, they lack RUN_SETUP or RUN_SETUP_GENTLY) but
      end up needing to have information about the hash algorithm in use.
      Because the hash algorithm is part of struct repository and it's only
      initialized in repository setup, we can end up dereferencing a NULL
      pointer in some cases if we call one of these subcommands and look up
      the empty blob or empty tree values.
      
      A "git clone" of a project that has two paths that differ only in
      case suffers from this if it is run on a case insensitive platform.
      When the command attempts to check out one of these two paths after
      checking out the other one, the checkout codepath needs to see if
      the version that is already on the filesystem (which should not
      happen if the FS were case sensitive) is dirty, and it needs to
      exercise the hashing code at that point.
      
      In the future, we can add a command line option for this or read it
      from the configuration, but until we're ready to expose that
      functionality to the user, simply initialize the repository
      structure to use the current hash algorithm, SHA-1.
      Signed-off-by: Nbrian m. carlson <sandals@crustytoothpaste.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e26f7f19
  4. 18 1月, 2018 1 次提交
  5. 17 1月, 2018 1 次提交
    • J
      Merge tag 'l10n-2.16.0-rnd2' of git://github.com/git-l10n/git-po · e0d57502
      Junio C Hamano 提交于
      l10n for Git 2.16.0 round 2
      
      * tag 'l10n-2.16.0-rnd2' of git://github.com/git-l10n/git-po: (24 commits)
        l10n: de.po: translate 72 new messages
        l10n: de.po: improve messages when a branch starts to track another ref
        l10n: bg.po: Updated Bulgarian translation (3288t)
        l10n: TEAMS: add zh_CN team members
        l10n: zh_CN: for git v2.16.0 l10n round 2
        l10n: sv.po: Update Swedish translation (3288t0f0u)
        l10n: ru.po: update Russian translation
        l10n: TEAMS: Add ko team members
        l10n: ko.po: Update Korean translation
        l10n: fr.po 2.16 round 2
        l10n: es.po: Spanish translation 2.16.0 round 2
        l10n: vi.po(3288t): Updated Vietnamese translation for v2.16.0 round 2
        l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed)
        l10n: es.po: Update Spanish Translation v2.16.0
        l10n: fr.po v2.16.0 round 1
        l10n: bg.po: Updated Bulgarian translation (3284t)
        l10n: sv.po: Update Swedish translation (3284t0f0u)
        l10n: fr.po: "worktree list" mistranslated as prune
        l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)
        l10n: fixes to German translation
        ...
      e0d57502
  6. 15 1月, 2018 2 次提交
  7. 13 1月, 2018 1 次提交
  8. 12 1月, 2018 6 次提交
  9. 11 1月, 2018 7 次提交
  10. 10 1月, 2018 16 次提交