当前位置:   article > 正文

使用git查看patch文件的统计信息_patch的行数怎么看

patch的行数怎么看

1)使用 git apply --stat可以查看一个 patch 文件的统计信息,如下所示:

$ git apply --stat 0001-vdpa-mlx5-introduce-Mellanox-vDPA-driver.patch
 MAINTAINERS                                     |    7 +
 config/common_base                              |    5 
 doc/guides/rel_notes/release_20_02.rst          |    5 
 doc/guides/vdpadevs/features/mlx5.ini           |   14 +
 doc/guides/vdpadevs/index.rst                   |    1 
 doc/guides/vdpadevs/mlx5.rst                    |  111 +++++++++++
 drivers/common/Makefile                         |    2 
 drivers/common/mlx5/Makefile                    |   17 +-
 drivers/meson.build                             |    8 +
 drivers/vdpa/Makefile                           |    2 
 drivers/vdpa/meson.build                        |    3 
 drivers/vdpa/mlx5/Makefile                      |   51 +++++
 drivers/vdpa/mlx5/meson.build                   |   33 +++
 drivers/vdpa/mlx5/mlx5_vdpa.c                   |  234 +++++++++++++++++++++++
 drivers/vdpa/mlx5/mlx5_vdpa_utils.h             |   20 ++
 drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map |    3 
 mk/rte.app.mk                                   |   15 +
 17 files changed, 514 insertions(+), 17 deletions(-)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

2)如果要查看某个 commit 的统计信息,可以使用 git show --stat,如下所示:

$ git show --stat 83fcaa37fe82555e4b9d3dc726882aef259780b9
commit 83fcaa37fe82555e4b9d3dc726882aef259780b9
Author: Bing Zhao <bingz@nvidia.com>
Date:   Mon May 17 18:18:41 2021 +0300

    net/mlx5: fix loopback for Direct Verbs queue
    ...    
    Signed-off-by: Bing Zhao <bingz@nvidia.com>
    Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

 drivers/net/mlx5/linux/mlx5_os.c    |   5 ++++-
 drivers/net/mlx5/linux/mlx5_verbs.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/mlx5/linux/mlx5_verbs.h |   2 ++
 drivers/net/mlx5/mlx5.h             |  11 +++++++++++
 drivers/net/mlx5/mlx5_devx.c        |   2 ++
 drivers/net/mlx5/mlx5_trigger.c     |  10 ++++++++++
 6 files changed, 150 insertions(+), 1 deletion(-)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/652623
推荐阅读
相关标签
  

闽ICP备14008679号