1. 22 4月, 2014 4 次提交
    • J
      Merge git://bogomips.org/git-svn · aeaa7e27
      Junio C Hamano 提交于
      * git://bogomips.org/git-svn:
        Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not given
      aeaa7e27
    • J
      Merge branch 'jx/i18n' · 8fe3ee67
      Junio C Hamano 提交于
      * jx/i18n:
        i18n: mention "TRANSLATORS:" marker in Documentation/CodingGuidelines
        i18n: only extract comments marked with "TRANSLATORS:"
        i18n: remove obsolete comments for translators in diffstat generation
        i18n: fix uncatchable comments for translators in date.c
      8fe3ee67
    • J
      Merge branch 'km/avoid-non-function-return-in-rebase' · 0b17b433
      Junio C Hamano 提交于
      Work around /bin/sh that does not like "return" at the top-level
      of a file that is dot-sourced from inside a function definition.
      
      * km/avoid-non-function-return-in-rebase:
        Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
        rebase: avoid non-function use of "return" on FreeBSD
      0b17b433
    • J
      Merge branch 'ep/shell-command-substitution' · 0e6e1a5f
      Junio C Hamano 提交于
      * ep/shell-command-substitution:
        t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution
        t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution
        git-tag.sh: use the $( ... ) construct for command substitution
        git-revert.sh: use the $( ... ) construct for command substitution
        git-resolve.sh: use the $( ... ) construct for command substitution
        git-repack.sh: use the $( ... ) construct for command substitution
        git-merge.sh: use the $( ... ) construct for command substitution
        git-ls-remote.sh: use the $( ... ) construct for command substitution
        git-fetch.sh: use the $( ... ) construct for command substitution
        git-commit.sh: use the $( ... ) construct for command substitution
        git-clone.sh: use the $( ... ) construct for command substitution
        git-checkout.sh: use the $( ... ) construct for command substitution
        install-webdoc.sh: use the $( ... ) construct for command substitution
        howto-index.sh: use the $( ... ) construct for command substitution
      0e6e1a5f
  2. 19 4月, 2014 7 次提交
    • J
      Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not given · fe191fca
      Johan Herland 提交于
      git-svn by default puts its Subversion-tracking refs directly in
      refs/remotes/*. This runs counter to Git's convention of using
      refs/remotes/$remote/* for storing remote-tracking branches.
      
      Furthermore, combining git-svn with regular git remotes run the risk of
      clobbering refs under refs/remotes (e.g. if you have a git remote
      called "tags" with a "v1" branch, it will overlap with the git-svn's
      tracking branch for the "v1" tag from Subversion.
      
      Even though the git-svn refs stored in refs/remotes/* are not "proper"
      remote-tracking branches (since they are not covered by a proper git
      remote's refspec), they clearly represent a similar concept, and would
      benefit from following the same convention.
      
      For example, if git-svn tracks Subversion branch "foo" at
      refs/remotes/foo, and you create a local branch refs/heads/foo to add
      some commits to be pushed back to Subversion (using "git svn dcommit),
      then it is clearly unhelpful of Git to throw
      
        warning: refname 'foo' is ambiguous.
      
      every time you checkout, rebase, or otherwise interact with the branch.
      
      The existing workaround for this is to supply the --prefix=quux/ to
      git svn init/clone, so that git-svn's tracking branches end up in
      refs/remotes/quux/* instead of refs/remotes/*. However, encouraging
      users to specify --prefix to work around a design flaw in git-svn is
      suboptimal, and not a long term solution to the problem. Instead,
      git-svn should default to use a non-empty prefix that saves
      unsuspecting users from the inconveniences described above.
      
      This patch will only affect newly created git-svn setups, as the
      --prefix option only applies to git svn init (and git svn clone).
      Existing git-svn setups will continue with their existing (lack of)
      prefix. Also, if anyone somehow prefers git-svn's old layout, they
      can recreate that by explicitly passing an empty prefix (--prefix "")
      on the git svn init/clone command line.
      
      The patch changes the default value for --prefix from "" to "origin/",
      updates the git-svn manual page, and fixes the fallout in the git-svn
      testcases.
      
      (Note that this patch might be easier to review using the --word-diff
      and --word-diff-regex=. diff options.)
      
      [ew: squashed description of <= 1.9 behavior into manpage]
      Suggested-by: NThomas Ferris Nicolaisen <tfnico@gmail.com>
      Signed-off-by: NJohan Herland <johan@herland.net>
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      fe191fca
    • J
      Git 2.0-rc0 · cc291953
      Junio C Hamano 提交于
      An early-preview for the upcoming Git 2.0.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cc291953
    • J
      Merge branch 'jk/config-die-bad-number-noreturn' · 531675ad
      Junio C Hamano 提交于
      Squelch a false compiler warning from older gcc.
      
      * jk/config-die-bad-number-noreturn:
        config.c: mark die_bad_number as NORETURN
      531675ad
    • J
      Merge branch 'fc/remote-helper-fixes' · 8f87d548
      Junio C Hamano 提交于
      * fc/remote-helper-fixes:
        remote-bzr: trivial test fix
        remote-bzr: include authors field in pushed commits
        remote-bzr: add support for older versions
        remote-hg: always normalize paths
        remote-helpers: allow all tests running from any dir
      8f87d548
    • J
      Merge branch 'fc/complete-aliased-push' · 961c1b19
      Junio C Hamano 提交于
      * fc/complete-aliased-push:
        completion: fix completing args of aliased "push", "fetch", etc.
      961c1b19
    • J
      Merge branch 'fc/prompt-zsh-read-from-file' · 427ed406
      Junio C Hamano 提交于
      * fc/prompt-zsh-read-from-file:
        prompt: fix missing file errors in zsh
      427ed406
    • J
      i18n: mention "TRANSLATORS:" marker in Documentation/CodingGuidelines · cbcfd4e3
      Junio C Hamano 提交于
      These comments have to have "TRANSLATORS: " at the very beginning
      and have to deviate from the usual multi-line comment formatting
      convention.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cbcfd4e3
  3. 18 4月, 2014 19 次提交
    • E
      t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution · bd368a9b
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bd368a9b
    • E
      t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution · c9b92706
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c9b92706
    • E
      git-tag.sh: use the $( ... ) construct for command substitution · b3528910
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b3528910
    • E
      git-revert.sh: use the $( ... ) construct for command substitution · fb6644a3
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fb6644a3
    • E
      git-resolve.sh: use the $( ... ) construct for command substitution · 6aeb30eb
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6aeb30eb
    • E
      git-repack.sh: use the $( ... ) construct for command substitution · ddbac79d
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ddbac79d
    • E
      git-merge.sh: use the $( ... ) construct for command substitution · 34da37cc
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      34da37cc
    • E
      git-ls-remote.sh: use the $( ... ) construct for command substitution · 1b3cddd2
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b3cddd2
    • E
      git-fetch.sh: use the $( ... ) construct for command substitution · 3e867415
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3e867415
    • E
      git-commit.sh: use the $( ... ) construct for command substitution · 346b54db
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      346b54db
    • E
      git-clone.sh: use the $( ... ) construct for command substitution · add77e84
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      add77e84
    • E
      git-checkout.sh: use the $( ... ) construct for command substitution · 844cb24f
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      844cb24f
    • E
      install-webdoc.sh: use the $( ... ) construct for command substitution · 2c4a050b
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2c4a050b
    • E
      howto-index.sh: use the $( ... ) construct for command substitution · f25f5e61
      Elia Pinto 提交于
      The Git CodingGuidelines prefer the $(...) construct for command
      substitution instead of using the backquotes `...`.
      
      The backquoted form is the traditional method for command
      substitution, and is supported by POSIX.  However, all but the
      simplest uses become complicated quickly.  In particular, embedded
      command substitutions and/or the use of double quotes require
      careful escaping with the backslash character.
      
      The patch was generated by:
      
      for _f in $(find . -name "*.sh")
      do
         sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
      done
      
      and then carefully proof-read.
      Signed-off-by: NElia Pinto <gitter.spiros@gmail.com>
      Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f25f5e61
    • J
      i18n: only extract comments marked with "TRANSLATORS:" · 47fbfded
      Jiang Xin 提交于
      When extract l10n messages, we use "--add-comments" option to keep
      comments right above the l10n messages for references.  But sometimes
      irrelevant comments are also extracted.  For example in the following
      code block, the comment in line 2 will be extracted as comment for the
      l10n message in line 3, but obviously it's wrong.
      
              { OPTION_CALLBACK, 0, "ignore-removal", &addremove_explicit,
                NULL /* takes no arguments */,
                N_("ignore paths removed in the working tree (same as
                --no-all)"),
                PARSE_OPT_NOARG, ignore_removal_cb },
      
      Since almost all comments for l10n translators are marked with the same
      prefix (tag): "TRANSLATORS:", it's safe to only extract comments with
      this special tag.  I.E. it's better to call xgettext as:
      
              xgettext --add-comments=TRANSLATORS: ...
      
      Also tweaks the multi-line comment in "init-db.c", to make it start with
      the proper tag, not "* TRANSLATORS:" (which has a star before the tag).
      Signed-off-by: NJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47fbfded
    • J
      i18n: remove obsolete comments for translators in diffstat generation · d1d96a82
      Jiang Xin 提交于
      Since we do not translate diffstat any more, remove the obsolete comments.
      Signed-off-by: NJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d1d96a82
    • J
      i18n: fix uncatchable comments for translators in date.c · fcaed04d
      Jiang Xin 提交于
      Comment for l10n translators can not be extracted by xgettext if it
      is not right above the l10n tag.  Moving the comment right before
      the l10n tag will fix this issue.
      Reported-by: NBrian Gesiak <modocache@gmail.com>
      Signed-off-by: NJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fcaed04d
    • K
      Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD" · 8cd65967
      Kyle J. McKay 提交于
      This reverts commit 99855ddf.
      
      The workaround 99855ddf introduced to deal with problematic
      "return" statements in scripts run by "dot" commands located
      inside functions only handles one part of the problem.  The
      issue has now been addressed by not using "return" statements
      in this way in the git-rebase--*.sh scripts.
      
      This workaround is therefore no longer necessary, so clean
      up the code by reverting it.
      Signed-off-by: NKyle J. McKay <mackyle@gmail.com>
      Acked-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8cd65967
    • K
      rebase: avoid non-function use of "return" on FreeBSD · 9f50d32b
      Kyle J. McKay 提交于
      Since a1549e10, 15d4bf2e and 01a1e646 (first appearing in v1.8.4)
      the git-rebase--*.sh scripts have used a "return" to stop execution
      of the dot-sourced file and return to the "dot" command that
      dot-sourced it.  The /bin/sh utility on FreeBSD however behaves
      poorly under some circumstances when such a "return" is executed.
      
      In particular, if the "dot" command is contained within a function,
      then when a "return" is executed by the script it runs (that is not
      itself inside a function), control will return from the function
      that contains the "dot" command skipping any statements that might
      follow the dot command inside that function.  Commit 99855ddf (first
      appearing in v1.8.4.1) addresses this by making the "dot" command
      the last line in the function.
      
      Unfortunately the FreeBSD /bin/sh may also execute some statements
      in the script run by the "dot" command that appear after the
      troublesome "return".  The fix in 99855ddf does not address this
      problem.
      
      For example, if you have script1.sh with these contents:
      
      run_script2() {
              . "$(dirname -- "$0")/script2.sh"
              _e=$?
              echo only this line should show
              [ $_e -eq 5 ] || echo expected status 5 got $_e
              return 3
      }
      run_script2
      e=$?
      [ $e -eq 3 ] || { echo expected status 3 got $e; exit 1; }
      
      And script2.sh with these contents:
      
      if [ 5 -gt 3 ]; then
              return 5
      fi
      case bad in *)
              echo always shows
      esac
      echo should not get here
      ! :
      
      When running script1.sh (e.g. '/bin/sh script1.sh' or './script1.sh'
      after making it executable), the expected output from a POSIX shell
      is simply the single line:
      
      only this line should show
      
      However, when run using FreeBSD's /bin/sh, the following output
      appears instead:
      
      should not get here
      expected status 3 got 1
      
      Not only did the lines following the "dot" command in the run_script2
      function in script1.sh get skipped, but additional lines in script2.sh
      following the "return" got executed -- but not all of them (e.g. the
      "echo always shows" line did not run).
      
      These issues can be avoided by not using a top-level "return" in
      script2.sh.  If script2.sh is changed to this:
      
      main() {
              if [ 5 -gt 3 ]; then
                      return 5
              fi
              case bad in *)
                      echo always shows
              esac
              echo should not get here
              ! :
      }
      main
      
      Then it behaves the same when using FreeBSD's /bin/sh as when using
      other more POSIX compliant /bin/sh implementations.
      
      We fix the git-rebase--*.sh scripts in a similar fashion by moving
      the top-level code that contains "return" statements into its own
      function and then calling that as the last line in the script.
      Signed-off-by: NKyle J. McKay <mackyle@gmail.com>
      Acked-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9f50d32b
  4. 17 4月, 2014 6 次提交
  5. 15 4月, 2014 2 次提交
  6. 12 4月, 2014 2 次提交
    • K
      test: fix t5560 on FreeBSD · ff7a1c67
      Kyle J. McKay 提交于
      Since fd0a8c2e (first appearing in v1.7.0), the
      t/t5560-http-backend-noserver.sh test has used a backslash escape
      inside a ${} expansion in order to specify a literal '?' character.
      
      Unfortunately the FreeBSD /bin/sh does not interpret this correctly.
      
      In a POSIX compliant shell, the following:
      
      x='one?two?three'
      echo "${x#*\?}"
      
      Would be expected to produce this:
      
      two?three
      
      When using the FreeBSD /bin/sh instead you get this:
      
      one?two?three
      
      In fact the FreeBSD /bin/sh treats the backslash as a literal
      character to match so that this:
      
      y='one\two\three'
      echo "${y#*\?}"
      
      Produces this unexpected value:
      
      wo\three
      
      In this case the backslash is not only treated literally, it also
      fails to defeat the special meaning of the '?' character.
      
      Instead, we can use the [...] construct to defeat the special meaning
      of the '?' character and match it exactly in a way that works for the
      FreeBSD /bin/sh as well as other POSIX /bin/sh implementations.
      
      Changing the example like so:
      
      x='one?two?three'
      echo "${x#*[?]}"
      
      Produces the expected output using the FreeBSD /bin/sh.
      
      Therefore, change the use of \? to [?] in order to be compatible with
      the FreeBSD /bin/sh which allows t/t5560-http-backend-noserver.sh to
      pass on FreeBSD again.
      Signed-off-by: NKyle J. McKay <mackyle@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ff7a1c67
    • K
      test: fix t7001 cp to use POSIX options · 00764ca1
      Kyle J. McKay 提交于
      Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the
      t7001-mv test has used "cp -a" to perform a copy in several of the
      tests.
      
      However, the "-a" option is not required for a POSIX cp utility and
      some platforms' cp utilities do not support it.
      
      The POSIX equivalent of -a is -R -P -p.
      
      Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works
      on systems with a cp utility that only implements the POSIX
      required set of options and not the "-a" option.
      Signed-off-by: NKyle J. McKay <mackyle@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      00764ca1