1. 23 11月, 2016 1 次提交
    • J
      mailinfo: read local configuration · 3f0ec068
      Junio C Hamano 提交于
      Since b9605bc4 ("config: only read .git/config from configured
      repos", 2016-09-12), we do not read from ".git/config" unless we
      know we are in a repository.  "git mailinfo" however didn't do the
      repository discovery and instead relied on the old behaviour.  This
      was mostly OK because it was merely run as a helper program by other
      porcelain scripts that first chdir's up to the root of the working
      tree.
      
      Teach the command to run a "gentle" version of repository discovery
      so that local configuration variables like mailinfo.scissors are
      honoured.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3f0ec068
  2. 18 11月, 2016 4 次提交
  3. 15 11月, 2016 1 次提交
  4. 14 11月, 2016 1 次提交
  5. 12 11月, 2016 13 次提交
    • J
      Git 2.11.0-rc1 · 3ab22813
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3ab22813
    • J
      Merge branch 'rt/fetch-pack-error-message-fix' · 37181175
      Junio C Hamano 提交于
      An error message in fetch-pack executable that was newly marked for
      translation was misspelt, which has been fixed.
      
      * rt/fetch-pack-error-message-fix:
        fetch-pack.c: correct command at the beginning of an error message
      37181175
    • J
      Merge branch 'ps/common-info-doc' · 12133d52
      Junio C Hamano 提交于
      Doc fix.
      
      * ps/common-info-doc:
        doc: fix location of 'info/' with $GIT_COMMON_DIR
      12133d52
    • J
      Merge branch 'js/pwd-var-vs-pwd-cmd-fix' · 7f2a3921
      Junio C Hamano 提交于
      Last minute fixes to two fixups merged to 'master' recently.
      
      * js/pwd-var-vs-pwd-cmd-fix:
        t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables
      7f2a3921
    • J
      Merge branch 'ls/macos-update' · 332fd565
      Junio C Hamano 提交于
      Portability update and workaround for builds on recent Mac OS X.
      
      * ls/macos-update:
        travis-ci: disable GIT_TEST_HTTPD for macOS
        Makefile: set NO_OPENSSL on macOS by default
      332fd565
    • J
      Merge branch 'js/prepare-sequencer' · 5de732f6
      Junio C Hamano 提交于
      Silence a clang warning introduced by a recently graduated topic.
      
      * js/prepare-sequencer:
        sequencer: silence -Wtautological-constant-out-of-range-compare
      5de732f6
    • J
      Merge branch 'ls/filter-process' · b18f6a00
      Junio C Hamano 提交于
      Test portability improvements and optimization for an
      already-graduated topic.
      
      * ls/filter-process:
        t0021: remove debugging cruft
      b18f6a00
    • J
      Merge branch 'as/merge-attr-sleep' · f5a8ad4c
      Junio C Hamano 提交于
      Fix for a racy false-positive test failure.
      
      * as/merge-attr-sleep:
        t6026: clarify the point of "kill $(cat sleep.pid)"
        t6026: ensure that long-running script really is
        Revert "t6026-merge-attr: don't fail if sleep exits early"
        Revert "t6026-merge-attr: ensure that the merge driver was called"
        t6026-merge-attr: ensure that the merge driver was called
        t6026-merge-attr: don't fail if sleep exits early
      f5a8ad4c
    • R
      fetch-pack.c: correct command at the beginning of an error message · dfbfb9f3
      Ralf Thielow 提交于
      One error message in fetch-pack.c uses 'git fetch_pack' at the beginning
      which is not a git command.  Use 'git fetch-pack' instead.
      Signed-off-by: NRalf Thielow <ralf.thielow@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dfbfb9f3
    • J
      t0021: remove debugging cruft · a0d8b60d
      Junio C Hamano 提交于
      The redirection of the standard error stream to a temporary file is
      a leftover cruft during debugging.  Remove it.
      
      Besides, it is reported by folks on the Windows that the test is
      flaky with this redirection; somebody gets confused and this
      merely-redirected-to file gets marked as delete-pending by git.exe
      and makes it finish with a non-zero exit status when "git checkout"
      finishes.  Windows folks may want to figure that one out, but for
      the purpose of this test, it shouldn't become a show-stopper.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a0d8b60d
    • J
      t6026: clarify the point of "kill $(cat sleep.pid)" · fdf4f6c7
      Johannes Sixt 提交于
      We lengthened the time the leftover process sleeps in the previous
      commit to make sure it will be there while 'git merge' runs and
      finishes.  It therefore needs to be killed before leaving the test.
      And it needs to be killed even when 'git merge' fails, so it has to
      be triggered via test_when_finished mechanism.
      
      Explain all that in a large comment, and move the use site of
      test_when_finished to immediately before 'git merge' invocation,
      where the process is spawned.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fdf4f6c7
    • J
      t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables · 71dd5047
      Johannes Sixt 提交于
      We have to use $PWD instead of $(pwd) because on Windows the latter
      would add a C: style path to bash's Unix-style $PATH variable, which
      becomes confused by the colon after the drive letter. ($PWD is a
      Unix-style path.)
      
      In the case of GIT_ALTERNATE_OBJECT_DIRECTORIES, bash on Windows
      assembles a Unix-style path list with the colon as separators. It
      converts the value to a Windows-style path list with the semicolon as
      path separator when it forwards the variable to git.exe. The same
      confusion happens when bash's original value is contaminated with
      Windows style paths.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      71dd5047
    • P
      doc: fix location of 'info/' with $GIT_COMMON_DIR · 3285b7ba
      Patrick Steinhardt 提交于
      With the introduction of the $GIT_COMMON_DIR variable, the
      repository layout manual was changed to reflect the location for
      many files in case the variable is set. While adding the new
      locations, one typo snuck in regarding the location of the
      'info/' folder, which is falsely claimed to reside at
      "$GIT_COMMON_DIR/index".
      
      Fix the typo to point to "$GIT_COMMON_DIR/info/" instead.
      Signed-off-by: NPatrick Steinhardt <ps@pks.im>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3285b7ba
  6. 11 11月, 2016 9 次提交
  7. 10 11月, 2016 1 次提交
    • J
      create_branch: drop unused "head" parameter · 4bd488ea
      Jeff King 提交于
      This function used to have the caller pass in the current
      value of HEAD, in order to make sure we didn't clobber HEAD.
      In 55c4a673, that logic moved to validate_new_branchname(),
      which just resolves HEAD itself. The parameter to
      create_branch is now unused.
      
      Since we have to update and re-wrap the docstring describing
      the parameters anyway, let's take this opportunity to break
      it out into a list, which makes it easier to find the
      parameters.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4bd488ea
  8. 09 11月, 2016 5 次提交
    • J
      sequencer: silence -Wtautological-constant-out-of-range-compare · 2ae38f2a
      Jeff King 提交于
      When clang compiles sequencer.c, it complains:
      
        sequencer.c:632:14: warning: comparison of constant 2 with
          expression of type 'const enum todo_command' is always
          true [-Wtautological-constant-out-of-range-compare]
                if (command < ARRAY_SIZE(todo_command_strings))
      
      This is because "command" is an enum that may only have two
      values (0 and 1) and the array in question has two elements.
      
      As it turns out, clang is actually wrong here, at least
      according to its own bug tracker:
      
        https://llvm.org/bugs/show_bug.cgi?id=16154
      
      But it's still worth working around this, as the warning is
      present with -Wall, meaning we fail compilation with "make
      DEVELOPER=1".
      
      Casting the enum to size_t sufficiently unconfuses clang. As
      a bonus, it also catches any possible out-of-bounds access
      if the enum takes on a negative value (which shouldn't
      happen either, but again, this is a defensive check).
      Signed-off-by: NJeff King <peff@peff.net>
      2ae38f2a
    • A
      t6026-merge-attr: don't fail if sleep exits early · 734fde2d
      Andreas Schwab 提交于
      Commit 5babb5bd ("t6026-merge-attr: clean up background process at end
      of test case") added a kill command to clean up after the test, but this
      can fail if the sleep command exits before the cleanup is executed.
      Ignore the error from the kill command.
      Signed-off-by: NAndreas Schwab <schwab@suse.de>
      Signed-off-by: NJeff King <peff@peff.net>
      734fde2d
    • 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
  9. 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
  10. 02 11月, 2016 1 次提交