Comments (3)
By disappear I mean they were listed in the following places after a vanilla checkout or after fetching using an executable in gitbutler, but are no longer listed after fetching with an existing or generated key through gitbutler.
- gitbutler's UI,
git branch --remote/--all
ls .git/refs/remotes/origin
cat .git/packed-refs
They are still present on the remote when looking at bitbucket's UI, or when cloning the repo with vanilla git.
But also, upon reviewing this I just noticed a clue I'd missed before, and now have a way to reproduce this. All of the affected branches are named Task/some-branch
(capital T) whereas most branches would be named task/some-other-branch
. So this looks like a bug arising from developers randomly doing casing wrong. All of us are either on windows or macos; case-insensitive and case-insensitive by default, respectively.
I realize git is case-sensitive, but gitbutler should probably still follow how git handles this on case-insensitive systems, rather than ignore the branches.
So, to reproduce:
- set up a remote (plain SSH remote, to remove more variables)
- clone the remote in two places, one we'll use vanilla git, the other gitbutler
- in the vanilla git repo, do an initial commit on branch
main
- set up a branch
task/good-branch
, and push it - switch to the gitbutler instance of this repo, pull these changes
- set up gitbutler on this repo with an SSH key
- in the vanilla repo, create a branch
Task/bad-branch
, and push it - try fetching it gitbutler - the branch won't show up
- switch gitbutler to use the local git executable and fetch again - the branch is now displayed
- switch back to using an SSH key and fetch again - the branch is removed
When using vanilla git or gitbutler set to use the git executable, this case issue seems to be handled by placing the branch with odd casing in the existing directory.
So Task/bad-branch
on the filesystem becomes .git/refs/remotes/origin/task/bad-branch
.
All that said, it looks like this is probably an upstream issue, maybe with libgit2.
from gitbutler.
Thanks for reporting! If I am not mistaken, the code responsible for fetching is right here. It uses the same refspec in both cases, i.e. when using the Git executable, or when using git2
in case of the SSH based authentication.
As the fetching doesn't list any refs, I presume refs are later traversed to populate the UI and it's unclear to me how that traversal could be different. Something that comes to mind is that for some reason, the 2 branches that seem missing are actually not present in the repository anymore.
Thus, could you clarify what disappear
means? Are they actually gone from the local repository? This would be my expectation actually, as otherwise it wouldn't make sense that previously fetched and locally present branches aren't listed anymore.
Thanks for your help.
from gitbutler.
Thanks so much for researching this! Indeed, I didn't find any evidence that GitButler does anything special when fetching, it's all handled by libgit2
, so I agree that it's probably some obscure bug there. Maybe gitoxide
can do better there, when the time comes.
from gitbutler.
Related Issues (20)
- Back button on start screen does nothing HOT 1
- Improve the UX of an always Commit+Push workflow
- No UI showing on the app & top bar sub menu buttons don't work Flatpak version HOT 14
- Refresh trunk button silently fails HOT 3
- Improve performance when working programmes which hold long locks HOT 5
- Cannot open git repos on Windows: "path is missing" HOT 7
- switch button background is hidden on mouse hover
- Encountered issues during Windows 10 installation HOT 1
- Can not open remote url while using `ssh://` as remote url
- Delete a branch
- Select multiple files with `Shift` doesn't work
- virtual_branches.toml with NUL characters in last line prevents GitButler from working after commit HOT 3
- Blackia723 Hey, thanks for reporting that! We are gonna look into this. @anaisbetts what do you think could be causing this? Using v.0.11.7 under latest Windows 11 patch. Reproduce: Create some code changes manually write a commit message an commit click "push to remote" Errormessage: "TOML parse error at line 24, column 1 | 24 | | ^ invalid key" opening the virtual_branches.toml file, the last line looks like this in VS code: image Solution: Delete NUL characters an save - everything works again HOT 1
- Multiple GB instances fail to see each others changes; race against each other
- Failed to update the excludes stack to see if a path is excluded HOT 4
- Cannot commit parts of the code to other branch because it's "locked" HOT 3
- Cannot close the file card opened by clicking Trunk's commit history files
- Remove the commits field from VirtualBranch in favor of list_remote_commit_files
- Feature request: Support for putty/plink ssh.variant (Windows-specific) HOT 1
- Enable GitButler Features Slider by Default
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitbutler.