1. 15 7月, 2014 13 次提交
    • J
      revert: add t3513 for submodule updates · 1621c99c
      Jens Lehmann 提交于
      Test that the revert command updates the work tree as expected (for
      submodule changes which don't result in conflicts). Add a helper function
      to first revert the checked out target commit to make the last revert
      produce the to-be-tested work tree.
      
      Set the KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT and
      KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR switches to
      document that revert has the similar failures.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1621c99c
    • J
      stash: add t3906 for submodule updates · da7fe3fb
      Jens Lehmann 提交于
      Test that the stash apply command updates the work tree as expected for
      changes which don't result in conflicts. To make that work add a helper
      function that uses read-tree to apply the changes of the target commit
      to the work tree, then stashes these changes and at last applies that
      stash.
      
      Implement the KNOWN_FAILURE_STASH_DOES_IGNORE_SUBMODULE_CHANGES switch
      and reuse two other already present switches to expect the known
      failure that stash does ignore submodule changes.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      da7fe3fb
    • J
      am: add t4255 for submodule updates · 23e2f388
      Jens Lehmann 提交于
      Test that the am command updates the work tree as expected (for submodule
      changes which don't result in conflicts). To make that work add two
      helper functions that use format-patch to create the input for am.
      
      Add the KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
      switch to expect the known failure that --no-ff merges attempt to merge
      the new files in the former submodule directory with those of the removed
      submodule.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      23e2f388
    • J
      cherry-pick: add t3512 for submodule updates · 283f56a4
      Jens Lehmann 提交于
      Test that the cherry-pick command updates the work tree as expected (for
      submodule changes which don't result in conflicts).
      
      Set KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
      and KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
      document that cherry-pick has the same --no-ff known failures merge has.
      
      Implement the KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT switch to expect
      the known failure that while cherry picking just a SHA-1 update for an
      ignored submodule the commit incorrectly fails with "The previous
      cherry-pick is now empty, possibly due to conflict resolution.".
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      283f56a4
    • J
      pull: add t5572 for submodule updates · 921f50b4
      Jens Lehmann 提交于
      Test that the pull command updates the work tree as expected (for
      submodule changes which don't result in conflicts) when used without
      arguments or with the '--ff', '--ff-only' and '--no-ff' flag each. Add
      helper functions to reset the branch to be updated to to the current
      HEAD so that pull is doing the transition from HEAD to the given branch.
      
      Set KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
      and KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
      document that pull has the same --no-ff known failures merge has.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      921f50b4
    • J
      rebase: add t3426 for submodule updates · c7e69168
      Jens Lehmann 提交于
      Test that the rebase command updates the work tree as expected for
      changes which don't result in conflicts. To make that work add two
      helper functions that add a commit only touching files and then
      revert it. This allows to rebase the target commit over these two
      and to compare the result.
      
      Set KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
      document that "replace directory with submodule" fails for an
      interactive rebase because a directory "sub1" already exists.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c7e69168
    • J
      merge: add t7613 for submodule updates · 663ed39a
      Jens Lehmann 提交于
      Test that the merge command updates the work tree as expected (for
      submodule changes which don't result in conflicts) when used without
      arguments or with the '--ff', '--ff-only' and '--no-ff' flag.
      
      Implement the KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR
      switch to expect the known failure that --no-ff merges do not create the
      empty submodule directory.
      
      The KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
      switch is also implemented to expect the known failure that --no-ff
      merges attempt to merge the new files in the former submodule directory
      with those of the removed submodule.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      663ed39a
    • J
      bisect: add t6041 for submodule updates · 8f8ba56b
      Jens Lehmann 提交于
      Test that the bisect command updates the work tree as expected. To make
      that work with the new submodule test framework a git_bisect helper
      function is added. This adds a commit after the one given to be switched
      to and makes that one the bad commit. The starting point is then given to
      bisect as the good commit which makes bisect change the work tree to the
      commit in between, which is the commit given.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8f8ba56b
    • J
      reset: add t7112 for submodule updates · 8ef85694
      Jens Lehmann 提交于
      Test that the reset command updates the work tree as expected for changes
      with '--keep', '--merge' (for changes which don't result in conflicts) and
      '--hard'.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8ef85694
    • J
      read-tree: add t1013 for submodule updates · 48294e1d
      Jens Lehmann 提交于
      Test that the read-tree command updates the work tree as expected for
      changes which don't result in conflicts with the '-m' and '--reset' flag.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      48294e1d
    • J
      apply: add t4137 for submodule updates · 558643e1
      Jens Lehmann 提交于
      Test that the apply command updates the work tree as expected for the
      '--index' and the '--3way' options (for submodule changes which don't
      result in conflicts).
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      558643e1
    • J
      checkout: call the new submodule update test framework · d78ecca5
      Jens Lehmann 提交于
      Test that the checkout command updates the work tree as expected with
      and without the '-f' flag.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d78ecca5
    • J
      submodules: add the lib-submodule-update.sh test library · 42639d23
      Jens Lehmann 提交于
      Add this test library to simplify covering all combinations of submodule
      update scenarios without having to add those to a test of each work tree
      manipulating command over and over again.
      
      The functions test_submodule_switch() and test_submodule_forced_switch()
      are intended to be called from a test script with a single argument. This
      argument is either a work tree manipulating command (including any command
      line options) or a function (when more than a single git command is needed
      to switch work trees from the current HEAD to another commit). This
      command (or function) is passed a target branch as argument. The two new
      functions check that each submodule transition is handled as expected,
      which currently means that submodule work trees are not affected until
      "git submodule update" is called. The "forced" variant is for commands
      using their '-f' or '--hard' option and expects them to overwrite local
      modifications as a result. Each of these two functions contains 14
      tests_expect_* calls.
      
      Calling one of these test functions the first time creates a repository
      named "submodule_update_repo". At first it contains two files, then a
      single submodule is added in another commit followed by commits covering
      all relevant submodule modifications. This repository is newly cloned into
      the "submodule_update" for each test_expect_* to avoid interference
      between different parts of the test functions (some to-be-tested commands
      also manipulate refs along with the work tree, e.g. "git reset").
      
      Follow-up commits will then call these two test functions for all work
      tree manipulating commands (with a combination of all their options
      relevant to what they do with the work tree) making sure they work as
      expected. Later this test library will be extended to cover merges
      resulting in conflicts too. Also it is intended to be easily extendable
      for the recursive update functionality, where even more combinations of
      submodule modifications have to be tested for.
      
      This version documents two bugs in current Git with expected failures:
      
      *) When a submodule is replaced with a tracked file of the same name the
         submodule work tree including any local modifications (and even the
         whole history if it uses a .git directory instead of a gitfile!) is
         silently removed.
      
      *) Forced work tree updates happily manipulate files in the directory of a
         submodule that has just been removed in the superproject (but is of
         course still present in the work tree due to the way submodules are
         currently handled). This becomes dangerous when files in the submodule
         directory are overwritten by files from the new superproject commit, as
         any modifications to the submodule files will be lost) and is expected
         to also destroy history in the - admittedly unlikely case - the new
         commit adds a file named ".git" to the submodule directory.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      42639d23
  2. 21 6月, 2014 1 次提交
  3. 17 6月, 2014 26 次提交
    • J
      Third batch for 2.1 · cb682f8c
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cb682f8c
    • J
      Merge branch 'ib/test-selectively-run' · 7e1a5381
      Junio C Hamano 提交于
      Allow specifying only certain individual test pieces to be run
      using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'").
      
      * ib/test-selectively-run:
        t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests
        test-lib: '--run' to run only specific tests
        test-lib: tests skipped by GIT_SKIP_TESTS say so
        test-lib: document short options in t/README
      7e1a5381
    • J
      Merge branch 'ta/string-list-init' · c6d3abbf
      Junio C Hamano 提交于
      * ta/string-list-init:
        string-list: spell all values out that are given to a string_list initializer
      c6d3abbf
    • J
      Merge branch 'jm/dedup-test-config' · bbfa0cc7
      Junio C Hamano 提交于
      * jm/dedup-test-config:
        t/t7810-grep.sh: remove duplicate test_config()
      bbfa0cc7
    • J
      Merge branch 'dt/refs-check-refname-component-optim' · ae7dd1a4
      Junio C Hamano 提交于
      * dt/refs-check-refname-component-optim:
        refs.c: optimize check_refname_component()
      ae7dd1a4
    • J
      Merge branch 'sk/test-cmp-bin' · c651ccc9
      Junio C Hamano 提交于
      * sk/test-cmp-bin:
        t5000, t5003: do not use test_cmp to compare binary files
      c651ccc9
    • J
      Merge branch 'sh/enable-preloadindex' · 96b29bde
      Junio C Hamano 提交于
      * sh/enable-preloadindex:
        environment.c: enable core.preloadindex by default
      96b29bde
    • J
      Merge branch 'rs/read-ref-at' · bb0ced75
      Junio C Hamano 提交于
      * rs/read-ref-at:
        refs.c: change read_ref_at to use the reflog iterators
      bb0ced75
    • J
      Merge branch 'jk/error-resolve-conflict-advice' · d0d5ba7e
      Junio C Hamano 提交于
      * jk/error-resolve-conflict-advice:
        error_resolve_conflict: drop quotations around operation
        error_resolve_conflict: rewrap advice message
      d0d5ba7e
    • J
      Merge branch 'rs/pack-objects-no-unnecessary-realloc' · 57a2eee9
      Junio C Hamano 提交于
      Avoid unnecessary copy of previous contents when extending the
      hashtable used in pack-objects.
      
      * rs/pack-objects-no-unnecessary-realloc:
        pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
      57a2eee9
    • J
      Merge branch 'lt/log-auto-decorate' · 3009afd5
      Junio C Hamano 提交于
      * lt/log-auto-decorate:
        git log: support "auto" decorations
      3009afd5
    • J
      Merge branch 'jm/doc-wording-tweaks' · 668668ad
      Junio C Hamano 提交于
      * jm/doc-wording-tweaks:
        Documentation: wording fixes in the user manual and glossary
      668668ad
    • J
      Merge branch 'jm/format-patch-mail-sig' · f18871dc
      Junio C Hamano 提交于
      * jm/format-patch-mail-sig:
        format-patch: add "--signature-file=<file>" option
        format-patch: make newline after signature conditional
      f18871dc
    • J
      Merge branch 'jk/http-errors' · 2075a0c2
      Junio C Hamano 提交于
      Propagate the error messages from the webserver better to the
      client coming over the HTTP transport.
      
      * jk/http-errors:
        http: default text charset to iso-8859-1
        remote-curl: reencode http error messages
        strbuf: add strbuf_reencode helper
        http: optionally extract charset parameter from content-type
        http: extract type/subtype portion of content-type
        t5550: test display of remote http error messages
        t/lib-httpd: use write_script to copy CGI scripts
        test-lib: preserve GIT_CURL_VERBOSE from the environment
      2075a0c2
    • J
      Merge branch 'ow/config-mailmap-pathname' · c37d3269
      Junio C Hamano 提交于
      mailmap.file configuration names a pathname, hence should honor
      ~/path and ~user/path as its value.
      
      * ow/config-mailmap-pathname:
        config: respect '~' and '~user' in mailmap.file
      c37d3269
    • J
      Merge branch 'fc/remote-helper-refmap' · c9fc3a6a
      Junio C Hamano 提交于
      Allow remote-helper/fast-import based transport to rename the refs
      while transferring the history.
      
      * fc/remote-helper-refmap:
        transport-helper: remove unnecessary strbuf resets
        transport-helper: add support to delete branches
        fast-export: add support to delete refs
        fast-import: add support to delete refs
        transport-helper: add support to push symbolic refs
        transport-helper: add support for old:new refspec
        fast-export: add new --refspec option
        fast-export: improve argument parsing
      c9fc3a6a
    • J
      Merge branch 'nd/daemonize-gc' · 1a81f6ce
      Junio C Hamano 提交于
      "git gc --auto" was recently changed to run in the background to
      give control back early to the end-user sitting in front of the
      terminal, but it forgot that housekeeping involving reflogs should
      be done without other processes competing for accesses to the refs.
      
      * nd/daemonize-gc:
        gc --auto: do not lock refs in the background
      1a81f6ce
    • J
      Merge branch 'jm/t9138-style-fix' · 8dbd3133
      Junio C Hamano 提交于
      * jm/t9138-style-fix:
        t9138-git-svn-authors-prog.sh fixups
      8dbd3133
    • J
      Merge branch 'jm/instaweb-apache-24' · bf2941be
      Junio C Hamano 提交于
      * jm/instaweb-apache-24:
        git-instaweb: add support for Apache 2.4
      bf2941be
    • J
      Merge branch 'jl/remote-rm-prune' · 474df928
      Junio C Hamano 提交于
      "git remote rm" and "git remote prune" can involve removing many
      refs at once, which is not a very efficient thing to do when very
      many refs exist in the packed-refs file.
      
      * jl/remote-rm-prune:
        remote prune: optimize "dangling symref" check/warning
        remote: repack packed-refs once when deleting multiple refs
        remote rm: delete remote configuration as the last
      474df928
    • J
      Merge branch 'jk/complete-merge-pull' · 5cf2c571
      Junio C Hamano 提交于
      The completion code did not know about quite a few options that are
      common between "git merge" and "git pull", and a couple of options
      unique to "git merge".
      
      * jk/complete-merge-pull:
        completion: add missing options for git-merge
        completion: add a note that merge options are shared
      5cf2c571
    • J
      Merge branch 'bg/xcalloc-nmemb-then-size' · a634a6d2
      Junio C Hamano 提交于
      Like calloc(3), xcalloc() takes nmemb and then size.
      
      * bg/xcalloc-nmemb-then-size:
        transport-helper.c: rearrange xcalloc arguments
        remote.c: rearrange xcalloc arguments
        reflog-walk.c: rearrange xcalloc arguments
        pack-revindex.c: rearrange xcalloc arguments
        notes.c: rearrange xcalloc arguments
        imap-send.c: rearrange xcalloc arguments
        http-push.c: rearrange xcalloc arguments
        diff.c: rearrange xcalloc arguments
        config.c: rearrange xcalloc arguments
        commit.c: rearrange xcalloc arguments
        builtin/remote.c: rearrange xcalloc arguments
        builtin/ls-remote.c: rearrange xcalloc arguments
      a634a6d2
    • J
      Merge branch 'jl/status-added-submodule-is-never-ignored' · 6d681f0a
      Junio C Hamano 提交于
      submodule.*.ignore and diff.ignoresubmodules are used to ignore all
      submodule changes in "diff" output, but it can be confusing to
      apply these configuration values to status and commit.
      
      This is a backward-incompatible change, but should be so in a good
      way (aka bugfix).
      
      * jl/status-added-submodule-is-never-ignored:
        commit -m: commit staged submodules regardless of ignore config
        status/commit: show staged submodules regardless of ignore config
      6d681f0a
    • J
      Merge branch 'cb/byte-order' · 83a4904f
      Junio C Hamano 提交于
      Compatibility enhancement for Solaris.
      
      * cb/byte-order:
        compat/bswap.h: fix endianness detection
        compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN
        compat/bswap.h: detect endianness on more platforms that don't use BYTE_ORDER
      83a4904f
    • J
      Merge branch 'jk/strbuf-tolower' · b4bba8de
      Junio C Hamano 提交于
      * jk/strbuf-tolower:
        strbuf: add strbuf_tolower function
      b4bba8de
    • J
      Merge branch 'jk/daemon-tolower' · b4516df9
      Junio C Hamano 提交于
      * jk/daemon-tolower:
        daemon/config: factor out duplicate xstrdup_tolower
      b4516df9