git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Salvaging borked project history
@ 2015-02-23 17:05 Mason
  2015-02-23 19:36 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Mason @ 2015-02-23 17:05 UTC (permalink / raw)
  To: git

Hello everyone,

Here's the situation:

Back in 2012, we cloned a MIPS repo, which was itself a clone of
a 3.4.2 kernel with ~40 MIPS-specific patches applied.

Then the devs started pushing patches; and once in a while, the
maintainer would "sync" with the mainline kernel. I don't know
what tool he used to sync, but he discarded the original patches
doing so, and git blame now shows him as the author of every
mainline change since the clone.

Now that we are moving to a more recent kernel, I'm trying to
"fix" this situation, i.e. I'd like kernel code to have proper
attribution in git blame, while keeping intact the information
for "internal" commits.

While I'm at it, I want to minimize history by ignoring patches
that are now irrelevant:

1) we don't support MIPS anymore, I want to ignore any internal
change we made in the arch/mips directory

2) for some reason, there was a large amount of create/delete churn
in arch/arm/configs; so I want to ignore our changes, and I'll commit
an acceptable config when the process is complete.

3) ignore some internal platform-specific patches

(NB: All these "ignores" are for internal patches, not mainline patches)

Sooo, using git log and grep, I came up with a list of ~300 patches I'd
like to apply on top of the latest 3.14 kernel. For testing purposes,
I used git format-patch on the oldest of my 300 patches.

I then made a shiny new clone of linux-stable.git, and tried using git am
to apply that patch to the tip of linux-stable, expecting having to solve
a few dozens conflicts, and move on (hoping to automate it at some point).

But 'git am' just gave up. Small sample of errors:

error: patch failed: drivers/block/Kconfig:411
error: drivers/block/Kconfig: patch does not apply
error: drivers/tty/serial/8250/8250.c: does not exist in index
error: patch failed: drivers/tty/serial/8250/8250_early.c:121
error: drivers/tty/serial/8250/8250_early.c: patch does not apply
error: patch failed: drivers/video/Kconfig:101
error: drivers/video/Kconfig: patch does not apply
...
Patch failed at 0001 Commit for supporting Sigma Designs' SoCs.
The copy of the patch that failed is found in:
    .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

How do I "resolve this problem".

I suppose I am doing this the wrong way.
What is the correct way to do it?
(I'm using git 2.3)

Should I use git am -3 in the original repo?

Regards.

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

end of thread, other threads:[~2015-03-04 14:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 17:05 Salvaging borked project history Mason
2015-02-23 19:36 ` Junio C Hamano
2015-02-26 11:54   ` Mason
2015-02-26 18:56     ` Junio C Hamano
2015-02-26 20:25       ` Mason
2015-02-26 21:28         ` Junio C Hamano
2015-02-26 23:47           ` Mason
2015-02-26 23:54             ` Junio C Hamano
2015-03-04 14:49         ` Mason

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).