[plt-dev] Re: generating patches

From: Eli Barzilay (eli at barzilay.org)
Date: Wed May 26 23:50:59 EDT 2010



On May 26, Štěpán Němec wrote:
> 
> Matthew Flatt <mflatt-sDh8Nw2yj/+Vc3sceRu5cw at public.gmane.org> writes:
> 
> > At Tue, 25 May 2010 19:33:31 -0400, David Van Horn wrote:
> >> How do I generate a patch from changes to my local git branch of the 
> >> racket sources?  If I just use git diff -p I don't see any of the files 
> >> I added; only the changes to the existing files.  For the files I added, 
> >> I did a git add and git commit, but I still don't see the contents in 
> >> git diff.
> >
> > It's easiest to use
> >
> >   git format-patch <since-SHA1>

Also, you can use `send-email' to have git send the patches itself.
See also "Patch-based workflow: instructions for the patch sender
side" in tmp.barzilay.org/git.txt -- it still needs a few improvements
once we get more experience using it.


> > Without any arguments, `git diff' tells you about added but
> > not-yet-committed changes.
> 
> No, `git diff' tells you about the changes that were not even added,
> i.e. changes in the work tree (as opposed to the index/staging
> area). If you want to see the added (i.e. to-be-committed, in the
> index) changes, you have to use `git diff --cached'.

Yeah -- and an easier to remember flag is `--staged'.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!




Posted on the dev mailing list.