author | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 20:56:36 +0000 (13:56 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Apr 2006 20:56:36 +0000 (13:56 -0700) |
* lt/logopt:
Fix "git log --stat": make sure to set recursive with --stat.
combine-diff: show diffstat with the first parent.
git.c: LOGSIZE is unused after log printing cleanup.
Log message printout cleanups (#3): fix --pretty=oneline
Log message printout cleanups (#2)
Log message printout cleanups
rev-list --header: output format fix
Fixes for option parsing
log/whatchanged/show - log formatting cleanup.
Simplify common default options setup for built-in log family.
Tentative built-in "git show"
Built-in git-whatchanged.
rev-list option parser fix.
Split init_revisions() out of setup_revisions()
Fix up rev-list option parsing.
Fix up default abbrev in setup_revisions() argument parser.
Common option parsing for "git log --diff" and friends
Fix "git log --stat": make sure to set recursive with --stat.
combine-diff: show diffstat with the first parent.
git.c: LOGSIZE is unused after log printing cleanup.
Log message printout cleanups (#3): fix --pretty=oneline
Log message printout cleanups (#2)
Log message printout cleanups
rev-list --header: output format fix
Fixes for option parsing
log/whatchanged/show - log formatting cleanup.
Simplify common default options setup for built-in log family.
Tentative built-in "git show"
Built-in git-whatchanged.
rev-list option parser fix.
Split init_revisions() out of setup_revisions()
Fix up rev-list option parsing.
Fix up default abbrev in setup_revisions() argument parser.
Common option parsing for "git log --diff" and friends
1 | 2 | |||
---|---|---|---|---|
combine-diff.c | patch | | diff1 | | diff2 | | blob | history |
http-push.c | patch | | diff1 | | diff2 | | blob | history |
rev-list.c | patch | | diff1 | | diff2 | | blob | history |
revision.c | patch | | diff1 | | diff2 | | blob | history |
revision.h | patch | | diff1 | | diff2 | | blob | history |
diff --cc combine-diff.c
index 9445e86c2f329858d5b805d144d6668526e0c289,27f6f57f3ab8e94e853d67ba031437fe6491d52d..ca36f5d5e7342e9198675ce0faf11ba49ca67876
--- 1/combine-diff.c
--- 2/combine-diff.c
+++ b/combine-diff.c
sline->p_lno[i] = sline->p_lno[j];
}
+ static void dump_quoted_path(const char *prefix, const char *path)
+ {
+ fputs(prefix, stdout);
+ if (quote_c_style(path, NULL, NULL, 0))
+ quote_c_style(path, NULL, stdout, 0);
+ else
+ printf("%s", path);
+ putchar('\n');
+ }
+
static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
- int dense, const char *header,
- struct diff_options *opt)
+ int dense, struct rev_info *rev)
{
+ struct diff_options *opt = &rev->diffopt;
unsigned long result_size, cnt, lno;
- char *result, *cp, *ep;
+ char *result, *cp;
struct sline *sline; /* survived lines */
int mode_differs = 0;
int i, show_hunks, shown_header = 0;
#define COLONS "::::::::::::::::::::::::::::::::"
- static void show_raw_diff(struct combine_diff_path *p, int num_parent, const char *header, struct diff_options *opt)
+ static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct rev_info *rev)
{
- int i, offset, mod_type = 'A';
+ struct diff_options *opt = &rev->diffopt;
+ int i, offset;
const char *prefix;
int line_termination, inter_name_termination;
if (!line_termination)
inter_name_termination = 0;
- if (header)
- printf("%s%c", header, line_termination);
+ if (rev->loginfo)
+ show_log(rev, rev->loginfo, "\n");
- for (i = 0; i < num_parent; i++) {
- if (p->parent[i].mode)
- mod_type = 'M';
- }
- if (!p->mode)
- mod_type = 'D';
-
if (opt->output_format == DIFF_FORMAT_RAW) {
offset = strlen(COLONS) - num_parent;
if (offset < 0)
diff --cc http-push.c
Simple merge
diff --cc rev-list.c
index a8fe83c5d805ea8944a07be3832977487b41080d,a4d72af6e01d88aa41962736d9a52f58bf65aad7..8b0ec388fa0afe5ffb28c94f2e75544612ab7265
--- 1/rev-list.c
--- 2/rev-list.c
+++ b/rev-list.c
list = revs.commits;
- if (!list &&
- (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects))
+ if ((!list &&
+ (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) &&
+ !revs.pending_objects)) ||
+ revs.diff)
usage(rev_list_usage);
- save_commit_buffer = verbose_header;
+ save_commit_buffer = revs.verbose_header;
track_object_refs = 0;
+ if (bisect_list)
+ revs.limited = 1;
prepare_revision_walk(&revs);
if (revs.tree_objects)
diff --cc revision.c
Simple merge
diff --cc revision.h
index 4b270435109a8aefb4a85fa01d1f5d8a0f33f0bb,05f658a214a7e1ca7e009c0de9667bf66552dc47..48d7b4ca94f3fd00f7a1f6a3fb57ebed934ffc0d
--- 1/revision.h
--- 2/revision.h
+++ b/revision.h
#define SHOWN (1u<<3)
#define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
#define BOUNDARY (1u<<5)
-#define ADDED (1u<<6) /* Parents already parsed and added? */
+#define BOUNDARY_SHOW (1u<<6)
+#define ADDED (1u<<7) /* Parents already parsed and added? */
struct rev_info;
+ struct log_info;
typedef void (prune_fn_t)(struct rev_info *revs, struct commit *commit);