1. 04 8月, 2017 1 次提交
  2. 24 4月, 2011 1 次提交
  3. 10 11月, 2010 1 次提交
  4. 10 8月, 2010 3 次提交
    • J
      90e14525
    • J
      Submodules: Use "ignore" settings from .gitmodules too for diff and status · 302ad7a9
      Jens Lehmann 提交于
      The .gitmodules file is parsed for "submodule.<name>.ignore" entries
      before looking for them in .git/config. Thus settings found in .git/config
      will override those from .gitmodules, thereby allowing the local developer
      to ignore settings given by the remote side while also letting upstream
      set defaults for those users who don't have special needs.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      302ad7a9
    • J
      Submodules: Add the new "ignore" config option for diff and status · aee9c7d6
      Jens Lehmann 提交于
      The new "ignore" config option controls the default behavior for "git
      status" and the diff family. It specifies under what circumstances they
      consider submodules as modified and can be set separately for each
      submodule.
      
      The command line option "--ignore-submodules=" has been extended to accept
      the new parameter "none" for both status and diff.
      
      Users that chose submodules to get rid of long work tree scanning times
      might want to set the "dirty" option for those submodules. This brings
      back the pre 1.7.0 behavior, where submodule work trees were never
      scanned for modifications. By using "--ignore-submodules=none" on the
      command line the status and diff commands can be told to do a full scan.
      
      This option can be set to the following values (which have the same name
      and meaning as for the "--ignore-submodules" option of status and diff):
      
      "all": All changes to the submodule will be ignored.
      
      "dirty": Only differences of the commit recorded in the superproject and
      	the submodules HEAD will be considered modifications, all changes
      	to the work tree of the submodule will be ignored. When using this
      	value, the submodule will not be scanned for work tree changes at
      	all, leading to a performance benefit on large submodules.
      
      "untracked": Only untracked files in the submodules work tree are ignored,
      	a changed HEAD and/or modified files in the submodule will mark it
      	as modified.
      
      "none" (which is the default): Either untracked or modified files in a
      	submodules work tree or a difference between the subdmodules HEAD
      	and the commit recorded in the superproject will make it show up
      	as changed. This value is added as a new parameter for the
      	"--ignore-submodules" option of the diff family and "git status"
      	so the user can override the settings in the configuration.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      aee9c7d6
  5. 26 6月, 2010 1 次提交
  6. 12 6月, 2010 1 次提交
    • J
      Add optional parameters to the diff option "--ignore-submodules" · dd44d419
      Jens Lehmann 提交于
      In some use cases it is not desirable that the diff family considers
      submodules that only contain untracked content as dirty. This may happen
      e.g. when the submodule is not under the developers control and not all
      build generated files have been added to .gitignore by the upstream
      developers. Using the "untracked" parameter for the "--ignore-submodules"
      option disables checking for untracked content and lets git diff report
      them as changed only when they have new commits or modified content.
      
      Sometimes it is not wanted to have submodules show up as changed when they
      just contain changes to their work tree. An example for that are scripts
      which just want to check for submodule commits while ignoring any changes
      to the work tree. Also users having large submodules known not to change
      might want to use this option, as the - sometimes substantial - time it
      takes to scan the submodule work tree(s) is saved.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dd44d419
  7. 17 1月, 2010 1 次提交
  8. 30 4月, 2009 1 次提交
    • J
      diff -c -p: do not die on submodules · 7dae8b21
      Junio C Hamano 提交于
      The combine diff logic knew only about blobs (and their checked-out form
      in the work tree, either regular files or symlinks), and barfed when fed
      submodules.  This "externalizes" gitlinks in the same way as the normal
      patch generation codepath does (i.e. "Subproject commit Xxx\n") to fix the
      issue.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7dae8b21
  9. 17 8月, 2008 1 次提交
    • J
      tests: use $TEST_DIRECTORY to refer to the t/ directory · bfdbee98
      Junio C Hamano 提交于
      Many test scripts assumed that they will start in a 'trash' subdirectory
      that is a single level down from the t/ directory, and referred to their
      test vector files by asking for files like "../t9999/expect".  This will
      break if we move the 'trash' subdirectory elsewhere.
      
      To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can
      refer to t/ directory reliably.  This finally makes all the tests use
      it to refer to the outside environment.
      
      With this patch, and a one-liner not included here (because it would
      contradict with what Dscho really wants to do):
      
      | diff --git a/t/test-lib.sh b/t/test-lib.sh
      | index 70ea7e0..60e69e4 100644
      | --- a/t/test-lib.sh
      | +++ b/t/test-lib.sh
      | @@ -485,7 +485,7 @@ fi
      |  . ../GIT-BUILD-OPTIONS
      |
      |  # Test repository
      | -test="trash directory"
      | +test="trash directory/another level/yet another"
      |  rm -fr "$test" || {
      |         trap - exit
      |         echo >&5 "FATAL: Cannot prepare test area"
      
      all the tests still pass, but we would want extra sets of eyeballs on this
      type of change to really make sure.
      
      [jc: with help from Stephan Beyer on http-push tests I do not run myself;
       credits for locating silly quoting errors go to Olivier Marin.]
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bfdbee98
  10. 05 5月, 2008 3 次提交
  11. 13 3月, 2008 1 次提交
    • J
      add test_cmp function for test scripts · 82ebb0b6
      Jeff King 提交于
      Many scripts compare actual and expected output using
      "diff -u". This is nicer than "cmp" because the output shows
      how the two differ. However, not all versions of diff
      understand -u, leading to unnecessary test failure.
      
      This adds a test_cmp function to the test scripts and
      switches all "diff -u" invocations to use it. The function
      uses the contents of "$GIT_TEST_CMP" to compare its
      arguments; the default is "diff -u".
      
      On systems with a less-capable diff, you can do:
      
        GIT_TEST_CMP=cmp make test
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      82ebb0b6
  12. 02 3月, 2008 1 次提交
    • J
      diff: make sure work tree side is shown as 0{40} when different · 2b459b48
      Junio C Hamano 提交于
      Ping Yin noticed that "git diff-index --raw" shows 0{40} when work tree
      has submodule difference, but "git diff --raw" didn't correctly do so.
      
      There was a mistake in the diffcore_skip_stat_unmatch() that was meant to
      clean up the stat-only difference for running diff between the index and
      work tree and diff between the tree and the work tree, to cause it re-read
      from the submodule repository HEAD.  When ce_stat_match() says work tree
      is different, we should always say 0{40} on the work tree side.
      
      This patch fixes the issue, and adds tests.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b459b48