Summary: | [git-webkit] Incorrect common directory when not in checkout root | ||
---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ap, jbedard, mcatanzaro, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Michael Catanzaro
2022-06-09 13:38:50 PDT
What does this print? git rev-parse --show-toplevel --git-common-dir I'm guessing that there is a ".." there, but no idea where it would come from. $ git rev-parse --show-toplevel --git-common-dir /home/mcatanzaro/Projects/WebKit .git I don't immediately see from the code how it's possible then! It's my first time looking at this code though, so surely I'm missing something. (In reply to Michael Catanzaro from comment #2) > $ git rev-parse --show-toplevel --git-common-dir > /home/mcatanzaro/Projects/WebKit > .git Wait, how is there a newline in there? If `def common_directory(self)` in `Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py` isn't returning the right thing, that's your problem. And I think a newline from `git rev-parse --show-toplevel --git-common-dir` would be pretty unexpected (In reply to Jonathan Bedard from comment #5) > (In reply to Michael Catanzaro from comment #2) > > ... > > Wait, how is there a newline in there? If `def common_directory(self)` in > `Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py` isn't > returning the right thing, that's your problem. And I think a newline from > `git rev-parse --show-toplevel --git-common-dir` would be pretty unexpected Oh, you passed two arguments to `git rev-parse`, that's why. `def common_directory` is definitely the culprit, though The .. seem to be based on which directory I am in: $ pwd /home/mcatanzaro/Projects/WebKit $ git rev-parse --git-common-dir .git $ cd Source/ $ git rev-parse --git-common-dir ../.git $ cd WebCore/ $ git rev-parse --git-common-dir ../../.git Pull request: https://github.com/WebKit/WebKit/pull/1610 `git-webkit find HEAD` should reproduce the problem as well. Committed r295662 (251667@main): <https://commits.webkit.org/251667@main> Reviewed commits have been landed. Closing PR #1610 and removing active labels. |