Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Oct 8, 2008
  1. @spearce

    Merge branch 'maint'

    spearce authored
    * maint:
      Do not use errno when pread() returns 0
      git init: --bare/--shared overrides system/global config
      git-push.txt: Describe --repo option in more detail
      git rm: refresh index before up-to-date check
      Fix a few typos in relnotes
  2. @spearce

    git-push.txt: Describe --repo option in more detail

    Johannes Sixt authored spearce committed
    The --repo option was described in a way that the reader would have to
    assume that it is the same as the <repository> parameter. But it actually
    servers a purpose, which is now written down.
    
    Furthermore, the --mirror option was missing from the synopsis.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Commits on Aug 17, 2008
  1. @zawir

    Make push more verbose about illegal combination of options

    zawir authored committed
    It may be unclear that --all, --mirror, --tags and/or explicit refspecs
    are illegal combinations for git push.
    
    Git was silently failing in these cases, while we can complaint more
    properly about it.
    
    Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 20, 2008
  1. builtin-push.c: Cleanup - use OPT_BIT() and remove some variables

    Michele Ballabio authored committed
    Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 13, 2008
  1. @sbeyer

    Make usage strings dash-less

    sbeyer authored committed
    When you misuse a git command, you are shown the usage string.
    But this is currently shown in the dashed form.  So if you just
    copy what you see, it will not work, when the dashed form
    is no longer supported.
    
    This patch makes git commands show the dash-less version.
    
    For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
    generates a dash-less usage string now.
    
    Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Apr 21, 2008
  1. @bonzini

    Add a remote.*.mirror configuration option

    bonzini authored committed
    This patch adds a remote.*.mirror configuration option that,
    when set, automatically puts git-push in --mirror mode for that
    remote.
    
    Furthermore, the option is set automatically by `git remote
    add --mirror'.
    
    The code in remote.c to parse remote.*.skipdefaultupdate
    had a subtle problem: a comment in the code indicated that
    special care was needed for boolean options, but this care was
    not used in parsing the option.  Since I was touching related
    code, I did this fix too.
    
    [jc: and I further fixed up the "ignore boolean" code.]
    
    Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 20, 2008
  1. Resolve value supplied for no-colon push refspecs

    Daniel Barkalow authored committed
    When pushing a refspec like "HEAD", we used to treat it as
    "HEAD:HEAD", which didn't work without rewriting. Instead, we should
    resolve the ref. If it's a symref, further require it to point to a
    branch, to avoid doing anything especially unexpected. Also remove the
    rewriting previously added in builtin-push.
    
    Since the code for "HEAD" uses the regular refspec parsing, it
    automatically handles "+HEAD" without anything special.
    
    [jc: added a further test to make sure that "remote.*.push = HEAD" works]
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff

    push: indicate partialness of error message

    peff authored committed
    The existing message indicates that an error occured during
    push, but it is unclear whether _any_ refs were actually
    pushed (even though the status table above shows which were
    pushed successfully and which were not, the message "failed
    to push" implies a total failure). By indicating that "some
    refs" failed, we hopefully indicate to the user that the
    table above contains the details.
    
    We could also put in an explicit "see above for details"
    message, but it seemed to clutter the output quite a bit
    (both on a line of its own, or at the end of the error line,
    which inevitably wraps).
    
    This could also be made more fancy if the transport
    mechanism passed back more details on how many refs
    succeeded and failed:
    
      error: failed to push %d out of %d refs to '%s'
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 5, 2007
  1. Merge branch 'sp/refspec-match'

    authored
    * sp/refspec-match:
      refactor fetch's ref matching to use refname_match()
      push: use same rules as git-rev-parse to resolve refspecs
      add refname_match()
      push: support pushing HEAD to real branch name
Commits on Nov 19, 2007
  1. @sprohaska

    push: support pushing HEAD to real branch name

    sprohaska authored committed
    This teaches "push <remote> HEAD" to resolve HEAD on the local
    side to its real branch name, e.g. master, and then act as if
    the real branch name was specified. So we have a shorthand for
    pushing the current branch. Besides HEAD, no other symbolic ref
    is resolved.
    
    Thanks to Daniel Barkalow <barkalow@iabervon.org> for suggesting
    this implementation, which is much simpler than the
    implementation proposed before.
    
    Signed-off-by: Steffen Prohaska <prohaska@zib.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 14, 2007
  1. Merge branch 'aw/mirror-push' into jk/send-pack

    authored
    * 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
Commits on Nov 11, 2007
  1. @sprohaska

    push: teach push to pass --verbose option to transport layer

    sprohaska authored committed
    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. @awhitcroft

    git-push: plumb in --mirror mode

    awhitcroft authored committed
    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 5, 2007
  1. Use parseopts in builtin-push

    Daniel Barkalow authored committed
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 16, 2007
  1. @spearce

    Fix 'push --all branch...' error handling

    spearce authored
    The builtin-fetch topic changed push's handling of --all to setting
    the new TRANSPORT_PUSH_ALL flag before starting the push subroutine
    for the given transport.  Unfortunately not all references within
    builtin-push were changed to test this flag therefore allowing push
    to incorrectly accept refspecs and --all.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  2. @spearce

    Merge branch 'master' into db/fetch-pack

    spearce authored
    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
  3. @bazzargh @spearce

    Add a --dry-run option to git-push.

    bazzargh authored spearce committed
    The default behaviour of git-push is potentially confusing
    for new users, since it will push changes that are not on
    the current branch. Publishing patches that were still
    cooking on a development branch is hard to undo.
    
    It would also be nice to be able to verify the expansion
    of refspecs if you've edited them, so that you know
    what branches matched on the server.
    
    Adding a --dry-run flag allows the user to experiment
    safely and learn how to use git-push properly. Originally
    suggested by Steffen Prohaska.
    
    Signed-off-by: Brian Ewins <brian.ewins@gmail.com>
    Signed-off-by: Lars Hjemli <hjemli@gmail.com>
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Commits on Sep 19, 2007
  1. @spearce

    Rename remote.uri to remote.url within remote handling internals

    spearce authored committed
    Anyplace we talk about the address of a remote repository we always
    refer to it as a URL, especially in the configuration file and
    .git/remotes where we call it "remote.$n.url" or start the first
    line with "URL:".  Calling this value a uri within the internal C
    code just doesn't jive well with our commonly accepted terms.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @spearce

    Remove unnecessary 'fetch' argument from transport_get API

    spearce authored committed
    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>
  3. Push code for transport library

    Daniel Barkalow authored committed
    This moves the code to call push backends into a library that can be
    extended to make matching fetch and push decisions based on the URL it
    gets, and which could be changed to have built-in implementations
    instead of calling external programs.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 10, 2007
  1. @spearce

    Make --no-thin the default in git-push to save server resources

    spearce authored committed
    1) pushes happen less often than fetches, so the bandwidth saving is
       much less visible in that case overall.
    
    2) thin packs have to be complemented with missing delta bases to be
       valid, so many received thin packs will take more disk space.
    
    3) the bother of repacking should be distributed amongst "clients"
       i.e. fetchers and pushers as much as possible, and not the server
       being fetched or pushed, to keep disk and CPU usage low on the
       server.
    
    This is why a fetch should get thin packs but a push should not.
    
    Both Nico and I have been assuming that --no-thin was the default
    behavior of git-push ever since Nico introduced --fix-thin into the
    index-pack process, which allowed fetch and receive-pack to avoid
    exploding packfiles received during transfer.  This patch finally
    makes it so.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 26, 2007
  1. Move refspec pattern matching to match_refs().

    Daniel Barkalow authored Junio C Hamano committed
    This means that send-pack and http-push will support pattern refspecs,
    so builtin-push.c doesn't have to expand them, and also git push can
    just turn --tags into "refs/tags/*", further simplifying
    builtin-push.c
    
    check_ref_format() gets a third "conditionally okay" result for
    something that's valid as a pattern but not as a particular ref.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on May 21, 2007
  1. Update local tracking refs when pushing

    Daniel Barkalow authored Junio C Hamano committed
    This also adds a --remote option to send-pack, which specifies the
    configured remote being used. It is provided automatically by
    git-push, and must match the url (which is still needed, since there
    could be multiple urls).
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. Move remote parsing into a library file out of builtin-push.

    Daniel Barkalow authored Junio C Hamano committed
    The new parser is different from the one in builtin-push in two ways:
    the default is to use the current branch's remote, if there is one,
    before "origin"; and config is used in preference to remotes.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Apr 7, 2007
  1. git-push to multiple locations does not stop at the first failure

    Junio C Hamano authored
    When pushing into multiple repositories with git push, via
    multiple URL in .git/remotes/$shorthand or multiple url
    variables in [remote "$shorthand"] section, we used to stop upon
    the first failure.  Continue the operation and report the
    failure at the end.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. git-push reports the URL after failing.

    Junio C Hamano authored
    This came up on #git when somebody was getting 'unable to create
    ./objects/tmp_oXXXX' but sweared he had write permission to that
    directory.  It turned out that the repository URL was changed
    and he was accessing a repository he does not have a write
    permission anymore.
    
    I am not sure how much this would have helped somebody who
    believed he was accessing location when the permission of that
    location was changed while he was looking the other way, though.
    But giving more information on the error path would be better,
    and the next change would be helped with this as well.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 13, 2007
  1. @spearce

    Use RUN_GIT_CMD to run push backends

    spearce authored Junio C Hamano committed
    If we hand run_command RUN_GIT_CMD rather than 0 it will use
    the execv_git_cmd path rather than execvp at the OS level.
    This is typically the preferred way of running another Git
    utility.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Mar 12, 2007
  1. @spearce

    Remove unused run_command variants

    spearce authored Junio C Hamano committed
    We don't actually use these va_list based variants of run_command
    anymore.  I'm removing them before I make further improvements.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 21, 2007
  1. prefixcmp(): fix-up mechanical conversion.

    Junio C Hamano authored
    Previous step converted use of strncmp() with literal string
    mechanically even when the result is only used as a boolean:
    
        if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo")))
    
    This step manually cleans them up to read:
    
        if (!prefixcmp(arg, "foo"))
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. Mechanical conversion to use prefixcmp()

    Junio C Hamano authored
    This mechanically converts strncmp() to use prefixcmp(), but only when
    the parameters match specific patterns, so that they can be verified
    easily.  Leftover from this will be fixed in a separate step, including
    idiotic conversions like
    
        if (!strncmp("foo", arg, 3))
    
      =>
    
        if (!(-prefixcmp(arg, "foo")))
    
    This was done by using this script in px.perl
    
       #!/usr/bin/perl -i.bak -p
       if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) {
               s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|;
       }
       if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) {
               s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|;
       }
    
    and running:
    
       $ git grep -l strncmp -- '*.c' | xargs perl px.perl
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Feb 6, 2007
  1. git-push: allow globbing wildcard refspec.

    Junio C Hamano authored
    This allows you to set up mothership-satellite configuration
    more symmetrically and naturally by allowing the globbing
    wildcard refspec for git-push.  On your satellite machine:
    
        [remote "mothership"]
            url = mothership:project.git
            fetch = refs/heads/*:refs/remotes/mothership/*
            push = refs/heads/*:refs/remotes/satellite/*
    
    You would say "git fetch mothership" to update your tracking
    branches under mothership/ to keep track of the progress on the
    mothership side, and when you are done working on the satellite
    machine, you would "git push mothership" to update their
    tracking branches under satellite/.  Corresponding configuration
    on the mothership machine can be used to make "git fetch satellite"
    update its tracking branch under satellite/. on the mothership.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Jan 20, 2007
  1. rename --exec to --receive-pack for push and send-pack

    Uwe Kleine-König authored Junio C Hamano committed
    For now it's just to get a more descriptive name.  Later we might update the
    push protocol to run more than one program on the other end.  Moreover this
    matches better the corresponding config option remote.<name>. receivepack.
    
    --exec continues to work
    
    Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  2. make --exec=... option to git-push configurable

    Uwe Kleine-König authored Junio C Hamano committed
    Having to specify git push --exec=... is annoying if you cannot have
    git-receivepack in your PATH on the remote side (or don't want to).
    
    This introduces the config item remote.<name>.receivepack to override
    the default value (which is "git-receive-pack").
    
    Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
  3. Update documentation of fetch-pack, push and send-pack

    Uwe Kleine-König authored Junio C Hamano committed
    add all supported options to Documentation/git-....txt and the usage strings.
    
    Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Commits on Dec 31, 2006
  1. @spearce

    Remove unnecessary argc parameter from run_command_v.

    spearce authored Junio C Hamano committed
    The argc parameter is never used by the run_command_v family of
    functions.  Instead they require that the passed argv[] be NULL
    terminated so they can rely on the operating system's execvp
    function to correctly pass the arguments to the new process.
    
    Making the caller pass the argc is just confusing, as the caller
    could be mislead into believing that the argc might take precendece
    over the argv, or that the argv does not need to be NULL terminated.
    So goodbye argc.  Don't come back.
    
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.