1. 09 9月, 2015 1 次提交
    • J
      t7610: don't use test_config in a subshell · 1a9a23e3
      John Keeping 提交于
      test_config uses test_when_finished to reset the configuration after the
      test, but this does not work inside a subshell.  This does not cause a
      problem here because the first thing the next test does is to set this
      config variable itself, but we are about to add a check that will
      complain when test_when_finished is used in a subshell.
      
      In this case, "subdir" not a submodule so test_config has the same
      effect when run at the top level and can simply be moved out of the
      subshell.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1a9a23e3
  2. 04 9月, 2015 21 次提交
  3. 01 9月, 2015 3 次提交
    • C
      trailer: support multiline title · 5c99995d
      Christian Couder 提交于
      We currently ignore the first line passed to `git interpret-trailers`,
      when looking for the beginning of the trailers.
      
      Unfortunately this does not work well when a commit is created with a
      line break in the title, using for example the following command:
      
      git commit -m 'place of
      code: change we made'
      
      That's why instead of ignoring only the first line, it is better to
      ignore the first paragraph.
      Signed-off-by: NChristian Couder <christian.couder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5c99995d
    • E
      t7300: fix broken && chains · 1733ed3d
      Erik Elfström 提交于
      While we are here, remove some boilerplate by using test_commit.
      Signed-off-by: NErik Elfström <erik.elfstrom@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1733ed3d
    • J
      log: diagnose empty HEAD more clearly · ce113604
      Jeff King 提交于
      If you init or clone an empty repository, the initial
      message from running "git log" is not very friendly:
      
        $ git init
        Initialized empty Git repository in /home/peff/foo/.git/
        $ git log
        fatal: bad default revision 'HEAD'
      
      Let's detect this situation and write a more friendly
      message:
      
        $ git log
        fatal: your current branch 'master' does not have any commits yet
      
      We also detect the case that 'HEAD' points to a broken ref;
      this should be even less common, but is easy to see. Note
      that we do not diagnose all possible cases. We rely on
      resolve_ref, which means we do not get information about
      complex cases. E.g., "--default master" would use dwim_ref
      to find "refs/heads/master", but we notice only that
      "master" does not exist. Similarly, a complex sha1
      expression like "--default HEAD^2" will not resolve as a
      ref.
      
      But that's OK. We fall back to a generic error message in
      those cases, and they are unlikely to be used anyway.
      Catching an empty or broken "HEAD" improves the common case,
      and the other cases are not regressed.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ce113604
  4. 31 8月, 2015 1 次提交
    • D
      commit: don't rewrite shared index unnecessarily · 475a3445
      David Turner 提交于
      Remove a cache invalidation which would cause the shared index to be
      rewritten on as-is commits.
      
      When the cache-tree has changed, we need to update it.  But we don't
      necessarily need to update the shared index.  So setting
      active_cache_changed to SOMETHING_CHANGED is unnecessary.  Instead, we
      let update_main_cache_tree just update the CACHE_TREE_CHANGED bit.
      
      In order to test this, make test-dump-split-index not segfault on
      missing replace_bitmap/delete_bitmap.  This new codepath is not called
      now that the test passes, but is necessary to avoid a segfault when the
      new test is run with the old builtin/commit.c code.
      Signed-off-by: NDavid Turner <dturner@twopensource.com>
      Acked-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      475a3445
  5. 29 8月, 2015 2 次提交
  6. 28 8月, 2015 3 次提交
    • R
      archive-zip: support more than 65535 entries · 88329ca8
      René Scharfe 提交于
      Support more than 65535 entries cleanly by writing a "zip64 end of
      central directory record" (with a 64-bit field for the number of
      entries) before the usual "end of central directory record" (which
      contains only a 16-bit field).  InfoZIP's zip does the same.
      Archives with 65535 or less entries are not affected.
      
      Programs that extract all files like InfoZIP's zip and 7-Zip
      ignored the field and could extract all files already.  Software
      that relies on the ZIP file directory to show a list of contained
      files quickly to simulate to normal directory like Windows'
      built-in ZIP functionality only saw a subset of the included files.
      
      Windows supports ZIP64 since Vista according to
      https://en.wikipedia.org/wiki/Zip_%28file_format%29#ZIP64.
      Suggested-by: NJohannes Schauer <josch@debian.org>
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      88329ca8
    • R
      archive-zip: use a local variable to store the creator version · 0f747f9d
      René Scharfe 提交于
      Use a simpler conditional right next to the code which makes a higher
      creator version necessary -- namely symlink handling and support for
      executable files -- instead of a long line with a ternary operator.
      The resulting code has more lines but is simpler and allows reuse of
      the value easily.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0f747f9d
    • R
      t5004: test ZIP archives with many entries · 19ee2940
      René Scharfe 提交于
      A ZIP file directory has a 16-bit field for the number of entries it
      contains.  There are 64-bit extensions to deal with that.  Demonstrate
      that git archive --format=zip currently doesn't use them and instead
      overflows the field.
      
      InfoZIP's unzip doesn't care about this field and extracts all files
      anyway.  Software that uses the directory for presenting a filesystem
      like view quickly -- notably Windows -- depends on it, but doesn't
      lend itself to an automatic test case easily.  Use InfoZIP's zipinfo,
      which probably isn't available everywhere but at least can provides
      *some* way to check this field.
      
      To speed things up a bit create and commit only a subset of the files
      and build a fake tree out of duplicates and pass that to git archive.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      19ee2940
  7. 27 8月, 2015 1 次提交
  8. 26 8月, 2015 7 次提交
    • J
      Merge branch 'jk/guess-repo-name-regression-fix' into maint · 52f6893d
      Junio C Hamano 提交于
      "git clone $URL" in recent releases of Git contains a regression in
      the code that invents a new repository name incorrectly based on
      the $URL.  This has been corrected.
      
      * jk/guess-repo-name-regression-fix:
        clone: use computed length in guess_dir_name
        clone: add tests for output directory
      52f6893d
    • J
      Merge branch 'jk/test-with-x' into maint · 84deb3ea
      Junio C Hamano 提交于
      Running tests with the "-x" option to make them verbose had some
      unpleasant interactions with other features of the test suite.
      
      * jk/test-with-x:
        test-lib: disable trace when test is not verbose
        test-lib: turn off "-x" tracing during chain-lint check
      84deb3ea
    • J
      Merge branch 'sb/check-return-from-read-ref' into maint · 7a238074
      Junio C Hamano 提交于
      * sb/check-return-from-read-ref:
        transport-helper: die on errors reading refs.
      7a238074
    • J
      Merge branch 'mm/pull-upload-pack' into maint · 425a4c77
      Junio C Hamano 提交于
      "git pull" in recent releases of Git has a regression in the code
      that allows custom path to the --upload-pack=<program>.  This has
      been corrected.
      
      Note that this is irrelevant for 'master' with "git pull" rewritten
      in C.
      
      * mm/pull-upload-pack:
        pull: pass upload_pack only when it was given
        pull.sh: quote $upload_pack when passing it to git-fetch
      425a4c77
    • J
      pull: pass upload_pack only when it was given · 13e0e28f
      Junio C Hamano 提交于
      The upload_pack shell variable is initialized to an empty string, so
      conditional expansion with ${upload_pack+"$upload_pack"} would not
      work very well.  You need a colon there.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      13e0e28f
    • E
      generate-cmdlist: re-implement as shell script · 82aec45b
      Eric Sunshine 提交于
      527ec398 (generate-cmdlist: parse common group commands, 2015-05-21)
      replaced generate-cmdlist.sh with a more functional Perl version,
      generate-cmdlist.perl. The Perl version gleans named tags from a new
      "common groups" section in command-list.txt and recognizes those
      tags in "command list" section entries in place of the old 'common'
      tag. This allows git-help to, not only recognize, but also group
      common commands.
      
      Although the tests require Perl, 527ec398 creates an unconditional
      dependence upon Perl in the build system itself, which can not be
      overridden with NO_PERL. Such a dependency may be undesirable; for
      instance, the 'git-lite' package in the FreeBSD ports tree is
      intended as a minimal Git installation (which may, for example, be
      useful on servers needing only local clone and update capability),
      which, historically, has not depended upon Perl[1].
      
      Therefore, revive generate-cmdlist.sh and extend it to recognize
      "common groups" and its named tags. Retire generate-cmdlist.perl.
      
      [1]: http://thread.gmane.org/gmane.comp.version-control.git/275905/focus=276132Signed-off-by: NEric Sunshine <sunshine@sunshineco.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      82aec45b
    • N
      setup: update the right file in multiple checkouts · 82fde87f
      Nguyễn Thái Ngọc Duy 提交于
      This code is introduced in 23af91d1 (prune: strategies for linked
      checkouts - 2014-11-30), and it's supposed to implement this rule from
      that commit's message:
      
       - linked checkouts are supposed to keep its location in $R/gitdir up
         to date. The use case is auto fixup after a manual checkout move.
      
      Note the name, "$R/gitdir", not "$R/gitfile". Correct the path to be
      updated accordingly.
      
      While at there, make sure I/O errors are not silently dropped.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      82fde87f
  9. 25 8月, 2015 1 次提交
    • J
      rev-list: make it obvious that we do not support notes · 2aea7a51
      Jeff King 提交于
      The rev-list command does not have the internal
      infrastructure to display notes. Running:
      
        git rev-list --notes HEAD
      
      will silently ignore the "--notes" option. Running:
      
        git rev-list --notes --grep=. HEAD
      
      will crash on an assert. Running:
      
        git rev-list --format=%N HEAD
      
      will place a literal "%N" in the output (it does not even
      expand to an empty string).
      
      Let's have rev-list tell the user that it cannot fill the
      user's request, rather than silently producing wrong data.
      Likewise, let's remove mention of the notes options from the
      rev-list documentation.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2aea7a51