From: Mason <slash.tmp@free.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Salvaging borked project history
Date: Thu, 26 Feb 2015 12:54:51 +0100 [thread overview]
Message-ID: <54EF098B.4080803@free.fr> (raw)
In-Reply-To: <xmqq7fv8to7e.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> But I personally think "git am -3" may be easier to handle.
Thanks! At least now, I see the light at the end of the tunnel.
I fetched linux-stable.git inside our repo.
I created ~300 patches using git format-patch -1 in a loop.
I can now run 'git am --3way $IGNORE *.patch'
IGNORE is used to --exclude the directories I'm not interested in.
Note: it seems --exclude=arch/mips and --exclude=arch/mips/ are
not sufficient, I need to write --exclude=arch/mips/* for git-apply
to ignore changes to files inside arch/mips.
Is that expected behavior?
Another nit: if a patch contains only changes to files inside arch/mips
then git-apply will create an "empty commit" (one with no diff). Is there
an option to say "skip empty patches"?
One more thing: "regular" diff -q returns 0 when the files are identical,
and 1 when they differ. It seems git diff -s does not have that behavior.
Is that by design?
If there is no option to skip empty patches, I'm thinking I can script
a fixup step to squash all empty commits. What do you think?
Regards.
next prev parent reply other threads:[~2015-02-26 11:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 17:05 Salvaging borked project history Mason
2015-02-23 19:36 ` Junio C Hamano
2015-02-26 11:54 ` Mason [this message]
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=54EF098B.4080803@free.fr \
--to=slash.tmp@free.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).