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

Re: What's in git.git

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 11, 2006, 11:29 UTC
Message-ID
<ee3hac$n57$1@sea.gmane.org>
In-Reply-To
<7vk64bnnxl.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
>  - Andy Whitcroft taught send-pack to use git-rev-list --stdin
>    so that we do not have to be limited by the number of refs
>    exec() command-line can hold.
[...]
>  - Pack-objects learned to run rev-list logic internally when
>    given --revs parameter; the refs arguments you would normally
>    give the upstream rev-list can be fed from its standard
>    input, instead of usual list of objects.
BTW. could you please document the above?
Perhaps those two options, --stdin to feed arguments from standard input,
and -revs to run rev-list logic internally should be used whenever possible
in all the git commands? This would allow to avoid forks and/or command
line length limit.
 
In 'next' currently the following commands have --stdin implemented:
 * git-update-index: --stdin to feed list of paths, one per line
 * git-diff-tree: --stdin to loop over <tree-ish>, or pairs of
   <tree-ish>[*1*]
 * git-hash-object: --stdin is equivalent of '-' special file
 * git-http-fetch and git-local-fetch have some strange --stdin
 * git-name-rev with --stdin functions as filter
 * git-rev-list: --stdin to feed list of <commits>; it is not clear from 
   the manpage if one can use ^<commit>, and commit related options
   and shortcuts like --not, <commit>..<commit>, <commit>...<commit>
And the following have --revs implemented
 * git-pack-objects: --revs to provide arguments to rev-list from stdin,
   instead of list of objects. UNDOCUMENTED.
It would be nice if the following commands had --stdin or had it's --stdin
usage extended:
 * git-diff-tree: --stdin to allow to provide path limits, separated 
   by ' -- ' from <tree-ish> or pair of <tree-ish> (does git-diff-tree allow
   for diff3-like behavior? then perhaps also three <tree-ish>)
 * git-ls-tree: --stdin to loop over <tree-ish>, one tree per line.
 * git-cat-object: --stdin to loop over objects, plus -z to change separator
   between records to NULL (or have it turned on by default).
For all "loop" --stdin, the output should begin with the line which was
arguments, like git-diff-tree outputs first <tree-ish> used for diff.

I think it is quite often to use git-rev-list ...| git-diff-tree ... pipeline, so it might be worth to add --revs option to git-diff-tree. Or it might not.

P.S. does git-merge take -F <file> option?
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 16 in “What's in git.git”
  1. Junio C HamanoSep 11, 2006
  2. Jakub NarebskiSep 11, 2006
  3. Junio C HamanoSep 11, 2006
  4. Jakub NarebskiSep 11, 2006
  5. Petr BaudisSep 11, 2006
  6. Junio C HamanoSep 11, 2006
  7. pack-objects: document --revs, --unpacked and --all.Junio C Hamano, Sep 13, 2006
  8. Junio C HamanoSep 18, 2006
  9. Jakub NarebskiSep 18, 2006
  10. Junio C HamanoSep 18, 2006
  11. Jakub NarebskiSep 18, 2006
  12. Johannes SchindelinSep 18, 2006
  13. Junio C HamanoSep 18, 2006
  14. Jakub NarebskiSep 18, 2006
  15. Franck Bui-HuuSep 18, 2006
  16. Junio C HamanoSep 24, 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.