简体   繁体   English

git日志在分支节点上时丢失

[英]git logs are missing when they are on the branching node

Let's see if I can describe this well. 让我们看看我能否很好地描述这一点。 We are using GitFlow so we have a DEV branch and the developers have feature branches. 我们正在使用GitFlow,所以我们有一个DEV分支,而开发人员有一个功能分支。 They make PRs and QA completes the PRs based on availability. 他们进行PR,QA根据可用性完成PR。 That gets branched to a QA_Release that gets built and deployed. 分支到构建和部署的QA_Release。

Anyway, I have noticed that if someone builds the DEV branch (which gets tagged with a build number) then I branch to a QA_Release and build that (which gets tagged with the next build number) when I try to get the log comments I miss the PR that was on the node that got branched. 无论如何,我已经注意到,如果有人构建DEV分支(使用构建编号标记),则当我尝试获取我错过的日志注释时,我会分支到QA_Release并构建(使用下一个构建编号标记)。分支的节点上的PR。

1(tag)   2(tag)
|________x_________
          \________
                  |
                  3(tag)

If the commit at x gets built and tagged then branched when I do 'git log 2..3' the PR description from 2 doesn't show. 如果在x处的提交已建立并标记,然后在执行“ git log 2..3”时分支,则不会显示2的PR描述。 If I use 'git log 2~..3' it shows. 如果我使用“ git log 2〜..3”,它将显示。

Is that supposed to be happening? 那应该发生吗?

That is basically how commit ranges work. 基本上,这就是提交范围的工作方式。

When you say this: 当你这样说:

A..B

You actually say this: 您实际上是这样说的:

^A B

Which means "everything that is reachable from B, excluding everything that is reachable from A". 这意味着“从B可以到达的所有内容,不包括从A可以到达的所有内容”。 This last part includes A, so thus it is not part of the log. 最后一部分包括A,因此它不是日志的一部分。

When you say "2~", you say "Parent of 2", thus you say "... excluding everything that is reachable from the parent of 2". 当您说“ 2〜”时,您说的是“ 2的父母”,因此您说“ ... ...排除了2的父母可以到达的所有事物”。 This does not include 2. 还不包括2。

Please note that this has nothing to do with gitflow, nor with your branches or pull requests, that's just how the double dot syntax works. 请注意,这与gitflow无关,也与您的分支或请求请求无关,这就是双点语法的工作方式。

You can read the documentation for the range here: 您可以在此处阅读有关范围的文档:

The .. (two-dot) Range Notation ..(两点)范围符号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM