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

Re: Patch-level-format conversion

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 15, 2011, 22:13 UTC
Message-ID
<7v39jakajn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTim8bdVGo8u_HzZpE_5+xmPe_O+_Dw@mail.gmail.com>
Sedat Dilek <sedat.dilek@googlemail.com> writes:
Show 21 quoted lines
> I played a bit with git format-patch and git diff and got some helpful
> hints from friends of #grml and #quassel.de.
> Attached is the README.txt I produced some hours ago.
>
> Regards,
> - Sedat -
>
> Q: How to generate freetz-conform patches out of a GIT repository?
>
> A. Follow these instructions.
>
> ### Checkout freetz development branch
> svn co http://svn.freetz.org/trunk/ freetz-trunk
> cd freetz-trunk/
>
> ### Get latest revision
> revision=$(LC_ALL=C svn info | grep "Last Changed Rev" | awk {'print $4'})
> echo $revision
>
> ### Turn freetz-trunk source-dir into a GIT repository
> git add --ignore-errors ./ ; git commit -m "`basename $PWD` SVN revision $revision"

Wouldn't "add ./" add all the cruft in .svn (and its huge "pristine" subdirectory)? Why --ignore-errors?

Show 5 quoted lines
> ### Edit some files and save changes
> $EDITOR file1 file2
>
> ### Extract patchset
> git format-patch --no-prefix --no-numbered $FIRST..$LAST

You would need to record your own changes made by the $EDITOR step in commits before asking format-patch to make patch files out of them, but I do not see that step.

Also it is unclear how you determine $FIRST and $LAST. FIRST must name the commit that is the _parent_ of your first commit (i.e. your sample command line tells $FIRST to be excluded).

Show 7 quoted lines
> ### Some git format-patch options explained:
>       --no-prefix: Do not show any source or destination prefix.
>    -n, --numbered: Name output in [PATCH n/m] format, even with a single patch.
> -N, --no-numbered: Name output in [PATCH] format.
>
>
> - Sedat Dilek <sedat.dilek@gmail.com> (15-Jun-2011)
Previous: Sedat DilekNext: Sedat Dilek
Message 3 of 4 in “Re: Patch-level-format conversion”
  1. Jonathan NiederJun 15, 2011
  2. Sedat DilekJun 15, 2011
  3. Junio C HamanoJun 15, 2011
  4. Sedat DilekJun 15, 2011

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.