Closed relikd closed 2 years ago
Sorry about the data loss. Where is the config file that got overwritten?
Config files are handled by libgit2, so I'll look into whether it supports backslash line continuations.
Thanks. I just did finish rewriting two of my most commonly used aliases.
The config is stored at a default path, $HOME/.gitconfig
.
I'm having trouble replicating this. Can you send me an example please?
Sure,
[alias]
echo = !echo "this \
is some text"
Then you launch Xit, open the settings menu, and check the box "prune branches". Every time you click the prune branches checkbox, a few lines of the git config will be deleted.
https://user-images.githubusercontent.com/1321720/119700345-602c2180-be53-11eb-8b94-af67949e2fe2.mov
Thanks. Config reading & writing is handled by libgit2, which I'm using via Objective-Git which hasn't been updated in a while. I'm working on eliminating Objective-Git and just using libgit2 directly.
Updating to libgit2 1.3 unfortunately didn't fix this. Looks like I'll have to do a fix inside libgit2.
Fixed in 2532600e3dd9c0cd6d1cd96aac0cd5d3e6342012
Rather than trying to fix libgit2 (which would be complicated because you'd have to have an original and parsed version of every setting), I decided to address this by adding an app level config file to store any settings you change in Preferences. Xit should no longer modify your user config file.
Thank you for deleting my perfectly working git config.
The app did write this to the config:
and thereby deleted all of my multi-line git aliases! All that ended with a backslash (
\
). For example, now all aliases look like this:(There is no second line)