Fossil Forum

fossil diff in subdirectory reporting missing files
Login

fossil diff in subdirectory reporting missing files

fossil diff in subdirectory reporting missing files

(1) By Lifepillar (lifepillar) on 2022-06-22 20:26:07 [link] [source]

Recently I have noticed the behaviour I am describing below, which looks to me like a bug. I am using Fossil 2.18 [84f25d7eb1] on macOS 12.4. To reproduce:

fossil init myrepo.fossil
fossil open myrepo.fossil --workdir myrepo
cd myrepo
echo "hello" >foo.txt
fossil add foo.txt
fossil commit -m "Add foo." foo.txt
echo "bonjour" >>foo.txt
mkdir bar
cd bar
fossil diff

The output I get at this point is:

MISSING  foo.txt

I would have expected a diff instead. Can you reproduce it?

fossil diff at the root of the repository works as expected. fossil status from inside the subdirectory produces the expected output:

repository:   /Users/me/myrepo.fossil
local-root:   /Users/me/myrepo/
config-db:    /Users/me/.fossil
checkout:     b9c4f00a8aa902dd248d0e91db585a9c7126acd0 2022-06-22 20:21:12 UTC
parent:       119869946b780ffc4ca6a693297e1e71d12e07f4 2022-06-22 20:21:12 UTC
tags:         trunk
comment:      Add foo. (user: me)
EDITED     ../foo.txt

(2) By Stephan Beal (stephan) on 2022-06-22 20:42:32 in reply to 1 [link] [source]

I would have expected a diff instead. Can you reproduce it?

i'm unable to reproduce it on Linux. Both "status" and "diff" behave as expected for me:

[stephan@nuc:~/tmp/missing/bar]$ f diff
Index: foo.txt
==================================================================
--- foo.txt
+++ foo.txt
@@ -1,1 +1,2 @@
 hello
+bye

[stephan@nuc:~/tmp/missing/bar]$ f status
repository:   /home/stephan/tmp/missing.f
local-root:   /home/stephan/tmp/missing/
config-db:    /home/stephan/.config/fossil.db
checkout:     24cd60a8fac71b8f89fd38a9e893709716954b53 2022-06-22 20:38:32 UTC
comment:      added foo.txt (user: stephan)
EDITED     ../foo.txt

but what you're reporting seems to vaguely remind me of a recent (the past few months) report from a Mac platform, but i can't for the life of me recall what it was.

(3) By KIT.james (kjames3411) on 2022-06-23 12:43:31 in reply to 1 [link] [source]

Unable to reproduce on macOS 12.4 (M1) using Fossil 2.18 [84f25d7eb1]

(4) By KIT.james (kjames3411) on 2022-06-23 12:44:42 in reply to 1 [link] [source]

Is your cpu intel or apple?

(5) By Stephan Beal (stephan) on 2022-06-23 13:16:24 in reply to 4 [link] [source]

Is your cpu...

All of my CPUs are ARM or intel. A report very similar to yours came up recently and it was Mac-specific, but my memory filters out all Mac/Windows-specific topics so i don't remember the details, just that "something happened." However... the forum doesn't forget and a search for "Mac" found the one i'm thinking of: 3be906a40dfac05eeec9b

(6) By Michael Durian (durian) on 2022-06-23 17:23:08 in reply to 5 [link] [source]

You are referring to a question I asked. It is here: https://fossil-scm.org/forum/forumpost/06fd5536c1

I opened a macports ticket here: https://trac.macports.org/ticket/65085

Aside from assigning it, the ticket hasn't been acted upon.

mike

(7) By Martin Gagnon (mgagnon) on 2022-06-23 18:11:54 in reply to 6 [link] [source]

Okay I recall this thread. So the problem is not Mac specific but MacPort which use a non-default build flag which caused this issue.

However, possible that there is a bug when using that built flag.

(8) By Lifepillar (lifepillar) on 2022-06-23 20:36:43 in reply to 7 [source]

You nailed it, of course. I am on a Mac M1 with the latest macOS and I had installed Fossil with MacPorts. I have now downloaded the official binary, and the problem is gone. I should have thought about it.

Thank you all, folks!

(9) By KIT.james (kjames3411) on 2022-06-24 13:03:23 in reply to 5 [link] [source]

hahah I recall of when I asked someone about MacPorts in this forum. Gotta use Homebrew ;)