Hi Junio, On Thu, Jun 16, 2011 at 12:13 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> writes: > >> 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? > I used to use it after reading the blog-post in [1]. >> ### 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. > Ooops, yeah missed the git commit command(s) :-(. Thanks for the pointer! > 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). > It's just an example... IIRC I really did "git format-patch --no-prefix -19" (extract last 19 commits). Hmmm, remember I got no "origine" for initial commit... >> ### 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@xxxxxxxxx> (15-Jun-2011) > - Sedat - [1] http://who-t.blogspot.com/2009/06/git-patches-from-tarballs.html -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html