git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Problem with Git rev-list output

From
CACrabtree, Andrew <andrew.crabtree@hp.com>
Date
Aug 12, 2014, 01:10 UTC
Message-ID
<B82B660D4887C042850326C2BC65FE035D5151C3@G9W0768.americas.hpqcorp.net>
I'm seeing some oddity in one of my repositories where the root commit is being output in 'rev-list' even when I pass in a reference that should exclude it from being output.
I've attempted to reproduce the issue in a test environment but so far have failed at that.
Problem details below as best as I can capture them.  
Seeing the issue with versions of git from 1.7 to 2.1.

Thanks, -Andrew

The root commit is here 

me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git cat-file -p 848de9c422c01c1f724d5c3f615bec476911f59f tree 5be87811b44f560159d9bb6a10a9fe9bd59147b9 author Migration Script <migration@gaia.rose.hp.com> 1318778853 -0700 committer Gustavo Mora Corrales <gustavo.mora.corrales@hp.com> 1318778853 -0700

Initial synchronization commit me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git --version git version 2.1.0.rc2.3.g67de23d me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git merge-base WALLE-J-14-60-GIT_07-DEC-2011 samrom_t4a 848de9c422c01c1f724d5c3f615bec476911f59f me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list 848de9c422c01c1f724d5c3f615bec476911f59f 848de9c422c01c1f724d5c3f615bec476911f59f me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list WALLE-J-14-60-GIT_07-DEC-2011 | wc -l 2132 me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list samrom_t4a | wc -l 316 me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list WALLE-J-14-60-GIT_07-DEC-2011 samrom_t4a | wc -l 2447

# commit is reachable from both references as expected 

me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list WALLE-J-14-60-GIT_07-DEC-2011 | grep 848de9c422c01c1f724d5c3f615bec476911f59f 848de9c422c01c1f724d5c3f615bec476911f59f me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list samrom_t4a | grep 848de9c422c01c1f724d5c3f615bec476911f59f 848de9c422c01c1f724d5c3f615bec476911f59f

# Here -I would have expected --preceding the SHA with -boundary specified me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list --boundary WALLE-J-14-60-GIT_07-DEC-2011 samrom_t4a | grep 848de9c422c01c1f724d5c3f615bec476911f59f 848de9c422c01c1f724d5c3f615bec476911f59f

# here I don't expect the SHA to show up with either command line. me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list WALLE-J-14-60-GIT_07-DEC-2011 ^samrom_t4a | grep 848de9c422c01c1f724d5c3f615bec476911f59f 848de9c422c01c1f724d5c3f615bec476911f59f me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$ git rev-list samrom_t4a ^WALLE-J-14-60-GIT_07-DEC-2011 | grep 848de9c422c01c1f724d5c3f615bec476911f59f me@myvm:/pnb/software/userrepos/cache/t4_ghs.git (BARE:titan4_v14_a)$

Message 1 of 1 in “Problem with Git rev-list output”
  1. Crabtree, AndrewAug 12, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.