[RFC] Issue #585: 'make clean' does not revert its changes from 'make rpm'

Reproducing the issue locally, when I run 'make rpm' and 'git status' the following files are listed: modified: ChangeLog modified: po/de_DE.po modified: po/en_US.po modified: po/es_ES.po modified: po/fr_FR.po modified: po/it_IT.po modified: po/ja_JP.po modified: po/kimchi.pot modified: po/ko_KR.po modified: po/pt_BR.po modified: po/ru_RU.po modified: po/zh_CN.po modified: po/zh_TW.po To solve that problem, there are two possible solutions: 1- Files changed at runtime will have the following format: - For example: ChangeLog, I will keep a tracked one at ChangeLog.am, and the file generate by make command, ChangeLog, will not be tracked (and be added to .gitignore). 2- include following command to Makefile.am: git clean -df & git reset --hard, to remove untracked files from the working tree and to revert files changes. I would like to make sure which one (or any other solution) would be the best in this case and why not use any of them. Thanks, Bianca

I think solution (2) is half way there. What you need to do is to be careful with reverting changes that were intended by the developer. If I change the source code without committing them and and execute make rpm to test the changes, I don't want my changes to be reverted back. I recommend in this scenario run git stash right before the modifications start to save any changes made before make rpm, then do 'git clean -df & git reset --hard & git stash apply' to restore the previous source code state. On 08/08/2016 11:34 AM, Bianca Carvalho wrote:
Reproducing the issue locally, when I run 'make rpm' and 'git status' the following files are listed:
modified: ChangeLog modified: po/de_DE.po modified: po/en_US.po modified: po/es_ES.po modified: po/fr_FR.po modified: po/it_IT.po modified: po/ja_JP.po modified: po/kimchi.pot modified: po/ko_KR.po modified: po/pt_BR.po modified: po/ru_RU.po modified: po/zh_CN.po modified: po/zh_TW.po
To solve that problem, there are two possible solutions:
1- Files changed at runtime will have the following format: - For example: ChangeLog, I will keep a tracked one at ChangeLog.am, and the file generate by make command, ChangeLog, will not be tracked (and be added to .gitignore).
2- include following command to Makefile.am: git clean -df & git reset --hard, to remove untracked files from the working tree and to revert files changes.
I would like to make sure which one (or any other solution) would be the best in this case and why not use any of them.
Thanks,
Bianca
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (2)
-
Bianca Carvalho
-
Daniel Henrique Barboza