Microsoft/vscode
Voir sur GitHubGit extension API branch `upstream` is undefined when repo was cloned shallow
Open
#248 328 ouverte le 21 mars 2025
buggithelp wanted
Métriques du dépôt
- Stars
- (74 848 stars)
- Métriques de merge PR
- (Merge moyen 11h 43m) (1 000 PRs mergées en 30 j)
Description
Description
When cloning a repository with git clone --depth 1, creating a new branch, and then attempting to create a pull request using the VSCode GitHub Pull Request extension, the following issues occur:
- The AI-powered PR title and description generator does not work.
- After creating the PR, the extension does not detect it properly.
You can post this on the [GitHub Pull Request extension's issue tracker](https://github.com/microsoft/vscode-pull-request-github/issues). Let me know if you need any modifications! 🚀
- Extension version: 0.106.0
- VSCode Version: 1.96.4
- Git Version: 2.43.0
- OS: macos sonoma
- Repository Clone Configuration (single repository/fork of an upstream repository): fork of an upstream repository
- Github Product (Github.com/Github Enterprise version x.x.x): Github.com
Steps to Reproduce
- Clone a repository with
git clone --depth 1 https://github.com/hichemfantar/nextra-fork. - Create and switch to a new branch:
git checkout -b new-feature - Make some changes and commit them.
- Open the GitHub Pull Request extension and attempt to create a PR.
Expected Behavior
- The AI-powered PR title and description should generate properly.
- The created PR should be detected by the extension.
Actual Behavior
- The AI-powered PR title and description generator does not work.
- The extension does not detect the created PR after it's created.
Additional Notes
- The issue may be caused by the shallow clone preventing the extension from accessing full branch history.