Search code examples
gitgerritrepo

git log command showing extra commits


I am running into following command git log project-1419...6d6f52c1228e70bcad026eb402d023ce3d5fd023 which shows following commits,the list shows commit edfcf238 tag: project-1419 which is already tagged to project-1419 ,why is it showing this commit?how to avoid this?

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

Solution

  • The syntax:

    project-1419...6d6f52c1228e70bcad026eb402d023ce3d5fd023
    

    means:

    • L = set(all commits reachable from whatever hash ID the string project-1419 translates to)
    • R = set(all commits reachable from 6d6f52c1228e70bcad026eb402d023ce3d5fd023)
    • Walk the symmetric difference of these two sets. That is, enumerate (L \ R) ∪ (R \ L).

    Informally, the set difference is all commits reachable from either commit, excluding all commits reachable from both. If project-1419 is a tag that resolves to commit edfcf238, it will definitely be in the L set. If it's not in the R set—something not visible from what you have shown us, except by implication—then it's in the symmetric difference.

    You may have intended the syntax:

    project-1419..6d6f52c1228e70bcad026eb402d023ce3d5fd023
    

    which calls for a simple set difference operation. Note that this syntax has two dots, rather than three.

    (Most Git commands that walk revision ranges use these two syntaxes these ways. The git rebase command doesn't; it treats three-dot specially, and does not allow two-dot syntax at all. The git diff command doesn't walk revision ranges in the first place and treats both syntaxes specially.)

    ("Syntaxes" is an odd plural. Arguably, it should be syntaces, but it isn't. See the other answer as well: there's a good argument here for using syntagma when talking about A..B and A...B.)