1. 15 10月, 2014 1 次提交
    • J
      pass config slots as pointers instead of offsets · 8852117a
      Jonathan Nieder 提交于
      Many config-parsing helpers, like parse_branch_color_slot,
      take the name of a config variable and an offset to the
      "slot" name (e.g., "color.branch.plain" is passed along with
      "13" to effectively pass "plain"). This is leftover from the
      time that these functions would die() on error, and would
      want the full variable name for error reporting.
      
      These days they do not use the full variable name at all.
      Passing a single pointer to the slot name is more natural,
      and lets us more easily adjust the callers to use skip_prefix
      to avoid manually writing offset numbers.
      
      This is effectively a continuation of 9e1a5ebe, which did the
      same for parse_diff_color_slot. This patch covers all of the
      remaining similar constructs.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8852117a
  2. 30 9月, 2014 8 次提交
  3. 28 9月, 2014 1 次提交
  4. 26 9月, 2014 3 次提交
  5. 20 9月, 2014 13 次提交
  6. 17 9月, 2014 1 次提交
  7. 13 9月, 2014 1 次提交
    • J
      fsck: return non-zero status on missing ref tips · 30d1038d
      Jeff King 提交于
      Fsck tries hard to detect missing objects, and will complain
      (and exit non-zero) about any inter-object links that are
      missing. However, it will not exit non-zero for any missing
      ref tips, meaning that a severely broken repository may
      still pass "git fsck && echo ok".
      
      The problem is that we use for_each_ref to iterate over the
      ref tips, which hides broken tips. It does at least print an
      error from the refs.c code, but fsck does not ever see the
      ref and cannot note the problem in its exit code. We can solve
      this by using for_each_rawref and noting the error ourselves.
      
      In addition to adding tests for this case, we add tests for
      all types of missing-object links (all of which worked, but
      which we were not testing).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      30d1038d
  8. 12 9月, 2014 1 次提交
  9. 11 9月, 2014 1 次提交
  10. 04 9月, 2014 1 次提交
  11. 30 8月, 2014 4 次提交
    • J
      index-pack: fix race condition with duplicate bases · ab791dd1
      Jeff King 提交于
      When we are resolving deltas in an indexed pack, we do it by
      first selecting a potential base (either one stored in full
      in the pack, or one created by resolving another delta), and
      then resolving any deltas that use that base.  When we
      resolve a particular delta, we flip its "real_type" field
      from OBJ_{REF,OFS}_DELTA to whatever the real type is.
      
      We assume that traversing the objects this way will visit
      each delta only once. This is correct for most packs; we
      visit the delta only when we process its base, and each
      object (and thus each base) appears only once. However, if a
      base object appears multiple times in the pack, we will try
      to resolve any deltas based on it once for each instance.
      
      We can detect this case by noting that a delta we are about
      to resolve has already had its real_type field flipped, and
      we already do so with an assert().  However, if multiple
      threads are in use, we may race with another thread on
      comparing and flipping the field. We need to synchronize the
      access.
      
      The right mechanism for doing this is a compare-and-swap (we
      atomically "claim" the delta for our own and find out
      whether our claim was successful). We can implement this
      in C by using a pthread mutex to protect the operation. This
      is not the fastest way of doing a compare-and-swap; many
      processors provide instructions for this, and gcc and other
      compilers provide builtins to access them. However, some
      experiments showed that lock contention does not cause a
      significant slowdown here. Adding c-a-s support for many
      compilers would increase the maintenance burden (and we
      would still end up including the pthread version as a
      fallback).
      
      Note that we only need to touch the OBJ_REF_DELTA codepath
      here. An OBJ_OFS_DELTA object points to its base using an
      offset, and therefore has only one base, even if another
      copy of that base object appears in the pack (we do still
      touch it briefly because the setting of real_type is
      factored out of resolve_data).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ab791dd1
    • M
      fast-import: fix segfault in store_tree() · 2668d692
      Maxim Bublis 提交于
      Branch tree is NULLified by filedelete command if we are trying
      to delete root tree. Add sanity check and use load_tree() in that case.
      Signed-off-by: NMaxim Bublis <satori@yandex-team.ru>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2668d692
    • M
      t9300: test filedelete command · 8d30d8a8
      Maxim Bublis 提交于
      Add new fast-import test series for filedelete command.
      Signed-off-by: NMaxim Bublis <satori@yandex-team.ru>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8d30d8a8
    • J
      Merge git://github.com/git-l10n/git-po · 96db324a
      Junio C Hamano 提交于
      * git://github.com/git-l10n/git-po:
        po/TEAMS: add new members to German translation team
        l10n: de.po: translate 38 new messages
      96db324a
  12. 29 8月, 2014 3 次提交
  13. 27 8月, 2014 2 次提交
    • J
      send-pack: take refspecs over stdin · 26be19ba
      Jeff King 提交于
      Pushing a large number of refs works over most transports,
      because we implement send-pack as an internal function.
      However, it can sometimes fail when pushing over http,
      because we have to spawn "git send-pack --stateless-rpc" to
      do the heavy lifting, and we pass each refspec on the
      command line. This can cause us to overflow the OS limits on
      the size of the command line for a large push.
      
      We can solve this by giving send-pack a --stdin option and
      using it from remote-curl.  We already dealt with this on
      the fetch-pack side in 078b895f (fetch-pack: new --stdin
      option to read refs from stdin, 2012-04-02). The stdin
      option (and in particular, its use of packet-lines for
      stateless-rpc input) is modeled after that solution.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      26be19ba
    • J
      Merge branch 'jk/diff-tree-t-fix' · 4109c28e
      Junio C Hamano 提交于
      Fix (rarely used) "git diff-tree -t" regression in 2.0.
      
      * jk/diff-tree-t-fix:
        intersect_paths: respect mode in git's tree-sort
      4109c28e