[lkml]   [2009]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] new -stable tag variant, Git workflow question

On Wed, 11 Nov 2009, James Bottomley wrote:
> The slight problem is that further down, to generate the patch the
> script uses git format-patch -k --stdout commit^..commit. For a merge
> commit, this will generate a patch equivalent to the entire branch that
> was merged, even though the commit message will only pick out some of
> these ... is this OK?

Don't do that.

Since you want to show a single commit, not a commit range, don't use
format-patch, use something like

git show --pretty=email -M --cc --stat $commit

instead. That will not show the difference between a commit and its
first parent (which for a merge diff is more than one commit, and can be
absolutely _huge_), but will show just the named commit (which for a merge
commit will usually be an empty diff, but will show how conflicts were
resolved if they weren't just taken from one or the other side).

(Of course, maybe you'll want to change the exact flags in question. For
example, '--stat' for merge commits is often useful, but only if the merge
was done by an upper-level maintainer. Anybody who does reverse merges
will just get totally meaningless diffstats, since the diffstat is always
done against the first parent, so anybody who does back-merges will see
the stat of everthing _I_ have merged in the meantime, which is generally
not useful)


 \ /
  Last update: 2009-11-18 23:46    [W:0.089 / U:6.572 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site