-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparse Index: diff and blame builtins #1050
Changes from all commits
efdd55c
f676f03
7b1fab8
fd28be7
2a1524a
8976116
85bcbaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -437,6 +437,11 @@ int cmd_diff(int argc, const char **argv, const char *prefix) | |
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Taylor Blau wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Lessley Dennington wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Taylor Blau wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Lessley Dennington wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Elijah Newren wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Lessley Dennington wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
|
||
prefix = setup_git_directory_gently(&nongit); | ||
|
||
if (!nongit) { | ||
ldennington marked this conversation as resolved.
Show resolved
Hide resolved
|
||
prepare_repo_settings(the_repository); | ||
the_repository->settings.command_requires_full_index = 0; | ||
} | ||
|
||
if (!no_index) { | ||
/* | ||
* Treat git diff with at least one path outside of the | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -421,27 +421,30 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) | |
int status, help; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Elijah Newren wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
|
||
struct stat st; | ||
const char *prefix; | ||
int run_setup = (p->option & (RUN_SETUP | RUN_SETUP_GENTLY)); | ||
|
||
prefix = NULL; | ||
help = argc == 2 && !strcmp(argv[1], "-h"); | ||
if (!help) { | ||
if (p->option & RUN_SETUP) | ||
prefix = setup_git_directory(); | ||
else if (p->option & RUN_SETUP_GENTLY) { | ||
int nongit_ok; | ||
prefix = setup_git_directory_gently(&nongit_ok); | ||
} | ||
precompose_argv_prefix(argc, argv, NULL); | ||
if (use_pager == -1 && p->option & (RUN_SETUP | RUN_SETUP_GENTLY) && | ||
!(p->option & DELAY_PAGER_CONFIG)) | ||
use_pager = check_pager_config(p->cmd); | ||
if (use_pager == -1 && p->option & USE_PAGER) | ||
use_pager = 1; | ||
|
||
if ((p->option & (RUN_SETUP | RUN_SETUP_GENTLY)) && | ||
startup_info->have_repository) /* get_git_dir() may set up repo, avoid that */ | ||
trace_repo_setup(prefix); | ||
if (help && (run_setup & RUN_SETUP)) | ||
/* demote to GENTLY to allow 'git cmd -h' outside repo */ | ||
run_setup = RUN_SETUP_GENTLY; | ||
|
||
if (run_setup & RUN_SETUP) { | ||
prefix = setup_git_directory(); | ||
} else if (run_setup & RUN_SETUP_GENTLY) { | ||
int nongit_ok; | ||
prefix = setup_git_directory_gently(&nongit_ok); | ||
} else { | ||
prefix = NULL; | ||
} | ||
precompose_argv_prefix(argc, argv, NULL); | ||
if (use_pager == -1 && run_setup && | ||
!(p->option & DELAY_PAGER_CONFIG)) | ||
use_pager = check_pager_config(p->cmd); | ||
if (use_pager == -1 && p->option & USE_PAGER) | ||
use_pager = 1; | ||
if (run_setup && startup_info->have_repository) | ||
/* get_git_dir() may set up repo, avoid that */ | ||
trace_repo_setup(prefix); | ||
commit_pager_choice(); | ||
|
||
if (!help && get_super_prefix()) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,6 @@ int cmd__read_cache(int argc, const char **argv) | |
int table = 0, expand = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Lessley Dennington wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Junio C Hamano wrote (reply to this):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Lessley Dennington wrote (reply to this):
|
||
|
||
initialize_the_repository(); | ||
prepare_repo_settings(r); | ||
r->settings.command_requires_full_index = 0; | ||
|
||
for (++argv, --argc; *argv && starts_with(*argv, "--"); ++argv, --argc) { | ||
if (skip_prefix(*argv, "--print-and-refresh=", &name)) | ||
|
@@ -56,6 +54,9 @@ int cmd__read_cache(int argc, const char **argv) | |
setup_git_directory(); | ||
git_config(git_default_config, NULL); | ||
|
||
prepare_repo_settings(r); | ||
r->settings.command_requires_full_index = 0; | ||
|
||
for (i = 0; i < cnt; i++) { | ||
repo_read_index(r); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Derrick Stolee wrote (reply to this):