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

Re: [PATCH v7] format-patch: allow a non-integral version numbers

From
ZheNing Hu <adlternative@gmail.com>
Date
Mar 20, 2021, 03:04 UTC
Message-ID
<CAOLTT8TZzf1vTvFULuPy4EeTQc6vBH=uRuC7WtUD97jA2Mk5hg@mail.gmail.com>
In-Reply-To
<xmqq8s6jnjc8.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2021年3月20日周六 上午1:29写道:
Show 10 quoted lines
>
> "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > Usually we can only use `format-patch -v<n>` to generate integral
> > version numbers patches, but sometimes a same fixup should be
>
> I guess that you meant "a small fixup" here?
>
Yes.
Show 12 quoted lines
> > labeled as a non-integral version like `v1.1`, so teach `format-patch`
> > to allow a non-integral version which may be helpful to send those
> > patches.
> >
> > `<n>` can be any string, such as `-v1.1`.
>
> I would probably use "such as '3.1' or '4rev2'" (without the leading
> "-v", as that is how you introduce <n> in the first sentence)
> instead in the proposed log message, and give a pair of examples to
> show both fractional numbers and non numbers are accepted in the
> documentation, if I were doing this patch.
>

Sure, either a "fractional" version or a "non-nummbers" version can be accepted. I will complete the expansion of these documents.

Show 8 quoted lines
> > In the case where it
> > is a non-integral value, the "Range-diff" and "Interdiff"
> > headers will not include the previous version.
>
> Which is rather unfortunate, but I do not care strongly enough (I
> would rather discurage use of partial rerolls with these fractinal
> bits anyway).
>

Well, now this patch (no previous-count) was born in the previous suggestion of Denton Liu. I also hope it can be more practical.

Show 17 quoted lines
> > Range-diff vs v6:
> >
> >  1:  d5f5e3f073de ! 1:  95cfe75ee7da format-patch: allow a non-integral version numbers
> >      @@ builtin/log.c: static void print_bases(struct base_tree_info *bases, FILE *file)
> >       +       int v;
> >       +
> >       +       /* RFC may be v0, so allow -v1 to diff against v0 */
> >      -+       if (reroll_count && !strtol_i(reroll_count, 10, &v))
> >      ++       if (reroll_count && !strtol_i(reroll_count, 10, &v) &&
> >      ++           v >= 1)
> >       +               strbuf_addf(sb, rerolled, v - 1);
> >       +       else
> >                       strbuf_addstr(sb, generic);
>
> In one of your review responses earlier, you hinted that limiting
> the range of v like this was needed for correctness.  There should
> be a new test to cover the case that this change makes a difference.
I will do it.
Thanks.
Previous: Junio C HamanoNext: ZheNing Hu via GitGitGadget
Message 33 of 49 in “format-patch: allow a non-integral version numbers”
  1. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Feb 25, 2021
  2. Eric SunshineFeb 25, 2021
  3. ZheNing HuFeb 27, 2021
  4. Junio C HamanoFeb 25, 2021
  5. ZheNing HuFeb 27, 2021
  6. Đoàn Trần Công DanhMar 17, 2021
  7. Junio C HamanoMar 17, 2021
  8. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 1, 2021
  9. Junio C HamanoMar 3, 2021
  10. Denton LiuMar 3, 2021
  11. Junio C HamanoMar 4, 2021
  12. ZheNing HuMar 4, 2021
  13. Eric SunshineMar 4, 2021
  14. Denton LiuMar 4, 2021
  15. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 4, 2021
  16. Denton LiuMar 4, 2021
  17. ZheNing HuMar 5, 2021
  18. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 5, 2021
  19. Eric SunshineMar 15, 2021
  20. ZheNing HuMar 16, 2021
  21. Eric SunshineMar 16, 2021
  22. Junio C HamanoMar 17, 2021
  23. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 16, 2021
  24. Eric SunshineMar 16, 2021
  25. ZheNing HuMar 17, 2021
  26. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 18, 2021
  27. Eric SunshineMar 19, 2021
  28. ZheNing HuMar 19, 2021
  29. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 19, 2021
  30. Junio C HamanoMar 19, 2021
  31. ZheNing HuMar 20, 2021
  32. Junio C HamanoMar 19, 2021
  33. ZheNing HuMar 20, 2021
  34. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 20, 2021
  35. Junio C HamanoMar 20, 2021
  36. ZheNing HuMar 21, 2021
  37. Eric SunshineMar 21, 2021
  38. Junio C HamanoMar 21, 2021
  39. Eric SunshineMar 21, 2021
  40. Denton LiuMar 24, 2021
  41. ZheNing HuMar 21, 2021
  42. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 21, 2021
  43. Eric SunshineMar 23, 2021
  44. Junio C HamanoMar 23, 2021
  45. ZheNing HuMar 23, 2021
  46. ZheNing HuMar 23, 2021
  47. format-patch: allow a non-integral version numbersZheNing Hu via GitGitGadget, Mar 23, 2021
  48. Eric SunshineMar 24, 2021
  49. ZheNing HuMar 24, 2021

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.