Merge branch 'master' into next
* master: fix various typos in documentation blame: Fix path pruning cvsserver: use git-rev-list instead of git-log Fix "git-log --parents" breakage post v1.3.0 add documentation for update-index --unresolve
This commit is contained in:
@ -92,7 +92,7 @@ separated with a single space are given.
|
|||||||
Furthermore, it lists only files which were modified
|
Furthermore, it lists only files which were modified
|
||||||
from all parents.
|
from all parents.
|
||||||
|
|
||||||
-cc::
|
--cc::
|
||||||
This flag changes the way a merge commit patch is displayed,
|
This flag changes the way a merge commit patch is displayed,
|
||||||
in a similar way to the '-c' option. It implies the '-c'
|
in a similar way to the '-c' option. It implies the '-c'
|
||||||
and '-p' options and further compresses the patch output
|
and '-p' options and further compresses the patch output
|
||||||
|
@ -11,11 +11,11 @@ SYNOPSIS
|
|||||||
[verse]
|
[verse]
|
||||||
'git-update-index'
|
'git-update-index'
|
||||||
[--add] [--remove | --force-remove] [--replace]
|
[--add] [--remove | --force-remove] [--replace]
|
||||||
[--refresh [-q] [--unmerged] [--ignore-missing]]
|
[--refresh] [-q] [--unmerged] [--ignore-missing]
|
||||||
[--cacheinfo <mode> <object> <file>]\*
|
[--cacheinfo <mode> <object> <file>]\*
|
||||||
[--chmod=(+|-)x]
|
[--chmod=(+|-)x]
|
||||||
[--assume-unchanged | --no-assume-unchanged]
|
[--assume-unchanged | --no-assume-unchanged]
|
||||||
[--really-refresh]
|
[--really-refresh] [--unresolve]
|
||||||
[--info-only] [--index-info]
|
[--info-only] [--index-info]
|
||||||
[-z] [--stdin]
|
[-z] [--stdin]
|
||||||
[--verbose]
|
[--verbose]
|
||||||
@ -80,6 +80,10 @@ OPTIONS
|
|||||||
filesystem that has very slow lstat(2) system call
|
filesystem that has very slow lstat(2) system call
|
||||||
(e.g. cifs).
|
(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::
|
--info-only::
|
||||||
Do not create objects in the object database for all
|
Do not create objects in the object database for all
|
||||||
<file> arguments that follow this flag; just insert
|
<file> arguments that follow this flag; just insert
|
||||||
|
10
blame.c
10
blame.c
@ -515,9 +515,9 @@ static int compare_tree_path(struct rev_info* revs,
|
|||||||
paths[1] = NULL;
|
paths[1] = NULL;
|
||||||
|
|
||||||
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
|
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
|
||||||
&revs->diffopt);
|
&revs->pruning);
|
||||||
ret = rev_compare_tree(revs, c1->tree, c2->tree);
|
ret = rev_compare_tree(revs, c1->tree, c2->tree);
|
||||||
diff_tree_release_paths(&revs->diffopt);
|
diff_tree_release_paths(&revs->pruning);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,9 +531,9 @@ static int same_tree_as_empty_path(struct rev_info *revs, struct tree* t1,
|
|||||||
paths[1] = NULL;
|
paths[1] = NULL;
|
||||||
|
|
||||||
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
|
diff_tree_setup_paths(get_pathspec(revs->prefix, paths),
|
||||||
&revs->diffopt);
|
&revs->pruning);
|
||||||
ret = rev_same_tree_as_empty(revs, t1);
|
ret = rev_same_tree_as_empty(revs, t1);
|
||||||
diff_tree_release_paths(&revs->diffopt);
|
diff_tree_release_paths(&revs->pruning);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -834,7 +834,7 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
args[0] = filename;
|
args[0] = filename;
|
||||||
args[1] = NULL;
|
args[1] = NULL;
|
||||||
diff_tree_setup_paths(args, &rev.diffopt);
|
diff_tree_setup_paths(args, &rev.pruning);
|
||||||
prepare_revision_walk(&rev);
|
prepare_revision_walk(&rev);
|
||||||
process_commits(&rev, filename, &initial);
|
process_commits(&rev, filename, &initial);
|
||||||
|
|
||||||
|
@ -2076,14 +2076,15 @@ sub update
|
|||||||
# TODO: log processing is memory bound
|
# TODO: log processing is memory bound
|
||||||
# if we can parse into a 2nd file that is in reverse order
|
# if we can parse into a 2nd file that is in reverse order
|
||||||
# we can probably do something really efficient
|
# 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) {
|
if (defined $lastcommit) {
|
||||||
push @git_log_params, "$lastcommit..$self->{module}";
|
push @git_log_params, "$lastcommit..$self->{module}";
|
||||||
} else {
|
} else {
|
||||||
push @git_log_params, $self->{module};
|
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;
|
my @commits;
|
||||||
|
|
||||||
|
16
log-tree.c
16
log-tree.c
@ -3,6 +3,15 @@
|
|||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include "log-tree.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)
|
void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
|
||||||
{
|
{
|
||||||
static char this_header[16384];
|
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;
|
opt->loginfo = NULL;
|
||||||
if (!opt->verbose_header) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,6 +57,8 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
|
|||||||
printf("%s%s",
|
printf("%s%s",
|
||||||
opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ",
|
opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ",
|
||||||
diff_unique_abbrev(commit->object.sha1, abbrev_commit));
|
diff_unique_abbrev(commit->object.sha1, abbrev_commit));
|
||||||
|
if (opt->parents)
|
||||||
|
show_parents(commit, abbrev_commit);
|
||||||
if (parent)
|
if (parent)
|
||||||
printf(" (from %s)",
|
printf(" (from %s)",
|
||||||
diff_unique_abbrev(parent->object.sha1,
|
diff_unique_abbrev(parent->object.sha1,
|
||||||
|
@ -574,7 +574,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
|
|||||||
revs->max_count = atoi(arg + 12);
|
revs->max_count = atoi(arg + 12);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* accept -<digit>, like traditilnal "head" */
|
/* accept -<digit>, like traditional "head" */
|
||||||
if ((*arg == '-') && isdigit(arg[1])) {
|
if ((*arg == '-') && isdigit(arg[1])) {
|
||||||
revs->max_count = atoi(arg + 1);
|
revs->max_count = atoi(arg + 1);
|
||||||
continue;
|
continue;
|
||||||
|
@ -485,7 +485,7 @@ static void read_index_info(int line_termination)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char update_index_usage[] =
|
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] [--] <file>...";
|
"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] [--] <file>...";
|
||||||
|
|
||||||
static unsigned char head_sha1[20];
|
static unsigned char head_sha1[20];
|
||||||
static unsigned char merge_head_sha1[20];
|
static unsigned char merge_head_sha1[20];
|
||||||
|
Reference in New Issue
Block a user