Browse Source
When parsing a string such as "foo-gbed2" resolve() was assuming the suffix was from git describe output. This lead to JGit trying to find the completion for the object abbreviation "bed2", rather than using the current value of the reference. If there was only one such object in the repository, JGit might actually use the wrong value here, as resolve() would return the completion of the abbreviation "bed2" rather than the current value of the reference "refs/heads/foo-gbed2". Move the parsing of git describe abbreviations out of the operator portion of the resolve() method and into the simple portion that is supposed to handle only object ids or reference names, and only do the describe parsing after all other approaches have already failed to provide a resolution. Add new unit tests to verify the behavior is as expected by users. Bug: 338839 Change-Id: I52054d7b89628700c730f9a4bd7743b16b9042a9 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-0.12
Shawn O. Pearce
14 years ago
2 changed files with 38 additions and 18 deletions
Loading…
Reference in new issue