Commit Graph

10 Commits

Author SHA1 Message Date
Jason Riedy
c7c81b3a51 Fix ?: statements.
Omitting the first branch in ?: is a GNU extension.  Cute,
but not supported by other compilers.  Replaced mostly
by explicit tests.  Calls to getenv() simply are repeated
on non-GNU compilers.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
2005-08-23 20:41:12 -07:00
Martin Sivak
4852f7232b Use GIT_SSH environment to specify alternate ssh binary.
[jc: I ended up rewriting Martin's patch due to whitespace
breakage, but the credit goes to Martin for doing the initial
patch to identify what needs to be changed.]

Signed-off-by: Martin Sivak <mars@nomi.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-09 22:28:20 -07:00
Sven Verdoolaege
44ab20cd88 [PATCH] ssh-push.c: Fix handling of ssh://host/path URLs
Previous patch to fix host:path notation broke
handling of ssh://host/path notation.

Signed-off-by: Sven Verdoolaege <skimo@liacs.nl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-19 10:48:41 -07:00
Sven Verdoolaege
479346adc5 [PATCH] ssh-push: Don't add '/' to pathname
Paths in the host:path notation are usually interpreted
relative to the login directory rather than relative to
the root directory.

Signed-off-by: Sven Verdoolaege <skimo@liacs.nl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-14 12:09:34 -07:00
Linus Torvalds
001d4a27db git-ssh-push/pull: usability improvements
Allow traditional ssh path specifiers (host:path), and let the user
override the command name on the other end.

With this, I can push to kernel.org with this script

	export GIT_SSH_PULL=/home/torvalds/bin/git-ssh-pull
	git-ssh-push -a -v -w heads/master heads/master master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

which while not pretty is at least workable.
2005-06-07 14:23:46 -07:00
Daniel Barkalow
9182f89ab2 [PATCH] rsh.c environment variable
rsh.c used to set the environment variable for the object database when
invoking the remote command. Now that there is a GIT_DIR variable, use
that instead.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 17:09:45 -07:00
Junio C Hamano
d19938ab60 Rename environment variables.
H. Peter Anvin mentioned that using SHA1_whatever as an
environment variable name is not nice and we should instead use
names starting with "GIT_" prefix to avoid conflicts.  Here is
what this patch does:

 * Renames the following environment variables:

    New name                           Old Name

    GIT_AUTHOR_DATE                    AUTHOR_DATE
    GIT_AUTHOR_EMAIL                   AUTHOR_EMAIL
    GIT_AUTHOR_NAME                    AUTHOR_NAME
    GIT_COMMITTER_EMAIL                COMMIT_AUTHOR_EMAIL
    GIT_COMMITTER_NAME                 COMMIT_AUTHOR_NAME
    GIT_ALTERNATE_OBJECT_DIRECTORIES   SHA1_FILE_DIRECTORIES
    GIT_OBJECT_DIRECTORY               SHA1_FILE_DIRECTORY

 * Introduces a compatibility macro, gitenv(), which does an
   getenv() and if it fails calls gitenv_bc(), which in turn
   picks up the value from old name while giving a warning about
   using an old name.

 * Changes all users of the environment variable to fetch
   environment variable with the new name using gitenv().

 * Updates the documentation and scripts shipped with Linus GIT
   distribution.

The transition plan is as follows:

 * We will keep the backward compatibility list used by gitenv()
   for now, so the current scripts and user environments
   continue to work as before.  The users will get warnings when
   they have old name but not new name in their environment to
   the stderr.

 * The Porcelain layers should start using new names.  However,
   just in case it ends up calling old Plumbing layer
   implementation, they should also export old names, taking
   values from the corresponding new names, during the
   transition period.

 * After a transition period, we would drop the compatibility
   support and drop gitenv().  Revert the callers to directly
   call getenv() but keep using the new names.

   The last part is probably optional and the transition
   duration needs to be set to a reasonable value.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-09 17:57:56 -07:00
Edgar Toernig
ae200ee594 [PATCH] compat: replace AF_LOCAL with AF_UNIX
There's no AF_LOCAL in POSIX
2005-04-30 09:51:03 -07:00
Andreas Gal
ec8f81160d [PATCH] Fix up <sys/socket.h> include dependency
This makes rsh.c compile on Darwin/MacOSX (and might possibly help on
some Linux distributions too).

sys/socket.h needs sys/types.h

Signed-off-by: Andreas Gal <gal@uci.edu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-27 13:46:36 -07:00
Daniel Barkalow
6eb7ed5403 [PATCH] Various transport programs
This patch adds three similar and related programs. http-pull downloads
objects from an HTTP server; rpull downloads objects by using ssh and
rpush on the other side; and rpush uploads objects by using ssh and rpull
on the other side.

The algorithm should be sufficient to make the network throughput required
depend only on how much content is new, not at all on how much content the
repository contains.

The combination should enable people to have remote repositories by way of
ssh login for authenticated users and HTTP for anonymous access.

Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-23 18:47:23 -07:00