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

Re: [PATCH 1/3] t9350: point out that refs are not updated correctly

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 24, 2012, 19:09 UTC
Message-ID
<CAMP44s2RspCrRXZbRTsVwezyU9X=+8RF=_9Q+3zX75LBJkdoPA@mail.gmail.com>
In-Reply-To
<20121024180807.GA3338@elie.Belkin>
On Wed, Oct 24, 2012 at 8:08 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Hi Felipe,
>
> Felipe Contreras wrote:
>
>> This test is completely wrong.
>>
>> 1) Where are the marks file?
>> 2) master..master shouldn't export anything
>
> Why shouldn't master..master export anything?  It means "update the
> master ref; we already have all commits up to and including master^0".
Does it mean that? I don't think so, but let's assume that's the case.

We don't have all those commits; without the marks we have nothing. Or what exactly do you mean by 'we'?

Go to your git.git repository, and run this:

% git git init /tmp/git % git fast-export master^..master | git --git-dir=/tmp/git/.git fast-import

What do you expect? I expect a single commit, and that's what we get, now do the same with 'master..master', what do you expect?

How about 'git fast-export ^master'? Do you expect to get anything there? Or what about '^master master'?

Without marks these idioms don't make any sense. Now lets assume that marks were meant to be there.

If 'master..master' is supposed to update master, then what is 'master' supposed to do?

% git fast-export --{im,ex}port-marks=/tmp/marks master..master
vs.
% git fast-export --{im,ex}port-marks=/tmp/marks master

Either way, my patch will make 'master..master' throw a reset (if the marks are present, I haven't tried without them), I don't think it should, but that's a different story, and a different patch fix.

Show 5 quoted lines
> The underlying problem is that fast-export takes rev-list arguments as
> parameters, which is unfortunately only an approximation to what is
> really intended.  Ideally it would separately take a list of refs to
> import and rev-list arguments representing the commits we already
> have.

The commits we already have (exported before) are stored in the marks. Maybe we can store the refs there as well, but that would not change the semantics of refspecs, nor the fact that we need the marks.

Cheers.
-- 
Felipe Contreras
Previous: Jonathan NiederNext: Jonathan Nieder
Message 8 of 42 in “fast-export fixes”
  1. 0/3 fast-export fixesSverre Rabbelier, Nov 5, 2011
  2. 1/3 t9350: point out that refs are not updated correctlySverre Rabbelier, Nov 5, 2011
  3. Jonathan NiederNov 6, 2011
  4. Sverre RabbelierNov 6, 2011
  5. Jonathan NiederNov 7, 2011
  6. Felipe ContrerasOct 24, 2012
  7. Jonathan NiederOct 24, 2012
  8. Felipe ContrerasOct 24, 2012
  9. Jonathan NiederOct 24, 2012
  10. Felipe ContrerasOct 25, 2012
  11. Jonathan NiederOct 25, 2012
  12. Felipe ContrerasOct 25, 2012
  13. Jonathan NiederOct 25, 2012
  14. Sverre RabbelierOct 25, 2012
  15. Felipe ContrerasOct 25, 2012
  16. Sverre RabbelierOct 25, 2012
  17. Felipe ContrerasOct 25, 2012
  18. Sverre RabbelierOct 25, 2012
  19. Jonathan NiederOct 25, 2012
  20. Sverre RabbelierOct 25, 2012
  21. Jonathan NiederOct 25, 2012
  22. Sverre RabbelierOct 25, 2012
  23. Felipe ContrerasOct 25, 2012
  24. Felipe ContrerasOct 25, 2012
  25. Jonathan NiederOct 25, 2012
  26. Felipe ContrerasOct 25, 2012
  27. Jonathan NiederOct 25, 2012
  28. Felipe ContrerasOct 25, 2012
  29. Johannes SchindelinOct 24, 2012
  30. Felipe ContrerasOct 25, 2012
  31. 2/3 fast-export: do not refer to non-existing marksSverre Rabbelier, Nov 5, 2011
  32. Jonathan NiederNov 6, 2011
  33. Sverre RabbelierNov 6, 2011
  34. Johannes SchindelinJan 29, 2019
  35. 3/3 fast-export: output reset command for commandline revsSverre Rabbelier, Nov 5, 2011
  36. Jonathan NiederNov 6, 2011
  37. Sverre RabbelierNov 6, 2011
  38. Jonathan NiederNov 7, 2011
  39. Junio C HamanoNov 7, 2011
  40. Junio C HamanoNov 7, 2011
  41. Thomas RastNov 30, 2011
  42. Felipe ContrerasOct 24, 2012

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.