Re Is Git Add Supposed to Work Like This (git 2.50)?
- From
K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
- Date
- Sep 7, 2025, 08:10 UTC
- Message-ID
- <20250907081014.17466-1-jayatheerthkulkarni2005@gmail.com>
- In-Reply-To
- <63045080-74d6-4835-9d9c-4d3558acdbfb@gmail.com>
To answer very shortly, "It is intended"
Reason: I don't exactly know if I am pointing to the right code lines
But if you dig into builtin/add.c you will find these lines
/* * Check the "pathspec '%s' did not match any files" block * below before enabling new magic. */ parse_pathspec(&pathspec, 0, PATHSPEC_PREFER_FULL | PATHSPEC_SYMLINK_LEADING_PATH, prefix, argv);
If you read the comment you will know this is already intented (the behaviour which you described)
- Jayatheerth