-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A single digit modification is not detected by isomorphic-git's status
call
#260
Comments
The three possible solutions for that I see at the moment:
|
To clarify what I am currently doing (point 2 on the above comment:
I had to change this slightly to specifically check for unmodified files rather than resetting the index for all files because However, this just goes to show that there could be more bugs arising from this hack. Best to switch over to using the event watching API for EFS asap. |
|
@tegefaulkes you might want to test this too in #709. |
Digging into this, It seems calling |
I've simplified the logic some. All the same tests are passing so it's looking good. The solution was to just add all the files using |
…-git's status call` Related: #260 [ci skip]
…-git's status call` Related: #260 [ci skip]
Appears to be a timing problem. Suggest doing a |
Added a commit to staging 62945f0 to wait the 1 ms. We already have tests for regressions for this behaviour. I'm pretty sure it's fixed. I could re-create the issue with the original code but haven't seen it happen at all with the current changes. |
Describe the bug
When making a change in a file using
await vault.commit(...)
and changing only a single number on that file will sometimes cause isomorphic-git to not recognise that the file has been modified and therefore if no other changes were made a commit will not be made even though a file was changed.To Reproduce
await vault.commit
await vault.commit
await vault.log
to see if the most recent modification shows up.NOTE: This won't happen ALL the time. It seems to be most common when running large groups of tests together?
Expected behavior
We expect any file change, even a single digit change to be detected by isomorphic-git and therefore create a new commit when
vault.commit
is used.Additional context
isomorphic-git
resetIndex
on each file in the vaultResolved
This was addressed by doing the following.
git.add
before processing thestatusMatrix
. Making sure everything is staged beforehand essentially solves the issue.statusMatrix
to a much simplerswitch
statement.The text was updated successfully, but these errors were encountered: