linux克隆后重新封装,克隆后立即在OSX上修改Linux内核源代码
當我在OS X上克隆
Linux源代碼時,它們會立即被更改,并且git reset –hard不會將內容恢復.這是一個完整的會議:
$git clone git://github.com/torvalds/linux.git
$cd linux
$git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: include/uapi/linux/netfilter/xt_CONNMARK.h
modified: include/uapi/linux/netfilter/xt_DSCP.h
modified: include/uapi/linux/netfilter/xt_MARK.h
modified: include/uapi/linux/netfilter/xt_RATEEST.h
modified: include/uapi/linux/netfilter/xt_TCPMSS.h
modified: include/uapi/linux/netfilter_ipv4/ipt_ECN.h
modified: include/uapi/linux/netfilter_ipv4/ipt_TTL.h
modified: include/uapi/linux/netfilter_ipv6/ip6t_HL.h
modified: net/netfilter/xt_DSCP.c
modified: net/netfilter/xt_HL.c
modified: net/netfilter/xt_RATEEST.c
modified: net/netfilter/xt_TCPMSS.c
no changes added to commit (use "git add" and/or "git commit -a")
我們可以看到,克隆后文件立即發生了變化.甚至不是他們的元數據,而是內容:
git diff include/uapi/linux/netfilter_ipv6/ip6t_HL.h
index ebd8ead..6e76dbc 100644
--- a/include/uapi/linux/netfilter_ipv6/ip6t_HL.h
+++ b/include/uapi/linux/netfilter_ipv6/ip6t_HL.h
@@ -1,6 +1,6 @@
-/* Hop Limit modification module for ip6tables
+/* ip6tables module for matching the Hop Limit value
* Maciej Soltysiak
- * Based on HW's TTL module */
+ * Based on HW's ttl module */
#ifndef _IP6T_HL_H
#define _IP6T_HL_H
@@ -8,14 +8,14 @@
#include
enum {
- IP6T_HL_SET = 0,- IP6T_HL_INC,- IP6T_HL_DEC
+ IP6T_HL_EQ = 0,/* equals */
+ IP6T_HL_NE,/* not equals */
+ IP6T_HL_LT,/* less than */
+ IP6T_HL_GT,/* greater than */
};
-#define IP6T_HL_MAXMODE IP6T_HL_DEC
-struct ip6t_HL_info {
+struct ip6t_hl_info {
__u8 mode;
__u8 hop_limit;
};
系統信息:
>文件系統:Journaled HFS
>操作系統:OS X 10.11.5(15F34)
> git版本:2.9.0
>?/ .gitconfig只有[user]條目.
到底是怎么回事?為什么在克隆后立即修改文件?
總結
以上是生活随笔為你收集整理的linux克隆后重新封装,克隆后立即在OSX上修改Linux内核源代码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux 分割pdf,PDFBox分割
- 下一篇: 广技师17专插本c语言答案,广东技术师范