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

[PATCH 0/3] more terse push output

From
Jeff King <peff@peff.net>
Date
Nov 5, 2007, 05:05 UTC
Message-ID
<20071105050517.GA6244@sigill.intra.peff.net>

Here are some patches to match push output to the new fetch output. The entire output of "git-push" for my test repo now looks like this:

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.

(where I'm mirroring the heads in refs/heads/mirror/* to show off the name mapping).

The interesting part is in the first patch; the other two are just removing clutter on stderr. The patches are based on 'next' to follow Daniel's send-pack work. I'm happy to hold on to them and rebase once things settle down in this area.

A few caveats:
  - the output is generated by send-pack, so it's actually "here's what
    I'm about to do" rather than "here's what has happened or is
    happening." receive-pack could generate more accurate results
    (including marking rejections based on hooks), but it has no
    knowledge of the name mapping (so it can't say "foo -> other/foo").
    Right now receive-pack generates 'error: blah blah blah' as it
    always has.
  - the name mapping is perhaps superfluous here, since most of the time
    people are just pushing using the same branch name. But it matches
    the new fetch output, and if you do use a refspec, it's a lot more
    clear.
  - this only covers send-pack, since that is where we do the ref
    matching. Presumably it would be possible to cover pushing over http
    and rsync, but it would have to be totally separate code.
  - no code is shared with the git-fetch implementation (they just
    happen to use the same format). The code is short enough that I
    think it would just end up more confusing to try to factor out the
    commonality.
  - 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?
-Peff
Next: Jeff King
Message 1 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.