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

Re: [PATCH v3] Documentation: specify base point when generating MyFirstContribution patchset

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2021, 17:09 UTC
Message-ID
<xmqqzgr6w97p.fsf@gitster.g>
In-Reply-To
<20211018124106.542050-1-bagasdotme@gmail.com>
Bagas Sanjaya <bagasdotme@gmail.com> writes:
Show 13 quoted lines
> Specifying base point (commit hash) can help reviewers and testers
> interested on the patchset. Mention how to record it with `--base`
> option to `format-patch`.
>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  Changes since v3 [1]:
>      - rewording (suggested by Glen)
>
>  I don't apply Junio's suggestion that use `--base=auto`, because in
>  most cases invocations of the option requires full hash of base object
>  and AFAIK people just do `git checkout -b` without specifying the
>  tracking option (`-t`).
That's actually quite sad, if it were true.

Our home, when we added "end-user/newbie friendly features" to "checkout" (credit goes to Dscho, IIRC), was actually most new people would not even have to say "-b" in the simplest tasks (instead they rely on "git checkout foo" gets turned into "git checkout -t -b foo origin/foo" by DWIMmery) and the fact that branch.autoSetupMerge defaulting to 'true' so that they get the @{u} and --base=auto support without even saying "-t" (as long as they do not explicitly decline with "--no-track" from the command line, that is).

> -$ git format-patch --cover-letter -o psuh/ master..psuh
> +$ git show -s --format="%H" master

I said this is not good in my previous response already and told you to teach merge-base, if we were not to use the --base=auto, didn't I?

The range given to format-patch, i.e. master..psuh, would be the correct range of commits to format, as long as you didn't rewind the local master branch.

But that does not mean master would always be the right base, does it? What if you had a work totally unrelated to the contents of this tutorial on the 'master' front? The person on the receiving end may not even know what object it refers to until you pushed your 'master' branch out.

Previous: Bagas SanjayaNext: Glen Choo
Message 2 of 5 in “Documentation: specify base point when generating MyFirstContribution patchset”
  1. Documentation: specify base point when generating MyFirstContribution patchsetBagas Sanjaya, Oct 18, 2021
  2. Junio C HamanoOct 18, 2021
  3. Glen ChooOct 18, 2021
  4. Re* [PATCH v3] Documentation: specify base point when generating MyFirstContribution patchsetJunio C Hamano, Oct 18, 2021
  5. Eric SunshineOct 19, 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.