While adding tests for 'commit --include', I accidentally reproduced a potential bug where in we do not error out when passing a pathspec which does not match any tracked path. This was noticed by Junio while reviewing[1]. This patch series fixes that and a similar case in 'add --update'. [1]: https://lore.kernel.org/git/xmqqil41avcc.fsf@gitster.g/ Ghanshyam Thakkar (2): builtin/commit: error out when passing untracked path with -i builtin/add: error out when passing untracked path with -u builtin/add.c | 16 ++++++++++++++++ builtin/commit.c | 15 +++++++++++++++ t/t1092-sparse-checkout-compatibility.sh | 4 ---- t/t2200-add-update.sh | 5 +++++ t/t7501-commit-basic-functionality.sh | 16 +--------------- 5 files changed, 37 insertions(+), 19 deletions(-) -- 2.44.0