1. 21 7月, 2011 4 次提交
    • J
      http: retry authentication failures for all http requests · 8d677edc
      Jeff King 提交于
      Commit 42653c09 (Prompt for a username when an HTTP request
      401s, 2010-04-01) changed http_get_strbuf to prompt for
      credentials when we receive a 401, but didn't touch
      http_get_file. The latter is called only for dumb http;
      while it's usually the case that people don't use
      authentication on top of dumb http, there is no reason not
      to allow both types of requests to use this feature.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8d677edc
    • J
      remote-curl: don't retry auth failures with dumb protocol · 28d0c101
      Jeff King 提交于
      When fetching an http URL, we first try fetching info/refs
      with an extra "service" parameter. This will work for a
      smart-http server, or a dumb server which ignores extra
      parameters when fetching files. If that fails, we retry
      without the extra parameter to remain compatible with dumb
      servers which didn't like our first request.
      
      If the server returned a "401 Unauthorized", indicating that
      the credentials we provided were not good, there is not much
      point in retrying. With the current code, we just waste an
      extra round trip to the HTTP server before failing.
      
      But as the http code becomes smarter about throwing away
      rejected credentials and re-prompting the user for new ones
      (which it will later in this series), this will become more
      confusing. At some point we will stop asking for credentials
      to retry smart http, and will be asking for credentials to
      retry dumb http. So now we're not only wasting an extra HTTP
      round trip for something that is unlikely to work, but we're
      making the user re-type their password for it.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      28d0c101
    • J
      improve httpd auth tests · 5232586c
      Jeff King 提交于
      These just checked that we could clone a repository when the
      username and password were given in the URL; we should also
      check that git will prompt when no or partial credentials
      are given.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5232586c
    • J
      url: decode buffers that are not NUL-terminated · 66c84485
      Jeff King 提交于
      The url_decode function needs only minor tweaks to handle
      arbitrary buffers. Let's do those tweaks, which cleans up an
      unreadable mess of temporary strings in http.c.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      66c84485
  2. 20 7月, 2011 11 次提交
    • J
      Update draft release notes to 1.7.7 · d79bcd68
      Junio C Hamano 提交于
      The second batch of topics for this cycle are now in.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d79bcd68
    • J
      Merge branch 'jc/index-pack' · d907bf8e
      Junio C Hamano 提交于
      * jc/index-pack:
        verify-pack: use index-pack --verify
        index-pack: show histogram when emulating "verify-pack -v"
        index-pack: start learning to emulate "verify-pack -v"
        index-pack: a miniscule refactor
        index-pack --verify: read anomalous offsets from v2 idx file
        write_idx_file: need_large_offset() helper function
        index-pack: --verify
        write_idx_file: introduce a struct to hold idx customization options
        index-pack: group the delta-base array entries also by type
      
      Conflicts:
      	builtin/verify-pack.c
      	cache.h
      	sha1_file.c
      d907bf8e
    • J
      Merge branch 'jn/mime-type-with-params' · 54dbc1f9
      Junio C Hamano 提交于
      * jn/mime-type-with-params:
        gitweb: Serve */*+xml 'blob_plain' as text/plain with $prevent_xss
        gitweb: Serve text/* 'blob_plain' as text/plain with $prevent_xss
      54dbc1f9
    • J
      Merge branch 'jc/submodule-sync-no-auto-vivify' · 0591c0a5
      Junio C Hamano 提交于
      * jc/submodule-sync-no-auto-vivify:
        submodule add: always initialize .git/config entry
        submodule sync: do not auto-vivify uninteresting submodule
      
      Conflicts:
      	git-submodule.sh
      0591c0a5
    • J
      Merge branch 'jk/archive-tar-filter' · 765c7e4f
      Junio C Hamano 提交于
      * jk/archive-tar-filter:
        upload-archive: allow user to turn off filters
        archive: provide builtin .tar.gz filter
        archive: implement configurable tar filters
        archive: refactor file extension format-guessing
        archive: move file extension format-guessing lower
        archive: pass archiver struct to write_archive callback
        archive: refactor list of archive formats
        archive-tar: don't reload default config options
        archive: reorder option parsing and config reading
      765c7e4f
    • J
      Merge branch 'jn/gitweb-split-header-html' · 17a403c8
      Junio C Hamano 提交于
      * jn/gitweb-split-header-html:
        gitweb: Refactor git_header_html
      17a403c8
    • J
      Merge branch 'jk/clone-cmdline-config' · ff94409d
      Junio C Hamano 提交于
      * jk/clone-cmdline-config:
        clone: accept config options on the command line
        config: make git_config_parse_parameter a public function
        remote: use new OPT_STRING_LIST
        parse-options: add OPT_STRING_LIST helper
      ff94409d
    • J
      Merge branch 'jk/maint-config-param' · fe01ef31
      Junio C Hamano 提交于
      * jk/maint-config-param:
        config: use strbuf_split_str instead of a temporary strbuf
        strbuf: allow strbuf_split to work on non-strbufs
        config: avoid segfault when parsing command-line config
        config: die on error in command-line config
        fix "git -c" parsing of values with equals signs
        strbuf_split: add a max parameter
      fe01ef31
    • J
      Merge branch 'jk/tag-list-multiple-patterns' · 20a80d04
      Junio C Hamano 提交于
      * jk/tag-list-multiple-patterns:
        tag: accept multiple patterns for --list
      20a80d04
    • J
      Merge branch 'jc/zlib-wrap' · eb4f4076
      Junio C Hamano 提交于
      * jc/zlib-wrap:
        zlib: allow feeding more than 4GB in one go
        zlib: zlib can only process 4GB at a time
        zlib: wrap deflateBound() too
        zlib: wrap deflate side of the API
        zlib: wrap inflateInit2 used to accept only for gzip format
        zlib: wrap remaining calls to direct inflate/inflateEnd
        zlib wrapper: refactor error message formatter
      
      Conflicts:
      	sha1_file.c
      eb4f4076
    • J
      Merge branch 'ak/gcc46-profile-feedback' · d37b2991
      Junio C Hamano 提交于
      * ak/gcc46-profile-feedback:
        Add explanation of the profile feedback build to the README
        Add profile feedback build to git
        Add option to disable NORETURN
      d37b2991
  3. 14 7月, 2011 15 次提交
  4. 07 7月, 2011 3 次提交
  5. 01 7月, 2011 2 次提交
    • J
      gitweb: Serve */*+xml 'blob_plain' as text/plain with $prevent_xss · e8c35317
      Jakub Narebski 提交于
      Enhance usability of 'blob_plain' view protection against XSS attacks
      (enabled by setting $prevent_xss to true) by serving contents inline
      as safe 'text/plain' mimetype where possible, instead of serving with
      "Content-Disposition: attachment" to make sure they don't run in
      gitweb's security domain.
      
      This patch broadens downgrading to 'text/plain' further, to any
      */*+xml mimetype.  This includes:
      
        application/xhtml+xml    (*.xhtml, *.xht)
        application/atom+xml     (*.atom)
        application/rss+xml      (*.rss)
        application/mathml+xm    (*.mathml)
        application/docbook+xml  (*.docbook)
        image/svg+xml            (*.svg, *.svgz)
      
      Probably most useful is serving XHTML files as text/plain in
      'blob_plain' view, directly viewable.
      
      Because file with 'image/svg+xml' mimetype can be compressed SVGZ
      file, we have to check if */*+xml really is text file, via '-T $fd'.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e8c35317
    • J
      gitweb: Serve text/* 'blob_plain' as text/plain with $prevent_xss · 86afbd02
      Jakub Narebski 提交于
      One of mechanism enabled by setting $prevent_xss to true is 'blob_plain'
      view protection.  With XSS prevention on, blobs of all types except a
      few known safe ones are served with "Content-Disposition: attachment" to
      make sure they don't run in our security domain.
      
      Instead of serving text/* type files, except text/plain (and including
      text/html), as attachements, downgrade it to text/plain.  This way HTML
      pages in 'blob_plain' (raw) view would be displayed in browser, but
      safely as a source, and not asked to be saved.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      86afbd02
  6. 30 6月, 2011 5 次提交
    • B
      git-submodule.sh: preserve stdin for the command spawned by foreach · 4dca1aa6
      Brandon Casey 提交于
      The user-supplied command spawned by 'submodule foreach' loses its
      connection to the original standard input.  Instead, it is connected to the
      output of a pipe within the git-submodule script.  The user-supplied
      command supplied to 'submodule foreach' is spawned within a while loop
      which is being piped into.  Due to the way shells implement piping output
      to a while loop, a subshell is created with its standard input attached to
      the output of the pipe.  This results in all of the commands executed
      within the while loop to have their stdins modified in the same way,
      including the user-supplied command.
      
      This can cause a problem if the command requires reading from stdin or if
      it changes its behavior based on whether stdin is a tty or not.  For
      example, this problem was noticed when trying to execute the following:
      
         git submodule foreach git shortlog --since=two.weeks.ago
      
      which printed a message about entering the first submodule and produced no
      further output and exited with a status of zero.  In this case, shortlog
      detected that it was not connected to a tty, and since no revision was
      supplied as an argument, it attempted to read the list of revisions from
      standard input.  Instead, it slurped up the list of submodules that was
      being piped to the enclosing while loop and caused that loop to end early
      without processing the remaining submodules.
      
      Work around this behavior by saving the original standard input file
      descriptor before the while loop, and restoring it when spawning the
      user-supplied command.
      
      This fixes the tests in t7407.
      Signed-off-by: NBrandon Casey <drafnel@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4dca1aa6
    • B
      t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin · 91cd7e4b
      Brandon Casey 提交于
      The user-supplied command spawned by 'submodule foreach' loses its
      connection to the original standard input.  Instead, it is connected to the
      output of a pipe within the git-submodule script.  This can cause a problem
      if the command requires reading from stdin or if it changes its behavior
      based on whether stdin is a tty or not (e.g. git shortlog).  Demonstrate
      this flaw.
      Signed-off-by: NBrandon Casey <drafnel@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      91cd7e4b
    • J
      Merge branch 'jc/streaming-filter' into next · 9901923c
      Junio C Hamano 提交于
      * jc/streaming-filter:
        t0021: test application of both crlf and ident
        t0021-conversion.sh: fix NoTerminatingSymbolAtEOF test
        streaming: filter cascading
        streaming filter: ident filter
        Add LF-to-CRLF streaming conversion
        stream filter: add "no more input" to the filters
        Add streaming filter API
        convert.h: move declarations for conversion from cache.h
      9901923c
    • J
      Merge branch 'jn/gitweb-js-blame' into next · cce347da
      Junio C Hamano 提交于
      * jn/gitweb-js-blame:
        gitweb.js: use setTimeout rather than setInterval in blame_incremental.js
        gitweb.js: No need for loop in blame_incremental's handleResponse()
        gitweb.js: No need for inProgress in blame_incremental.js
      cce347da
    • J
      Merge branch 'da/git-prefix-everywhere' into next · 4ed54610
      Junio C Hamano 提交于
      * da/git-prefix-everywhere:
        t/t7503-pre-commit-hook.sh: Add GIT_PREFIX tests
        git-mergetool--lib: Make vimdiff retain the current directory
        git: Remove handling for GIT_PREFIX
        setup: Provide GIT_PREFIX to built-ins
      4ed54610