浏览代码

fix comments

Peter Rowlands 4 年之前
父节点
当前提交
0e20ee811c
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      dulwich/line_ending.py

+ 4 - 5
dulwich/line_ending.py

@@ -36,9 +36,10 @@ normalization is done on write depends on whether or not the file in the
 working dir has also been normalized on read:
 
 - For autocrlf=true all files are always normalized on both read and write.
-- For autocrlf=input files are only normalized once - whenever a new file is
-  added to the index. Since files which already exist in the index are
-  unmodified on read, they are also left unmodified upon subsequent writes.
+- For autocrlf=input files are only normalized on write if they are newly
+  "added". Since files which are already committed are not normalized on
+  checkout into the working tree, they are also left alone when staging
+  modifications into the index.
 
 One thing to know is that Git does line-ending normalization only on text
 files. How does Git know that a file is text? We can either mark a file as a
@@ -242,8 +243,6 @@ class BlobNormalizer(object):
 
     def checkin_normalize(self, blob, tree_path):
         """Normalize a blob during a checkin operation"""
-        # Existing files should only be normalized on checkin if it was
-        # previously normalized on checkout
         if self.fallback_write_filter is not None:
             return normalize_blob(
                 blob, self.fallback_write_filter, binary_detection=True