Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
apply: move verify_index_match() higher
author
Junio C Hamano
<gitster@pobox.com>
Wed, 13 Jun 2012 04:16:02 +0000
(21:16 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 Jul 2012 21:40:02 +0000
(14:40 -0700)
We will be adding another caller of this function in a later patch.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
28ff051
)
diff --git
a/builtin/apply.c
b/builtin/apply.c
index d84958b596a6d5f51fa1b8cf6fbb5200a0074c22..682852c716f5c2a60ad23ee063c8d4df4ffb8283 100644
(file)
--- a/
builtin/apply.c
+++ b/
builtin/apply.c
@@
-3074,6
+3074,16
@@
static struct patch *previous_patch(struct patch *patch, int *gone)
return previous;
}
return previous;
}
+static int verify_index_match(struct cache_entry *ce, struct stat *st)
+{
+ if (S_ISGITLINK(ce->ce_mode)) {
+ if (!S_ISDIR(st->st_mode))
+ return -1;
+ return 0;
+ }
+ return ce_match_stat(ce, st, CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE);
+}
+
#define SUBMODULE_PATCH_WITHOUT_INDEX 1
static int load_patch_target(struct strbuf *buf,
#define SUBMODULE_PATCH_WITHOUT_INDEX 1
static int load_patch_target(struct strbuf *buf,
@@
-3260,16
+3270,6
@@
static int apply_data(struct patch *patch, struct stat *st, struct cache_entry *
return 0;
}
return 0;
}
-static int verify_index_match(struct cache_entry *ce, struct stat *st)
-{
- if (S_ISGITLINK(ce->ce_mode)) {
- if (!S_ISDIR(st->st_mode))
- return -1;
- return 0;
- }
- return ce_match_stat(ce, st, CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE);
-}
-
/*
* If "patch" that we are looking at modifies or deletes what we have,
* we would want it not to lose any local modification we have, either
/*
* If "patch" that we are looking at modifies or deletes what we have,
* we would want it not to lose any local modification we have, either