Skip to content

Commit

Permalink
Merge branch 'virtualfilesystem-and-merge-recursive'
Browse files Browse the repository at this point in the history
The major work on merge-recursive.c that went into v2.21.0 necessitates
an adjustment to work well with VFSforGit's virtualfilesystem hook.
  • Loading branch information
dscho committed Aug 17, 2019
2 parents d762feb + 5fd767a commit bbfe83c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "submodule.h"
#include "revision.h"
#include "commit-reach.h"
#include "virtualfilesystem.h"

struct path_hashmap_entry {
struct hashmap_entry e;
Expand Down Expand Up @@ -846,15 +847,14 @@ static int would_lose_untracked(struct merge_options *opt, const char *path)
static int was_dirty(struct merge_options *opt, const char *path)
{
struct cache_entry *ce;
int dirty = 1;

if (opt->call_depth || !was_tracked(opt, path))
return !dirty;
if (opt->call_depth || !was_tracked(opt, path) ||
is_excluded_from_virtualfilesystem(path, strlen(path), DT_REG) == 1)
return 0;

ce = index_file_exists(opt->unpack_opts.src_index,
path, strlen(path), ignore_case);
dirty = verify_uptodate(ce, &opt->unpack_opts) != 0;
return dirty;
return !ce || verify_uptodate(ce, &opt->unpack_opts) != 0;
}

static int make_room_for_path(struct merge_options *opt, const char *path)
Expand Down

0 comments on commit bbfe83c

Please sign in to comment.