Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Conversation

@msfjarvis
Copy link
Member

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

Reverts Java 7 FS support due to regressions and re-adds proper fix for preventing empty commits

💡 Motivation and Context

Fixes #1014

💚 How did you test it?

Clone a fresh repository and observe that Sync action does not create a commit.

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

🔮 Next steps

Figure out why the Java 7 FS dependency causes this breakage.

Stacktrace
     GitCommandExecutor  E  org.eclipse.jgit.api.errors.JGitInternalException: Short read of block.
                         E      at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:154)
                         E      at com.zeapo.pwdstore.git.GitCommandExecutor$execute$res$1.invokeSuspend(GitCommandExecutor.kt:54)
                         E      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                         E      at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
                         E  Caused by: java.io.EOFException: Short read of block.
                         E      at org.eclipse.jgit.util.IO.readFully(IO.java:248)
                         E      at org.eclipse.jgit.treewalk.WorkingTreeIterator.readContentAsNormalizedString(WorkingTreeIterator.java:1082)
                         E      at org.eclipse.jgit.treewalk.WorkingTreeIterator.contentCheck(WorkingTreeIterator.java:1020)
                         E      at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:951)
                         E      at org.eclipse.jgit.treewalk.filter.IndexDiffFilter.include(IndexDiffFilter.java:227)
                         E      at org.eclipse.jgit.treewalk.filter.AndTreeFilter$Binary.include(AndTreeFilter.java:131)
                         E      at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:560)
                         E      at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:432)
                         E      at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:374)
                         E      at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:148)
                         E      ... 7 more

📸 Screenshots / GIFs

@msfjarvis msfjarvis added this to the 1.11.0 milestone Aug 13, 2020
@msfjarvis msfjarvis added the bug label Aug 13, 2020
Copy link
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you do to trigger the exception? I can take a look tomorrow.

@fmeum fmeum merged commit 57f1c65 into android-password-store:develop Aug 13, 2020
@msfjarvis
Copy link
Member Author

What did you do to trigger the exception? I can take a look tomorrow.

It fails at git.status() for me, I can reliably reproduce it on a repository with a single symlink. Can't test right now whether or not the symlink was the factor.

@msfjarvis msfjarvis deleted the no-empty-commits branch August 13, 2020 20:19
@fmeum
Copy link
Member

fmeum commented Aug 13, 2020

Do you have a repository that you can share with which I can reproduce the issue? I will debug it tomorrow.

@msfjarvis
Copy link
Member Author

Do you have a repository that you can share with which I can reproduce the issue? I will debug it tomorrow.

Not really, I was testing on my personal repository. I'll be able to put together a reproducer in 8 to 10 hours.

@fmeum fmeum mentioned this pull request Aug 14, 2020
8 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Do not create empty sync commits

2 participants