Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jan 10, 2010
  1. @rctay @gitster

    refactor ref status logic for pushing

    rctay authored gitster committed
    Move the logic that detects up-to-date and non-fast-forward refs to a
    new function in remote.[ch], set_ref_status_for_push().
    
    Make transport_push() invoke set_ref_status_for_push() before invoking
    the push_refs() implementation. (As a side-effect, the push_refs()
    implementation in transport-helper.c now knows of non-fast-forward
    pushes.)
    
    Removed logic for detecting up-to-date refs from the push_refs()
    implementation in transport-helper.c, as transport_push() has already
    done so for it.
    
    Make cmd_send_pack() invoke set_ref_status_for_push() before invoking
    send_pack(), as transport_push() can't do it for send_pack() here.
    
    Mark the test on the return status of non-fast-forward push to fail.
    Git now exits with success, as transport.c::transport_push() does not
    check for refs with status REF_STATUS_REJECT_NONFASTFORWARD nor does it
    indicate rejected pushes with its return value.
    
    Mark the test for ref status to succeed. As mentioned earlier, refs
    might be marked as non-fast-forwards, triggering the push status
    printing mechanism in transport.c.
    
    Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 24, 2009
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      pack-objects: split implications of --all-progress from progress activation
      instaweb: restart server if already running
      prune-packed: only show progress when stderr is a tty
    
    Conflicts:
    	builtin-pack-objects.c
  2. @npitre @gitster

    pack-objects: split implications of --all-progress from progress acti…

    npitre authored gitster committed
    …vation
    
    Currently the --all-progress flag is used to use force progress display
    during the writing object phase even if output goes to stdout which is
    primarily the case during a push operation.  This has the unfortunate
    side effect of forcing progress display even if stderr is not a
    terminal.
    
    Let's introduce the --all-progress-implied argument which has the same
    intent except for actually forcing the activation of any progress
    display.  With this, progress display will be automatically inhibited
    whenever stderr is not a terminal, or full progress display will be
    included otherwise.  This should let people use 'git push' within a cron
    job without filling their logs with useless percentage displays.
    
    Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
    Tested-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 21, 2009
  1. @gitster

    Merge branch 'sp/smart-http'

    gitster authored
    * sp/smart-http: (37 commits)
      http-backend: Let gcc check the format of more printf-type functions.
      http-backend: Fix access beyond end of string.
      http-backend: Fix bad treatment of uintmax_t in Content-Length
      t5551-http-fetch: Work around broken Accept header in libcurl
      t5551-http-fetch: Work around some libcurl versions
      http-backend: Protect GIT_PROJECT_ROOT from /../ requests
      Git-aware CGI to provide dumb HTTP transport
      http-backend: Test configuration options
      http-backend: Use http.getanyfile to disable dumb HTTP serving
      test smart http fetch and push
      http tests: use /dumb/ URL prefix
      set httpd port before sourcing lib-httpd
      t5540-http-push: remove redundant fetches
      Smart HTTP fetch: gzip requests
      Smart fetch over HTTP: client side
      Smart push over HTTP: client side
      Discover refs via smart HTTP server when available
      http-backend: more explict LocationMatch
      http-backend: add example for gitweb on same URL
      http-backend: use mod_alias instead of mod_rewrite
      ...
    
    Conflicts:
    	.gitignore
    	remote-curl.c
Commits on Nov 5, 2009
  1. @spearce @gitster

    Smart push over HTTP: client side

    spearce authored gitster committed
    The git-remote-curl backend detects if the remote server supports
    the git-receive-pack service, and if so, runs git-send-pack in a
    pipe to dump the command and pack data as a single POST request.
    
    The advertisements from the server that were obtained during the
    discovery are passed into git-send-pack before the POST request
    starts.  This permits git-send-pack to operate largely unmodified.
    
    For smaller packs (those under 1 MiB) a HTTP/1.0 POST with a
    Content-Length is used, permitting interaction with any server.
    The 1 MiB limit is arbitrary, but is sufficent to fit most deltas
    created by human authors against text sources with the occasional
    small binary file (e.g. few KiB icon image).  The configuration
    option http.postBuffer can be used to increase (or shink) this
    buffer if the default is not sufficient.
    
    For larger packs which cannot be spooled entirely into the helper's
    memory space (due to http.postBuffer being too small), the POST
    request requires HTTP/1.1 and sets "Transfer-Encoding: chunked".
    This permits the client to upload an unknown amount of data in one
    HTTP transaction without needing to pregenerate the entire pack
    file locally.
    
    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 Oct 25, 2009
  1. @felipec @gitster

    Use 'fast-forward' all over the place

    felipec authored gitster committed
    It's a compound word.
    
    Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 6, 2009
  1. @peff @gitster

    transport: pass "quiet" flag to pack-objects

    peff authored gitster committed
    When pushing over the git protocol, pack-objects gives
    progress reports about the pack being sent. If "push" is
    given the --quiet flag, it now passes "-q" to pack-objects,
    suppressing this output.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 6, 2009
  1. @gitster

    Merge branch 'tr/die_errno'

    gitster authored
    * tr/die_errno:
      Use die_errno() instead of die() when checking syscalls
      Convert existing die(..., strerror(errno)) to die_errno()
      die_errno(): double % in strerror() output just in case
      Introduce die_errno() that appends strerror(errno) to die()
