diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index 2169169850..906830d4bf 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -92,7 +92,7 @@ separated with a single space are given. Furthermore, it lists only files which were modified from all parents. --cc:: +--cc:: This flag changes the way a merge commit patch is displayed, in a similar way to the '-c' option. It implies the '-c' and '-p' options and further compresses the patch output diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index d4137fc87e..23f2b6f1a5 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -10,12 +10,12 @@ SYNOPSIS -------- [verse] 'git-update-index' - [--add] [--remove | --force-remove] [--replace] - [--refresh [-q] [--unmerged] [--ignore-missing]] + [--add] [--remove | --force-remove] [--replace] + [--refresh] [-q] [--unmerged] [--ignore-missing] [--cacheinfo ]\* [--chmod=(+|-)x] [--assume-unchanged | --no-assume-unchanged] - [--really-refresh] + [--really-refresh] [--unresolve] [--info-only] [--index-info] [-z] [--stdin] [--verbose] @@ -80,6 +80,10 @@ OPTIONS filesystem that has very slow lstat(2) system call (e.g. cifs). +--unresolve:: + Restores the 'unmerged' or 'needs updating' state of a + file during a merge if it was cleared by accident. + --info-only:: Do not create objects in the object database for all arguments that follow this flag; just insert diff --git a/blame.c b/blame.c index 07d2d27251..99ceea81df 100644 --- a/blame.c +++ b/blame.c @@ -515,9 +515,9 @@ static int compare_tree_path(struct rev_info* revs, paths[1] = NULL; diff_tree_setup_paths(get_pathspec(revs->prefix, paths), - &revs->diffopt); + &revs->pruning); ret = rev_compare_tree(revs, c1->tree, c2->tree); - diff_tree_release_paths(&revs->diffopt); + diff_tree_release_paths(&revs->pruning); return ret; } @@ -531,9 +531,9 @@ static int same_tree_as_empty_path(struct rev_info *revs, struct tree* t1, paths[1] = NULL; diff_tree_setup_paths(get_pathspec(revs->prefix, paths), - &revs->diffopt); + &revs->pruning); ret = rev_same_tree_as_empty(revs, t1); - diff_tree_release_paths(&revs->diffopt); + diff_tree_release_paths(&revs->pruning); return ret; } @@ -834,7 +834,7 @@ int main(int argc, const char **argv) args[0] = filename; args[1] = NULL; - diff_tree_setup_paths(args, &rev.diffopt); + diff_tree_setup_paths(args, &rev.pruning); prepare_revision_walk(&rev); process_commits(&rev, filename, &initial); diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 11d153c4cd..ffd9c66f94 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -2076,14 +2076,15 @@ sub update # TODO: log processing is memory bound # if we can parse into a 2nd file that is in reverse order # we can probably do something really efficient - my @git_log_params = ('--parents', '--topo-order'); + my @git_log_params = ('--pretty', '--parents', '--topo-order'); if (defined $lastcommit) { push @git_log_params, "$lastcommit..$self->{module}"; } else { push @git_log_params, $self->{module}; } - open(GITLOG, '-|', 'git-log', @git_log_params) or die "Cannot call git-log: $!"; + # git-rev-list is the backend / plumbing version of git-log + open(GITLOG, '-|', 'git-rev-list', @git_log_params) or die "Cannot call git-rev-list: $!"; my @commits; diff --git a/log-tree.c b/log-tree.c index aaf2b9423f..d92abaf64b 100644 --- a/log-tree.c +++ b/log-tree.c @@ -3,6 +3,15 @@ #include "commit.h" #include "log-tree.h" +static void show_parents(struct commit *commit, int abbrev) +{ + struct commit_list *p; + for (p = commit->parents; p ; p = p->next) { + struct commit *parent = p->item; + printf(" %s", diff_unique_abbrev(parent->object.sha1, abbrev)); + } +} + void show_log(struct rev_info *opt, struct log_info *log, const char *sep) { static char this_header[16384]; @@ -14,7 +23,10 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep) opt->loginfo = NULL; if (!opt->verbose_header) { - puts(sha1_to_hex(commit->object.sha1)); + fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout); + if (opt->parents) + show_parents(commit, abbrev_commit); + putchar('\n'); return; } @@ -45,6 +57,8 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep) printf("%s%s", opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ", diff_unique_abbrev(commit->object.sha1, abbrev_commit)); + if (opt->parents) + show_parents(commit, abbrev_commit); if (parent) printf(" (from %s)", diff_unique_abbrev(parent->object.sha1, diff --git a/revision.c b/revision.c index 846c9ec463..f8ee38e54d 100644 --- a/revision.c +++ b/revision.c @@ -574,7 +574,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch revs->max_count = atoi(arg + 12); continue; } - /* accept -, like traditilnal "head" */ + /* accept -, like traditional "head" */ if ((*arg == '-') && isdigit(arg[1])) { revs->max_count = atoi(arg + 1); continue; diff --git a/update-index.c b/update-index.c index 1c1f13bd70..061b18c1a5 100644 --- a/update-index.c +++ b/update-index.c @@ -485,7 +485,7 @@ static void read_index_info(int line_termination) } static const char update_index_usage[] = -"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--cacheinfo] [--chmod=(+|-)x] [--info-only] [--force-remove] [--stdin] [--index-info] [--ignore-missing] [-z] [--verbose] [--] ..."; +"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--really-refresh] [--cacheinfo] [--chmod=(+|-)x] [--assume-unchanged] [--info-only] [--force-remove] [--stdin] [--index-info] [--unresolve] [--ignore-missing] [-z] [--verbose] [--] ..."; static unsigned char head_sha1[20]; static unsigned char merge_head_sha1[20];