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

Re: [PATCH v2 3/6] transport-helper: clarify pushing without refspecs

From
John Keeping <john@keeping.me.uk>
Date
Apr 18, 2013, 18:35 UTC
Message-ID
<20130418183540.GB2278@serenity.lan>
In-Reply-To
<7v38un7nnp.fsf@alter.siamese.dyndns.org>
On Thu, Apr 18, 2013 at 10:29:30AM -0700, Junio C Hamano wrote:
Show 26 quoted lines
> John Keeping <john@keeping.me.uk> writes:
> >> diff --git a/transport-helper.c b/transport-helper.c
> >> index cea787c..4d98567 100644
> >> --- a/transport-helper.c
> >> +++ b/transport-helper.c
> >> @@ -785,6 +785,9 @@ static int push_refs_with_export(struct transport *transport,
> >>  	struct string_list revlist_args = STRING_LIST_INIT_NODUP;
> >>  	struct strbuf buf = STRBUF_INIT;
> >>  
> >> +	if (!data->refspecs)
> >> +		die("remote-helper doesn't support push; refspec needed");
> >
> > I think the "refspec needed" text is likely to be confusing if an
> > end-user ever sees this message.  I'm not sure how we can provide useful
> > feedback for both remote helper authors and end-users though.
> 
> This "refspecs" only come via the helper and not directly from the
> end user, no?
> 
> If that is the case, I do not think "confusing" is much of an issue.
> Not _("localizing") is also the right thing to do.  We may want to
> say "BUG: " at front to clarify it is not the end-user's fault, but
> a problem they may want to report.  If we at this point know what
> helper attempted export without giving refspecs, it may help to show
> it here, so that developers will know with what helper the user
> had problems with.

I like this idea. Perhaps we should say "Bug in remote helper; refspec needed with export", so that it clearly indicates to both end-users and remote helper authors that the error is in the remote helper.

Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 26 in “transport-helper: some clarifications and a fix”
  1. 0/6 transport-helper: some clarifications and a fixFelipe Contreras, Apr 18, 2013
  2. 1/6 transport-helper: clarify *:* refspecFelipe Contreras, Apr 18, 2013
  3. John KeepingApr 18, 2013
  4. Felipe ContrerasApr 18, 2013
  5. John KeepingApr 18, 2013
  6. Felipe ContrerasApr 18, 2013
  7. John KeepingApr 18, 2013
  8. Junio C HamanoApr 18, 2013
  9. Felipe ContrerasApr 18, 2013
  10. 2/6 transport-helper: update refspec documentationFelipe Contreras, Apr 18, 2013
  11. 3/6 transport-helper: clarify pushing without refspecsFelipe Contreras, Apr 18, 2013
  12. John KeepingApr 18, 2013
  13. Felipe ContrerasApr 18, 2013
  14. John KeepingApr 18, 2013
  15. Junio C HamanoApr 18, 2013
  16. John KeepingApr 18, 2013
  17. Junio C HamanoApr 18, 2013
  18. Eric SunshineApr 19, 2013
  19. Felipe ContrerasApr 19, 2013
  20. Junio C HamanoApr 19, 2013
  21. 4/6 transport-helper: warn when refspec is not usedFelipe Contreras, Apr 18, 2013
  22. Junio C HamanoApr 18, 2013
  23. Felipe ContrerasApr 18, 2013
  24. 5/6 transport-helper: trivial code shuffleFelipe Contreras, Apr 18, 2013
  25. 6/6 transport-helper: update remote helper namespaceFelipe Contreras, Apr 18, 2013
  26. Junio C HamanoApr 18, 2013

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.