Re: What's cooking in git.git (May 2011, #06; Fri, 13)

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

 



Jens Lehmann <Jens.Lehmann@xxxxxx> writes:

> Am 13.05.2011 22:03, schrieb Junio C Hamano:
>> * jl/read-tree-m-dry-run (2011-05-11) 1 commit
>>  - Teach read-tree the -n|--dry-run option
>> 
>> Looked good. We _might_ want to make -n simply ignore -u, though.
>
> Fine by me. Do you want me to send an updated version? If so,
> should a warning be issued in that case or should that just
> happen silently?

Later we _may_ have a condition where "read-tree -m" with some options
(except "-n") may succeed but "read-tree -m -u" with the same other
options may fail, and the reason to have "-n" is so that the caller can
tell if the operation may or may not fail in advance without changing the
state. Singling out "do not write INDEX" was a mistake to begin with.

How about "simply ignore" aka "silently"?  We do not even have to make it
sound like an user error, if we explain the option like this.

I think the change to the implementation would be trivial, but you would
probably want to update the tests in 1002 (remove the one at the end that
checks -u/-n incompatibility, and perhaps make sure "-n -u" combination
does not touch anything as advertised).

Thanks.

diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index a35849f..46a96f2 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -55,8 +55,8 @@ OPTIONS
 
 -n::
 --dry-run::
-	Don't write the index file. This option isn't allowed together
-	with -u.
+	Check if the command would error out, without updating the index
+	nor the files in the working tree for real.
 
 -v::
 	Show the progress of checking files out.
--
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]