{"thread":{"id":"21202","subject":"What's cooking in git.git (Oct 2009, #02; Sun, 11)","startedAt":"2009-10-12T03:18:17Z","lastAt":"2009-10-15T10:34:20Z","messageCount":14,"participants":["Junio C Hamano","Jeff King","Sverre Rabbelier","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"124657","messageId":"7vfx9pmhae.fsf@alter.siamese.dyndns.org","threadId":"21202","inReplyTo":null,"subject":"What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-12T03:18:17Z","receivedAt":"2009-10-12T03:18:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed with '-' are\nonly in 'pu' while commits prefixed with '+' are in 'next'.  The ones\nmarked with '.' do not appear in any of the integration branches, but I am\nstill holding onto them.\n\nIn 1.7.0, we plan to correct handful of warts in the interfaces everybody\nagrees that they were mistakes.  The resulting system may not be strictly\nbackward compatible.  Currently planeed changes are:\n\n * refuse push to update the checked out branch in a non-bare repo by\n   default\n\n   Make \"git push\" into a repository to update the branch that is checked\n   out fail by default.  You can countermand this default by setting a\n   configuration variable in the receiving repository.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007\n\n * refuse push to delete the current branch by default\n\n   Make \"git push $there :$killed\" to delete the branch that is pointed at\n   by its HEAD fail by default.  You can countermand this default by\n   setting a configuration variable in the receiving repository.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/108862/focus=108936\n\n * git-send-email won't make deep threads by default\n\n   Many people said that by default when sending more than 2 patches the\n   threading git-send-email makes by default is hard to read, and they\n   prefer the default be one cover letter and each patch as a direct\n   follow-up to the cover letter.  You can countermand this by setting a\n   configuration variable.\n\n   http://article.gmane.org/gmane.comp.version-control.git/109790\n\n * git-status won't be \"git-commit --dry-run\" anymore\n\n   http://thread.gmane.org/gmane.comp.version-control.git/125989/focus=125993\n\n * \"git-diff -w --exit-code\" will exit success if only differences it\n   found are whitespace changes that are stripped away from the output.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/119731/focus=119751\n\nAs a post-release ritual, I've rebuilt 'next' on top of 'master'.\n\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* ch/am-header (2009-09-25) 2 commits\n  (merged to 'next' on 2009-09-25 at f86e197)\n + git-am: force egrep to use correct characters set\n + git-am: fixed patch_format detection according to RFC2822\n\n* ef/msvc-noreturn (2009-09-30) 2 commits\n  (merged to 'next' on 2009-10-07 at 66137a0)\n + add NORETURN_PTR for function pointers\n + increase portability of NORETURN declarations\n\njk: This is the latest round and I think should be ready for at least\n'next' (maybe even 'master' as it is really about the build and not about\nfunctionality).\n\n* fc/mutt-alias (2009-09-30) 1 commit\n  (merged to 'next' on 2009-10-07 at df7ac20)\n + send-email: fix mutt regex for grouped aliases\n\njk: Latest round that addressed comments. Ready for 'next' if not\n'master'.\n\n* jk/reflog-date (2009-09-24) 1 commit\n  (merged to 'next' on 2009-09-29 at 43d444a)\n + improve reflog date/number heuristic\n\n--------------------------------------------------\n[New Topics]\n\n* jp/maint-send-email-fold (2009-10-08) 1 commit.\n - git-send-email.perl: fold multiple entry \"Cc:\" and multiple single line \"RCPT TO:\"s\n\n* ks/precompute-completion (2009-10-05) 1 commit.\n - Speedup bash completion loading\n\n* pv/maint-add-p-no-exclude (2009-10-10) 1 commit.\n  (merged to 'next' on 2009-10-11 at 0ff2e96)\n + git-add--interactive: never skip files included in index\n\n* sp/smart-http (2009-10-08) 4 commits.\n - Smart fetch and push over HTTP: server side\n - Add smart-http options to upload-pack, receive-pack\n - Git-aware CGI to provide dumb HTTP transport\n - Document the HTTP transport protocol\n\n--------------------------------------------------\n[Stalled]\n\n* sr/gfi-options (2009-09-06) 6 commits.\n - fast-import: test the new option command\n - fast-import: add option command\n - fast-import: test the new feature command\n - fast-import: add feature command\n - fast-import: put marks reading in it's own function\n - fast-import: put option parsing code in separate functions\n\nEjected from 'next' as fast-import folks still seem to be discussing with\nhow to proceed.\n\n* je/send-email-no-subject (2009-08-05) 1 commit.\n  (merged to 'next' on 2009-10-11 at 1b99c56)\n + send-email: confirm on empty mail subjects\n\nThe existing tests cover the positive case (i.e. as long as the user says\n\"yes\" to the \"do you really want to send this message that lacks subject\",\nthe message is sent) of this feature, but the feature itself needs its own\ntest to verify the negative case (i.e. does it correctly stop if the user\nsays \"no\"?)\n\n* jh/cvs-helper (2009-08-18) 8 commits.\n - More fixes to the git-remote-cvs installation procedure\n - Fix the Makefile-generated path to the git_remote_cvs package in git-remote-cvs\n - Add simple selftests of git-remote-cvs functionality\n - git-remote-cvs: Remote helper program for CVS repositories\n - 2/2: Add Python support library for CVS remote helper\n - 1/2: Add Python support library for CVS remote helper\n - Basic build infrastructure for Python scripts\n - Allow helpers to request marks for fast-import\n (this branch uses db/vcs-helper-rest.)\n\nBuilds on db/vcs-helper.  There is a re-roll planned.\n\n* ne/rev-cache (2009-09-07) 7 commits.\n . support for commit grafts, slight change to general mechanism\n . support for path name caching in rev-cache\n . full integration of rev-cache into git, completed test suite\n . administrative functions for rev-cache, start of integration into git\n . support for non-commit object caching in rev-cache\n . basic revision cache system, no integration or features\n . man page and technical discussion for rev-cache\n\nThis seems to break at least t6001 when merged to 'pu'.\n\n--------------------------------------------------\n[Cooking]\n\n* dk/blame-el (2009-09-29) 1 commit.\n - git-blame.el: Change how blame information is shown.\n\nSoon in 'next'.\n\n* ef/msys-imap (2009-10-09) 8 commits.\n - MSVC: Enable OpenSSL, and translate -lcrypto\n - mingw: enable OpenSSL\n - mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle\n - imap-send: build imap-send on Windows\n - imap-send: fix compilation-error on Windows\n - imap-send: use run-command API for tunneling\n - imap-send: use separate read and write fds\n - imap-send: remove useless uid code\n\n* jn/gitweb-patch (2009-10-09) 1 commit.\n - gitweb: Do not show 'patch' link for merge commits\n\nSoon in 'next'\n\n* mr/gitweb-snapshot (2009-09-26) 2 commits.\n - gitweb: append short hash ids to snapshot files\n  (merged to 'next' on 2009-10-11 at 22ba047)\n + gitweb: check given hash before trying to create snapshot\n\n* mr/instaweb-cgid (2009-09-26) 1 commit.\n  (merged to 'next' on 2009-10-11 at 99bcfaf)\n + instaweb: support mod_cgid for apache2\n\n* tf/doc-pt-br (2009-09-23) 1 commit.\n - Documentation: update pt-BR\n\nThe current AsciiDoc may barf on NOME and SINOPSE, as pt_BR language\ndefinition is not widely distributed yet (it just hit the development\ntree).  Need to revert these headings (or change the length of the section\nunderlines to match the length of translated names).\n\n* jc/pretty-lf (2009-10-04) 1 commit.\n - Pretty-format: %[+-]x to tweak inter-item newlines\n\nI am not happy with this one yet.  I am contemplating to introduce a new\nsyntax \"%[magic(param)<anything>%]\" to generalize expressions of this and\nline wrapping features in an extensible way.\n\n* js/log-rewrap (2008-11-10) 3 commits.\n . Add \"%w\" to pretty formats, which rewraps the commit message\n - Add strbuf_add_wrapped_text() to utf8.[ch]\n - print_wrapped_text(): allow hard newlines\n... and the first two from this series will be useful to implement an\nexample magic \"wrap\", e.g. \"%[wrap(i,j,w)%s%+b%]\".\n\n* jg/log-format-body-indent (2009-09-19) 1 commit.\n - git-log --format: Add %B tag with %B(x) option\n\nI think we should redo this on top of the first two patches from\njs/log-rewrap series; %B(x) is just a special case %B(x,x,0), no?  If a\nmagic value 0 (or negative) given to wrap-width does not disable wrapping,\nwe probably should make it so.\n\n* bg/rebase-reword (2009-10-07) 1 commit.\n - Teach 'rebase -i' the command \"reword\"\n\nSoon in 'next'\n\n* js/diff-verbose-submodule (2009-10-04) 1 commit.\n - Add the --submodule-summary option to the diff option family\n\nDscho sounded like he has some corrections after list comments, but I did\nnot pick up his interdiff in the middle.\n\n* jl/submodule-add-noname (2009-09-22) 1 commit.\n - git submodule add: make the <path> parameter optional\n\nDscho started an interesting discussion regarding the larger workflow in\nwhich the \"submodule add\" is used.  I think the patch itself makes sense\nbut at the same time it probably makes sense to also take the <path> and\ninfer the <repository> as Dscho suggested, probably in \"git submodule\nadd\", not in \"git add\" proper, at least initially.\n\n* jc/fix-tree-walk (2009-09-14) 10 commits.\n - read-tree --debug-unpack\n - unpack-trees.c: look ahead in the index\n - unpack-trees.c: prepare for looking ahead in the index\n - Aggressive three-way merge: fix D/F case\n - traverse_trees(): handle D/F conflict case sanely\n - more D/F conflict tests\n - tests: move convenience regexp to match object names to test-lib.sh\n - unpack_callback(): use unpack_failed() consistently\n - unpack-trees: typofix\n - diff-lib.c: fix misleading comments on oneway_diff()\n\nThis is my replacement for Linus's lt/maint-traverse-trees-fix patch.  It\nis not so much as a counter-proposal; I originally thought it might make\nsense to walk the index and drive the walker to return the entries from\ntrees to match entries from the index, but I ended up doing pretty much\nwhat Linus outlined --- walk the trees, and have the index walker follow\nit.  It turned out that the index side also needed some hairy look-ahead,\n\nThis includes the fix to aggressive mode of three-way merge used by the\nresolve strategy.  I think the series is Ok for 'next'.\n\n* jp/fetch-tag-match (2009-09-17) 1 commit.\n - fetch: Speed up fetch by rewriting find_non_local_tags\n\nI just queued this without reading nor thinking about it very much.  I\npersonally liked my version that had far smaller number of lines changed\n(which means I can be fairly certain that it did not introduce any\nregression), but perhaps the majorly rewritten logic this patch gives us\nmay be easier to follow and maintain.\n\n* jc/maint-blank-at-eof (2009-09-15) 0 commits.\n (this branch uses jc/maint-1.6.0-blank-at-eof.)\n\nThe series does not have a commit of its own but is a preparation for\nmerging the original jc/1.6.0-maint-blank-at-eof topic to 'maint' and then\n'master'\n\nSoon in 'next'\n\n* db/vcs-helper-rest (2009-09-03) 6 commits.\n - Allow helpers to report in \"list\" command that the ref is unchanged\n - Add support for \"import\" helper command\n - Add a config option for remotes to specify a foreign vcs\n - Allow programs to not depend on remotes having urls\n - Allow fetch to modify refs\n - Use a function to determine whether a remote is valid\n (this branch is used by jh/cvs-helper.)\n\nThis holds the remainder of the db/vcs-helper topic that has already\nmerged in 1.6.5.\n\n* jh/notes (2009-10-09) 22 commits.\n - fast-import: Proper notes tree manipulation using the notes API\n - Refactor notes concatenation into a flexible interface for combining notes\n - Notes API: Allow multiple concurrent notes trees with new struct notes_tree\n - Notes API: for_each_note(): Traverse the entire notes tree with a callback\n - Notes API: get_note(): Return the note annotating the given object\n - Notes API: add_note(): Add note objects to the internal notes tree structure\n - Notes API: init_notes(): Initialize the notes tree from the given notes ref\n - Notes API: get_commit_notes() -> format_note() + remove the commit restriction\n - Add selftests verifying concatenation of multiple notes for the same commit\n - Refactor notes code to concatenate multiple notes annotating the same object\n - Add selftests verifying that we can parse notes trees with various fanouts\n - Teach the notes lookup code to parse notes trees with various fanout schemes\n - Teach notes code to free its internal data structures on request\n - Add '%N'-format for pretty-printing commit notes\n - Add flags to get_commit_notes() to control the format of the note string\n - t3302-notes-index-expensive: Speed up create_repo()\n - fast-import: Add support for importing commit notes\n - Teach \"-m <msg>\" and \"-F <file>\" to \"git notes edit\"\n - Add an expensive test for git-notes\n - Speed up git notes lookup\n - Add a script to edit/inspect notes\n - Introduce commit notes\n\nRerolled and queued.\n\n* jn/gitweb-show-size (2009-09-07) 1 commit.\n - gitweb: Add 'show-sizes' feature to show blob sizes in tree view\n\nSoon in 'next'\n\n* jc/maint-1.6.0-blank-at-eof (2009-09-14) 15 commits.\n  (merged to 'next' on 2009-10-11 at 7f34fb3)\n + diff -B: colour whitespace errors\n + diff.c: emit_add_line() takes only the rest of the line\n + diff.c: split emit_line() from the first char and the rest of the line\n + diff.c: shuffling code around\n + diff --whitespace: fix blank lines at end\n + core.whitespace: split trailing-space into blank-at-{eol,eof}\n + diff --color: color blank-at-eof\n + diff --whitespace=warn/error: fix blank-at-eof check\n + diff --whitespace=warn/error: obey blank-at-eof\n + diff.c: the builtin_diff() deals with only two-file comparison\n + apply --whitespace: warn blank but not necessarily empty lines at EOF\n + apply --whitespace=warn/error: diagnose blank at EOF\n + apply.c: split check_whitespace() into two\n + apply --whitespace=fix: detect new blank lines at eof correctly\n + apply --whitespace=fix: fix handling of blank lines at the eof\n (this branch is used by jc/maint-blank-at-eof.)\n\nThis is a fix for an ancient bug (or inconsistent set of features); the\ntopic is based on an ancient codebase and is designed to be merged\nupwards.  jc/maint-blank-at-eof serves that purpose.\n\n* jn/gitweb-blame (2009-09-01) 5 commits.\n - gitweb: Minify gitweb.js if JSMIN is defined\n - gitweb: Create links leading to 'blame_incremental' using JavaScript\n  (merged to 'next' on 2009-10-11 at 73c4a83)\n + gitweb: Colorize 'blame_incremental' view during processing\n + gitweb: Incremental blame (using JavaScript)\n + gitweb: Add optional \"time to generate page\" info in footer\n\nAjax-y blame.\n\n* nd/sparse (2009-08-20) 19 commits.\n - sparse checkout: inhibit empty worktree\n - Add tests for sparse checkout\n - read-tree: add --no-sparse-checkout to disable sparse checkout support\n - unpack-trees(): ignore worktree check outside checkout area\n - unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index\n - unpack-trees(): \"enable\" sparse checkout and load $GIT_DIR/info/sparse-checkout\n - unpack-trees.c: generalize verify_* functions\n - unpack-trees(): add CE_WT_REMOVE to remove on worktree alone\n - Introduce \"sparse checkout\"\n - dir.c: export excluded_1() and add_excludes_from_file_1()\n - excluded_1(): support exclude files in index\n - unpack-trees(): carry skip-worktree bit over in merged_entry()\n - Read .gitignore from index if it is skip-worktree\n - Avoid writing to buffer in add_excludes_from_file_1()\n - Teach Git to respect skip-worktree bit (writing part)\n - Teach Git to respect skip-worktree bit (reading part)\n - Introduce \"skip-worktree\" bit in index, teach Git to get/set this bit\n - Add test-index-version\n - update-index: refactor mark_valid() in preparation for new options\n\n--------------------------------------------------\n[For 1.7.0]\n\n* jk/1.7.0-status (2009-09-05) 5 commits.\n - docs: note that status configuration affects only long format\n  (merged to 'next' on 2009-10-11 at 65c8513)\n + commit: support alternate status formats\n + status: add --porcelain output format\n + status: refactor format option parsing\n + status: refactor short-mode printing to its own function\n (this branch uses jc/1.7.0-status.)\n\nGives the --short output format to post 1.7.0 \"git commit --dry-run\" that\nis similar to that of post 1.7.0 \"git status\".\n\n* jc/1.7.0-status (2009-09-05) 4 commits.\n  (merged to 'next' on 2009-10-11 at 9558627)\n + status: typo fix in usage\n + git status: not \"commit --dry-run\" anymore\n + git stat -s: short status output\n + git stat: the beginning of \"status that is not a dry-run of commit\"\n (this branch is used by jk/1.7.0-status.)\n\nWith this, \"git status\" is no longer \"git commit --dry-run\".\n\n* jc/1.7.0-send-email-no-thread-default (2009-08-22) 1 commit.\n  (merged to 'next' on 2009-10-11 at 043acdf)\n + send-email: make --no-chain-reply-to the default\n\n* jc/1.7.0-diff-whitespace-only-status (2009-08-30) 4 commits.\n  (merged to 'next' on 2009-10-11 at 546c74d)\n + diff.c: fix typoes in comments\n + Make test case number unique\n + diff: Rename QUIET internal option to QUICK\n + diff: change semantics of \"ignore whitespace\" options\n\nThis changes exit code from \"git diff --ignore-whitespace\" and friends\nwhen there is no actual output.  It is a backward incompatible change, but\nwe could argue that it is a bugfix.\n\n* jc/1.7.0-push-safety (2009-02-09) 2 commits.\n  (merged to 'next' on 2009-10-11 at 81b8128)\n + Refuse deleting the current branch via push\n + Refuse updating the current branch in a non-bare repository via push\n\n--------------------------------------------------\n[I have been too busy to purge these]\n\n* jc/log-tz (2009-03-03) 1 commit.\n - Allow --date=local --date=other-format to work as expected\n\nMaybe some people care about this.  I dunno.\n\n* jc/mailinfo-remove-brackets (2009-07-15) 1 commit.\n - mailinfo: -b option keeps [bracketed] strings that is not a [PATCH] marker\n\nMaybe some people care about this.  I dunno.\n\n* lt/read-directory (2009-05-15) 3 commits.\n . Add initial support for pathname conversion to UTF-8\n . read_directory(): infrastructure for pathname character set conversion\n . Add 'fill_directory()' helper function for directory traversal\n\n* cc/reset-merge (2009-09-16) 4 commits.\n . reset: add test cases for \"--merge-safe\" option\n . reset: add option \"--merge-safe\" to \"git reset\"\n . reset: use \"unpack_trees()\" directly instead of \"git read-tree\"\n . reset: add a few tests for \"git reset --merge\"\n\n* cc/sequencer-rebase-i (2009-08-28) 15 commits.\n . rebase -i: use \"git sequencer--helper --cherry-pick\"\n . sequencer: add \"--cherry-pick\" option to \"git sequencer--helper\"\n . sequencer: add \"do_commit()\" and related functions working on \"next_commit\"\n . pick: libify \"pick_help_msg()\"\n . revert: libify cherry-pick and revert functionnality\n . rebase -i: use \"git sequencer--helper --fast-forward\"\n . sequencer: let \"git sequencer--helper\" callers set \"allow_dirty\"\n . sequencer: add \"--fast-forward\" option to \"git sequencer--helper\"\n . sequencer: add \"do_fast_forward()\" to perform a fast forward\n . rebase -i: use \"git sequencer--helper --reset-hard\"\n . sequencer: add \"--reset-hard\" option to \"git sequencer--helper\"\n . sequencer: add \"reset_almost_hard()\" and related functions\n . rebase -i: use \"git sequencer--helper --make-patch\"\n . sequencer: add \"make_patch\" function to save a patch\n . sequencer: add \"builtin-sequencer--helper.c\"\n\n* lt/maint-traverse-trees-fix (2009-09-06) 1 commit.\n . Prepare 'traverse_trees()' for D/F conflict lookahead\n"},{"id":"124663","messageId":"20091012051442.GB23007@coredump.intra.peff.net","threadId":"21202","inReplyTo":"7vfx9pmhae.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-10-12T05:14:42Z","receivedAt":"2009-10-12T05:14:42Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Oct 11, 2009 at 08:18:17PM -0700, Junio C Hamano wrote:\n\n> * jk/1.7.0-status (2009-09-05) 5 commits.\n>  - docs: note that status configuration affects only long format\n>   (merged to 'next' on 2009-10-11 at 65c8513)\n>  + commit: support alternate status formats\n>  + status: add --porcelain output format\n>  + status: refactor format option parsing\n>  + status: refactor short-mode printing to its own function\n>  (this branch uses jc/1.7.0-status.)\n> \n> Gives the --short output format to post 1.7.0 \"git commit --dry-run\" that\n> is similar to that of post 1.7.0 \"git status\".\n> \n> * jc/1.7.0-status (2009-09-05) 4 commits.\n>   (merged to 'next' on 2009-10-11 at 9558627)\n>  + status: typo fix in usage\n>  + git status: not \"commit --dry-run\" anymore\n>  + git stat -s: short status output\n>  + git stat: the beginning of \"status that is not a dry-run of commit\"\n>  (this branch is used by jk/1.7.0-status.)\n> \n> With this, \"git status\" is no longer \"git commit --dry-run\".\n\nHmm. I thought you wanted to re-order some of these for to put the\nporcelain and short formats into v1.6.6, but leave the status switchover\nfor v1.7.0.\n\nWe can always revert selectively, but I though the post-v1.6.5 rewind\nwould be a good time to re-order.\n\n-Peff\n"},{"id":"124672","messageId":"fabb9a1e0910112323x35798972qe213025f37af82b3@mail.gmail.com","threadId":"21202","inReplyTo":"7vfx9pmhae.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-10-12T06:23:02Z","receivedAt":"2009-10-12T06:23:02Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Mon, Oct 12, 2009 at 05:18, Junio C Hamano <gitster@pobox.com> wrote:\n> [Stalled]\n>\n> * sr/gfi-options (2009-09-06) 6 commits.\n>  - fast-import: test the new option command\n>  - fast-import: add option command\n>  - fast-import: test the new feature command\n>  - fast-import: add feature command\n>  - fast-import: put marks reading in it's own function\n>  - fast-import: put option parsing code in separate functions\n>\n> Ejected from 'next' as fast-import folks still seem to be discussing with\n> how to proceed.\n\nThanks, I hope to have this re-rolled before 1.6.6 goes into RC.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"124772","messageId":"7vmy3w9qdd.fsf@alter.siamese.dyndns.org","threadId":"21202","inReplyTo":"20091012051442.GB23007@coredump.intra.peff.net","subject":"Re: What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-12T22:52:46Z","receivedAt":"2009-10-12T22:52:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sun, Oct 11, 2009 at 08:18:17PM -0700, Junio C Hamano wrote:\n>\n>> * jk/1.7.0-status (2009-09-05) 5 commits.\n>>  - docs: note that status configuration affects only long format\n>>   (merged to 'next' on 2009-10-11 at 65c8513)\n>>  + commit: support alternate status formats\n>>  + status: add --porcelain output format\n>>  + status: refactor format option parsing\n>>  + status: refactor short-mode printing to its own function\n>>  (this branch uses jc/1.7.0-status.)\n>> \n>> Gives the --short output format to post 1.7.0 \"git commit --dry-run\" that\n>> is similar to that of post 1.7.0 \"git status\".\n>> \n>> * jc/1.7.0-status (2009-09-05) 4 commits.\n>>   (merged to 'next' on 2009-10-11 at 9558627)\n>>  + status: typo fix in usage\n>>  + git status: not \"commit --dry-run\" anymore\n>>  + git stat -s: short status output\n>>  + git stat: the beginning of \"status that is not a dry-run of commit\"\n>>  (this branch is used by jk/1.7.0-status.)\n>> \n>> With this, \"git status\" is no longer \"git commit --dry-run\".\n>\n> Hmm. I thought you wanted to re-order some of these for to put the\n> porcelain and short formats into v1.6.6, but leave the status switchover\n> for v1.7.0.\n\nWe could build an alternate history between 3fa509d..46b77a6, revert the\nmerges 9558627 and 65c8513, and merge the alternate history.  But is the\nshort format support so solid that it deserves to be in 1.6.6 in the\ncurrent shape?\n"},{"id":"124923","messageId":"20091014042417.GA28795@coredump.intra.peff.net","threadId":"21202","inReplyTo":"7vmy3w9qdd.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-10-14T04:24:17Z","receivedAt":"2009-10-14T04:24:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Oct 12, 2009 at 03:52:46PM -0700, Junio C Hamano wrote:\n\n> > Hmm. I thought you wanted to re-order some of these for to put the\n> > porcelain and short formats into v1.6.6, but leave the status switchover\n> > for v1.7.0.\n> \n> We could build an alternate history between 3fa509d..46b77a6, revert the\n> merges 9558627 and 65c8513, and merge the alternate history.  But is the\n> short format support so solid that it deserves to be in 1.6.6 in the\n> current shape?\n\nSomewhere I seem to recall you saying that it would be nice to give the\n--short format some wider exposure as \"git status --short\" before making\nthe \"status is no longer commit --dry-run\" switch-over. But now I can't\nfind that message anywhere.\n\nLet's not worry about it.\n\n-Peff\n"},{"id":"125000","messageId":"4AD61880.4040600@web.de","threadId":"21202","inReplyTo":"7vfx9pmhae.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Oct 2009, #02; Sun, 11)","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T18:29:20Z","receivedAt":"2009-10-14T18:29:20Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Junio C Hamano schrieb:\n> * js/diff-verbose-submodule (2009-10-04) 1 commit.\n>  - Add the --submodule-summary option to the diff option family\n> \n> Dscho sounded like he has some corrections after list comments, but I did\n> not pick up his interdiff in the middle.\n\nDscho condensed his initial patch with the interdiff you mentioned,\nadditionally silenced a compiler warning and activated --first-parent.\nThis follows as patch 1/4. Patches 2/4 to 4/4 contain my two bugfixes\nand the testcase i copied from submodule summary while adapting it to\nthe changes of the output format.\n\nThe remaining differences from the output shown by submodule summary are:\n\n1) git diff shows only two dots for a fast forward (submodule summary\n   always shows three)\n2) git diff shows \"Submodule\" instead of a single '*' in the first line\n3) git diff doesn't add a newline after each shortlog\n4) submodule summary prints out the number of shortlog entries, this\n   version does not\n5) submodule summary can limit the number of shortlog lines, git diff\n   can't do that right now\n6) When files are replaced by a submodules or vice versa, git diff\n   generates an extra hunk for the deleted/added file and one saying\n   \"(new submodule)\"/\"(submodule deleted)\"\n\n\n> The output format needs to be described better here and also in\n> Documentation/diff-format.txt.\n\nWill do when it is clear which of the 6 differences should be fixed and\nwhich can stay.\n\n\nJens Lehmann (3):\n  fix indentation depth for git diff --submodule-summary\n  fix output for deleted submodules in git diff --submodule-summary\n  add tests for git diff --submodule-summary\n\nJohannes Schindelin (1):\n  Add the --submodule-summary option to the diff option family\n\n Documentation/diff-options.txt    |    4 +\n Makefile                          |    2 +\n diff.c                            |   14 +++\n diff.h                            |    3 +\n submodule.c                       |  113 ++++++++++++++++++++\n submodule.h                       |    8 ++\n t/t4041-diff-submodule-summary.sh |  206 +++++++++++++++++++++++++++++++++++++\n 7 files changed, 350 insertions(+), 0 deletions(-)\n create mode 100644 submodule.c\n create mode 100644 submodule.h\n create mode 100755 t/t4041-diff-submodule-summary.sh\n"},{"id":"124999","messageId":"4AD618D3.3020105@web.de","threadId":"21202","inReplyTo":"4AD61880.4040600@web.de","subject":"[PATCH 1/4] Add the --submodule-summary option to the diff option family","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T18:30:43Z","receivedAt":"2009-10-14T18:30:43Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Now you can see the submodule summaries inlined in the diff, instead of\nnot-quite-helpful SHA-1 pairs.\n\nThe format imitates what \"git submodule summary\" shows.\n\nTo do that, <path>/.git/objects/ is added to the alternate object\ndatabases (if that directory exists).\n\nThis option was requested by Jens Lehmann at the GitTogether in Berlin.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/diff-options.txt |    4 ++\n Makefile                       |    2 +\n diff.c                         |   14 +++++\n diff.h                         |    3 +\n submodule.c                    |  113 ++++++++++++++++++++++++++++++++++++++++\n submodule.h                    |    8 +++\n 6 files changed, 144 insertions(+), 0 deletions(-)\n create mode 100644 submodule.c\n create mode 100644 submodule.h\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 9276fae..5fcc5a8 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -87,6 +87,10 @@ endif::git-format-patch[]\n \tShow only names and status of changed files. See the description\n \tof the `--diff-filter` option on what the status letters mean.\n\n+--submodule-summary::\n+\tInstead of showing pairs of commit names, list the commits in that\n+\tcommit range in the same style as linkgit:git-submodule[1].\n+\n --color::\n \tShow colored diff.\n\ndiff --git a/Makefile b/Makefile\nindex fea237b..2356de4 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -452,6 +452,7 @@ LIB_H += sideband.h\n LIB_H += sigchain.h\n LIB_H += strbuf.h\n LIB_H += string-list.h\n+LIB_H += submodule.h\n LIB_H += tag.h\n LIB_H += transport.h\n LIB_H += tree.h\n@@ -550,6 +551,7 @@ LIB_OBJS += sideband.o\n LIB_OBJS += sigchain.o\n LIB_OBJS += strbuf.o\n LIB_OBJS += string-list.o\n+LIB_OBJS += submodule.o\n LIB_OBJS += symlinks.o\n LIB_OBJS += tag.o\n LIB_OBJS += trace.o\ndiff --git a/diff.c b/diff.c\nindex e1be189..bcf2f77 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -13,6 +13,7 @@\n #include \"utf8.h\"\n #include \"userdiff.h\"\n #include \"sigchain.h\"\n+#include \"submodule.h\"\n\n #ifdef NO_FAST_WORKING_DIRECTORY\n #define FAST_WORKING_DIRECTORY 0\n@@ -1453,6 +1454,17 @@ static void builtin_diff(const char *name_a,\n \tconst char *a_prefix, *b_prefix;\n \tconst char *textconv_one = NULL, *textconv_two = NULL;\n\n+\tif (DIFF_OPT_TST(o, SUMMARIZE_SUBMODULES) &&\n+\t\t\t(!one->mode || S_ISGITLINK(one->mode)) &&\n+\t\t\t(!two->mode || S_ISGITLINK(two->mode))) {\n+\t\tconst char *del = diff_get_color_opt(o, DIFF_FILE_OLD);\n+\t\tconst char *add = diff_get_color_opt(o, DIFF_FILE_NEW);\n+\t\tshow_submodule_summary(o->file, one ? one->path : two->path,\n+\t\t\t\tone->sha1, two->sha1,\n+\t\t\t\tdel, add, reset);\n+\t\treturn;\n+\t}\n+\n \tif (DIFF_OPT_TST(o, ALLOW_TEXTCONV)) {\n \t\ttextconv_one = get_textconv(one);\n \t\ttextconv_two = get_textconv(two);\n@@ -2640,6 +2652,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\tDIFF_OPT_CLR(options, ALLOW_TEXTCONV);\n \telse if (!strcmp(arg, \"--ignore-submodules\"))\n \t\tDIFF_OPT_SET(options, IGNORE_SUBMODULES);\n+\telse if (!strcmp(arg, \"--submodule-summary\"))\n+\t\tDIFF_OPT_SET(options, SUMMARIZE_SUBMODULES);\n\n \t/* misc options */\n \telse if (!strcmp(arg, \"-z\"))\ndiff --git a/diff.h b/diff.h\nindex 6616877..9019f6f 100644\n--- a/diff.h\n+++ b/diff.h\n@@ -66,6 +66,9 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,\n #define DIFF_OPT_DIRSTAT_CUMULATIVE  (1 << 19)\n #define DIFF_OPT_DIRSTAT_BY_FILE     (1 << 20)\n #define DIFF_OPT_ALLOW_TEXTCONV      (1 << 21)\n+\n+#define DIFF_OPT_SUMMARIZE_SUBMODULES (1 << 23)\n+\n #define DIFF_OPT_TST(opts, flag)    ((opts)->flags & DIFF_OPT_##flag)\n #define DIFF_OPT_SET(opts, flag)    ((opts)->flags |= DIFF_OPT_##flag)\n #define DIFF_OPT_CLR(opts, flag)    ((opts)->flags &= ~DIFF_OPT_##flag)\ndiff --git a/submodule.c b/submodule.c\nnew file mode 100644\nindex 0000000..129583b\n--- /dev/null\n+++ b/submodule.c\n@@ -0,0 +1,113 @@\n+#include \"cache.h\"\n+#include \"submodule.h\"\n+#include \"dir.h\"\n+#include \"diff.h\"\n+#include \"commit.h\"\n+#include \"revision.h\"\n+\n+int add_submodule_odb(const char *path)\n+{\n+\tstruct strbuf objects_directory = STRBUF_INIT;\n+\tstruct alternate_object_database *alt_odb;\n+\n+\tstrbuf_addf(&objects_directory, \"%s/.git/objects/\", path);\n+\tif (!is_directory(objects_directory.buf))\n+\t\treturn -1;\n+\n+\t/* avoid adding it twice */\n+\tfor (alt_odb = alt_odb_list; alt_odb; alt_odb = alt_odb->next)\n+\t\tif (alt_odb->name - alt_odb->base == objects_directory.len &&\n+\t\t\t\t!strncmp(alt_odb->base, objects_directory.buf,\n+\t\t\t\t\tobjects_directory.len))\n+\t\t\treturn 0;\n+\n+\talt_odb = xmalloc(objects_directory.len + 42 + sizeof(*alt_odb));\n+\talt_odb->next = alt_odb_list;\n+\tstrcpy(alt_odb->base, objects_directory.buf);\n+\talt_odb->name = alt_odb->base + objects_directory.len;\n+\talt_odb->name[2] = '/';\n+\talt_odb->name[40] = '\\0';\n+\talt_odb->name[41] = '\\0';\n+\talt_odb_list = alt_odb;\n+\tprepare_alt_odb();\n+\treturn 0;\n+}\n+\n+void show_submodule_summary(FILE *f, const char *path,\n+\t\tunsigned char one[20], unsigned char two[20],\n+\t\tconst char *del, const char *add, const char *reset)\n+{\n+\tstruct rev_info rev;\n+\tstruct commit *commit, *left = left, *right;\n+\tstruct commit_list *merge_bases, *list;\n+\tconst char *message = NULL;\n+\tstruct strbuf sb = STRBUF_INIT;\n+\tstatic const char *format = \"    %m %s\";\n+\tint fast_forward = 0, fast_backward = 0;\n+\n+\tif (add_submodule_odb(path))\n+\t\tmessage = \"(not checked out)\";\n+\telse if (is_null_sha1(one))\n+\t\tmessage = \"(new submodule)\";\n+\telse if (is_null_sha1(two))\n+\t\tmessage = \"(submodule deleted)\";\n+\telse if (!(left = lookup_commit_reference(one)) ||\n+\t\t !(right = lookup_commit_reference(two)))\n+\t\tmessage = \"(commits not present)\";\n+\n+\tif (!message) {\n+\t\tinit_revisions(&rev, NULL);\n+\t\tsetup_revisions(0, NULL, &rev, NULL);\n+\t\trev.left_right = 1;\n+\t\trev.first_parent_only = 1;\n+\t\tleft->object.flags |= SYMMETRIC_LEFT;\n+\t\tadd_pending_object(&rev, &left->object, path);\n+\t\tadd_pending_object(&rev, &right->object, path);\n+\t\tmerge_bases = get_merge_bases(left, right, 1);\n+\t\tif (merge_bases) {\n+\t\t\tif (merge_bases->item == left)\n+\t\t\t\tfast_forward = 1;\n+\t\t\telse if (merge_bases->item == right)\n+\t\t\t\tfast_backward = 1;\n+\t\t}\n+\t\tfor (list = merge_bases; list; list = list->next) {\n+\t\t\tlist->item->object.flags |= UNINTERESTING;\n+\t\t\tadd_pending_object(&rev, &list->item->object,\n+\t\t\t\tsha1_to_hex(list->item->object.sha1));\n+\t\t}\n+\t\tif (prepare_revision_walk(&rev))\n+\t\t\tmessage = \"(revision walker failed)\";\n+\t}\n+\n+\tstrbuf_addf(&sb, \"Submodule %s %s..\", path,\n+\t\t\tfind_unique_abbrev(one, DEFAULT_ABBREV));\n+\tif (!fast_backward && !fast_forward)\n+\t\tstrbuf_addch(&sb, '.');\n+\tstrbuf_addf(&sb, \"%s\", find_unique_abbrev(two, DEFAULT_ABBREV));\n+\tif (message)\n+\t\tstrbuf_addf(&sb, \" %s\\n\", message);\n+\telse\n+\t\tstrbuf_addf(&sb, \"%s:\\n\", fast_backward ? \" (rewind)\" : \"\");\n+\tfwrite(sb.buf, sb.len, 1, f);\n+\n+\tif (!message) {\n+\t\twhile ((commit = get_revision(&rev))) {\n+\t\t\tstrbuf_setlen(&sb, 0);\n+\t\t\tif (commit->object.flags & SYMMETRIC_LEFT) {\n+\t\t\t\tif (del)\n+\t\t\t\t\tstrbuf_addstr(&sb, del);\n+\t\t\t}\n+\t\t\telse if (add)\n+\t\t\t\tstrbuf_addstr(&sb, add);\n+\t\t\tformat_commit_message(commit, format, &sb,\n+\t\t\t\t\trev.date_mode);\n+\t\t\tif (reset)\n+\t\t\t\tstrbuf_addstr(&sb, reset);\n+\t\t\tstrbuf_addch(&sb, '\\n');\n+\t\t\tfprintf(f, \"%s\", sb.buf);\n+\t\t}\n+\t\tclear_commit_marks(left, ~0);\n+\t\tclear_commit_marks(right, ~0);\n+\t}\n+\tstrbuf_release(&sb);\n+}\ndiff --git a/submodule.h b/submodule.h\nnew file mode 100644\nindex 0000000..4c0269d\n--- /dev/null\n+++ b/submodule.h\n@@ -0,0 +1,8 @@\n+#ifndef SUBMODULE_H\n+#define SUBMODULE_H\n+\n+void show_submodule_summary(FILE *f, const char *path,\n+\t\tunsigned char one[20], unsigned char two[20],\n+\t\tconst char *del, const char *add, const char *reset);\n+\n+#endif\n-- \n1.6.5.4.g707c\n"},{"id":"124996","messageId":"4AD618EE.8070102@web.de","threadId":"21202","inReplyTo":"4AD61880.4040600@web.de","subject":"[PATCH 2/4] fix indentation depth for git diff --submodule-summary","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T18:31:10Z","receivedAt":"2009-10-14T18:31:10Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Indentation depth was 4, but submodule summary uses 2 as other shortlogs\ndo too.\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n submodule.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/submodule.c b/submodule.c\nindex 129583b..5076113 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -42,7 +42,7 @@ void show_submodule_summary(FILE *f, const char *path,\n \tstruct commit_list *merge_bases, *list;\n \tconst char *message = NULL;\n \tstruct strbuf sb = STRBUF_INIT;\n-\tstatic const char *format = \"    %m %s\";\n+\tstatic const char *format = \"  %m %s\";\n \tint fast_forward = 0, fast_backward = 0;\n\n \tif (add_submodule_odb(path))\n-- \n1.6.5.4.g707c\n"},{"id":"124998","messageId":"4AD6190C.4050804@web.de","threadId":"21202","inReplyTo":"4AD61880.4040600@web.de","subject":"[PATCH 3/4] fix output for deleted submodules in git diff --submodule-summary","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T18:31:40Z","receivedAt":"2009-10-14T18:31:40Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"When a submodule has been deleted, add_submodule_odb() returns false\nbecause the directory of the submodule is gone. So we have to test the\nsecond sha for null before we call add_submodule_odb() to get the correct\noutput.\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n submodule.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/submodule.c b/submodule.c\nindex 5076113..d5fce7a 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -45,12 +45,12 @@ void show_submodule_summary(FILE *f, const char *path,\n \tstatic const char *format = \"  %m %s\";\n \tint fast_forward = 0, fast_backward = 0;\n\n-\tif (add_submodule_odb(path))\n+\tif (is_null_sha1(two))\n+\t\tmessage = \"(submodule deleted)\";\n+\telse if (add_submodule_odb(path))\n \t\tmessage = \"(not checked out)\";\n \telse if (is_null_sha1(one))\n \t\tmessage = \"(new submodule)\";\n-\telse if (is_null_sha1(two))\n-\t\tmessage = \"(submodule deleted)\";\n \telse if (!(left = lookup_commit_reference(one)) ||\n \t\t !(right = lookup_commit_reference(two)))\n \t\tmessage = \"(commits not present)\";\n-- \n1.6.5.4.g707c\n"},{"id":"125002","messageId":"4AD61928.4000308@web.de","threadId":"21202","inReplyTo":"4AD61880.4040600@web.de","subject":"[PATCH 4/4] add tests for git diff --submodule-summary","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T18:32:08Z","receivedAt":"2009-10-14T18:32:08Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Copied from the submodule summary test and changed to reflect the\ndifferences in the output of git diff --submodule-summary.\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n t/t4041-diff-submodule-summary.sh |  206 +++++++++++++++++++++++++++++++++++++\n 1 files changed, 206 insertions(+), 0 deletions(-)\n create mode 100755 t/t4041-diff-submodule-summary.sh\n\ndiff --git a/t/t4041-diff-submodule-summary.sh b/t/t4041-diff-submodule-summary.sh\nnew file mode 100755\nindex 0000000..dbb19eb\n--- /dev/null\n+++ b/t/t4041-diff-submodule-summary.sh\n@@ -0,0 +1,206 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2009 Jens Lehmann, based on t7401 by Ping Yin\n+#\n+\n+test_description='Summary support for submodules implemented in git diff\n+\n+This test tries to verify the sanity of --submodule-summary option of git diff.\n+'\n+\n+. ./test-lib.sh\n+\n+add_file () {\n+\tsm=$1\n+\tshift\n+\towd=$(pwd)\n+\tcd \"$sm\"\n+\tfor name; do\n+\t\techo \"$name\" > \"$name\" &&\n+\t\tgit add \"$name\" &&\n+\t\ttest_tick &&\n+\t\tgit commit -m \"Add $name\"\n+\tdone >/dev/null\n+\tgit rev-parse --verify HEAD | cut -c1-7\n+\tcd \"$owd\"\n+}\n+commit_file () {\n+\ttest_tick &&\n+\tgit commit \"$@\" -m \"Commit $*\" >/dev/null\n+}\n+\n+test_create_repo sm1 &&\n+add_file . foo >/dev/null\n+\n+head1=$(add_file sm1 foo1 foo2)\n+\n+test_expect_success 'added submodule' \"\n+\tgit add sm1 &&\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 0000000...$head1 (new submodule)\n+EOF\n+\"\n+\n+commit_file sm1 &&\n+head2=$(add_file sm1 foo3)\n+\n+test_expect_success 'modified submodule(forward)' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head1..$head2:\n+  > Add foo3\n+EOF\n+\"\n+\n+test_expect_success 'modified submodule(forward)' \"\n+\tgit diff --submodule-summary >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head1..$head2:\n+  > Add foo3\n+EOF\n+\"\n+\n+commit_file sm1 &&\n+cd sm1 &&\n+git reset --hard HEAD~2 >/dev/null &&\n+head3=$(git rev-parse --verify HEAD | cut -c1-7) &&\n+cd ..\n+\n+test_expect_success 'modified submodule(backward)' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head2..$head3 (rewind):\n+  < Add foo3\n+  < Add foo2\n+EOF\n+\"\n+\n+head4=$(add_file sm1 foo4 foo5) &&\n+head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD)\n+test_expect_success 'modified submodule(backward and forward)' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head2...$head4:\n+  > Add foo5\n+  > Add foo4\n+  < Add foo3\n+  < Add foo2\n+EOF\n+\"\n+\n+commit_file sm1 &&\n+mv sm1 sm1-bak &&\n+echo sm1 >sm1 &&\n+head5=$(git hash-object sm1 | cut -c1-7) &&\n+git add sm1 &&\n+rm -f sm1 &&\n+mv sm1-bak sm1\n+\n+test_expect_success 'typechanged submodule(submodule->blob), --cached' \"\n+\tgit diff --submodule-summary --cached >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 41fbea9...0000000 (submodule deleted)\n+diff --git a/sm1 b/sm1\n+new file mode 100644\n+index 0000000..9da5fb8\n+--- /dev/null\n++++ b/sm1\n+@@ -0,0 +1 @@\n++sm1\n+EOF\n+\"\n+\n+test_expect_success 'typechanged submodule(submodule->blob)' \"\n+\tgit diff --submodule-summary >actual &&\n+\tdiff actual - <<-EOF\n+diff --git a/sm1 b/sm1\n+deleted file mode 100644\n+index 9da5fb8..0000000\n+--- a/sm1\n++++ /dev/null\n+@@ -1 +0,0 @@\n+-sm1\n+Submodule sm1 0000000...$head4 (new submodule)\n+EOF\n+\"\n+\n+rm -rf sm1 &&\n+git checkout-index sm1\n+test_expect_success 'typechanged submodule(submodule->blob)' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head4...0000000 (submodule deleted)\n+diff --git a/sm1 b/sm1\n+new file mode 100644\n+index 0000000..$head5\n+--- /dev/null\n++++ b/sm1\n+@@ -0,0 +1 @@\n++sm1\n+EOF\n+\"\n+\n+rm -f sm1 &&\n+test_create_repo sm1 &&\n+head6=$(add_file sm1 foo6 foo7)\n+test_expect_success 'nonexistent commit' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head4...$head6 (commits not present)\n+EOF\n+\"\n+\n+commit_file\n+test_expect_success 'typechanged submodule(blob->submodule)' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+diff --git a/sm1 b/sm1\n+deleted file mode 100644\n+index $head5..0000000\n+--- a/sm1\n++++ /dev/null\n+@@ -1 +0,0 @@\n+-sm1\n+Submodule sm1 0000000...$head6 (new submodule)\n+EOF\n+\"\n+\n+commit_file sm1 &&\n+rm -rf sm1\n+test_expect_success 'deleted submodule' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head6...0000000 (submodule deleted)\n+EOF\n+\"\n+\n+test_create_repo sm2 &&\n+head7=$(add_file sm2 foo8 foo9) &&\n+git add sm2\n+\n+test_expect_success 'multiple submodules' \"\n+\tgit diff-index -p --submodule-summary HEAD >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head6...0000000 (submodule deleted)\n+Submodule sm2 0000000...$head7 (new submodule)\n+EOF\n+\"\n+\n+test_expect_success 'path filter' \"\n+\tgit diff-index -p --submodule-summary HEAD sm2 >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm2 0000000...$head7 (new submodule)\n+EOF\n+\"\n+\n+commit_file sm2\n+test_expect_success 'given commit' \"\n+\tgit diff-index -p --submodule-summary HEAD^ >actual &&\n+\tdiff actual - <<-EOF\n+Submodule sm1 $head6...0000000 (submodule deleted)\n+Submodule sm2 0000000...$head7 (new submodule)\n+EOF\n+\"\n+\n+test_done\n-- \n1.6.5.4.g707c\n"},{"id":"125019","messageId":"7vfx9lbtpf.fsf_-_@alter.siamese.dyndns.org","threadId":"21202","inReplyTo":"4AD61880.4040600@web.de","subject":"submodule-summary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-14T20:34:36Z","receivedAt":"2009-10-14T20:34:36Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Dscho condensed his initial patch with the interdiff you mentioned,\n> additionally silenced a compiler warning and activated --first-parent.\n> This follows as patch 1/4. Patches 2/4 to 4/4 contain my two bugfixes\n> and the testcase i copied from submodule summary while adapting it to\n> the changes of the output format.\n\nI think 2 and 3 should be squashed into the first one.  I do not see any\ngood reason for keeping initial \"oops that was wrong\" etched in stone,\nonce the review process has revealed obvious bugs and reasonable fixes\nhave been given to them.  If the original author re-spun a v2 patch, that\nis the normal thing that happens.\n\nI am not happy with the option name --submodule-summary, by the way.\nNaming this option --submodule-summary shows the confusion between this\nseries being the _latest_ great invention and this series being the _last_\ngreat invention.  I'd freely grant the former but would like to avoid the\nlatter.\n\nI have this nagging suspicion that we should leave the door open for later\naddition of --submodule=full that actually gives the patch text for the\nentire aggregated tree, perhaps recursively.  People may want to add even\nmore other useful modes that we do not think of right now. It would be\nbetter to name this --submodule=shortlog or something.\n\nIf users like the shortlog mode (or the full mode) very much, perhaps the\ncurrent default output, which shows the differences between two commit\nobject names, can become a --submodule=summary (or --submodule=twoline)\nmode later, and the shortlog mode could become the default.\n\n> The remaining differences from the output shown by submodule summary are:\n>\n> 1) git diff shows only two dots for a fast forward (submodule summary\n>    always shows three)\n> 2) git diff shows \"Submodule\" instead of a single '*' in the first line\n> 3) git diff doesn't add a newline after each shortlog\n> 4) submodule summary prints out the number of shortlog entries, this\n>    version does not\n> 5) submodule summary can limit the number of shortlog lines, git diff\n>    can't do that right now\n> 6) When files are replaced by a submodules or vice versa, git diff\n>    generates an extra hunk for the deleted/added file and one saying\n>    \"(new submodule)\"/\"(submodule deleted)\"\n>\n>> The output format needs to be described better here and also in\n>> Documentation/diff-format.txt.\n>\n> Will do when it is clear which of the 6 differences should be fixed and\n> which can stay.\n\nThanks.\n"},{"id":"125024","messageId":"4AD6423D.10307@web.de","threadId":"21202","inReplyTo":"7vfx9lbtpf.fsf_-_@alter.siamese.dyndns.org","subject":"Re: submodule-summary","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-14T21:27:25Z","receivedAt":"2009-10-14T21:27:25Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Junio C Hamano schrieb:\n> Jens Lehmann <Jens.Lehmann@web.de> writes:\n> \n>> Dscho condensed his initial patch with the interdiff you mentioned,\n>> additionally silenced a compiler warning and activated --first-parent.\n>> This follows as patch 1/4. Patches 2/4 to 4/4 contain my two bugfixes\n>> and the testcase i copied from submodule summary while adapting it to\n>> the changes of the output format.\n> \n> I think 2 and 3 should be squashed into the first one.  I do not see any\n> good reason for keeping initial \"oops that was wrong\" etched in stone,\n> once the review process has revealed obvious bugs and reasonable fixes\n> have been given to them.  If the original author re-spun a v2 patch, that\n> is the normal thing that happens.\n\nRight, will do.\n\n\n> I am not happy with the option name --submodule-summary, by the way.\n> Naming this option --submodule-summary shows the confusion between this\n> series being the _latest_ great invention and this series being the _last_\n> great invention.  I'd freely grant the former but would like to avoid the\n> latter.\n> \n> I have this nagging suspicion that we should leave the door open for later\n> addition of --submodule=full that actually gives the patch text for the\n> entire aggregated tree, perhaps recursively.  People may want to add even\n> more other useful modes that we do not think of right now. It would be\n> better to name this --submodule=shortlog or something.\n> \n> If users like the shortlog mode (or the full mode) very much, perhaps the\n> current default output, which shows the differences between two commit\n> object names, can become a --submodule=summary (or --submodule=twoline)\n> mode later, and the shortlog mode could become the default.\n\nGood point. (Personally i like the options --submodule=shortlog and\n--submodule=twoline. Because IMHO --submodule=summary could make\npeople expect similar output to git submodule summary, no?).\n\nThanks for your feedback, will send new patches soon.\n"},{"id":"125030","messageId":"7vskdla98f.fsf@alter.siamese.dyndns.org","threadId":"21202","inReplyTo":"4AD6423D.10307@web.de","subject":"Re: submodule-summary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-14T22:42:08Z","receivedAt":"2009-10-14T22:42:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Good point. (Personally i like the options --submodule=shortlog and\n> --submodule=twoline. Because IMHO --submodule=summary could make\n> people expect similar output to git submodule summary, no?).\n\nWell, _that_ is something we could fix in \"git submodule\", isn't it?\n\nRight now, the only way \"git submodule\" command can summarize the changes\nis by showing a left-right shortlog, but it wouldn't be so inconceivable\nthat somebody may come up with different and equally useful way to show\nthem, e.g. diffstat, and at that point, we would probably want to have\n\"git submodule summary --stat\" or \"git submodule summary --shortlog\" (and\nthe default being --shortlog).\n\nI am _not_ married to the naming \"shortlog\", by the way, and shortlog is\nrather a bad name for it.  Sorry for suggesting it; it is quite different\nfrom the actual \"git shortlog\" command output (and no I am not suggesting\nto make the output similar to shortlog), but rather is more similar to\n\"log --left-right --oneline\".  But I think you got the point.\n"},{"id":"125069","messageId":"4AD6FAAC.70500@web.de","threadId":"21202","inReplyTo":"7vskdla98f.fsf@alter.siamese.dyndns.org","subject":"Re: submodule-summary","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-10-15T10:34:20Z","receivedAt":"2009-10-15T10:34:20Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Junio C Hamano schrieb:\n> I am _not_ married to the naming \"shortlog\", by the way, and shortlog is\n> rather a bad name for it.  Sorry for suggesting it; it is quite different\n> from the actual \"git shortlog\" command output (and no I am not suggesting\n> to make the output similar to shortlog), but rather is more similar to\n> \"log --left-right --oneline\".  But I think you got the point.\n\nI have no strong feelings about the option names either. What about\n\"--submodule=short\" for the current default git diff output and\n\"--submodule=left-right-log\" for the one resembling the current output\nof submodule summary? I really don't know, if there are better proposals\ni'll happily use them.\n"}]}