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

Re: Support for a series of patches, i.e. patchset or changeset?

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Nov 5, 2012, 13:39 UTC
Message-ID
<5097C190.80406@drmicha.warpmail.net>
In-Reply-To
<CAMPhdO_33CPJv2hAvPuJ10KZ7v_fgP9P2kV_WLVK2tapjQQ5=A@mail.gmail.com>
Eric Miao venit, vidit, dixit 05.11.2012 03:26:
Show 12 quoted lines
> Hi All,
> 
> Does anyone know if git has sort of support for a series of patches, i.e.
> a patchset or changeset? So whenever we know the SHA1 id of a single
> patch/commit, we know the patchset it belongs to. This is normal when
> we do big changes and split that into smaller pieces and doing only one
> simple thing in a single commit.
> 
> This will be especially useful when tracking and cherry-picking changes,
> i.e. monitoring on the changes of some specific files, and if a specific
> patch is interesting, we may want to apply the whole changeset, not only
> that specific one.

First of all, if you know the sha1 of a commit, then all its ancestors are determined by that. If you want to describe a set of patches, say based on rev1 and leading up to rev2, then the expression

rev2 ^rev1

describes that set uniquely. Often you can do without ^rev1, e.g. if you know that all patch series are developed bases on origin/master, then specifying rev2 is enough as "git rev-list rev2 ^origin/master" will give you all commits in the series (unless they have been integrated, i.e. merged).

Or are you thinking about patches "independent" of a base?

Cheers, Michael

Previous: Eric MiaoNext: Eric Miao
Message 2 of 13 in “Support for a series of patches, i.e. patchset or changeset?”
  1. Eric MiaoNov 5, 2012
  2. Michael J GruberNov 5, 2012
  3. Eric MiaoNov 5, 2012
  4. Michael J GruberNov 5, 2012
  5. Eric MiaoNov 6, 2012
  6. Johannes SixtNov 6, 2012
  7. Eric MiaoNov 6, 2012
  8. Johannes SixtNov 6, 2012
  9. Eric MiaoNov 7, 2012
  10. Jeff KingNov 8, 2012
  11. Eric MiaoNov 9, 2012
  12. Enrico WeigeltNov 10, 2012
  13. Eric MiaoNov 10, 2012

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.