This option allows the caller to reset everything that isn't unmerged,
leaving the unmerged things to be resolved. If, after a merge of
"working" and "HEAD", this is used with "HEAD" (reset, !update), the
result will be that all of the changes from "local" are in the working
tree but not added to the index (either with the index clean but
unchanged, or with the index unmerged, depending on whether there are
conflicts).
This will be used in checkout -m.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
raw | patch | inline | side by side (parent: 33ecf7e )
int any_dirs = 0;
char *cache_name;
int ce_stage;
int any_dirs = 0;
char *cache_name;
int ce_stage;
/* Find the first name in the input. */
/* Find the first name in the input. */
any_files = 1;
src[0] = active_cache[o->pos];
remove = o->pos;
any_files = 1;
src[0] = active_cache[o->pos];
remove = o->pos;
+ if (o->skip_unmerged && ce_stage(src[0]))
+ skip_entry = 1;
}
for (i = 0; i < len; i++) {
}
for (i = 0; i < len; i++) {
+ if (skip_entry) {
+ subposns[i] = df_conflict_list;
+ posns[i] = posns[i]->next;
+ continue;
+ }
+
if (!o->merge)
ce_stage = 0;
else if (i + 1 < o->head_idx)
if (!o->merge)
ce_stage = 0;
else if (i + 1 < o->head_idx)
posns[i] = posns[i]->next;
}
if (any_files) {
posns[i] = posns[i]->next;
}
if (any_files) {
+ if (skip_entry) {
+ o->pos++;
+ while (o->pos < active_nr &&
+ !strcmp(active_cache[o->pos]->name,
+ src[0]->name))
+ o->pos++;
+ } else if (o->merge) {
int ret;
#if DBRT_DEBUG > 1
int ret;
#if DBRT_DEBUG > 1
* If we have an entry in the index cache, then we want to
* make sure that it matches head.
*/
* If we have an entry in the index cache, then we want to
* make sure that it matches head.
*/
- if (index && !same(index, head)) {
+ if (index && !same(index, head))
return o->gently ? -1 : reject_merge(index);
return o->gently ? -1 : reject_merge(index);
if (head) {
/* #5ALT, #15 */
if (head) {
/* #5ALT, #15 */
int trivial_merges_only;
int verbose_update;
int aggressive;
int trivial_merges_only;
int verbose_update;
int aggressive;
int gently;
const char *prefix;
int pos;
int gently;
const char *prefix;
int pos;