-
Notifications
You must be signed in to change notification settings - Fork 143
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: Integrate with merge, cherry-pick, rebase, and revert #1019
Changes from all commits
a696318
141f7fb
c3c9ffd
7aae572
20f5bba
36cecb2
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 |
---|---|---|
|
@@ -1276,6 +1276,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix) | |
if (argc == 2 && !strcmp(argv[1], "-h")) | ||
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, Derrick Stolee 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, Derrick Stolee wrote (reply to this):
|
||
usage_with_options(builtin_merge_usage, builtin_merge_options); | ||
|
||
prepare_repo_settings(the_repository); | ||
the_repository->settings.command_requires_full_index = 0; | ||
|
||
/* | ||
* Check if we are _not_ on a detached HEAD, i.e. if there is a | ||
* current branch. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,6 +559,9 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix) | |
argc = parse_options(argc, argv, prefix, options, | ||
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):
|
||
builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0); | ||
|
||
prepare_repo_settings(the_repository); | ||
the_repository->settings.command_requires_full_index = 0; | ||
|
||
if (!is_null_oid(&squash_onto)) | ||
opts.squash_onto = &squash_onto; | ||
|
||
|
@@ -1430,6 +1433,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) | |
usage_with_options(builtin_rebase_usage, | ||
builtin_rebase_options); | ||
|
||
prepare_repo_settings(the_repository); | ||
the_repository->settings.command_requires_full_index = 0; | ||
|
||
options.allow_empty_message = 1; | ||
git_config(rebase_config, &options); | ||
/* options.gpg_sign_opt will be either "-S" or NULL */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
#include "parse-options.h" | ||
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, Derrick Stolee 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):
|
||
#include "help.h" | ||
#include "promisor-remote.h" | ||
#include "dir.h" | ||
|
||
#ifdef NO_FAST_WORKING_DIRECTORY | ||
#define FAST_WORKING_DIRECTORY 0 | ||
|
@@ -3907,6 +3908,13 @@ static int reuse_worktree_file(struct index_state *istate, | |
if (!want_file && would_convert_to_git(istate, name)) | ||
return 0; | ||
|
||
/* | ||
* If this path does not match our sparse-checkout definition, | ||
* then the file will not be in the working directory. | ||
*/ | ||
if (!path_in_sparse_checkout(name, istate)) | ||
return 0; | ||
|
||
len = strlen(name); | ||
pos = index_name_pos(istate, name, len); | ||
if (pos < 0) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4058,6 +4058,21 @@ static int record_conflicted_index_entries(struct merge_options *opt) | |
if (strmap_empty(&opt->priv->conflicted)) | ||
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, Derrick Stolee wrote (reply to this):
|
||
return 0; | ||
|
||
/* | ||
* We are in a conflicted state. These conflicts might be inside | ||
* sparse-directory entries, so check if any entries are outside | ||
* of the sparse-checkout cone preemptively. | ||
* | ||
* We set original_cache_nr below, but that might change if | ||
* index_name_pos() calls ask for paths within sparse directories. | ||
*/ | ||
strmap_for_each_entry(&opt->priv->conflicted, &iter, e) { | ||
if (!path_in_sparse_checkout(e->key, index)) { | ||
ensure_full_index(index); | ||
break; | ||
} | ||
} | ||
|
||
/* If any entries have skip_worktree set, we'll have to check 'em out */ | ||
state.force = 1; | ||
state.quiet = 1; | ||
|
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, Elijah Newren wrote (reply to this):