Added option to retain git history when using cfbs convert & Replaced cp/rsync with shutil.copy - #332
Added option to retain git history when using cfbs convert & Replaced cp/rsync with shutil.copy#332SimonThalvorsen wants to merge 2 commits into
Conversation
…nputs Ticket: ENT-14408 Changelog: Title Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
Ticket: CFE-4700 Changelog: Title Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
8f917ce to
fcd6dfe
Compare
olehermanse
left a comment
There was a problem hiding this comment.
Looks like you're moving the existing repo into a .old directory? And then adding that to gitignore? That's not what we mean by retain, we want the new project (after conversion) to have (retain) the git history of what happened before conversion.
Essentially, we want cfbs convert to do something equivalent to what I've done in a shell here;
$ cd my-masterfiles
$ ls -a
.git/ promises.cf update.cf [...]
$ mkdir ./my-masterfiles # We could prompt about what the name of the subdirectory should be
$ mv promises.cf update.cf [...] ./my-masterfiles
$ git add ./my-masterfiles
$ git commit -m "Moved CFEngine policy related files to subdirectory to convert this repository into a CFEngine Build project"
$ cfbs convert # (init + add +++)
The existing code (in cfbs convert / init) might not work correctly when .git already exists, in that case we need to fix that.
Yeah, that makes much more sense now that I think about it. Originally I thought it more as a 'backup' inside the the build-project, but I see what you mean. |
No description provided.