git系列-----git server上下载patch并打上

  首先在server上找到相应的提交,然后点击进去发现页面的右上角有个download选项,点击发现

Patch-File
7a21c24.diff.base64 | 7a21c24.diff.zip

然后直接点击这个zip,浏览器会直接下载这个patch,然后打开patch文件


diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp

这样看就知道应该把patch放在services之上的目录也就是native,然后在native目录下这么搞


matthew@matthew:/media/matt2/8937-evb-1/frameworks/native$ git apply --reject < /media/matt2/8937-evb--1/frameworks/native/7a21c244.diff




<stdin>:48: trailing whitespace.
AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY);
<stdin>:76: trailing whitespace.
&&((mCurrentVirtualKey.keyCode == 4)||(mCurrentVirtualKey.keyCode == 187))) 
<stdin>:90: trailing whitespace.
if (!isPointInsideSurface(pointer.x, pointer.y)) 
<stdin>:92: trailing whitespace.
 
<stdin>:100: trailing whitespace.
 
Checking patch services/inputflinger/InputReader.cpp...
Hunk #1 succeeded at 2739 (offset 3 lines).
Hunk #2 succeeded at 4236 (offset 3 lines).
Hunk #3 succeeded at 4287 (offset 3 lines).
Hunk #4 succeeded at 4297 (offset 3 lines).
Checking patch services/inputflinger/InputReader.h...
Applied patch services/inputflinger/InputReader.cpp cleanly.
Applied patch services/inputflinger/InputReader.h cleanly.
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.
matthew@matthew:/media/matt2/8937-evb-1/frameworks/native$ git status
# On branch qcom/8937/a601/evb
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   services/inputflinger/InputReader.cpp
# modified:   services/inputflinger/InputReader.h
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# 7a21c244.diff
no changes added to commit (use "git add" and/or "git commit -a")
matthew@matthew:/media/matt2/8937-evb-1/frameworks/native$ 

这样就把服务器上的patch拉下来后打上去了




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值