1. 11 6月, 2016 5 次提交
  2. 07 6月, 2016 9 次提交
  3. 04 6月, 2016 10 次提交
  4. 02 6月, 2016 5 次提交
    • S
      1df036ea
    • J
      t2300: run git-sh-setup in an environment that better mimics the real life · fe17fc00
      Junio C Hamano 提交于
      When we run scripted Porcelains, "git" potty has set up the $PATH by
      prepending $GIT_EXEC_PATH, the path given by "git --exec-path=$there
      $cmd", etc. already.  Because of this, scripted Porcelains can
      dot-source shell script library like git-sh-setup with simple dot
      without specifying any path.
      
      t2300 however dot-sources git-sh-setup without adjusting $PATH like
      the real "git" potty does.  This has not been a problem so far, but
      once git-sh-setup wants to rely on the $PATH adjustment, just like
      any scripted Porcelains already do, it would become one.  It cannot
      for example dot-source another shell library without specifying the
      full path to it by prefixing $(git --exec-path).
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fe17fc00
    • J
      t5500 & t7403: lose bash-ism "local" · e256eec7
      Junio C Hamano 提交于
      In t5500::check_prot_host_port_path(), diagport is not a variable
      used elsewhere and the function is not recursively called so this
      can simply lose the "local", which may not be supported by shell
      (besides, the function liberally clobbers other variables without
      making them "local").
      
      t7403::reset_submodule_urls() overrides the "root" variable used
      in the test framework for no good reason; its use is not about
      temporarily relocating where the test repositories are created.
      This assignment can be made not to clobber the variable by moving
      them into the subshells it already uses.  Its value is always
      $TRASH_DIRECTORY, so we could use it instead there, and this
      function that is called only once and its two subshells may not be
      necessary (instead, the caller can use "git -C $there config" and
      set a value that is derived from $TRASH_DIRECTORY), but this is a
      minimum fix that is needed to lose "local".
      Helped-by: NJohn Keeping <john@keeping.me.uk>
      Helped-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e256eec7
    • S
      submodule: remove bashism from shell script · 44431df0
      Stefan Beller 提交于
      Junio pointed out `relative_path` was using bashisms via the
      local variables. As the longer term goal is to rewrite most of the
      submodule code in C, do it now.
      Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      44431df0
    • S
      submodule--helper: offer a consistent API · b0f4b408
      Stefan Beller 提交于
      In 48308681 (2016-02-29, git submodule update: have a dedicated helper
      for cloning), the helper communicated errors back only via exit code,
      and dance with printing '#unmatched' in case of error was left to
      git-submodule.sh as it uses the output of the helper and pipes it into
      shell commands. This change makes the helper consistent by never
      printing '#unmatched' in the helper but always handling these piping
      issues in the actual shell script.
      Signed-off-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b0f4b408
  5. 01 6月, 2016 11 次提交
    • M
      Makefile: add $(DEVELOPER_CFLAGS) variable · 51dd3e81
      Matthieu Moy 提交于
      This does not change the behavior, but allows the user to tweak
      DEVELOPER_CFLAGS on the command-line or in a config.mak* file if
      needed.
      
      This also makes the code somewhat cleaner as it follows the pattern
      
      <initialisation of variables>
      <include statements>
      <actual build logic>
      
      by specifying which flags to activate in the first part, and actually
      activating them in the last one.
      Signed-off-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      51dd3e81
    • J
      test-lib: add in-shell "env" replacement · d2554c72
      Jeff King 提交于
      The one-shot environment variable syntax:
      
        FOO=BAR some-program
      
      is unportable when some-program is actually a shell
      function, like test_must_fail (on some shells FOO remains
      set after the function returns, and on others it does not).
      
      We sometimes get around this by using env, like:
      
        test_must_fail env FOO=BAR some-program
      
      But that only works because test_must_fail's arguments are
      themselves a command which can be run. You can't run:
      
        env FOO=BAR test_must_fail some-program
      
      because env does not know about our shell functions. So
      there is no equivalent for test_commit, for example, and one
      must resort to:
      
        (
          FOO=BAR
          export FOO
          test_commit
        )
      
      which is a bit verbose.  Let's add a version of "env" that
      works _inside_ the shell, by creating a subshell, exporting
      variables from its argument list, and running the command.
      
      Its use is demonstrated on a currently-unportable case in
      t4014.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d2554c72
    • J
      Git 2.9-rc1 · 60bd4b1c
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      60bd4b1c
    • J
      Merge branch 'maint' · 257f6f40
      Junio C Hamano 提交于
      * maint:
        More topics for 2.8.4
      257f6f40
    • J
      More topics for 2.8.4 · 4b0891ff
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4b0891ff
    • J
      Merge branch 'sb/submodule-deinit-all' into maint · 3296e1a9
      Junio C Hamano 提交于
      Correct faulty recommendation to use "git submodule deinit ." when
      de-initialising all submodules, which would result in a strange
      error message in a pathological corner case.
      
      * sb/submodule-deinit-all:
        submodule deinit: require '--all' instead of '.' for all submodules
      3296e1a9
    • J
      Merge branch 'bn/http-cookiefile-config' into maint · e646a82c
      Junio C Hamano 提交于
      "http.cookieFile" configuration variable clearly wants a pathname,
      but we forgot to treat it as such by e.g. applying tilde expansion.
      
      * bn/http-cookiefile-config:
        http: expand http.cookieFile as a path
        Documentation: config: improve word ordering for http.cookieFile
      e646a82c
    • J
      Merge branch 'jk/test-send-sh-x-trace-elsewhere' into maint · 68a6e976
      Junio C Hamano 提交于
      Running tests with '-x' option to trace the individual command
      executions is a useful way to debug test scripts, but some tests
      that capture the standard error stream and check what the command
      said can be broken with the trace output mixed in.  When running
      our tests under "bash", however, we can redirect the trace output
      to another file descriptor to keep the standard error of programs
      being tested intact.
      
      * jk/test-send-sh-x-trace-elsewhere:
        test-lib: set BASH_XTRACEFD automatically
      68a6e976
    • J
      Merge branch 'js/name-rev-use-oldest-ref' into maint · 9ee8f940
      Junio C Hamano 提交于
      "git describe --contains" often made a hard-to-justify choice of
      tag to give name to a given commit, because it tried to come up
      with a name with smallest number of hops from a tag, causing an old
      commit whose close descendant that is recently tagged were not
      described with respect to an old tag but with a newer tag.  It did
      not help that its computation of "hop" count was further tweaked to
      penalize being on a side branch of a merge.  The logic has been
      updated to favor using the tag with the oldest tagger date, which
      is a lot easier to explain to the end users: "We describe a commit
      in terms of the (chronologically) oldest tag that contains the
      commit."
      
      * js/name-rev-use-oldest-ref:
        name-rev: include taggerdate in considering the best name
      9ee8f940
    • J
      rebase -i: remove an unnecessary 'rerere' invocation · 7063693d
      Johannes Sixt 提交于
      Interactive rebase uses 'git cherry-pick' and 'git merge' to replay
      commits. Both invoke the 'rerere' machinery when they fail due to merge
      conflicts. Note that all code paths with these two commands also invoke
      the shell function die_with_patch when the commands fail.
      
      Since commit 629716d2 ("rerere: do use multiple variants") the second
      operation of the rerere machinery can be observed by a duplicated
      message "Recorded preimage for 'file'". This second operation records
      the same preimage as the first one and, hence, only wastes cycles.
      Remove the 'git rerere' invocation from die_with_patch.
      
      Shell function die_with_patch can be called after the failure of
      "git commit", too, which also calls into the rerere machinery, but it
      does so only after a successful commit to record the resolution.
      Therefore, it is wrong to call 'git rerere' from die_with_patch after
      "git commit" fails.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Acked-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7063693d
    • R
      perf: make the tests work without a worktree · e2522f2a
      René Scharfe 提交于
      In regular repositories $source_git and $objects_dir contain relative
      paths based on $source.  Go there to allow cp to resolve them.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e2522f2a