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

Re: [StGit PATCH] add option to import series directly from a tar archive

From
CWClark Williams <clark.williams@gmail.com>
Date
Sep 12, 2008, 12:57 UTC
Message-ID
<48CA674B.9080900@gmail.com>
In-Reply-To
<2008-09-12-14-21-13+trackit+sam@rfc1149.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Samuel Tardieu wrote:
Show 12 quoted lines
>>>>>> "Clark" == Clark Williams <clark.williams@gmail.com> writes:
> 
> Clark> [...] is to see if I can ease StGit's patch
> Clark> import rules a bit, since quilt accepts pretty much anything as
> Clark> long as there's a diff in there somewhere. I bomb out regularly
> Clark> importing the -rt series using StGit, because some people don't
> Clark> put complete email addresses in their patches.
> 
> Two things that would be great would be:
> 
>   - to be able to import patches with "-p0" (people not using git
>     often sends such patches)

I'm not sure how easy this is going to be. It looks like the patch is applied with 'git --apply' from the file stgit/git.py:apply_patch(). The default '-p' value is 1, so we'd have to figure out how to pass the 0 along and then get it into the apply_patch() function.

Show 6 quoted lines
> 
>   - to be able to find where the patch should be applied; I sometimes
>     receive patches for GCC directory "gcc/ada/", diffed from there,
>     and if StGit could see that the patch only makes sense there and
>     not at the top-level it would be great as well
> 

Zowie, I thought I only had to worry about folks sending patches with incomplete information. So you get patches to the ada compiler that are rooted in gcc/ada (e.g. patch in tarball says "./ChangeLog", instead of gcc/ada/ChangeLog) rather than at a top level? Only way I could see to deal with that would be to try and pass in the appropriate prefix from the command line.

My current plans are to clean up the first cut at the tarfile logic, then write a test to keep Karl happy, then try to come up with a way to deal with importing patches that don't have complete email addresses, no descriptions, etc. Once I get through that, I'll see if we can deal with weirdly rooted patch series.

Clark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkjKZ0sACgkQqA4JVb61b9eg2ACffDv+FXsL1NifMvxr1tbO2c3s Hc4AoJPb/RZJrpqT6QybeZrj8rNFJg1y =ccj/ -----END PGP SIGNATURE-----

Previous: Samuel TardieuNext: Samuel Tardieu
Message 6 of 10 in “add option to import series directly from a tar archive”
  1. add option to import series directly from a tar archiveClark Williams, Sep 7, 2008
  2. Karl HasselströmSep 8, 2008
  3. Clark WilliamsSep 8, 2008
  4. Karl HasselströmSep 8, 2008
  5. Samuel TardieuSep 12, 2008
  6. Clark WilliamsSep 12, 2008
  7. Samuel TardieuSep 12, 2008
  8. Karl HasselströmSep 12, 2008
  9. Karl HasselströmSep 12, 2008
  10. Karl HasselströmSep 12, 2008

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.