Skip to content
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

[Bug]: Automatic stage/commit/pull/push after stop file edits is not working on Linux #815

Open
steakhutzeee opened this issue Nov 22, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@steakhutzeee
Copy link

Describe the bug

Automatic stage/commit/pull/push after stop file edits is not working on Linux. Works fine on Windows.

Plugin configuration in .obsidian/plugins/obsidian-git/data.json:

{
  "commitMessage": "Update from {{hostname}}",
  "commitDateFormat": "DD/MM/YYYY HH:mm",
  "autoSaveInterval": 2,
  "autoPushInterval": 0,
  "autoPullInterval": 0,
  "autoPullOnBoot": true,
  "disablePush": false,
  "pullBeforePush": true,
  "disablePopups": true,
  "disablePopupsForNoChanges": true,
  "listChangedFilesInMessageBody": false,
  "showStatusBar": true,
  "updateSubmodules": false,
  "syncMethod": "rebase",
  "customMessageOnAutoBackup": false,
  "autoBackupAfterFileChange": true,
  "treeStructure": true,
  "refreshSourceControl": true,
  "basePath": "",
  "differentIntervalCommitAndPush": false,
  "changedFilesInStatusBar": true,
  "showedMobileNotice": true,
  "refreshSourceControlTimer": 5000,
  "showBranchStatusBar": false,
  "setLastSaveToLastCommit": false,
  "submoduleRecurseCheckout": false,
  "gitDir": "",
  "showFileMenu": true,
  "authorInHistoryView": "hide",
  "dateInHistoryView": false,
  "lineAuthor": {
    "show": false,
    "followMovement": "inactive",
    "authorDisplay": "initials",
    "showCommitHash": false,
    "dateTimeFormatOptions": "date",
    "dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
    "dateTimeTimezone": "viewer-local",
    "coloringMaxAge": "1y",
    "colorNew": {
      "r": 255,
      "g": 150,
      "b": 150
    },
    "colorOld": {
      "r": 120,
      "g": 160,
      "b": 255
    },
    "textColorCss": "var(--text-muted)",
    "ignoreWhitespace": false,
    "gutterSpacingFallbackLength": 5,
    "lastShownAuthorDisplay": "initials",
    "lastShownDateTimeFormatOptions": "date"
  },
  "autoCommitMessage": "Update from {{hostname}}"
}

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

No response

Steps to reproduce

Install plugin on last Appimage version of Obsidian.

Expected Behavior

No response

Addition context

No response

Operating system

Linux

Installation Method

AppImage

Plugin version

2.28.2

@steakhutzeee steakhutzeee added the bug Something isn't working label Nov 22, 2024
@Vinzent03
Copy link
Owner

I'm on linux as well and works fine for me. It tracks changes by using Obsidian events of changes of the file system. So any chance some plugin or other program causes those events?

You may test this by pasting this in the console ( ctrl + shift + i) and check if "modified" appears in the console, although you haven't changed any file

this.app.vault.on("modify", () => console.log("modified"));
this.app.vault.on("delete", () => console.log("modified"));
this.app.vault.on("create", () => console.log("modified"));
this.app.vault.on("rename", () => console.log("modified"));

@steakhutzeee
Copy link
Author

Thank you for feedback. Only using this plugin and Templater.

Just tried your advice without any modification to files:

obsidian_console_git

Should try and see what happens after a file is edited?

@steakhutzeee
Copy link
Author

Don't know why, edited a file and looks like it worked. I'm making tests and keep you posted.

Here is console in the meantime:

obsidian_console_git1

@Vinzent03
Copy link
Owner

Great it works now, but by looking at the screenshot it doesn't seem like you pasted the snippet I showed into the console. But if it works now you don't need that.

@steakhutzeee
Copy link
Author

My bad I misread your previous message!
Testing if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants