Re: Fixes for option parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for fixing this.  I've applied and merged it to the
"next" branch.

In the mid-term, I am hoping we can drop the generate_header()
callchain _and_ the custom code that formats commit log in-core,
found in cmd_log_wc().  rev->use_precomputed_header and perhaps
rev->header can be dropped and replaced with a call to a
function to print formatted log to stdout (or perhaps a FILE *,
because I want to reuse this to make output part of
"git-format-patch" internal) from log-tree.

For that, I'd need to define a new CMIT_FMT for the format-patch
output.  Another thing needed is to clean up the commit_prefix
local variable defined in cmd_log_wc() -- it should use
rev->header_prefix, but before that the part that rewrites
opt->header_prefix to have a blank line between commits, in
log-tree.c::do_diff_combined() and log_tree_commit() need to be
cleaned up.

For the header_prefix line, there also is a subtle difference
between the one-commit diff-tree and log.  The former lists
"this commit (from that commit)", which is perhaps useful for
cut and paste purposes.  The latter just says "this commit".

I wish this "diff-tree SHA1 (from ANOTHERSHA1)" format can be
dropped and replaced with "commit SHA1" format like "git log"
does uniformly, but it might be already depended upon by
Porcelains.

If the commit is not a merge, "commit SHA1" means the same thing
as "diff-tree SHA1 (from SHA1^)", and if it _is_ a merge, then
the merge parents are listed on the "Merge: " line anyway for
all formats other than --pretty=oneline, so unless this change
breaks an Porcelain, there is really no downside.

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]