From 9c58df8aee957acb1eb2992bb87196ee0feaea4a Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 7 Jul 2019 14:23:03 +1000 Subject: [PATCH] MediaChange: actually commit the data files to the repository --- doku2git.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doku2git.py b/doku2git.py index fca21d5..d285b62 100755 --- a/doku2git.py +++ b/doku2git.py @@ -253,7 +253,15 @@ class MediaChange(Change): localpath = self.page.replace(':', os.path.sep) localdir = os.path.dirname(localpath) - yield f'cp "{self._attic(src)}" "{os.path.join(dst, localdir)}"' + dstpath = os.path.join(dst, localdir) + + cmds = [ + f'cp "{self._attic(src)}" "{dstpath}"', + f'git add "{dstpath}"' + ] + + for c in cmds: + yield c ###############################################################################