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

Re: [PATCH] log: new option decorate reflog of remote refs

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 21, 2017, 12:48 UTC
Message-ID
<CACsJy8C41D0Qb0ZJoAPJ6Pwp904dVixUR9yXQmZr0NU9W-BU8A@mail.gmail.com>
In-Reply-To
<CA+P7+xqgyUW-Wt2oUSCc86HG-MfL-itAu2yVrZ219LNwqQnwKw@mail.gmail.com>
On Sat, Jan 21, 2017 at 5:00 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
Show 45 quoted lines
> On Fri, Jan 20, 2017 at 6:30 AM, Jeff King <peff@peff.net> wrote:
>>> Imposing order between options could cause confusion, I think, if you
>>> remove --decorate-reflog leaving --remotes on by accident, now you get
>>> --remotes with a new meaning. We could go with something like
>>> --decodate-reflog=remote, but that clashes with the number of reflog
>>> entries and we may need a separator, like --decorate-reflog=remote,3.
>>> Or we could add something to --decorate= in addition to
>>> short|full|auto|no. Something like --decorate=full,reflog or
>>> --decorate=full,reflog=remote,entries=3 if I want 3 reflog entries.
>>
>> I agree that making option-order important is potentially confusing. But
>> it does already exist with --exclude. It's necessary to specify some
>> sets of refs (e.g., all of A, except for those that match B, and then
>> all of C, including those that match B).
>>
>> Having --decorate-reflog=remote would be similarly constrained. You
>> couldn't do "decorate all remotes except for these ones". For that
>> matter, I'm not sure how you would do "decorate just the refs from
>> origin".
>>
>> I'll grant that those are going to be a lot less common than just "all
>> the remotes" (or all the tags, or whatever). I'd just hate to see us
>> revisiting this in a year to generalize it, and being stuck with
>> historical baggage.
>>
>>> My hesitant to go that far is because I suspect decorating reflog
>>> won't be helpful for non-remotes. But I'm willing to make more changes
>>> if it opens door to master.
>>
>> Forgetting reflogs for a moment, I'd actually find it useful to just
>> decorate tags and local branches, but not remotes. But right now there
>> isn't any way to select which refs are worthy of decoration (reflog or
>> not).
>>
>> That's why I'm thinking so much about a general ref-selection system. I
>> agree the "--exclude=... --remotes" thing is complicated, but it's also
>> the ref-selection system we _already_ have, which to me is a slight
>> point in its favor.
>>
>> -Peff
>
> I agree that the interaction between --exclude and --remotes/etc is
> confusing, but I think it's reasonable enough because we already
> support it, so it makes sense to extend it with this. I also think its
> better to extend here than it is to hard-code it.

OK. Next question, how do we deal with the reflog count (i..e the argument of --decorate-remote-reflog). Should it be shared for all ref type, or can be specified differently for remote, local and tags? I'm leaning towards the former. But I'll wait a bit for ideas before rewriting the patch. -- Duy

Previous: Jacob KellerNext: Jeff King
Message 6 of 27 in “log: new option decorate reflog of remote refs”
  1. log: new option decorate reflog of remote refsNguyễn Thái Ngọc Duy, Jan 19, 2017
  2. Jeff KingJan 19, 2017
  3. Duy NguyenJan 20, 2017
  4. Jeff KingJan 20, 2017
  5. Jacob KellerJan 20, 2017
  6. Duy NguyenJan 21, 2017
  7. Jeff KingJan 21, 2017
  8. 0/5 Prep steps for --decorate-reflogNguyễn Thái Ngọc Duy, Jan 25, 2017
  9. 1/5 rev-list-options.txt: delete an empty lineNguyễn Thái Ngọc Duy, Jan 25, 2017
  10. 2/5 revision.c: group ref selection options togetherNguyễn Thái Ngọc Duy, Jan 25, 2017
  11. Jeff KingJan 25, 2017
  12. Duy NguyenJan 26, 2017
  13. Jeff KingJan 26, 2017
  14. Junio C HamanoJan 25, 2017
  15. Duy NguyenJan 26, 2017
  16. 3/5 revision.c: allow to change pseudo opt parsing functionNguyễn Thái Ngọc Duy, Jan 25, 2017
  17. 5/5 revision.c: add --decorate-reflogNguyễn Thái Ngọc Duy, Jan 25, 2017
  18. 4/5 revision.c: refactor ref selection handler after --excludeNguyễn Thái Ngọc Duy, Jan 25, 2017
  19. Jacob KellerJan 25, 2017
  20. Jeff KingJan 25, 2017
  21. Jeff KingJan 25, 2017
  22. Jacob KellerJan 25, 2017
  23. Junio C HamanoJan 25, 2017
  24. Duy NguyenJan 26, 2017
  25. Jeff KingJan 26, 2017
  26. Junio C HamanoJan 26, 2017
  27. Junio C HamanoJan 25, 2017

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.