Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539418 - sys-apps/portage: support sync module option to 'git reset' before pulling
Summary: sys-apps/portage: support sync module option to 'git reset' before pulling
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal with 5 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-09 08:14 UTC by Michał Górny
Modified: 2020-12-02 21:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-09 08:14:59 UTC
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? :)
Comment 1 nE0sIghT 2015-03-08 22:23:05 UTC
Does not option 2 will destroy distfiles content? I think it must be added to .gitignore.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-03-08 22:59:15 UTC
Why would I care about people crazy enough to put distfiles in a repository?
Comment 3 Zac Medico gentoo-dev 2015-03-08 23:36:15 UTC
(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.
Comment 4 nE0sIghT 2015-03-08 23:41:36 UTC
Ok then default value for DISTDIR must be changed to something outside of /usr/portage
Comment 5 Zac Medico gentoo-dev 2015-03-08 23:49:39 UTC
(In reply to nE0sIghT from comment #4)
> Ok then default value for DISTDIR must be changed to something outside of
> /usr/portage

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).