代码之家  ›  专栏  ›  技术社区  ›  corroded

git格式修补程序限制?

git
  •  1
  • corroded  · 技术社区  · 15 年前


    What is the best way to git patch a subrange of a branch? ")

    所以我做了一个变通方法:

    • git format-patch 犯下的罪行
    • 删除多余的文件。

    很脏的东西,但更容易做。
    所以我做了一个

    git format-patch -66
    

    (我要找的任务是66个任务)

    问题是它一直停在047
    有什么好处? 我能生成的补丁有限制吗?

    1 回复  |  直到 8 年前
        1
  •  3
  •   Community CDub    8 年前

    这个 -<n> 选择 git format-patch 有点棘手,就像 this thread illustrates Jakub Narębski :

    -<n> '传递给 rev-list / log 发电机械, 它限制了 提交

    如果其中一些提交是合并提交(不能表示为修补程序),则它生成的修补程序的数量少于指定的数量 <n> (正如你在 我提供的例子,在哪里 <n>

    pu )它不能生成修补程序。

    聚氨基甲酸酯 public branch of the git-scm repo .)


    Jakub继续提出以下解决方案:

    更新 git-format-patch 文档中说“提交”而不是“补丁”,
    也可以大声说出我们正在跳过的提交,这样我的示例就会如下所示:

     $ git format-patch -3
     0001-gitweb-Prepare-for-splitting-gitweb.txt
     0002-gitweb-Create-Gitweb-Git-module.txt
     Skipping merge commit: Merge branch 'maint'
    

    ,其中 Ramkumar Ramachandra proposes last August (2010) to write a patch .

    你可以看到这片热气腾腾 September 2010 what's cooking in git.git

    [新主题]

    rr/format-patch-count-without-merges (2010-08-28)2份
    format-patch :不检查合并提交
    - t4014-format-patch :在提交前调用test\u tick

    what's cooking (Sept. 27th) [Cooking] 节,带有以下注释: