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

Adding the git_branching option #324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Odilhao
Copy link
Member

@Odilhao Odilhao commented Oct 11, 2022

This will be used for pulpcore branching, the --commit make it hard to push/sync during branching, when we have at least 25+ package updates.

For this I'm adding a --branching to keep all commits in the same branch

@ehelms
Copy link
Member

ehelms commented Oct 12, 2022

I think what you propose here is a much better solution as the default behavior of --commit and would ask that you just make it do so. Creating a giant blob commit when it's multiple packages is harder to manage, and doing a branch but with a commit per package sounds way better.

@Odilhao Odilhao force-pushed the git-branching branch 6 times, most recently from 464515b to 936735b Compare October 14, 2022 16:10
@pcreech
Copy link
Member

pcreech commented Dec 2, 2022

@ehelms @Odilhao ping, it's been sitting a bit with no movement.

@Odilhao
Copy link
Member Author

Odilhao commented Dec 2, 2022

I've been using this since Pulpcore 3.21 branching, it worked as intended

@ehelms
Copy link
Member

ehelms commented Dec 12, 2022

The thing missing for me here is that it removes the auto-creation of a branch for me which I have used a lot. I was hoping with this change you could keep that functionality but put it behind a parameter, e.g. --branch

@Odilhao Odilhao force-pushed the git-branching branch 9 times, most recently from 8e6cf91 to e18a7ab Compare March 27, 2023 21:11
…nch for every commit.

Adds --branch for the old --commit logic.
-h, --help show this help message and exit
-v, --verbose verbose output
--branch When true, creates a git branch and commits the update changes to it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--branch When true, creates a git branch and commits the update changes to it.
--branch When true, creates a git branch.

--commit does the second half?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No --commit only commits the package update, it does not create a new branch it can be used in a loop and it will only generate news commits and not new branches

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh that's a bit confusing, I would expect:

  • branch to create me a branch
  • commit to create a commit
  • branch + commit to create a new branch and commit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's confusing, and I was confused. I'll refactor the code later today.

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

Successfully merging this pull request may close these issues.

3 participants