Commits on Jun 27, 2009
  1. @trast @gitster

    Convert existing die(..., strerror(errno)) to die_errno()

    trast authored gitster committed
    Change calls to die(..., strerror(errno)) to use the new die_errno().
    
    In the process, also make slight style adjustments: at least state
    _something_ about the function that failed (instead of just printing
    the pathname), and put paths in single quotes.
    
    Signed-off-by: Thomas Rast <trast@student.ethz.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 13, 2009
  1. @gitster

    Merge branch 'cb/match_refs_internal_tail'

    gitster authored
    * cb/match_refs_internal_tail:
      match_refs: search ref list tail internally
Commits on Jun 2, 2009
  1. @drizzd @gitster

    match_refs: search ref list tail internally

    drizzd authored gitster committed
    Avoid code duplication by moving list tail search to match_refs().
    
    This does not change the semantics, except for http-push, which now inserts
    to the front of the ref list in order to get rid of the global remote_tail.
    
    Signed-off-by: Clemens Buchacher <drizzd@aon.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 23, 2009
  1. @gitster

    Merge branch 'fc/decorate-tag'

    gitster authored
    * fc/decorate-tag:
      Prettify log decorations even more
      Change prettify_ref to prettify_refname
Commits on May 14, 2009
  1. @felipec @gitster

    Change prettify_ref to prettify_refname

    felipec authored gitster committed
    In preparation to be used when the ref object is not available
    
    Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
    Acked-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 2, 2009
  1. @gitster

    allow OFS_DELTA objects during a push

    Nicolas Pitre authored gitster committed
    The fetching of OFS_DELTA objects has been negotiated between both peers
    since git version 1.4.4.  However, this was missing from the push side
    where every OFS_DELTA objects were always converted to REF_DELTA objects
    causing an increase in transferred data.
    
    To fix this, both the client and the server processes have to be
    modified: the former to invoke pack-objects with --delta-base-offset
    when the server provides the ofs-delta capability, and the later to send
    that capability when OFS_DELTA objects are allowed as already indicated
    by the repack.usedeltabaseoffset config variable which is TRUE by
    default since git v1.6.0.
    
    Signed-off-by: Nicolas Pitre <nico@cam.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 27, 2009
  1. @gitster

    builtin-send-pack.c: avoid empty structure initialization

    Brandon Casey authored gitster committed
    The IRIX6.5 MIPSpro Compiler doesn't like it.
    
    Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 9, 2009
  1. @gitster

    Move push matching and reporting logic into transport.c

    Daniel Barkalow authored gitster committed
    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>
  2. @gitster

    Use a common function to get the pretty name of refs

    Daniel Barkalow authored gitster committed
    The result should be consistent between fetch and push, so we ought to
    use the same code in both cases, even though it's short.
    
    Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 26, 2009
  1. @jaysoffian @gitster

    move duplicated ref_newer() to remote.c

    jaysoffian authored gitster committed
    ref_newer() appears to have been copied from builtin-send-pack.c to
    http-push.c via cut and paste. This patch moves the function and its
    helper unmark_and_free() to remote.c. There was a slight difference
    between the two implementations, one used TMP_MARK for the mark, the
    other used 1. Per Jeff King, I went with TMP_MARK as more correct.
    
    This is in preparation for being able to call it from builtin-remote.c
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @jaysoffian @gitster

    move duplicated get_local_heads() to remote.c

    jaysoffian authored gitster committed
    get_local_heads() appears to have been copied from builtin-send-pack.c
    to http-push.c via cut and paste. This patch moves the function and its
    helper one_local_ref() to remote.c.
    
    The two copies of one_local_ref() were not identical. I used the more
    recent version from builtin-send-pack.c after confirming with Jeff King
    that it was an oversight that commit 30affa1 did not update both
    copies.
    
    This is in preparation for being able to call it from builtin-remote.c
    
    Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 28, 2009
  1. @gitster

    send-pack: do not send unknown object name from ".have" to pack-objects

    gitster authored
    v1.6.1 introduced ".have" extension to the protocol to allow the receiving
    side to advertise objects that are reachable from refs in the repositories
    it borrows from.  This was meant to be used by the sending side to avoid
    sending such objects; they are already available through the alternates
    mechanism.
    
    The client side implementation in v1.6.1, which was introduced with
    40c155f (push: prepare sender to receive extended ref information from the
    receiver, 2008-09-09) aka v1.6.1-rc1~203^2~1, were faulty in that it did
    not consider the possiblity that the repository receiver borrows from
    might have objects it does not know about.
    
    This fixes it by refraining from passing missing commits to underlying
    pack-objects.  Revision machinery may need to be tightened further to
    treat missing uninteresting objects as non-error events, but this is an
    obvious and safe fix for a maintenance release that is almost good enough.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 9, 2008
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      GIT 1.6.0.4
      Update RPM spec for the new location of git-cvsserver.
      push: fix local refs update if already up-to-date
      do not force write of packed refs
    
    Conflicts:
    	builtin-revert.c
  2. @gitster

    Merge branch 'cb/maint-update-ref-fix' into maint

    gitster authored
    * cb/maint-update-ref-fix:
      push: fix local refs update if already up-to-date
      do not force write of packed refs
  3. @gitster

    Merge branch 'mv/maint-branch-m-symref' into maint

    gitster authored
    * mv/maint-branch-m-symref:
      update-ref --no-deref -d: handle the case when the pointed ref is packed
      git branch -m: forbid renaming of a symref
      Fix git update-ref --no-deref -d.
      rename_ref(): handle the case when the reflog of a ref does not exist
      Fix git branch -m for symrefs.
