git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Weird merge records

From
DSDan Stromberg <strombrg@gmail.com>
Date
May 8, 2023, 14:54 UTC
Message-ID
<CAOvKW571cxj6XBSBtmUzS-i9w_MfR9p2BOVMHS1Mc3d6CrWO-w@mail.gmail.com>
In-Reply-To
<a611877f-c515-033c-e015-f3952b520c08@gmail.com>
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.
Previous: Felipe Contreras
Message 8 of 8 in “Weird merge records”
  1. Dan StrombergApr 28, 2023
  2. Thomas GuyotMay 6, 2023
  3. Felipe ContrerasMay 7, 2023
  4. Dan StrombergMay 8, 2023
  5. Felipe ContrerasMay 8, 2023
  6. Dan StrombergMay 8, 2023
  7. Felipe ContrerasMay 8, 2023
  8. Dan StrombergMay 8, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.