1. 26 6月, 2010 3 次提交
    • J
      Add the option "--ignore-submodules" to "git status" · 46a958b3
      Jens Lehmann 提交于
      In some use cases it is not desirable that "git status" 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 (this was the behavior before
      1.7.0). 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 when using the "dirty" parameter.
      
      And if you want to ignore any changes to submodules, you can now do that
      by using this option without parameters or with "all" (when the config
      option status.submodulesummary is set, using "all" will also suppress the
      output of the submodule summary).
      
      A new function handle_ignore_submodules_arg() is introduced to parse this
      option new to "git status" in a single location, as "git diff" already
      knew it.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      46a958b3
    • J
      git submodule: ignore dirty submodules for summary and status · 18076502
      Jens Lehmann 提交于
      The summary and status commands only care about submodule commits, so it is
      rather pointless that they check for dirty work trees. This saves the time
      needed to scan the submodules work tree. Even "git status" profits from these
      savings when the status.submodulesummary config option is set, as this lead to
      traversing the submodule work trees twice, once for status and once again for
      the submodule summary. And if the submodule was just dirty, submodule summary
      produced rather meaningless output anyway:
      
       * sub 1234567...1234567 (0):
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      18076502
    • B
      t4027,4041: Use test -s to test for an empty file · 6ed7ddaa
      Brian Gernhardt 提交于
      The tests used a mixture of 'echo -n' (which is non-portable) and either
      test_cmp or diff to check if a file is empty.  The much easier and portable
      method to check for an empty file is '! test -s'
      
      While we're in t4027, there was an excess test_done.  Remove it.
      Signed-off-by: NBrian Gernhardt <brian@gernhardtsoftware.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6ed7ddaa
  2. 12 6月, 2010 2 次提交
    • 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
    • J
      git diff: rename test that had a conflicting name · cf6aef80
      Jens Lehmann 提交于
      In 86140d56 the new test t4041-diff-submodule.sh was introduced although
      t4027-diff-submodule.sh already existed. Rename the newer test to
      t4041-diff-submodule-option.sh to fix that.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cf6aef80
  3. 08 6月, 2010 1 次提交
  4. 07 6月, 2010 1 次提交
  5. 05 6月, 2010 1 次提交
  6. 03 6月, 2010 3 次提交
  7. 01 6月, 2010 2 次提交
  8. 29 5月, 2010 5 次提交
  9. 26 5月, 2010 4 次提交
  10. 21 5月, 2010 3 次提交
  11. 20 5月, 2010 1 次提交
  12. 19 5月, 2010 4 次提交
  13. 12 5月, 2010 1 次提交
  14. 11 5月, 2010 1 次提交
    • J
      handle "git --bare init <dir>" properly · 87a074df
      Jeff King 提交于
      If we know we are creating a bare repository, we use setenv
      to set the GIT_DIR directory to the current directory
      (either where we already were, or one we created and chdir'd
      into with "git init --bare <dir>").
      
      However, with "git --bare init <dir>" (note the --bare as a
      git wrapper option), the setup code actually sets GIT_DIR
      for us, but it uses the wrong, original cwd when a directory
      is given. Because our setenv does not use the overwrite
      flag, it is ignored.
      
      We need to set the overwrite flag, but only when we are
      given a directory on the command line. That still allows:
      
        GIT_DIR=foo.git git init --bare
      
      to work. The behavior is changed for:
      
        GIT_DIR=foo.git git init --bare bar.git
      
      which used to create the repository in foo.git, but now will
      use bar.git. This is more sane, as command line options
      should generally override the environment.
      
      Noticed by Oliver Hoffmann.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      87a074df
  15. 09 5月, 2010 2 次提交
  16. 08 5月, 2010 1 次提交
  17. 07 5月, 2010 1 次提交
    • J
      test-lib: some shells do not let $? propagate into an eval · b6b0afdc
      Jonathan Nieder 提交于
      In 3bf78867 (test-lib: Let tests specify commands to be run at end of
      test, 2010-05-02), the git test harness learned to run cleanup
      commands unconditionally at the end of a test.  During each test,
      the intended cleanup actions are collected in the test_cleanup variable
      and evaluated.  That variable looks something like this:
      
      	eval_ret=$?; clean_something && (exit "$eval_ret")
      	eval_ret=$?; clean_something_else && (exit "$eval_ret")
      	eval_ret=$?; final_cleanup && (exit "$eval_ret")
      	eval_ret=$?
      
      All cleanup actions are run unconditionally but if one of them fails
      it is properly reported through $eval_ret.
      
      On FreeBSD, unfortunately, $? is set at the beginning of an ‘eval’
      to 0 instead of the exit status of the previous command.  This results
      in tests using test_expect_code appearing to fail and all others
      appearing to pass, unless their cleanup fails.  Avoid the problem by
      setting eval_ret before the ‘eval’ begins.
      
      Thanks to Jeff King for the explanation.
      
      Cc: Jeff King <peff@peff.net>
      Cc: Johannes Sixt <j6t@kdbg.org>
      Acked-by: NJeff King <peff@peff.net>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b6b0afdc
  18. 05 5月, 2010 4 次提交
    • J
      test-lib: Let tests specify commands to be run at end of test · 3bf78867
      Jonathan Nieder 提交于
      Certain actions can imply that if the test fails early, recovery from
      within other tests is too much to expect:
      
       - creating unwritable directories, like the EACCESS test in t0001-init
       - setting unusual configuration, like user.signingkey in t7004-tag
       - crashing and leaving the index lock held, like t3600-rm once did
      
      Some test scripts work around this by running cleanup actions outside
      the supervision of the test harness, with the unfortunate consequence
      that those commands are not appropriately echoed and their output not
      suppressed.  Others explicitly save exit status, clean up, and then
      reset the exit status within the tests, which has excellent behavior
      but makes the tests hard to read.  Still others ignore the problem.
      
      Allow tests a fourth option: by calling this function, tests can
      stack up commands they would like to be run to clean up.
      
      Commands passed to test_when_finished during a test are
      unconditionally run in the test environment immediately before the
      test is completed, in last-in-first-out order.  If some cleanup
      command fails, then the other cleanup commands are still run before
      the failure is reported and the test script allowed to continue.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3bf78867
    • J
      Merge branch 'maint-1.7.0' into maint · 6b6f5d46
      Junio C Hamano 提交于
      * maint-1.7.0:
        remove ecb parameter from xdi_diff_outf()
      6b6f5d46
    • R
      remove ecb parameter from xdi_diff_outf() · dfea7900
      René Scharfe 提交于
      xdi_diff_outf() overrides the structure members of its last parameter,
      ignoring any value that callers pass in.  It's no surprise then that all
      callers pass a pointer to an uninitialized structure.  They also don't
      read it after the call, so the parameter is neither used for input nor
      for output.   Turn it into a local variable of xdi_diff_outf().
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Acked-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dfea7900
    • P
      Documentation/git-send-email: Add "Use gmail as the smtp server" · 2b873e06
      Ping Yin 提交于
      Signed-off-by: NPing Yin <pkufranky@gmail.com>
      Acked by: Sverre Rabbelier <srabbelier@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b873e06