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

Re: [PATCH] Give better 'pull' advice when pushing non-ff updates to current branch

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Apr 24, 2012, 07:04 UTC
Message-ID
<vpqipgpehlk.fsf@bauges.imag.fr>
In-Reply-To
<1335221121-36664-1-git-send-email-christiwald@gmail.com>
Christopher Tiwald <christiwald@gmail.com> writes:
> +		/* Branches configured for octopus merges should advise
> +		 * just 'git pull' */
Style: Git usually writes these comments 
/*
 * like this
 */
Show 10 quoted lines
> +		if (branch->remote_name &&
> +		    branch->merge &&
> +		    branch->merge_nr == 1 &&
> +		    !strcmp(transport->remote->name, branch->remote_name) &&
> +		    !strcmp(strbuf_detach(&buf, NULL),
> +			    prettify_refname(branch->merge[0]->dst))) {
> +			advise_tracked_pull_before_push();
> +		}
> +		else
> +			advise_untracked_pull_before_push();

Isn't this doing the opposite of what the comment is saying about octopus merge, i.e. if branch->merge_nr > 1, call advise_untracked_pull_before_push() which will advise 'git pull <remote> <branch>'?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Christopher Tiwald
Message 6 of 7 in “Give better 'pull' advice when pushing non-ff updates to current branch”
  1. Give better 'pull' advice when pushing non-ff updates to current branchChristopher Tiwald, Apr 23, 2012
  2. Junio C HamanoApr 24, 2012
  3. Christopher TiwaldApr 24, 2012
  4. Junio C HamanoApr 24, 2012
  5. Junio C HamanoApr 24, 2012
  6. Matthieu MoyApr 24, 2012
  7. Christopher TiwaldApr 24, 2012

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.