Re: [PATCH] notes: dry-run and verbose options for prune

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

 



On 05/14/2010 02:42 PM, Michael J Gruber wrote:
> @@ -792,7 +792,10 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
>  static int prune(int argc, const char **argv, const char *prefix)
>  {
>  	struct notes_tree *t;
> +	int show_only, verbose;
>  	struct option options[] = {
> +		OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"),
> +		OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"),
>  		OPT_END()
>  	};
>   

Why not use the standard OPT__DRY_RUN and OPT__VERBOSE macros?

---->8----

diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 0f32792..6e53c9a 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -122,10 +122,12 @@ OPTIONS
        is taken to be in `refs/notes/` if it is not qualified.
 
 -n::
+--dry-run::
        Do not remove anything; just report the object names whose notes
        would be removed.
 
 -v::
+--verbose::
        Report all object names whose notes are removed.
 
 
diff --git a/builtin/notes.c b/builtin/notes.c
index 8c2ac51..0ae2561 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -794,8 +794,8 @@ static int prune(int argc, const char **argv, const char *pr
        struct notes_tree *t;
        int show_only, verbose;
        struct option options[] = {
-               OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"),
-               OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"),
+               OPT__DRY_RUN(&show_only),
+               OPT__VERBOSE(&verbose),
                OPT_END()
        };
 


--
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]