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

Re: [fixup PATCH] push: Provide situational hints for non-fast-forward errors

From
Christopher Tiwald <christiwald@gmail.com>
Date
Mar 17, 2012, 18:46 UTC
Message-ID
<20120317184649.GA320@gmail.com>
In-Reply-To
<4F64C58B.4000207@in.waw.pl>
On Sat, Mar 17, 2012 at 06:10:35PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
Show 9 quoted lines
>  static const char message_advice_use_upstream[] =
> -	N_("Some of your local branches were stale with respect to their\n"
> -	   "remote counterparts. If you did not intend to push these branches,\n"
> -	   "you may want to set the 'push.default' configuration variable to\n"
> -	   "'current' or 'upstream' to push only the current branch.");
> +	N_("Updates were rejected because a tip of your branch is behind the remote.\n"
> +	   "If you did not intend to push that branch, you may want to explicitly\n"
> +	   "specify branches to push or set the 'push.default' configuration variable"
> +	   "to 'current' or 'upstream' to always push only the current branch.");

I prefer the "Some of your local..." language to "Updates were rejected..." as a reader, but I think you're right about providing the reason git rejected the push up front.

My concern about this particular message is "tip of your branch is behind the remote" reads to me like my _current_ branch is the offender, when that cannot be the case (it'd hit message_advice_pull_before_push first). Maybe something like this might make it clearer?

"Updates were rejected because a pushed branch tip is behind its remote counterpart. If you did not intend to push that branch, you may want to explicitly specify branches to push or set the 'push.default' configuration variable to 'current' or 'upstream' to always push only the current branch."

-- Christopher Tiwald

Previous: Zbigniew Jędrzejewski-SzmekNext: Zbigniew Jędrzejewski-Szmek
Message 26 of 28 in “push: Provide situational hints for non-fast-forward errors”
  1. push: Provide situational hints for non-fast-forward errorsChristopher Tiwald, Mar 13, 2012
  2. Junio C HamanoMar 14, 2012
  3. Zbigniew Jędrzejewski-SzmekMar 14, 2012
  4. Matthieu MoyMar 14, 2012
  5. Zbigniew Jędrzejewski-SzmekMar 14, 2012
  6. Christopher TiwaldMar 14, 2012
  7. Clemens BuchacherMar 15, 2012
  8. Junio C HamanoMar 15, 2012
  9. Matthieu MoyMar 16, 2012
  10. Christopher TiwaldMar 14, 2012
  11. Christopher TiwaldMar 14, 2012
  12. Matthieu MoyMar 14, 2012
  13. Christopher TiwaldMar 14, 2012
  14. Junio C HamanoMar 14, 2012
  15. Junio C HamanoMar 16, 2012
  16. Clemens BuchacherMar 16, 2012
  17. Junio C HamanoMar 16, 2012
  18. Christopher TiwaldMar 16, 2012
  19. Junio C HamanoMar 16, 2012
  20. Junio C HamanoMar 16, 2012
  21. Clemens BuchacherMar 16, 2012
  22. Junio C HamanoMar 16, 2012
  23. Clemens BuchacherMar 16, 2012
  24. Junio C HamanoMar 16, 2012
  25. push: Provide situational hints for non-fast-forward errorsZbigniew Jędrzejewski-Szmek, Mar 17, 2012
  26. Christopher TiwaldMar 17, 2012
  27. Zbigniew Jędrzejewski-SzmekMar 17, 2012
  28. Junio C HamanoMar 19, 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.