Re: Weird merge records
On Sat, May 6, 2023 at 7:43 AM Thomas Guyot <tguyot@gmail.com> wrote:
Show 20 quoted lines
>
> Hi,
>
> On 2023-04-28 11:34, Dan Stromberg wrote:
> > I suspect the merge records may be coming from this small bit of shell
> > script I've been using to pull from the master repo into my personal
> > repo:
> > git fetch upstream
> > git checkout "$branch"
> > git config pull.rebase false
> > git pull upstream "$branch"
> > git push origin "$branch"
> >
> > Does that snippet look responsible? If yes, how might I change it to
> > stop creating all those merge records? If no, any guesses what else
> > might be causing it?
>
> It is, indeed. This is IMHO something the developers should do
> themselves, in particular the pull may fail on conflicts and you don't
> seem to stop when it does.
It should stop on an error - because there's a "set -eu" in effect.
Show 7 quoted lines
> Also note the first fetch is redundant, pull already does a fetch.
>
> So you could change your script to:
>
> git checkout "$branch"
> git pull --rebase upstream "$branch" || exit 1
> git push origin "$branch"
I'll keep this in mind.
Thanks.