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

Re: [PATCH resend 0/3] transport: catch non-fast-forwards

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Dec 4, 2009, 07:05 UTC
Message-ID
<alpine.LNX.2.00.0912040153090.14365@iabervon.org>
In-Reply-To
<20091204144822.a61355d2.rctay89@gmail.com>
On Fri, 4 Dec 2009, Tay Ray Chuan wrote:
Show 16 quoted lines
> This patch series applies on top of 'next', and deals with alerting
> the user to non-fast-forward pushes when using helpers (smart).
> 
> Previously, git silently exited. This situation involves the curl
> helper and the smart protocol. The fast-forward push is only detected
> when curl executes the rpc client (git-send-pack). Now, we detect it
> before telling the helper to push.
> 
> The first patch refactors ref status logic out of builtin-send-pack.c.
> 
> The second patch lets git know of non-fast-forwards before actually
> telling the helper to push anything.
> 
> The third patch changes the return code when ref status indicate an
> error (determined by push_had_errors()), so that the caller of
> transport_push() is alerted.

Seems to me like transport_push() ought to set this sort of status information before calling the push method, rather than requiring all of the implementations to remember to call the generic function, since there's not really anything else sane they can do, right?

(There's eventually going to be at least a third push implementation: export the data to a foreign system a la "git svn dcommit")

	-Daniel
*This .sig left intentionally blank*
Message 1 of 1 in “Re: [PATCH resend 0/3] transport: catch non-fast-forwards”
  1. Daniel BarkalowDec 4, 2009

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.