Bug 313682
| Summary: | `git-webkit find` fails when run from outside the OpenSource checkout | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Tools / Tests | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Kilzer (:ddkilzer)
Running `git-webkit find <identifier>` from a directory that is not an OpenSource checkout resolves against the wrong git repository:
```
$ cd /some/other/git/repo/above
$ ./OpenSource/Tools/Scripts/git-webkit find 312293@main
Identifier 312293 cannot be found on the specified branch in the current checkout. Latest identifier on this branch is 1724
```
Or it generates a "No repository provided" error message if run from a directory that doesn't have a git repository:
```
$ cd /current/working/directory
$ ./OpenSource/Tools/Scripts/git-webkit find 312293@main
WARNING:webkitscmpy:No repository found at '/current/working/directory'
No repository provided
```
This happens because `program.main()` defaults to `os.getcwd()` for repository resolution. If CWD is inside any git repo (e.g., a parent directory that happens to be a different git repo), that repo is used instead of the OpenSource repo the script lives in. If there is no git repo at CWD, it just exits with an error.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175882224>
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/63922
EWS
Committed 312314@main (d8199ef1f019): <https://commits.webkit.org/312314@main>
Reviewed commits have been landed. Closing PR #63922 and removing active labels.