[FFmpeg-devel] switching to git - eventually?

Robert Swain robert.swain
Fri Jan 11 10:58:19 CET 2008


Hello,

On 07/01/2008, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Jan 07, 2008 at 02:11:54AM +0200, Uoti Urpala wrote:
> > On Sun, 2008-01-06 at 12:40 +0000, M?ns Rullg?rd wrote:
> > > - We must be reasonably confident developers know how to use git, or
> > >   there will be trouble.
> >
> > Getting more developers to access the svn repository through git-svn
> > could be a good first step.
>
> providing some idiot proof docs on how to set up git-svn with working push
> to svn would surely help here ...

Indeed. I have had to make a set of incremental, dependent patches
(i.e. apply them in order) myself and I decided to take the
opportunity to look at git. In some situations its a bit awkward but
here are some notes I made. I also have a query about the desired
format of diffs that I will elaborate after the notes.

(note: commands prefixed with $)

initial checkout:
$ git-clone git://git.mplayerhq.hu/ffmpeg ffmpeg-git

update:
$ git-pull

make some changes by mistake, revert to head on current branch:
$ git-reset --hard HEAD

make a branch:
$ git-branch <name of branch>

working on a series of incremental, dependent patches:
<edit some files making functional changes>
// commit changes locally - prompted for a commit message if EDITOR
env var is set
// else you could use the -m"Commit message here" option
$ git-commit -a
<edit some files making cosmetic changes>
$ git-commit -a
// prepare patches for e-mail submission
// (note: this creates the patches numbered and in order for easy submission)
$ git-format-patch -p origin

This is quite nice, however, the default output format of the diffs
includes some diffstat cruft (removable by using -p) and some subject
line, sender, date and some sort of hash cruft which I haven't figured
out how to remove. In a way, it could be nice if I was using git to
send the patches via e-mail, but I probably won't. Here's an example:

>From 2c1ff501a911f61251eb4ccd4e8f90386c178337 Mon Sep 17 00:00:00 2001
From: Robert Swain <rob at opendot.cl>
Date: Fri, 11 Jan 2008 09:06:52 +0000
Subject: [PATCH] Move Kaiser-Bessel Derived window generation to mdct.c

I set my user.name and user.email in the git config, hence why they're
filled in I suppose. I would like to remove those lines from the diff
and ideally have an output identical to svn diff. Is this possible or
even desirable?

> also providing a sandbox svn on mphq so devels can play with their git-svn
> stuff without too much stress for everyone would also help ...

That would be fun. I like making sandcastles and moats and stuff. *Rob
goes to get his bucket and spade.*

Rob



More information about the ffmpeg-devel mailing list