You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Gollum commits a new page in Git, as part of the normal procedure to keep the repository and the worktree in sync, an existing untracked file with the same name as the new page is overwritten without warning.
Only happens on a non-bare repo of course.
I opened the bug here and not in gollum/gollum-lib although it is a data loss problem and should fixed at the lowest level possible IMHO.
Anyway some GUI work is probably needed too, and if here more people may see it.
The text was updated successfully, but these errors were encountered:
Similarly, content that has been saved to disk in the working directory but not committed to git can be overwritten without warning by an edit in the web interface.
Please disregard my previous comment (deleted). We could accomplish error handling for this by checking whether there are differences between index and workdir before we attempt to update/commit a file. We currently do not have an API for this in gollum-lib, but the following works using rugged (given a Rugged::Repositoryr):
> r.status('Bar.md')=>[:worktree_modified]
Now the question is whether we want to implement a check for this in gollum-lib or just in gollum. We could try to throw a new kind of error (similar to DuplicatePageError) in gollum-libs Committer logic, that would have to be handled appropriately?
When Gollum commits a new page in Git, as part of the normal procedure to keep the repository and the worktree in sync, an existing untracked file with the same name as the new page is overwritten without warning.
Only happens on a non-bare repo of course.
I opened the bug here and not in gollum/gollum-lib although it is a data loss problem and should fixed at the lowest level possible IMHO.
Anyway some GUI work is probably needed too, and if here more people may see it.
The text was updated successfully, but these errors were encountered: