Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positron doesn't need restart for git pane #2011

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Positron doesn't need restart for git pane #2011

merged 2 commits into from
Jun 28, 2024

Conversation

hadley
Copy link
Member

@hadley hadley commented Jun 28, 2024

There remains a problem that I think a positron person will need to look into: during git_ask_commit(message, untracked = TRUE) the git pane pops up an error about unavailable git repository that you have to cancel. This is presumably some kind of race condition (since everything works once I click cancel), but it would be nice to eliminate it.

Screenshot 2024-06-28 at 08 20 57

Git log output
2024-06-28 08:20:47.325 [info] Log level: Debug
2024-06-28 08:20:47.333 [info] Validating found git in: "/usr/bin/git"
2024-06-28 08:20:47.357 [info] Using git "2.39.3 (Apple Git-146)" from "/usr/bin/git"
2024-06-28 08:20:47.488 [info] > git rev-parse --show-toplevel [129ms]
2024-06-28 08:20:47.488 [info] fatal: not a git repository (or any of the parent directories): .git
2024-06-28 08:20:47.563 [info] > git rev-parse --show-toplevel [36ms]
2024-06-28 08:20:47.563 [info] fatal: not a git repository (or any of the parent directories): .git
2024-06-28 08:20:49.443 [info] > git rev-parse --show-toplevel [17ms]
2024-06-28 08:20:49.443 [info] fatal: not a git repository (or any of the parent directories): .git
2024-06-28 08:20:53.806 [info] > git rev-parse --show-toplevel [12ms]
2024-06-28 08:20:53.819 [info] > git rev-parse --git-dir --git-common-dir [12ms]
2024-06-28 08:20:53.822 [info] Open repository: /Users/hadleywickham/Desktop/test2
2024-06-28 08:20:53.825 [info] No remotes found in the git config file.
2024-06-28 08:20:53.836 [info] > git config --get commit.template [13ms]
2024-06-28 08:20:53.839 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [15ms]
2024-06-28 08:20:53.839 [warning] No such branch: main.
2024-06-28 08:20:53.843 [info] > git fetch [21ms]
2024-06-28 08:20:53.845 [info] > git status -z -uall [5ms] (cancelled)
2024-06-28 08:20:53.846 [info] No remotes found in the git config file.
2024-06-28 08:20:53.846 [info] No remotes found in the git config file.
2024-06-28 08:20:53.858 [info] > git config --get commit.template [14ms]
2024-06-28 08:20:53.860 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [14ms]
2024-06-28 08:20:53.860 [warning] No such branch: main.
2024-06-28 08:20:53.861 [info] > git config --get commit.template [16ms]
2024-06-28 08:20:53.862 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [15ms]
2024-06-28 08:20:53.862 [warning] No such branch: main.
2024-06-28 08:20:53.874 [info] > git status -z -uall [11ms]
2024-06-28 08:20:53.934 [debug] [.git] Change: /Users/hadleywickham/Desktop/test2/.git/FETCH_HEAD
2024-06-28 08:20:54.346 [info] > git check-ignore -v -z --stdin [19ms]
2024-06-28 08:20:54.937 [info] No remotes found in the git config file.
2024-06-28 08:20:54.953 [info] > git config --get commit.template [15ms]
2024-06-28 08:20:54.954 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [16ms]
2024-06-28 08:20:54.954 [warning] No such branch: main.
2024-06-28 08:20:54.982 [info] > git status -z -uall [27ms]

@hadley hadley requested a review from jennybc June 28, 2024 12:57
@jennybc
Copy link
Member

jennybc commented Jun 28, 2024

Yeah, we know we have some work to do re: the vcsRefresh command in Positron's rstudioapi shims: posit-dev/positron#2697.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants