Commits on Jan 20, 2010
  1. Merge branch 'il/push-set-upstream'

    gitster committed Jan 20, 2010
    * il/push-set-upstream:
      Add push --set-upstream
    
    Conflicts:
    	transport.c
Commits on Jan 17, 2010
  1. Merge branch 'tc/clone-v-progress'

    gitster committed Jan 17, 2010
    * tc/clone-v-progress:
      clone: use --progress to force progress reporting
      clone: set transport->verbose when -v/--verbose is used
      git-clone.txt: reword description of progress behaviour
      check stderr with isatty() instead of stdout when deciding to show progress
    
    Conflicts:
    	transport.c
  2. Add push --set-upstream

    Ilari Liusvaara committed with gitster Jan 16, 2010
    Frequent complaint is lack of easy way to set up upstream (tracking)
    references for git pull to work as part of push command. So add switch
    --set-upstream (-u) to do just that.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 29, 2009
  1. check stderr with isatty() instead of stdout when deciding to show pr…

    rctay committed with gitster Dec 25, 2009
    …ogress
    
    Make transport code (viz. transport.c::fetch_refs_via_pack() and
    transport-helper.c::standard_options()) that decides to show progress
    check if stderr is a terminal, instead of stdout. After all, progress
    reports (via the API in progress.[ch]) are sent to stderr.
    
    Update the documentation for git-clone to say "standard error" as well.
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 28, 2009
  1. Support remote archive from all smart transports

    Ilari Liusvaara committed with gitster Dec 9, 2009
    Previously, remote archive required internal (non remote-helper)
    smart transport. Extend the remote archive to also support smart
    transports implemented by remote helpers.
    
    Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 9, 2009
  1. Support taking over transports

    Ilari Liusvaara committed with gitster Dec 9, 2009
    Add support for taking over transports that turn out to be smart.
    
    Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Refactor git transport options parsing

    Ilari Liusvaara committed with gitster Dec 9, 2009
    Refactor the transport options parsing so that protocols that aren't
    directly smart transports (file://, git://, ssh:// & co) can record
    the smart transport options for the case if it turns that transport
    can actually be smart.
    
    Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 7, 2009
  1. Merge branch 'master' into il/vcs-helper

    gitster committed Dec 7, 2009
    * master: (334 commits)
      bash: update 'git commit' completion
      Git 1.6.5.5
      Fix diff -B/--dirstat miscounting of newly added contents
      reset: improve worktree safety valves
      Documentation: Avoid use of xmlto --stringparam
      archive: clarify description of path parameter
      rerere: don't segfault on failure to open rr-cache
      Prepare for 1.6.5.5
      gitweb: Describe (possible) gitweb.js minification in gitweb/README
      Documentation: xmlto 0.0.18 does not know --stringparam
      Fix crasher on encountering SHA1-like non-note in notes tree
      t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
      t4201: use ISO8859-1 rather than ISO-8859-1
      Git 1.6.5.4
      Unconditionally set man.base.url.for.relative.links
      Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make
      Git 1.6.6-rc1
      git-pull.sh: Fix call to git-merge for new command format
      Prepare for 1.6.5.4
      merge: do not add standard message when message is given with -m option
      ...
    
    Conflicts:
    	Documentation/git-remote-helpers.txt
    	Makefile
    	builtin-ls-remote.c
    	builtin-push.c
    	transport-helper.c
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 18, 2009
  1. Allow fetch to modify refs

    Daniel Barkalow committed with gitster Nov 18, 2009
    This allows the transport to use the null sha1 for a ref reported to
    be present in the remote repository to indicate that a ref exists but
    its actual value is presently unknown and will be set if the objects
    are fetched.
    
    Also adds documentation to the API to specify exactly what the methods
    should do and how they should interpret arguments.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 31, 2009
  1. fetch: Allow transport -v -v -v to set verbosity to 3

    spearce committed with gitster Oct 31, 2009
    Helpers might want a higher level of verbosity than just +1 (the
    porcelain default setting) and +2 (-v -v).  Expand the field to
    allow verbosity in the range -1..3.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    CC: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 13, 2009
  1. Merge branch 'db/vcs-helper'

    gitster committed Sep 13, 2009
    * db/vcs-helper:
      Makefile: remove remnant of separate http/https/ftp helpers
      Use a clearer style to issue commands to remote helpers
      Make the "traditionally-supported" URLs a special case
      Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
      Makefile: do not link three copies of git-remote-* programs
      Makefile: git-http-fetch does not need expat
      http-fetch: Fix Makefile dependancies
      Add transport native helper executables to .gitignore
      git-http-fetch: not a builtin
      Use an external program to implement fetching with curl
      Add support for external programs for handling native fetches
Commits on Sep 4, 2009
  1. Make the "traditionally-supported" URLs a special case

    Daniel Barkalow committed with gitster Sep 4, 2009
    Instead of trying to make http://, https://, and ftp:// URLs
    indicative of some sort of pattern of transport helper usage, make
    them a special case which runs the "curl" helper, and leave the
    mechanism by which arbitrary helpers will be chosen entirely to future
    work.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 12, 2009
  1. Merge branch 'maint'

    gitster committed Aug 12, 2009
    * maint:
      push: point to 'git pull' and 'git push --force' in case of non-fast forward
      Documentation: add: <filepattern>... is optional
      Change mentions of "git programs" to "git commands"
      Documentation: merge: one <remote> is required
      help.c: give correct structure's size to memset()
  2. push: point to 'git pull' and 'git push --force' in case of non-fast …

    moy committed with gitster Aug 8, 2009
    …forward
    
    'git push' failing because of non-fast forward is a very common situation,
    and a beginner does not necessarily understand "fast forward" immediately.
    
    Add a new section to the git-push documentation and refer them to it.
    
    Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 6, 2009
  1. push: add --quiet flag

    peff committed with gitster Aug 5, 2009
    Some transports produce output even without "--verbose"
    turned on. This provides a way to tell them to be more
    quiet (whereas simply redirecting might lose error
    messages).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 5, 2009
  1. Add support for external programs for handling native fetches

    Daniel Barkalow committed with gitster Aug 5, 2009
    transport_get() can call transport_native_helper_init() to have list and
    fetch-ref operations handled by running a separate program as:
    
     git remote-<something> <remote> [<url>]
    
    This program then accepts, on its stdin, "list" and "fetch <hex>
    <name>" commands; the former prints out a list of available refs and
    either their hashes or what they are symrefs to, while the latter
    fetches them into the local object database and prints a newline when done.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 28, 2009
  1. add --porcelain option to git-push

    smoofra committed with gitster Jun 23, 2009
    If --porcelain is used git-push will produce machine-readable output.  The
    output status line for each ref will be tab-separated and sent to stdout instead
    of stderr.  The full symbolic names of the refs will be given.  For example
    
    $ git push --dry-run --porcelain master :foobar 2>/dev/null \
      | perl -pe 's/\t/ TAB /g'
    
    = TAB refs/heads/master:refs/heads/master TAB [up to date]
    - TAB :refs/heads/foobar TAB [deleted]
    
    Signed-off-by: Larry D'Anna <larry@elder-gods.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 21, 2009
  1. fetch: Strip usernames from url's before storing them

    ageric committed with gitster Apr 17, 2009
    When pulling from a remote, the full URL including username
    is by default added to the commit message. Since it adds
    very little value but could be used by malicious people to
    glean valid usernames (with matching hostnames), we're far
    better off just stripping the username before storing the
    remote URL locally.
    
    Note that this patch has no lasting visible effect when
    "git pull" does not create a merge commit. It simply
    alters what gets written to .git/FETCH_HEAD, which is used
    by "git merge" to automagically create its messages.
    
    Signed-off-by: Andreas Ericsson <ae@op5.se>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 9, 2009
  1. Move push matching and reporting logic into transport.c

    Daniel Barkalow committed with gitster Mar 9, 2009
    For native-protocol pushes (and other protocols as they are converted
    to the new method), this moves the refspec match, tracking update, and
    report message out of send-pack() and into transport_push(), where it
    can be shared completely with other protocols. This also makes fetch
    and push more similar in terms of what code is in what file.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 9, 2008
  1. Implement git clone -v

    Miklos Vajna committed with spearce Oct 8, 2008
    The new -v option forces the progressbar, even in case the output
    is not a terminal.  This can be useful if the caller is an IDE or
    wrapper which wants to scrape the progressbar from stderr and show
    its information in a different format.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Commits on May 5, 2008
  1. Mark the list of refs to fetch as const

    Daniel Barkalow committed with gitster Apr 17, 2008
    Fetching the objects doesn't actually modify the list in any of the
    code paths, so this will allow code that fetches the entire (const)
    list of available refs to just pass the list in directly.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 5, 2008
  1. Teach git-fetch to exploit server side automatic tag following

    spearce committed with gitster Mar 4, 2008
    If the remote peer upload-pack process supports the include-tag
    protocol extension then we can avoid running a second fetch cycle
    on the client side by letting the server send us the annotated tags
    along with the objects it is packing for us.  In the following graph
    we can now fetch both "tag1" and "tag2" on the same connection that
    we fetched "master" from the remote when we only have L available
    on the local side:
    
             T - tag1          S - tag2
            /                 /
       L - o ------ o ------ B
        \                     \
         \                     \
          origin/master         master
    
    The objects for "tag1" are implicitly downloaded without our direct
    knowledge.  The existing "quickfetch" optimization within git-fetch
    discovers that tag1 is complete after the first connection and does
    not open a second connection.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 14, 2007
  1. Merge branch 'aw/mirror-push' into jk/send-pack

    gitster committed Nov 14, 2007
    * aw/mirror-push:
      git-push: add documentation for the newly added --mirror mode
      Add tests for git push'es mirror mode
      git-push: plumb in --mirror mode
      Teach send-pack a mirror mode
      send-pack: segfault fix on forced push
      send-pack: require --verbose to show update of tracking refs
      receive-pack: don't mention successful updates
      more terse push output
    
    Conflicts:
    
    	transport.c
    	transport.h
  2. Merge branch 'db/remote-builtin' into jk/send-pack

    gitster committed Nov 14, 2007
    * db/remote-builtin:
      Reteach builtin-ls-remote to understand remotes
      Build in ls-remote
      Use built-in send-pack.
      Build-in send-pack, with an API for other programs to call.
      Build-in peek-remote, using transport infrastructure.
      Miscellaneous const changes and utilities
    
    Conflicts:
    
    	transport.c
Commits on Nov 11, 2007
  1. push: teach push to pass --verbose option to transport layer

    sprohaska committed with gitster Nov 11, 2007
    A --verbose option to push should also be passed to the
    transport layer, i.e. git-send-pack, git-http-push.
    
    git push is modified to do so.
    
    Signed-off-by: Steffen Prohaska <prohaska@zib.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 10, 2007
  1. git-push: plumb in --mirror mode

    awhitcroft committed with gitster Nov 9, 2007
    Plumb in the --mirror mode for git-push.
    
    Signed-off-by: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 3, 2007
  1. Miscellaneous const changes and utilities

    Daniel Barkalow committed with gitster Oct 30, 2007
    The list of remote refs in struct transport should be const, because
    builtin-fetch will get confused if it changes.
    
    The url in git_connect should be const (and work on a copy) instead of
    requiring the caller to copy it.
    
    match_refs doesn't modify the refspecs it gets.
    
    get_fetch_map and get_remote_ref don't change the list they get.
    
    Allow transport get_refs_list methods to modify the struct transport.
    
    Add a function to copy a list of refs, when a function needs a mutable
    copy of a const list.
    
    Add a function to check the type of a ref, as per the code in connect.c
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 16, 2007
  1. Merge branch 'master' into db/fetch-pack

    spearce committed Oct 16, 2007
    There's a number of tricky conflicts between master and
    this topic right now due to the rewrite of builtin-push.
    Junio must have handled these via rerere; I'd rather not
    deal with them again so I'm pre-merging master into the
    topic.  Besides this topic somehow started to depend on
    the strbuf series that was in next, but is now in master.
    It no longer compiles on its own without the strbuf API.
    
    * master: (184 commits)
      Whip post 1.5.3.4 maintenance series into shape.
      Minor usage update in setgitperms.perl
      manual: use 'URL' instead of 'url'.
      manual: add some markup.
      manual: Fix example finding commits referencing given content.
      Fix wording in push definition.
      Fix some typos, punctuation, missing words, minor markup.
      manual: Fix or remove em dashes.
      Add a --dry-run option to git-push.
      Add a --dry-run option to git-send-pack.
      Fix in-place editing functions in convert.c
      instaweb: support for Ruby's WEBrick server
      instaweb: allow for use of auto-generated scripts
      Add 'git-p4 commit' as an alias for 'git-p4 submit'
      hg-to-git speedup through selectable repack intervals
      git-svn: respect Subversion's [auth] section configuration values
      gtksourceview2 support for gitview
      fix contrib/hooks/post-receive-email hooks.recipients error message
      Support cvs via git-shell
      rebase -i: use diff plumbing instead of porcelain
      ...
    
    Conflicts:
    
    	Makefile
    	builtin-push.c
    	rsh.c
Commits on Oct 3, 2007
  1. Restore default verbosity for http fetches.

    Daniel Barkalow committed with gitster Oct 3, 2007
    This adds a verbosity level below 0 for suppressing default messages
    with --quiet, and makes the default for http be verbose instead of
    quiet. This matches the behavior of the shell script version of git-fetch.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 19, 2007
  1. Ensure builtin-fetch honors {fetch,transfer}.unpackLimit

    spearce committed with gitster Sep 19, 2007
    The only way to configure the unpacking limit is currently through
    the .git/config (or ~/.gitconfig) mechanism as we have no existing
    command line option interface to control this threshold on a per
    invocation basis.  This was intentional by design as the storage
    policy of the repository should be a repository-wide decision and
    should not be subject to variations made on individual command
    executions.
    
    Earlier builtin-fetch was bypassing the unpacking limit chosen by
    the user through the configuration file as it did not reread the
    configuration options through fetch_pack_config if we called the
    internal fetch_pack() API directly.  We now ensure we always run the
    config file through fetch_pack_config at least once in this process,
    thereby setting our unpackLimit properly.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. Refactor struct transport_ops inlined into struct transport

    spearce committed with gitster Sep 19, 2007
    Aside from reducing the code by 20 lines this refactoring removes
    a level of indirection when trying to access the operations of a
    given transport "instance", making the code clearer and easier to
    follow.
    
    It also has the nice effect of giving us the benefits of C99 style
    struct initialization (namely ".fetch = X") without requiring that
    level of language support from our compiler.  We don't need to worry
    about new operation methods being added as they will now be NULL'd
    out automatically by the xcalloc() we use to create the new struct
    transport we supply to the caller.
    
    This pattern already exists in struct walker, so we already have
    a precedent for it in Git.  We also don't really need to worry
    about any sort of performance decreases that may occur as a result
    of filling out 4-8 op pointers when we make a "struct transport".
    The extra few CPU cycles this requires over filling in the "struct
    transport_ops" is killed by the time it will take Git to actually
    *use* one of those functions, as most transport operations are
    going over the wire or will be copying object data locally between
    two directories.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. Remove unnecessary 'fetch' argument from transport_get API

    spearce committed with gitster Sep 15, 2007
    We don't actually need to know at the time of transport_get if the
    caller wants to fetch, push, or do both on the returned object.
    It is easier to just delay the initialization of the HTTP walker
    until we know we will need it by providing a CURL specific fetch
    function in the curl_transport that makes sure the walker instance
    is initialized before use.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. Remove pack.keep after ref updates in git-fetch

    spearce committed with gitster Sep 14, 2007
    If we are using a native packfile to perform a git-fetch invocation
    and the received packfile contained more than the configured limits
    of fetch.unpackLimit/transfer.unpackLimit then index-pack will output
    a single line saying "keep\t$sha1\n" to stdout.  This line needs to
    be captured and retained so we can delete the corresponding .keep
    file ("$GIT_DIR/objects/pack/pack-$sha1.keep") once all refs have
    been safely updated.
    
    This trick has long been in use with git-fetch.sh and its lower level
    helper git-fetch--tool as a way to allow index-pack to save the new
    packfile before the refs have been updated and yet avoid a race with
    any concurrently running git-repack process.  It was unfortunately
    lost when git-fetch.sh was converted to pure C and fetch--tool was
    no longer being invoked.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  5. Simplify fetch transport API to just one function

    spearce committed with gitster Sep 14, 2007
    Commit walkers need to know the SHA-1 name of any objects they
    have been asked to fetch while the native pack transport only
    wants to know the names of the remote refs as the remote side
    must do the name->SHA-1 translation.
    
    Since we only have three fetch implementations and one of them
    (bundle) doesn't even need the name information we can reduce
    the code required to perform a fetch by having just one function
    and passing of the filtered list of refs to be fetched.  Each
    transport can then obtain the information it needs from that ref
    array to construct its own internal operation state.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    
    Conflicts:
    
    	transport.c
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  6. Add fetch methods to transport library.

    Daniel Barkalow committed with gitster Sep 11, 2007
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>