{"thread":{"id":"28804","subject":"[ANNOUNCE] Git 1.7.8.rc0","startedAt":"2011-10-31T05:00:31Z","lastAt":"2011-11-05T06:45:24Z","messageCount":26,"participants":["Junio C Hamano","Stefan Näwe","Jeff King","Stefan Naewe","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"178550","messageId":"7vfwi9rc0g.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":null,"subject":"[ANNOUNCE] Git 1.7.8.rc0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-31T05:00:31Z","receivedAt":"2011-10-31T05:00:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A release candidate Git 1.7.8.rc0 is available for testing.\n\nThe release tarballs are found at:\n\n    http://code.google.com/p/git-core/downloads/list\n\nand their SHA-1 checksums are:\n\n4c437ecb17ba7d1b69cecd06eae9543ad35be7a6  git-1.7.8.rc0.tar.gz\n5fc490a7ab29bf020a8f46eecfdb421d970b6235  git-htmldocs-1.7.8.rc0.tar.gz\n856259f71c10b21620caa27dbc74c3794f0c6854  git-manpages-1.7.8.rc0.tar.gz\n\nAlso the following public repositories all have a copy of the v1.7.8.rc0\ntag and the master branch that the tag points at:\n\n  url = git://repo.or.cz/alt-git.git\n  url = https://code.google.com/p/git-core/\n  url = git://git.sourceforge.jp/gitroot/git-core/git.git\n  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core\n  url = https://github.com/gitster/git\n\nThere are a few topics that I would further merge down before -rc1 but\nthis should be pretty much it for the upcoming release, as far as \"new\nfeatures\" are concerned. Please test thoroughly to hunt for regressions.\n\nHopefully we can have something reasonable by late November before many in\nthe US will stop working and start stuffing themselves.\n\n\nGit v1.7.8 Release Notes (draft)\n================================\n\nUpdates since v1.7.7\n--------------------\n\n * Some git-svn, git-gui, git-p4 (in contrib) and msysgit updates.\n\n * Updates to bash completion scripts.\n\n * The build procedure has been taught to take advantage of computed\n   dependency automatically when the complier supports it.\n\n * The date parser now accepts timezone designators that lack minutes\n   part and also has a colon between \"hh:mm\".\n\n * The contents of the /etc/mailname file, if exists, is used as the\n   default value of the hostname part of the committer/author e-mail.\n\n * \"git am\" learned how to read from patches generated by Hg.\n\n * \"git archive\" talking with a remote repository can report errors\n   from the remote side in a more informative way.\n\n * \"git branch\" learned an explicit --list option to ask for branches\n   listed, optionally with a glob matching pattern to limit its output.\n\n * \"git check-attr\" learned \"--cached\" option to look at .gitattributes\n   files from the index, not from the working tree.\n\n * Variants of \"git cherry-pick\" and \"git revert\" that take multiple\n   commits learned to \"--continue\".\n\n * \"git daemon\" gives more human readble error messages to clients\n   using ERR packets when appropriate.\n\n * Errors at the network layer is logged by \"git daemon\".\n\n * \"git diff\" learned \"--minimal\" option to spend extra cycles to come\n   up with a minimal patch output.\n\n * \"git diff\" learned \"--function-context\" option to show the whole\n   function as context that was affected by a change.\n\n * \"git difftool\" can be told to skip launching the tool for a path by\n   answering 'n' to its prompt.\n\n * \"git fetch\" learned to honor transfer.fsckobjects configuration to\n   validate the objects that were received from the other end, just like\n   \"git receive-pack\" (the receiving end of \"git push\") does.\n\n * \"git fetch\" makes sure that the set of objects it received from the\n   other end actually completes the history before updating the refs.\n   \"git receive-pack\" (the receiving end of \"git push\") learned to do the\n   same.\n\n * \"git fetch\" learned that fetching/cloning from a regular file on the\n   filesystem is not necessarily a request to unpack a bundle file; the\n   file could be \".git\" with \"gitdir: <path>\" in it.\n\n * \"git for-each-ref\" learned \"%(contents:subject)\", \"%(contents:body)\"\n   and \"%(contents:signature)\". The last one is useful for signed tags.\n\n * \"git grep\" used to incorrectly pay attention to .gitignore files\n   scattered in the directory it was working in even when \"--no-index\"\n   option was used. It no longer does this. The \"--exclude-standard\"\n   option needs to be given to explicitly activate the ignore\n   mechanism.\n\n * \"git grep\" learned \"--untracked\" option, where given patterns are\n    searched in untracked (but not ignored) files as well as tracked\n    files in the working tree, so that matches in new but not yet\n    added files do not get missed.\n\n * The recursive merge backend no longer looks for meaningless\n   existing merges in submodules unless in the outermost merge.\n\n * \"git log\" and friends learned \"--children\" option.\n\n * \"git ls-remote\" learned to respond to \"-h\"(elp) requests.\n\n * \"git merge\" learned the \"--edit\" option to allow users to edit the\n   merge commit log message.\n\n * \"git rebase -i\" can be told to use special purpose editor suitable\n   only for its insn sheet via sequence.editor configuration variable.\n\n * \"git send-email\" learned to respond to \"-h\"(elp) requests.\n\n * \"git send-email\" allows the value given to sendemail.aliasfile to begin\n   with \"~/\" to refer to the $HOME directory.\n\n * \"git send-email\" forces use of Authen::SASL::Perl to work around\n   issues between Authen::SASL::Cyrus and AUTH PLAIN/LOGIN.\n\n * \"git stash\" learned \"--include-untracked\" option to stash away\n   untracked/ignored cruft from the working tree.\n\n * \"git submodule clone\" does not leak an error message to the UI\n   level unnecessarily anymore.\n\n * \"git submodule update\" learned to honor \"none\" as the value for\n   submodule.<name>.update to specify that the named submodule should\n   not be checked out by default.\n\n * When populating a new submodule directory with \"git submodule init\",\n   the $GIT_DIR metainformation directory for submodules is created inside\n   $GIT_DIR/modules/<name>/ directory of the superproject and referenced\n   via the gitfile mechanism. This is to make it possible to switch\n   between commits in the superproject that has and does not have the\n   submodule in the tree without re-cloning.\n\n * \"mediawiki\" remote helper can interact with (surprise!) MediaWiki\n   with \"git fetch\" & \"git push\".\n\n * \"gitweb\" leaked unescaped control characters from syntax hiliter\n   outputs.\n\n * \"gitweb\" can be told to give custom string at the end of the HTML\n   HEAD element.\n\n * \"gitweb\" now has its own manual pages.\n\n\nAlso contains other documentation updates and minor code cleanups.\n\n\nFixes since v1.7.7\n------------------\n\nUnless otherwise noted, all fixes in the 1.7.7.X maintenance track are\nincluded in this release.\n\n * We used to drop error messages from libcurl on certain kinds of\n   errors.\n   (merge be22d92eac8 jn/maint-http-error-message later to maint).\n\n * Error report from smart HTTP transport, when the connection was\n   broken in the middle of a transfer, showed a useless message on\n   a corrupt packet.\n   (merge 6cdf022 sp/smart-http-failure later to maint).\n\n * HTTP transport did not use pushurl correctly, and also did not tell\n   what host it is trying to authenticate with when asking for\n   credentials.\n   (merge deba493 jk/http-auth later to maint).\n\n * \"git branch -m/-M\" advertised to update RENAME_REF ref in the\n   commit log message that introduced the feature but not anywhere in\n   the documentation, and never did update such a ref anyway. This\n   undocumented misfeature that did not exist has been excised.\n   (merge b0eab01 jc/maint-remove-renamed-ref later to maint).\n\n * Adding many refs to the local repository in one go (e.g. \"git fetch\"\n   that fetches many tags) and looking up a ref by name in a repository\n   with too many refs were unnecessarily slow.\n   (merge 17d68a54d jp/get-ref-dir-unsorted later to maint).\n\n * \"git fetch --prune\" was unsafe when used with refspecs from the\n   command line.\n   (merge e8c1e6c cn/fetch-prune later to maint).\n\n * Report from \"git commit\" on untracked files was confused under\n   core.ignorecase option.\n   (merge 2548183b jk/name-hash-dirent later to maint).\n\n * The attribute mechanism did not use case insensitive match when\n   core.ignorecase was set.\n   (merge 6eba621 bc/attr-ignore-case later to maint).\n\n * \"git bisect\" did not notice when it failed to update the working tree\n   to the next commit to be tested.\n   (merge 1acf11717 js/bisect-no-checkout later to maint).\n\n * \"git config --bool --get-regexp\" failed to separate the variable name\n   and its value \"true\" when the variable is defined without \"= true\".\n   (merge 880e3cc mm/maint-config-explicit-bool-display later to maint).\n\n * \"git remote rename $a $b\" were not careful to match the remote name\n   against $a (i.e. source side of the remote nickname).\n   (merge b52d00aed mz/remote-rename later to maint).\n\n * \"git diff --[num]stat\" used to use the number of lines of context\n   different from the default, potentially giving different results from\n   \"git diff | diffstat\" and confusing the users.\n   (merge f01cae918 jc/maint-diffstat-numstat-context later to maint).\n\n * \"git merge\" did not understand \":/<pattern>\" as a way to name a commit.\n\n * \"git mergetool\" learned to use its arguments as pathspec, not a path to\n   the file that may not even have any conflict.\n   (merge 6d9990a jm/mergetool-pathspec later to maint).\n\n * \"git pull\" and \"git rebase\" did not work well even when GIT_WORK_TREE is\n   set correctly with GIT_DIR if the current directory is outside the working\n   tree.\n   (merge 035b5bf jk/pull-rebase-with-work-tree later to maint).\n\n \" \"git push\" on the receiving end used to call post-receive and post-update\n   hooks for attempted removal of non-existing refs.\n   (merge 160b81ed ph/push-to-delete-nothing later to maint).\n\n * \"git send-email\" did not honor the configured hostname when restarting\n   the HELO/EHLO exchange after switching TLS on.\n   (merge 155b940 md/smtp-tls-hello-again later to maint).\n\n * \"gitweb\" used to produce a non-working link while showing the contents\n   of a blob, when JavaScript actions are enabled.\n   (merge 2b07ff3ff ps/gitweb-js-with-lineno later to maint).\n\n * The logic to filter out forked projects in the project list in\n   \"gitweb\" was broken for some time.\n   (merge 53c632f jm/maint-gitweb-filter-forks-fix later to maint).\n\n----------------------------------------------------------------\n\nChanges since v1.7.7 are as follows:\n\nBert Wesarg (7):\n      grep: do not use --index in the short usage output\n      grep --no-index: don't use git standard exclusions\n      git-gui: search and linenumber input are mutual exclusive in the blame view\n      git-gui: only accept numbers in the goto-line input\n      git-gui: clear the goto line input when hiding\n      git-gui: incremental goto line in blame view\n      grep: fix the error message that mentions --exclude\n\nBrad King (3):\n      rev-list: Demonstrate breakage with --ancestry-path --all\n      submodule: Demonstrate known breakage during recursive merge\n      submodule: Search for merges only at end of recursive merge\n\nBrandon Casey (13):\n      t/t3905: use the name 'actual' for test output, swap arguments to test_cmp\n      git-stash.sh: fix typo in error message\n      t/t3905: add missing '&&' linkage\n      git-stash: remove untracked/ignored directories when stashed\n      attr.c: avoid inappropriate access to strbuf \"buf\" member\n      cleanup: use internal memory allocation wrapper functions everywhere\n      builtin/mv.c: plug miniscule memory leak\n      refs.c: ensure struct whose member may be passed to realloc is initialized\n      refs.c: abort ref search if ref array is empty\n      refs.c: free duplicate entries in the ref array instead of leaking them\n      attr.c: respect core.ignorecase when matching attribute patterns\n      strbuf.c: remove unnecessary strbuf_grow() from strbuf_getwholeline()\n      t/t3000-ls-files-others.sh: use $SHELL_PATH to run git-new-workdir script\n\nCarlos Martín Nieto (7):\n      Remove 'working copy' from the documentation and C code\n      fetch: free all the additional refspecs\n      t5510: add tests for fetch --prune\n      remote: separate out the remote_find_tracking logic into query_refspecs\n      fetch: honor the user-provided refspecs when pruning refs\n      fetch: treat --tags like refs/tags/*:refs/tags/* when pruning\n      Documentation: update [section.subsection] to reflect what git does\n\nChris Packham (1):\n      git-web--browse: avoid the use of eval\n\nChristian Couder (1):\n      bisect: fix exiting when checkout failed in bisect_start()\n\nChristoffer Pettersson (1):\n      git-gui: Corrected a typo in the Swedish translation of 'Continue'\n\nClemens Buchacher (5):\n      remove prefix argument from pathspec_prefix\n      rename pathspec_prefix() to common_prefix() and move to dir.[ch]\n      send-email: add option -h\n      use -h for synopsis and --help for manpage consistently\n      use test number as port number\n\nCord Seele (3):\n      Add Git::config_path()\n      use new Git::config_path() for aliasesfile\n      send-email: Fix %config_path_settings handling\n\nDan McGee (2):\n      tree-walk: drop unused parameter from match_dir_prefix\n      tree-walk: micro-optimization in tree_entry_interesting\n\nDavid Aguilar (1):\n      Makefile: Improve compiler header dependency check\n\nDavid Fries (2):\n      git-gui: Enable jumping to a specific line number in blame view.\n      git-gui: Add keyboard shortcuts for search and goto commands in blame view.\n\nDmitry Ivankov (3):\n      Fix typo: existant->existent\n      fast-import: don't allow to tag empty branch\n      fast-import: don't allow to note on empty branch\n\nDrew Northup (1):\n      gitweb: Add gitweb.conf(5) manpage for gitweb configuration files\n\nErik Faye-Lund (2):\n      enter_repo: do not modify input\n      mingw: avoid using strbuf in syslog\n\nFredrik Gustafsson (2):\n      rev-parse: add option --resolve-git-dir <path>\n      Move git-dir for submodules\n\nFredrik Kuivinen (1):\n      Makefile: Use computed header dependencies if the compiler supports it\n\nFrédéric Heitzmann (1):\n      git svn dcommit: new option --interactive.\n\nGiuseppe Bilotta (1):\n      am: preliminary support for hg patches\n\nHaitao Li (1):\n      date.c: Support iso8601 timezone formats\n\nHeiko Voigt (4):\n      git-gui: warn when trying to commit on a detached head\n      submodule: move update configuration variable further up\n      add update 'none' flag to disable update of submodule by default\n      git-gui: deal with unknown files when pressing the \"Stage Changed\" button\n\nHui Wang (1):\n      sha1_file: normalize alt_odb path before comparing and storing\n\nIlari Liusvaara (1):\n      Support ERR in remote archive like in fetch/push\n\nJakub Narebski (6):\n      gitweb: Strip non-printable characters from syntax highlighter output\n      gitweb: Add gitweb(1) manpage for gitweb itself\n      Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages\n      Documentation: Add gitweb config variables to git-config(1)\n      gitweb: Add gitweb manpages to 'gitweb' package in git.spec\n      Add simple test for Git::config_path() in t/t9700-perl-git.sh\n\nJay Soffian (6):\n      Teach '--cached' option to check-attr\n      log --children\n      merge-one-file: fix \"expr: non-numeric argument\"\n      revert.c: defer writing CHERRY_PICK_HEAD till it is safe to do so\n      cherry-pick: do not give irrelevant advice when cherry-pick punted\n      Teach merge the '[-e|--edit]' option\n\nJeff King (30):\n      url: decode buffers that are not NUL-terminated\n      improve httpd auth tests\n      remote-curl: don't retry auth failures with dumb protocol\n      http: retry authentication failures for all http requests\n      t7004: factor out gpg setup\n      t6300: add more body-parsing tests\n      for-each-ref: refactor subject and body placeholder parsing\n      for-each-ref: handle multiline subjects like --pretty\n      fetch: avoid quadratic loop checking for updated submodules\n      t3200: clean up checks for file existence\n      add sha1_array API docs\n      quote.h: fix bogus comment\n      refactor argv_array into generic code\n      quote: provide sq_dequote_to_argv_array\n      bisect: use argv_array API\n      checkout: use argv_array API\n      run_hook: use argv_array API\n      filter-branch: use require_clean_work_tree\n      fix phantom untracked files when core.ignorecase is set\n      t1300: put git invocations inside test function\n      t1300: test mixed-case variable retrieval\n      pull,rebase: handle GIT_WORK_TREE better\n      pack-objects: protect against disappearing packs\n      downgrade \"packfile cannot be accessed\" errors to warnings\n      daemon: give friendlier error messages to clients\n      http_init: accept separate URL parameter\n      contrib: add diff highlight script\n      tests: add missing executable bits\n      contrib: add git-jump script\n      completion: match ctags symbol names in grep patterns\n\nJeremie Nikaes (1):\n      Add a remote helper to interact with mediawiki (fetch & push)\n\nJim Meyering (2):\n      fix \"git apply --index ...\" not to deref NULL\n      make the sample pre-commit hook script reject names with newlines, too\n\nJohannes Schindelin (5):\n      Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile\n      t1020: disable the pwd test on MinGW\n      t9001: do not fail only due to CR/LF issues\n      t9300: do not run --cat-blob-fd related tests on MinGW\n      git grep: be careful to use mutexes only when they are initialized\n\nJohannes Sixt (2):\n      t1402-check-ref-format: skip tests of refs beginning with slash on Windows\n      t1300: attempting to remove a non-existent .git/config is not an error\n\nJonathan Nieder (7):\n      http: remove extra newline in error message\n      http: avoid empty error messages for some curl errors\n      ident: check /etc/mailname if email is unknown\n      Makefile: do not set setgid bit on directories on GNU/kFreeBSD\n      ident: do not retrieve default ident when unnecessary\n      Makefile: fix permissions of mergetools/ checked out with permissive umask\n      RelNotes/1.7.7.1: setgid bit patch is about fixing \"git init\" via Makefile setting\n\nJonathon Mah (1):\n      mergetool: Use args as pathspec to unmerged files\n\nJulian Phillips (2):\n      Don't sort ref_list too early\n      refs: Use binary search to lookup refs faster\n\nJulien Muchembled (1):\n      gitweb: fix regression when filtering out forks\n\nJunio C Hamano (66):\n      rev-list: fix finish_object() call\n      revision.c: add show_object_with_name() helper function\n      revision.c: update show_object_with_name() without using malloc()\n      revision: keep track of the end-user input from the command line\n      revision: do not include sibling history in --ancestry-path output\n      rebase -i: notice and warn if \"exec $cmd\" modifies the index or the working tree\n      traverse_trees(): allow pruning with pathspec\n      unpack-trees: allow pruning with pathspec\n      diff-index: pass pathspec down to unpack-trees machinery\n      list-objects: pass callback data to show_objects()\n      rev-list --verify-object\n      fetch: verify we have everything we need before updating our ref\n      fetch.fsckobjects: verify downloaded objects\n      transfer.fsckobjects: unify fetch/receive.fsckobjects\n      test: fetch/receive with fsckobjects\n      consolidate pathspec_prefix and common_prefix\n      fetch: verify we have everything we need before updating our ref\n      check_everything_connected(): refactor to use an iterator\n      check_everything_connected(): libify\n      receive-pack: check connectivity before concluding \"git push\"\n      builtin/revert.c: make commit_list_append() static\n      refs.c: make create_cached_refs() static\n      fsck: do not abort upon finding an empty blob\n      send-pack: typofix error message\n      refactor run_receive_hook()\n      rename \"match_refs()\" to \"match_push_refs()\"\n      Allow git merge \":/<pattern>\"\n      ls-remote: a lone \"-h\" is asking for help\n      Teach progress eye-candy to fetch_refs_from_bundle()\n      diff: teach --stat/--numstat to honor -U$num\n      t0003: remove extra whitespaces\n      mergetool: no longer need to save standard input\n      apply --whitespace=error: correctly report new blank lines at end\n      parse-options: deprecate OPT_BOOLEAN\n      archive.c: use OPT_BOOL()\n      checkout $tree $path: do not clobber local changes in $path not in $tree\n      url.c: simplify is_url()\n      diff: resurrect XDF_NEED_MINIMAL with --minimal\n      grep: teach --untracked and --exclude-standard options\n      Post 1.7.7 first wave\n      attr: read core.attributesfile from git_default_core_config\n      Update draft release notes to 1.7.8\n      branch -m/-M: remove undocumented RENAMED-REF\n      refs.c: move dwim_ref()/dwim_log() from sha1_name.c\n      Update draft release notes to 1.7.8\n      bundle: allowing to read from an unseekable fd\n      bundle: add parse_bundle_header() helper function\n      Update draft release notes to 1.7.8\n      t7800: avoid arithmetic expansion notation\n      Prepare for 1.7.7.1\n      Update draft release notes to 1.7.8\n      resolve_gitlink_packed_ref(): fix mismerge\n      Update draft release notes to 1.7.8\n      Makefile: ask \"ls-files\" to list source files if available\n      libperl-git: refactor Git::config_*\n      Update draft release notes to 1.7.8\n      resolve_ref(): expose REF_ISBROKEN flag\n      resolve_ref(): report breakage to the caller without warning\n      Almost ready for 1.7.7.1\n      Update draft release notes to 1.7.8\n      Git 1.7.7.1\n      builtin/grep: make lock/unlock into static inline functions\n      builtin/grep: simplify lock_and_read_sha1_file()\n      Update draft release notes to 1.7.8\n      Update draft release notes to 1.7.8\n      Git 1.7.8-rc0\n\nLuke Diamand (1):\n      git-p4: handle files with shell metacharacters\n\nLénaïc Huard (1):\n      gitweb: provide a way to customize html headers\n\nMartin von Zweigbergk (4):\n      remote: write correct fetch spec when renaming remote 'remote'\n      remote: \"rename o foo\" should not rename ref \"origin/bar\"\n      remote rename: warn when refspec was not updated\n      remote: only update remote-tracking branch if updating refspec\n\nMatthew Daley (1):\n      send-email: Honour SMTP domain when using TLS\n\nMatthieu Moy (8):\n      rebase -i: clean error message for --continue after failed exec\n      git-remote-mediawiki: allow push to set MediaWiki metadata\n      git-remote-mediawiki: trivial fixes\n      git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts\n      git-remote-mediawiki: obey advice.pushNonFastForward\n      git-remote-mediawiki: allow a domain to be set for authentication\n      config: display key_delim for config --bool --get-regexp\n      git-remote-mediawiki: don't include HTTP login/password in author\n\nMichael Haggerty (37):\n      Extract a function clear_cached_refs()\n      Access reference caches only through new function get_cached_refs()\n      Change the signature of read_packed_refs()\n      Allocate cached_refs objects dynamically\n      Store the submodule name in struct cached_refs\n      Retain caches of submodule refs\n      notes_merge_commit(): do not pass temporary buffer to other function\n      get_sha1_hex(): do not read past a NUL character\n      t1402: add some more tests\n      git check-ref-format: add options --allow-onelevel and --refspec-pattern\n      Change bad_ref_char() to return a boolean value\n      Change check_ref_format() to take a flags argument\n      Refactor check_refname_format()\n      Do not allow \".lock\" at the end of any refname component\n      Make collapse_slashes() allocate memory for its result\n      Inline function refname_format_print()\n      Change check_refname_format() to reject unnormalized refnames\n      resolve_ref(): explicitly fail if a symlink is not readable\n      resolve_ref(): use prefixcmp()\n      resolve_ref(): only follow a symlink that contains a valid, normalized refname\n      resolve_ref(): turn buffer into a proper string as soon as possible\n      resolve_ref(): extract a function get_packed_ref()\n      resolve_ref(): do not follow incorrectly-formatted symbolic refs\n      remote: use xstrdup() instead of strdup()\n      remote: avoid passing NULL to read_ref()\n      resolve_ref(): verify that the input refname has the right format\n      resolve_ref(): emit warnings for improperly-formatted references\n      resolve_ref(): also treat a too-long SHA1 as invalid\n      resolve_ref(): expand documentation\n      add_ref(): verify that the refname is formatted correctly\n      invalidate_ref_cache(): rename function from invalidate_cached_refs()\n      invalidate_ref_cache(): take the submodule as parameter\n      invalidate_ref_cache(): expose this function in the refs API\n      clear_ref_cache(): rename parameter\n      clear_ref_cache(): extract two new functions\n      write_ref_sha1(): only invalidate the loose ref cache\n      clear_ref_cache(): inline function\n\nMichael J Gruber (10):\n      t6040: test branch -vv\n      git-tag: introduce long forms for the options\n      git-branch: introduce missing long forms for the options\n      branch: introduce --list option\n      branch: allow pattern arguments\n      branch: -v does not automatically imply --list\n      unpack-trees: print \"Aborting\" to stderr\n      git-read-tree.txt: language and typography fixes\n      git-read-tree.txt: correct sparse-checkout and skip-worktree description\n      http: use hostname in credential description\n\nMichael Schubert (1):\n      patch-id.c: use strbuf instead of a fixed buffer\n\nMichael W. Olson (1):\n      git-svn: Allow certain refs to be ignored\n\nMichał Górny (1):\n      for-each-ref: add split message parts to %(contents:*).\n\nNguyễn Thái Ngọc Duy (12):\n      merge: keep stash[] a local variable\n      merge: use return value of resolve_ref() to determine if HEAD is invalid\n      merge: remove global variable head[]\n      Accept tags in HEAD or MERGE_HEAD\n      sparse checkout: show error messages when worktree shaping fails\n      Add explanation why we do not allow to sparse checkout to empty working tree\n      git-read-tree.txt: update sparse checkout examples\n      pack-protocol: document \"ERR\" line\n      daemon: return \"access denied\" if a service is not allowed\n      daemon: log errors if we could not use some sockets\n      t5403: convert leading spaces to tabs\n      Reindent closing bracket using tab instead of spaces\n\nNicolas Morey-Chaisemartin (1):\n      grep: Fix race condition in delta_base_cache\n\nPang Yan Han (1):\n      receive-pack: don't pass non-existent refs to post-{receive,update} hooks\n\nPat Thoyts (6):\n      git-gui: updated translator README for current procedures.\n      Fix tooltip display with multiple monitors on windows.\n      git-gui: drop the 'n' and 'Shift-n' bindings from the last patch.\n      mergetools: use the correct tool for Beyond Compare 3 on Windows\n      mingw: ensure sockets are initialized before calling gethostname\n      t9901: fix line-ending dependency on windows\n\nPete Wyckoff (5):\n      git-p4 tests: refactor and cleanup\n      git-p4: handle utf16 filetype properly\n      git-p4: recognize all p4 filetypes\n      git-p4: stop ignoring apple filetype\n      git-p4: keyword flattening fixes\n\nPeter Oberndorfer (1):\n      \"rebase -i\": support special-purpose editor to edit insn sheet\n\nPeter Stuge (1):\n      gitweb: Fix links to lines in blobs when javascript-actions are enabled\n\nPhil Hord (3):\n      Learn to handle gitfiles in enter_repo\n      Teach transport about the gitfile mechanism\n      Add test showing git-fetch groks gitfiles\n\nRamkumar Ramachandra (18):\n      advice: Introduce error_resolve_conflict\n      config: Introduce functions to write non-standard file\n      revert: Simplify and inline add_message_to_msg\n      revert: Don't check lone argument in get_encoding\n      revert: Rename no_replay to record_origin\n      revert: Eliminate global \"commit\" variable\n      revert: Introduce struct to keep command-line options\n      revert: Separate cmdline parsing from functional code\n      revert: Don't create invalid replay_opts in parse_args\n      revert: Save data for continuing after conflict resolution\n      revert: Save command-line options for continuing operation\n      revert: Make pick_commits functionally act on a commit list\n      revert: Introduce --reset to remove sequencer state\n      reset: Make reset remove the sequencer state\n      revert: Remove sequencer state when no commits are pending\n      revert: Don't implicitly stomp pending sequencer operation\n      revert: Introduce --continue to continue the operation\n      revert: Propagate errors upwards from do_pick_commit\n\nRamsay Allan Jones (6):\n      Makefile: Make dependency directory creation less noisy\n      sparse: Fix an \"Using plain integer as NULL pointer\" warning\n      obstack.c: Fix some sparse warnings\n      t9159-*.sh: skip for mergeinfo test for svn <= 1.4\n      Fix some \"variable might be used uninitialized\" warnings\n      gitweb/Makefile: Remove static/gitweb.js in the clean target\n\nRené Scharfe (26):\n      Revert removal of multi-match discard heuristic in 27af01\n      parseopt: add OPT_NOOP_NOARG\n      revert: use OPT_NOOP_NOARG\n      apply: use OPT_NOOP_NOARG\n      checkout: check for \"Previous HEAD\" notice in t2020\n      revision: factor out add_pending_sha1\n      checkout: use add_pending_{object,sha1} in orphan check\n      revision: add leak_pending flag\n      bisect: use leak_pending flag\n      bundle: use leak_pending flag\n      checkout: use leak_pending flag\n      commit: factor out clear_commit_marks_for_object_array\n      test-ctype: macrofy\n      test-ctype: add test for is_pathspec_magic\n      name-rev: split usage string\n      pickaxe: plug diff filespec leak with empty needle\n      pickaxe: plug regex leak\n      pickaxe: plug regex/kws leak\n      pickaxe: factor out has_changes\n      pickaxe: pass diff_options to contains and has_changes\n      pickaxe: give diff_grep the same signature as has_changes\n      pickaxe: factor out pickaxe\n      xdiff: factor out get_func_line()\n      diff: add option to show whole functions as context\n      t1304: fall back to $USER if $LOGNAME is not defined\n      read-cache.c: fix index memory allocation\n\nRichard Hartmann (1):\n      clone: Quote user supplied path in a single quote pair\n\nSZEDER Gábor (2):\n      completion: unite --reuse-message and --reedit-message for 'notes'\n      completion: unite --format and --pretty for 'log' and 'show'\n\nSebastian Schuberth (2):\n      git-svn: On MSYS, escape and quote SVN_SSH also if set by the user\n      inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables\n\nShawn O. Pearce (1):\n      remote-curl: Fix warning after HTTP failure\n\nSitaram Chamarty (1):\n      git-difftool: allow skipping file by typing 'n' at prompt\n\nStefan Naewe (2):\n      Documentation/git-update-index: refer to 'ls-files'\n      completion: fix issue with process substitution not working on Git for Windows\n\nTay Ray Chuan (3):\n      fetch: plug two leaks on error exit in store_updated_refs\n      submodule: whitespace fix\n      submodule::module_clone(): silence die() message from module_name()\n\nTeemu Matilainen (3):\n      completion: unite --reuse-message and --reedit-message handling\n      completion: commit --fixup and --squash\n      completion: push --set-upstream\n\nThomas Rast (3):\n      Symlink mergetools scriptlets into valgrind wrappers\n      Documentation: basic configuration of notes.rewriteRef\n      t6019: avoid refname collision on case-insensitive systems\n\nZbigniew Jędrzejewski-Szmek (1):\n      send-email: auth plain/login fix\n"},{"id":"178564","messageId":"4EAEAE13.50101@atlas-elektronik.com","threadId":"28804","inReplyTo":"7vfwi9rc0g.fsf@alter.siamese.dyndns.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2011-10-31T14:17:55Z","receivedAt":"2011-10-31T14:17:55Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 31.10.2011 06:00, schrieb Junio C Hamano:\n> A release candidate Git 1.7.8.rc0 is available for testing.\n> \n> [...]\n> \n> \n> Git v1.7.8 Release Notes (draft)\n> ================================\n> \n> Updates since v1.7.7\n> --------------------\n> \n> [...]\n> \n>  * HTTP transport did not use pushurl correctly, and also did not tell\n>    what host it is trying to authenticate with when asking for\n>    credentials.\n>    (merge deba493 jk/http-auth later to maint).\n\nThis seems to break pushing with https for me.\nIt never uses values from my '~/.netrc'.\nI'll come up with a detailed scenario later.\n\n \nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: Justice is incidental to law and order.\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n"},{"id":"178566","messageId":"7v8vo1qdtb.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"4EAEAE13.50101@atlas-elektronik.com","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2011-10-31T17:19:12Z","receivedAt":"2011-10-31T17:19:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Näwe <stefan.naewe@atlas-elektronik.com> writes:\n\n>>  * HTTP transport did not use pushurl correctly, and also did not tell\n>>    what host it is trying to authenticate with when asking for\n>>    credentials.\n>>    (merge deba493 jk/http-auth later to maint).\n>\n> This seems to break pushing with https for me.\n> It never uses values from my '~/.netrc'.\n> I'll come up with a detailed scenario later.\n\nThanks.\n\nI have been pushing my updates out to code.google.com via authentication\ntoken stored in ~/.netrc over https, so it would be nice to see what\nbreaks for you that works for me. There probably is something subtly\ndifferent.\n"},{"id":"178618","messageId":"4EAFC18A.1070502@atlas-elektronik.com","threadId":"28804","inReplyTo":"4EAEAE13.50101@atlas-elektronik.com","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2011-11-01T09:53:14Z","receivedAt":"2011-11-01T09:53:14Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 31.10.2011 15:17, schrieb Stefan Näwe:\n> Am 31.10.2011 06:00, schrieb Junio C Hamano:\n>> A release candidate Git 1.7.8.rc0 is available for testing.\n>>\n>> [...]\n>>\n>>\n>> Git v1.7.8 Release Notes (draft)\n>> ================================\n>>\n>> Updates since v1.7.7\n>> --------------------\n>>\n>> [...]\n>>\n>>  * HTTP transport did not use pushurl correctly, and also did not tell\n>>    what host it is trying to authenticate with when asking for\n>>    credentials.\n>>    (merge deba493 jk/http-auth later to maint).\n> \n> This seems to break pushing with https for me.\n> It never uses values from my '~/.netrc'.\n> I'll come up with a detailed scenario later.\n\nUpdate:\n\ngit push prompts for the password but just pressing return succeeds.\n\nWeird...\n\n\nStefan\n-- \n----------------------------------------------------------------\n/dev/random says: Budget: A method for going broke methodically.\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n"},{"id":"178633","messageId":"7vmxcfn23i.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"4EAFC18A.1070502@atlas-elektronik.com","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-01T18:12:49Z","receivedAt":"2011-11-01T18:12:49Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[administrivia: dropped the kernel mailing list from and added Peff to Cc]\n\nStefan Näwe <stefan.naewe@atlas-elektronik.com> writes:\n\n>>>  * HTTP transport did not use pushurl correctly, and also did not tell\n>>>    what host it is trying to authenticate with when asking for\n>>>    credentials.\n>>>    (merge deba493 jk/http-auth later to maint).\n>> \n>> This seems to break pushing with https for me.\n>> It never uses values from my '~/.netrc'.\n>> I'll come up with a detailed scenario later.\n>\n> Update:\n>\n> git push prompts for the password but just pressing return succeeds.\n>\n> Weird...\n\nThere are only handful of commits that even remotely touch http related\ncodepath between v1.7.7 and v1.7.8-rc0:\n\n  * deba493 http_init: accept separate URL parameter\n\n  This could change the URL string given to http_auth_init().\n\n  * 070b4dd http: use hostname in credential description\n\n  This only changes the prompt string; as far as I understand it, the\n  condition the password is prompted in the callsites of git_getpass()\n  has not changed.\n\n  * 6cdf022 remote-curl: Fix warning after HTTP failure\n  * be22d92 http: avoid empty error messages for some curl errors\n  * 8abc508 http: remove extra newline in error message\n  * 8d677ed http: retry authentication failures for all http requests\n  * 28d0c10 remote-curl: don't retry auth failures with dumb protocol\n\n  These shouldn't affect anything wrt prompting, unless you are somehow\n  internally reauthenticating.\n\nCould you try reverting deba493 and retest, and then if the behaviour is\nthe same \"need ENTER\", further revert 070b4dd and retest?\n"},{"id":"178635","messageId":"20111101181904.GA10235@sigill.intra.peff.net","threadId":"28804","inReplyTo":"7vmxcfn23i.fsf@alter.siamese.dyndns.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-01T18:19:04Z","receivedAt":"2011-11-01T18:19:04Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 01, 2011 at 11:12:49AM -0700, Junio C Hamano wrote:\n\n> Stefan Näwe <stefan.naewe@atlas-elektronik.com> writes:\n> \n> >>>  * HTTP transport did not use pushurl correctly, and also did not tell\n> >>>    what host it is trying to authenticate with when asking for\n> >>>    credentials.\n> >>>    (merge deba493 jk/http-auth later to maint).\n> >> \n> >> This seems to break pushing with https for me.\n> >> It never uses values from my '~/.netrc'.\n> >> I'll come up with a detailed scenario later.\n> >\n> > Update:\n> >\n> > git push prompts for the password but just pressing return succeeds.\n> >\n> > Weird...\n> \n> There are only handful of commits that even remotely touch http related\n> codepath between v1.7.7 and v1.7.8-rc0:\n> \n>   * deba493 http_init: accept separate URL parameter\n> \n>   This could change the URL string given to http_auth_init().\n> \n>   * 070b4dd http: use hostname in credential description\n> \n>   This only changes the prompt string; as far as I understand it, the\n>   condition the password is prompted in the callsites of git_getpass()\n>   has not changed.\n> \n>   * 6cdf022 remote-curl: Fix warning after HTTP failure\n>   * be22d92 http: avoid empty error messages for some curl errors\n>   * 8abc508 http: remove extra newline in error message\n>   * 8d677ed http: retry authentication failures for all http requests\n>   * 28d0c10 remote-curl: don't retry auth failures with dumb protocol\n> \n>   These shouldn't affect anything wrt prompting, unless you are somehow\n>   internally reauthenticating.\n> \n> Could you try reverting deba493 and retest, and then if the behaviour is\n> the same \"need ENTER\", further revert 070b4dd and retest?\n\nI don't use .netrc, but with all of my patches (most of which aren't\neven in what you are running), I tried not to affect the netrc case. I\njust checked a few things, and it seems to be working as I expect. Do we\nhave a repeatable test?\n\n-Peff\n"},{"id":"178641","messageId":"loom.20111101T205618-231@post.gmane.org","threadId":"28804","inReplyTo":"7vmxcfn23i.fsf@alter.siamese.dyndns.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-11-01T20:06:19Z","receivedAt":"2011-11-01T20:06:19Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Junio C Hamano <gitster <at> pobox.com> writes:\n\n> \n> [administrivia: dropped the kernel mailing list from and added Peff to Cc]\n> \n> Stefan Näwe <stefan.naewe <at> atlas-elektronik.com> writes:\n> \n> >>>  * HTTP transport did not use pushurl correctly, and also did not tell\n> >>>    what host it is trying to authenticate with when asking for\n> >>>    credentials.\n> >>>    (merge deba493 jk/http-auth later to maint).\n> >> \n> >> This seems to break pushing with https for me.\n> >> It never uses values from my '~/.netrc'.\n> >> I'll come up with a detailed scenario later.\n> >\n> > Update:\n> >\n> > git push prompts for the password but just pressing return succeeds.\n> >\n> > Weird...\n> \n> There are only handful of commits that even remotely touch http related\n> codepath between v1.7.7 and v1.7.8-rc0:\n> \n> [...]\n> \n> Could you try reverting deba493 and retest, and then if the behaviour is\n> the same \"need ENTER\", further revert 070b4dd and retest?\n\nDid some tests again at my home machine with v1.7.8-rc0.\n\nPush with https works, if the URL looks e.g. like this:\n\n  https://github.com/user/repo.git\n\nrather than this\n\n  https://user@github.com/user/repo.git\n\nand having a ~/.netrc like this\n\n  machine github.com login user password YouDontWantToKnow\n\nIf the URL contains 'user@' I get the 'need ENTER' behaviour.\n\nI'll recheck everything at work, where I live behind a very restrictive\nfirewall (Don't know if that makes any difference).\n\nRegards,\n  Stefan\n"},{"id":"178642","messageId":"loom.20111101T211624-511@post.gmane.org","threadId":"28804","inReplyTo":"loom.20111101T205618-231@post.gmane.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-11-01T20:18:47Z","receivedAt":"2011-11-01T20:18:47Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Stefan Naewe <stefan.naewe <at> gmail.com> writes:\n\n> Push with https works, if the URL looks e.g. like this:\n> \n>   https://github.com/user/repo.git\n> \n> rather than this\n> \n>   https://user <at> github.com/user/repo.git\n> \n> and having a ~/.netrc like this\n> \n>   machine github.com login user password YouDontWantToKnow\n> \n> If the URL contains 'user@' I get the 'need ENTER' behaviour.\n> \n\nAnother update:\n\nIf I revert deba493 the 'need ENTER' is gone and everything works as above.\n\n\nStefan\n"},{"id":"178651","messageId":"loom.20111101T225251-419@post.gmane.org","threadId":"28804","inReplyTo":"loom.20111101T205618-231@post.gmane.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-11-01T21:53:49Z","receivedAt":"2011-11-01T21:53:49Z","isPatch":false,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Stefan Naewe <stefan.naewe <at> gmail.com> writes:\n> I'll recheck everything at work, where I live behind a very restrictive\n> firewall (Don't know if that makes any difference).\n\ns/firewall/proxy/\n\nStefan\n"},{"id":"178672","messageId":"4EB104EA.2040001@atlas-elektronik.com","threadId":"28804","inReplyTo":"7vmxcfn23i.fsf@alter.siamese.dyndns.org","subject":"[RFC/PATCH] http-push: don't always prompt for password (Was Re: [ANNOUNCE] Git 1.7.8.rc0)","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@atlas-elektronik.com","sentAt":"2011-11-02T08:52:58Z","receivedAt":"2011-11-02T08:52:58Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 01.11.2011 19:12, schrieb Junio C Hamano:\n> \n> There are only handful of commits that even remotely touch http related\n> codepath between v1.7.7 and v1.7.8-rc0:\n> \n>   * deba493 http_init: accept separate URL parameter\n> \n>   This could change the URL string given to http_auth_init().\n> \n>   * 070b4dd http: use hostname in credential description\n> \n>   This only changes the prompt string; as far as I understand it, the\n>   condition the password is prompted in the callsites of git_getpass()\n>   has not changed.\n> \n>   * 6cdf022 remote-curl: Fix warning after HTTP failure\n>   * be22d92 http: avoid empty error messages for some curl errors\n>   * 8abc508 http: remove extra newline in error message\n>   * 8d677ed http: retry authentication failures for all http requests\n>   * 28d0c10 remote-curl: don't retry auth failures with dumb protocol\n> \n>   These shouldn't affect anything wrt prompting, unless you are somehow\n>   internally reauthenticating.\n> \n> Could you try reverting deba493 and retest, and then if the behaviour is\n> the same \"need ENTER\", further revert 070b4dd and retest?\n\nI did a little more testing.\nThis WIP makes it work for me (i.e. \"need ENTER\" is gone, works with\nand without .netrc, with 'https://host/repo.git' and \n'https://user@host...' URL). Needs testing, of course.\n\n---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\ndiff --git a/http.c b/http.c\nindex a4bc770..008ad72 100644\n--- a/http.c\n+++ b/http.c\n@@ -279,8 +279,6 @@ static CURL *get_curl_handle(void)\n        curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n #endif\n\n-       init_curl_http_auth(result);\n-\n        if (ssl_cert != NULL)\n                curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);\n        if (has_cert_password())\n@@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)\n                else if (missing_target(&results))\n                        ret = HTTP_MISSING_TARGET;\n                else if (results.http_code == 401) {\n-                       if (user_name) {\n+                       if (user_name && user_pass) {\n                                ret = HTTP_NOAUTH;\n                        } else {\n                                /*\n@@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)\n                                 * but that is non-portable.  Using git_getpass() can at least be stubbed\n                                 * on other platforms with a different implementation if/when necessary.\n                                 */\n-                               user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n+                               if (!user_name)\n+                                       user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n                                init_curl_http_auth(slot->curl);\n                                ret = HTTP_REAUTH;\n                        }\n---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\n\n\nRegards,\n  Stefan\n-- \n----------------------------------------------------------------\n/dev/random says: Efficiency takes time! Frugality: who can afford it?\npython -c \"print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')\"\n"},{"id":"178680","messageId":"4EB11B13.1060003@drmicha.warpmail.net","threadId":"28804","inReplyTo":"loom.20111101T211624-511@post.gmane.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-11-02T10:27:31Z","receivedAt":"2011-11-02T10:27:31Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"[Re-adding cc's]\n\nStefan Naewe venit, vidit, dixit 01.11.2011 21:18:\n> Stefan Naewe <stefan.naewe <at> gmail.com> writes:\n> \n>> Push with https works, if the URL looks e.g. like this:\n>>\n>>   https://github.com/user/repo.git\n>>\n>> rather than this\n>>\n>>   https://user <at> github.com/user/repo.git\n>>\n>> and having a ~/.netrc like this\n>>\n>>   machine github.com login user password YouDontWantToKnow\n>>\n>> If the URL contains 'user@' I get the 'need ENTER' behaviour.\n>>\n> \n> Another update:\n> \n> If I revert deba493 the 'need ENTER' is gone and everything works as above.\n> \n> \n> Stefan\n> \nI can confirm that (and feel partly responsible given the history of of\ndeba493). For the record: A simple test looks like\n\nSSH_ASKPASS='' git push -n bitbucket\nPassword for 'bitbucket.org':\n\nwhich succeeds with a simple ENTER when you have the (log and) PW in\n.netrc for that host, and your config says https://user@host.\n\nThe workaround is to remove 'user@' from the url in gitconfig, it is not\nneeded nor used, probably: I haven't checked yet, but that would mean we\ncan't have two different logins on the same server in .netrc. Can we?\n\nI'll try to have a look later, too.\n\nMichael\n"},{"id":"178687","messageId":"4EB14EC8.2070400@drmicha.warpmail.net","threadId":"28804","inReplyTo":"4EB104EA.2040001@atlas-elektronik.com","subject":"Re: [RFC/PATCH] http-push: don't always prompt for password (Was Re: [ANNOUNCE] Git 1.7.8.rc0)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-11-02T14:08:08Z","receivedAt":"2011-11-02T14:08:08Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Stefan Näwe venit, vidit, dixit 02.11.2011 09:52:\n> Am 01.11.2011 19:12, schrieb Junio C Hamano:\n>>\n>> There are only handful of commits that even remotely touch http related\n>> codepath between v1.7.7 and v1.7.8-rc0:\n>>\n>>   * deba493 http_init: accept separate URL parameter\n>>\n>>   This could change the URL string given to http_auth_init().\n>>\n>>   * 070b4dd http: use hostname in credential description\n>>\n>>   This only changes the prompt string; as far as I understand it, the\n>>   condition the password is prompted in the callsites of git_getpass()\n>>   has not changed.\n>>\n>>   * 6cdf022 remote-curl: Fix warning after HTTP failure\n>>   * be22d92 http: avoid empty error messages for some curl errors\n>>   * 8abc508 http: remove extra newline in error message\n>>   * 8d677ed http: retry authentication failures for all http requests\n>>   * 28d0c10 remote-curl: don't retry auth failures with dumb protocol\n>>\n>>   These shouldn't affect anything wrt prompting, unless you are somehow\n>>   internally reauthenticating.\n>>\n>> Could you try reverting deba493 and retest, and then if the behaviour is\n>> the same \"need ENTER\", further revert 070b4dd and retest?\n> \n> I did a little more testing.\n> This WIP makes it work for me (i.e. \"need ENTER\" is gone, works with\n> and without .netrc, with 'https://host/repo.git' and \n> 'https://user@host...' URL). Needs testing, of course.\n> \n> ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\n> diff --git a/http.c b/http.c\n> index a4bc770..008ad72 100644\n> --- a/http.c\n> +++ b/http.c\n> @@ -279,8 +279,6 @@ static CURL *get_curl_handle(void)\n>         curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n>  #endif\n> \n> -       init_curl_http_auth(result);\n> -\n>         if (ssl_cert != NULL)\n>                 curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);\n>         if (has_cert_password())\n> @@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)\n>                 else if (missing_target(&results))\n>                         ret = HTTP_MISSING_TARGET;\n>                 else if (results.http_code == 401) {\n> -                       if (user_name) {\n> +                       if (user_name && user_pass) {\n>                                 ret = HTTP_NOAUTH;\n>                         } else {\n>                                 /*\n> @@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)\n>                                  * but that is non-portable.  Using git_getpass() can at least be stubbed\n>                                  * on other platforms with a different implementation if/when necessary.\n>                                  */\n> -                               user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n> +                               if (!user_name)\n> +                                       user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n>                                 init_curl_http_auth(slot->curl);\n>                                 ret = HTTP_REAUTH;\n>                         }\n> ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\n> \n> \n> Regards,\n>   Stefan\nThanks!\n\nTested-by: Michael J Gruber <git@drmicha.warpmail.net>\n\nMore specifically, I ran our test suite (next plus Stefan's patch), and\ntested\n\nhttps://user@host with .netrc and with askpass\nhttps://host with .netrc\n\nThe latter fails with askpass because we ask\nPassword for 'host'\nand not\nPassword for 'user@host'\nbut that is true both with and without the patch. (I thought we had\nchanged that, but I guess it's cooking.)\n\nMichael\n"},{"id":"178701","messageId":"7vk47ijvlv.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"4EB104EA.2040001@atlas-elektronik.com","subject":"Re: [RFC/PATCH] http-push: don't always prompt for password","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-02T17:13:32Z","receivedAt":"2011-11-02T17:13:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Näwe <stefan.naewe@atlas-elektronik.com> writes:\n\n> Am 01.11.2011 19:12, schrieb Junio C Hamano:\n>> \n>> There are only handful of commits that even remotely touch http related\n>> codepath between v1.7.7 and v1.7.8-rc0:\n>> \n>>   * deba493 http_init: accept separate URL parameter\n>> \n>>   This could change the URL string given to http_auth_init().\n>> ... \n>> Could you try reverting deba493 and retest, and then if the behaviour is\n>> the same \"need ENTER\", further revert 070b4dd and retest?\n>\n> I did a little more testing.\n> This WIP makes it work for me (i.e. \"need ENTER\" is gone, works with\n> and without .netrc, with 'https://host/repo.git' and \n> 'https://user@host...' URL). Needs testing, of course.\n>\n> ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\n> diff --git a/http.c b/http.c\n> index a4bc770..008ad72 100644\n> --- a/http.c\n> +++ b/http.c\n> @@ -279,8 +279,6 @@ static CURL *get_curl_handle(void)\n>         curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n>  #endif\n>\n> -       init_curl_http_auth(result);\n> -\n>         if (ssl_cert != NULL)\n>                 curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);\n>         if (has_cert_password())\n> @@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)\n>                 else if (missing_target(&results))\n>                         ret = HTTP_MISSING_TARGET;\n>                 else if (results.http_code == 401) {\n> -                       if (user_name) {\n> +                       if (user_name && user_pass) {\n>                                 ret = HTTP_NOAUTH;\n>                         } else {\n>                                 /*\n> @@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)\n>                                  * but that is non-portable.  Using git_getpass() can at least be stubbed\n>                                  * on other platforms with a different implementation if/when necessary.\n>                                  */\n> -                               user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n> +                               if (!user_name)\n> +                                       user_name = xstrdup(git_getpass_with_description(\"Username\", description));\n>                                 init_curl_http_auth(slot->curl);\n>                                 ret = HTTP_REAUTH;\n>                         }\n> ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---\n\nThis defers the calls to git_getpass* until we get 401 from the server\nside.\n\nI am guessing the reason why in the current code get_curl_handle() has a\ncall to init_curl_http_auth() very early, but only when user_name is set,\nis because it is likely for a site to require authentication when the user\nalready has \"username@\" in its URL, and doing it this way will avoid the\nextra round-trip because by the time we make an HTTP request, we have both\nname and pass. If we apply this patch, the check in init_curl_http_auth()\nthat asks for the password only when user_name is set becomes unnecessary.\n\nI think the second hunk at l.846 sort of makes sense, but not quite.\n\n\"We got 401 even though we know we have supplied name and pass\" is a valid\ncriterion to decide that the name/pass is an invalid combination. But it\nmakes me wonder if this code in its early days guaranteed whenever we have\nuser_name we always have made sure we have user_pass (otherwise by asking\nfor it with git_getpass) and that is the reason why it had to check only\nfor user_name, and if that is the case perhaps the real breakage is we are\nnot keeping that guarantee in the current code?\n\nIOW, when in the current code do we make a new HTTP request while\nuser_name is set but no user_pass?  Perhaps if we fix that codepath we do\nnot have to have this extra 401 roundtrip this patch is introducing when\nthe username (but not password) is given?\n\nPeff, what do you think?\n"},{"id":"178702","messageId":"20111102172310.GA28525@sigill.intra.peff.net","threadId":"28804","inReplyTo":"7vk47ijvlv.fsf@alter.siamese.dyndns.org","subject":"Re: [RFC/PATCH] http-push: don't always prompt for password","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-02T17:23:10Z","receivedAt":"2011-11-02T17:23:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 02, 2011 at 10:13:32AM -0700, Junio C Hamano wrote:\n\n> This defers the calls to git_getpass* until we get 401 from the server\n> side.\n> \n> I am guessing the reason why in the current code get_curl_handle() has a\n> call to init_curl_http_auth() very early, but only when user_name is set,\n> is because it is likely for a site to require authentication when the user\n> already has \"username@\" in its URL, and doing it this way will avoid the\n> extra round-trip because by the time we make an HTTP request, we have both\n> name and pass. If we apply this patch, the check in init_curl_http_auth()\n> that asks for the password only when user_name is set becomes unnecessary.\n\nYeah, that was my reading, as well. I was tempted to do away with it, as\nit makes the code much simpler, at the cost of doing that extra\nround-trip. However, most browsers do that round-trip, and I don't think\nit's that big a deal.\n\nIn the end I decided not to switch it just because I wanted to be as\nminimally invasive as possible, just in case somebody did care about the\nround trip.\n\n> I think the second hunk at l.846 sort of makes sense, but not quite.\n> \n> \"We got 401 even though we know we have supplied name and pass\" is a valid\n> criterion to decide that the name/pass is an invalid combination. But it\n> makes me wonder if this code in its early days guaranteed whenever we have\n> user_name we always have made sure we have user_pass (otherwise by asking\n> for it with git_getpass) and that is the reason why it had to check only\n> for user_name, and if that is the case perhaps the real breakage is we are\n> not keeping that guarantee in the current code?\n\nAll of my patches attempted to keep that condition, as well (because\ncredential_fill tries to do so). But I didn't think about it during the\nre-roll of the patches that are in master now, so maybe that wasn't\nkept.\n\nIt seems to me that Stefan's patch actually causes that (because he\nremoves the early \"set password if we have a username\" logic). But I'll\ntake another look at what's in master.\n\n-Peff\n"},{"id":"178703","messageId":"7vfwi6jucg.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"20111102172310.GA28525@sigill.intra.peff.net","subject":"Re: [RFC/PATCH] http-push: don't always prompt for password","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-02T17:40:47Z","receivedAt":"2011-11-02T17:40:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> It seems to me that Stefan's patch actually causes that (because he\n> removes the early \"set password if we have a username\" logic). But I'll\n> take another look at what's in master.\n\nThanks.\n"},{"id":"178704","messageId":"20111102180327.GA30668@sigill.intra.peff.net","threadId":"28804","inReplyTo":"loom.20111101T211624-511@post.gmane.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-02T18:03:27Z","receivedAt":"2011-11-02T18:03:27Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 01, 2011 at 08:18:47PM +0000, Stefan Naewe wrote:\n\n> Stefan Naewe <stefan.naewe <at> gmail.com> writes:\n> \n> > Push with https works, if the URL looks e.g. like this:\n> > \n> >   https://github.com/user/repo.git\n> > \n> > rather than this\n> > \n> >   https://user <at> github.com/user/repo.git\n> > \n> > and having a ~/.netrc like this\n> > \n> >   machine github.com login user password YouDontWantToKnow\n> > \n> > If the URL contains 'user@' I get the 'need ENTER' behaviour.\n> > \n> \n> Another update:\n> \n> If I revert deba493 the 'need ENTER' is gone and everything works as above.\n\nI think this is a false positive. The problem that deba493 fixes is that\n\"git push\" was not properly looking at the push URL, but rather pulling\nthe initial auth information from the fetch URL. So I suspect your\nfinding the bug there or not may have to do with it actually respecting\nyour config properly.\n\nI think the bug is much older than this, and we are just exposing it by\nfinally using the correct URL.\n\nWithout using a configured remote, try this (with .netrc configured):\n\n  git push https://github.com/user/repo.git :refs/heads/nothing\n\nwhich should work, and then this:\n\n  git push https://user@github.com/user/repo.git :refs/heads/nothing\n\nwhich will do the \"must hit enter to accept password\" thing.\n\nThat fails even with v1.7.7. I didn't bisect, but it has been there\nquite a while (v1.6.6 has it, but v1.6.5 has a weird error, so I didn't\nbisect further).\n\n-Peff\n"},{"id":"178705","messageId":"20111102181041.GA5366@sigill.intra.peff.net","threadId":"28804","inReplyTo":"20111102180327.GA30668@sigill.intra.peff.net","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-02T18:10:41Z","receivedAt":"2011-11-02T18:10:41Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 02, 2011 at 02:03:27PM -0400, Jeff King wrote:\n\n> Without using a configured remote, try this (with .netrc configured):\n> \n>   git push https://github.com/user/repo.git :refs/heads/nothing\n> \n> which should work, and then this:\n> \n>   git push https://user@github.com/user/repo.git :refs/heads/nothing\n> \n> which will do the \"must hit enter to accept password\" thing.\n> \n> That fails even with v1.7.7. I didn't bisect, but it has been there\n> quite a while (v1.6.6 has it, but v1.6.5 has a weird error, so I didn't\n> bisect further).\n\nOK, I see the issue.\n\nThe logic is \"if we have a username, but not a password, then ask for\nthe password before trying any http\" (this is what avoids the extra\nround trip).\n\nBut if you are using netrc, we don't parse it ourselves. We just tell\ncurl \"when you are making the request, check netrc, too\".\n\nSo the ideal logic is:\n\n  1. look in netrc\n\n  2. If we have a username and no password, ask for password\n\n  3. Otherwise, try it and see if we get a 401.\n\nBut we can't do that, because (1) and (3) happen atomically inside of\ncurl.\n\nThe simplest thing is to just drop the behavior in (2), and let it drop\nto a 401. The extra round trip probably isn't that big a deal.\n\nThe other option is to start parsing netrc ourselves, or do the extra\nround trip if we detect ~/.netrc or something. But that last one is\ngetting pretty hackish.\n\n-Peff\n"},{"id":"178710","messageId":"7vwrbiibgz.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"20111102181041.GA5366@sigill.intra.peff.net","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-02T19:13:48Z","receivedAt":"2011-11-02T19:13:48Z","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> So the ideal logic is:\n>\n>   1. look in netrc\n>\n>   2. If we have a username and no password, ask for password\n>\n>   3. Otherwise, try it and see if we get a 401.\n>\n> But we can't do that, because (1) and (3) happen atomically inside of\n> curl.\n>\n> The simplest thing is to just drop the behavior in (2), and let it drop\n> to a 401. The extra round trip probably isn't that big a deal.\n\nThat is essentially what Stefan's fix is about.\n\nThe cases we have \"extra\" roundtrip are:\n\n - when you have username@ in URL but no password is stored in .netrc;\n - when you have username@ in URL and no $HOME/.netrc file.\n\nand in such a case using URL without username@ in it as a workaround would\nsave the roundtrip but forces you to type your username@ over and over\nagain, which is _not_ a real workaround.\n\nA workaround for people who want ultimate convenience is to use .netrc to\nhave both username:password, but that is at the cost of potentially\nreduced security. Having username@ in URL and typing password\ninteractively, if it worked properly, would have been the best of both\nworlds.\n\n> The other option is to start parsing netrc ourselves, or do the extra\n> round trip if we detect ~/.netrc or something. But that last one is\n> getting pretty hackish.\n\nI tend to agree that we wouldn't want to parse netrc ourselves (that is\nwhat library support e.g. CURLOPT_NETRC is for). The latter is hackish but\non the other hand it is a cheap, simple and useful hack.\n\nHow would the upcoming keystore support fit in this picture, by the way?\n"},{"id":"178716","messageId":"20111102200947.GA5628@sigill.intra.peff.net","threadId":"28804","inReplyTo":"7vwrbiibgz.fsf@alter.siamese.dyndns.org","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-02T20:09:47Z","receivedAt":"2011-11-02T20:09:47Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 02, 2011 at 12:13:48PM -0700, Junio C Hamano wrote:\n\n> > The simplest thing is to just drop the behavior in (2), and let it drop\n> > to a 401. The extra round trip probably isn't that big a deal.\n> \n> That is essentially what Stefan's fix is about.\n\nRight. I think it may be the sanest thing to do.\n\n> The cases we have \"extra\" roundtrip are:\n> \n>  - when you have username@ in URL but no password is stored in .netrc;\n>  - when you have username@ in URL and no $HOME/.netrc file.\n> \n> and in such a case using URL without username@ in it as a workaround would\n> save the roundtrip but forces you to type your username@ over and over\n> again, which is _not_ a real workaround.\n\nYeah. There's no way for us to know before we hand off to curl what you\nhave in netrc. So these netrc cases will always be at odds with the\nno-netrc case.\n\nNormally I would say to implement in favor of the no-netrc case, as it\nis probably more common (and will hopefully be more so after the auth\nhelpers are finished). But the problem is that the penalties are\ndifferent. On the one hand, we have the extra http round-trip. Which is\nannoying, but mostly invisible to the user. But on the other, we have\ngit prompting the user unnecessarily, which is just awful.\n\n> > The other option is to start parsing netrc ourselves, or do the extra\n> > round trip if we detect ~/.netrc or something. But that last one is\n> > getting pretty hackish.\n> \n> I tend to agree that we wouldn't want to parse netrc ourselves (that is\n> what library support e.g. CURLOPT_NETRC is for). The latter is hackish but\n> on the other hand it is a cheap, simple and useful hack.\n\nNote that it's not always right, of course. You might have a .netrc but\nno entry for that host. But at least it lets the common case people\n(i.e., people who never heard of or touched netrc) to avoid the round\ntrip.\n\n> How would the upcoming keystore support fit in this picture, by the way?\n\nAny time we would call getpass(), we ask the helper for the credential.\nSo for user@host, we would call out to the helper for the password\nproactively, and otherwise wait for a 401.\n\nWe _could_ be proactive and actually ask the helpers for a username and\npassword even for \"https://host/repo\", which would save a round-trip to\nget the 401 in some cases. But that assumes that asking the helper is\ncheap. It might actually require the user inputting a password to unlock\nthe keystore, which would be annoying if the remote doesn't require\nauth at all.\n\nWe could try to be clever and use a heuristic that fetch probably\ndoesn't need auth, but push does. Then fetch gets the extra round-trip\nbut push doesn't. But that just seems needlessly complex to save one\nhttp round-trip on push.\n\n-Peff\n"},{"id":"178802","messageId":"7vbossermv.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"20111102200947.GA5628@sigill.intra.peff.net","subject":"Re: [ANNOUNCE] Git 1.7.8.rc0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-03T23:02:48Z","receivedAt":"2011-11-03T23:02:48Z","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> Normally I would say to implement in favor of the no-netrc case, as it\n> is probably more common (and will hopefully be more so after the auth\n> helpers are finished). But the problem is that the penalties are\n> different. On the one hand, we have the extra http round-trip. Which is\n> annoying, but mostly invisible to the user. But on the other, we have\n> git prompting the user unnecessarily, which is just awful.\n\nOk, so are we in agreement that Stefan's patch $gmane/184617 is the right\nfix at least for the time being?\n\nThis will be a minor regression if left unfixed, so I'd like to have a\nminimum fix in before I tag -rc1 over the weekend.\n\nCould any one of you guys please care to package it up with a readable\ncommit log message with a sign-off?\n"},{"id":"178812","messageId":"1320390188-24334-1-git-send-email-stefan.naewe@gmail.com","threadId":"28804","inReplyTo":"7vfwi6jucg.fsf@alter.siamese.dyndns.org","subject":"[PATCH] http-push: don't always prompt for password","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-11-04T07:03:08Z","receivedAt":"2011-11-04T07:03:08Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"http-push prompts for a password when the URL is set as\n'https://user@host/repo' even though there is one set\nin ~/.netrc. Pressing ENTER at the password prompt succeeds\nthen, but is a annoying and makes it almost useless\nin a shell script, e.g.\n\nSigned-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n---\n http.c |    7 +++----\n 1 files changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex a4bc770..008ad72 100644\n--- a/http.c\n+++ b/http.c\n@@ -279,8 +279,6 @@ static CURL *get_curl_handle(void)\n \tcurl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n #endif\n \n-\tinit_curl_http_auth(result);\n-\n \tif (ssl_cert != NULL)\n \t\tcurl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert);\n \tif (has_cert_password())\n@@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)\n \t\telse if (missing_target(&results))\n \t\t\tret = HTTP_MISSING_TARGET;\n \t\telse if (results.http_code == 401) {\n-\t\t\tif (user_name) {\n+\t\t\tif (user_name && user_pass) {\n \t\t\t\tret = HTTP_NOAUTH;\n \t\t\t} else {\n \t\t\t\t/*\n@@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)\n \t\t\t\t * but that is non-portable.  Using git_getpass() can at least be stubbed\n \t\t\t\t * on other platforms with a different implementation if/when necessary.\n \t\t\t\t */\n-\t\t\t\tuser_name = xstrdup(git_getpass_with_description(\"Username\", description));\n+\t\t\t\tif (!user_name)\n+\t\t\t\t\tuser_name = xstrdup(git_getpass_with_description(\"Username\", description));\n \t\t\t\tinit_curl_http_auth(slot->curl);\n \t\t\t\tret = HTTP_REAUTH;\n \t\t\t}\n-- \n1.7.8.rc0.1.gb345ae\n"},{"id":"178838","messageId":"7vlirvdeb2.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"1320390188-24334-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH] http-push: don't always prompt for password","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-04T16:48:17Z","receivedAt":"2011-11-04T16:48:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> http-push prompts for a password when the URL is set as\n> 'https://user@host/repo' even though there is one set\n> in ~/.netrc. Pressing ENTER at the password prompt succeeds\n> then, but is a annoying and makes it almost useless\n> in a shell script, e.g.\n>\n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> ---\n\nThanks.\n\nWith this the only callsite of init_curl_http_auth() becomes the one after\nwe get the 401 response, and this caller makes sure that user_name is not\nNULL.\n\nDo we still want \"if (user_name)\" inside init_curl_http_auth()?\n\nI tried to rewrite the proposed commit log message to describe the real\nissue, and here is what I came up with:\n\nAuthor: Stefan Naewe <stefan.naewe@gmail.com>\nDate:   Fri Nov 4 08:03:08 2011 +0100\n\n    http: don't always prompt for password\n    \n    When a username is already specified at the beginning of any HTTP\n    transaction (e.g. \"git push https://user@hosting.example.com/project.git\"\n    or \"git ls-remote https://user@hosting.example.com/project.git\"), the code\n    interactively asks for a password before calling into the libcurl library.\n    It is very likely that the reason why user included the username in the\n    URL is because the user knows that it would require authentication to\n    access the resource. Asking for the password upfront would save one\n    roundtrip to get a 401 response, getting the password and then retrying\n    the request. This is a reasonable optimization.\n    \n    HOWEVER.\n    \n    This is done even when $HOME/.netrc might have a corresponding entry to\n    access the site, or the site does not require authentication to access the\n    resource after all. But neither condition can be determined until we call\n    into libcurl library (we do not read and parse $HOME/.netrc ourselves). In\n    these cases, the user is forced to respond to the password prompt, only to\n    give a password that is not used in the HTTP transaction. If the password\n    is in $HOME/.netrc, an empty input would later let the libcurl layer to\n    pick up the password from there, and if the resource does not require\n    authentication, any input would be taken and then discarded without\n    getting used. It is wasteful to ask this unused information to the end\n    user.\n    \n    Reduce the confusion by not trying to optimize for this case and always\n    incur roundtrip penalty. An alternative might be to document this and keep\n    this round-trip optimization as-is.\n    \n    Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n    Helped-by: Jeff King <peff@peff.net>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nWhat is somewhat troubling is that after analyzing the root cause of the\nissue, I am wondering if a more correct fix is to remove the user@ part\nfrom the URL (in other words, document that a URL with an embedded\nusername will ask for password upfront, and tell the users that if they\nhave netrc entries or if they are accessing a resource that does not\nrequire authentication, they should omit the username from the URL).\n"},{"id":"178840","messageId":"20111104174303.GA22568@sigill.intra.peff.net","threadId":"28804","inReplyTo":"7vlirvdeb2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] http-push: don't always prompt for password","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-11-04T17:43:03Z","receivedAt":"2011-11-04T17:43:03Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 04, 2011 at 09:48:17AM -0700, Junio C Hamano wrote:\n\n> Stefan Naewe <stefan.naewe@gmail.com> writes:\n> \n> > http-push prompts for a password when the URL is set as\n> > 'https://user@host/repo' even though there is one set\n> > in ~/.netrc. Pressing ENTER at the password prompt succeeds\n> > then, but is a annoying and makes it almost useless\n> > in a shell script, e.g.\n> >\n> > Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> > ---\n> \n> Thanks.\n> \n> With this the only callsite of init_curl_http_auth() becomes the one after\n> we get the 401 response, and this caller makes sure that user_name is not\n> NULL.\n> \n> Do we still want \"if (user_name)\" inside init_curl_http_auth()?\n\nSince we now only call init_curl_http_auth when we know we need auth, I\nthink it would make more sense to just move the user_name asking there,\ntoo, like:\n\n  static void init_curl_http_auth(CURL *result)\n  {\n          struct strbuf up = STRBUF_INIT;\n\n          if (!user_name)\n                  user_name = xstrdup(git_getpass_with_description(\"Username\", description);\n          if (!user_pass)\n                  user_pass = xstrdup(git_getpass_with_description(\"Password\", description);\n\n          strbuf_addf(&up, \"%s:%s\", user_name, user_pass);\n          curl_easy_setopt(result, CURLOPT_USERPWD, strbuf_detach(&up, NULL));\n  }\n\nAnd then it's easy to swap out the asking for credential_fill() when it\nbecomes available. But I admit I don't care that much now, as I'll just\nend up doing that refactoring later with my credential patches anyway.\n\n> I tried to rewrite the proposed commit log message to describe the real\n> issue, and here is what I came up with:\n\nYour description looks accurate to me.\n\n> What is somewhat troubling is that after analyzing the root cause of the\n> issue, I am wondering if a more correct fix is to remove the user@ part\n> from the URL (in other words, document that a URL with an embedded\n> username will ask for password upfront, and tell the users that if they\n> have netrc entries or if they are accessing a resource that does not\n> require authentication, they should omit the username from the URL).\n\nIt's tempting, because the non-netrc case is the common one, and we are\ndropping the round-trip avoidance for those people. I'm just not sure\nthat it's going to be obvious to users that they need to drop the user@\nportion from their URL when using netrc. That seems like a bizarre\nrequirement from the user's POV, even if we do document it.\n\n-Peff\n"},{"id":"178847","messageId":"CAJzBP5TdwZ4AhY6cosLOhcmxLfBA8hX7G9nBhiaLKYmMgPcyfQ@mail.gmail.com","threadId":"28804","inReplyTo":"7vlirvdeb2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] http-push: don't always prompt for password","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-11-04T18:34:58Z","receivedAt":"2011-11-04T18:34:58Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"On Fri, Nov 4, 2011 at 5:48 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Stefan Naewe <stefan.naewe@gmail.com> writes:\n>\n>> http-push prompts for a password when the URL is set as\n>> 'https://user@host/repo' even though there is one set\n>> in ~/.netrc. Pressing ENTER at the password prompt succeeds\n>> then, but is a annoying and makes it almost useless\n>> in a shell script, e.g.\n>>\n>> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n>> ---\n>\n> Thanks.\n>\n> With this the only callsite of init_curl_http_auth() becomes the one after\n> we get the 401 response, and this caller makes sure that user_name is not\n> NULL.\n>\n> Do we still want \"if (user_name)\" inside init_curl_http_auth()?\n\nDunno...\nI think what Peff says makes sense.\n\n> I tried to rewrite the proposed commit log message to describe the real\n> issue, and here is what I came up with:\n>\n> [...]\n\nLooks good to me.\n\n> What is somewhat troubling is that after analyzing the root cause of the\n> issue, I am wondering if a more correct fix is to remove the user@ part\n> from the URL (in other words, document that a URL with an embedded\n> username will ask for password upfront, and tell the users that if they\n> have netrc entries or if they are accessing a resource that does not\n> require authentication, they should omit the username from the URL).\n\nDon't get me wrong, but I really don't care.\nI just wanted to have that issue fixed, to get my scripted 'multi\nrepository pull' working\nagain.\n\nRegards,\n  Stefan\n-- \n----------------------------------------------------------------\npython -c \"print '73746566616e2e6e6165776540676d61696c2e636f6d'.decode('hex')\"\n"},{"id":"178850","messageId":"7vwrbfbtbq.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"20111104174303.GA22568@sigill.intra.peff.net","subject":"Re: [PATCH] http-push: don't always prompt for password","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-04T19:06:49Z","receivedAt":"2011-11-04T19:06:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Since we now only call init_curl_http_auth when we know we need auth, I\n> think it would make more sense to just move the user_name asking there,\n> too, like:\n>\n>   static void init_curl_http_auth(CURL *result)\n>   {\n>           struct strbuf up = STRBUF_INIT;\n>\n>           if (!user_name)\n>                   user_name = xstrdup(git_getpass_with_description(\"Username\", description);\n>           if (!user_pass)\n>                   user_pass = xstrdup(git_getpass_with_description(\"Password\", description);\n>\n>           strbuf_addf(&up, \"%s:%s\", user_name, user_pass);\n>           curl_easy_setopt(result, CURLOPT_USERPWD, strbuf_detach(&up, NULL));\n>   }\n>\n> And then it's easy to swap out the asking for credential_fill() when it\n> becomes available. But I admit I don't care that much now, as I'll just\n> end up doing that refactoring later with my credential patches anyway.\n\nYeah, let's not over-churn this part for now as we know it will change\nanyway.\n\nThanks both!\n"},{"id":"178884","messageId":"7vwrbf83uj.fsf@alter.siamese.dyndns.org","threadId":"28804","inReplyTo":"CAJzBP5TdwZ4AhY6cosLOhcmxLfBA8hX7G9nBhiaLKYmMgPcyfQ@mail.gmail.com","subject":"Re: [PATCH] http-push: don't always prompt for password","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-11-05T06:45:24Z","receivedAt":"2011-11-05T06:45:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> I just wanted to have that issue fixed, to get my scripted 'multi\n> repository pull' working\n> again.\n\nFor the latter, dropping username@ would also be a valid solution; saying\n\"want to have that issue fixed\" is not helping the discussion very much.\n\nBecause the change is fairly straightforward, I am tempted to merge this\nsoon and see if anybody screams (in which case we would revert it by 1.7.8\nfinal). The only people who may possibly scream are people who care about\nlatencies additional HTTP roundtrip incurs, which might not be a big deal.\nWe'll find it out and hopefully soon enough ;-)\n"}]}