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

Re: [WRONG/PATCH 1/3] revisions: clarify handling of --no-walk and --do-walk

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 24, 2011, 11:28 UTC
Message-ID
<4DB40941.5030903@drmicha.warpmail.net>
In-Reply-To
<20110421213014.GB18418@elie>
Jonathan Nieder venit, vidit, dixit 21.04.2011 23:30:
Show 14 quoted lines
> Michael J Gruber wrote:
> 
>> This is not unrelated to the tip of gitster/mg/show-without-prune, i.e.
>>
>> 0c738b6 (builtin/show: do not prune by pathspec, 2011-04-01)
> 
> True.
> 
>> We should rethink the ui balance between deviating from the usual log
>> option processing and the usefulness here.
> 
> Could you expand on that?  I think --no-walk being a positional
> argument is just an ugly consequence of the code that permits
> 

Sorry for being fuzzy. What I meant was: There is the systematic approach which gives the user exactly what he asks for, i.e.: log, rev-list default to walking, show to not walking (and rev-parse of course), and when a user feeds a range it may or may may not make sense. Similarly, "git show commit -- path" returns nothing at all if path is not touched by commit because the commit gets pruned.

We don't do the systematic approach now. In some situations, some commands switch on the walker automatically (I think "show A..B") to make things more useful (to most users) but less systematic, even less predictable if you don't know these deviations/exceptions. I've suggested such a "usefulness exception" myself (don't prune commits by path for "show").

The strict, systematic approach produces some command/argument combinations which are not useful or rarely useful.

The "helpful" approach produces special casing which may make things confusing if there's too much of it.

Finding the right balance is probably more difficult than being radically systematic...

Michael
Previous: Jonathan NiederNext: Jonathan Nieder
Message 5 of 11 in “teaching log's --glob=<glob> and friends to git shortlog”
  1. 0/3 teaching log's --glob=<glob> and friends to git shortlogJonathan Nieder, Apr 21, 2011
  2. 1/3 revisions: clarify handling of --no-walk and --do-walkJonathan Nieder, Apr 21, 2011
  3. Michael J GruberApr 21, 2011
  4. Jonathan NiederApr 21, 2011
  5. Michael J GruberApr 24, 2011
  6. Jonathan NiederApr 25, 2011
  7. Michael J GruberApr 26, 2011
  8. 2/3 revisions: split out handle_revision_pseudo_opt functionJonathan Nieder, Apr 21, 2011
  9. 3/3 revisions: allow --glob and friends in parse_options-enabled commandsJonathan Nieder, Apr 21, 2011
  10. Junio C HamanoApr 21, 2011
  11. Jonathan NiederApr 21, 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.