Commits on Nov 5, 2008
  1. @drizzd @gitster

    push: fix local refs update if already up-to-date

    drizzd authored gitster committed
    git push normally updates local refs only after a successful push. If the
    remote already has the updates -- pushed indirectly through another repository,
    for example -- we forget to update local tracking refs.
    
    Signed-off-by: Clemens Buchacher <drizzd@aon.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    Merge branch 'mv/maint-branch-m-symref'

    gitster authored
    * mv/maint-branch-m-symref:
      update-ref --no-deref -d: handle the case when the pointed ref is packed
      git branch -m: forbid renaming of a symref
      Fix git update-ref --no-deref -d.
      rename_ref(): handle the case when the reflog of a ref does not exist
      Fix git branch -m for symrefs.
Commits on Nov 2, 2008
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      Start 1.6.0.4 cycle
      add instructions on how to send patches to the mailing list with Gmail
      Documentation/gitattributes: Add subsection header for each attribute
      git send-email: avoid leaking directory file descriptors.
      send-pack: do not send out single-level refs such as refs/stash
      fix overlapping memcpy in normalize_absolute_path
      pack-objects: avoid reading uninitalized data
      correct cache_entry allocation
    
    Conflicts:
    	RelNotes
  2. @peff @gitster

    send-pack: do not send out single-level refs such as refs/stash

    peff authored gitster committed
    Since no version of receive-pack accepts these "funny refs", we should
    mirror the check when considering the list of refs to send. IOW, don't
    even make them eligible for matching or mirroring.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 26, 2008
  1. @gitster

    Fix git branch -m for symrefs.

    Miklos Vajna authored gitster committed
    This had two problems with symrefs. First, it copied the actual sha1
    instead of the "pointer", second it failed to remove the old ref after a
    successful rename.
    
    Given that till now delete_ref() always dereferenced symrefs, a new
    parameters has been introduced to delete_ref() to allow deleting refs
    without a dereference.
    
    Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 25, 2008
  1. @spearce

    Merge branch 'jc/alternate-push'

    spearce authored
    * jc/alternate-push:
      push: receiver end advertises refs from alternate repositories
      push: prepare sender to receive extended ref information from the receiver
      receive-pack: make it a builtin
      is_directory(): a generic helper function
