[PATCH] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-23 Thread Stan Hu
Previously, calling ls-tree with a revision such as `master^{tree}:foo/{{path}}` would show the root tree instead of the correct tree pointed by foo/{{path}}. If a colon is present in the revision name, peel_onion() should assume that the presence of a bracket at the end of the string belongs to th

[PATCH] sha1-name.c: Fix handling of revisions that contain paths with brackets

2018-12-23 Thread Stan Hu
Previously, calling ls-tree with a revision such as `master^{tree}:foo/{{path}}` would show the root tree instead of the correct tree pointed by foo/{{path}}. If a colon is present in the revision name, peel_onion() should assume that the presence of a bracket at the end of the string belongs to th