1. 14 7月, 2015 9 次提交
    • J
      Merge branch 'nd/multiple-work-trees' · 7783eb2e
      Junio C Hamano 提交于
      "git checkout [<tree-ish>] <paths>" spent unnecessary cycles
      checking if the current branch was checked out elsewhere, when we
      know we are not switching the branches ourselves.
      
      * nd/multiple-work-trees:
        worktree: new place for "git prune --worktrees"
        checkout: don't check worktrees when not necessary
      7783eb2e
    • J
      Merge branch 'ss/clone-guess-dir-name-simplify' · 721f5bb8
      Junio C Hamano 提交于
      Code simplification.
      
      * ss/clone-guess-dir-name-simplify:
        clone: simplify string handling in guess_dir_name()
      721f5bb8
    • J
      Merge branch 'kb/config-unmap-before-renaming' · 313f5233
      Junio C Hamano 提交于
      "git config" failed to update the configuration file when the
      underlying filesystem is incapable of renaming a file that is still
      open.
      
      * kb/config-unmap-before-renaming:
        config.c: fix writing config files on Windows network shares
      313f5233
    • J
      Merge branch 'mh/strbuf-read-file-returns-ssize-t' · d790ba92
      Junio C Hamano 提交于
      Avoid possible ssize_t to int truncation.
      
      * mh/strbuf-read-file-returns-ssize-t:
        strbuf: strbuf_read_file() should return ssize_t
      d790ba92
    • J
      Merge branch 'jc/unexport-git-pager-in-use-in-pager' · 6cf7eef3
      Junio C Hamano 提交于
      When you say "!<ENTER>" while running say "git log", you'd confuse
      yourself in the resulting shell, that may look as if you took
      control back to the original shell you spawned "git log" from but
      that isn't what is happening.  To that new shell, we leaked
      GIT_PAGER_IN_USE environment variable that was meant as a local
      communication between the original "Git" and subprocesses that was
      spawned by it after we launched the pager, which caused many
      "interesting" things to happen, e.g. "git diff | cat" still paints
      its output in color by default.
      
      Stop leaking that environment variable to the pager's half of the
      fork; we only need it on "Git" side when we spawn the pager.
      
      * jc/unexport-git-pager-in-use-in-pager:
        pager: do not leak "GIT_PAGER_IN_USE" to the pager
      6cf7eef3
    • J
      Merge branch 'kb/use-nsec-doc' · 43f23b09
      Junio C Hamano 提交于
      Clarify in the Makefile a guideline to decide use of USE_NSEC.
      
      * kb/use-nsec-doc:
        Makefile / racy-git.txt: clarify USE_NSEC prerequisites
      43f23b09
    • J
      Merge branch 'js/rebase-i-clean-up-upon-continue-to-skip' · e01787f1
      Junio C Hamano 提交于
      Abandoning an already applied change in "git rebase -i" with
      "--continue" left CHERRY_PICK_HEAD and confused later steps.
      
      * js/rebase-i-clean-up-upon-continue-to-skip:
        rebase -i: do not leave a CHERRY_PICK_HEAD file behind
        t3404: demonstrate CHERRY_PICK_HEAD bug
      e01787f1
    • J
      Merge branch 'et/http-proxyauth' · 0e521a41
      Junio C Hamano 提交于
      We used to ask libCURL to use the most secure authentication method
      available when talking to an HTTP proxy only when we were told to
      talk to one via configuration variables.  We now ask libCURL to
      always use the most secure authentication method, because the user
      can tell libCURL to use an HTTP proxy via an environment variable
      without using configuration variables.
      
      * et/http-proxyauth:
        http: always use any proxy auth method available
      0e521a41
    • J
      Merge branch 'jc/fsck-retire-require-eoh' · acf71895
      Junio C Hamano 提交于
      A fix to a minor regression to "git fsck" in v2.2 era that started
      complaining about a body-less tag object when it lacks a separator
      empty line after its header to separate it with a non-existent body.
      
      * jc/fsck-retire-require-eoh:
        fsck: it is OK for a tag and a commit to lack the body
      acf71895
  2. 11 7月, 2015 12 次提交
  3. 10 7月, 2015 3 次提交
  4. 09 7月, 2015 2 次提交
    • J
      check_and_freshen_file: fix reversed success-check · 3096b2ec
      Jeff King 提交于
      When we want to write out a loose object file, we have
      always first made sure we don't already have the object
      somewhere. Since 33d4221c (write_sha1_file: freshen existing
      objects, 2014-10-15), we also update the timestamp on the
      file, so that a simultaneous prune knows somebody is
      likely to reference it soon.
      
      If our utime() call fails, we treat this the same as not
      having the object in the first place; the safe thing to do
      is write out another copy. However, the loose-object check
      accidentally inverts the utime() check; it returns failure
      _only_ when the utime() call actually succeeded. Thus it was
      failing to protect us there, and in the normal case where
      utime() succeeds, it caused us to pointlessly write out and
      link the object.
      
      This passed our freshening tests, because writing out the
      new object is certainly _one_ way of updating its utime. So
      the normal case was inefficient, but not wrong.
      
      While we're here, let's also drop a comment in front of the
      check_and_freshen functions, making a note of their return
      type (since it is not our usual "0 for success, -1 for
      error").
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3096b2ec
    • C
      rebase: return non-zero error code if format-patch fails · 60d708b2
      Clemens Buchacher 提交于
      Since e481af06 (rebase: Handle cases where format-patch fails) we
      notice if format-patch fails and return immediately from
      git-rebase--am. We save the return value with ret=$?, but then we
      return $?, which is usually zero in this case.
      
      Fix this by returning $ret instead.
      
      Cc: Andrew Wong <andrew.kw.w@gmail.com>
      Signed-off-by: NClemens Buchacher <clemens.buchacher@intel.com>
      Helped-by: NJorge Nunes <jorge.nunes@intel.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      60d708b2
  5. 07 7月, 2015 3 次提交
  6. 05 7月, 2015 1 次提交
    • J
      index-pack: fix allocation of sorted_by_pos array · 781d9306
      Junio C Hamano 提交于
      When c6458e60 (index-pack: kill union delta_base to save memory,
      2015-04-18) attempted to reduce the memory footprint of index-pack,
      one of the key thing it did was to keep track of ref-deltas and
      ofs-deltas separately.
      
      In fix_unresolved_deltas(), however it forgot that it now wants to
      look only at ref deltas in one place.  The code allocated an array
      for nr_unresolved, which is sum of number of ref- and ofs-deltas
      minus nr_resolved, which may be larger or smaller than the number
      ref-deltas.  Depending on nr_resolved, this was either under or over
      allocating.
      
      Also, the old code before this change had to use 'i' and 'n' because
      some of the things we see in the (old) deltas[] array we scanned
      with 'i' would not make it into the sorted_by_pos[] array in the old
      world order, but now because you have only ref delta in a separate
      ref_deltas[] array, they increment lock&step.  We no longer need
      separate variables.  And most importantly, we shouldn't pass the
      nr_unresolved parameter, as this number does not play a role in the
      working of this helper function.
      Helped-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      781d9306
  7. 04 7月, 2015 2 次提交
  8. 02 7月, 2015 8 次提交