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

Re: [PATCH v3] [GSOC][RFC] format-patch: pass --left-only to range-diff

From
ZheNing Hu <adlternative@gmail.com>
Date
Mar 14, 2021, 02:37 UTC
Message-ID
<CAOLTT8RS_FDGEJZ-ogfMf-QJAUEkycju3757uTcQ+Tczub+gqQ@mail.gmail.com>
In-Reply-To
<CAOLTT8TT6rKdF-quS-t3X31PfQcrHPom4Rk5LcrMUBKha78MGg@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> 于2021年3月14日周日 上午10:16写道:
Show 32 quoted lines
>
> Junio C Hamano <gitster@pobox.com> 于2021年3月14日周日 上午7:23写道:
>
> >
> > Yes, it would be, but that is why you need to educate users what
> > causes it, and what the right way to avoid unrelated commits from
> > appearing, and how this --left-only fits in the solution.
> >
> > If some of the time, "--left-only T1...T2" would give you the same
> > result as the more strict "B1..T1 B2..T2", that may be why users may
> > want to use the "--left-only" instead as an easy/lazy alternative.
> >
> > But I suspect that it would give an incorrect result some of the
> > time---for example, in the above example, wouldn't one of the
> > commits labeled as 's' be completely hidden?  And if that is the
> > case, the end-user documentation would need to warn about it, and
> > explain that it is a easy/lazy alternative that can produce
> > incorrect result in the log message.
>
> Thanks, I will try to illustrate these issues in the document.
>
> My another thinking is:
> Since `--left-only` inhibits "B1..B2" and "B2..T2" ( let the user
> choose the left B1..T1 ), To some extent, `--right-only` can also
> add ( let the user choose the right B2..T2 ). A separate `--left-only`
> will be strange to the user ( If user call T2...T1 ). Since the
> `git rebase --apply` will internal call `git format-patch -k --stdout
> --full-index --cherry-pick --right-only ...`, I don't know what to deal
> with this `--right-only` yet, because I don't how to teach git to judge
> if the `--right-only` is pass from user or `git rebase --apply`, Is there
> any good way?  If can solve this problem,  the user can choose the left
> or right side of the free choice. (Or users don't need `--right-only?`)

Let me refute my own point just now :`--right-only` can not show "B2..T2", but "B1..T1", and it may be useful only when user want an inverted "T2...T1".

Previous: ZheNing HuNext: ZheNing Hu
Message 14 of 16 in “[GSOC][RFC] format-patch: pass --right-only to range-diff”
  1. [GSOC][RFC] format-patch: pass --right-only to range-diffZheNing Hu via GitGitGadget, Mar 7, 2021
  2. Taylor BlauMar 8, 2021
  3. ZheNing HuMar 9, 2021
  4. Junio C HamanoMar 12, 2021
  5. Junio C HamanoMar 12, 2021
  6. [GSOC][RFC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 9, 2021
  7. Eric SunshineMar 9, 2021
  8. ZheNing HuMar 9, 2021
  9. [GSOC][RFC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 9, 2021
  10. Junio C HamanoMar 12, 2021
  11. ZheNing HuMar 13, 2021
  12. Junio C HamanoMar 13, 2021
  13. ZheNing HuMar 14, 2021
  14. ZheNing HuMar 14, 2021
  15. ZheNing HuMar 14, 2021
  16. [GSOC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 14, 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.