Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 29, 2012
  1. @gitster

    Merge branch 'jc/capabilities'

    gitster authored
    Some capabilities were asked by fetch-pack even when upload-pack did
    not advertise that they are available.  Fix fetch-pack not to do so.
    
    * jc/capabilities:
      fetch-pack: mention server version with verbose output
      parse_feature_request: make it easier to see feature values
      fetch-pack: do not ask for unadvertised capabilities
      do not send client agent unless server does first
      send-pack: fix capability-sending logic
      include agent identifier in capability string
Commits on Aug 14, 2012
  1. @peff @gitster

    parse_feature_request: make it easier to see feature values

    peff authored gitster committed
    We already take care to parse key/value capabilities like
    "foo=bar", but the code does not provide a good way of
    actually finding out what is on the right-hand side of the
    "=".
    
    A server using "parse_feature_request" could accomplish this
    with some extra parsing. You must skip past the "key"
    portion manually, check for "=" versus NUL or space, and
    then find the length by searching for the next space (or
    NUL).  But clients can't even do that, since the
    "server_supports" interface does not even return the
    pointer.
    
    Instead, let's have our parser share more information by
    providing a pointer to the value and its length. The
    "parse_feature_value" function returns a pointer to the
    feature's value portion, along with the length of the value.
    If the feature is missing, NULL is returned. If it does not
    have an "=", then a zero-length value is returned.
    
    Similarly, "server_feature_value" behaves in the same way,
    but always checks the static server_feature_list variable.
    
    We can then implement "server_supports" in terms of
    "server_feature_value". We cannot implement the original
    "parse_feature_request" in terms of our new function,
    because it returned a pointer to the beginning of the
    feature. However, no callers actually cared about the value
    of the returned pointer, so we can simplify it to a boolean
    just as we do for "server_supports".
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 5, 2012
  1. @gitster

    Merge branch 'hv/remote-end-hung-up'

    gitster authored
    When we get disconnected while expecting a response from the remote
    side because authentication failed, we issued an error message "The
    remote side hung up unexpectedly."
    
    Give hint that it may be a permission problem in the message when we
    can reasonably suspect it.
    
    * hv/remote-end-hung-up:
      remove the impression of unexpectedness when access is denied
Commits on Jun 19, 2012
  1. @gitster

    remove the impression of unexpectedness when access is denied

    Heiko Voigt authored gitster committed
    If a server accessed through ssh is denying access git will currently
    issue the message
    
    	"fatal: The remote end hung up unexpectedly"
    
    as the last line. This sounds as if something really ugly just happened.
    Since this is a quite typical situation in which users regularly get
    we do not say that if it happens at the beginning when reading the
    remote heads.
    
    If its in the very first beginning of reading the remote heads it is
    very likely an authentication error or a missing repository.
    
    If it happens later during reading the remote heads we still indicate
    that it happened during this initial contact phase.
    
    Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 13, 2012
  1. @gitster

    git: Wrong parsing of ssh urls with IPv6 literals ignores port

    René Scharfe authored gitster committed
    If we encounter an address part shaped like "[HOST]:PORT", we skip the opening
    bracket and replace the closing one with a NUL.  The variable host then points
    to HOST and we've cut off the PORT part.  Thus, when we go looking for it using
    host a bit later, we can't find it.  Start at end instead, which either points
    to the colon, if present, or is equal to host.
    
    Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 8, 2012
  1. @gitster

    server_supports(): parse feature list more carefully

    gitster authored
    We have been carefully choosing feature names used in the protocol
    extensions so that the vocabulary does not contain a word that is a
    substring of another word, so it is not a real problem, but we have
    recently added "quiet" feature word, which would mean we cannot later
    add some other word with "quiet" (e.g. "quiet-push"), which is awkward.
    
    Let's make sure that we can eventually be able to do so by teaching the
    clients and servers that feature words consist of non whitespace
    letters. This parser also allows us to later add features with parameters
    e.g. "feature=1.5" (parameter values need to be quoted for whitespaces,
    but we will worry about the detauls when we do introduce them).
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Signed-off-by: Clemens Buchacher <drizzd@aon.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 22, 2011
  1. @gitster

    Merge branch 'jk/git-prompt'

    gitster authored
    * jk/git-prompt:
      contrib: add credential helper for OS X Keychain
      Makefile: OS X has /dev/tty
      Makefile: linux has /dev/tty
      credential: use git_prompt instead of git_getpass
      prompt: use git_terminal_prompt
      add generic terminal prompt function
      refactor git_getpass into generic prompt function
      move git_getpass to its own source file
      imap-send: don't check return value of git_getpass
      imap-send: avoid buffer overflow
    
    Conflicts:
    	Makefile
Commits on Dec 20, 2011
  1. @gitster

    Merge branch 'ew/keepalive'

    gitster authored
    * ew/keepalive:
      enable SO_KEEPALIVE for connected TCP sockets
Commits on Dec 13, 2011
  1. @peff @gitster

    connect.c: drop path_match function

    peff authored gitster committed
    This function was used for comparing local and remote ref
    names during fetch (which makes it a candidate for "most
    confusingly named function of the year").
    
    It no longer has any callers, so let's get rid of it.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff @gitster

    drop "match" parameter from get_remote_heads

    peff authored gitster committed
    The get_remote_heads function reads the list of remote refs
    during git protocol session. It dates all the way back to
    def88e9 (Commit first cut at "git-fetch-pack", 2005-07-04).
    At that time, the idea was to come up with a list of refs we
    were interested in, and then filter the list as we got it
    from the remote side.
    
    Later, 1baaae5 (Make maximal use of the remote refs,
    2005-10-28) stopped filtering at the get_remote_heads layer,
    letting us use the non-matching refs to find common history.
    
    As a result, all callers now simply pass an empty match
    list (and any future callers will want to do the same). So
    let's drop these now-useless parameters.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @peff @gitster

    move git_getpass to its own source file

    peff authored gitster committed
    This is currently in connect.c, but really has nothing to
    do with the git protocol itself. Let's make a new source
    file all about prompting the user, which will make it
    cleaner to refactor.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 6, 2011
  1. @gitster

    enable SO_KEEPALIVE for connected TCP sockets

    Eric Wong authored gitster committed
    Sockets may never receive notification of some link errors,
    causing "git fetch" or similar processes to hang forever.
    Enabling keepalive messages allows hung processes to error out
    after a few minutes/hours depending on the keepalive settings of
    the system.
    
    This is a problem noticed when running non-interactive
    cronjobs to mirror repositories using "git fetch".
    
    Signed-off-by: Eric Wong <normalperson@yhbt.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 5, 2011
  1. @mhagger @gitster

    Change check_ref_format() to take a flags argument

    mhagger authored gitster committed
    Change check_ref_format() to take a flags argument that indicates what
    is acceptable in the reference name (analogous to "git
    check-ref-format"'s "--allow-onelevel" and "--refspec-pattern").  This
    is more convenient for callers and also fixes a failure in the test
    suite (and likely elsewhere in the code) by enabling "onelevel" and
    "refspec-pattern" to be allowed independently of each other.
    
    Also rename check_ref_format() to check_refname_format() to make it
    obvious that it deals with refnames rather than references themselves.
    
    Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 12, 2011
  1. @gitster

    Merge branch 'dz/connect-error-report' into maint

    gitster authored
    * dz/connect-error-report:
      Do not log unless all connect() attempts fail
Commits on Aug 1, 2011
  1. @kusma @gitster

    connect: only log if all attempts failed (ipv4)

    kusma authored gitster committed
    In 63a995b (Do not log unless all connect() attempts fail), a
    mechanism to only log connection errors if all attempts failed
    was introduced for the IPv6 code-path, but not for the IPv4 one.
    
    Introduce a matching mechanism so IPv4-users also benefit from
    this noise-reduction.
    
    Move the call to socket after filling in sa, to make it more
    apparent that errno can't change in between.
    
    Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    Merge branch 'maint' into ef/ipv4-connect-error-report

    gitster authored
    * maint:
      connect: correctly number ipv6 network adapter
  3. @kusma @gitster

    connect: correctly number ipv6 network adapter

    kusma authored gitster committed
    In ba50532, the variable 'cnt' was added to both the IPv6 and the
    IPv4 version of git_tcp_connect_sock, intended to identify which
    network adapter the connection failed on. But in the IPv6 version,
    the variable was never increased, leaving it constantly at zero.
    
    This behaviour isn't very useful, so let's fix it by increasing
    the variable at every loop-iteration.
    
    Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 14, 2011
  1. @davezarzycki @gitster

    Do not log unless all connect() attempts fail

    davezarzycki authored gitster committed
    IPv6 hosts are often unreachable on the primarily IPv4 Internet and
    therefore we shouldn't print an error if there are still other hosts we
    can try to connect() to. This helps "git fetch --quiet" stay quiet.
    
    Signed-off-by: Dave Zarzycki <zarzycki@apple.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 20, 2011
  1. @gitster

    Merge branch 'jk/git-connection-deadlock-fix'

    gitster authored
    * jk/git-connection-deadlock-fix:
      test core.gitproxy configuration
      send-pack: avoid deadlock on git:// push with failed pack-objects
      connect: let callers know if connection is a socket
      connect: treat generic proxy processes like ssh processes
    
    Conflicts:
    	connect.c
Commits on May 16, 2011
  1. @peff @gitster

    connect: let callers know if connection is a socket

    peff authored gitster committed
    They might care because they want to do a half-duplex close.
    With pipes, that means simply closing the output descriptor;
    with a socket, you must actually call shutdown.
    
    Instead of exposing the magic no_fork child_process struct,
    let's encapsulate the test in a function.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @peff @gitster

    connect: treat generic proxy processes like ssh processes

    peff authored gitster committed
    The git_connect function returns two ends of a pipe for
    talking with a remote, plus a struct child_process
    representing the other end of the pipe. If we have a direct
    socket connection, then this points to a special "no_fork"
    child process.
    
    The code path for doing git-over-pipes or git-over-ssh sets
    up this child process to point to the child git command or
    the ssh process. When we call finish_connect eventually, we
    check wait() on the command and report its return value.
    
    The code path for git://, on the other hand, always sets it
    to no_fork. In the case of a direct TCP connection, this
    makes sense; we have no child process. But in the case of a
    proxy command (configured by core.gitproxy), we do have a
    child process, but we throw away its pid, and therefore
    ignore its return code.
    
    Instead, let's keep that information in the proxy case, and
    respect its return code, which can help catch some errors
    (though depending on your proxy command, it will be errors
    reported by the proxy command itself, and not propagated
    from git commands. Still, it is probably better to propagate
    such errors than to ignore them).
    
    It also means that the child_process field can reliably be
    used to determine whether the returned descriptors are
    actually a full-duplex socket, which means we should be
    using shutdown() instead of a simple close.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Helped-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 30, 2010
  1. @dscho @gitster

    Make sure that git_getpass() never returns NULL

    dscho authored gitster committed
    The result of git_getpass() is used without checking for NULL, so let's
    just die() instead of returning NULL.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 31, 2010
  1. @gitster

    Allow core.askpass to override SSH_ASKPASS.

    Knut Franke authored gitster committed
    Modify handling of the 'core.askpass' option so that it has the same effect as
    GIT_ASKPASS also if SSH_ASKPASS is set.
    
    Signed-off-by: Knut Franke <k.franke@science-computing.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @akruis @gitster

    Add a new option 'core.askpass'.

    akruis authored gitster committed
    Setting this option has the same effect as setting the environment variable
    'GIT_ASKPASS'.
    
    Signed-off-by: Knut Franke <k.franke@science-computing.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 21, 2010
  1. @gitster

    Merge branch 'gv/portable'

    gitster authored
    * gv/portable:
      test-lib: use DIFF definition from GIT-BUILD-OPTIONS
      build: propagate $DIFF to scripts
      Makefile: Tru64 portability fix
      Makefile: HP-UX 10.20 portability fixes
      Makefile: HPUX11 portability fixes
      Makefile: SunOS 5.6 portability fix
      inline declaration does not work on AIX
      Allow disabling "inline"
      Some platforms lack socklen_t type
      Make NO_{INET_NTOP,INET_PTON} configured independently
      Makefile: some platforms do not have hstrerror anywhere
      git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
      test_cmp: do not use "diff -u" on platforms that lack one
      fixup: do not unconditionally disable "diff -u"
      tests: use "test_cmp", not "diff", when verifying the result
      Do not use "diff" found on PATH while building and installing
      enums: omit trailing comma for portability
      Makefile: -lpthread may still be necessary when libc has only pthread stubs
      Rewrite dynamic structure initializations to runtime assignment
      Makefile: pass CPPFLAGS through to fllow customization
    
    Conflicts:
    	Makefile
    	wt-status.h
Commits on May 31, 2010
  1. @gitster

    enums: omit trailing comma for portability

    Gary V. Vaughan authored gitster committed
    Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
    5.1 fails to compile git.
    
    enum style is inconsistent already, with some enums declared on one
    line, some over 3 lines with the enum values all on the middle line,
    sometimes with 1 enum value per line... and independently of that the
    trailing comma is sometimes present and other times absent, often
    mixing with/without trailing comma styles in a single file, and
    sometimes in consecutive enum declarations.
    
    Clearly, omitting the comma is the more portable style, and this patch
    changes all enum declarations to use the portable omitted dangling
    comma style consistently.
    
    Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 24, 2010
  1. @peff @gitster

    decode file:// and ssh:// URLs

    peff authored gitster committed
    We generally treat these as equivalent to "/path/to/repo"
    and "host:path_to_repo" respectively. However, they are URLs
    and as such may be percent-encoded. The current code simply
    uses them as-is without any decoding.
    
    With this patch, we will now percent-decode any file:// or
    ssh:// url (or ssh+git, git+ssh, etc) at the transport
    layer. We continue to treat plain paths and "host:path"
    syntax literally.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 20, 2010
  1. @gitster

    Merge branch 'fl/askpass'

    gitster authored
    * fl/askpass:
      git-core: Support retrieving passwords with GIT_ASKPASS
      git-svn: Support retrieving passwords with GIT_ASKPASS
Commits on Mar 7, 2010
  1. @gitster

    Merge branch 'gb/maint-submodule-env'

    gitster authored
    * gb/maint-submodule-env:
      is_submodule_modified(): clear environment properly
      submodules: ensure clean environment when operating in a submodule
      shell setup: clear_local_git_env() function
      rev-parse: --local-env-vars option
      Refactor list of of repo-local env vars
Commits on Mar 5, 2010
  1. @lznuaa @gitster

    git-core: Support retrieving passwords with GIT_ASKPASS

    lznuaa authored gitster committed
    git tries to read a password from the terminal in imap-send and
    when talking to a http server that requires authentication.
    
    When a GUI is driving git, however, the end user is not paying
    attention to the terminal (there may not even be a terminal).
    GUI would appear to hang forever.
    
    Fix this problem by allowing a password-retrieving command
    to be specified in GIT_ASKPASS
    
    Signed-off-by: Frank Li <lznuaa@gmail.com>
    Signed-off-by: Johannes Sixt <j6t@kdbg.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 2, 2010
  1. @gitster

    Merge branch 'ml/connect-refactor'

    gitster authored
    * ml/connect-refactor:
      connect.c: move duplicated code to a new function 'get_host_and_port'
Commits on Feb 25, 2010
  1. @Oblomov @gitster

    Refactor list of of repo-local env vars

    Oblomov authored gitster committed
    Move the list of GIT_* environment variables that are local to a
    repository into a static list in environment.c, as it is also
    useful elsewhere. Also add the missing GIT_CONFIG variable to the
    list.
    
    Make it easy to use the list both by NULL-termination and by size;
    the latter (excluding the terminating NULL) is stored in the
    local_repo_env_size define.
    
    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 17, 2010
  1. @michaellukashov @gitster

    connect.c: move duplicated code to a new function 'get_host_and_port'

    michaellukashov authored gitster committed
    The following functions:
    
      git_tcp_connect_sock (IPV6 version)
      git_tcp_connect_sock (no IPV6 version),
      git_proxy_connect
    
    have common block of code. Move it to a new function 'get_host_and_port'
    
    Signed-off-by: Michael Lukashov <michael.lukashov@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 4, 2010
  1. @gitster

    Typofixes outside documentation area

    gitster authored
        begining -> beginning
        canonicalizations -> canonicalization
        comand -> command
        dewrapping -> unwrapping
        dirtyness -> dirtiness
        DISCLAMER -> DISCLAIMER
        explicitely -> explicitly
        feeded -> fed
        impiled -> implied
        madatory -> mandatory
        mimick -> mimic
        preceeding -> preceding
        reqeuest -> request
        substition -> substitution
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 27, 2010
  1. @gitster

    Merge branch 'il/maint-colon-address'

    gitster authored
    * il/maint-colon-address:
      Allow use of []-wrapped addresses in git://
      Support addresses with ':' in git-daemon
Something went wrong with that request. Please try again.