kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Creating Patches
@ 2014-06-03 16:45 me storage
  2014-06-03 16:55 ` Valdis.Kletnieks at vt.edu
  2014-06-03 21:03 ` Bernd Petrovitsch
  0 siblings, 2 replies; 3+ messages in thread
From: me storage @ 2014-06-03 16:45 UTC (permalink / raw)
  To: kernelnewbies

Hi i have one doubt when creating patch files. if consider a file a.txt it
contains
This
is
a
simple
file.

i added to git and commit it.
Next i changed the file as
This
is
a
slightly more complex
file.

Again i added to git and commit it.
Now if i create a patch by using the below commands

git format-patch -n HEAD
git show HEAD > somepatch.patch

the contents in somepatch.patch are shown below

commit 0e1d77b66e708580a07530e8c1bf20546a701c6f
Author: <UserName> <xxxxxxxxx@gmail.com>
Date:   Tue Jun 3 22:02:57 2014 +0530

    Next Commit

diff --git a/a.txt b/a.txt
index 76e499a..c341c1c 100644
--- a/a.txt
+++ b/a.txt
@@ -1,5 +1,5 @@
 this
 is
 a
-simple
+slightly more complex file
 file.


My doubt is how to create patch file which contains the modifications only
i.e lines with "+" only why because for example initially if a file
contains 1000 rows after i changed 2 lines but in the patch file it is
taking entire 1000+2 lines.So is there any way to generate patch with only
modified lines?
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140603/763b1c4e/attachment.html 

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

end of thread, other threads:[~2014-06-03 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 16:45 Creating Patches me storage
2014-06-03 16:55 ` Valdis.Kletnieks at vt.edu
2014-06-03 21:03 ` Bernd Petrovitsch

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