Re: [PATCH v2 23/33] diff-merges: fix style of functions definitions

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

 



On Wed, Dec 16, 2020 at 10:50 AM Sergey Organov <sorganov@xxxxxxxxx> wrote:
>
> Put open curly brace on its own line
>
> Signed-off-by: Sergey Organov <sorganov@xxxxxxxxx>
> ---
>  diff-merges.c | 36 ++++++++++++++++++++++++------------
>  1 file changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/diff-merges.c b/diff-merges.c
> index cba391604ac7..0165fa22fcd1 100644
> --- a/diff-merges.c
> +++ b/diff-merges.c
> @@ -2,7 +2,8 @@
>
>  #include "revision.h"
>
> -static void suppress(struct rev_info *revs) {
> +static void suppress(struct rev_info *revs)
> +{
>         revs->separate_merges = 0;
>         revs->first_parent_merges = 0;
>         revs->combine_merges = 0;
> @@ -10,17 +11,20 @@ static void suppress(struct rev_info *revs) {
>         revs->combined_all_paths = 0;
>  }
>
> -static void set_separate(struct rev_info *revs) {
> +static void set_separate(struct rev_info *revs)
> +{
>         suppress(revs);
>         revs->separate_merges = 1;
>  }
>
> -static void set_first_parent(struct rev_info *revs) {
> +static void set_first_parent(struct rev_info *revs)
> +{
>         set_separate(revs);
>         revs->first_parent_merges = 1;
>  }
>
> -static void set_m(struct rev_info *revs) {
> +static void set_m(struct rev_info *revs)
> +{
>         /*
>          * To "diff-index", "-m" means "match missing", and to the "log"
>          * family of commands, it means "show full diff for merges". Set
> @@ -30,19 +34,22 @@ static void set_m(struct rev_info *revs) {
>         revs->match_missing = 1;
>  }
>
> -static void set_combined(struct rev_info *revs) {
> +static void set_combined(struct rev_info *revs)
> +{
>         suppress(revs);
>         revs->combine_merges = 1;
>         revs->dense_combined_merges = 0;
>  }
>
> -static void set_dense_combined(struct rev_info *revs) {
> +static void set_dense_combined(struct rev_info *revs)
> +{
>         suppress(revs);
>         revs->combine_merges = 1;
>         revs->dense_combined_merges = 1;
>  }
>
> -static void set_diff_merges(struct rev_info *revs, const char *optarg) {
> +static void set_diff_merges(struct rev_info *revs, const char *optarg)
> +{
>         if (0) ;
>         else if (!strcmp(optarg, "off")   || !strcmp(optarg, "none"))
>                 suppress(revs);
> @@ -62,7 +69,8 @@ static void set_diff_merges(struct rev_info *revs, const char *optarg) {
>   * Public functions. They are in the order they are called.
>   */
>
> -int diff_merges_parse_opts(struct rev_info *revs, const char **argv) {
> +int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
> +{
>         int argcount = 1;
>         const char *optarg;
>         const char *arg = argv[0];
> @@ -86,23 +94,27 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv) {
>         return argcount;
>  }
>
> -void diff_merges_suppress(struct rev_info *revs) {
> +void diff_merges_suppress(struct rev_info *revs)
> +{
>         suppress(revs);
>  }
>
> -void diff_merges_default_to_first_parent(struct rev_info *revs) {
> +void diff_merges_default_to_first_parent(struct rev_info *revs)
> +{
>         if (!revs->explicit_diff_merges)
>                 revs->separate_merges = 1;
>         if (revs->separate_merges)
>                 revs->first_parent_merges = 1;
>  }
>
> -void diff_merges_default_to_dense_combined(struct rev_info *revs) {
> +void diff_merges_default_to_dense_combined(struct rev_info *revs)
> +{
>         if (!revs->explicit_diff_merges)
>                 set_dense_combined(revs);
>  }
>
> -void diff_merges_set_dense_combined_if_unset(struct rev_info *revs) {
> +void diff_merges_set_dense_combined_if_unset(struct rev_info *revs)
> +{
>         if (!revs->combine_merges)
>                 set_dense_combined(revs);
>  }
> --
> 2.25.1
>

But...didn't you add all these functions yourself earlier in the
series?  Why didn't you split this patch up and squash it into the
relevant previous patches?



[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