git log命令显示额外的提交

时间:2018-12-21 19:06:08

标签: git gerrit repo

我遇到了以下命令git log project-1419...6d6f52c1228e70bcad026eb402d023ce3d5fd023,该命令显示了以下提交,列表显示了已标记为edfcf238 tag: project-1419的提交project-1419,为什么显示此提交?如何避免这种情况? ?

usernames-MacBook-Pro-2:project gnakkala$ git log project-1419...6d6f52c1228e70bcad026eb402d023ce3d5fd023 --pretty=oneline --abbrev-commit --decorate --graph
* 6d6f52c1 (origin/Weekly_release) <change://issue/37959336> OSmilestone: 19A156 802.1X Test Cases failing due to security dialogue pop-up (STILL FAILING)
* 6b5e5efc <change://issue/46756098> tech menu shows 0 bars erroneously for current network if we don't have an IP address assigned
* e78e923a     <change://issue/46321911> APPLE80211_M_TCPKA_TIMEOUT is getting posted twice for each TCP keep-alive timeout instance
* 4bb5b8b7 <change://issue/45958314> OS Mojave clients not joining Wi-Fi after sleep
* 33a8eb85 <change://issue/46519151> CrashTracer: wps at wps: asl_init
* 68e7e73e <change://issue/46621429> [OSmilestone] 18B75/J130: tech menu locks up on first click: [CWInterface(Private) queryScanCacheWithChannels:ssidList:maxAge:maxMissCount:maxWakeCount:maxAutoJoinCount:error:]
* bfc30c11 <change://issue/46389983> [OSmilestone 19A362 + 11/30 release] projectd crashing while toggling between AWDL AirDrop and Legacy
* 78e09047 <change://issue/46472555> milestone19A366: techAgent process is leaking based on leaks testing.
* affc189a <change://issue/46431578> J90/18E151: Authentication repeatedly failing on AppletechSecure after upgrade install
* 51ef814c <change://issue/46420325> 18C45 techAgent using 800+ MB
* 6c5fd17a <change://issue/44946795> OS should call DE for ABC when projectd receives driver_availability with certain reason/subreason codes
* edfcf238 (tag: project-1419, origin/mac_wlan_12072018a) <change://issue/46389983> [OSmilestone 19A362 + 11/30 release] projectd crashing while toggling between AWDL AirDrop and Legacy

1 个答案:

答案 0 :(得分:1)

语法:

project-1419...6d6f52c1228e70bcad026eb402d023ce3d5fd023

表示:

  • L = set(所有提交都可以从字符串project-1419转换为的任何哈希ID到达
  • R = set(所有可从6d6f52c1228e70bcad026eb402d023ce3d5fd023到达的提交
  • 走这两个集合的symmetric difference。也就是说,枚举( L \ R )∪( R \ L )。

非正式地,设置的区别是任一提交都可访问的所有提交,不包括两者均可访问的所有提交。如果project-1419是解析为提交edfcf238的标签,则它肯定在 L 集中。如果它不在 R 集合中(除了暗示之外,从您看到的内容中看不到任何东西),那么它就处于对称差异中。

您可能已经打算使用语法:

project-1419..6d6f52c1228e70bcad026eb402d023ce3d5fd023

需要一个简单的设定差运算。请注意,此语法具有两个点,而不是三个。

(大多数遍历修订版本范围的Git命令以这种方式使用这两种语法。git rebase命令不使用;它专门对待三点语法,并且根本不允许两点语法。{{ 1}}命令首先不会遍历修订范围,并且会特别对待这两种语法。)

(“语法”是一个奇数复数。Arguably, it should be syntaces, but it isn't.也请参见其他答案:这里有一个很好的论据,当谈论git diff和{{ 1}}。)