Open ipsquiggle opened 1 month ago
Thanks for reporting!
Last time I checked I noticed that it was only able to discard worktree changes, but not anything else, i.e. changes that are added to the index, or files removed from the index.
Is this what you are describing here, or there more to it that should be shared? Thanks again.
@Byron I don't think I'm doing anything fancy.. my workflow is 100% GitButler.. I make some change (i.e. adding a logging line) that I later want to remove. I right click on the change and "Discard" and nothing happens.
I've tried this after rebooting, on different branches, etc. The behaviour is perfectly consistent for me, my experience is that this feature simply doesn't work.
I have just attempted to discard using both the methods described in the OP, and then chose the "Share Debug Info" with a reference to this issue. I hope that helps!
Thanks a lot for the heads-up and for sending the report. This means the logs where sent to the team. You can also take a look at them yourself, I'd expect an error to show up right after trying to discard an entry. Maybe you could also share that here.
Thanks for also sharing your logs!
The only I saw in the backend side was the following.
2024-10-21T20:35:55.942022Z ERROR get_project_data_archive_path: crates\gitbutler-tauri\src\zip.rs:27: error=Error(C:\Users\graha\AppData\Roaming\com.gitbutler.app\projects\4909531c-4182-4d35-8e2c-5f37d84b44dd does not exist) project_id="4909531c-4182-4d35-8e2c-5f37d84b44dd"
However, on the frontend there were a bunch of these which could hang up certain other eventListeners:
[2024-07-09][01:27:23][ERROR][webview::unknown] Unhandled exception: Error: Commit dbb6fa192b7b446331fcb43644a730c426093d4a not found in commitIndexes undefined
I believe that commitIndexes issue has been fixed in the latest release(s) though. Could you give the latest release or nightly another try? :pray: (https://app.gitbutler.com/downloads)
This still occurs on the 0.13.6.
To narrow down the logs, I marked the log file, switched to the GitButler window, tried discarding a change, and then copied the newly added lines from the log. Here's those lines.
I agree, there's nothing in there that looks like an error...
Note: there were no new lines added to the ui-log.log
when performing these actions.
Discarding from the file view:
2024-10-23T17:32:46.508295Z INFO unapply_ownership: crates\gitbutler-tauri\src\virtual_branches.rs:236: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:32:46.512492Z INFO unapply_ownership:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:152: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:32:46.545906Z INFO unapply_ownership:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:152: close time.busy=33.4ms time.idle=14.7µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:32:46.895272Z INFO unapply_ownership: crates\gitbutler-tauri\src\virtual_branches.rs:236: close time.busy=387ms time.idle=10.4µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:32:46.895655Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:32:46.895665Z INFO handle:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: new event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:32:47.027996Z INFO handle:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: close time.busy=132ms time.idle=5.40µs event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:32:47.028016Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=132ms time.idle=10.0µs event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:32:47.029121Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:32:47.029609Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="Virtual branch"
2024-10-23T17:32:47.029618Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=2.30µs time.idle=8.00µs name="Virtual branch"
2024-10-23T17:32:47.029629Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="banana"
2024-10-23T17:32:47.029635Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=1.40µs time.idle=4.70µs name="banana"
2024-10-23T17:32:47.030297Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:32:47.031807Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: close time.busy=1.50ms time.idle=11.2µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:32:47.034622Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: close time.busy=5.49ms time.idle=9.40µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:32:47.088144Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:32:47.088167Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:32:47.088976Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=803µs time.idle=5.40µs key="user.name"
2024-10-23T17:32:47.088996Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=843µs time.idle=9.90µs key="user.name"
2024-10-23T17:32:47.089958Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:32:47.090001Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:32:47.090647Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=640µs time.idle=4.90µs key="user.email"
2024-10-23T17:32:47.090657Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=690µs time.idle=9.80µs key="user.email"
Discarding from the hunk view:
2024-10-23T17:34:45.946924Z INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=59.4µs time.idle=18.1µs id=4909531c-4182-4d35-8e2c-5f37d84b44dd window="main" project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd fs_events=34 fs_events=34 ignored=0 ignored=0 git_noop=34 git_noop=34 git=0 git=0 project=0 project=0
2024-10-23T17:35:13.035314Z INFO unapply_ownership: crates\gitbutler-tauri\src\virtual_branches.rs:236: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:35:13.039306Z INFO unapply_ownership:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:152: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:35:13.075013Z INFO unapply_ownership:create_snapshot: crates\gitbutler-oplog\src\oplog.rs:152: close time.busy=35.7ms time.idle=15.9µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:35:13.383212Z INFO unapply_ownership: crates\gitbutler-tauri\src\virtual_branches.rs:236: close time.busy=348ms time.idle=16.6µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd ownership=BranchOwnershipClaims { claims: [OwnershipClaim { file_path: "script/character.wren", hunks: [Hunk { hash: Some(d6ca48e7aa50a7eaa42459e451fb0ab1), start: 15, end: 22 }] }] }
2024-10-23T17:35:13.383397Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.383408Z INFO handle:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: new event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.503383Z INFO handle:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: close time.busy=120ms time.idle=5.00µs event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.503424Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=120ms time.idle=10.4µs event=VirtualBranch(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.504440Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:35:13.505047Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="Virtual branch"
2024-10-23T17:35:13.505057Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=2.30µs time.idle=9.20µs name="Virtual branch"
2024-10-23T17:35:13.505434Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="banana"
2024-10-23T17:35:13.505441Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=1.80µs time.idle=7.00µs name="banana"
2024-10-23T17:35:13.506189Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:35:13.507508Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: close time.busy=1.31ms time.idle=9.70µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:35:13.510132Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: close time.busy=5.68ms time.idle=10.8µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:35:13.563197Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:35:13.563229Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:35:13.563965Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=757µs time.idle=11.1µs key="user.name"
2024-10-23T17:35:13.563971Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=736µs time.idle=5.90µs key="user.name"
2024-10-23T17:35:13.564889Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:35:13.564998Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:35:13.565544Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=647µs time.idle=8.70µs key="user.email"
2024-10-23T17:35:13.565709Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=703µs time.idle=7.50µs key="user.email"
2024-10-23T17:35:13.806096Z INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: new id=4909531c-4182-4d35-8e2c-5f37d84b44dd window="main" project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd
2024-10-23T17:35:13.840050Z INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=33.9ms time.idle=19.6µs id=4909531c-4182-4d35-8e2c-5f37d84b44dd window="main" project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd fs_events=2742 fs_events=2742 ignored=0 ignored=0 git_noop=2727 git_noop=2727 git=2 git=2 project=4 project=4 git_dedup=2 git_dedup=2 project_dedup=4 project_dedup=4
2024-10-23T17:35:13.840103Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=GitFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, logs\HEAD, index)
2024-10-23T17:35:13.840226Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren)
2024-10-23T17:35:13.840237Z INFO handle:recalculate_everything: crates\gitbutler-watcher\src\handler.rs:129: new event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren) paths=4
2024-10-23T17:35:13.840250Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: new event=GitButlerOplogChange(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.840266Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=156µs time.idle=6.40µs event=GitFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, logs\HEAD, index)
2024-10-23T17:35:13.841575Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=1.32ms time.idle=8.60µs event=GitButlerOplogChange(4909531c-4182-4d35-8e2c-5f37d84b44dd)
2024-10-23T17:35:13.904312Z INFO handle:recalculate_everything:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: new event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren) paths=4
2024-10-23T17:35:13.928370Z INFO handle:recalculate_everything:calculate_virtual_branches: crates\gitbutler-watcher\src\handler.rs:93: close time.busy=24.0ms time.idle=29.8µs event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren) paths=4
2024-10-23T17:35:13.928416Z INFO handle:recalculate_everything: crates\gitbutler-watcher\src\handler.rs:129: close time.busy=88.2ms time.idle=2.60µs event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren) paths=4
2024-10-23T17:35:13.928423Z INFO handle: crates\gitbutler-watcher\src\handler.rs:57: close time.busy=88.2ms time.idle=10.3µs event=ProjectFileChange(4909531c-4182-4d35-8e2c-5f37d84b44dd, script\character.wren, script\ui, script, script\ui\quitDialog.wren)
2024-10-23T17:35:13.929190Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:35:13.929645Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="Virtual branch"
2024-10-23T17:35:13.929654Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=2.30µs time.idle=7.00µs name="Virtual branch"
2024-10-23T17:35:13.929686Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: new name="banana"
2024-10-23T17:35:13.929689Z INFO normalize_branch_name: crates\gitbutler-tauri\src\virtual_branches.rs:24: close time.busy=600ns time.idle=2.20µs name="banana"
2024-10-23T17:35:13.930207Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: new project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:35:13.932195Z INFO get_blob_info: crates\gitbutler-tauri\src\repo.rs:72: close time.busy=1.97ms time.idle=21.5µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd relative_path="script/character.wren" commit_id=None
2024-10-23T17:35:13.934577Z INFO list_branches: crates\gitbutler-tauri\src\virtual_branches.rs:429: close time.busy=5.38ms time.idle=5.50µs project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd filter=Some(BranchListingFilter { local: None, applied: None })
2024-10-23T17:35:13.986147Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:35:13.986193Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.name"
2024-10-23T17:35:13.986986Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=787µs time.idle=5.50µs key="user.name"
2024-10-23T17:35:13.986989Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=832µs time.idle=10.2µs key="user.name"
2024-10-23T17:35:13.988010Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:35:13.988079Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: new key="user.email"
2024-10-23T17:35:13.988725Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=708µs time.idle=7.10µs key="user.email"
2024-10-23T17:35:13.988819Z INFO git_get_global_config: crates\gitbutler-tauri\src\commands.rs:88: close time.busy=734µs time.idle=4.70µs key="user.email"
2024-10-23T17:35:14.808974Z INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: new id=4909531c-4182-4d35-8e2c-5f37d84b44dd window="main" project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd
2024-10-23T17:35:14.809048Z INFO set_project_active:set_project_to_window:file monitor:handle debounced events: crates\gitbutler-watcher\src\file_monitor.rs:119: close time.busy=58.0µs time.idle=16.7µs id=4909531c-4182-4d35-8e2c-5f37d84b44dd window="main" project_id=4909531c-4182-4d35-8e2c-5f37d84b44dd fs_events=34 fs_events=34 ignored=0 ignored=0 git_noop=34 git_noop=34 git=0 git=0 project=0 project=0
I'm sure you understand what I'm saying, but here's a quick video just to make it abundantly clear. 😁
Thanks for the logs and video!
Unfortunately I'm not seeing anything related to the rust function that that "Discard Changes" button invokes, reset_files
anywhere in the logs. Is it possible that you truncated them a bit early / late?
Also just to be sure, when clicking the "Discard" context menu item, you don't see any errors or other messages in the web console? (You can open it view "View -> Developer Tools")
@ndom91 I checked the logs multiple times, different ways, refreshing, etc. and saw no additional lines show up.
I checked the web console, I get this single error when clicking the confirm button in the dialog, but no other errors, and no errors when choosing "discard" from the hunk context menu.
Any progress on this? It's quite a show stopper and nobody has been assigned yet.
Thanks for the reminder!
I think the problem here is that the issue couldn't be reproduced, nor did anything show up in the logs. It's like the button is simply not working, for unknown reason. Maybe it's something platform related, and we can't reproduce it because nobody tested this on Windows yet.
I will see to setting up a VM in a bit and try it there.
I have tested it on Windows 11 (ARM) and it seems to work fine there.
https://github.com/user-attachments/assets/9385f945-0e38-4afe-a4c6-75df6de4deec
However, this might also mean that on Windows 10 (some) buttons might not be working as expected, maybe as an older Edge browser is installed.
Unfortunately, Windows 10 won't run on Apple Silicon Macs so VMs won't work, and the only physical Windows machine I have access to also has Winows 11 installed, albeit x86.
So I wonder if @wrmbaron can confirm that this is indeed a Windows 10 issue? If so, maybe we can spin up some cloud instance of it and reproduce it there. Then a fix should be possible.
It currently seems impossible to discard a change through the GitButler UI.
I've tried both
Tested in v0.13.2, Windows 10
Let me know if there's any other information I can provide.