projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sha1_name: warning ambiguous refs.
[git.git]
/
read-tree.c
diff --git
a/read-tree.c
b/read-tree.c
index
f39fe5c
..
eaff444
100644
(file)
--- a/
read-tree.c
+++ b/
read-tree.c
@@
-337,7
+337,7
@@
static void check_updates(struct cache_entry **src, int nr)
if (ce->ce_flags & mask) {
ce->ce_flags &= ~mask;
if (update)
if (ce->ce_flags & mask) {
ce->ce_flags &= ~mask;
if (update)
- checkout_entry(ce, &state);
+ checkout_entry(ce, &state
, NULL
);
}
}
if (total) {
}
}
if (total) {
@@
-560,9
+560,11
@@
static int threeway_merge(struct cache_entry **stages)
*/
if ((head_deleted && remote_deleted) ||
(head_deleted && remote && remote_match) ||
*/
if ((head_deleted && remote_deleted) ||
(head_deleted && remote && remote_match) ||
- (remote_deleted && head && head_match))
+ (remote_deleted && head && head_match)) {
+ if (index)
+ return deleted_entry(index, index);
return 0;
return 0;
-
+ }
/*
* Added in both, identically.
*/
/*
* Added in both, identically.
*/
@@
-704,7
+706,7
@@
static int read_cache_unmerged(void)
return deleted;
}
return deleted;
}
-static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-u | -i] <sha1> [<sha2> [<sha3>]])";
+static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-
-aggressive] [-
u | -i] <sha1> [<sha2> [<sha3>]])";
static struct cache_file cache_file;
static struct cache_file cache_file;
@@
-715,6
+717,7
@@
int main(int argc, char **argv)
merge_fn_t fn = NULL;
setup_git_directory();
merge_fn_t fn = NULL;
setup_git_directory();
+ git_config(git_default_config);
newfd = hold_index_file_for_update(&cache_file, get_index_file());
if (newfd < 0)
newfd = hold_index_file_for_update(&cache_file, get_index_file());
if (newfd < 0)