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

Re: [PATCH 4/6] range-diff: combine all options in a single data structure

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 5, 2021, 14:13 UTC
Message-ID
<nycvar.QRO.7.76.6.2102051513050.54@tvgsbejvaqbjf.bet>
In-Reply-To
<CAPig+cSNCVT8h-wFBGvDWB4u0OUQM-Q-1DwuLepnjTdwEpk_4A@mail.gmail.com>
Hi Eric,
On Thu, 4 Feb 2021, Eric Sunshine wrote:
Show 29 quoted lines
> On Thu, Feb 4, 2021 at 3:24 PM Johannes Schindelin via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> > This will make it easier to implement the `--left-only` and
> > `--right-only` options.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> > diff --git a/range-diff.h b/range-diff.h
> > @@ -6,15 +6,20 @@
> > +struct range_diff_options {
> > +       int creation_factor;
> > +       unsigned dual_color:1;
> > +       const struct diff_options *diffopt;
> > +       const struct strvec *other_arg;
> > +};
> > +
> >  /*
> >   * Compare series of commits in RANGE1 and RANGE2, and emit to the
> >   * standard output.  NULL can be passed to DIFFOPT to use the built-in
> >   * default.
> >   */
> >  int show_range_diff(const char *range1, const char *range2,
> > -                   int creation_factor, int dual_color,
> > -                   const struct diff_options *diffopt,
> > -                   const struct strvec *other_arg);
> > +                   struct range_diff_options *opts);
>
> The function comment's mention of DIFFOPT becomes outdated with this
> change. Perhaps update it to say `opts.diffopt` or something.
I actually moved the comment to the new `struct`.

Thanks, Dscho

Previous: Eric SunshineNext: Johannes Schindelin via GitGitGadget
Message 7 of 22 in “Optionally restrict range-diff output to "left" or "right" range only”
  1. 0/6 Optionally restrict range-diff output to "left" or "right" range onlyJohannes Schindelin via GitGitGadget, Feb 4, 2021
  2. 3/6 range-diff: simplify code spawning `git log`Johannes Schindelin via GitGitGadget, Feb 4, 2021
  3. 1/6 range-diff: avoid leaking memory in two error code pathsJohannes Schindelin via GitGitGadget, Feb 4, 2021
  4. 2/6 range-diff: libify the read_patches() function againJohannes Schindelin via GitGitGadget, Feb 4, 2021
  5. 4/6 range-diff: combine all options in a single data structureJohannes Schindelin via GitGitGadget, Feb 4, 2021
  6. Eric SunshineFeb 4, 2021
  7. Johannes SchindelinFeb 5, 2021
  8. 6/6 range-diff: offer --left-only/--right-only optionsJohannes Schindelin via GitGitGadget, Feb 4, 2021
  9. 5/6 range-diff: move the diffopt initialization down one layerJohannes Schindelin via GitGitGadget, Feb 4, 2021
  10. Junio C HamanoFeb 4, 2021
  11. Taylor BlauFeb 4, 2021
  12. Junio C HamanoFeb 5, 2021
  13. Jeff KingFeb 5, 2021
  14. Johannes SchindelinFeb 8, 2021
  15. Taylor BlauFeb 5, 2021
  16. 0/6 Optionally restrict range-diff output to "left" or "right" range onlyJohannes Schindelin via GitGitGadget, Feb 5, 2021
  17. 3/6 range-diff: simplify code spawning `git log`Johannes Schindelin via GitGitGadget, Feb 5, 2021
  18. 5/6 range-diff: move the diffopt initialization down one layerJohannes Schindelin via GitGitGadget, Feb 5, 2021
  19. 2/6 range-diff: libify the read_patches() function againJohannes Schindelin via GitGitGadget, Feb 5, 2021
  20. 6/6 range-diff: offer --left-only/--right-only optionsJohannes Schindelin via GitGitGadget, Feb 5, 2021
  21. 1/6 range-diff: avoid leaking memory in two error code pathsJohannes Schindelin via GitGitGadget, Feb 5, 2021
  22. 4/6 range-diff: combine all options in a single data structureJohannes Schindelin via GitGitGadget, Feb 5, 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.