use status --ignore-submodules in configureSmudgeFilter
Speed up git-annex upgrade (from v5) and init in a repository that has submodules. Setting the config does not affect the submodules, so avoid the work of getting status in them, which may involve using the smudge filter etc. Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
parent
0b2dd374d8
commit
eb8e0594bb
4 changed files with 21 additions and 1 deletions
|
@ -9,6 +9,8 @@ git-annex (10.20221213) UNRELEASED; urgency=medium
|
|||
* Added --anything (and --nothing). Eg, git-annex find --anything
|
||||
will list all annexed files whether or not the content is present.
|
||||
This is slightly faster and clearer than --include=* or --exclude=*
|
||||
* Speed up git-annex upgrade (from v5) and init in a repository that has
|
||||
submodules.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 12 Dec 2022 13:04:54 -0400
|
||||
|
||||
|
|
|
@ -29,7 +29,11 @@ configureSmudgeFilter = unlessM (fromRepo Git.repoIsLocalBare) $ do
|
|||
-- unexpected changes when the file is checked into git or annex
|
||||
-- counter to the annex.largefiles configuration.
|
||||
-- Avoid that problem by running git status now.
|
||||
inRepo $ Git.Command.runQuiet [Param "status", Param "--porcelain"]
|
||||
inRepo $ Git.Command.runQuiet
|
||||
[ Param "status"
|
||||
, Param "--porcelain"
|
||||
, Param "--ignore-submodules"
|
||||
]
|
||||
|
||||
setConfig (ConfigKey "filter.annex.smudge") "git-annex smudge -- %f"
|
||||
setConfig (ConfigKey "filter.annex.clean") "git-annex smudge --clean -- %f"
|
||||
|
|
|
@ -18,3 +18,4 @@ I guess it could have used some flavor of `--ignore-submodules` with its invocat
|
|||
[[!meta author=yoh]]
|
||||
[[!tag projects/repronim]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 1"""
|
||||
date="2022-12-20T19:48:52Z"
|
||||
content="""
|
||||
This happens on upgrade from a v5 repository, which calls
|
||||
configureSmudgeFilter. [[!commit 401a79675ba2f125545ec9ec77376cb4b965fa4a]]
|
||||
explains why it needs to run status there.
|
||||
|
||||
So, it will indeed be ok to pass --ignore-submodules, since each submodule
|
||||
that is a git-annex repository will get upgraded in its own time,
|
||||
and will run configureSmudgeFilter then.
|
||||
"""]]
|
Loading…
Reference in a new issue