1. 12 11月, 2016 1 次提交
  2. 11 11月, 2016 3 次提交
    • J
      Merge branch 'jk/alt-odb-cleanup' · 0538b840
      Junio C Hamano 提交于
      Fix a corner-case regression in a topic that graduated during the
      v2.11 cycle.
      
      * jk/alt-odb-cleanup:
        alternates: re-allow relative paths from environment
      0538b840
    • J
      Merge branch 'jk/filter-process-fix' · 7b2c338c
      Junio C Hamano 提交于
      Test portability improvements and cleanups for t0021.
      
      * jk/filter-process-fix:
        t0021: fix filehandle usage on older perl
        t0021: use $PERL_PATH for rot13-filter.pl
        t0021: put $TEST_ROOT in $PATH
        t0021: use write_script to create rot13 shell script
      7b2c338c
    • J
      Merge branch 'ls/filter-process' · 81cf0b6c
      Junio C Hamano 提交于
      Test portability improvements and optimization for an
      already-graduated topic.
      
      * ls/filter-process:
        t0021: compute file size with a single process instead of a pipeline
        t0021: expect more variations in the output of uniq -c
      81cf0b6c
  3. 09 11月, 2016 3 次提交
    • J
      alternates: re-allow relative paths from environment · 37a95862
      Jeff King 提交于
      Commit 670c359d (link_alt_odb_entry: handle normalize_path
      errors, 2016-10-03) regressed the handling of relative paths
      in the GIT_ALTERNATE_OBJECT_DIRECTORIES variable. It's not
      entirely clear this was ever meant to work, but it _has_
      worked for several years, so this commit restores the
      original behavior.
      
      When we get a path in GIT_ALTERNATE_OBJECT_DIRECTORIES, we
      add it the path to the list of alternate object directories
      as if it were found in objects/info/alternates, but with one
      difference: we do not provide the link_alt_odb_entry()
      function with a base for relative paths. That function
      doesn't turn it into an absolute path, and we end up feeding
      the relative path to the strbuf_normalize_path() function.
      
      Most relative paths break out of the top-level directory
      (e.g., "../foo.git/objects"), and thus normalizing fails.
      Prior to 670c359d, we simply ignored the error, and due to
      the way normalize_path_copy() was implemented it happened to
      return the original path in this case. We then accessed the
      alternate objects using this relative path.
      
      By storing the relative path in the alt_odb list, the path
      is relative to wherever we happen to be at the time we do an
      object lookup. That means we look from $GIT_DIR in a bare
      repository, and from the top of the worktree in a non-bare
      repository.
      
      If this were being designed from scratch, it would make
      sense to pick a stable location (probably $GIT_DIR, or even
      the object directory) and use that as the relative base,
      turning the result into an absolute path.  However, given
      the history, at this point the minimal fix is to match the
      pre-670c359d behavior.
      
      We can do this simply by ignoring the error when we have no
      relative base and using the original value (which we now
      reliably have, thanks to strbuf_normalize_path()).
      
      That still leaves us with a relative path that foils our
      duplicate detection, and may act strangely if we ever
      chdir() later in the process. We could solve that by storing
      an absolute path based on getcwd(). That may be a good
      future direction; for now we'll do just the minimum to fix
      the regression.
      
      The new t5615 script demonstrates the fix in its final three
      tests. Since we didn't have any tests of the alternates
      environment variable at all, it also adds some tests of
      absolute paths.
      Reported-by: NBryan Turner <bturner@atlassian.com>
      Signed-off-by: NJeff King <peff@peff.net>
      37a95862
    • J
      t0021: compute file size with a single process instead of a pipeline · ec2e8b3d
      Johannes Sixt 提交于
      Avoid unwanted coding patterns (prodigal use of pipelines), and in
      particular a useless use of cat.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJeff King <peff@peff.net>
      ec2e8b3d
    • J
      t0021: expect more variations in the output of uniq -c · 038212c4
      Johannes Sixt 提交于
      Some versions of uniq -c write the count left-justified, other version
      write it right-justified. Be prepared for both kinds.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJeff King <peff@peff.net>
      038212c4
  4. 03 11月, 2016 4 次提交
    • J
      t0021: fix filehandle usage on older perl · 4821494e
      Jeff King 提交于
      The rot13-filter.pl script calls methods on implicitly
      defined filehandles (STDOUT, and the result of an open()
      call).  Prior to perl 5.13, these methods are not
      automatically loaded, and perl will complain with:
      
        Can't locate object method "flush" via package "IO::Handle"
      
      Let's explicitly load IO::File (which inherits from
      IO::Handle). That's more than we need for just "flush", but
      matches what perl has done since:
      
        http://perl5.git.perl.org/perl.git/commit/15e6cdd91beb4cefae4b65e855d68cf64766965dSigned-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4821494e
    • J
      t0021: use $PERL_PATH for rot13-filter.pl · f272696a
      Jeff King 提交于
      The rot13-filter.pl script hardcodes "#!/usr/bin/perl", and
      does not respect $PERL_PATH at all. That is a problem if the
      system does not have perl at that path, or if it has a perl
      that is too old to run a complicated script like the
      rot13-filter (but PERL_PATH points to a more modern one).
      
      We can fix this by using write_script() to create a new copy
      of the script with the correct #!-line. In theory we could
      move the whole script inside t0021-conversion.sh rather than
      having it as an auxiliary file, but it's long enough that
      it just makes things harder to read.
      
      As a bonus, we can stop using the full path to the script in
      the filter-process config we add (because the trash
      directory is in our PATH). Not only is this shorter, but it
      sidesteps any shell-quoting issues. The original was broken
      when $TEST_DIRECTORY contained a space, because it was
      interpolated in the outer script.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f272696a
    • J
      t0021: put $TEST_ROOT in $PATH · 30030a36
      Jeff King 提交于
      We create a rot13.sh script in the trash directory, but need
      to call it by its full path when we have moved our cwd to
      another directory. Let's just put $TEST_ROOT in our $PATH so
      that the script is always found.
      
      This is a minor convenience for rot13.sh, but will be a
      major one when we switch rot13-filter.pl to a script in the
      same directory, as it means we will not have to deal with
      shell quoting inside the filter-process config.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      30030a36
    • J
      t0021: use write_script to create rot13 shell script · cbb6707b
      Jeff King 提交于
      This avoids us fooling around with $SHELL_PATH and the
      executable bit ourselves.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cbb6707b
  5. 02 11月, 2016 7 次提交
  6. 01 11月, 2016 12 次提交
    • J
      Git 2.11-rc0 · 1fe8f2cf
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1fe8f2cf
    • J
      Merge branch 'nd/test-helpers' · ab3ad63c
      Junio C Hamano 提交于
      Update to the test framework made in 2.9 timeframe broke running
      the tests under valgrind, which has been fixed.
      
      * nd/test-helpers:
        valgrind: support test helpers
      ab3ad63c
    • J
      Merge branch 'sc/fmt-merge-msg-doc-markup-fix' · 590f0bfe
      Junio C Hamano 提交于
      Documentation fix.
      
      * sc/fmt-merge-msg-doc-markup-fix:
        Documentation/fmt-merge-msg: fix markup in example
      590f0bfe
    • J
      Merge branch 'ak/sh-setup-dot-source-i18n-fix' · da14d73d
      Junio C Hamano 提交于
      Recent update to git-sh-setup (a library of shell functions that
      are used by our in-tree scripted Porcelain commands) included
      another shell library git-sh-i18n without specifying where it is,
      relying on the $PATH.  This has been fixed to be more explicit by
      prefixing $(git --exec-path) output in front.
      
      * ak/sh-setup-dot-source-i18n-fix:
        git-sh-setup: be explicit where to dot-source git-sh-i18n from.
      da14d73d
    • J
      Merge branch 'rs/commit-pptr-simplify' · 2f445c17
      Junio C Hamano 提交于
      Code simplification.
      
      * rs/commit-pptr-simplify:
        commit: simplify building parents list
      2f445c17
    • J
      Merge branch 'jk/rebase-config-insn-fmt-docfix' · 702b6a6f
      Junio C Hamano 提交于
      Documentation fix.
      
      * jk/rebase-config-insn-fmt-docfix:
        doc: fix missing "::" in config list
      702b6a6f
    • J
      Merge branch 'ak/pre-receive-hook-template-modefix' · 3d0ff881
      Junio C Hamano 提交于
      A trivial clean-up to a recently graduated topic.
      
      * ak/pre-receive-hook-template-modefix:
        pre-receive.sample: mark it executable
      3d0ff881
    • J
      Merge branch 'jk/common-main' · b8171981
      Junio C Hamano 提交于
      A trivial clean-up to a recently graduated topic.
      
      * jk/common-main:
        git-compat-util: move content inside ifdef/endif guards
      b8171981
    • J
      Merge branch 'aw/numbered-stash' · 9fa1f902
      Junio C Hamano 提交于
      The user always has to say "stash@{$N}" when naming a single
      element in the default location of the stash, i.e. reflogs in
      refs/stash.  The "git stash" command learned to accept "git stash
      apply 4" as a short-hand for "git stash apply stash@{4}".
      
      * aw/numbered-stash:
        stash: allow stashes to be referenced by index only
      9fa1f902
    • J
      Merge branch 'jt/trailer-with-cruft' · cabb79d8
      Junio C Hamano 提交于
      Update "interpret-trailers" machinery and teaches it that people in
      real world write all sorts of crufts in the "trailer" that was
      originally designed to have the neat-o "Mail-Header: like thing"
      and nothing else.
      
      * jt/trailer-with-cruft:
        trailer: support values folded to multiple lines
        trailer: forbid leading whitespace in trailers
        trailer: allow non-trailers in trailer block
        trailer: clarify failure modes in parse_trailer
        trailer: make args have their own struct
        trailer: streamline trailer item create and add
        trailer: use list.h for doubly-linked list
        trailer: improve const correctness
      cabb79d8
    • J
      Merge branch 'ls/filter-process' · dbaa6bdc
      Junio C Hamano 提交于
      The smudge/clean filter API expect an external process is spawned
      to filter the contents for each path that has a filter defined.  A
      new type of "process" filter API has been added to allow the first
      request to run the filter for a path to spawn a single process, and
      all filtering need is served by this single process for multiple
      paths, reducing the process creation overhead.
      
      * ls/filter-process:
        contrib/long-running-filter: add long running filter example
        convert: add filter.<driver>.process option
        convert: prepare filter.<driver>.process option
        convert: make apply_filter() adhere to standard Git error handling
        pkt-line: add functions to read/write flush terminated packet streams
        pkt-line: add packet_write_gently()
        pkt-line: add packet_flush_gently()
        pkt-line: add packet_write_fmt_gently()
        pkt-line: extract set_packet_header()
        pkt-line: rename packet_write() to packet_write_fmt()
        run-command: add clean_on_exit_handler
        run-command: move check_pipe() from write_or_die to run_command
        convert: modernize tests
        convert: quote filter names in error messages
      dbaa6bdc
    • J
      Merge branch 'ls/git-open-cloexec' · 906d6906
      Junio C Hamano 提交于
      Git generally does not explicitly close file descriptors that were
      open in the parent process when spawning a child process, but most
      of the time the child does not want to access them. As Windows does
      not allow removing or renaming a file that has a file descriptor
      open, a slow-to-exit child can even break the parent process by
      holding onto them.  Use O_CLOEXEC flag to open files in various
      codepaths.
      
      * ls/git-open-cloexec:
        read-cache: make sure file handles are not inherited by child processes
        sha1_file: open window into packfiles with O_CLOEXEC
        sha1_file: rename git_open_noatime() to git_open()
      906d6906
  7. 31 10月, 2016 3 次提交
    • A
      git-sh-setup: be explicit where to dot-source git-sh-i18n from. · 1073094f
      Anders Kaseorg 提交于
      d323c6b6 ("i18n: git-sh-setup.sh: mark strings for translation",
      2016-06-17) started to dot-source git-sh-i18n shell script library,
      assuming that $PATH is already adjusted for our scripts, namely,
      $GIT_EXEC_PATH is at the beginning of $PATH.
      
      Old contrib scripts like contrib/convert-grafts-to-replace-refs.sh
      and contrib/rerere-train.sh and third-party scripts like guilt may
      however be using this as ". $(git --exec-path)/git-sh-setup",
      without satisfying that assumption.  Be more explicit by specifying
      its path prefixed with "$(git --exec-path)/". to be safe.
      
      While we’re here, move the sourcing of git-sh-i18n below the shell
      portability fixes.
      Signed-off-by: NAnders Kaseorg <andersk@mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1073094f
    • R
      commit: simplify building parents list · de9f7fa3
      René Scharfe 提交于
      Push pptr down into the FROM_MERGE branch of the if/else statement,
      where it's actually used, and call commit_list_append() for appending
      elements instead of playing tricks with commit_list_insert().  Call
      copy_commit_list() in the amend branch instead of open-coding it.  Don't
      bother setting pptr in the final branch as it's not used thereafter.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      de9f7fa3
    • J
      doc: fix missing "::" in config list · 6d834ac8
      Jeff King 提交于
      The rebase.instructionFormat option is missing its "::" to
      tell AsciiDoc that it's a list entry. As a result, the
      option name gets lumped into the description in one big
      paragraph.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6d834ac8
  8. 29 10月, 2016 7 次提交