Commit Graph

13 Commits

Author SHA1 Message Date
Tianon Gravi 419da33551 Add more test coverage for manifest/ 2022-11-17 16:10:52 -08:00
Tianon Gravi f54c8e397a Rewrite "bashbrew children" and "bashbrew parents"
This time, they are distinct implementations because the problem they are solving is inherently different.

For listing children of a given name, we *have* to walk the entire library (since we only have tag -> FROM mappings, not the reverse, which is fundamentally the question that "children" answers).

On the flip side, listing the parents of a given name is as straightforward as looking up the FROM values and walking until we can't anymore.

In my own testing, these new implementations are significantly more correct, and handle more edge cases (including things we couldn't support before like `bashbrew children --depth=1 scratch`, `bashbrew children mcr.microsoft.com/windows/servercore`, etc).

They also more correctly handle edge cases like tags that are `FROM` a "`SharedTag`" such that they don't walk up/down both sides of the tree (for example, `orientdb:3.2` -> `FROM eclipse-temurin:8-jdk`, which is both Windows *and* Linux, even though `orientdb:3.2` is Linux-only).
2022-11-14 14:32:20 -08:00
Tianon Gravi 7e50189a05 Use pointers more consistently, allow "fetch" tag validation to check SharedTags too 2019-01-28 16:03:21 -08:00
Tianon Gravi d6068c47a7 Allow only "http" and "https" URLs 2016-06-08 10:36:33 -07:00
Tianon Gravi c1549952f3 Facepalm 2016-06-08 10:24:38 -07:00
Tianon Gravi ac3ac95930 First attempt to unstick Windows 2016-06-08 10:23:10 -07:00
Tianon Gravi 7d56be63f3 Be slightly less aggressive about using the current directory's "repo" 2016-06-01 17:08:02 -07:00
Tianon Gravi e74aa41b37 Catch errors for invalid tagName values 2016-05-27 13:25:04 -07:00
Tianon Gravi 8a9af33071 Update manifest.Fetch to also parse "tag" from repo strings 2016-05-27 13:11:10 -07:00
Tianon Gravi e40181b728 Also verify the "absoluteness" of the URL 2016-05-27 11:59:54 -07:00
Tianon Gravi 0b0d493724 Change the order manifest.Fetch parses so we can have a good fallback error message 2016-05-27 11:57:01 -07:00
Tianon Gravi f346802da9 Adjust the signature of Fetch to include the "repo name" 2016-05-27 11:47:30 -07:00
Tianon Gravi de5435319f Add initial "manifest.Fetch" command 2016-05-27 11:37:40 -07:00