Re: [PATCH v2 7/8] range-diff: passthrough --[no-]notes to `git log`

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

 



Denton Liu <liu.denton@xxxxxxxxx> writes:

> When a commit being range-diff'd has a note attached to it, the note
> will be compared as well. However, if a user has multiple notes refs or
> if they want to suppress notes from being printed, there is currently no
> way to do this.
>
> Passthrough `---no--notes` to the `git log` call so that this option is

"`--[no-]notes`" or perhaps "`--[no-]notes` and `--notes=<ref>`"?

I think the verb phrase is two words, "pass through", by the way.

> +--[no-]notes[=<treeish>]::
> +	This flag is passed to the `git log` program
> +	(see linkgit:git-log[1]) that generates the patches.

I can see this was taken from "git log --help", and it probably
needs fixing for consistency as well, but I think --notes=<ref>
would be easier to click users' minds with notes.displayRef
configuration variable.

> @@ -61,8 +62,11 @@ static int read_patches(const char *range, struct string_list *list)
>  			"--output-indicator-new=>",
>  			"--output-indicator-old=<",
>  			"--output-indicator-context=#",
> -			"--no-abbrev-commit", range,
> +			"--no-abbrev-commit",
>  			NULL);
> +	if (other_arg)
> +		argv_array_pushv(&cp.args, other_arg->argv);
> +	argv_array_push(&cp.args, range);

Makes sense.

> diff --git a/range-diff.h b/range-diff.h
> index 08a50b6e98..7d918ab9ed 100644
> --- a/range-diff.h
> +++ b/range-diff.h
> @@ -2,6 +2,7 @@
>  #define RANGE_DIFF_H
>  
>  #include "diff.h"
> +#include "argv-array.h"
>  
>  #define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
>  
> @@ -12,6 +13,7 @@
>   */
>  int show_range_diff(const char *range1, const char *range2,
>  		    int creation_factor, int dual_color,
> -		    struct diff_options *diffopt);
> +		    struct diff_options *diffopt,
> +		    struct argv_array *other_arg);
>  
>  #endif

I thought a mere use of "pointer to a struct" did not have to bring
the definition of the struct into the picture?  In other words,
wouldn't it be fine to leave the other_arg a pointer to an opaque
structure by not including "argv-array.h" in this file?

Thanks.



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

  Powered by Linux