Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to git pull --rebase before scan/push of pkgdev push #102

Closed
ajakk opened this issue Nov 16, 2022 · 3 comments · Fixed by #105
Closed

Add option to git pull --rebase before scan/push of pkgdev push #102

ajakk opened this issue Nov 16, 2022 · 3 comments · Fixed by #105
Labels
enhancement New feature or request

Comments

@ajakk
Copy link

ajakk commented Nov 16, 2022

Given the pace of commits to gentoo.git, it's pretty common to need to git pull --rebase before being able to successfully push something. Thus, it would be great for pkgdev push to be able to do this for us automatically.

@arthurzam arthurzam added the enhancement New feature or request label Nov 16, 2022
@arthurzam
Copy link
Member

OK, that's sound good. I think naming it --pull without short options will be good.

@ajakk do you think the git pull --rebase should be done before pkgcheck scan or after? On one hand, it is logical to perform it before scanning, so we check for issues after rebasing. But on the other hand, scan might take long time, in which another dev might push.

@ajakk
Copy link
Author

ajakk commented Nov 19, 2022

There's a race condition either way between getting to the local push and other developer's pushes. I don't think it matters much in practice, but I'd prefer the scan after the pull to catch any new changes from the remote.

Also, if it's not too much trouble, can there be a config option for this? I wouldn't mind this doing a git pull --rebase unconditionally whenever I push.

arthurzam added a commit to arthurzam/pkgdev that referenced this issue Nov 19, 2022
Add a new option `--pull` to `pkgdev push` to pull all changes before
starting the scan & push. This is very useful for most normal usage for
developers.

This can be also set in config, but adding the line:

    push.pull =

Resolves: pkgcore#102
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
@arthurzam
Copy link
Member

@ajakk thanks for the answer, opened a PR with this implemented (with instructions how to add to config). I will wait for sam (or you if you agree) to review the strings used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants