projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the simple scripts I used to do a merge with content conflicts.
[git.git]
/
checkout-cache.c
diff --git
a/checkout-cache.c
b/checkout-cache.c
index
b909f5d
..
5cd473c
100644
(file)
--- a/
checkout-cache.c
+++ b/
checkout-cache.c
@@
-121,8
+121,15
@@
static int checkout_file(const char *name)
{
int pos = cache_name_pos(name, strlen(name));
if (pos < 0) {
{
int pos = cache_name_pos(name, strlen(name));
if (pos < 0) {
- if (!quiet)
- fprintf(stderr, "checkout-cache: %s is not in the cache\n", name);
+ if (!quiet) {
+ pos = -pos - 1;
+ fprintf(stderr,
+ "checkout-cache: %s is %s.\n",
+ name,
+ (pos < active_nr &&
+ !strcmp(active_cache[pos]->name, name)) ?
+ "unmerged" : "not in the cache");
+ }
return -1;
}
return checkout_entry(active_cache[pos]);
return -1;
}
return checkout_entry(active_cache[pos]);
@@
-134,6
+141,8
@@
static int checkout_all(void)
for (i = 0; i < active_nr ; i++) {
struct cache_entry *ce = active_cache[i];
for (i = 0; i < active_nr ; i++) {
struct cache_entry *ce = active_cache[i];
+ if (ce_stage(ce))
+ continue;
if (checkout_entry(ce) < 0)
return -1;
}
if (checkout_entry(ce) < 0)
return -1;
}