-
Notifications
You must be signed in to change notification settings - Fork 567
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
trying to update workspace, getting "Unhandled exception: Branch statuses must not be empty" #6214
Comments
also, let me know if you need any more information for debugging and I'll provide what I can |
Thanks a lot for reporting! The error messages originates here: gitbutler/crates/gitbutler-branch-actions/src/upstream_integration.rs Lines 88 to 97 in 45730cc
Following the code just a little bit seems to indicate that it could run into this if there was not a single branch. Having a workspace would imply this is the case though, but maybe there is an empty stack, i.e. a stack without any branches? This of course shouldn't be possible, but seems to be a plausible reason for running into this. In order to workaround this error, I think one would have to try and manually delete the empty stack in
Unfortunately that's not yet possible. |
Hi everyone, I’m running into the same issue and wanted to add my experience in case it helps debug the problem. I committed changes inside a lane that (as far as I understand) did not have any branch linked to it. I’m still new to GitButler, but this might explain why the system is running into a state where branch_statuses is empty. Here’s my full .git/gitbutler/virtual_branches.toml file (with remoteUrl and sha redacted for privacy), the lane that is causing problems is "Lane": [default_target]
branchName = "main"
remoteName = "origin"
remoteUrl = "REDACTED"
sha = "REDACTED"
pushRemoteName = "origin"
[branch_targets]
[branches.ded5c586-068d-4a7c-b2e2-dd0c07d5643a]
id = "ded5c586-068d-4a7c-b2e2-dd0c07d5643a"
name = "Lane 2"
notes = ""
created_timestamp_ms = "1739549649334"
updated_timestamp_ms = "1739549691705"
tree = "f0a7ec27c9d9d835c5db62377cefb974704ca95b"
head = "98bda633f83def60c3d357c7ba9b80400ddef4e5"
ownership = ""
order = 2
allow_rebasing = true
in_workspace = true
post_commits = false
[[branches.ded5c586-068d-4a7c-b2e2-dd0c07d5643a.heads]]
name = "bl-branch-3"
archived = false
[branches.ded5c586-068d-4a7c-b2e2-dd0c07d5643a.heads.head]
ChangeId = "7bb6ca97-04af-48ce-af42-63f2de57bc6e"
[branches.669e944f-f4d9-4086-bcd6-1edc8129350a]
id = "669e944f-f4d9-4086-bcd6-1edc8129350a"
name = "Lane"
notes = ""
created_timestamp_ms = "1739295410585"
updated_timestamp_ms = "1739556529867"
tree = "0ea6968a2bc3993738f68df3dc825b5200fd0683"
head = "534743807fac35ec840bbb518146ab6e9dd7479c"
ownership = ""
order = 1
allow_rebasing = true
in_workspace = true
post_commits = false
[[branches.669e944f-f4d9-4086-bcd6-1edc8129350a.heads]]
name = "cms"
archived = false
[branches.669e944f-f4d9-4086-bcd6-1edc8129350a.heads.head]
ChangeId = "726553b7-8219-4169-9130-fd6195b7ad81"
[branches.ef692c3d-b96f-4e44-82b6-2ef3040558b9]
id = "ef692c3d-b96f-4e44-82b6-2ef3040558b9"
name = "Lane 1"
notes = ""
created_timestamp_ms = "1739296018215"
updated_timestamp_ms = "1739556391810"
tree = "b9b6fa2646c05b96c31599c86a6762cb70c5ca46"
head = "619bb78faf96ff2d89f5adc676cc6e4f0fb0ab56"
ownership = ""
order = 0
selected_for_changes = 1739549855069
allow_rebasing = true
in_workspace = true
post_commits = false
[[branches.ef692c3d-b96f-4e44-82b6-2ef3040558b9.heads]]
name = "bl-branch-2"
archived = true
[branches.ef692c3d-b96f-4e44-82b6-2ef3040558b9.heads.head]
ChangeId = "eccd264b-ace0-4c41-bb0c-447e0e995c0f" Additionally, I took a screenshot which might provide more context. Let me know if sharing that would be helpful! I’d appreciate any guidance on how to resolve this, whether by manually editing .git/gitbutler/virtual_branches.toml or some other approach. Thanks! (Translated with ChatGPT) |
Thanks for sharing! Even though I still don't know if there is a workaround or what's truly causing this, I'd hope that it resolves itself once the new major release is available. A lot of the old codepaths won't be exercised anymore then. |
sorry for the delay in getting this to you, here's what my [default_target]
branchName = "main"
remoteName = "origin"
remoteUrl = "REDACTED"
sha = "c49fc54067a0dfdae3db4fc49cec3d7a69f85548"
pushRemoteName = "origin"
[branch_targets]
[branches.a14ded4f-1ba4-42ce-b481-eb90e3acaf87]
id = "a14ded4f-1ba4-42ce-b481-eb90e3acaf87"
name = "Lane"
notes = ""
created_timestamp_ms = "1737585713440"
updated_timestamp_ms = "1739220072161"
tree = "8868a58a54c11c4fe70c32787e4e64796c48cd31"
head = "d2cbc78f67bfc8d46dfc2e5d886b33923aabba90"
ownership = """
brian.brennan/2025-01 sip tiers v2/sql/1-setup.sql:74-90-9599a69ad51b3c1ccbc1d440c020d019,49-71-ca9734a34e44ac18e36233904c6735b3,29-48-7364be8420c5c9b769d4d023f89e8418
"""
order = 0
selected_for_changes = 1738518866532
allow_rebasing = true
in_workspace = true
post_commits = false
[[branches.a14ded4f-1ba4-42ce-b481-eb90e3acaf87.heads]]
name = "bjb/sip-ratios"
archived = false
[branches.a14ded4f-1ba4-42ce-b481-eb90e3acaf87.heads.head]
ChangeId = "cf194ac4-720f-4516-8cab-b65645975956"
[branches.483caff1-5409-4f71-b223-0f19d0af63e4]
id = "483caff1-5409-4f71-b223-0f19d0af63e4"
name = "Lane 1"
notes = ""
created_timestamp_ms = "1737669560680"
updated_timestamp_ms = "1738202133969"
tree = "7d477802dfad180d4c5020a394b8c464db118841"
head = "c49fc54067a0dfdae3db4fc49cec3d7a69f85548"
ownership = """
brian.brennan/2025-01 cross ctc activity/analysis.sql:1-114-ca2f5661b28ff351b18aa03b60a5baa6
brian.brennan/2025-01 cross ctc activity/analysis.sh:1-4-5f03d29b74b4eaa16c1066cd8c4392a8
brian.brennan/2025-01 cross ctc activity/README.md:1-13-f126e61d896b4a27ddfe396081696599
brian.brennan/2025-01 cross ctc activity/.gitignore:1-11-b980666f823ad365a08627aa372f222a
"""
order = 1
allow_rebasing = true
in_workspace = true
post_commits = false
[[branches.483caff1-5409-4f71-b223-0f19d0af63e4.heads]]
name = "bjb/cross-ctc"
archived = true
[branches.483caff1-5409-4f71-b223-0f19d0af63e4.heads.head]
CommitId = "c49fc54067a0dfdae3db4fc49cec3d7a69f85548" |
screenshot of the error toast:

anything I can do to manually get past this error using git cli? i don't want to mess up my GitButler workspace.
The text was updated successfully, but these errors were encountered: