git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [question] retrieve some patches from another repository
@ 2010-01-20  5:46 Crane Cai
  2010-01-20  6:23 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Crane Cai @ 2010-01-20  5:46 UTC (permalink / raw)
  To: git

Hi,

Sorry to disturb you. I know this mail list is mainly for git development. Till
now I have not found some normal user mail list, at last I choose it to ask a
question.

My target is:
repository A - linux upstream:
a->b->c->d->[merge from repository B]->e->f
repository B - a maintainer's tree:
x->y->z->[merge from repository A]->...
I want to retrieve the patches for one driver and its related
changes from commit "a" till maintainer's master.

So I do as this:
* git checkout repo B's master
* because maintainer's tree is derived from upstream point "a" will be included,
  use git format-patch repo a source-code-name

There are 2 issues in it:
* merge point will cause duplicated patch generated, for example repo B has x,
  y, z, then accepted by repo A in merge point, and then merge back to repo B
  (they are different with commit id), they will generate 2 twice.
* some commits do not only change the driver source code, and they change some
  other files also. Unfortunately git format-patch cut them. It cause compile
  error.

My question:
  Does some one know git have the ability to do it or do I need to do it
manually?


-- 
Best Regards,
- Crane

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [question] retrieve some patches from another repository
  2010-01-20  5:46 [question] retrieve some patches from another repository Crane Cai
@ 2010-01-20  6:23 ` Junio C Hamano
  2010-01-20  8:09   ` Crane Cai
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2010-01-20  6:23 UTC (permalink / raw)
  To: Crane Cai; +Cc: git

Crane Cai <crane.cai@amd.com> writes:

> * merge point will cause duplicated patch generated, for example repo B has x,
>   y, z, then accepted by repo A in merge point, and then merge back to repo B
>   (they are different with commit id), they will generate 2 twice.

This is inevitable, if 'x' and (say) 'b' corresponds to each other but has
textual changes due to different context.

> * some commits do not only change the driver source code, and they change some
>   other files also. Unfortunately git format-patch cut them. It cause compile
>   error.

You are probably running "format-patch a.. -- path/to/file.c".  Try giving
it the --full-diff option as well.  We've recently discussed to make it
the default for format-patch but the discussion thread petered out and
didn't reach conclusion.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [question] retrieve some patches from another repository
  2010-01-20  6:23 ` Junio C Hamano
@ 2010-01-20  8:09   ` Crane Cai
  0 siblings, 0 replies; 3+ messages in thread
From: Crane Cai @ 2010-01-20  8:09 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Hi Junio,

Thank you. It's my pleasure to get git maintainer's response.

On Tue, Jan 19, 2010 at 10:23:14PM -0800, Junio C Hamano wrote:
> > * merge point will cause duplicated patch generated, for example repo B has x,
> >   y, z, then accepted by repo A in merge point, and then merge back to repo B
> >   (they are different with commit id), they will generate 2 twice.
> 
> This is inevitable, if 'x' and (say) 'b' corresponds to each other but has
> textual changes due to different context.
So you mean git can not avoid generate 2 twice because they are different
commits. If I need this I will manually do it or add a new feature to let
format-patch can identify the relationship of the 2 repository, and then move
the 'since' point to avoid some point before merge.
Maybe it has value to do it. Many subsystem maintainers will easy to provide
patchset from any repository derived from linus to another repository which also
derived from linus. The patchset will let integration a little easy, you can use
'git bisect' to trace, git comments to understand the code. And all change list
is replayed, there almost no issue for integration.
> 
> 
> You are probably running "format-patch a.. -- path/to/file.c".  Try giving
> it the --full-diff option as well.  We've recently discussed to make it
> the default for format-patch but the discussion thread petered out and
> didn't reach conclusion.
Yes, you are right.

-- 
Best Regards,
- Crane

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-20  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20  5:46 [question] retrieve some patches from another repository Crane Cai
2010-01-20  6:23 ` Junio C Hamano
2010-01-20  8:09   ` Crane Cai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).