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
Currently whenever a file is modified, it will be added to staging area immediately (so the working tree and the staging area are always the same), which is unnecessary.
Proposed changes:
git add when a file is created.
git rm when a file is removed.
git mv when a file is renamed.
git add --update before committing the change.
Or, just
git add --all before committing the change.
Drawbacks:
isomorphic-git might have performance issue when adding a lot of files.
@tiensonqin With PR #966, this can be done by simply removing all Git add/rm/mv operations except for those in repo/push. It should work fine, but if there are some unexpected edge cases, the users might lose data again.
@gyk let's make the changes and give it some tests before the release. It'll make the following refactoring a lot easier by removing those git ops. But it's not a high priority thing.
Activity
tiensonqin commentedon Dec 22, 2020
@gyk Is it solved now?
gyk commentedon Dec 23, 2020
@tiensonqin With PR #966, this can be done by simply removing all Git add/rm/mv operations except for those in
repo/push. It should work fine, but if there are some unexpected edge cases, the users might lose data again.tiensonqin commentedon Dec 23, 2020
@gyk let's make the changes and give it some tests before the release. It'll make the following refactoring a lot easier by removing those git ops. But it's not a high priority thing.
gyk commentedon Dec 23, 2020
@tiensonqin OK.
tiensonqin commentedon Jan 14, 2021
Will close this issue and address the code changes soon.