gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.61k stars 499 forks source link

Barfs on negative refspecs #4961

Open t-b opened 1 week ago

t-b commented 1 week ago

Version

0.12.25

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

I wanted to open a local repository and got the following error message:

grafik

How to reproduce

$ diff -Nur config.orig config
--- config.orig 2024-09-23 22:33:32.945565000 +0200
+++ config      2024-09-23 22:29:43.281988300 +0200
@@ -7,6 +7,7 @@
 [remote "origin"]
        url = https://github.com/gitbutlerapp/gitbutler
        fetch = +refs/heads/master:refs/remotes/origin/master
+       fetch = ^refs/heads/gh-pages
 [branch "master"]
        remote = origin
        merge = refs/heads/master

Opening the repo in gitbutler gives the above error message.

I'd guess this is a gitoxide issue.

Expected behavior

No response

Relevant log output

2024-09-23T20:35:44.268092Z  INFO crates\gitbutler-tauri\src/main.rs:64: system git executable for fetch/push: "git.exe"
2024-09-23T20:35:44.268267Z  INFO crates\gitbutler-tauri\src/main.rs:101: starting app version=0.12.25 name=GitButler
2024-09-23T20:35:44.355365Z  INFO list_projects: crates\gitbutler-tauri\src\projects.rs:46: new
2024-09-23T20:35:44.355579Z  INFO list_projects: crates\gitbutler-tauri\src\projects.rs:46: close time.busy=187µs time.idle=28.5µs
2024-09-23T20:35:44.360112Z  INFO get_user: crates\gitbutler-tauri\src\users.rs:10: new
2024-09-23T20:35:44.360757Z  INFO get_user: crates\gitbutler-tauri\src\users.rs:10: close time.busy=618µs time.idle=27.5µs
2024-09-23T20:35:44.405818Z  INFO get_project: crates\gitbutler-tauri\src\projects.rs:32: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 no_validation=None
2024-09-23T20:35:44.407276Z  INFO get_project: crates\gitbutler-tauri\src\projects.rs:32: close time.busy=1.44ms time.idle=22.7µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 no_validation=None
2024-09-23T20:35:44.407975Z  INFO set_project_active: crates\gitbutler-tauri\src\projects.rs:67: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.408499Z  INFO set_project_active:set_project_to_window: crates\gitbutler-tauri\src\window.rs:129: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main"
2024-09-23T20:35:44.409403Z  INFO set_project_active:set_project_to_window:file monitor: crates\gitbutler-watcher\src\file_monitor.rs:115: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.409881Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:44.411059Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.411176Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.411743Z  INFO git_head: crates\gitbutler-tauri\src\commands.rs:56: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.412066Z  INFO fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:44.412849Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.412868Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.68ms time.idle=8.60µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.412875Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.81ms time.idle=7.90µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.414084Z  INFO git_head: crates\gitbutler-tauri\src\commands.rs:56: close time.busy=2.33ms time.idle=12.2µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.415083Z  INFO git_remote_branches: crates\gitbutler-tauri\src\commands.rs:9: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.418572Z  INFO operating_mode: crates\gitbutler-tauri\src\modes.rs:13: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.420663Z  INFO operating_mode: crates\gitbutler-tauri\src\modes.rs:13: close time.busy=2.08ms time.idle=12.8µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.587097Z  INFO git_remote_branches: crates\gitbutler-tauri\src\commands.rs:9: close time.busy=172ms time.idle=5.10µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.587145Z ERROR list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:44.587159Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: close time.busy=177ms time.idle=7.30µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:44.932055Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.932107Z  INFO list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.932269Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.933630Z ERROR list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.933643Z  INFO list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: close time.busy=1.53ms time.idle=7.90µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.934081Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.934094Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.81ms time.idle=11.8µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.934099Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=2.03ms time.idle=14.5µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:44.934391Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:44.939080Z ERROR list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:44.939092Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: close time.busy=4.69ms time.idle=12.3µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:45.540571Z ERROR fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: error=Error(backend error: git command exited with non-zero exit code 1: ["fetch", "--quiet", "--prune", "origin", "+refs/heads/*:refs/remotes/origin/*"]

STDOUT:

STDERR:
error: cannot lock ref 'refs/remotes/origin/New-"update"-API': Unable to create 'E:/projekte/test/gitbutler/.git/refs/remotes/origin/New-"update"-API.lock': Invalid argument
error: cannot lock ref 'refs/remotes/origin/fea-add-<form-/>-to-Modal-implementation': unable to create directory for .git/refs/remotes/origin/fea-add-<form-/>-to-Modal-implementation) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:45.540587Z  INFO fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: close time.busy=1.13s time.idle=14.4µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:45.915962Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:45.921774Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=5.79ms time.idle=26.0µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 fs_events=4088 fs_events=4088 ignored=0 ignored=0 git_noop=4086 git_noop=4086 git=1 git=1 project=0 project=0 git_dedup=1 git_dedup=1
2024-09-23T20:35:45.921888Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:45.922115Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=223µs time.idle=4.80µs event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:46.437122Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:46.437435Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:46.438905Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:46.438922Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.47ms time.idle=12.1µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:46.438931Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.79ms time.idle=21.1µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.071836Z  INFO update_project: crates\gitbutler-tauri\src\projects.rs:14: new project=UpdateRequest { id: 3d89f4e7-fa52-43c7-801b-759cdeb776b0, title: Some("gitbutler"), description: None, path: Some("E:\\projekte\\test\\gitbutler"), api: None, gitbutler_data_last_fetched: None, preferred_key: Some(SystemExecutable), ok_with_force_push: Some(true), gitbutler_code_push_state: None, project_data_last_fetched: None, omit_certificate_check: None, use_diff_context: None, snapshot_lines_threshold: None, succeeding_rebases: Some(false) }
2024-09-23T20:35:48.072630Z  INFO update_project: crates\gitbutler-tauri\src\projects.rs:14: close time.busy=782µs time.idle=14.1µs project=UpdateRequest { id: 3d89f4e7-fa52-43c7-801b-759cdeb776b0, title: Some("gitbutler"), description: None, path: Some("E:\\projekte\\test\\gitbutler"), api: None, gitbutler_data_last_fetched: None, preferred_key: Some(SystemExecutable), ok_with_force_push: Some(true), gitbutler_code_push_state: None, project_data_last_fetched: None, omit_certificate_check: None, use_diff_context: None, snapshot_lines_threshold: None, succeeding_rebases: Some(false) }
2024-09-23T20:35:48.073335Z  INFO list_projects: crates\gitbutler-tauri\src\projects.rs:46: new
2024-09-23T20:35:48.073398Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.073420Z  INFO list_projects: crates\gitbutler-tauri\src\projects.rs:46: close time.busy=78.2µs time.idle=7.30µs
2024-09-23T20:35:48.073605Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.075151Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.075168Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.55ms time.idle=10.6µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.075174Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.76ms time.idle=18.5µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.075647Z  INFO set_base_branch: crates\gitbutler-tauri\src\virtual_branches.rs:141: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.076849Z  INFO set_base_branch:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:151: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.077792Z ERROR set_base_branch:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:151: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.077803Z  INFO set_base_branch:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:151: close time.busy=946µs time.idle=9.40µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.078515Z ERROR set_base_branch: crates\gitbutler-tauri\src\virtual_branches.rs:141: error=Error(failed to find remote for branch refs/remotes/origin/master

Caused by:
    '^refs/heads/gh-pages' is not a valid refspec.; class=Invalid (3)) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.078529Z  INFO set_base_branch: crates\gitbutler-tauri\src\virtual_branches.rs:141: close time.busy=2.88ms time.idle=7.20µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 branch="origin/master" push_remote=Some("origin")
