Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Commit + Push no longer using "Push to origin" config

> On Mar 23, 2022, at 08:15, Thomas Wolf <thomas.wolf@xxxxxxxxxx> wrote:
> 
> I do. With a wildcard push refspec, I'd quite frequently update other
> upstream branches, which would trigger CI builds. I quite often work on
> several feature branches simultaneously, and have work in progress
> committed on some of them that I definitively don't want to have pushed
> yet when I do push one of them. It would update Github PRs that I don't
> want to update.

You can mark PRs as "draft", which should be done anyway if there is work pending...

But anyway. You don't have to use a wildcard push ref spec if you want to be very specific about what to push. :) For the record, the "I don't have a strong opinion" really comes down to the commit dialog. I totally understand from a usability/workflow standpoint to limit that push to a specific branch only.

>> My use case is specifically Commit Amend + Push, which is now broken without the force flag.
> 
> Unless you used a Gerrit server ;-)

Which the Eclipse Foundation is replacing with Gitlab...

>> We've created a preference page for tweaking the behavior of that specific button. IMO it should go there.
> 
> I would imagine users would want to have different settings for that
> force flag for different repos, so a single preference is probably not a
> good match.

Let's be pragmatic. In the previous release EGit pushed everything. That already had been cut. If EGit is smart it could query the "force" flag from the ref spec. No preference or checkbox needed. Behavior would be consistent to the past. 

>> I use a * ref spec. All "my/*" branches will be force pushed.
> 
> So you never have pending work committed on your other local feature
> branches that you don't want to be pushed, or you don't care if it
> happens since a later push will also use force and overwrite the pushed
> work in progress on those branches. You don't have automatic CI jobs
> triggered on your remote my/* branches?

I prefer having all my branches being backed up to a remote system, which most likely as a much better backup strategy then my machines. :) I don't care if this is WIP. Also note, these are really my branches. I usually prefix them with "gunnar/*".

> It seems some little UI would be needed to set the force flag and
> to choose between the remote's push refspec (if any) or using
> branch.<name>.merge even if there is a remote push refspec.

Not sure why branch.<name>.merge would become important. EGit didn't use it before and just worked with the push refspec, did it?

-Gunnar



Back to the top