• git patch


    [root@localhost libxml2]# patch -pn < 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    patch: **** strip count n is not a number
    [root@localhost libxml2]# git apply --stat 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
     parser.c |    4 ++++
     1 file changed, 4 insertions(+)
    [root@localhost libxml2]# it apply --check   0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    -bash: it: command not found
    [root@localhost libxml2]# git apply --check   0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    error: patch failed: parser.c:4955
    error: parser.c: patch does not apply
    [root@localhost libxml2]# git am --signoff < 0001-fix-parser-termination-from-Double-hyphen-within-com.patch 
    Applying: fix parser termination from "Double hyphen within comment" error.
    error: patch failed: parser.c:4955
    error: parser.c: patch does not apply
    Patch failed at 0001 fix parser termination from "Double hyphen within comment" error.
    The copy of the patch that failed is found in:
       /data1/cloud_images/libxml2/.git/rebase-apply/patch
    When you have resolved this problem, run "git am --resolved".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".
    [root@localhost libxml2]# 
    打入 patch / diff:
    git apply xxx.patch
    git apply xxx.diff
    检查 patch / diff:
    git apply --check xxx.patch
    git apply --check xxx.diff
    若git和需要打patch的文件不在一个目录:(git在framework下,patch要打入frameworks/base/下)
    git apply --check --directory=base/ xxx.patch
    git apply --directory=base/ xxx.patch
    ** git am 后面会说到,以及生产patch和打入patch的一些命令参数**
    1. 检查patch是否可用,没显示文字,就说明可用,且无冲突;
      git apply --check ~/patch/patch/0001-add-11111.patch


     
    链接:https://www.jianshu.com/p/e5d801b936b6
     
  • 相关阅读:
    [转]如何烧录tizen镜像文件?(图文教程)
    [转]如何制作tizen镜像文件(图文教程)?
    [转]如何下载tizen源码(图文教程)?
    [转]如何编译tizen源码(图文教程)?
    uclibc,eglibc,glibc之间的区别和联系
    Create a Bootable MicroSD Card
    [Tizen]Creating a Tizen Platform Image from Scratch through Local Build
    OpenSSL加解密
    [20个项目学会BBC micro:bit编程] 11-模拟舵机控制实验
    【BBC micro:bit基础教程】10-micro:bit操作电位计(滑动变阻器)
  • 原文地址:https://www.cnblogs.com/dream397/p/13927737.html
Copyright © 2020-2023  润新知