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

Re: [PATCH] git-send-pack: don't consider branch lagging behind as errors.

From
Pierre Habouzit <madcoder@debian.org>
Date
Jun 26, 2008, 13:28 UTC
Message-ID
<20080626132858.GE7237@artemis.madism.org>
In-Reply-To
<7vfxr0sj61.fsf@gitster.siamese.dyndns.org>
On Thu, Jun 26, 2008 at 08:19:02AM +0000, Junio C Hamano wrote:
Show 34 quoted lines
> I however think what Pierre wanted to do is different, and you do not have
> to solve "force this strict rewind" problem to solve it.
> 
> What we need is (with a configuration option) to change the meaning of
> "matching refs" from the current definition "branches with the same name
> between here and there" to "branches with the same name between here and
> there, but excluding the ones that do not fast forward (or strictly
> behind)".  So if you have tons of stale branches you checked out but
> haven't touched most of them, your "matching push" won't even try to push
> what you haven't touched.
> 
> I do not think we would ever want to allow a configuration that disables
> the exit status from push upon a push failure when somebody explicitly
> says "git push $there $this" and $this is not non-fast-forward.  If you
> asked $this to be pushed, and if $this cannot be pushed, we _should_ error
> out.
>
> So...
> 
>  (1) when you say "git push" to trigger the "matching refs" push, with the
>      new configuration, you do not error out nor even try to push out
>      things that do not fast forward.  Pretend that you did not even
>      attempt to push them, and do not error out.  This may result in not
>      pushing anything out, but that is what the people who have such a
>      configuration is asking for.
> 
>      If you have configured which branches are pushed when you are on your
>      current branch, and that branch --- most likely it is that current
>      branch --- does not fast forward, it is your problem.
> 
>  (2) even with such a configuration, you can "git push $there $this" and
>      "git push $there +$this" to explicitly ask refs to be pushed.  Such a
>      push won't be interfered by the new configuration and correctly fail
>      (or force).
  Of course if I: git push $remote $branch, if it's stalled, I want it
to fail (exit with !0). *BUT* if I don't specify branches, I don't want
the stalled ones to generate noise. That's exactly the behaviour I'd
like to see.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Junio C HamanoNext: Jeff King
Message 11 of 13 in “git-send-pack: don't consider branch lagging behind as errors.”
  1. git-send-pack: don't consider branch lagging behind as errors.Pierre Habouzit, Jun 19, 2008
  2. Jeff KingJun 19, 2008
  3. Pierre HabouzitJun 19, 2008
  4. Jeff KingJun 19, 2008
  5. Pierre HabouzitJun 19, 2008
  6. Junio C HamanoJun 19, 2008
  7. Pierre HabouzitJun 20, 2008
  8. しらいしななこJun 20, 2008
  9. Jeff KingJun 26, 2008
  10. Junio C HamanoJun 26, 2008
  11. Pierre HabouzitJun 26, 2008
  12. Jeff KingJun 28, 2008
  13. Jeff KingJun 28, 2008

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.