aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-15 14:11:43 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-15 14:11:43 -0700
commitd75ec4c62715fd768a56523f714fe9ecd2b1abb3 (patch)
tree0c14da40b63504b40b957f08eaf06ae37fa8c318 /builtin/checkout.c
parent6c142bc8461b557d88fde0be28faac76ad78053a (diff)
parent7de13cfef3042478223012841e07cd91d7234d22 (diff)
downloadgit-d75ec4c62715fd768a56523f714fe9ecd2b1abb3.tar.gz
Merge branch 'gt/add-u-commit-i-pathspec-check'
"git add -u <pathspec>" and "git commit [-i] <pathspec>" did not diagnose a pathspec element that did not match any files in certain situations, unlike "git add <pathspec>" did. * gt/add-u-commit-i-pathspec-check: builtin/add: error out when passing untracked path with -u builtin/commit: error out when passing untracked path with -i revision: optionally record matches with pathspec elements
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 947827de1d..71e6036aab 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -882,7 +882,8 @@ static int merge_working_tree(const struct checkout_opts *opts,
* entries in the index.
*/
- add_files_to_cache(the_repository, NULL, NULL, 0, 0);
+ add_files_to_cache(the_repository, NULL, NULL, NULL, 0,
+ 0);
init_merge_options(&o, the_repository);
o.verbosity = 0;
work = write_in_core_index_as_tree(the_repository);