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 19, 2008, 13:52 UTC
Message-ID
<20080619135159.GA19560@artemis.madism.org>
In-Reply-To
<20080619133747.GA31209@sigill.intra.peff.net>
On Thu, Jun 19, 2008 at 01:37:48PM +0000, Jeff King wrote:
Show 20 quoted lines
> On Thu, Jun 19, 2008 at 12:51:55PM +0200, Pierre Habouzit wrote:
> 
> > It's really painful to have git push error out when it's just that one of
> > your tracking branches isn't up to date with respect to a remote branch.
> > 
> > Let just add a new status: "lagging", always print it to screen when we're
> > lagging, but don't exit with a non 0 value, as it really alarms users.
> 
> This has been discussed before, and the suggested term was "stale".
> 
> Check out:
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/73038/focus=73186
> 
> which is uncannily identical (the difference is the name, and that I
> don't show the lagged branches unless -v is given).
> 
> Among the issues that were not sorted out last time:
> 
>   - should stale branches be shown without -v?
  I believe so, it's valuable information. It's as valuable as what you
get after a git fetch nowadays (like branches have diverged n and m
commits each or similar) But oh well… I don't care that much.
>   - calling ref_newer here is inefficient, since we have already called
>     it in the other direction. We should probably do the traversal once
>     in such a way as to find out which ref is newer (or if it is
>     indeterminate).
  Well, true, though I don't expect people to have tons of local
branches that match a refspec _and_ lag behind. I suspect this is a very
minor performance loss.
Show 7 quoted lines
>   - there is a possible danger with "git push -f", in that you force
>     both rejected branches as well as stale branches. Junio and I
>     discussed the possibility of disallowing "-f" unless the user
>     explicitly requested _what_ to push; i.e., --all, --matching,
>     --mirror, or a refspec. See:
> 
>       http://thread.gmane.org/gmane.comp.version-control.git/74425/focus=74481
  Well afaict this is a separate issue, as we're (with such a patch)
only changing what gets printed on the console, not the internal
behavior. So solving this second issue should not really be a
precondition to the inclusion of such a patch.
> I was considering resurrecting my patch after working up that safety
> valve.
  Please please please do :)
  The exit 1 of git-push is really annoying me these days.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Jeff KingNext: Jeff King
Message 3 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.