mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'js/last-modified-with-sparse-checkouts' into jch
"git last-modified" used to mishandle "--" to mark the beginning of pathspec, which has been corrected. * js/last-modified-with-sparse-checkouts: last-modified: support sparse checkouts
This commit is contained in:
@@ -525,7 +525,8 @@ int cmd_last_modified(int argc, const char **argv, const char *prefix,
|
||||
|
||||
argc = parse_options(argc, argv, prefix, last_modified_options,
|
||||
last_modified_usage,
|
||||
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN_OPT);
|
||||
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN_OPT |
|
||||
PARSE_OPT_KEEP_DASHDASH);
|
||||
|
||||
repo_config(repo, git_default_config, NULL);
|
||||
|
||||
|
||||
@@ -78,6 +78,14 @@ test_expect_success 'last-modified subdir' '
|
||||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'last-modified in sparse checkout' '
|
||||
test_when_finished "git sparse-checkout disable" &&
|
||||
git sparse-checkout set b &&
|
||||
check_last_modified -- a <<-\EOF
|
||||
3 a
|
||||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'last-modified subdir recursive' '
|
||||
check_last_modified -r a <<-\EOF
|
||||
3 a/b/file
|
||||
|
||||
Reference in New Issue
Block a user