Commits on Sep 16, 2008
  1. @heikkiorsila @gitster

    Start conforming code to "git subcmd" style part 3

    heikkiorsila authored gitster committed
    User notifications are presented as 'git cmd', and code comments
    are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.
    
    Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 9, 2008
  1. @gitster

    push: prepare sender to receive extended ref information from the rec…

    gitster authored
    …eiver
    
    "git push" enhancement allows the receiving end to report not only its own
    refs but refs in repositories it borrows from via the alternate object
    store mechanism.  By telling the sender that objects reachable from these
    extra refs are already complete in the receiving end, the number of
    objects that need to be transfered can be cut down.
    
    These entries are sent over the wire with string ".have", instead of the
    actual names of the refs.  This string was chosen so that they are ignored
    by older programs at the sending end.  If we sent some random but valid
    looking refnames for these entries, "matching refs" rule (triggered when
    running "git push" without explicit refspecs, where the sender learns what
    refs the receiver has, and updates only the ones with the names of the
    refs the sender also has) and "delete missing" rule (triggered when "git
    push --mirror" is used, where the sender tells the receiver to delete the
    refs it itself does not have) would try to update/delete them, which is
    not what we want.
    
    This prepares the send-pack (and "push" that runs native protocol) to
    accept extended existing ref information and make use of it.  The ".have"
    entries are excluded from ref matching rules, and are exempt from deletion
    rule while pushing with --mirror option, but are still used for pack
    generation purposes by providing more "bottom" range commits.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 13, 2008
  1. @sbeyer @gitster

    Make usage strings dash-less

    sbeyer authored gitster 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 Jul 8, 2008
  1. @peff @gitster

    make deleting a missing ref more quiet

    peff authored gitster committed
    If git attempts to delete a ref, but the unlink of the ref
    file fails, we print a message to stderr. This is usually a
    good thing, but if the error is ENOENT, then it indicates
    that the ref has _already_ been deleted. And since that's
    our goal, it doesn't make sense to complain to the user.
    
    This harmonizes the error reporting behavior for the
    unpacked and packed cases; the packed case already printed
    nothing on ENOENT, but the unpacked printed unconditionally.
    
    Additionally, send-pack would, when deleting the tracking
    ref corresponding to a remote delete, print "Failed to
    delete" on any failure. This can be a misleading
    message, since we actually _did_ delete at the remote side,
    but we failed to delete locally. Rather than make the
    message more precise, let's just eliminate it entirely; the
    delete_ref routine already takes care of printing out a much
    more specific message about what went wrong.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 5, 2008
  1. @bonzini @gitster

    add special "matching refs" refspec

    bonzini authored gitster committed
    This patch provides a way to specify "push matching heads" using a
    special refspec ":".  This is useful because it allows "push = +:"
    as a way to specify that matching refs will be pushed but, in addition,
    forced updates will be allowed, which was not possible before.
    
    Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 23, 2008
  1. @gitster

    remote.c: Fix overtight refspec validation

    gitster authored
    We tightened the refspec validation code in an earlier commit ef00d15
    (Tighten refspec processing, 2008-03-17) per my suggestion, but the
    suggestion was misguided to begin with and it broke this usage:
    
        $ git push origin HEAD~12:master
    
    The syntax of push refspecs and fetch refspecs are similar in that they
    are both colon separated LHS and RHS (possibly prefixed with a + to
    force), but the similarity ends there.  For example, LHS in a push refspec
    can be anything that evaluates to a valid object name at runtime (except
    when colon and RHS is missing, or it is a glob), while it must be a
    valid-looking refname in a fetch refspec.  To validate them correctly, the
    caller needs to be able to say which kind of refspecs they are.  It is
    unreasonable to keep a single interface that cannot tell which kind it is
    dealing with, and ask it to behave sensibly.
    
    This commit separates the parsing of the two into different functions, and
    clarifies the code to implement the parsing proper (i.e. splitting into
    two parts, making sure both sides are wildcard or neither side is).
    
    This happens to also allow pushing a commit named with the esoteric "look
    for that string" syntax:
    
        $ git push ../test.git ':/remote.c: Fix overtight refspec:master'
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.