From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: [PATCH 0/3] more terse push output Date: Mon, 5 Nov 2007 00:05:17 -0500 Message-ID: <20071105050517.GA6244@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, Nicolas Pitre , Johannes Schindelin To: Junio C Hamano X-From: git-owner@vger.kernel.org Mon Nov 05 06:05:57 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iou9e-0001WX-9a for gcvg-git-2@gmane.org; Mon, 05 Nov 2007 06:05:47 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750887AbXKEFFW (ORCPT ); Mon, 5 Nov 2007 00:05:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750877AbXKEFFV (ORCPT ); Mon, 5 Nov 2007 00:05:21 -0500 Received: from 66-23-211-5.clients.speedfactory.net ([66.23.211.5]:1552 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbXKEFFV (ORCPT ); Mon, 5 Nov 2007 00:05:21 -0500 Received: (qmail 21051 invoked by uid 111); 5 Nov 2007 05:05:19 -0000 Received: from c-24-125-35-113.hsd1.va.comcast.net (HELO sigill.intra.peff.net) (24.125.35.113) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.32) with ESMTP; Mon, 05 Nov 2007 00:05:19 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Mon, 05 Nov 2007 00:05:17 -0500 Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: 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