1. 04 4月, 2014 9 次提交
  2. 19 3月, 2014 15 次提交
    • J
      Git 1.9.1 · cee0c275
      Junio C Hamano 提交于
      The version numbering scheme has changed since Git 1.9 and we
      dropped the third dewey-decimal from the traditional numbering
      (e.g. both 1.8.4 and 1.8.5 were major feature releases).  This
      release 1.9.1 is the first maintenance relase for Git 1.9.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cee0c275
    • J
      Merge branch 'jk/clean-d-pathspec' into maint · 9526473f
      Junio C Hamano 提交于
      "git clean -d pathspec" did not use the given pathspec correctly
      and ended up cleaning too much.
      
      * jk/clean-d-pathspec:
        clean: simplify dir/not-dir logic
        clean: respect pathspecs with "-d"
      9526473f
    • J
      Merge branch 'da/difftool-git-files' into maint · 01e13d02
      Junio C Hamano 提交于
      "git difftool" misbehaved when the repository is bound to the
      working tree with the ".git file" mechanism, where a textual file
      ".git" tells us where it is.
      
      * da/difftool-git-files:
        t7800: add a difftool test for .git-files
        difftool: support repositories with .git-files
      01e13d02
    • J
      Merge branch 'jk/remote-pushremote-config-reading' into maint · 4097a254
      Junio C Hamano 提交于
      "git push" did not pay attention to branch.*.pushremote if it is
      defined earlier than remote.pushdefault; the order of these two
      variables in the configuration file should not matter, but it did by
      mistake.
      
      * jk/remote-pushremote-config-reading:
        remote: handle pushremote config in any order
      4097a254
    • J
      Merge branch 'jk/commit-dates-parsing-fix' into maint · 8aac6c97
      Junio C Hamano 提交于
      Codepaths that parse timestamps in commit objects have been
      tightened.
      
      * jk/commit-dates-parsing-fix:
        show_ident_date: fix tz range check
        log: do not segfault on gmtime errors
        log: handle integer overflow in timestamps
        date: check date overflow against time_t
        fsck: report integer overflow in author timestamps
        t4212: test bogus timestamps with git-log
      8aac6c97
    • J
      Merge branch 'tr/diff-submodule-no-reuse-worktree' into maint · a5aca6e8
      Junio C Hamano 提交于
      "git diff --external-diff" incorrectly fed the submodule directory
      in the working tree to the external diff driver when it knew it is
      the same as one of the versions being compared.
      
      * tr/diff-submodule-no-reuse-worktree:
        diff: do not reuse_worktree_file for submodules
      a5aca6e8
    • J
      Merge branch 'nd/reset-setup-worktree' into maint · 1f569775
      Junio C Hamano 提交于
      "git reset" needs to refresh the index when working in a working
      tree (it can also be used to match the index to the HEAD in an
      otherwise bare repository), but it failed to set up the working
      tree properly, causing GIT_WORK_TREE to be ignored.
      
      * nd/reset-setup-worktree:
        reset: optionally setup worktree and refresh index on --mixed
      1f569775
    • J
      Merge branch 'jc/check-attr-honor-working-tree' into maint · a8b31316
      Junio C Hamano 提交于
      "git check-attr" when working on a repository with a working tree
      did not work well when the working tree was specified via the
      --work-tree (and obviously with --git-dir) option.
      
      * jc/check-attr-honor-working-tree:
        check-attr: move to the top of working tree when in non-bare repository
        t0003: do not chdir the whole test process
      a8b31316
    • J
      Merge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint · 6d011b8e
      Junio C Hamano 提交于
      "merge-recursive" was broken in 1.7.7 era and stopped working in an
      empty (temporary) working tree, when there are renames involved.
      This has been corrected.
      
      * bk/refresh-missing-ok-in-merge-recursive:
        merge-recursive.c: tolerate missing files while refreshing index
        read-cache.c: extend make_cache_entry refresh flag with options
        read-cache.c: refactor --ignore-missing implementation
        t3030-merge-recursive: test known breakage with empty work tree
      6d011b8e
    • J
      Merge branch 'ds/rev-parse-required-args' into maint · c7b31732
      Junio C Hamano 提交于
      "git rev-parse" was loose in rejecting command line arguments that
      do not make sense, e.g. "--default" without the required value for
      that option.
      
      * ds/rev-parse-required-args:
        rev-parse: check i before using argv[i] against argc
      c7b31732
    • J
      Merge branch 'jk/config-path-include-fix' into maint · 6f016677
      Junio C Hamano 提交于
      include.path variable (or any variable that expects a path that can
      use ~username expansion) in the configuration file is not a boolean,
      but the code failed to check it.
      
      * jk/config-path-include-fix:
        handle_path_include: don't look at NULL value
        expand_user_path: do not look at NULL path
      6f016677
    • J
      Merge branch 'nd/diff-quiet-stat-dirty' into maint · 34120a5f
      Junio C Hamano 提交于
      "git diff --quiet -- pathspec1 pathspec2" sometimes did not return
      correct status value.
      
      * nd/diff-quiet-stat-dirty:
        diff: do not quit early on stat-dirty files
        diff.c: move diffcore_skip_stat_unmatch core logic out for reuse later
      34120a5f
    • J
      Merge branch 'nd/http-fetch-shallow-fix' into maint · 1030d4c8
      Junio C Hamano 提交于
      Attempting to deepen a shallow repository by fetching over smart
      HTTP transport failed in the protocol exchange, when no-done
      extension was used.  The fetching side waited for the list of
      shallow boundary commits after the sending end stopped talking to
      it.
      
      * nd/http-fetch-shallow-fix:
        t5537: move http tests out to t5539
        fetch-pack: fix deepen shallow over smart http with no-done cap
        protocol-capabilities.txt: document no-done
        protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt
        pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'
        test: rename http fetch and push test files
        tests: auto-set LIB_HTTPD_PORT from test name
      1030d4c8
    • J
      Merge branch 'nd/submodule-pathspec-ending-with-slash' into maint · 6a0556e4
      Junio C Hamano 提交于
      Allow "git cmd path/", when the 'path' is where a submodule is
      bound to the top-level working tree, to match 'path', despite the
      extra and unnecessary trailing slash (such a slash is often
      given by command line completion).
      
      * nd/submodule-pathspec-ending-with-slash:
        clean: use cache_name_is_other()
        clean: replace match_pathspec() with dir_path_match()
        pathspec: pass directory indicator to match_pathspec_item()
        match_pathspec: match pathspec "foo/" against directory "foo"
        dir.c: prepare match_pathspec_item for taking more flags
        pathspec: rename match_pathspec_depth() to match_pathspec()
        pathspec: convert some match_pathspec_depth() to dir_path_match()
        pathspec: convert some match_pathspec_depth() to ce_path_match()
      6a0556e4
    • U
      test-lib.sh: do not "echo" caller-supplied strings · cb1aefda
      Uwe Storbeck 提交于
      In some places we "echo" a string that is supplied by the calling
      test script and may contain backslash sequences. The echo command
      of some shells, most notably "dash", interprets these backslash
      sequences (POSIX.1 allows this) which may scramble the test
      output.
      Signed-off-by: NUwe Storbeck <uwe@ibr.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cb1aefda
  3. 18 3月, 2014 5 次提交
  4. 15 3月, 2014 1 次提交
    • J
      t/lib-terminal: make TTY a lazy prerequisite · 7e27173e
      Jeff King 提交于
      When lib-terminal.sh is sourced by a test script, we
      immediately set up the TTY prerequisite. We do so inside a
      test_expect_success, because that nicely isolates any
      generated output.
      
      However, this early test can interfere with a script that
      later wants to skip all tests (e.g., t5541 then goes on to
      set up the httpd server, and wants to skip_all if that
      fails). TAP output doesn't let us skip everything after we
      have already run at least one test.
      
      We could fix this by reordering the inclusion of
      lib-terminal.sh in t5541 to go after the httpd setup.  That
      solves this case, but we might eventually hit a case with
      circular dependencies, where either lib-*.sh include might
      want to skip_all after the other has run a test.  So
      instead, let's just remove the ordering constraint entirely
      by doing the setup inside a test_lazy_prereq construct,
      rather than in a regular test.  We never cared about the
      test outcome anyway (it was written to always succeed).
      
      Note that in addition to setting up the prerequisite, the
      current test also defines test_terminal. Since we can't
      affect the environment from a lazy_prereq, we have to hoist
      that out. We previously depended on it _not_ being defined
      when the TTY prereq isn't set as a way to ensure that tests
      properly declare their dependency on TTY. However, we still
      cover the case (see the in-code comment for details).
      Reported-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7e27173e
  5. 14 3月, 2014 2 次提交
  6. 13 3月, 2014 4 次提交
  7. 12 3月, 2014 3 次提交
    • J
      builtin/mv: fix out of bounds write · 89ccc1b0
      John Keeping 提交于
      When commit a88c915d (mv: move submodules using a gitfile, 2013-07-30)
      added the submodule_gitfile array, it was not added to the block that
      enlarges the arrays when we are moving a directory so that we do not
      have to worry about it being a directory when we perform the actual
      move.  After this, the loop continues over the enlarged set of sources.
      
      Since we assume that submodule_gitfile has size argc, if any of the
      items in the source directory are submodules we are guaranteed to write
      beyond the end of submodule_gitfile.
      
      Fix this by realloc'ing submodule_gitfile at the same time as the other
      arrays.
      Reported-by: NGuillaume Gelin <contact@ramnes.eu>
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      89ccc1b0
    • J
      clean: simplify dir/not-dir logic · 1f2e1088
      Jeff King 提交于
      When we get a list of paths from read_directory, we further
      prune it to create the final list of items to remove. The
      code paths for directories and non-directories repeat the
      same "add to list" code.
      
      This patch restructures the code so that we don't repeat
      ourselves. Also, by following a "if (condition) continue"
      pattern like the pathspec check above, it makes it more
      obvious that the conditional is about excluding directories
      under certain circumstances.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1f2e1088
    • J
      clean: respect pathspecs with "-d" · cf424f5f
      Jeff King 提交于
      git-clean uses read_directory to fill in a `struct dir` with
      potential hits. However, read_directory does not actually
      check against our pathspec. It uses a simplified version
      that may turn up false positives. As a result, we need to
      check that any hits match our pathspec. We do so reliably
      for non-directories. For directories, if "-d" is not given
      we check that the pathspec matched exactly (i.e., we are
      even stricter, and require an explicit "git clean foo" to
      clean "foo/"). But if "-d" is given, rather than relaxing
      the exact match to allow a recursive match, we do not check
      the pathspec at all.
      
      This regression was introduced in 113f10f2 (Make git-clean a
      builtin, 2007-11-11).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cf424f5f
  8. 08 3月, 2014 1 次提交
    • J
      show_ident_date: fix tz range check · 3f419d45
      Jeff King 提交于
      Commit 1dca155f (log: handle integer overflow in
      timestamps, 2014-02-24) tried to catch integer overflow
      coming from strtol() on the timezone field by comparing against
      LONG_MIN/LONG_MAX. However, the intermediate "tz" variable
      is an "int", which means it can never be LONG_MAX on LP64
      systems; we would truncate the output from strtol before the
      comparison.
      
      Clang's -Wtautological-constant-out-of-range-compare notices
      this and rightly complains.
      
      Let's instead store the result of strtol in a long, and then
      compare it against INT_MIN/INT_MAX. This will catch overflow
      from strtol, and also overflow when we pass the result as an
      int to show_date.
      Reported-by: NEric Sunshine <sunshine@sunshineco.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3f419d45