Commit graph

15 commits

Author SHA1 Message Date
Junio C Hamano a76b2084fb Merge branch 'jl/status-ignore-submodules'
* jl/status-ignore-submodules:
  Add the option "--ignore-submodules" to "git status"
  git submodule: ignore dirty submodules for summary and status

Conflicts:
	builtin/commit.c
	t/t7508-status.sh
	wt-status.c
	wt-status.h
2010-06-30 11:55:39 -07:00
Jens Lehmann 46a958b3da Add the option "--ignore-submodules" to "git status"
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: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-25 11:30:25 -07:00
Michael J Gruber 46077fa5d4 Documentation+t5708: document and test status -s -b
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-03 15:02:12 -07:00
Junio C Hamano 82e7ee7351 Merge branch 'mg/advice-statushints'
* mg/advice-statushints:
  wt-status: take advice.statusHints seriously
  t7508: test advice.statusHints

Conflicts:
	wt-status.c
2010-05-21 04:02:23 -07:00
Michael J Gruber 980bde3894 wt-status: take advice.statusHints seriously
Currently, status gives a lot of hints even when advice.statusHints is
false. Change this so that all hints depend on the config variable.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-06 13:22:44 -07:00
Michael J Gruber 18f3b5a9d3 t7508: test advice.statusHints
edf563f (status: make "how to stage" messages optional, 2009-09-09)
introduced advice.statusHints without tests. Add a few tests to describe
and test the status quo.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-06 13:22:37 -07:00
Markus Heidelberg b2f6fd9575 t7508: add a test for "git status" in a read-only repository
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-03 11:25:13 -07:00
Markus Heidelberg 4bb6644d03 git status: refresh the index if possible
This was already the case before commit 9e4b7ab6 (git status: not
"commit --dry-run" anymore, 2009-08-15) with the difference that it died
at failure.
It got lost during the new implementation of "git status", which was
meant to only change behaviour when invoked with arguments.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:25:59 -07:00
Markus Heidelberg 4c926b37c2 t7508: add test for "git status" refreshing the index
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-02 21:25:47 -07:00
Jens Lehmann f17a5d3494 git status: Show uncommitted submodule changes too when enabled
When the configuration variable status.submodulesummary is not 0 or
false, "git status" shows the submodule summary of the staged submodule
commits. But it did not show the summary of those commits not yet
staged in the supermodule, making it hard to see what will not be
committed.

The output of "submodule summary --for-status" has been changed from
"# Modified submodules:" to "# Submodule changes to be committed:" for
the already staged changes. "# Submodules changed but not updated:" has
been added for changes that will not be committed. This is much clearer
and consistent with the output for regular files.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-17 15:55:11 -08:00
Michael J Gruber 68cfc6f551 t7508-status: test all modes with color
Move a useful script function to decode colored output to
text form from t4034 and use it in this test as well.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08 21:52:47 -08:00
Michael J Gruber c521bb7114 t7508-status: status --porcelain ignores relative paths setting
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-08 12:54:57 -08:00
Michael J Gruber 14ed05ddd6 t7508-status.sh: Add tests for status -s
The new short status has been completely untested so far. Introduce
tests by duplicating all tests which are present for the long format.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-27 15:14:59 -08:00
Junio C Hamano 9e4b7ab652 git status: not "commit --dry-run" anymore
This removes tentative "git stat" and make it take over "git status".

There are some tests that expect "git status" to exit with non-zero status
when there is something staged.  Some tests expect "git status path..." to
show the status for a partial commit.

For these, replace "git status" with "git commit --dry-run".  For the
ones that do not attempt a dry-run of a partial commit that check the
output from the command, check the output from "git status" as well, as
they should be identical.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-22 12:18:00 -07:00
Johannes Sixt 7f733de04e test-suite: Make test script numbers unique
In order to selectively skip tests, the environment variable GIT_SKIP_TESTS
can be set like this:

  $ GIT_SKIP_TESTS='t1301 t4150.18' make test

That is, its value can contain only the test script numbers, but not the
full script name. Therefore, it is important that the test scripts are
uniquely numbered. This makes it so.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-14 12:44:20 -07:00
Renamed from t/t7502-status.sh (Browse further)