1. 23 7月, 2012 10 次提交
    • J
      Merge branch 'ar/clone-honor-umask-at-top' into maint · 7046e758
      Junio C Hamano 提交于
      A handful of files and directories we create had tighter than
      necessary permission bits when the user wanted to have group
      writability (e.g. by setting "umask 002").
      
      * ar/clone-honor-umask-at-top:
        add: create ADD_EDIT.patch with mode 0666
        rerere: make rr-cache fanout directory honor umask
        Restore umasks influence on the permissions of work tree created by clone
      7046e758
    • J
      Merge branch 'cw/amend-commit-without-message' into maint · c9603dfa
      Junio C Hamano 提交于
      "commit --amend" used to refuse amending a commit with an empty log
      message, with or without "--allow-empty-message".
      
      * cw/amend-commit-without-message:
        Allow edit of empty message with commit --amend
      c9603dfa
    • J
      Merge branch 'jk/maint-commit-amend-only-no-paths' into maint · f5a84009
      Junio C Hamano 提交于
      "git commit --amend --only --" was meant to allow "Clever" people to
      rewrite the commit message without making any change even when they
      have already changes for the next commit added to their index, but
      it never worked as advertised since it was introduced in 1.3.0 era.
      
      * jk/maint-commit-amend-only-no-paths:
        commit: fix "--amend --only" with no pathspec
      f5a84009
    • J
      Merge branch 'tg/maint-cache-name-compare' into maint · 1cd29139
      Junio C Hamano 提交于
      Even though the index can record pathnames longer than 1<<12 bytes,
      in some places we were not comparing them in full, potentially
      replacing index entries instead of adding.
      
      * tg/maint-cache-name-compare:
        cache_name_compare(): do not truncate while comparing paths
      1cd29139
    • J
      Merge branch 'tr/maint-show-walk' into maint · 1f5881d3
      Junio C Hamano 提交于
      "git show"'s auto-walking behaviour was an unreliable and
      unpredictable hack; it now behaves just like "git log" does when it
      walks.
      
      * tr/maint-show-walk:
        show: fix "range implies walking"
        Demonstrate git-show is broken with ranges
      1f5881d3
    • J
      Merge branch 'jc/refactor-diff-stdin' into maint · 106ef55f
      Junio C Hamano 提交于
      "git diff", "git status" and anything that internally uses the
      comparison machinery was utterly broken when the difference
      involved a file with "-" as its name.  This was due to the way "git
      diff --no-index" was incorrectly bolted on to the system, making
      any comparison that involves a file "-" at the root level
      incorrectly read from the standard input.
      
      * jc/refactor-diff-stdin:
        diff-index.c: "git diff" has no need to read blob from the standard input
        diff-index.c: unify handling of command line paths
        diff-index.c: do not pretend paths are pathspecs
      106ef55f
    • J
      Merge branch 'mz/empty-rebase-test' into maint · 07873ca7
      Junio C Hamano 提交于
      We did not have test to make sure "git rebase" without extra options
      filters out an empty commit in the original history.
      
      * mz/empty-rebase-test:
        add test case for rebase of empty commit
      07873ca7
    • J
      Merge branch 'js/fast-export-paths-with-spaces' into maint · 12d1ea21
      Junio C Hamano 提交于
      "git fast-export" produced an input stream for fast-import without
      properly quoting pathnames when they contain SPs in them.
      
      * js/fast-export-paths-with-spaces:
        fast-export: quote paths with spaces
      12d1ea21
    • J
      Merge branch 'cw/no-detaching-an-unborn' into maint · 9ea5c632
      Junio C Hamano 提交于
      "git checkout --detach", when you are still on an unborn branch,
      should be forbidden, but it wasn't.
      
      * cw/no-detaching-an-unborn:
        git-checkout: disallow --detach on unborn branch
      9ea5c632
    • J
      Merge branch 'vr/use-our-perl-in-tests' into maint · bb3ed291
      Junio C Hamano 提交于
      Some implementations of Perl terminates "lines" with CRLF even when
      the script is operating on just a sequence of bytes.  Make sure to
      use "$PERL_PATH", the version of Perl the user told Git to use, in
      our tests to avoid unnecessary breakages in tests.
      
      * vr/use-our-perl-in-tests:
        t/README: add a bit more Don'ts
        tests: enclose $PERL_PATH in double quotes
        t/test-lib.sh: export PERL_PATH for use in scripts
        t: Replace 'perl' by $PERL_PATH
      bb3ed291
  2. 12 7月, 2012 15 次提交
    • J
      Git 1.7.11.2 · 8d141a1d
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8d141a1d
    • J
      Merge branch 'jc/maint-blame-unique-abbrev' into maint · b700086d
      Junio C Hamano 提交于
      "git blame" did not try to make sure that the abbreviated commit
      object names in its output are unique.
      
      * jc/maint-blame-unique-abbrev:
        blame: compute abbreviation width that ensures uniqueness
      b700086d
    • J
      Merge branch 'rj/platform-pread-may-be-thread-unsafe' into maint · 2e1e8efc
      Junio C Hamano 提交于
      On Cygwin, the platform pread(2) is not thread safe, just like our own
      compat/ emulation, and cannot be used in the index-pack program.
      Makefile variable NO_THREAD_SAFE_PREAD can be defined to avoid use of
      this function in a threaded program.
      
      * rj/platform-pread-may-be-thread-unsafe:
        index-pack: Disable threading on cygwin
      2e1e8efc
    • J
      Merge branch 'th/diff-no-index-fixes' into maint · 36c5109e
      Junio C Hamano 提交于
      "git diff --no-index" did not correctly handle relative paths and
      did not correctly give exit codes when run under "--quiet" option.
      
      * th/diff-no-index-fixes:
        diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes
        diff: handle relative paths in no-index
      36c5109e
    • J
      Merge branch 'nd/clone-single-fix' into maint · 4ac01b0c
      Junio C Hamano 提交于
      "git clone --single-branch" to clone a single branch did not limit
      the cloning to the specified branch.
      
      * nd/clone-single-fix:
        clone: fix ref selection in --single-branch --branch=xxx
      4ac01b0c
    • J
      Merge branch 'jc/rev-list-simplify-merges-first-parent' into maint · c8382c15
      Junio C Hamano 提交于
      When "git log" gets "--simplify-merges/by-decoration" together with
      "--first-parent", the combination of these options makes the
      simplification logic to use in-core commit objects that haven't been
      examined for relevance, either producing incorrect result or taking
      too long to produce any output.  Teach the simplification logic to
      ignore commits that the first-parent traversal logic ignored when
      both are in effect to work around the issue.
      
      * jc/rev-list-simplify-merges-first-parent:
        revision: ignore side parents while running simplify-merges
        revision: note the lack of free() in simplify_merges()
        revision: "simplify" options imply topo-order sort
      c8382c15
    • J
      Merge branch 'hv/submodule-update-nuke-submodules' into maint · a101eb41
      Junio C Hamano 提交于
      "git add" allows adding a regular file to the path where a submodule
      used to exist, but "git update-index" did not allow an equivalent
      operation to Porcelain writers.
      
      * hv/submodule-update-nuke-submodules:
        update-index: allow overwriting existing submodule index entries
      a101eb41
    • J
      Merge branch 'jk/diff-no-index-pager' into maint · 95c9eb8f
      Junio C Hamano 提交于
      "git diff --no-index" did not work with pagers correctly.
      
      * jk/diff-no-index-pager:
        do not run pager with diff --no-index --quiet
        fix pager.diff with diff --no-index
      95c9eb8f
    • J
      Merge branch 'mm/verify-filename-fix' into maint · 9ca72493
      Junio C Hamano 提交于
      "git diff COPYING HEAD:COPYING" gave a nonsense error message that
      claimed that the treeish HEAD did not have COPYING in it.
      
      * mm/verify-filename-fix:
        verify_filename(): ask the caller to chose the kind of diagnosis
        sha1_name: do not trigger detailed diagnosis for file arguments
      9ca72493
    • J
      Merge branch 'cn/cherry-pick-range-docs' into maint · a0ceb72f
      Junio C Hamano 提交于
      The documentation for "git cherry-pick A B..C" was misleading.
      
      * cn/cherry-pick-range-docs:
        git-cherry-pick.txt: clarify the use of revision range notation
        Documentation: --no-walk is no-op if range is specified
      a0ceb72f
    • J
      Merge branch 'jc/ustar-checksum-is-unsigned' into maint · cf04a660
      Junio C Hamano 提交于
      "git archive" incorrectly computed the header checksum; the symptom
      was observed only when using pathnames with hi-bit set.
      
      * jc/ustar-checksum-is-unsigned:
        archive: ustar header checksum is computed unsigned
      cf04a660
    • J
      Merge branch 'jc/bundle-complete-notice' into maint · e49bf52a
      Junio C Hamano 提交于
      Running "git bundle verify" on a bundle that records a complete
      history said "it requires these 0 commits".
      
      * jc/bundle-complete-notice:
        tweak "bundle verify" of a complete history
      e49bf52a
    • J
      Merge branch 'jc/ls-files-i-dir' into maint · cd733f4f
      Junio C Hamano 提交于
      "git ls-files --exclude=t -i" did not consider anything under t/ as
      excluded, as it did not pay attention to exclusion of leading paths
      while walking the index.  Other two users of excluded() are also
      updated.
      
      * jc/ls-files-i-dir:
        dir.c: make excluded() file scope static
        unpack-trees.c: use path_excluded() in check_ok_to_remove()
        builtin/add.c: use path_excluded()
        path_excluded(): update API to less cache-entry centric
        ls-files -i: micro-optimize path_excluded()
        ls-files -i: pay attention to exclusion of leading paths
      cd733f4f
    • J
      Merge branch 'jc/request-pull-match-tagname' into maint · fb60f344
      Junio C Hamano 提交于
      "git request-pull $url dev" when the tip of "dev" branch was tagged
      with "ext4-for-linus" used the contents from the tag in the output
      but still asked the "dev" branch to be pulled, not the tag.
      
      * jc/request-pull-match-tagname:
        request-pull: really favor a matching tag
      fb60f344
    • J
      cache_name_compare(): do not truncate while comparing paths · d5f53338
      Junio C Hamano 提交于
      We failed to use ce_namelen() equivalent and instead only compared
      up to the CE_NAMEMASK bytes by mistake.  Adding an overlong path
      that shares the same common prefix as an existing entry in the index
      did not add a new entry, but instead replaced the existing one, as
      the result.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d5f53338
  3. 11 7月, 2012 1 次提交
    • J
      commit: fix "--amend --only" with no pathspec · ea2d4ed3
      Jeff King 提交于
      When we do not have any pathspec, we typically disallow an
      explicit "--only", because it makes no sense (your commit
      would, by definition, be empty). But since 6a74642c
      (git-commit --amend: two fixes., 2006-04-20), we have
      allowed "--amend --only" with the intent that it would amend
      the commit, ignoring any contents staged in the index.
      
      However, while that commit allowed the combination, we never
      actually implemented the logic to make it work. The current
      code notices that we have no pathspec and assumes we want to
      do an as-is commit (i.e., the "--only" is ignored).
      
      Instead, we must make sure to follow the partial-commit
      code-path. We also need to tweak the list_paths function to
      handle a NULL pathspec.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ea2d4ed3
  4. 10 7月, 2012 4 次提交
  5. 03 7月, 2012 1 次提交
  6. 02 7月, 2012 2 次提交
  7. 29 6月, 2012 3 次提交
    • J
      diff-index.c: "git diff" has no need to read blob from the standard input · 4682d852
      Junio C Hamano 提交于
      Only "diff --no-index -" does.  Bolting the logic into the low-level
      function diff_populate_filespec() was a layering violation from day
      one.  Move populate_from_stdin() function out of the generic diff.c
      to its only user, diff-index.c.
      
      Also make sure "-" from the command line stays a special token "read
      from the standard input", even if we later decide to sanitize the
      result from prefix_filename() function in a few obvious ways,
      e.g. removing unnecessary "./" prefix, duplicated slashes "//" in
      the middle, etc.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4682d852
    • J
      diff-index.c: unify handling of command line paths · 3b069b1b
      Junio C Hamano 提交于
      Regardless of where in the directory hierarchy you are, "-" on the
      command line means the standard input.  The old code knew too much
      about how the low level machinery uses paths to read from the
      working tree and did not bother to have the same check for "-" when
      the command is run from the top-level.
      
      Unify the codepaths for subdirectory case and toplevel case into one
      and make it clearer.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3b069b1b
    • J
      diff-index.c: do not pretend paths are pathspecs · c20f5926
      Junio C Hamano 提交于
      "git diff --no-index" takes exactly two paths, not pathspecs, and
      has its own way queue_diff() to populate the diff_queue.  Do not
      call diff_tree_setup_paths(), pretending as it takes pathspecs.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c20f5926
  8. 28 6月, 2012 2 次提交
    • J
      fast-export: quote paths with spaces · ff59f6da
      Jay Soffian 提交于
      A path containing a space must be quoted when used as an
      argument to either the copy or rename commands (because
      unlike other commands, the path is not the final thing on
      the line for those commands).
      
      Commit 6280dfdc (fast-export: quote paths in output,
      2011-08-05) previously attempted to fix fast-export's
      quoting by passing all paths through quote_c_style().
      However, that function does not consider the space to be a
      character which requires quoting, so let's special-case the
      space inside print_path(). This will cause space-containing
      paths to also be quoted in other commands where such quoting
      is not strictly necessary, but it does not hurt to do so.
      
      The test from 6280dfdc did not detect this because, while
      it does introduce renames in the export stream, it does not
      actually turn on rename detection, so they were presented as
      pairs of deletions/adds. Using "-M" reveals the bug.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ff59f6da
    • M
      add test case for rebase of empty commit · 2b5ba7b0
      Martin von Zweigbergk 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b5ba7b0
  9. 27 6月, 2012 2 次提交
    • J
      index-pack: Disable threading on cygwin · c0f86547
      Junio C Hamano 提交于
      The Cygwin implementation of pread() is not thread-safe since, just
      like the emulation provided by compat/pread.c, it uses a sequence of
      seek-read-seek calls. In order to avoid failues due to thread-safety
      issues, commit b038a610 disables threading when NO_PREAD is defined.
      (ie when using the emulation code in compat/pread.c).
      
      We introduce a new build variable, NO_THREAD_SAFE_PREAD, which allows
      use to disable the threaded index-pack code on cygwin, in addition to
      the above NO_PREAD case.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c0f86547
    • C
      git-checkout: disallow --detach on unborn branch · 8ced1aa0
      Chris Webb 提交于
      abe19980 (git checkout -b: allow switching out of an unborn branch)
      introduced a bug demonstrated by
      
        git checkout --orphan foo
        git checkout --detach
        git symbolic-ref HEAD
      
      which gives 'refs/heads/(null)'.
      
      This happens because we strbuf_addf(&branch_ref, "refs/heads/%s",
      opts->new_branch) when opts->new_branch can be NULL for --detach.
      
      Catch and forbid this case, adding a test to t2017 to catch it in
      future.
      Signed-off-by: NChris Webb <chris@arachsys.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8ced1aa0