Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-09Merge branch 'ss/submodule-summary-in-c'Junio C Hamano
Yet another subcommand of "git submodule" is getting rewritten in C. * ss/submodule-summary-in-c: submodule: port submodule subcommand 'summary' from shell to C t7421: introduce a test script for verifying 'summary' output submodule: rename helper functions to avoid ambiguity submodule: remove extra line feeds between callback struct and macro
2020-08-21t7401: add a NEEDSWORKShourya Shukla
Add a NEEDSWORK regarding the outdated syntax and working of the test, which may need to be improved to obtain better and desired results. While at it, change the word 'test' to 'test script' in the test description to avoid ambiguity. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Helped-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-21t7401: change indentation for enhanced readabilityShourya Shukla
Change the indentation of expected outputs for enhanced readability of the tests. Also modify the heredoc string limiter in a test which lacks it to support the indentation change. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Taylor Blau <me@taylorr.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-21t7401: change syntax of test_i18ncmp calls for clarityShourya Shukla
Change the test_i18ncmp syntax from 'test_i18ncmp actual expected' to 'test_i18ncmp expected actual' to align it with the convention followed by other tests in the test script. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-21t7401: use 'short' instead of 'verify' and cut in rev-parse callsShourya Shukla
'git rev-parse' can limit the number of characters in the hash it outputs using the '--short' option, thereby, making the 'cut' invocation redundant. Since using '--short' implies '--verify' as well, we can safely replace the latter with the former. This change results in the helper functions getting the hash in the same way 'summary' gets the hash internally. So, avoid the unnecessary invocation to 'cut' in the helper functions. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-21t7401: modernize styleShourya Shukla
The tests in 't7401-submodule-summary.sh' were written a long time ago and has a violation with respect to our CodingGuidelines which is, incorrect spacing in usages of the redirection operator. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Helped-by: Denton Liu <liu.denton@gmail.com> Helped-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-08-13t7421: introduce a test script for verifying 'summary' outputShourya Shukla
't7401-submodule-summary.sh' uses 'git add' to add submodules. Therefore, some commands such as 'git submodule init' and 'git submodule deinit' do not work as expected. So, introduce a test script for verifying the 'summary' output for submodules added using 'git submodule add' and notify regarding the above mentioned behaviour in t7401 itself. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-21tests: use 'test_must_be_empty' instead of 'test_cmp /dev/null <out>'SZEDER Gábor
Using 'test_must_be_empty' is more idiomatic than 'test_cmp /dev/null out', and its message on error is perhaps a bit more to the point. This patch was basically created by running: sed -i -e 's%test_cmp /dev/null%test_must_be_empty%' t[0-9]*.sh with the exception of the change in 'should not fail in an empty repo' in 't7401-submodule-summary.sh', where it was 'test_cmp output /dev/null'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-30tests: make use of the test_must_be_empty functionÆvar Arnfjörð Bjarmason
Change various tests that use an idiom of the form: >expect && test_cmp expect actual To instead use: test_must_be_empty actual The test_must_be_empty() wrapper was introduced in ca8d148daf ("test: test_must_be_empty helper", 2013-06-09). Many of these tests have been added after that time. This was mostly found with, and manually pruned from: git grep '^\s+>.*expect.* &&$' t Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15t: move "git add submodule" into test blocksJeff King
Some submodule tests do some setup outside of a test_expect block. This is bad because we won't actually check the outcome of those commands. But it's doubly so because "git add submodule" now produces a warning to stderr, which is not suppressed by the test scripts in non-verbose mode. This patch does the minimal to fix the annoying warnings. All three of these scripts could use more cleanup of related setup. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-25Merge branch 'bc/submodule-status-ignored'Jonathan Nieder
* bc/submodule-status-ignored: Improve documentation concerning the status.submodulesummary setting submodule: don't print status output with ignore=all submodule: fix confusing variable name
2013-09-07submodule summary: ignore --for-status optionMatthieu Moy
The --for-status option was an undocumented option used only by wt-status.c, which inserted a header and commented out the output. We can achieve the same result within wt-status.c, without polluting the submodule command-line options. This will make it easier to disable the comments from wt-status.c later. The --for-status is kept so that another topic in flight (bc/submodule-status-ignored) can continue relying on it, although it is currently a no-op. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-05submodule: don't print status output with ignore=allBrian M. Carlson
git status prints information for submodules, but it should ignore the status of those which have submodule.<name>.ignore set to all. Fix it so that it does properly ignore those which have that setting either in .git/config or in .gitmodules. Not ignored are submodules that are added, deleted, or moved (which is essentially a combination of the first two) because it is not easily possible to determine the old path once a move has occurred, nor is it easily possible to detect which adds and deletions are moves and which are not. This also preserves the previous behavior of always listing modules which are to be deleted. Tests are included which verify that this change has no effect on git submodule summary without the --for-status option. Signed-off-by: Brian M. Carlson <sandals@crustytoothpaste.net> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-18submodule: drop the top-level requirementJohn Keeping
Use the new rev-parse --prefix option to process all paths given to the submodule command, dropping the requirement that it be run from the top-level of the repository. Since the interpretation of a relative submodule URL depends on whether or not "remote.origin.url" is configured, explicitly block relative URLs in "git submodule add" when not at the top level of the working tree. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-18t7401: make indentation consistentJohn Keeping
Only leading whitespace is changed in this patch. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21i18n: git-submodule "blob" and "submodule" messagesÆvar Arnfjörð Bjarmason
Gettextize the words "blob" and "submodule", which will be interpolated in a message emitted by git-submodule. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21i18n: git-submodule $errmsg messagesÆvar Arnfjörð Bjarmason
Gettextize warning messages stored in the $errmsg variable using eval_gettext interpolation. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-21i18n: git-submodule "Submodule change[...]" messagesÆvar Arnfjörð Bjarmason
Gettextize the "Submodules changed but not updated" and "Submodule changes to be committed" messages. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-14tests: use test_cmp instead of piping to diff(1)Ævar Arnfjörð Bjarmason
Change submodule tests that piped to diff(1) to use test_cmp. The resulting unified diff is easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-10tests: subshell indentation stylefixJonathan Nieder
Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-07Several tests: cd inside subshell instead of aroundJens Lehmann
Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17submodule summary: Don't barf when invoked in an empty repoJohan Herland
When invoking "git submodule summary" in an empty repo (which can be indirectly done by setting status.submodulesummary = true), it currently emits an error message (via "git diff-index") since HEAD points to an unborn branch. This patch adds handling of the HEAD-points-to-unborn-branch special case, so that "git submodule summary" no longer emits this error message. The patch also adds a test case that verifies the fix. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-18git status: Show uncommitted submodule changes too when enabledJens Lehmann
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>
2009-08-15git submodule summary: add --files optionJens Lehmann
git submodule summary is providing similar functionality for submodules as git diff-index does for a git project (including the meaning of --cached). But the analogon to git diff-files is missing, so add a --files option to summarize the differences between the index of the super project and the last commit checked out in the working tree of the submodule. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-04tests: use "git xyzzy" form (t7200 - t9001)Nanako Shiraishi
Converts tests between t7201-t9001. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-13git-submodule summary: --for-status optionPing Yin
The --for-status option is mainly used by builtin-status/commit. It adds 'Modified submodules:' line at top and '# ' prefix to all following lines. Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-13t7401: squelch garbage outputJunio C Hamano
The script had an unconditional output done outside of test_expect_* construct, which leaked out and contaminated the output without -v. Squelch it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-12git-submodule summary: testPing Yin
Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>