git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinayak Dev <vinayakdev.sci@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, sunshine@sunshineco.com
Subject: Re: [GSoC][PATCH v3] apply: Change #define to enum and variable types from int to enum
Date: Thu, 16 Feb 2023 22:51:05 +0530	[thread overview]
Message-ID: <CADE8NaqxVZ3oA2rg6ySR6L-t+b9bM07YTKtaDZ3u=N6U_t_T2Q@mail.gmail.com> (raw)
In-Reply-To: <xmqqttzlr0wm.fsf@gitster.g>

On Thu, 16 Feb 2023 at 22:41, Junio C Hamano <gitster@pobox.com> wrote:
>
> Vinayak Dev <vinayakdev.sci@gmail.com> writes:
>
> >> As a faithful rewrite, forcing the same values to be given as before
> >> by saying that "_DEFLATED must be 1" is a good thing to do, but once
> >> the dust settled from the patch, it would be a good idea to go back
> >> to the code and see if the values MUST be these, or if it is fine to
> >> use any value as long as they are distinct.  If it is the latter,
> >> then it would make a good follow-up patch to remove "= 1", with an
> >> explanation why it is a safe thing to do.
> >
> > Removing the 1 _may_ be a safe thing to do, because ...
>
> I didn't mean to suggest you think about it _NOW_ in the context of
> working on this patch.  Rather the opposite.  Let's have a faithful
> rewrite first and then as a follow-on work after this patch becomes
> part of "git", a further clean-up like that can be a good idea.

I am sorry, I just got a little too excited! I will follow-up at the
right time, I assure you.

> >> > +enum diff_name {
> >> > +     DIFF_OLD_NAME = 0,
> >> > +     DIFF_NEW_NAME
> >> > +};
> >>
> >> Ditto.
> >
> > I think that since enums start with zero by default, you are right in
> > saying that the '=0' here can be removed.
>
> Not what I meant.  I was referring to the lack of trailing comma.

Ok! Understood.

> > I will do so.
>
> Please don't.

Ok! I won't. :)

Thanks a lot for your reply!
Vinayak

      reply	other threads:[~2023-02-16 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15  9:19 [GSoC][PATCH v3] apply: Change #define to enum and variable types from int to enum Vinayak Dev
2023-02-15 17:49 ` Junio C Hamano
2023-02-16 14:04   ` Vinayak Dev
2023-02-16 17:11     ` Junio C Hamano
2023-02-16 17:21       ` Vinayak Dev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADE8NaqxVZ3oA2rg6ySR6L-t+b9bM07YTKtaDZ3u=N6U_t_T2Q@mail.gmail.com' \
    --to=vinayakdev.sci@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).