1. 06 6月, 2015 3 次提交
  2. 15 5月, 2015 2 次提交
    • M
      lock_packed_refs(): allow retries when acquiring the packed-refs lock · f4ab4f3a
      Michael Haggerty 提交于
      Currently, there is only one attempt to acquire any lockfile, and if
      the lock is held by another process, the locking attempt fails
      immediately.
      
      This is not such a limitation for loose reference files. First, they
      don't take long to rewrite. Second, most reference updates have a
      known "old" value, so if another process is updating a reference at
      the same moment that we are trying to lock it, then probably the
      expected "old" value will not longer be valid, and the update will
      fail anyway.
      
      But these arguments do not hold for packed-refs:
      
      * The packed-refs file can be large and take significant time to
        rewrite.
      
      * Many references are stored in a single packed-refs file, so it could
        be that the other process was changing a different reference than
        the one that we are interested in.
      
      Therefore, it is much more likely for there to be spurious lock
      conflicts in connection to the packed-refs file, resulting in
      unnecessary command failures.
      
      So, if the first attempt to lock the packed-refs file fails, continue
      retrying for a configurable length of time before giving up. The
      default timeout is 1 second.
      Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f4ab4f3a
    • M
      lockfile: allow file locking to be retried with a timeout · 044b6a9e
      Michael Haggerty 提交于
      Currently, there is only one attempt to lock a file. If it fails, the
      whole operation fails.
      
      But it might sometimes be advantageous to try acquiring a file lock a
      few times before giving up. So add a new function,
      hold_lock_file_for_update_timeout(), that allows a timeout to be
      specified. Make hold_lock_file_for_update() a thin wrapper around the
      new function.
      
      If timeout_ms is positive, then retry for at least that many
      milliseconds to acquire the lock. On each failed attempt, use select()
      to wait for a backoff time that increases quadratically (capped at 1
      second) and has a random component to prevent two processes from
      getting synchronized. If timeout_ms is negative, retry indefinitely.
      
      In a moment we will switch to using the new function when locking
      packed-refs.
      Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      044b6a9e
  3. 14 5月, 2015 10 次提交
  4. 12 5月, 2015 25 次提交
    • J
      Merge branch 'maint' · c518059b
      Junio C Hamano 提交于
      * maint:
        Git 2.3.8
      c518059b
    • J
      Sync with 2.3.8 · c99fec6e
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c99fec6e
    • J
      Git 2.3.8 · 9a3d6375
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a3d6375
    • J
      Merge branch 'mm/usage-log-l-can-take-regex' into maint-2.3 · 811ce1b4
      Junio C Hamano 提交于
      Documentation fix.
      
      * mm/usage-log-l-can-take-regex:
        log -L: improve error message on malformed argument
        Documentation: change -L:<regex> to -L:<funcname>
      811ce1b4
    • J
      Merge branch 'jc/diff-no-index-d-f' into maint-2.3 · cd012085
      Junio C Hamano 提交于
      The usual "git diff" when seeing a file turning into a directory
      showed a patchset to remove the file and create all files in the
      directory, but "git diff --no-index" simply refused to work.  Also,
      when asked to compare a file and a directory, imitate POSIX "diff"
      and compare the file with the file with the same name in the
      directory, instead of refusing to run.
      
      * jc/diff-no-index-d-f:
        diff-no-index: align D/F handling with that of normal Git
        diff-no-index: DWIM "diff D F" into "diff D/F F"
      cd012085
    • J
      Merge branch 'oh/fix-config-default-user-name-section' into maint-2.3 · 1add9aed
      Junio C Hamano 提交于
      The default $HOME/.gitconfig file created upon "git config --global"
      that edits it had incorrectly spelled user.name and user.email
      entries in it.
      
      * oh/fix-config-default-user-name-section:
        config: fix settings in default_user_config template
      1add9aed
    • J
      Merge branch 'jc/epochtime-wo-tz' into maint-2.3 · 13ec221d
      Junio C Hamano 提交于
      "git commit --date=now" or anything that relies on approxidate lost
      the daylight-saving-time offset.
      
      * jc/epochtime-wo-tz:
        parse_date_basic(): let the system handle DST conversion
        parse_date_basic(): return early when given a bogus timestamp
      13ec221d
    • J
      Second batch for 2.5 cycle · 22aca1b3
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      22aca1b3
    • J
      Merge branch 'pt/xdg-config-path' · 558e5a8c
      Junio C Hamano 提交于
      Code clean-up for xdg configuration path support.
      
      * pt/xdg-config-path:
        path.c: remove home_config_paths()
        git-config: replace use of home_config_paths()
        git-commit: replace use of home_config_paths()
        credential-store.c: replace home_config_paths() with xdg_config_home()
        dir.c: replace home_config_paths() with xdg_config_home()
        attr.c: replace home_config_paths() with xdg_config_home()
        path.c: implement xdg_config_home()
      558e5a8c
    • J
      Merge branch 'ep/do-not-feed-a-pointer-to-array-size' · 7cb5073f
      Junio C Hamano 提交于
      Catch a programmer mistake to feed a pointer not an array to
      ARRAY_SIZE() macro, by using a couple of GCC extensions.
      
      * ep/do-not-feed-a-pointer-to-array-size:
        git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array
      7cb5073f
    • J
      Merge branch 'jc/hash-object' · 051086b9
      Junio C Hamano 提交于
      "hash-object --literally" introduced in v2.2 was not prepared to
      take a really long object type name.
      
      * jc/hash-object:
        write_sha1_file(): do not use a separate sha1[] array
        t1007: add hash-object --literally tests
        hash-object --literally: fix buffer overrun with extra-long object type
        git-hash-object.txt: document --literally option
      051086b9
    • J
      Merge branch 'sb/prefix-path-free-results' · b9f5d387
      Junio C Hamano 提交于
      Code clean-up (not a leak-fix).
      
      * sb/prefix-path-free-results:
        prefix_path(): unconditionally free results in the callers
      b9f5d387
    • J
      Merge branch 'sg/completion-no-redundant-all-command-list' · 5c38a1fa
      Junio C Hamano 提交于
      Code simplification.
      
      * sg/completion-no-redundant-all-command-list:
        completion: remove redundant __git_compute_all_commands() call
      5c38a1fa
    • J
      Merge branch 'sg/complete-decorate-full-not-long' · 465868a2
      Junio C Hamano 提交于
      The completion for "log --decorate=" parameter value was incorrect.
      
      * sg/complete-decorate-full-not-long:
        completion: fix and update 'git log --decorate=' options
      465868a2
    • J
      Merge branch 'jk/filter-branch-use-of-sed-on-incomplete-line' · 02f82037
      Junio C Hamano 提交于
      "filter-branch" corrupted commit log message that ends with an
      incomplete line on platforms with some "sed" implementations that
      munge such a line.  Work it around by avoiding to use "sed".
      
      * jk/filter-branch-use-of-sed-on-incomplete-line:
        filter-branch: avoid passing commit message through sed
      02f82037
    • J
      Merge branch 'jc/daemon-no-ipv6-for-2.4.1' · 9e4d2f6d
      Junio C Hamano 提交于
      "git daemon" fails to build from the source under NO_IPV6
      configuration (regression in 2.4).
      
      * jc/daemon-no-ipv6-for-2.4.1:
        daemon: unbreak NO_IPV6 build regression
      9e4d2f6d
    • J
      Merge branch 'jn/clean-use-error-not-fprintf-on-stderr' · a0c0c2e5
      Junio C Hamano 提交于
      Some error messages in "git config" were emitted without calling
      the usual error() facility.
      
      * jn/clean-use-error-not-fprintf-on-stderr:
        config: use error() instead of fprintf(stderr, ...)
      a0c0c2e5
    • J
      Merge branch 'tb/blame-resurrect-convert-to-git' · 5fa9e4c4
      Junio C Hamano 提交于
      Some time ago, "git blame" (incorrectly) lost the convert_to_git()
      call when synthesizing a fake "tip" commit that represents the
      state in the working tree, which broke folks who record the history
      with LF line ending to make their project portabile across
      platforms while terminating lines in their working tree files with
      CRLF for their platform.
      
      * tb/blame-resurrect-convert-to-git:
        blame: CRLF in the working tree and LF in the repo
      5fa9e4c4
    • J
      Merge branch 'va/fix-git-p4-tests' · 1efadd79
      Junio C Hamano 提交于
      * va/fix-git-p4-tests:
        git-p4: t9814: prevent --chain-lint failure
      1efadd79
    • J
      Merge branch 'ld/p4-case-fold' · ee2309df
      Junio C Hamano 提交于
      * ld/p4-case-fold:
        git-p4: add failing tests for case-folding p4d
      ee2309df
    • J
      Merge branch 'jk/rebase-quiet-noop' · 35261828
      Junio C Hamano 提交于
      "git rebase --quiet" was not quite quiet when there is nothing to
      do.
      
      * jk/rebase-quiet-noop:
        rebase: silence "git checkout" for noop rebase
      35261828
    • J
      Merge branch 'va/p4-client-path' · 04959836
      Junio C Hamano 提交于
      git p4 attempts to better handle branches in Perforce.
      
      * va/p4-client-path:
        git-p4: improve client path detection when branches are used
        t9801: check git-p4's branch detection with client spec enabled
      04959836
    • J
      Merge branch 'mm/add-p-split-error' · 331fe94f
      Junio C Hamano 提交于
      When "add--interactive" splits a hunk into two overlapping hunks
      and then let the user choose only one, it sometimes feeds an
      incorrect patch text to "git apply".  Add tests to demonstrate
      this.
      
      I have a slight suspicion that this may be $gmane/87202 coming back
      and biting us (I seem to have said "let's run with this and see
      what happens" back then).
      
      * mm/add-p-split-error:
        stash -p: demonstrate failure of split with mixed y/n
        t3904-stash-patch: factor PERL prereq at the top of the file
        t3904-stash-patch: fix test description
        add -p: demonstrate failure when running 'edit' after a split
        t3701-add-interactive: simplify code
      331fe94f
    • J
      Merge branch 'tb/t0027-crlf' · 7e982926
      Junio C Hamano 提交于
      More line-ending tests.
      
      * tb/t0027-crlf:
        t0027: Add repoMIX and LF_nul
        t0027: support NATIVE_CRLF platforms
        t0027: cleanup: rename functions; avoid non-leading TABs
      7e982926
    • J
      Merge branch 'ls/p4-changes-block-size' · 120c585b
      Junio C Hamano 提交于
      "git p4" learned "--changes-block-size <n>" to read the changes in
      chunks from Perforce, instead of making one call to "p4 changes"
      that may trigger "too many rows scanned" error from Perforce.
      
      * ls/p4-changes-block-size:
        git-p4: use -m when running p4 changes
      120c585b