From: Mason <slash.tmp@free.fr>
To: git <git@vger.kernel.org>
Subject: Salvaging borked project history
Date: Mon, 23 Feb 2015 18:05:27 +0100 [thread overview]
Message-ID: <54EB5DD7.7050202@free.fr> (raw)
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.
next reply other threads:[~2015-02-23 17:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 17:05 Mason [this message]
2015-02-23 19:36 ` Salvaging borked project history 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54EB5DD7.7050202@free.fr \
--to=slash.tmp@free.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).