Home > Gentoo > git-lkml for stupid people (like me)

git-lkml for stupid people (like me)

August 16th, 2007

OK, as Stephen recently asked why there is a double inclusion of in kernel/sysctl.c (and I asked Greg and Randy); I finally decided to write a patch to the LKML for possible inclusion.

But, git ain’t easy for people like me (who are used to the easiness of say – subversion or even cvs). So here’s what I did (thanks to Fernando for the help earlier today):

$ vim kernel/sysctl.c
// change something
$ git checkout -b sysctl
// create a new branch from your changes, based upon the master repository
$ git commit -a -s
// commit the changes to your newly created branch
$ git format-patch master..sysctl
// Enter a subject and then a separate description
// and you should have a new file in the current working directory starting like 0001-*.patch

Now you should have a mailable patch, ready to be sent upstream that looks like this:

From 839ce261cf688d62bebd9ae3a0101dd672018940 Mon Sep 17 00:00:00 2001
From: Christian Heim <phreak@gentoo.org>
Date: Sun, 19 Aug 2007 12:51:52 +0200
Subject: [PATCH] Remove double inclusion of linux/capability.h
 
Remove the second inclusion of linux/capability.h, which has been introduced
with "[PATCH] move capable() to capability.h" (or commit c59ede7b78db329949d9cdcd7064e22d357560ef).
 
Signed-off-by: Christian Heim <phreak@gentoo.org>
---
 kernel/sysctl.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
 
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8bdb8c0..9029690 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -27,7 +27,6 @@
 #include <linux/capability.h>
 #include <linux/ctype.h>
 #include <linux/utsname.h>
-#include <linux/capability.h>
 #include <linux/smp_lock.h>
 #include <linux/fs.h>
 #include <linux/init.h>
 
--
1.5.3.rc4

And if you wanna delete the branch afterwards again, just do this:

$ git checkout master
// Switch back to the master branch
$ git branch -D sysctl
// Delete the old branch named "sysctl"

Gentoo , , , ,

Comments are closed.