Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 14, 2012
  1. @pclouds

    fetch: align per-ref summary report in UTF-8 locales

    pclouds authored committed
    fetch does printf("%-*s", width, "foo") where "foo" can be a utf-8
    string, but width is in bytes, not columns. For ASCII it's fine as one
    byte takes one column. For utf-8, this may result in misaligned ref
    summary table.
    
    Introduce gettext_width() function that returns the string length in
    columns (currently only supports utf-8 locales). Make the code use
    TRANSPORT_SUMMARY(x) where the length is compensated properly in
    non-English locales.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 24, 2012
  1. Merge branch 'hv/submodule-recurse-push'

    authored
    "git push --recurse-submodules" learns to optionally look into the
    histories of submodules bound to the superproject and push them out.
    
    By Heiko Voigt
    * hv/submodule-recurse-push:
      push: teach --recurse-submodules the on-demand option
      Refactor submodule push check to use string list instead of integer
      Teach revision walking machinery to walk multiple times sequencially
Commits on Mar 30, 2012
  1. push: teach --recurse-submodules the on-demand option

    Heiko Voigt authored committed
    When using this option git will search for all submodules that
    have changed in the revisions to be send. It will then try to
    push the currently checked out branch of each submodule.
    
    This helps when a user has finished working on a change which
    involves submodules and just wants to push everything in one go.
    
    Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
    Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
    Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 26, 2012
  1. @peff

    clean up struct ref's nonfastforward field

    peff authored committed
    Each ref structure contains a "nonfastforward" field which
    is set during push to show whether the ref rewound history.
    Originally this was a single bit, but it was changed in
    f25950f (push: Provide situational hints for non-fast-forward
    errors) to an enum differentiating a non-ff of the current
    branch versus another branch.
    
    However, we never actually set the member according to the
    enum values, nor did we ever read it expecting anything but
    a boolean value. But we did use the side effect of declaring
    the enum constants to store those values in a totally
    different integer variable. The code as-is isn't buggy, but
    the enum declaration inside "struct ref" is somewhat
    misleading.
    
    Let's convert nonfastforward back into a single bit, and
    then define the NON_FF_* constants closer to where they
    would be used (they are returned via the "int *nonfastforward"
    parameter to transport_push, so we can define them there).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 23, 2012
  1. @felipec

    push: add '--prune' option

    felipec authored committed
    When pushing groups of refs to a remote, there is no simple way to remove
    old refs that still exist at the remote that is no longer updated from us.
    This will allow us to remove such refs from the remote.
    
    With this change, running this command
    
     $ git push --prune remote refs/heads/*:refs/remotes/laptop/*
    
    removes refs/remotes/laptop/foo from the remote if we do not have branch
    "foo" locally anymore.
    
    Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 21, 2011
  1. @iveqy

    push: Don't push a repository with unpushed submodules

    iveqy authored committed
    When working with submodules it is easy to forget to push a
    submodule to the server but pushing a super-project that
    contains a commit for that submodule. The result is that the
    superproject points at a submodule commit that is not available
    on the server.
    
    This adds the option --recurse-submodules=check to push. When
    using this option git will check that all submodule commits that
    are about to be pushed are present on a remote of the submodule.
    
    To be able to use a combined diff, disabling a diff callback has
    been removed from combined-diff.c.
    
    Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
    Mentored-by: Jens Lehmann <Jens.Lehmann@web.de>
    Mentored-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 20, 2011
  1. @peff

    refactor refs_from_alternate_cb to allow passing extra data

    peff authored committed
    The foreach_alt_odb function triggers a callback for each
    alternate object db we have, with room for a single void
    pointer as data. Currently, we always call refs_from_alternate_cb
    as the callback function, and then pass another callback (to
    receive each ref individually) as the void pointer.
    
    This has two problems:
    
      1. C technically forbids stuffing a function pointer into
         a "void *". In practice, this probably doesn't matter
         on any architectures git runs on, but it never hurts to
         follow the letter of the law.
    
      2. There is no room for an extra data pointer. Indeed, the
         alternate_ref_fn that refs_from_alternate_cb calls
         takes a void* for data, but we always pass it NULL.
    
    Instead, let's properly stuff our function pointer into a
    data struct, which also leaves room for an extra
    caller-supplied data pointer. And to keep things simple for
    existing callers, let's make a for_each_alternate_ref
    function that takes care of creating the extra struct.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 17, 2011
  1. refs_from_alternate: helper to use refs from alternates

    authored
    The receiving end of "git push" advertises the objects that the repository
    itself does not use, but are at the tips of refs in other repositories
    whose object databases are used as alternates for it. This helps it avoid
    having to receive (and the pusher having to send) objects that are already
    available to the receiving repository via the alternates mechanism.
    
    Tweak the helper function that implements this feature, and move it to
    transport.[ch] for future reuse by other programs.
    
    The additional test demonstrates how this optimization is helping "git push",
    and "git fetch" is ignorant about it.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Acked-by: Shawn O. Pearce <spearce@spearce.org>
Commits on Oct 13, 2010
  1. Add bidirectional_transfer_loop()

    Ilari Liusvaara authored committed
    This helper function copies bidirectional stream of data between
    stdin/stdout and specified file descriptors.
    
    Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 15, 2010
  1. Merge branch 'tc/transport-verbosity'

    authored
    * tc/transport-verbosity:
      transport: update flags to be in running order
      fetch and pull: learn --progress
      push: learn --progress
      transport->progress: use flag authoritatively
      clone: support multiple levels of verbosity
      push: support multiple levels of verbosity
      fetch: refactor verbosity option handling into transport.[ch]
      Documentation/git-push: put --quiet before --verbose
      Documentation/git-pull: put verbosity options before merge/fetch ones
      Documentation/git-clone: mention progress in -v
    
    Conflicts:
    	transport.h
Commits on Mar 2, 2010
  1. Merge branch 'ml/send-pack-transport-refactor'

    authored
    * ml/send-pack-transport-refactor:
      refactor duplicated code in builtin-send-pack.c and transport.c
Commits on Feb 24, 2010
  1. @rctay

    transport: update flags to be in running order

    rctay authored committed
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @rctay

    transport->progress: use flag authoritatively

    rctay authored committed
    Set transport->progress in transport.c::transport_set_verbosity() after
    checking for the appropriate conditions (eg. --progress, isatty(2)),
    and thereafter use it without having to check again.
    
    The rules used are as follows (processing aborts when a rule is
    satisfied):
    
      1. Report progress, if force_progress is 1 (ie. --progress).
      2. Don't report progress, if verbosity < 0 (ie. -q/--quiet).
      3. Report progress if isatty(2) is 1.
    
    This changes progress reporting behaviour such that if both --progress
    and --quiet are specified, progress is reported.
    
    In two areas, the logic to determine whether to *not* show progress is
    changed to simply use the negation of transport->progress. This changes
    behaviour in some ways (see previous paragraph for details).
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @rctay

    push: support multiple levels of verbosity

    rctay authored committed
    Remove the flags TRANSPORT_PUSH_QUIET and TRANSPORT_PUSH_VERBOSE; use
    transport->verbose instead to determine verbosity for pushing.
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  4. @rctay

    fetch: refactor verbosity option handling into transport.[ch]

    rctay authored committed
    transport_set_verbosity() is now provided to transport users.
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 17, 2010
  1. @michaellukashov

    refactor duplicated code in builtin-send-pack.c and transport.c

    michaellukashov authored committed
    The following functions are (almost) identical:
    
      verify_remote_names
      update_tracking_ref
      refs_pushed
      print_push_status
    
    Move common versions of these functions to transport.c and rename
    them, as suggested by Jeff King and Junio C Hamano.
    
    These functions have been removed entirely from builtin-send-pack.c,
    since they are only used internally by print_push_status():
    
      print_ref_status
      status_abbrev
      print_ok_ref_status
      print_one_push_status
    
    Also, move #define SUMMARY_WIDTH to transport.h and rename it
    TRANSPORT_SUMMARY_WIDTH as it is used in builtin-fetch.c and
    transport.c
    
    Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
    Acked-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 16, 2010
  1. @rctay

    transport: add got_remote_refs flag

    rctay authored committed
    transport_get_remote_refs() in tranport.c checks transport->remote_refs
    to determine whether transport->get_refs_list() should be invoked.  The
    logic is "if it is NULL, we haven't run ls-remote to find out yet".
    
    However, transport->remote_refs could still be NULL while cloning from
    an empty repository.  This causes get_refs_list() to be run unnecessarily.
    
    Introduce a flag, transport->got_remote_refs, to more explicitly record
    if we have run transport->get_refs_list() already.
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 20, 2010
  1. Merge branch 'il/push-set-upstream'

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

    authored
    * 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 authored committed
    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. @rctay

    check stderr with isatty() instead of stdout when deciding to show pr…

    rctay authored committed
    …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 authored committed
    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 authored committed
    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 authored committed
    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

    authored
    * 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 authored committed
    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. @spearce

    fetch: Allow transport -v -v -v to set verbosity to 3

    spearce authored committed
    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'

    authored
    * 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 authored committed
    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'

    authored
    * 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. @moy

    push: point to 'git pull' and 'git push --force' in case of non-fast …

    moy authored committed
    …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. @peff

    push: add --quiet flag

    peff authored committed
    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 authored committed
    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. @smoofra

    add --porcelain option to git-push

    smoofra authored committed
    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. @ageric

    fetch: Strip usernames from url's before storing them

    ageric authored committed
    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>
Something went wrong with that request. Please try again.