git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v6 0/3] Add support for displaying submodules as a proper diff

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 15, 2016, 23:06 UTC
Message-ID
<20160815230702.30817-1-jacob.e.keller@intel.com>
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
Next: Jacob Keller
Message 1 of 13 in “Add support for displaying submodules as a proper diff”
  1. 0/3 Add support for displaying submodules as a proper diffJacob Keller, Aug 15, 2016
  2. 1/3 diff.c: remove output_prefix_length fieldJacob Keller, Aug 15, 2016
  3. Junio C HamanoAug 16, 2016
  4. Jacob KellerAug 16, 2016
  5. 2/3 graph: add support for --line-prefix on all graph-aware outputJacob Keller, Aug 15, 2016
  6. Junio C HamanoAug 16, 2016
  7. Jacob KellerAug 16, 2016
  8. 3/3 diff: add SUBMODULE_DIFF format to display submodule diffJacob Keller, Aug 15, 2016
  9. Junio C HamanoAug 16, 2016
  10. Jacob KellerAug 16, 2016
  11. Junio C HamanoAug 16, 2016
  12. Jacob KellerAug 16, 2016
  13. Junio C HamanoAug 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.