{"thread":{"id":"23330","subject":"What's cooking in git.git (Apr 2010, #02; Sun, 04)","startedAt":"2010-04-04T19:14:03Z","lastAt":"2010-04-08T21:13:18Z","messageCount":8,"participants":["Junio C Hamano","Michael J Gruber","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138550","messageId":"7vtyrr6nes.fsf@alter.siamese.dyndns.org","threadId":"23330","inReplyTo":null,"subject":"What's cooking in git.git (Apr 2010, #02; Sun, 04)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-04T19:14:03Z","receivedAt":"2010-04-04T19:14:03Z","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\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* mg/mailmap-update (2010-03-19) 1 commit\n  (merged to 'next' on 2010-03-28 at 8ac3436)\n + .mailmap: Entries for Alex Bennée, Deskin Miller, Vitaly \"_Vi\" Shukela\n\n* mg/maint-send-email-lazy-editor (2010-03-22) 1 commit\n  (merged to 'next' on 2010-03-28 at 7e8e58e)\n + send-email: lazily assign editor variable\n\n* mg/use-default-abbrev-length-in-rev-list (2010-03-22) 1 commit\n  (merged to 'next' on 2010-03-28 at d3e9f04)\n + rev-list: use default abbrev length when abbrev-commit is in effect\n\n* rb/maint-python-path (2010-03-21) 1 commit\n  (merged to 'next' on 2010-03-28 at 58ba409)\n + Correct references to /usr/bin/python which does not exist on FreeBSD\n\n* rr/imap-send-unconfuse-from-line (2010-03-22) 1 commit\n  (merged to 'next' on 2010-03-28 at fbedd77)\n + imap-send: Remove limitation on message body\n\n* sp/maint-http-backend-die-triggers-die-recursively (2010-03-22) 1 commit\n  (merged to 'next' on 2010-03-28 at bf02879)\n + http-backend: Don't infinite loop during die()\n\n* bc/t5505-fix (2010-03-19) 3 commits\n  (merged to 'next' on 2010-03-28 at 1b097af)\n + t/t5505-remote.sh: escape * to prevent interpretation by shell as glob\n + t5505: add missing &&\n + t5505: remove unnecessary subshell invocations\n\n* bw/template-tool-buildconfig (2010-03-20) 2 commits\n  (merged to 'next' on 2010-03-28 at 1e6fd8d)\n + Modernize git calling conventions in hook templates\n + Make templates honour SHELL_PATH and PERL_PATH\n\n* mb/rebase-i-no-ff (2010-03-24) 1 commit\n  (merged to 'next' on 2010-03-28 at b2c54cb)\n + Teach rebase the --no-ff option.\n\n* jn/merge-diff3-label (2010-03-20) 14 commits\n  (merged to 'next' on 2010-03-20 at 26f1805)\n + merge-recursive: add a label for ancestor\n + cherry-pick, revert: add a label for ancestor\n + revert: clarify label on conflict hunks\n + compat: add mempcpy()\n + checkout -m --conflict=diff3: add a label for ancestor\n + merge_trees(): add ancestor label parameter for diff3-style output\n + merge_file(): add comment explaining behavior wrt conflict style\n + checkout --conflict=diff3: add a label for ancestor\n + ll_merge(): add ancestor label parameter for diff3-style output\n + merge-file --diff3: add a label for ancestor\n + xdl_merge(): move file1 and file2 labels to xmparam structure\n + xdl_merge(): add optional ancestor label to diff3-style output\n + tests: document cherry-pick behavior in face of conflicts\n + tests: document format of conflicts from checkout -m\n (this branch is used by cc/revert-strategy.)\n\n* do/rebase-i-arbitrary (2010-03-14) 1 commit\n  (merged to 'next' on 2010-03-28 at 5ba9970)\n + rebase--interactive: don't require what's rebased to be a branch\n\n* ja/send-email-ehlo (2010-03-14) 3 commits\n  (merged to 'next' on 2010-03-28 at 00964a8)\n + git-send-email.perl - try to give real name of the calling host to HELO/EHLO\n + git-send-email.perl: add option --smtp-debug\n + git-send-email.perl: improve error message in send_message()\n\n* ak/everyday-git (2009-10-21) 1 commit\n  (merged to 'next' on 2010-03-28 at ae67548)\n + everyday: fsck and gc are not everyday operations\n\n* bc/acl-test (2010-03-15) 5 commits\n  (merged to 'next' on 2010-03-28 at b40fa09)\n + t/t1304: make a second colon optional in the mask ACL check\n + t/t1304: set the ACL effective rights mask\n + t/t1304: use 'test -r' to test readability rather than looking at mode bits\n + t/t1304: set the Default ACL base entries\n + t/t1304: avoid -d option to setfacl\n\n* bc/maint-daemon-sans-ss-family (2010-03-15) 1 commit\n  (merged to 'next' on 2010-03-28 at 305ad0b)\n + daemon.c: avoid accessing ss_family member of struct sockaddr_storage\n\n* ef/cherry-abbrev (2010-03-20) 2 commits\n  (merged to 'next' on 2010-03-28 at eb3825c)\n + ls: remove redundant logic\n + cherry: support --abbrev option\n\n* gh/maint-stash-show-error-message (2010-03-16) 1 commit\n  (merged to 'next' on 2010-03-28 at 61a5643)\n + Improve error messages from 'git stash show'\n\n* rs/threaded-grep-context (2010-03-15) 1 commit\n  (merged to 'next' on 2010-03-28 at 1934af1)\n + grep: enable threading for context line printing\n\n--------------------------------------------------\n[New Topics]\n\n* mh/status-optionally-refresh (2010-04-03) 3 commits\n - t7508: add a test for \"git status\" in a read-only repository\n - git status: refresh the index if possible\n - t7508: add test for \"git status\" refreshing the index\n\n* jn/mailinfo-scissors (2010-04-03) 1 commit\n - Teach mailinfo %< as an alternative scissors mark\n\n* tr/word-diff (2010-04-04) 2 commits\n - gitk: add the equivalent of diff --color-words\n - diff: add --word-diff option that generalizes --color-words\n\nThe tip \"gitk\" one I'd prefer to wait until we get Ack from Paulus.\n\n--------------------------------------------------\n[Stalled]\n\n* js/rebase-origin-x (2010-02-05) 1 commit\n - [RFC w/o test and incomplete] rebase: add -x option to record original commit name\n\nI retract my objection against the idea of -x; needs polishing before\nmoving forward.\n\n* js/grep-open (2010-03-26) 2 commits\n - grep -O: allow optional argument specifying the pager (or editor)\n - grep: Add the option '--open-files-in-pager'\n\nProbably needs to support --no-index mode as well.\n\n* sd/log-decorate (2010-02-17) 3 commits\n  (merged to 'next' on 2010-03-08 at 58a6fba)\n + log.decorate: usability fixes\n + Add `log.decorate' configuration variable.\n + git_config_maybe_bool()\n\nNeeds squelching the configuration setting when \"--pretty=raw\" is given,\nat least, or possibly when any \"--pretty\" is explicitly given.\n\n* np/malloc-threading (2010-03-24) 1 commit\n - Make xmalloc and xrealloc thread-safe\n\nStill has locking issues?\n\n* js/async-thread (2010-03-09) 7 commits\n - Enable threaded async procedures whenever pthreads is available\n  (merged to 'next' on 2010-03-20 at 9939243)\n + Dying in an async procedure should only exit the thread, not the process.\n + Reimplement async procedures using pthreads\n + Windows: more pthreads functions\n + Fix signature of fcntl() compatibility dummy\n + Make report() from usage.c public as vreportf() and use it.\n + Modernize t5530-upload-pack-error.\n\nWaiting for resolution of locking issues in malloc-threading.\n\n--------------------------------------------------\n[Cooking]\n\n* sg/bash-completion (2010-02-23) 4 commits\n  (merged to 'next' on 2010-03-08 at bc59860)\n + bash: completion for gitk aliases\n + bash: support user-supplied completion scripts for aliases\n + bash: support user-supplied completion scripts for user's git commands\n + bash: improve aliased command recognition\n\nNobody seems to care about \"_git_frotz\" that may potentially crash with\nwhatever random things the end users is doing in their environment, and\nrenaming them to \"_git_complete_frotz\" to avoid that.  So let's not worry\nabout that.\n\n* cw/ws-indent-with-tab (2010-04-03) 6 commits\n - whitespace: tests for git-apply --whitespace=fix with tab-in-indent\n - whitespace: add tab-in-indent support for --whitespace=fix\n - whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst\n - whitespace: tests for git-diff --check with tab-in-indent error class\n - whitespace: add tab-in-indent error class\n - whitespace: we cannot \"catch all errors known to git\" anymore\n\nLooked sensible.\n\n* ic/bash-completion-rpm (2010-03-26) 1 commit\n  (merged to 'next' on 2010-04-02 at 0358304)\n + RPM spec: include bash completion support\n\nThis is needed in 'master' by -rc1 at the latest.\n\n* mg/notes-reflog (2010-03-29) 2 commits\n - refs.c: Write reflogs for notes just like for branch heads\n - t3301-notes: Test the creation of reflog entries\n\nImplementation is trivially correct; I am unsure if \"notes\" tree wants\nreflog in the first place, though.  Please convince me and I'll move it\nto 'next' soon, aiming for -rc0 or -rc1 at the latest.\n\n* rr/remote-helper-doc (2010-03-28) 2 commits\n - Documentation/remote-helpers: Fix some typos\n - Documentation/remote-helpers: Rewrite description\n\nAlthough I lost track of this series with too rapid succession of\nupdates, intermixed with some documentation updates in the related\nareas, my impression is that area experts haven't Acked them yet.\n\n* sr/remote-helper-export (2010-03-29) 7 commits\n - remote-helpers: add tests for testgit helper\n - remote-helpers: add testgit helper\n - remote-helpers: add support for an export command\n - remote-helpers: allow requesing the path to the .git directory\n - fast-import: always create marks_file directories\n - clone: also configure url for bare clones\n - clone: pass the remote name to remote_get\n\nMay merge to 'next', but I would prefer waiting til 1.7.2 to have\nthis with a confidence than fast-tracking it.\n\n* cc/revert-strategy (2010-03-31) 5 commits\n - revert: add \"--strategy\" option to choose merge strategy\n - merge: make function try_merge_command non static\n - merge: refactor code that calls \"git merge-STRATEGY\"\n - revert: refactor merge recursive code into its own function\n - revert: use strbuf to refactor the code that writes the merge message\n\nMay merge to 'next' soon, but this is more about debugging and we are not\nin a great hurry.\n\n* mr/gitweb-jsmin (2010-04-02) 6 commits\n - gitweb: update INSTALL to use shorter make target\n - gitweb: add documentation to INSTALL regarding gitweb.js\n - instaweb: add minification awareness\n - Gitweb: add autoconfigure support for minifiers\n - Gitweb: add support for minifying gitweb.css\n - Gitweb: add ignore and clean rules for minified files\n\nSoon in 'next', to iron out leftover issues if any.\n\n* sc/http-late-auth (2010-04-01) 1 commit\n  (merged to 'next' on 2010-04-02 at c991acf)\n + Prompt for a username when an HTTP request 401s\n\nI would prefer waiting til 1.7.2 to have this with a confidence than\nfast-tracking it.\n\n* jk/cached-textconv (2010-04-01) 7 commits\n  (merged to 'next' on 2010-04-02 at a023e3c)\n + diff: avoid useless filespec population\n + diff: cache textconv output\n + textconv: refactor calls to run_textconv\n + introduce notes-cache interface\n + make commit_tree a library function\n + fix textconv leak in emit_rewrite_diff\n + fix const-correctness of write_sha1_file\n\nI would prefer waiting til 1.7.2 to have this with a confidence than\nfast-tracking it.\n\n* da/maint-python-startup (2010-03-27) 1 commit\n  (merged to 'next' on 2010-04-01 at ca6897a)\n + Makefile: Remove usage of deprecated Python \"has_key\" method\n\nHopefully will merge to 'master' by -rc0.\n\n* jc/conflict-marker-size (2010-03-24) 1 commit\n  (merged to 'next' on 2010-04-01 at 164b1f4)\n + diff --check: honor conflict-marker-size attribute\n\nHopefully will merge to 'master' by -rc0.\n\n* ld/discovery-limit-to-fs (2010-04-04) 4 commits\n - GIT_ONE_FILESYSTEM: flip the default to stop at filesystem boundaries\n - Add support for GIT_ONE_FILESYSTEM\n - truncate cwd string before printing error message\n - config.c: remove static keyword from git_env_bool()\n\nLinus made a good point of making this a default, and Erick Mattos\nconfirmed that it won't be a problem even on Windows.\n\nThe tip one is my attempt to do just that, but I have a feeling that\nit is introducing a double-negation.  ONE-FILESYSTEM that defaults to\ntrue but the user can flip it to false to trigger NOT-LIMITED-TO-ONE\nsemantics.  Perhaps it should be renamed to GIT_DISCOVER_REPOSITORY_XDEV\nor something that defaults to false.\n\n* sb/fmt-merge-msg (2010-03-24) 7 commits\n  (merged to 'next' on 2010-04-01 at 5fcbec5)\n + fmt-merge-msg: hide summary option\n + fmt-merge-msg: remove custom string_list implementation\n + string-list: add unsorted_string_list_lookup()\n + fmt-merge-msg: use pretty.c routines\n + t6200: test fmt-merge-msg more\n + t6200: modernize with test_tick\n + fmt-merge-msg: be quiet if nothing to merge\n\nHopefully will merge to 'master' by -rc0.\n\n* pc/remove-warn (2010-03-26) 4 commits\n  (merged to 'next' on 2010-04-02 at 52fc00d)\n + Remove a redundant errno test in a usage of remove_path\n + Introduce remove_or_warn function\n + Implement the rmdir_or_warn function\n + Generalise the unlink_or_warn function\n\nI cherry-picked only obviously sensible bits.\n\n* ef/maint-empty-commit-log (2010-03-21) 1 commit\n  (merged to 'next' on 2010-03-28 at aa103e5)\n + rev-list: fix --pretty=oneline with empty message\n\nHopefully will merge to 'master' by -rc0.\n\n* em/checkout-orphan (2010-03-21) 1 commit\n  (merged to 'next' on 2010-03-28 at 86b6a4f)\n + git checkout: create unparented branch by --orphan\n\nPerhaps needs a bit of documentation updates, describing the \"going open\nsource\" scenario.\n\n* ar/config-from-command-line (2010-03-26) 2 commits\n - Use strbufs instead of open-coded string manipulation\n - Allow passing of configuration parameters in the command line\n\nMay merge to 'next', but I would prefer waiting til 1.7.2 to have\nthis with a confidence than fast-tracking it.\n\n* nd/setup (2010-03-25) 43 commits\n - builtins: do not commit pager choice early\n - builtins: reset startup_info->have_run_setup_gitdir when unsetting up repository\n - builtins: setup repository before print unknown command error\n - Guard unallowed access to repository when it's not set up\n - alias: keep repository found while collecting aliases as long as possible\n - Allow to undo setup_git_directory_gently() gracefully (and fix alias code)\n - builtins: check for startup_info->help, print and exit early\n - builtins: utilize startup_info->help where possible\n - run_builtin(): save \"-h\" detection result for later use\n - config: do not read .git/config if there is no repository\n - apply: do not check sha1 when repository has not been found\n - Do not read .git/info/attributes if there is no repository\n - Do not read .git/info/exclude if there is no repository\n - git_config(): do not read .git/config if there is no repository\n - init/clone: turn on startup->have_repository properly\n - worktree setup: restore original state when things go wrong\n - Use git_config_early() instead of git_config() during repo setup\n - Add git_config_early()\n - worktree setup: call set_git_dir explicitly\n - rev-parse --git-dir: print relative gitdir correctly\n - enter_repo(): initialize other variables as setup_git_directory_gently() does\n - Move enter_repo() to setup.c\n - index-pack: use RUN_SETUP_GENTLY\n - index-pack: trust the prefix returned by setup_git_directory_gently()\n - worktree setup: calculate prefix even if no worktree is found\n - merge-file: use RUN_SETUP_GENTLY\n - var: use RUN_SETUP_GENTLY\n - ls-remote: use RUN_SETUP_GENTLY\n - help: use RUN_SETUP_GENTLY\n - diff: use RUN_SETUP_GENTLY\n - bundle: use RUN_SETUP_GENTLY\n - apply: use RUN_SETUP_GENTLY\n - verify-pack: use RUN_SETUP_GENTLY\n - check-ref-format: use RUN_SETUP_GENTLY\n - mailinfo: use RUN_SETUP_GENTLY\n - archive: use RUN_SETUP_GENTLY\n - builtin: USE_PAGER should not be used without RUN_SETUP*\n - grep: use RUN_SETUP_GENTLY\n - shortlog: use RUN_SETUP_GENTLY\n - hash-object: use RUN_SETUP_GENTLY\n - config: use RUN_SETUP_GENTLY\n - builtin: Support RUN_SETUP_GENTLY to set up repository early if found\n - builtin: introduce startup_info struct\n\n--------------------------------------------------\n[Dropped]\n\n* cw/test-lib-relicense (2010-02-22) 1 commit\n . test-lib.sh: Add explicit license detail, with change from GPLv2 to GPLv2+.\n\nI am hoping Carl or Michal Sojka can take the topic to completion without\nmy keeping an eye on it.  Waiting for the one with full set of Acks.\n\n* hg/convert (2010-03-29) 5 commits\n . convert: Added core.refilteronadd feature.\n . convert: Inhibit contraction of foreign $Id$ during stats.\n . convert: Use the enum constant SAFE_CRLF_FALSE.\n . convert: Keep foreign $Id$ on checkout.\n . convert: Safer handling of $Id$ contraction.\n\nThe first two looked sensible but later one looked more like showing that\nit may not have been a good idea in the first place.\n"},{"id":"138683","messageId":"4BBA8A8C.2080905@drmicha.warpmail.net","threadId":"23330","inReplyTo":"7vtyrr6nes.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Apr 2010, #02; Sun, 04)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-04-06T01:12:44Z","receivedAt":"2010-04-06T01:12:44Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 05.04.2010 03:14:\n> Here are the topics that have been cooking.  Commits prefixed with '-' are\n> only in 'pu' while commits prefixed with '+' are in 'next'.  The ones\n> marked with '.' do not appear in any of the integration branches, but I am\n> still holding onto them.\n> \n> --------------------------------------------------\n\n> * mg/notes-reflog (2010-03-29) 2 commits\n>  - refs.c: Write reflogs for notes just like for branch heads\n>  - t3301-notes: Test the creation of reflog entries\n> \n> Implementation is trivially correct; I am unsure if \"notes\" tree wants\n> reflog in the first place, though.  Please convince me and I'll move it\n> to 'next' soon, aiming for -rc0 or -rc1 at the latest.\n\nI think that Jeff's impressive textconv caching is only the first of\nmany uses of notes where the notes ref is not a branch head with\ncontinuously added history, but where the ref is being rewritten over\nand over again. Also, people may rewrite their refs/notes/commits when\nexperimenting with remote notes trees.\n\nIn both cases, I deem the reflog \"backup\" a useful safety measure (just\nas for other refs), and the automatic purging of the reflog provides\njust the appropriate housekeeping.\n\nMichael\n"},{"id":"138705","messageId":"20100406044241.GB3901@coredump.intra.peff.net","threadId":"23330","inReplyTo":"4BBA8A8C.2080905@drmicha.warpmail.net","subject":"Re: What's cooking in git.git (Apr 2010, #02; Sun, 04)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-06T04:42:41Z","receivedAt":"2010-04-06T04:42:41Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 06, 2010 at 09:12:44AM +0800, Michael J Gruber wrote:\n\n> > * mg/notes-reflog (2010-03-29) 2 commits\n> >  - refs.c: Write reflogs for notes just like for branch heads\n> >  - t3301-notes: Test the creation of reflog entries\n> > \n> > Implementation is trivially correct; I am unsure if \"notes\" tree wants\n> > reflog in the first place, though.  Please convince me and I'll move it\n> > to 'next' soon, aiming for -rc0 or -rc1 at the latest.\n> \n> I think that Jeff's impressive textconv caching is only the first of\n> many uses of notes where the notes ref is not a branch head with\n> continuously added history, but where the ref is being rewritten over\n> and over again. Also, people may rewrite their refs/notes/commits when\n> experimenting with remote notes trees.\n> \n> In both cases, I deem the reflog \"backup\" a useful safety measure (just\n> as for other refs), and the automatic purging of the reflog provides\n> just the appropriate housekeeping.\n\nI agree. I don't expect people to want to look at their notes reflogs\nvery often, but we have become accustomed to having the reflog safety\nnet. It is often not until after the \"oh crap\" moment that the user\ncomes to the list and we tell them what the reflog is and how to\nrecover their lost data.\n\nIn the case of textconv caches, reflogs are not quite as important\nbecause there is no lost data, only lost time. And as of now, we write a\nlarge number of commits and trees that end up unreachable very quickly\n(but only, of course, when encountering new items to cache).  But I\nthink that is a flaw in the notes-cache code. It should probably flush\nthe internal cache to a notes ref only on exit, not for every written\nentry.\n\nWe had discussed dropping the expiration time for notes reflogs. Caches\ncould be 0 or very low (say 1 day), as recovery would primarily be about\nexperimentation with textconvs and recovering a cached state that is\nslow to generate (e.g., you invalidate your cache by switching your\ntextconv, then switch it back; instead of regenerating your cache from\nscratch, you find the latest cache commit that matches the textconv you\nwant. We could even do that automatically instead of clearing the cache,\nbut it is rare enough that I wouldn't bother).\n\nGeneral notes refs are probably useless after a week or two, since you\nprobably won't have the \"oh no, I was working on this topic weeks ago\nand I want to recover my partial work\" moment that you do with regular\nwork. On the other hand, since they don't tend to have unreachable\nentries, keeping them doesn't bloat the object database.\n\nSo that was a bit rambling perhaps, but the point is that I would rather\nerr on the side of having the reflog safety net and then later realize\nwe don't really want it, than vice versa.\n\n-Peff\n"},{"id":"138784","messageId":"7vmxxggsl4.fsf@alter.siamese.dyndns.org","threadId":"23330","inReplyTo":"7vtyrr6nes.fsf@alter.siamese.dyndns.org","subject":"log --pretty/--oneline: ignore log.decorate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-06T21:48:55Z","receivedAt":"2010-04-06T21:48:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> [Stalled]\n>\n> * sd/log-decorate (2010-02-17) 3 commits\n>   (merged to 'next' on 2010-03-08 at 58a6fba)\n>  + log.decorate: usability fixes\n>  + Add `log.decorate' configuration variable.\n>  + git_config_maybe_bool()\n>\n> Needs squelching the configuration setting when \"--pretty=raw\" is given,\n> at least, or possibly when any \"--pretty\" is explicitly given.\n\nThis is necessary if we want to let users specify log.decorate and still\nuse gitk.  A patch should look like this (of course untested).\n\n-- >8 --\n\nMany scripts, most notably gitk, rely on output from the log family of\ncommand not to be molested by random user configuration.  This is\nespecially true when --pretty=raw is given.\n\nJust like we disable notes output unless the command line explicitly\nasks for --show-notes, disable the decoration code unless --decorate is\ngiven explicitly from the command line and --pretty or --oneline is\ngiven.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n\n---\n builtin-log.c  |   11 +++++++++++\n t/t4202-log.sh |   44 ++++++++++++++++++++++++++++----------------\n 2 files changed, 39 insertions(+), 16 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 0afba31..7f4186f 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -53,6 +53,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t      struct rev_info *rev)\n {\n \tint i;\n+\tint decoration_given = 0;\n \n \trev->abbrev = DEFAULT_ABBREV;\n \trev->commit_format = CMIT_FMT_DEFAULT;\n@@ -89,11 +90,13 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\tconst char *arg = argv[i];\n \t\tif (!strcmp(arg, \"--decorate\")) {\n \t\t\tdecoration_style = DECORATE_SHORT_REFS;\n+\t\t\tdecoration_given = 1;\n \t\t} else if (!prefixcmp(arg, \"--decorate=\")) {\n \t\t\tconst char *v = skip_prefix(arg, \"--decorate=\");\n \t\t\tdecoration_style = parse_decoration_style(arg, v);\n \t\t\tif (decoration_style < 0)\n \t\t\t\tdie(\"invalid --decorate option: %s\", arg);\n+\t\t\tdecoration_given = 1;\n \t\t} else if (!strcmp(arg, \"--no-decorate\")) {\n \t\t\tdecoration_style = 0;\n \t\t} else if (!strcmp(arg, \"--source\")) {\n@@ -103,6 +106,14 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t\t} else\n \t\t\tdie(\"unrecognized argument: %s\", arg);\n \t}\n+\n+\t/*\n+\t * defeat log.decorate configuration interacting with --pretty\n+\t * from the command line.\n+\t */\n+\tif (!decoration_given && rev->pretty_given)\n+\t\tdecoration_style = 0;\n+\n \tif (decoration_style) {\n \t\trev->show_decorations = 1;\n \t\tload_ref_decorations(decoration_style);\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 2230e60..166de44 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -390,50 +390,62 @@ test_expect_success 'log --graph with merge' '\n test_expect_success 'log.decorate configuration' '\n \tgit config --unset-all log.decorate || :\n \n-\tgit log --oneline >expect.none &&\n-\tgit log --oneline --decorate >expect.short &&\n-\tgit log --oneline --decorate=full >expect.full &&\n+\tgit log >expect.none &&\n+\tgit log --decorate >expect.short &&\n+\tgit log --decorate=full >expect.full &&\n+\tgit log --oneline >expect.oneline &&\n \n \techo \"[log] decorate\" >>.git/config &&\n-\tgit log --oneline >actual &&\n+\tgit log >actual &&\n \ttest_cmp expect.short actual &&\n+\tgit log --oneline >actual &&\n+\ttest_cmp expect.oneline actual &&\n \n \tgit config --unset-all log.decorate &&\n \tgit config log.decorate true &&\n-\tgit log --oneline >actual &&\n+\tgit log >actual &&\n \ttest_cmp expect.short actual &&\n-\tgit log --oneline --decorate=full >actual &&\n+\tgit log --decorate=full >actual &&\n \ttest_cmp expect.full actual &&\n-\tgit log --oneline --decorate=no >actual &&\n+\tgit log --decorate=no >actual &&\n \ttest_cmp expect.none actual &&\n+\tgit log --oneline >actual &&\n+\ttest_cmp expect.oneline actual &&\n \n \tgit config --unset-all log.decorate &&\n \tgit config log.decorate no &&\n-\tgit log --oneline >actual &&\n+\tgit log >actual &&\n \ttest_cmp expect.none actual &&\n-\tgit log --oneline --decorate >actual &&\n+\tgit log --decorate >actual &&\n \ttest_cmp expect.short actual &&\n-\tgit log --oneline --decorate=full >actual &&\n+\tgit log --decorate=full >actual &&\n \ttest_cmp expect.full actual &&\n+\tgit log --oneline >actual &&\n+\ttest_cmp expect.oneline actual &&\n \n \tgit config --unset-all log.decorate &&\n \tgit config log.decorate short &&\n-\tgit log --oneline >actual &&\n+\tgit log >actual &&\n \ttest_cmp expect.short actual &&\n-\tgit log --oneline --no-decorate >actual &&\n+\tgit log --no-decorate >actual &&\n \ttest_cmp expect.none actual &&\n-\tgit log --oneline --decorate=full >actual &&\n+\tgit log --decorate=full >actual &&\n \ttest_cmp expect.full actual &&\n+\tgit log --oneline >actual &&\n+\ttest_cmp expect.oneline actual &&\n \n \tgit config --unset-all log.decorate &&\n \tgit config log.decorate full &&\n-\tgit log --oneline >actual &&\n+\tgit log >actual &&\n \ttest_cmp expect.full actual &&\n-\tgit log --oneline --no-decorate >actual &&\n+\tgit log --no-decorate >actual &&\n \ttest_cmp expect.none actual &&\n-\tgit log --oneline --decorate >actual &&\n+\tgit log --decorate >actual &&\n \ttest_cmp expect.short actual\n+\tgit log --oneline >actual &&\n+\ttest_cmp expect.oneline actual &&\n \n+\t:\n '\n \n test_done\n"},{"id":"138948","messageId":"20100408073014.GA15474@coredump.intra.peff.net","threadId":"23330","inReplyTo":"7vmxxggsl4.fsf@alter.siamese.dyndns.org","subject":"Re: log --pretty/--oneline: ignore log.decorate","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-08T07:30:14Z","receivedAt":"2010-04-08T07:30:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 06, 2010 at 02:48:55PM -0700, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > [Stalled]\n> >\n> > * sd/log-decorate (2010-02-17) 3 commits\n> >   (merged to 'next' on 2010-03-08 at 58a6fba)\n> >  + log.decorate: usability fixes\n> >  + Add `log.decorate' configuration variable.\n> >  + git_config_maybe_bool()\n> >\n> > Needs squelching the configuration setting when \"--pretty=raw\" is given,\n> > at least, or possibly when any \"--pretty\" is explicitly given.\n> \n> This is necessary if we want to let users specify log.decorate and still\n> use gitk.  A patch should look like this (of course untested).\n\nHmm. You took the \"any --pretty\" option with this patch.\n\nAnd given the markups to the test suite:\n\n> -\tgit log --oneline >expect.none &&\n> -\tgit log --oneline --decorate >expect.short &&\n> -\tgit log --oneline --decorate=full >expect.full &&\n> +\tgit log >expect.none &&\n> +\tgit log --decorate >expect.short &&\n> +\tgit log --decorate=full >expect.full &&\n> +\tgit log --oneline >expect.oneline &&\n\nI suspect that will annoy users who have set log.decorate. Wouldn't they\nexpect to see it with \"--oneline\" if they have it configured (I would\nguess that \"git log\" and \"git log --oneline\" are the most commonly\nviewed forms by humans).\n\nIt seems reasonable to say \"git log --pretty=raw should be consumable by\nscripts\", but I don't know that we need to do so for every pretty\nformat.\n\nHowever:\n\n  $ git grep oneline *.sh\n  git-rebase--interactive.sh:             git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \\\n  git-stash.sh:           head=$(git log --no-color --abbrev-commit --pretty=oneline -n 1 HEAD --)\n  git-submodule.sh:                       git log --pretty=oneline --first-parent $range | wc -l\n\nrebase--interactive properly uses rev-list. The submodule invocation\nwould uselessly look up the decoration, and the stash one would add it\nto the stash commit message. But I am inclined to say that both of those\nscripts are at fault, and should be converted to rev-list.\n\n-Peff\n"},{"id":"138971","messageId":"7vljcx6f4f.fsf@alter.siamese.dyndns.org","threadId":"23330","inReplyTo":"20100408073014.GA15474@coredump.intra.peff.net","subject":"Re: log --pretty/--oneline: ignore log.decorate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-08T17:14:24Z","receivedAt":"2010-04-08T17:14:24Z","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>> > * sd/log-decorate (2010-02-17) 3 commits\n>> >   (merged to 'next' on 2010-03-08 at 58a6fba)\n>> >  + log.decorate: usability fixes\n>> >  + Add `log.decorate' configuration variable.\n>> >  + git_config_maybe_bool()\n>> >\n>> > Needs squelching the configuration setting when \"--pretty=raw\" is given,\n>> > at least, or possibly when any \"--pretty\" is explicitly given.\n>> \n>> This is necessary if we want to let users specify log.decorate and still\n>> use gitk.  A patch should look like this (of course untested).\n>\n> Hmm. You took the \"any --pretty\" option with this patch.\n\nYeah, I considered to further narrow it down to the --pretty=raw case;\nbecause that is not something we do for the default --show-notes, I opted\nfor consistency.  But a decoration and notes are quite different, and\nsuch a consistency perhaps is not worth it.  How about this on top?\n\n-- >8 --\nSubject: log: only \"--pretty=raw\" defeats log.decorate from the command line\n\nUnlike notes that are often multi-line and disrupting to be placed in many\noutput formats, a decoration is designed to be a small token that can be\ntacked after an existing line of the output where a commit object name sits.\n\nDisabling log.decorate for something like \"log --oneline\" would defeat the\npurpose of the configuration.\n\nWe _might_ want to change it further in the future to force scripts that\ndo not want to be broken by random end user configurations to explicitly\nsay \"log --no-decorate\", but that would be an incompatible change that\nneeds the usual multi-release-cycle deprecation process.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-log.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 7f4186f..017fcf8 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -108,10 +108,11 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,\n \t}\n \n \t/*\n-\t * defeat log.decorate configuration interacting with --pretty\n+\t * defeat log.decorate configuration interacting with --pretty=raw\n \t * from the command line.\n \t */\n-\tif (!decoration_given && rev->pretty_given)\n+\tif (!decoration_given && rev->pretty_given\n+\t    && rev->commit_format == CMIT_FMT_RAW)\n \t\tdecoration_style = 0;\n \n \tif (decoration_style) {\n"},{"id":"138980","messageId":"20100408194237.GA4222@sigill.intra.peff.net","threadId":"23330","inReplyTo":"7vljcx6f4f.fsf@alter.siamese.dyndns.org","subject":"Re: log --pretty/--oneline: ignore log.decorate","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-08T19:42:37Z","receivedAt":"2010-04-08T19:42:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 08, 2010 at 10:14:24AM -0700, Junio C Hamano wrote:\n\n> Yeah, I considered to further narrow it down to the --pretty=raw case;\n> because that is not something we do for the default --show-notes, I opted\n> for consistency.  But a decoration and notes are quite different, and\n> such a consistency perhaps is not worth it.  How about this on top?\n\nSince I consider normal output, --pretty=raw, and --oneline to be the\nonly useful output formats for git-log, I think of the right behavior\nas:\n\n  - normal: show both by default, since that is the point of the\n    features\n\n  - raw: show neither, since we are probably parsed by a script\n\n  - oneline: don't show notes, as they are inherently multi-line. Do\n    show decorations, as they inherently fit the hash+subject model\n\nUser-formats are useful, too, but outside the scope, as they should\nalways show exactly what was requested, and nothing more.\n\nFor the other formats, I couldn't care less. So your patch is fine, but\nI would also be fine with turning it back on _just_ for --oneline, and\nleaving all other pretty formats with it disabled.\n\nThe patch itself looks fine. As you know, it needs to revert some of the\ntest updates from your previous tip.\n\nWe should also either apply on top or squash in:\n\n-- >8 --\nSubject: [PATCH] script with rev-list instead of log\n\nBecause log.decorate now shows decorations for --pretty=oneline,\nwe must explicitly turn it off when scripting. Otherwise,\nusers with log.decorate set will get cruft like:\n\n  $ git stash\n  Saved working directory and index state WIP on master:\n    2c1f7f5 (HEAD, master) commit subject\n\nInstead of adding --no-decorate to the log command line,\nlet's just use the rev-list plumbing interface instead,\nwhich does the right thing.\n\ngit-submodule has a similar call. Since it just counts the\ncommit lines, nothing is broken, but let's switch it, too,\nfor the sake of consistency and cleanliness.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nI think these changes are Obviously Correct (tm), but please confirm\nthat I am not missing something subtle.\n\n git-stash.sh     |    2 +-\n git-submodule.sh |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-stash.sh b/git-stash.sh\nindex 62beae0..abaeee7 100755\n--- a/git-stash.sh\n+++ b/git-stash.sh\n@@ -57,7 +57,7 @@ create_stash () {\n \t# state of the base commit\n \tif b_commit=$(git rev-parse --verify HEAD)\n \tthen\n-\t\thead=$(git log --no-color --abbrev-commit --pretty=oneline -n 1 HEAD --)\n+\t\thead=$(git rev-list --oneline -n 1 HEAD --)\n \telse\n \t\tdie \"You do not have the initial commit yet\"\n \tfi\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 2dd372a..187461c 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -648,7 +648,7 @@ cmd_summary() {\n \t\t\t\trange=$sha1_dst\n \t\t\tfi\n \t\t\tGIT_DIR=\"$name/.git\" \\\n-\t\t\tgit log --pretty=oneline --first-parent $range | wc -l\n+\t\t\tgit rev-list --first-parent $range -- | wc -l\n \t\t\t)\n \t\t\ttotal_commits=\" ($(($total_commits + 0)))\"\n \t\t\t;;\n-- \n1.7.1.rc0.248.g055378.dirty\n"},{"id":"138989","messageId":"7vtyrl4pht.fsf@alter.siamese.dyndns.org","threadId":"23330","inReplyTo":"20100408194237.GA4222@sigill.intra.peff.net","subject":"Re: log --pretty/--oneline: ignore log.decorate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-08T21:13:18Z","receivedAt":"2010-04-08T21:13:18Z","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> Subject: [PATCH] script with rev-list instead of log\n>\n> Because log.decorate now shows decorations for --pretty=oneline,\n> we must explicitly turn it off when scripting. Otherwise,\n> users with log.decorate set will get cruft like:\n>\n>   $ git stash\n>   Saved working directory and index state WIP on master:\n>     2c1f7f5 (HEAD, master) commit subject\n>\n> Instead of adding --no-decorate to the log command line,\n> let's just use the rev-list plumbing interface instead,\n> which does the right thing.\n>\n> git-submodule has a similar call. Since it just counts the\n> commit lines, nothing is broken, but let's switch it, too,\n> for the sake of consistency and cleanliness.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> I think these changes are Obviously Correct (tm)\n\nLooks good; thanks.\n"}]}