hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.88k stars 577 forks source link

Changes are only pushed on startup or after pause/resume #1925

Open optilude opened 4 years ago

optilude commented 4 years ago

Hi,

I'm on OSX Mojave, with SS 3.28.0. It's worked fine in the past, but recently I've noticed that changes I make locally are never pushed (to github, in my case) unless I restart SS or pause and resume the relevant section. The logs show activity like:

12:29:44 Git | Notes | Checking for remote changes...
12:29:44 Cmd | Notes | git rev-parse HEAD
12:29:44 Cmd | Notes | git ls-remote --heads --exit-code origin master
12:29:46 Git | Notes | No remote changes, local+remote: 461a361c06c8b050988e8732fd5f91febd0a78f3

If I make a local change and restart, I get a message like this:

12:42:34 Config | Wrote to '/Users/maraspeli/.config/org.sparkleshare.SparkleShare/projects.xml'
12:42:34 Cmd | Notes | git status --porcelain
12:42:34 SyncUp | Notes | Initiated
12:42:34 Cmd | Notes | git add --all
12:42:35 Cmd | Notes | git status --porcelain
12:42:35 Cmd | Notes | git commit --all --file="/Users/maraspeli/Documents/Notes/.git/info/commit_message" --author="Martin Aspeli <optilude@gmail.com>"
12:42:36 Cmd | chmod 700 /Users/maraspeli/Documents/Notes/.git/hooks/pre-push
12:42:36 Cmd | Notes | git push --all --progress origin
12:42:43 Git | Counting objects: 4, done.
12:42:43 Git | Delta compression using up to 4 threads.
12:42:43 Git | Total 4 (delta 3), reused 0 (delta 0)
12:42:47 Git | To ssh://github.com/optilude/notes.git
12:42:47 Git |    461a361..20008c5  master -> master
12:42:47 SyncUp | Notes | Done
12:42:47 Cmd | Notes | git --no-pager log --since=1.month --name-status --date=iso --find-renames --no-merges --no-color
12:42:50 Cmd | Notes | git status --porcelain

In the GUI (menu bar) it also seems several projects are stuck in "waiting to sync" for no obvious reason, but I'm not sure if this is related. For the specific repository ("Notes") tested above it actually just said "Last change 8:47am" when my last change was actually at 12:42.

It may not be relevant, but I've put the synchronised folders outside the SparkleShare root folder like so:

<sparkleshare>
  <user>
    <name>Martin Aspeli</name>
    <email>optilude@gmail.com</email>
  </user>
  <notifications>True</notifications>
  <folder>
    <name>Personal</name>
    <path>/Users/maraspeli/Documents</path>
    <identifier>269243be1152815f443d6c144f8bf81515342387c017471bc040a9eecb37fd04</identifier>
    <url>ssh://git@github.com/optilude/documents.git</url>
    <backend>Git</backend>
    <paused>False</paused>
  </folder>
  <folder>
    <name>Notes</name>
    <path>/Users/maraspeli/Documents</path>
    <identifier>54a3cc12b6b3f0dd9337862c8fcc6327dab15f40320a7d83c95c2d6013a0ff8a</identifier>
    <url>ssh://git@github.com/optilude/notes.git</url>
    <backend>Git</backend>
    <paused>False</paused>
  </folder>

<!-- three other similar entries snipped -->

</sparkleshare>
hbons commented 4 years ago

It does look like the push succeeded. Are the new changes actually visible on the remote repo, or is it that the status message in the SparkleShare icon is just wrong?

optilude commented 4 years ago

No they are not in the remote.

I may have bungled my log extract into the ticket but I can see what looks like a push in the log at a time stamp just after restarting the app, but not again thereafter (I waited an hour or so, and can see log messages related to the repo every ten minutes or so, but it doesn’t look like a push).

How does SS work out if the repo has changed? Is anything done differently on startup vs periodically?

On Thu, 16 Jan 2020 at 13:10, Hylke Bons notifications@github.com wrote:

It does look like the push succeeded. Are the new changes actually visible on the remote repo, or is it that the status message in the SparkleShare icon is just wrong?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hbons/SparkleShare/issues/1925?email_source=notifications&email_token=AABHJCTFCXAQJ6WOTZTLYI3Q6BMDLA5CNFSM4KGSRF42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJD76VQ#issuecomment-575143766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHJCVY2ODA2UOUM4PR4P3Q6BMDLANCNFSM4KGSRF4Q .