git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Modified flag field type in rev_list_info struct in bisect.h. There is no need for flag field to be signed, as it is not supposed to be used as decimal.

From
Stefan Beller <sbeller@google.com>
Date
Mar 24, 2016, 19:51 UTC
Message-ID
<CAGZ79kZmzo+f9YF1K1oC2GfOrzdaojmrca7bUm3cBRoDreeA-g@mail.gmail.com>
In-Reply-To
<1458848469-12663-2-git-send-email-motroniii@gmail.com>
On Thu, Mar 24, 2016 at 12:41 PM, Motroni Igor <motroniii@gmail.com> wrote:
> From: Pontifik <motroniii@gmail.com>

Here is a good place to put reasoning for why this is a good idea. I see you have a long subject, so maybe we can shorten the first line (down to less than ~ 80 characters) and put the longer explanation here.

How about:
  bisect: use unsigned for flag field
  The flags are usually used as a unsigned variable, because it makes
  bit operations easier to follow.
>
> Signed-off-by: Pontifik <motroniii@gmail.com>
>From Documentation/SubmittingPatches:
> Also notice that a real name is used in the Signed-off-by: line. Please
> don't hide your real name.
Show 14 quoted lines
> ---
>  bisect.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bisect.h b/bisect.h
> index acd12ef..a979a7f 100644
> --- a/bisect.h
> +++ b/bisect.h
> @@ -16,7 +16,7 @@ extern struct commit_list *filter_skipped(struct commit_list *list,
>
>  struct rev_list_info {
>         struct rev_info *revs;
> -       int flags;
> +       unsigned int flags;

You can also drop the int here and make it just unsigned.

Show 10 quoted lines
>         int show_timestamp;
>         int hdr_termination;
>         const char *header_prefix;
> --
> 2.5.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Motroni IgorNext: work
Message 3 of 10 in “GSoC student”
  1. 0/2 GSoC studentMotroni Igor, Mar 24, 2016
  2. 1/2 Modified flag field type in rev_list_info struct in bisect.h. There is no need for flag field to be signed, as it is not supposed to be used as decimal.Motroni Igor, Mar 24, 2016
  3. Stefan BellerMar 24, 2016
  4. workMar 24, 2016
  5. Eric SunshineMar 24, 2016
  6. Stefan BellerMar 24, 2016
  7. Junio C HamanoMar 25, 2016
  8. workMar 25, 2016
  9. Eric SunshineMar 25, 2016
  10. 2/2 Just a minor commit to trigger Travis Ci buildMotroni Igor, Mar 24, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.