Browse Source

HADOOP-11596. Allow smart-apply-patch.sh to add new files in binary git patches (raviprak)

Ravi Prakash 10 năm trước cách đây
mục cha
commit
13d1ba9965

+ 2 - 2
dev-support/smart-apply-patch.sh

@@ -38,8 +38,8 @@ is_git_diff_with_prefix() {
     fi
     if [[ "$line" =~ ^\+\+\+\  ]] ||
        [[ "$line" =~ ^\-\-\-\  ]]; then
-      if ! [[ "$line" =~ ^....[ab]/ ]]; then
-        return 1 # All +++ and --- lines must start with a/ or b/.
+      if ! [[ "$line" =~ ^....[ab]/ || "$line" =~ ^..../dev/null ]]; then
+        return 1 # All +++ and --- lines must start with a/ or b/ or be /dev/null.
       fi
     fi
   done < $1

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -612,6 +612,9 @@ Release 2.7.0 - UNRELEASED
 
     HADOOP-11522. Update S3A Documentation. (Thomas Demoor via stevel)
 
+    HADOOP-11596. Allow smart-apply-patch.sh to add new files in binary git
+    patches (raviprak)
+
   OPTIMIZATIONS
 
     HADOOP-11323. WritableComparator#compare keeps reference to byte array.