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

Re: [PATCH 0/3] more terse push output

From
Steffen Prohaska <prohaska@zib.de>
Date
Nov 5, 2007, 07:09 UTC
Message-ID
<20FFDEF3-5F29-4494-9624-2CE30A585B92@zib.de>
In-Reply-To
<20071105050517.GA6244@sigill.intra.peff.net>
On Nov 5, 2007, at 6:05 AM, Jeff King wrote:
Show 5 quoted lines
>   - the 'ref is not up-to-date, maybe you need to push' message has  
> gone
>     away in favor of the terse '[rejected] ... (non-fast forward)'. I
>     know there was some discussion recently of enhancing that message.
>     Is this perhaps too terse?
I like the general idea of the terse output.

If we want a suggestion to the user, we could put it as a summary. If a ref was rejected send-pack could print a concluding message:

---
To file:///tmp/parent
  + f3325dc...3b91d1c hasforce -> mirror/hasforce (forced update)
    f3325dc..bb022dc  master -> mirror/master
  ! [rejected]        needsforce -> mirror/needsforce (non-fast forward)
  * [new branch]      newbranch -> mirror/newbranch
  * [new tag]         v1.0 -> v1.0
Counting objects: 5, done.
Writing objects: 100% (3/3), done.
Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
warning: some refs were rejected.
  Maybe they are not up-to-date and you want to pull or rebase first?
  Or you may need to force an update?
---

In this way the terse output would not be disrupted and the suggestion would be given to the user nonetheless.

I propose to use "warning" because it is not a real error. push updates all other refs as expected. It only rejects some refs. An error would be appropriate only after push learnt transactions, that is either completely succeeds or doesn't update any ref at all.

	Steffen
Previous: Jeff KingNext: Junio C Hamano
Message 5 of 6 in “more terse push output”
  1. 0/3 more terse push outputJeff King, Nov 5, 2007
  2. 1/3 more terse push outputJeff King, Nov 5, 2007
  3. 2/3 receive-pack: don't mention successful updatesJeff King, Nov 5, 2007
  4. 3/3 send-pack: require --verbose to show update of tracking refsJeff King, Nov 5, 2007
  5. Steffen ProhaskaNov 5, 2007
  6. Junio C HamanoNov 5, 2007

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.