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
2023-07-18ls-tree: fix --no-full-nameRené Scharfe
Since 61fdbcf98b (ls-tree: migrate to parse-options, 2009-11-13) git ls-tree has accepted the option --no-full-name, but it does the same as --full-name, contrary to convention. That's because it's defined using OPT_SET_INT with a value of 0, where the negative variant sets 0 as well. Turn --no-full-name into the opposite of --full-name by using OPT_BOOL instead and storing the option's status directly in a variable named "full_name" instead of in negated form in "chomp_prefix". Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-23ls-tree tests: add tests for --name-statusÆvar Arnfjörð Bjarmason
The --name-status synonym for --name-only added in c639a5548a5 (ls-tree: --name-only, 2005-12-01) had no tests, let's make sure it works the same way as its sibling. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Teng Long <dyroneteng@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-13leak tests: mark all ls-tree tests as passing with SANITIZE=leakÆvar Arnfjörð Bjarmason
Mark those tests that match "*ls-tree*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-05-14t: switch $_x40 to $OID_REGEXbrian m. carlson
Switch all uses of $_x40 to $OID_REGEX so that they work correctly with larger hashes. This commit was created by using the following sed command to modify all files in the t directory except t/test-lib.sh: sed -i 's/\$_x40/$OID_REGEX/g' Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-12Spelling fixesVille Skyttä
<BAD> <CORRECTED> accidently accidentally commited committed dependancy dependency emtpy empty existance existence explicitely explicitly git-upload-achive git-upload-archive hierachy hierarchy indegee indegree intial initial mulitple multiple non-existant non-existent precendence. precedence. priviledged privileged programatically programmatically psuedo-binary pseudo-binary soemwhere somewhere successfull successful transfering transferring uncommited uncommitted unkown unknown usefull useful writting writing Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-12-29t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitutionElia Pinto
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-13t3101: modernise styleJunio C Hamano
Also add a few " &&" cascade that were missing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-04tests: move convenience regexp to match object names to test-lib.shJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-17t3101: test more ls-tree optionsStephen Boyd
Add tests for --full-name, --full-tree, --abbrev, and --name-only. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-02match_tree_entry(): a pathspec only matches at directory boundariesJunio C Hamano
Previously the code did a simple prefix match, which means that a path in a directory "frotz/" would have matched with pathspec "f". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24tests: do not use implicit "git diff --no-index"Junio C Hamano
As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07get_pathspec(): die when an out-of-tree path is givenJunio C Hamano
An earlier commit d089ebaa (setup: sanitize absolute and funny paths) made get_pathspec() aware of absolute paths, but with a botched interface that forced the callers to count the resulting pathspecs in order to detect an error of giving a path that is outside the work tree. This fixes it, by dying inside the function. We had ls-tree test that relied on a misfeature in the original implementation of its pathspec handling. Leading slashes were silently removed from them. However we allow giving absolute pathnames (people want to cut and paste from elsewhere) that are inside work tree these days, so a pathspec that begin with slash _should_ be treated as a full path. The test is adjusted to match the updated rule for get_pathspec(). Earlier I mistook three tests given by Robin that they should succeed, but these are attempts to add path outside work tree, which should fail loudly. These tests also have been fixed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-03Rewrite "git-frotz" to "git frotz"Junio C Hamano
This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-03-04Get rid of the dependency to GNU diff in the testsJohannes Schindelin
Now that "git diff" handles stdin and relative paths outside the working tree correctly, we can convert all instances of "diff -u" to "git diff". This commit is really the result of $ perl -pi.bak -e 's/diff -u/git diff/' $(git grep -l "diff -u" t/) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from commit c699a40d68215c7e44a5b26117a35c8a56fbd387)
2005-12-20tests: make scripts executableJunio C Hamano
just for consistency. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29ls-tree: match the test to the new semantics.Junio C Hamano
The diff for this commit is a good illustration of what changed in ls-tree behaviour. - With -r, tree nodes themselves are not shown anymore, but blobs in subtrees are shown. - The order of paths parameters do not matter, since they are not like arguments to /bin/ls, but are filter patterns. - When filter patterns overlap, unintuitive things happen. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-08Fix wrong filename listing bug in git-ls-tree.robfitz@273k.net
This patch fixes a bug in git-ls-tree in which the wrong filenames are listed if the exact same file and directory contents are present in another location in the tree. Added a new series of test cases for directory and filename handling. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>