vscode-pull-request-github
vscode-pull-request-github copied to clipboard
Creating pull request throws `Failed to execute git` error and does nothing
Hi, I'm facing a weird bug where the extension just throws Failed to execute git
when trying to create a pull request.
As can be seen in above image, it shows the error with files changed
and commits
section stuck on infinite loading.
Weird thing is that the extension is connected to remote since I can push the branch and fetch list of issues correctly:
I tried reinstalling the extension, installed pre-release version, installed old versions, but they don't all work. I also tried deleting and reinstalling vscode but it didn't work. Clean install following this post didn't work too.
Another problem is that the status of the created issues
doesn't sync with the currently checked out branch:
The branch is now at 26, but status is out of sync with the extension (There should be a checkmark on the left side of
26:
but there's none):
At this phase, when I try to checkout to issue 26, then it throws this error:
This is happening to all of my projects out of sudden and I absolutely have no idea why this is happening.
- Extension version: 0.78.1
- VSCode Version: 1.85.2
- OS: macOS Sonoma 14.2.1
- 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
I just got this log when checking out to different branch:
2024-01-25 16:46:57.564 [info] Review+0> Validate state in progress
2024-01-25 16:46:57.564 [info] Review+0> Validating state...
2024-01-25 16:46:57.574 [info] Found GitHub remote for folder /Users/{user_name}/Documents/workspace/{project_name}
2024-01-25 16:46:57.575 [info] Using in-memory cached assignable users.
2024-01-25 16:46:57.603 [info] Review+0> No matching pull request metadata found locally for current branch main
2024-01-25 16:47:37.989 [error] GitHubRepository> Unable to fetch issues: TypeError: Cannot read properties of null (reading 'repository')
2024-01-25 16:47:40.172 [error] GitHubRepository> Unable to fetch repository fork details: TypeError: Cannot read properties of null (reading 'repository')
2024-01-25 16:47:40.697 [info] Review+0> Queuing additional validate state
I'll post more error logs if I find any
@thisisgit next time you see the Failed to execute git
error can you also share the output from "Git"?
At this phase, when I try to checkout to issue 26, then it throws this error:
Same for this. Can you share the output from "Git" when you next encounter this?
Hi @alexr00 , here's "git" log when unable to checkout branch x
error occurred:
2024-02-05 22:49:35.873 [info] > git config --get commit.template [23ms]
2024-02-05 22:49:35.902 [info] > git status -z -uall [28ms]
2024-02-05 22:49:37.120 [info] > git ls-tree -l HEAD -- /Users/admin/Documents/workspace/{repo_name}/src/ui/list-items/index.ts [26ms]
2024-02-05 22:49:37.145 [info] > git show --textconv HEAD:src/ui/list-items/index.ts [23ms]
2024-02-05 22:49:40.948 [info] > git config --get commit.template [38ms]
2024-02-05 22:49:40.949 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/108 refs/remotes/thisisgit/108 [36ms]
2024-02-05 22:49:40.949 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-02-05 22:49:40.979 [info] > git status -z -uall [29ms]
2024-02-05 22:50:09.255 [info] > git ls-tree -l HEAD -- /Users/admin/Documents/workspace/{repo_name}/src/ui/list-items/index.ts [36ms]
2024-02-05 22:51:12.720 [info] > git config --local branch.thisisgit/108.github-pr-owner-number [30ms]
2024-02-05 22:51:12.721 [warning] git config failed: Failed to execute git
2024-02-05 22:51:12.743 [info] > git config --local branch.thisisgit/108.remote [21ms]
2024-02-05 22:51:12.765 [info] > git config --local branch.thisisgit/108.merge [21ms]
2024-02-05 22:51:33.401 [info] > git ls-tree -l HEAD -- /Users/admin/Documents/workspace/{repo_name}/src/ui/list-items/index.ts [36ms]
And while these log is printed, these two pop-ups showed up:
I've already pasted log from GH pull request here so you may also want to check that one.
And here's log of Failed to execute git
:
2024-02-05 22:59:05.470 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/108 refs/remotes/thisisgit/108 [27ms]
2024-02-05 22:59:05.471 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
I get the same error message, but not when creating a PR. For me, clicking on the PR description doesn't work (the tab remains blank), and instead I get the error:
In the background, you can also see the output for Git. The offending line is this I think:
2024-02-08 08:13:42.358 [info] fatal: ambiguous argument 'origin/vscode..upstream/main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I'm also getting the same error as @cbrnr, when clicking on Description item I get "failed to execute git" message and similar error in logs about unknown revision or path
It's worth noting that this happened only for one particular repository for me. I haven't experienced the issue in any other repos so far.
I found that the latest stable version(0.82) throws error in GraphQL query when "Create Pull Request" button is clicked:
[error] GitHubRepository> Error querying GraphQL API: GraphQL error: Could not resolve to a Repository with the name '{organization_name}.github'
[error] GitHubRepository> Fetching pull request templates failed: Error: GraphQL error: Could not resolve to a Repository with the name '{organization_name}/.github'
It's thrown in query
function of githubRepository.ts
.
I checked the variables passed and they are:
{ name: {repo_name}, owner: {organization_name} }
This error is thrown with Failed to execute git
error:
Note that it's a private repo in an organization. That's why I wrote organization_name
instead of username(thisisgit).
Is there something wrong with the args passed to gql? @alexr00
@thisisgit you might need to sign out and sign back in again. I'm not sure that GitHub indicates the difference between a private repo and a repo that doesn't exist, and if you didn't give permission to access that particular repo when you signed in then we might not be allowed to know about it.
Hmm I tried signing out and signing in again but still no luck. Also tried revoking github for vs code in the settings and re-allowed permission but still not working.
Also tried on both public and private repos of an org and personal account but they all don't work. Also updated the extension to 0.86 and now seeing this view:
And while debugging to figure out where the problem is coming from, I saw this error message:
GitHubRepository> Error querying GraphQL API: GraphQL error: Something went wrong while executing your query. Please include `E945:2DD001:E643C0:EE9152:660FBCFB` when reporting this issue
Can you suggest where I can look into to resolve this Failed to execute git
problem? Like for example, I could trace out that I get that error when I'm trying to checkout an existing branch using the extension, and the error comes from getBranch
function of currentIssue.ts
but have no clue why this error is being triggered.
I can see that branch
gets right value, this.manager.repository
is not null and has fields related to the repository that I'm working on, but can't trace further how that getBranch
function throws Failed to execute git
error. @alexr00
The GraphQL error could have been due to the GitHub outage: https://www.githubstatus.com/incidents/5ly0psff2s5d
Can you suggest where I can look into to resolve this Failed to execute git problem? Like for example, I could trace out that I get that error when I'm trying to checkout an existing branch using the extension, and the error comes from getBranch function of currentIssue.ts but have no clue why this error is being triggered.
I'm not sure how the error could come from getBranch
since all errors are caught in that method. Based on the stack trace in your previous comment, that error is actually coming from here:
https://github.com/microsoft/vscode-pull-request-github/blob/9b76ca32a579dcf9dfab51664bd3029a5ea5aa79/src/view/createPullRequestDataModel.ts#L144-L148
And this error makes sense and is a bug, that I can make a fix for 👍 Thanks for looking further, it made me take a closer look.
These are a red herring since we're just looking for PR templates and it's expected they fail. I'll downgrade them to a warning:
[error] GitHubRepository> Error querying GraphQL API: GraphQL error: Could not resolve to a Repository with the name '{organization_name}.github'
[error] GitHubRepository> Fetching pull request templates failed: Error: GraphQL error: Could not resolve to a Repository with the name '{organization_name}/.github'
@thisisgit can you share the whole callstack from https://github.com/microsoft/vscode-pull-request-github/issues/5668#issuecomment-2036654629?
Actually, I can repro if I just checkout a commit instead of a branch.
Hi @alexr00, thank you for working on this. I pulled your fix(commit 610806fg), tried it locally, but sadly still shows the same error😞
And I think I confused you by giving two different examples leading to Failed to execute git
error.
The first one is caused from Create Pull Request
command of the extension, and
the second one is caused from checking out an "existing" branch via clicking the issue from the extension.
I assumed that they're coming from the same cause and happened to mix up the examples. Sorry for that.
So I recorded my screen to show the flow on how that error pops up when Create Pull Request
is clicked
https://github.com/microsoft/vscode-pull-request-github/assets/13231564/5f9d37c7-7636-4c7a-a09f-53e3ac4a6323
Link to repo used for this demo
Here's the log from debug console of vscode-pull-request:
rejected promise not handled within 1 second: HttpError: Not Found
stack trace: HttpError: Not Found
at /Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:18642:31
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BulkheadPolicy.execute (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:52816:24)
rejected promise not handled within 1 second: Failed to execute git {
"exitCode": 129,
"gitCommand": "for-each-ref",
"stdout": "",
"stderr": "error: unknown option `ignore-case'\nusage: git for-each-ref [<options>] [<pattern>]\n or: git for-each-ref [--points-at <object>]\n or: git for-each-ref [(--merged | --no-merged) [<object>]]\n or: git for-each-ref [--contains [<object>]]\n\n -s, --shell quote placeholders suitably for shells\n -p, --perl quote placeholders suitably for perl\n --python quote placeholders suitably for python\n --tcl quote placeholders suitably for Tcl\n\n --count <n> show only <n> matched refs\n --format <format> format to use for the output\n --sort <key> field name to sort on\n --points-at <object> print only refs which points at the given object\n --merged <commit> print only refs that are merged\n --no-merged <commit> print only refs that are not merged\n --contains <commit> print only refs which contain the commit\n\n"
}
stack trace: Error: Failed to execute git
at t.Git._exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:907618)
at async t.Git.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:906686)
at async F.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:912189)
at async F.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:932644)
at async T.retryRun (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024656)
at async T.run (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024260)
at async T.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1012369)
at async CreatePullRequestHelper.create (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:80199:43)
rejected promise not handled within 1 second: Failed to execute git {
"exitCode": 129,
"gitCommand": "for-each-ref",
"stdout": "",
"stderr": "error: unknown option `ignore-case'\nusage: git for-each-ref [<options>] [<pattern>]\n or: git for-each-ref [--points-at <object>]\n or: git for-each-ref [(--merged | --no-merged) [<object>]]\n or: git for-each-ref [--contains [<object>]]\n\n -s, --shell quote placeholders suitably for shells\n -p, --perl quote placeholders suitably for perl\n --python quote placeholders suitably for python\n --tcl quote placeholders suitably for Tcl\n\n --count <n> show only <n> matched refs\n --format <format> format to use for the output\n --sort <key> field name to sort on\n --points-at <object> print only refs which points at the given object\n --merged <commit> print only refs that are merged\n --no-merged <commit> print only refs that are not merged\n --contains <commit> print only refs which contain the commit\n\n"
}
stack trace: Error: Failed to execute git
at t.Git._exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:907618)
at async t.Git.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:906686)
at async F.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:912189)
at async F.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:932644)
at async T.retryRun (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024656)
at async T.run (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024260)
at async T.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1012369)
at async CreatePullRequestDataModel.updateHasUpstream (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:79980:27)
at async CreatePullRequestDataModel.setCompareBranch (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:79967:17)
rejected promise not handled within 1 second: Failed to execute git {
"exitCode": 129,
"gitCommand": "for-each-ref",
"stdout": "",
"stderr": "error: unknown option `ignore-case'\nusage: git for-each-ref [<options>] [<pattern>]\n or: git for-each-ref [--points-at <object>]\n or: git for-each-ref [(--merged | --no-merged) [<object>]]\n or: git for-each-ref [--contains [<object>]]\n\n -s, --shell quote placeholders suitably for shells\n -p, --perl quote placeholders suitably for perl\n --python quote placeholders suitably for python\n --tcl quote placeholders suitably for Tcl\n\n --count <n> show only <n> matched refs\n --format <format> format to use for the output\n --sort <key> field name to sort on\n --points-at <object> print only refs which points at the given object\n --merged <commit> print only refs that are merged\n --no-merged <commit> print only refs that are not merged\n --contains <commit> print only refs which contain the commit\n\n"
}
stack trace: Error: Failed to execute git
at t.Git._exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:907618)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async t.Git.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:906686)
at async F.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:912189)
at async F.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:932644)
at async T.retryRun (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024656)
at async T.run (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024260)
at async T.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1012369)
at async _CreatePullRequestViewProvider.changeBranch (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:65935:61)
rejected promise not handled within 1 second: Failed to execute git {
"exitCode": 129,
"gitCommand": "for-each-ref",
"stdout": "",
"stderr": "error: unknown option `ignore-case'\nusage: git for-each-ref [<options>] [<pattern>]\n or: git for-each-ref [--points-at <object>]\n or: git for-each-ref [(--merged | --no-merged) [<object>]]\n or: git for-each-ref [--contains [<object>]]\n\n -s, --shell quote placeholders suitably for shells\n -p, --perl quote placeholders suitably for perl\n --python quote placeholders suitably for python\n --tcl quote placeholders suitably for Tcl\n\n --count <n> show only <n> matched refs\n --format <format> format to use for the output\n --sort <key> field name to sort on\n --points-at <object> print only refs which points at the given object\n --merged <commit> print only refs that are merged\n --no-merged <commit> print only refs that are not merged\n --contains <commit> print only refs which contain the commit\n\n"
}
stack trace: Error: Failed to execute git
at t.Git._exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:907618)
at async t.Git.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:906686)
at async F.exec (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:912189)
at async F.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:932644)
at async T.retryRun (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024656)
at async T.run (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1024260)
at async T.getBranch (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main.js:2:1012369)
at async _CreatePullRequestViewProvider.doInitializeParams (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:65282:34)
rejected promise not handled within 1 second: HttpError: Not Found
stack trace: HttpError: Not Found
at /Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:18642:31
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BulkheadPolicy.execute (/Users/admin/Documents/workspace/vscode-pull-request-github/dist/extension.js:52816:24)
And here's log from `Output` tab(Github Pull Request) of extension development host:
2024-04-06 11:58:26.413 [warning] /Users/admin/.ssh/config: ENOENT: no such file or directory, open '/Users/admin/.ssh/config'
2024-04-06 11:58:26.413 [info] Activation> Extension version: 0.86.0
2024-04-06 11:58:26.452 [info] Looking for git repository
2024-04-06 11:58:26.452 [info] Found 0 repositories during activation
2024-04-06 11:58:26.452 [info] Git repository found, initializing review manager and pr tree view.
2024-04-06 11:58:26.454 [info] Registering git provider
2024-04-06 11:58:26.454 [info] Review+0> Validate state in progress
2024-04-06 11:58:26.454 [info] Review+0> Validating state...
2024-04-06 11:58:26.463 [info] Found GitHub remote for folder /Users/admin/Documents/workspace/test
2024-04-06 11:58:26.485 [info] Repo state for file:///Users/admin/Documents/workspace/test changed.
2024-04-06 11:58:26.485 [info] Repo file:///Users/admin/Documents/workspace/test has already been setup.
2024-04-06 11:58:26.779 [info] Trying to use globalState for assignableUsers.
2024-04-06 11:58:26.821 [info] Review+0> No matching pull request metadata found locally for current branch master
2024-04-06 11:58:26.822 [info] Using globalState assignableUsers for 1.
2024-04-06 11:58:26.954 [warning] GitHubServer> No response from host https://origi/n: request to https://origi/api/v3/rate_limit failed, reason: getaddrinfo ENOTFOUND origi
2024-04-06 11:58:31.957 [error] GitHubRepository> Unable to fetch repository fork details: TypeError: Cannot read properties of null (reading 'repository')
2024-04-06 11:58:32.383 [info] Review+0> Queuing additional validate state
2024-04-06 12:00:26.473 [error] Review+0> Timeout occurred while validating state.
2024-04-06 12:00:26.476 [info] Review+0> Validating state...
2024-04-06 12:00:26.526 [info] Found GitHub remote for folder /Users/admin/Documents/workspace/test
2024-04-06 12:00:26.531 [info] Trying to use globalState for assignableUsers.
2024-04-06 12:00:26.562 [info] Using globalState assignableUsers for 1.
2024-04-06 12:00:26.572 [info] Review+0> No matching pull request metadata found locally for current branch thisisgit/3
2024-04-06 12:02:26.489 [error] Review+0> Timeout occurred while validating state.
And here's git log from extension development host:
2024-04-06 11:58:25.333 [info] Log level: Info
2024-04-06 11:58:25.334 [info] Validating found git in: "/usr/local/bin/git"
2024-04-06 11:58:25.358 [info] Using git "2.10.1" from "/usr/local/bin/git"
2024-04-06 11:58:26.078 [info] > git rev-parse --show-toplevel [714ms]
2024-04-06 11:58:26.384 [info] > git rev-parse --git-dir --git-common-dir [37ms]
2024-04-06 11:58:26.390 [info] Open repository: /Users/admin/Documents/workspace/test
2024-04-06 11:58:26.429 [info] > git config --get commit.template [34ms]
2024-04-06 11:58:26.441 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/master refs/remotes/master [27ms]
2024-04-06 11:58:26.441 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:26.484 [info] > git status -z -uall [41ms]
2024-04-06 11:58:26.520 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/master refs/remotes/master [25ms]
2024-04-06 11:58:26.520 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:26.520 [info] > git config --get commit.template [30ms]
2024-04-06 11:58:26.543 [info] > git status -z -uall [22ms]
2024-04-06 11:58:26.819 [info] > git config --local branch.master.github-pr-owner-number [37ms]
2024-04-06 11:58:26.819 [warning] git config failed: Failed to execute git
2024-04-06 11:58:26.844 [info] > git config --local branch.master.remote [24ms]
2024-04-06 11:58:26.868 [info] > git config --local branch.master.merge [23ms]
2024-04-06 11:58:26.932 [info] > git check-ignore -v -z --stdin [25ms]
2024-04-06 11:58:32.284 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/undefined refs/remotes/undefined [36ms]
2024-04-06 11:58:32.284 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:32.311 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [23ms]
2024-04-06 11:58:32.311 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:32.336 [info] > git checkout -q -b thisisgit/3 --no-track [23ms]
2024-04-06 11:58:32.358 [info] > git config --get commit.template [21ms]
2024-04-06 11:58:32.359 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [21ms]
2024-04-06 11:58:32.359 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:32.382 [info] > git status -z -uall [22ms]
2024-04-06 11:58:33.477 [info] > git config --get commit.template [37ms]
2024-04-06 11:58:33.478 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [36ms]
2024-04-06 11:58:33.478 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:33.505 [info] > git status -z -uall [26ms]
2024-04-06 11:58:41.790 [info] > git show --textconv :test.ts [36ms]
2024-04-06 11:58:41.791 [info] > git ls-files --stage -- /Users/admin/Documents/workspace/test/test.ts [34ms]
2024-04-06 11:58:41.975 [info] > git check-ignore -v -z --stdin [26ms]
2024-04-06 11:58:42.725 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [26ms]
2024-04-06 11:58:42.725 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:42.725 [info] > git config --get commit.template [28ms]
2024-04-06 11:58:42.754 [info] > git status -z -uall [28ms]
2024-04-06 11:58:48.602 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [33ms]
2024-04-06 11:58:48.602 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:48.603 [info] > git config --get commit.template [36ms]
2024-04-06 11:58:48.638 [info] > git status -z -uall [34ms]
2024-04-06 11:58:53.823 [info] > git add -A -- . [35ms]
2024-04-06 11:58:53.852 [info] > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - [28ms]
2024-04-06 11:58:53.874 [info] > git config --get commit.template [21ms]
2024-04-06 11:58:53.901 [info] > git config --get commit.template [23ms]
2024-04-06 11:58:53.901 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [23ms]
2024-04-06 11:58:53.901 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:53.929 [info] > git status -z -uall [26ms]
2024-04-06 11:58:53.987 [info] > git config --get commit.template [22ms]
2024-04-06 11:58:53.990 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [24ms]
2024-04-06 11:58:53.990 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:54.015 [info] > git status -z -uall [24ms]
2024-04-06 11:58:55.142 [info] > git ls-files --stage -- /Users/admin/Documents/workspace/test/test.ts [40ms]
2024-04-06 11:58:55.167 [info] > git cat-file -s 9cbbe880903d37fb8565c64eb6e2fb15bc55060f [24ms]
2024-04-06 11:58:55.192 [info] > git show --textconv :test.ts [23ms]
2024-04-06 11:58:57.785 [info] > git push -u origin thisisgit/3 [1727ms]
2024-04-06 11:58:57.785 [info] To https://github.com/thisisgit/test
* [new branch] thisisgit/3 -> thisisgit/3
2024-04-06 11:58:57.814 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [25ms]
2024-04-06 11:58:57.814 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:57.815 [info] > git config --get commit.template [27ms]
2024-04-06 11:58:57.841 [info] > git status -z -uall [25ms]
2024-04-06 11:58:58.910 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [33ms]
2024-04-06 11:58:58.910 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:58:58.910 [info] > git config --get commit.template [36ms]
2024-04-06 11:58:58.940 [info] > git status -z -uall [28ms]
2024-04-06 11:58:58.990 [info] > git ls-files --stage -- /Users/admin/Documents/workspace/test/test.ts [24ms]
2024-04-06 11:58:59.014 [info] > git cat-file -s 9cbbe880903d37fb8565c64eb6e2fb15bc55060f [23ms]
2024-04-06 11:58:59.041 [info] > git show --textconv :test.ts [23ms]
2024-04-06 11:59:00.714 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [35ms]
2024-04-06 11:59:00.714 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:59:07.432 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [34ms]
2024-04-06 11:59:07.432 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:59:07.433 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [31ms]
2024-04-06 11:59:07.433 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:59:07.459 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/main refs/remotes/main [24ms]
2024-04-06 11:59:07.459 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 11:59:07.478 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) --ignore-case refs/heads/thisisgit/3 refs/remotes/thisisgit/3 [22ms]
2024-04-06 11:59:07.478 [info] error: unknown option `ignore-case'
usage: git for-each-ref [<options>] [<pattern>]
or: git for-each-ref [--points-at <object>]
or: git for-each-ref [(--merged | --no-merged) [<object>]]
or: git for-each-ref [--contains [<object>]]
-s, --shell quote placeholders suitably for shells
-p, --perl quote placeholders suitably for perl
--python quote placeholders suitably for python
--tcl quote placeholders suitably for Tcl
--count <n> show only <n> matched refs
--format <format> format to use for the output
--sort <key> field name to sort on
--points-at <object> print only refs which points at the given object
--merged <commit> print only refs that are merged
--no-merged <commit> print only refs that are not merged
--contains <commit> print only refs which contain the commit
2024-04-06 12:00:26.569 [info] > git config --local branch.thisisgit/3.github-pr-owner-number [33ms]
2024-04-06 12:00:26.569 [warning] git config failed: Failed to execute git
2024-04-06 12:00:26.594 [info] > git config --local branch.thisisgit/3.remote [22ms]
2024-04-06 12:00:26.616 [info] > git config --local branch.thisisgit/3.merge [20ms]
First, a big thank you for your thoroughness in including logs from so many places. It has absolutely helped in figuring this out. Now, on to next steps.
One of the early exceptions in your logs is about ignore-case
not being a valid option for a git command. Based on your git logs, your git version is 2.10.1
. This is from 2016!
@lszomoru, do you define a minimum git version that you require for the git extension? I checked back to 2.29 (which is from 2020), and that supports ignore-case
.
@thisisgit can you try updating your git version?
Oh wow... finally it worked! Why couldn't I think of checking my git version? I've seen some other issues here with the same error and they probably haven't updated their git version as well.
Thank you so much! @alexr00
Looking at the git source code and release notes, it looks like --ignore-case
flag was added in 2.12 which was released in 2017. We can certainly add code to not include the flag if it is not supported.
Does this require verification? Seems like @thisisgit was able to get their project working again?
There was a bug that I fixed that @thisisgit's upgrading git wouldn't have verified. To verify:
- Install the pre-release version of GHPR
- Open a clone of a GitHub repo.
- Checkout a commit, not a branch
- Run the command "Create Pull Request"
- Verify that the create PR view opens properly and doesn't show errors.
I still get the following
2024-04-25 08:00:12.598 [error] GitHubRepository> Error querying GraphQL API: GraphQL error: Could not resolve to a Repository with the name 'rzhao271/.github'..
2024-04-25 08:00:12.599 [error] GitHubRepository> Unable to fetch issues with query: Error: GraphQL error: Could not resolve to a Repository with the name 'rzhao271/.github'.
I got a "Branch does not exist locally" error notification with slightly different steps
- Create a new branch and add a commit but don't push it
- Checkout that commit
- Run the command "Create Pull Request"
- The PR view opens but also shows an error notification
Edit: I seem to get that error notification every time I check out a commit instead of a branch using git checkout <commit-SHA>
.