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

Re: [PATCH 3/5] setup_revisions: remember whether a ref was positive or not

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2011, 22:24 UTC
Message-ID
<7vpqkfv8x1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAGdFq_hLy6_AW-Yh_9fi318Z6jdkFWw5+cYrwMtOitDkGQorFA@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 11 quoted lines
>> But the point is that this codepath does not have a faintest clue whether
>> the "obj" parameter is something the end user actively asked for (which
>> might have been marked as uninteresting for other reasons, namely, because
>> it is reachable from other negative refs). So passing unconditional 0 is
>> just as bad.
>
> Doesn't passing 0 indicate that we _did not_ receive any explicit user
> input on this ref, which is exactly what we want to record? If the
> user passed us any explicit input on the ref, we record it at the
> other call-sites, here, the user told us nothing, so we record exactly
> that, nothing.

Hmm, which means you have a way to say "explicitly affirmative" vs "no information", but no way to say "explicitly negative", for example, and the worse part is that it is unclear if the approach the patch takes is extensible enough to allow that in the future. That is the kind of "myopic hack" attitude I did not particularly like in this patch.

"The next person who needs more generic framework can rip out what this patch does and the work required is the same amount" is not a convincing argument---it would mean you are burdening that other person with an extra work to _redo_ what this series does properly, and it is not likely to be of help for that person after your interest in this codepath has long waned.

Show 10 quoted lines
>> As I said, I am not married to the verbose struct/union representation
>> (the only reason I showed that verbosity was because it allowed me to do
>> away without having to enumerate all the syntax sugars we already
>> support); if your "flags" can express the same thing (it may needs to
>> become a bitfield with enough width, but I highly suspect that you would
>> also need at least a component that says "this is the string the user gave
>> us --- the user said 'master', not 'master^0', for example) and is a lot
>> more compact, that is definitely we want to go with.
>
> Don't we already store that in the name field?

Please remind yourself why then it is not sufficient for your patch to read from the name field please?

After all, wasn't the issue that "master^0..master" yields an empty set but you somehow wanted to know that the RHS of that dotdot was given as a positive ref?

Previous: Junio C HamanoNext: Sverre Rabbelier
Message 21 of 29 in “fast-export: prepare for remote helpers awesomeness”
  1. 0/5 fast-export: prepare for remote helpers awesomenessSverre Rabbelier, Jul 24, 2011
  2. 1/5 t9350: point out that refs are not updated correctlySverre Rabbelier, Jul 24, 2011
  3. 2/5 fast-export: do not refer to non-existing marksSverre Rabbelier, Jul 24, 2011
  4. 3/5 setup_revisions: remember whether a ref was positive or notSverre Rabbelier, Jul 24, 2011
  5. Junio C HamanoJul 24, 2011
  6. Junio C HamanoJul 24, 2011
  7. Sverre RabbelierAug 3, 2011
  8. Junio C HamanoAug 3, 2011
  9. Johannes SchindelinAug 8, 2011
  10. Junio C HamanoAug 8, 2011
  11. Sverre RabbelierAug 8, 2011
  12. Junio C HamanoAug 8, 2011
  13. Sverre RabbelierAug 8, 2011
  14. Junio C HamanoAug 8, 2011
  15. Sverre RabbelierAug 8, 2011
  16. Junio C HamanoAug 8, 2011
  17. Sverre RabbelierAug 8, 2011
  18. Junio C HamanoAug 8, 2011
  19. Sverre RabbelierAug 8, 2011
  20. Junio C HamanoAug 8, 2011
  21. Junio C HamanoAug 8, 2011
  22. Sverre RabbelierAug 8, 2011
  23. Junio C HamanoAug 8, 2011
  24. Sverre RabbelierAug 8, 2011
  25. Johannes SchindelinJul 26, 2011
  26. 4/5 fast-export: do not export negative refsSverre Rabbelier, Jul 24, 2011
  27. Junio C HamanoJul 24, 2011
  28. Johannes SchindelinJul 26, 2011
  29. 5/5 setup_revisions: remember whether a ref was positive or notSverre Rabbelier, Jul 24, 2011

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.