Forum users have noticed that git -- in contrast to rsync -- does not clean up local changes from the repository before syncing. While this has its advantages, I think it could be useful to provide an optional rsync-like behavior.
I think we can possibly have three levels of cleanup:
1. git reset --hard -- to discard changes, removals and files added via 'git add',
2. git clean -dfx -- to discard locally added files,
3. git reset --hard origin/master -- to discard local commits as well.
Now, do we want all 3 options? Or maybe just a boolean that enables 1.+2. since that I would expect to be the common case. How to name it? :)
Does not option 2 will destroy distfiles content? I think it must be added to .gitignore.
Why would I care about people crazy enough to put distfiles in a repository?
(In reply to Michał Górny from comment #2)
> Why would I care about people crazy enough to put distfiles in a repository?
Yeah, since the git sync module has nothing to do with the default rsync sync module, within this context we can consider /usr/portage/disfiles as an unsupported legacy configuration.
Ok then default value for DISTDIR must be changed to something outside of /usr/portage
(In reply to nE0sIghT from comment #4)
> Ok then default value for DISTDIR must be changed to something outside of
For bug 378603, the default DISTDIR will change along with a few others.
I don't think we should consider that a blocker for this 'git reset' feature, as long as it's not enabled in the default configuration (and git is not currently the default configuration).