是否有任何方法可以从diff文件中确定文件在diff之后是否包含更多内容

时间:2017-09-03 02:55:46

标签: git git-diff

例如,这是一个简单的差异:

diff --git a/.eslintrc.json b/.eslintrc.json
index 3badf81f..2cd7119b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,3 +14,4 @@
         "browser": true,
-        "node": true
+        "node": true,
+        "es6": true
     },
@@ -42,3 +43,3 @@
         "dot-location": ["error", "property"],
-        "dot-notation": ["error", {"allowKeywords": false}],
+        "dot-notation": ["error", {"allowKeywords": true}],
         "eol-last": ["error", "always"],
@@ -168,3 +169,3 @@
         "no-restricted-syntax": "off",
-        "no-return-assign": "error",
+        "no-return-assign": ["error", "except-parens"],
         "no-return-await": "error",
@@ -284,3 +285,3 @@
         "react/jsx-max-props-per-line": ["error", {"when": "multiline", "maximum": 1}],
-        "react/jsx-no-bind": "warn",
+        "react/jsx-no-bind": ["warn", {"ignoreRefs": true}],
         "react/jsx-no-comment-textnodes": "warn",
@@ -326,3 +327,3 @@
         "react/sort-comp": [
-            2,
+            0,
             {
@@ -331,2 +332,4 @@
                     "static-methods",
+                    "state",
+                    "properties",
                     "lifecycle",
@@ -345,6 +348,5 @@
                     "lifecycle": [
-                        "constructor",
                         "getDefaultProps",
                         "getInitialState",
-                        "state",
+                        "constructor",
                         "getChildContext",

为了使用&#34显示它,请参阅折叠代码"功能,我必须尝试确定差异的最后一行("getChildContext",行)之后是否有任何内容,是否有可靠的方法来存档?

0 个答案:

没有答案