2024-09-23T20:35:48.079046Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.079090Z  INFO list_virtual_branches: crates\gitbutler-tauri\src\virtual_branches.rs:53: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.079144Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.080510Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.080522Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.37ms time.idle=6.60µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.080528Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.48ms time.idle=6.80µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.081587Z ERROR list_virtual_branches: crates\gitbutler-tauri\src\virtual_branches.rs:53: error=Error(<verification-failed>

Caused by:
    project is on refs/heads/master. Please checkout gitbutler/workspace to continue) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.081602Z  INFO list_virtual_branches: crates\gitbutler-tauri\src\virtual_branches.rs:53: close time.busy=2.50ms time.idle=9.90µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.089904Z  INFO get_project: crates\gitbutler-tauri\src\projects.rs:32: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 no_validation=None
2024-09-23T20:35:48.090566Z  INFO get_project: crates\gitbutler-tauri\src\projects.rs:32: close time.busy=654µs time.idle=7.40µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 no_validation=None
2024-09-23T20:35:48.091054Z  INFO set_project_active: crates\gitbutler-tauri\src\projects.rs:67: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.091543Z  INFO set_project_active:set_project_to_window: crates\gitbutler-tauri\src\window.rs:129: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main"
2024-09-23T20:35:48.091552Z  INFO set_project_active:set_project_to_window: crates\gitbutler-tauri\src\window.rs:129: close time.busy=900ns time.idle=8.00µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main"
2024-09-23T20:35:48.091558Z  INFO set_project_active: crates\gitbutler-tauri\src\projects.rs:67: close time.busy=499µs time.idle=5.10µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.092091Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:48.092402Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.092486Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.093236Z  INFO git_head: crates\gitbutler-tauri\src\commands.rs:56: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.093333Z  INFO fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:48.094001Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.094013Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.52ms time.idle=6.40µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.094018Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.61ms time.idle=7.30µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.094924Z  INFO git_head: crates\gitbutler-tauri\src\commands.rs:56: close time.busy=1.68ms time.idle=7.60µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.096455Z  INFO git_remote_branches: crates\gitbutler-tauri\src\commands.rs:9: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.096625Z  INFO operating_mode: crates\gitbutler-tauri\src\modes.rs:13: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.098687Z  INFO operating_mode: crates\gitbutler-tauri\src\modes.rs:13: close time.busy=2.05ms time.idle=9.20µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.421405Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.421474Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=45.0µs time.idle=25.7µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 fs_events=2 fs_events=2 ignored=0 ignored=0 git_noop=1 git_noop=1 git=1 git=1 project=0 project=0 git_dedup=1 git_dedup=1
2024-09-23T20:35:48.421863Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:48.422196Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=314µs time.idle=20.8µs event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:48.602336Z  INFO list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.603965Z ERROR list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.603978Z  INFO list_local_branches: crates\gitbutler-tauri\src\virtual_branches.rs:470: close time.busy=1.63ms time.idle=13.7µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.604908Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:48.849574Z ERROR fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: error=Error(backend error: git command exited with non-zero exit code 1: ["fetch", "--quiet", "--prune", "origin", "+refs/heads/*:refs/remotes/origin/*"]

STDOUT:

STDERR:
error: cannot lock ref 'refs/remotes/origin/New-"update"-API': Unable to create 'E:/projekte/test/gitbutler/.git/refs/remotes/origin/New-"update"-API.lock': Invalid argument
error: cannot lock ref 'refs/remotes/origin/fea-add-<form-/>-to-Modal-implementation': unable to create directory for .git/refs/remotes/origin/fea-add-<form-/>-to-Modal-implementation) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:48.849589Z  INFO fetch_from_remotes: crates\gitbutler-tauri\src\virtual_branches.rs:533: close time.busy=756ms time.idle=13.4µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 action=Some("auto")
2024-09-23T20:35:48.935495Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.935700Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.937148Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.937161Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.45ms time.idle=11.0µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:48.937167Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.66ms time.idle=12.4µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.423605Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: new id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.423666Z  INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=38.6µs time.idle=22.9µs id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 window="main" project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 fs_events=1 fs_events=1 ignored=0 ignored=0 git_noop=0 git_noop=0 git=1 git=1 project=0 project=0 git_dedup=1 git_dedup=1
2024-09-23T20:35:49.423793Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:49.424030Z  INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=225µs time.idle=13.4µs event=GitFileChange(3d89f4e7-fa52-43c7-801b-759cdeb776b0, FETCH_HEAD)
2024-09-23T20:35:49.647597Z  INFO git_remote_branches: crates\gitbutler-tauri\src\commands.rs:9: close time.busy=1.55s time.idle=4.20µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.647621Z ERROR list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:49.647629Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: close time.busy=1.04s time.idle=6.90µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:49.647642Z ERROR list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: error=Error(errors.projects.default_target.not_found

Caused by:
    there is no default target) project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:49.647651Z  INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:481: close time.busy=1.56s time.idle=4.80µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0 filter=Some(BranchListingFilter { local: None, applied: None })
2024-09-23T20:35:49.935834Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.936144Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: new project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.937465Z ERROR get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: error=errors.projects.default_target.not_found

Caused by:
    there is no default target project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.937479Z  INFO get_base_branch_data:get_base_branch_data: crates\gitbutler-branch-actions\src\actions.rs:133: close time.busy=1.32ms time.idle=11.7µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
2024-09-23T20:35:49.937484Z  INFO get_base_branch_data: crates\gitbutler-tauri\src\virtual_branches.rs:127: close time.busy=1.64ms time.idle=15.0µs project_id=3d89f4e7-fa52-43c7-801b-759cdeb776b0
Caleb-T-Owens commented 1 week ago

Hi! Thanks for writing in. I believe the root of this lies upstream in libgit2 which doesn't support negative refspecs https://github.com/libgit2/libgit2/issues/6741.

I do however wonder if the offending area might be replaceable with gitoxide which could resolve the issue.

Byron commented 1 week ago

I'd guess this is a gitoxide issue.

Indeed, the issue is that gitoxide is not used :), as it does support negative refspecs.

It will probably be a while until I get to this, but maybe it's possible to make this work surgically by only using gix where absolutely needed to fix this issue.

t-b commented 1 week ago

Thanks both. Nice to hear as well that gitoxide does support it ;)