summaryrefslogtreecommitdiff
path: root/rsh.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete commit-walkersDaniel Barkalow2007-09-191-83/+0
| | | | | | | | Removes the commit-walkers that are no longer useful, as well as library code that was only used by ssh-fetch/push. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* simplify inclusion of system header files.Junio C Hamano2006-12-201-5/+1
| | | | | | | | | | | | | | | | | | | | This is a mechanical clean-up of the way *.c files include system header files. (1) sources under compat/, platform sha-1 implementations, and xdelta code are exempt from the following rules; (2) the first #include must be "git-compat-util.h" or one of our own header file that includes it first (e.g. config.h, builtin.h, pkt-line.h); (3) system headers that are included in "git-compat-util.h" need not be included in individual C source files. (4) "git-compat-util.h" does not have to include subsystem specific header files (e.g. expat.h). Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move add_to_string to "quote.c" and make it extern.Christian Couder2006-09-101-30/+1
| | | | | | | So that this function may be used in places other than "rsh.c". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* check for error return from fork()Paul T Darga2006-06-081-1/+5
| | | | | | | Trivial fixup for fork() callsites which do not check for errors. Signed-off-by: Paul T Darga <pdarga@umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fixes'Junio C Hamano2005-10-151-1/+1
|\
| * rsh.c: typo fixRalf Baechle2005-10-131-1/+1
| | | | | | | | | | | | | | Example in a comment used a wrong environment variable. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Make rsh.c use sq_quote_buf()H. Peter Anvin2005-10-101-41/+5
| | | | | | | | | | | | Make rsh.c use sq_quote_buf() Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Trivial optimizationH. Peter Anvin2005-10-101-2/+1
|/ | | | | | GIT_DIR_ENVIRONMENT is always a string literal Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] rsh.c unterminated stringH. Peter Anvin2005-09-231-5/+5
| | | | | | | | | | | | The change I made to rsh.c would leave the string unterminated under certain conditions, which unfortunately always applied! This patch fixes this. For some reason this never bit on i386 or ppc, but bit me on x86-64. Fix situation where the buffer was not properly null-terminated. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] rsh.c env and quoting cleanup, take 2H. Peter Anvin2005-09-151-16/+89
| | | | | | | | | | | | | | | | | | | This patch does proper quoting, and uses "env" to be compatible with tcsh. As a side benefit, I believe the code is a lot cleaner to read. [jc: I am accepting this not because I necessarily agree with the quoting approach taken by it, but because (1) the code is only used by ssh-fetch/ssh-upload pair which I do not care much about (if you have ssh account on the remote end you should be using git-send-pack git-fetch-pack pair over ssh anyway), and (2) HPA is one of the more important customers belonging to the Linux kernel community and I want to help his workflow -- which includes not wasting his time by asking him to switch to git-send-pack/git-fetch-pack pair, nor to use a better shell ;-). I might not have taken this patch if it mucked with git_connect in connect.c in its current form.] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix ?: statements.Jason Riedy2005-08-231-2/+4
| | | | | | | | | 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>
* Use GIT_SSH environment to specify alternate ssh binary.Martin Sivak2005-08-091-1/+7
| | | | | | | | | [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>
* [PATCH] ssh-push.c: Fix handling of ssh://host/path URLsSven Verdoolaege2005-06-191-0/+1
| | | | | | | | 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>
* [PATCH] ssh-push: Don't add '/' to pathnameSven Verdoolaege2005-06-141-3/+4
| | | | | | | | | 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>
* git-ssh-push/pull: usability improvementsLinus Torvalds2005-06-071-5/+7
| | | | | | | | | | | | 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.
* [PATCH] rsh.c environment variableDaniel Barkalow2005-06-061-2/+2
| | | | | | | | | 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>
* Rename environment variables.Junio C Hamano2005-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [PATCH] compat: replace AF_LOCAL with AF_UNIXEdgar Toernig2005-04-301-1/+1
| | | | | There's no AF_LOCAL in POSIX
* [PATCH] Fix up <sys/socket.h> include dependencyAndreas Gal2005-04-271-0/+1
| | | | | | | | | | 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>
* [PATCH] Various transport programsDaniel Barkalow2005-04-231-0/+63
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>