git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v6 0/3] Add support for displaying submodules as a proper diff
@ 2016-08-15 23:06 Jacob Keller
  2016-08-15 23:07 ` [PATCH v6 1/3] diff.c: remove output_prefix_length field Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jacob Keller @ 2016-08-15 23:06 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Stefan Beller, Jeff King, Johannes Sixt,
	Jacob Keller

From: Jacob Keller <jacob.keller@gmail.com>

This patch series adds support for displaying a submodule as a
difference between the pre and post commits. This allows projects who
frequently update submodule contents to view the submodule in the log as
if it were just one squashed commit that updates all the files in the
submodule together, even if you mix-match the submodule part with a
regular part you just see a complete diff that shows all the changes.

To make this work, I also extended the graph-aware output with a
--line-prefix option. This option extends both diff and log to show a
prefix. It's a bit of a hack in someways, but it works for showing a
prefix both when graph is enabled and when its not. I think it works
quite well.

I added several tests to the line-prefix, and also a few tests for the
new submodule format.

I welcome comments on how to improve the graph line-prefix code, as well
as the actual submodule diff format.

Jacob Keller (2):
  graph: add support for --line-prefix on all graph-aware output
  diff: add SUBMODULE_DIFF format to display submodule diff

Junio C Hamano (1):
  diff.c: remove output_prefix_length field

 Documentation/diff-config.txt                      |   3 +-
 Documentation/diff-options.txt                     |  10 +-
 builtin/rev-list.c                                 |  70 +-
 diff.c                                             |  49 +-
 diff.h                                             |  11 +-
 graph.c                                            | 105 +--
 graph.h                                            |  22 +-
 log-tree.c                                         |   5 +-
 submodule.c                                        | 130 ++++
 submodule.h                                        |   6 +
 t/t4013-diff-various.sh                            |   6 +
 ...diff.diff_--line-prefix=abc_master_master^_side |  29 +
 t/t4013/diff.diff_--line-prefix_--cached_--_file0  |  15 +
 t/t4059-diff-submodule-option-diff-format.sh       | 738 +++++++++++++++++++++
 t/t4202-log.sh                                     | 323 +++++++++
 15 files changed, 1419 insertions(+), 103 deletions(-)
 create mode 100644 t/t4013/diff.diff_--line-prefix=abc_master_master^_side
 create mode 100644 t/t4013/diff.diff_--line-prefix_--cached_--_file0
 create mode 100755 t/t4059-diff-submodule-option-diff-format.sh

-- 
2.9.2.873.g47c31b4


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-08-16 21:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 23:06 [PATCH v6 0/3] Add support for displaying submodules as a proper diff Jacob Keller
2016-08-15 23:07 ` [PATCH v6 1/3] diff.c: remove output_prefix_length field Jacob Keller
2016-08-16 18:03   ` Junio C Hamano
2016-08-16 18:08     ` Jacob Keller
2016-08-15 23:07 ` [PATCH v6 2/3] graph: add support for --line-prefix on all graph-aware output Jacob Keller
2016-08-16 18:22   ` Junio C Hamano
2016-08-16 20:19     ` Jacob Keller
2016-08-15 23:07 ` [PATCH v6 3/3] diff: add SUBMODULE_DIFF format to display submodule diff Jacob Keller
2016-08-16 18:48   ` Junio C Hamano
2016-08-16 20:25     ` Jacob Keller
2016-08-16 21:14       ` Junio C Hamano
2016-08-16 21:20         ` Jacob Keller
2016-08-16 21:31           ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).