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