rose icon indicating copy to clipboard operation
rose copied to clipboard

Have Rose fileinstall from Git include hidden files

Open wxtim opened this issue 8 months ago • 4 comments

in https://github.com/MetOffice/Science-Git-Migration-Project/issues/46#issuecomment-2886922662

@ehogan says:

Also, we just discovered the git scheme doesn't checkout hidden files, which are required for our use case! 😕 Is it possible for hidden files to be included when using the git scheme? 🤔

@benfitzpatrick - Is there any fundamental reason not to?

wxtim avatar May 19 '25 07:05 wxtim

Simple test

[command]
default=test -e "repo/.hidden-file"

[file:repo]
source=git:[email protected]:wxtim/test.git::./::main

A little investigation suggests that the '--exclude=.*' in the rsync step is causing the problem - @benfitzpatrick - what was this added to the rsync command for?

wxtim avatar May 19 '25 08:05 wxtim

Likely excluding .git / .svn directories?

oliver-sanders avatar May 19 '25 12:05 oliver-sanders

No, it's deeper than that - it's using a command called get_command ~authored by Dave more than a decade ago~ created when Rose was moved to Git.

Having looked further into it, it looks like all the loc handlers will exclude hidden files, and all of them have always done it, at least back as far as the start of the record in Git for Rose. (http://fcm1/projects/rose/changeset/1460)

wxtim avatar May 19 '25 12:05 wxtim

Likely excluding .git / .svn directories?

I'm afraid the .git directory is the one we want! 🤯

However, it is common to see many hidden files in Git repositories. Perhaps this wasn't so much of an issue for Subversion?

While this topic is being discussed, would it be worth adding to the documentation that hidden files are not included, at least for the git scheme (as this is where this information would be the most useful)? 🤔

ehogan avatar May 28 '25 15:05 ehogan