summaryrefslogtreecommitdiff
path: root/t/t6018-rev-list-glob.sh
Commit message (Collapse)AuthorAgeFilesLines
* rev-list: don't show usage when we see empty ref patternsJeff King2017-08-021-3/+3
| | | | | | | | | | | | If the user gives us no starting point for a traversal, we want to complain with our normal usage message. But if they tried to do so with "--all" or "--glob", but that happened not to match any refs, the usage message isn't helpful. We should just give them the empty output they asked for instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t6018: flesh out empty input/output rev-list testsJeff King2017-08-021-11/+9
| | | | | | | | | | | | | | | | | | | | In 751a2ac6e (rev-list --exclude: tests, 2013-11-01), we added a few tests for handling "empty" inputs with rev-list (i.e., where the user gave us some pattern but it turned out not to queue any objects for traversal), all of which were marked as failing. In preparation for working on this area of the code, let's give each test a more descriptive name. Let's also include one more case which we should cover: feeding a --glob pattern that doesn't match anything. We can also drop the explanatory comment; we'll be converting these to expect_success in the next few patches, so the discussion isn't necessary. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Spelling fixesvs/typofixVille Skyttä2016-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <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>
* rev-parse: introduce --exclude=<glob> to tame wildcardsjc/ref-excludesJunio C Hamano2013-11-011-0/+12
| | | | | | | Teach "rev-parse" the same "I'm going to glob, but omit the ones that match these patterns" feature as "rev-list". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list --exclude: testsJunio C Hamano2013-11-011-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | Add tests for the --exclude=<glob> feature. A few tests are added for cases where use of globbing and "--exclude" results in no positive revisions: * "--exclude=<glob>" before "--all" etc. resulted in no results; * "--stdin" is used but no input was given; * "--all" etc. is used but no matching refs are found. Currently, we fail such a request with the same error message we would give to a command line that does not specify any positive revision (e.g. "git rev-list<ENTER>"). We may want to treat these cases differently and not error out, but the logic to detect that would be common to all of them, so I'd leave it outside this topic for now, and stop at adding these tests as food-for-thought. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* revisions: allow --glob and friends in parse_options-enabled commandsJonathan Nieder2011-04-211-0/+50
| | | | | | | | | | As v1.6.0-rc2~42 (2008-07-31) explains, even pseudo-options like --not and --glob that need to be parsed in order with revisions should be marked handled by handle_revision_opt to avoid an error when parse_revision_opt callers like "git shortlog" encounter them. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* log: parse separate option for --globMatthieu Moy2010-08-061-0/+6
| | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t6018: make sure all tested symbolic names are different revsMichael J Gruber2010-06-271-1/+3
| | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t6018: add tests for rev-list's --branches and --tagsMichael J Gruber2010-06-271-0/+13
| | | | | | | so that we know when they break. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-parse --branches/--tags/--remotes=patternIlari Liusvaara2010-01-201-1/+62
| | | | | | | | | | | | | | | Since local branch, tags and remote tracking branch namespaces are most often used, add shortcut notations for globbing those in manner similar to --glob option. With this, one can express the "what I have but origin doesn't?" as: 'git log --branches --not --remotes=origin' Original-idea-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-parse --globIlari Liusvaara2010-01-201-0/+134
Add --glob=<glob-pattern> option to rev-parse and everything that accepts its options. This option matches all refs that match given shell glob pattern (complete with some DWIM logic). Example: 'git log --branches --not --glob=remotes/origin' To show what you have that origin doesn't. Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>