From: Linus Torvalds <torvalds@linux-foundation.org>
To: Marc Singer <elf@synapse.com>
Cc: git <git@vger.kernel.org>
Subject: Re: How do we import patches from non-git sources?
Date: Thu, 24 May 2007 14:45:47 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0705241439220.26602@woody.linux-foundation.org> (raw)
In-Reply-To: <1180017010.21181.2.camel@zealous.synapsedev.com>
On Thu, 24 May 2007, Marc Singer wrote:
>
> Is there a way to import patches that did not come from git? Remember
> that we'd like to include the functionality of git-am that adds new
> files to the index.
The normal thing to do is
git apply --index <patchfile>
which will apply a patch _and_ update the index, so that you can then just
do a simple
git commit -m "my message goes here" --author "the author goes here"
to create the commit, new (or deleted) files and all.
Of course, the reason the "normal" patch format is an email, and not
just a bare patch, is that an email contains so much more: it contains not
just the patch, but the authorship information and the commit message.
So basically:
- no, you _cannot_ just "commit" a patch, since a patch on its own
doesn't contain the required information to be a real commit.
- but yes, you can obviously _apply_ a patch, and then commit it once you
add the proper information, but that does require more information than
just the patch itself includes.
So hopefully that clarified things.
Linus
next prev parent reply other threads:[~2007-05-24 21:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 14:30 How do we import patches from non-git sources? Marc Singer
2007-05-24 15:29 ` Johannes Schindelin
2007-05-24 21:22 ` Yann Dirson
2007-05-25 11:24 ` Jakub Narebski
2007-05-24 21:45 ` Linus Torvalds [this message]
2007-06-06 17:37 ` Let me ask again: " Marc Singer
2007-06-06 17:54 ` J. Bruce Fields
2007-06-12 16:27 ` Marc Singer
2007-06-12 18:13 ` J. Bruce Fields
2007-06-14 1:45 ` Marc Singer
2007-06-06 17:58 ` Matthieu Moy
2007-06-06 18:18 ` Jon Loeliger
2007-06-14 1:49 ` Marc Singer
2007-06-14 7:53 ` Matthieu Moy
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=alpine.LFD.0.98.0705241439220.26602@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=elf@synapse.com \
--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).