Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Rename static variable write_index to update_index in builtin-apply.c
author
Junio C Hamano
<junkio@cox.net>
Mon, 2 Apr 2007 05:46:06 +0000
(22:46 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 5 Apr 2007 22:07:16 +0000
(15:07 -0700)
This is an internal variable used to tell if we need to write
out the resulting index.
I'll be introducing write_index() function which would collide
with it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
81e1bc4
)
diff --git
a/builtin-apply.c
b/builtin-apply.c
index 27a182bfaa826711b2e6c4c775fbd6e83b243f7e..6a8292e2a5448389fbe76d9d899cb1d066e2a996 100644
(file)
--- a/
builtin-apply.c
+++ b/
builtin-apply.c
@@
-30,7
+30,7
@@
static int unidiff_zero;
static int p_value = 1;
static int p_value_known;
static int check_index;
static int p_value = 1;
static int p_value_known;
static int check_index;
-static int
wri
te_index;
+static int
upda
te_index;
static int cached;
static int diffstat;
static int numstat;
static int cached;
static int diffstat;
static int numstat;
@@
-2308,7
+2308,7
@@
static void patch_stats(struct patch *patch)
static void remove_file(struct patch *patch, int rmdir_empty)
{
static void remove_file(struct patch *patch, int rmdir_empty)
{
- if (
wri
te_index) {
+ if (
upda
te_index) {
if (remove_file_from_cache(patch->old_name) < 0)
die("unable to remove %s from index", patch->old_name);
cache_tree_invalidate_path(active_cache_tree, patch->old_name);
if (remove_file_from_cache(patch->old_name) < 0)
die("unable to remove %s from index", patch->old_name);
cache_tree_invalidate_path(active_cache_tree, patch->old_name);
@@
-2335,7
+2335,7
@@
static void add_index_file(const char *path, unsigned mode, void *buf, unsigned
int namelen = strlen(path);
unsigned ce_size = cache_entry_size(namelen);
int namelen = strlen(path);
unsigned ce_size = cache_entry_size(namelen);
- if (!
wri
te_index)
+ if (!
upda
te_index)
return;
ce = xcalloc(1, ce_size);
return;
ce = xcalloc(1, ce_size);
@@
-2662,8
+2662,8
@@
static int apply_patch(int fd, const char *filename, int inaccurate_eof)
if (whitespace_error && (new_whitespace == error_on_whitespace))
apply = 0;
if (whitespace_error && (new_whitespace == error_on_whitespace))
apply = 0;
-
wri
te_index = check_index && apply;
- if (
wri
te_index && newfd < 0)
+
upda
te_index = check_index && apply;
+ if (
upda
te_index && newfd < 0)
newfd = hold_lock_file_for_update(&lock_file,
get_index_file(), 1);
if (check_index) {
newfd = hold_lock_file_for_update(&lock_file,
get_index_file(), 1);
if (check_index) {
@@
-2870,7
+2870,7
@@
int cmd_apply(int argc, const char **argv, const char *unused_prefix)
whitespace_error == 1 ? "s" : "");
}
whitespace_error == 1 ? "s" : "");
}
- if (
wri
te_index) {
+ if (
upda
te_index) {
if (write_cache(newfd, active_cache, active_nr) ||
close(newfd) || commit_lock_file(&lock_file))
die("Unable to write new index file");
if (write_cache(newfd, active_cache, active_nr) ||
close(newfd) || commit_lock_file(&lock_file))
die("Unable to write new index file");