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

Re: [PATCH 2/3] fast-export: add new --refspec option

From
Junio C Hamano <gitster@pobox.com>
Date
May 9, 2013, 23:23 UTC
Message-ID
<7v38tv7n5y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAMP44s2yoBFZU+LzHWT30ijbQ2rknmV1ZoB9qDDYvvme2chB7g@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> Of course, but how do you implement that? That's mixing refspecs and
> revlist arguments, which AFAIK don't mix:

Simple. You treat everything as refspecs and form revision ranges out of them. Note that that is exactly the reason why "git push" can take "master" as a short-hand for "master:master" [*1*].

> % git fast-export ^next:new-next master:new-master --not
> refs/tags/*:refs/tags/backup/*

I thought you stopped mentioning the bottom of the range (e.g. ^next) in the output from export stream at around 49266e8a11cf (fast-export: don't handle uninteresting refs, 2012-11-28).

What does ^next:new-next (or mapping after "--not" in general) even mean? They would not make sense, would they?

So I would imagine you would be spelling that as:
    git fast-export master:new-master --not next refs/tags/*
or something, no?
[Footnote]
*1* Of course, unlike "git push", but similar to "git bundle",
    export does not know who the "receiving side" is and what they
    have, so in addition to the positives, you would need to tell
    the command where the bottoms of the range you are exporting
    are, so there needs to be some difference between the way "git
    push" and export/bundle specify the ranges.
    But that does not affect what should happen on the positive end
    of the ranges, which both "git push" and export/bundle need to
    specify anyway.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 11 of 19 in “Support for old:new remote-helper push”
  1. 0/3 Support for old:new remote-helper pushFelipe Contreras, May 9, 2013
  2. 1/3 fast-export: improve argument parsingFelipe Contreras, May 9, 2013
  3. Junio C HamanoMay 9, 2013
  4. Felipe ContrerasMay 9, 2013
  5. Junio C HamanoMay 9, 2013
  6. Felipe ContrerasMay 9, 2013
  7. Junio C HamanoMay 10, 2013
  8. 2/3 fast-export: add new --refspec optionFelipe Contreras, May 9, 2013
  9. Junio C HamanoMay 9, 2013
  10. Felipe ContrerasMay 9, 2013
  11. Junio C HamanoMay 9, 2013
  12. Felipe ContrerasMay 9, 2013
  13. Junio C HamanoMay 10, 2013
  14. Felipe ContrerasMay 10, 2013
  15. Junio C HamanoMay 10, 2013
  16. Johannes SixtMay 10, 2013
  17. Felipe ContrerasMay 16, 2013
  18. 3/3 transport-helper: add support for old:new refspecFelipe Contreras, May 9, 2013
  19. Felipe ContrerasMay 16, 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.