X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=merge-index.c;h=7491c56ad25332fb4aae6a075bf0577a1d800c3b;hb=af05d67939f306a68c5f81ed30f65a82ae025661;hp=5599fd321bb4c09c1c0ce4fc62dfb9ecf5531c2b;hpb=2603fa5fb358ee7834bc9e1a2e391f69d8fce815;p=git.git diff --git a/merge-index.c b/merge-index.c index 5599fd321..7491c56ad 100644 --- a/merge-index.c +++ b/merge-index.c @@ -25,7 +25,7 @@ static void run_program(void) static int merge_entry(int pos, const char *path) { int found; - + if (pos >= active_nr) die("git-merge-index: %s not in the cache", path); arguments[0] = pgm; @@ -48,7 +48,7 @@ static int merge_entry(int pos, const char *path) break; found++; strcpy(hexbuf[stage], sha1_to_hex(ce->sha1)); - sprintf(ownbuf[stage], "%o", ntohl(ce->ce_mode)); + sprintf(ownbuf[stage], "%o", ce->ce_mode); arguments[stage] = hexbuf[stage]; arguments[stage + 4] = ownbuf[stage]; } while (++pos < active_nr); @@ -91,7 +91,7 @@ int main(int argc, char **argv) signal(SIGCHLD, SIG_DFL); if (argc < 3) - usage("git-merge-index [-o] [-q] (-a | *)"); + usage("git-merge-index [-o] [-q] (-a | [--] *)"); setup_git_directory(); read_cache();