Re: [PATCH 0/3] "log --stdin" updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 20, 2009 at 03:25:12AM -0800, Junio C Hamano wrote:

> These three come on top of 61ab67a (Teach --stdin option to "log" family,
> 2009-11-03), which gave "--stdin" to the log family of commands (e.g. log,
> rev-list).  The earlier patch allowed you to feed only the revs (which was
> what gitk originally wanted), but after zero or more revs (one rev per
> line), you can now feed a line that consists of "--" and then pathspecs
> (one path per line).

This looks like a good API feature, though I am curious about the
missing "4/3" that was the motivation (of course, with a feature
like this, it may be for your out-of-git script, but as I said, I am
curious :) ). Is it a response to

  http://article.gmane.org/gmane.comp.version-control.git/133268

?

The implementation looks good from my cursory reading. Tests and docs
are of course missing. We don't seem to have any rev-list --stdin tests
already. Maybe even something as simple as:

  git rev-list HEAD -- file >expect &&
  (echo HEAD; echo --; echo file) | git rev-list --stdin >actual &&
  test_cmp expect actual

For docs, maybe squash this in (it mentions the pathspecs, but also
loosens --stdin to be available for "git log" and friends, which should
have been part of 61ab67a).

diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index bf66116..b44fdd9 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -243,12 +243,14 @@ endif::git-rev-list[]
 	Pretend as if all the refs in `$GIT_DIR/refs/remotes` are listed
 	on the command line as '<commit>'.
 
-ifdef::git-rev-list[]
 --stdin::
 
 	In addition to the '<commit>' listed on the command
-	line, read them from the standard input.
+	line, read them from the standard input. If a '--' separator is
+	seen, stop reading commits and start reading paths to limit the
+	result.
 
+ifdef::git-rev-list[]
 --quiet::
 
 	Don't print anything to standard output.  This form
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]