-
Notifications
You must be signed in to change notification settings - Fork 634
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality
Description
Thanks for this very nice extension!! It is really nice to review code in my code editor:)
I noticed that when I clicked the blue "Checkout" button in the pull request tab, the following happens:
- The extension adds a remote named after the GitHub username of the pull-request author (this remote is not deleted when I "Exit review mode")
- This new remote is fetched (this creates remote-tracking branches for all branches in the contributor's remote)
- The the source branch of the pull request is checked out (this branch is not deleted when I "Exit review mode")
I don't like 2), it pollutes the output of git branch -r
.
I think the extension should only fetch the branch of the pull request, i.e.
git fetch $PR_AUTHOR_REMOTE_URL $PR_BRANCH:refs/heads/pr/$AUTHOR_GITHUB_USERNAME/$PR_NUMBER
In fact, adding a remote is not even necessary as Git can fetch a branch directly into FETCH_HEAD
, and we can the checkout FETCH_HEAD
in detached HEAD.
I understand the current behaviour might be convenient for some, but maybe it could be configurable ?
MetRonnie, cdce8p and clemyan
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionality