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

git grep doesn't follow symbolic link

From
BBBertrand BENOIT <projettwk@users.sourceforge.net>
Date
Jan 9, 2012, 16:54 UTC
Message-ID
<CAPRVejc7xND_8Y=Pb5rYGEcaKYUaX7_WkSro-_EL8tTGxkfY3Q@mail.gmail.com>
Hi,
I've not found information about that in documentation, so I do a report.

When using git grep, symbolic links are not followed. Is it a wanted behavior ?

I've tested with a symbolic link:
 - 'ignored'
 - NOT staged for commit
 - to be commited
 - commited
Anytime -> no result when asking on symbolic link

Example: # git grep foo mySrc -> OK answer [...]

# ln -s mySrc test # git grep foo test -> KO: No answer

# git add test # git grep foo test -> KO: No answer

# git commit -m "DO NOT PUSH" test # git grep foo test -> KO: No answer

Best Regards, Bertrand

Next: Ramkumar Ramachandra
Message 1 of 10 in “git grep doesn't follow symbolic link”
  1. Bertrand BENOITJan 9, 2012
  2. Ramkumar RamachandraJan 10, 2012
  3. Thomas RastJan 10, 2012
  4. Junio C HamanoJan 10, 2012
  5. Nguyen Thai Ngoc DuyJan 14, 2012
  6. Junio C HamanoJan 15, 2012
  7. Nguyen Thai Ngoc DuyJan 15, 2012
  8. Junio C HamanoJan 16, 2012
  9. Nguyen Thai Ngoc DuyJan 17, 2012
  10. Junio C HamanoJan 17, 2012

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.