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

Re: [PATCH] annotate: Support annotation of files on other revisions.

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Mar 6, 2006, 06:21 UTC
Message-ID
<440BD4F4.3060906@gmail.com>
In-Reply-To
<20060306055036.GB26820@spearce.org>
Shawn Pearce wrote:
Show 21 quoted lines
> Ryan Anderson <ryan@michonline.com> wrote:
>>A Large Angry SCM wrote:
>>
>>>Ryan Anderson wrote:
>>>...
>>>
>>>>For annotate, the syntax I was using was:
>>>>    git annotate Makefile headname
>>>>
>>>>I'm not married to it, so please, send a patch to change it if you want
>>>>(Please fix up the test case I'm sending in this patch, as well.)
>>>>
>>>Wouldn't
>>>    git annotate <headname> <filename(s?)>
>>>be more consistent with other git commands?
>>>
>>Yes, but <headname> (really, a commitish) needs to be optional.
>>
>>I should probably switch to:
>>    git annotate [-c|--commit <committish>] <filename>
>>but that's partly why I'm asking for feedback.
That works.
Or maybe:
	git-annotate [<committish> --] <filename(s?)>
or:
	git-annotate [<committish>] -- <filename(s?)>
Show 14 quoted lines
> 
> Yes but doesn't git-diff accept:
> 
> 	git-diff Makefile
> 	git-diff HEAD Makefile
> 
> ?  (Which is rather ugly as what if you have a tracked file actually
> called HEAD and you want the first form when the commit-ish is
> omitted.)  So accepting an optional commit-ish before the filename
> would be in line with what git-diff accepts today.
> 
> But maybe breaking convention from git-diff now is a good thing,
> with a future change to cleanup git-diff.
> 

Looking at the documentation, it looks like all of the commands that take paths do so as the last arguments. With any commit/tree arguments being, either, required or flagged.

Is there any reason that git-{annotate,blame} can't take more than one filename, ever?

Previous: Shawn PearceNext: Junio C Hamano
Message 13 of 19 in “git-blame: Use the same tests for git-blame as for git-annotate”
  1. git-blame: Use the same tests for git-blame as for git-annotateFredrik Kuivinen, Mar 5, 2006
  2. Ryan AndersonMar 5, 2006
  3. Junio C HamanoMar 6, 2006
  4. Martin LanghoffMar 6, 2006
  5. annotate: Support annotation of files on other revisions.Ryan Anderson, Mar 6, 2006
  6. Martin LanghoffMar 6, 2006
  7. Fredrik KuivinenMar 6, 2006
  8. A Large Angry SCMMar 6, 2006
  9. Ryan AndersonMar 6, 2006
  10. Shawn PearceMar 6, 2006
  11. Junio C HamanoMar 6, 2006
  12. Shawn PearceMar 6, 2006
  13. A Large Angry SCMMar 6, 2006
  14. Junio C HamanoMar 6, 2006
  15. Johannes SchindelinMar 6, 2006
  16. Johannes SchindelinMar 6, 2006
  17. Ryan AndersonMar 6, 2006
  18. Ryan AndersonMar 6, 2006
  19. annotate/blame tests updates.Junio C Hamano, Mar 6, 2006

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.