Re: git: how to produce context diffs?

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

 



There are a few things to note:

 * Obviously diff.c::builtin_diff() needs to be taught to
   generate the new format, both in the patch text and also in
   the patch and hunk header part.

 * Corresponding changes to builtin-apply.c need to be made;
   most of the functions in the callchain that starts at
   apply_patch() down to apply_one_fragment() need to be taught
   about the copied context format.  Also code to count diffstat
   in builtin-apply.c needs to be adjusted.  This part should be
   done first before diff.c if we were to support copied context
   diff, because we should not be generating what we cannot
   apply.

 * I do not think of a sane way to show a combined diff from
   multiple preimages in copied context format; combine-diff.c
   can probably be left as it is.

I too find larger hunks easier to read with copied context than
with unified context, but what needs to be done listed above is
a nontrivial amount of work.  Since the beginning, git has only
supported unified context format and not copied context format,
and apparently people who lived with git for the last 18 months
have survived without copied context format, so it is of very
low priority even for me right now.

I am not opposed to adding the copied context format as long as
somebody else does the work ;-).

-
To unsubscribe from this list: 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]