projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix git-log-script when HEAD is invalid.
[git.git]
/
rev-list.c
diff --git
a/rev-list.c
b/rev-list.c
index
2ed5e87
..
2d97cdb
100644
(file)
--- a/
rev-list.c
+++ b/
rev-list.c
@@
-33,7
+33,7
@@
static int blob_objects = 0;
static int verbose_header = 0;
static int show_parents = 0;
static int hdr_termination = 0;
static int verbose_header = 0;
static int show_parents = 0;
static int hdr_termination = 0;
-static const char *prefix = "";
+static const char *
commit_
prefix = "";
static unsigned long max_age = -1;
static unsigned long min_age = -1;
static int max_count = -1;
static unsigned long max_age = -1;
static unsigned long min_age = -1;
static int max_count = -1;
@@
-48,14
+48,14
@@
static void show_commit(struct commit *commit)
{
commit->object.flags |= SHOWN;
if (show_breaks) {
{
commit->object.flags |= SHOWN;
if (show_breaks) {
- prefix = "| ";
+
commit_
prefix = "| ";
if (commit->object.flags & DISCONTINUITY) {
if (commit->object.flags & DISCONTINUITY) {
- prefix = "^ ";
+
commit_
prefix = "^ ";
} else if (commit->object.flags & BOUNDARY) {
} else if (commit->object.flags & BOUNDARY) {
- prefix = "= ";
+
commit_
prefix = "= ";
}
}
}
}
- printf("%s%s", prefix, sha1_to_hex(commit->object.sha1));
+ printf("%s%s",
commit_
prefix, sha1_to_hex(commit->object.sha1));
if (show_parents) {
struct commit_list *parents = commit->parents;
while (parents) {
if (show_parents) {
struct commit_list *parents = commit->parents;
while (parents) {
@@
-483,6
+483,7
@@
int main(int argc, char **argv)
struct commit_list *list = NULL;
int i, limited = 0;
struct commit_list *list = NULL;
int i, limited = 0;
+ setup_git_directory();
for (i = 1 ; i < argc; i++) {
int flags;
char *arg = argv[i];
for (i = 1 ; i < argc; i++) {
int flags;
char *arg = argv[i];
@@
-510,9
+511,9
@@
int main(int argc, char **argv)
verbose_header = 1;
hdr_termination = '\n';
if (commit_format == CMIT_FMT_ONELINE)
verbose_header = 1;
hdr_termination = '\n';
if (commit_format == CMIT_FMT_ONELINE)
- prefix = "";
+
commit_
prefix = "";
else
else
- prefix = "commit ";
+
commit_
prefix = "commit ";
continue;
}
if (!strncmp(arg, "--no-merges", 11)) {
continue;
}
if (!strncmp(arg, "--no-merges", 11)) {