gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

virtual_branches.toml with NUL characters in last line prevents GitButler from working after commit

Open ollie-dev opened this issue 1 year ago • 3 comments

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

ollie-dev avatar May 24 '24 14:05 ollie-dev

Hey, thanks for reporting that! We are gonna look into this.

@anaisbetts what do you think could be causing this?

krlvi avatar May 24 '24 14:05 krlvi

It happens as I do the commit. I had VS Code with the .toml-file open and could see changes being written in one second and in the next second the red NUL line appeared. Like a step after the first changes...

ollie-dev avatar May 24 '24 15:05 ollie-dev

@krlvi Nothing Windows specific on this one I can think of, feels like the app just wrote a buffer that was bigger than the content

anaisbetts avatar May 24 '24 19:05 anaisbetts