Documentation Monster
Changes when no changes made
Gravatar is a globally recognized avatar based on your email address. Changes when no changes made
  Richard Kaye
  All
  Jan 14, 2026 @ 05:43am

I'm still seeing this behavior more often than not. Open a project, make no edits, close the project, get prompted to save the current topic. I may have found a clue. Using git to diff the repo, it appears that a timestamp value is getting updated in the root json file simply by opening the project.

And here's another clue; that timestamp is getting changed by bringing up the git dialog in DM.

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 14, 2026 @ 10:13am

Correlation does not imply causation 😄

The timestamp update occurs after the file is saved. The issue is related to change detection which then causes the file to be saved when you move of the topic.

I think the issue is related to file encoding (Utf-8 vs. Utf-8 BOM) because when you look in Git you don't see the change and Git ignores those. What's strange is that it's intermittent. Sometimes it happens other times it doesn't.

I'll take another look - again 😄

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Richard Kaye
  Rick Strahl
  Jan 14, 2026 @ 12:23pm

No argument there. 😃 And I did think it could be related to handling of line endings, too.

I can reproduce this behavior. Here's a blow-by-blow description, but let me know if you want to see it with your own eyes.

  • In a shell I made sure my local repo was clean.
  • I fired up DM which righteously opened up the last project used.
  • Checked git status again and verified it detected no changes.
  • Loaded the git form in DM
  • Change detected in the primary file

Ran a git diff and the only change is the aforementioned timestamp.

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 14, 2026 @ 12:33pm

Well the JSON file change makes perfect sense because that happens once DM sees a change it writes out the updated timestamp.

Most of the time this is 'invisible' - you only see this behavior when you quit and you sit on a topic that hasn't been changed and most likely the original topic you loaded when you opened DM.

I just can't figure out what triggers the change state and why it's intermittent. On my machine most of the time I can start DM and then exit without a change notification. At other times I do exactly the same and it comes up right away with the * in the filename for change detected. I can't make sense of it. I know where this happens but it's difficult to debug because there are many places that call into that so breakpoint debugging is difficult here.

I'll take another look today - it's been long enough that I maybe have another perspective.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Richard Kaye
  Rick Strahl
  Jan 14, 2026 @ 12:46pm

I've confused 2 things here. Let me see if I can do better.

I was originally thinking of the behavior you're mentioning in this thread where DM prompts to save changes when nothing was edited. That still happens but inconsistently.

But the thing I'm trying to highlight now is git-related. Simply invoking the git form in DM is writing to the main project file. So while DM may or may not prompt to save changes, git says there are changes to commit.

I'm not doing anything particularly complicated at the moment so if you want to jump on a zoom I'm happy to do that.

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 14, 2026 @ 01:52pm

Yeah, but that is the same issue. The difference is that DM saves files silently if there's a change. Whenever you move off a topic and there's a change (or 'perceived change') the topic is saved which updates the timestamp in the JSON file with the meta data.

So while that may seem like it's a different issue it's not. The underlying problem is that DM sees a change when there isn't one, which might be for the same reason that sometimes you see changes in Git when you check the Diff and there's 0 changes.

What DM does is the following:

  • Checks the current content in the editor
  • Loads the file's current content into a variable
  • Compares the two

If not equal that's when the change shows.

I think what I might do is set up a new project and set a few very small topics then dump out the content on each access. The problem with usually is that there's too much text to really see what's different with just a Console dump of both texts.

+++ Rick --

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 14, 2026 @ 03:30pm

The issue is related also as to what Git sees along the same lines:

Notice that according to git the files are binary the same but yet it somehow sees a change.

I did find one more issue that might be contributing which is that if the app is shut down, the project is not properly shut down which means potentially topics didn't get updated right and last topic selection was off by one (ie. next to last topic rather than last topic).

Playing around with this now again and I don't see any weird arbitrary dirty topics but I've been here before.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Richard Kaye
  Rick Strahl
  Jan 16, 2026 @ 03:57am

Odd. My git repos do not treat markdown files as binaries. OTOH I do use git lfs for tracking binaries.

My simplified troubleshooting approach to this was to run a git status after each DM action. That's how I saw that the primary json file for my project had that one timestamp change apparently resulting from invoking the DM git form.

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 16, 2026 @ 12:30pm

Nah that's just Beyond Compare saying that the files on disk are exactly byte for byte identical - not just the content. I believe Git actually works of file content not of the actual physical bytes for known types of files (depending on settings). Beyond Compare just lets you know if there's literally no difference in the before and after files.

Why it shows up in Git as changed though is a mystery - either way you look at it there are no changes. And it's not just DM that shows the changed Git item, it's also showing up in SmartGit's change log (also with no visible changes), and you can't Discard those changes either. Very odd.

I've seen that in other projects (.NET mainly) as well.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Richard Kaye
  Rick Strahl
  Jan 16, 2026 @ 12:50pm

But there consistently is a change to the updated key value of the json index that happens when the git dialog is loaded. I will put together a video recording. Sometime over the long weekend. 😃

Gravatar is a globally recognized avatar based on your email address. re: Changes when no changes made
  Rick Strahl
  Richard Kaye
  Jan 16, 2026 @ 02:24pm

Your confusing cause and effect again. The problem as I mentioned earlier is that the change detection is not working properly and detecting a change when there is none and once detected it updates the timestamp.

The problem is that I see not just the index updated, but also the topic with no changes as shown when that happens. There's something that is triggering the change detection and I can't quite figure out what it is because it doesn't happen all the time. Most commonly I see it when first opening a project and I think it might be due to some timing issue where a check occurs looking and no previous topic (null) and the new topic. there's a check for that but it still happens at some point.

I haven't see this happen in a while - it's very random.

+++ Rick ---

© 1996-2026