Revision 09ccbd34f4fe37a682a10b23d86f915b2a8a9c28 authored by Pete Wyckoff on 26 February 2012, 15:37:27 UTC, committed by Junio C Hamano on 27 February 2012, 00:20:18 UTC
This works in both bash and dash:

    $ bash -c 'VAR=1 env' | grep VAR
    VAR=1
    $ dash -c 'VAR=1 env' | grep VAR
    VAR=1

But environment variables assigned this way are not necessarily propagated
through a function in POSIX compliant shells:

    $ bash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR
    VAR=1
    $ dash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR

Fix constructs like this, in particular, setting variables through
test_must_fail.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8d93a5a
Raw File
git-remote-fd.txt
git-remote-fd(1)
================

NAME
----
git-remote-fd - Reflect smart transport stream back to caller

SYNOPSIS
--------
"fd::<infd>[,<outfd>][/<anything>]" (as URL)

DESCRIPTION
-----------
This helper uses specified file descriptors to connect to a remote git server.
This is not meant for end users but for programs and scripts calling git
fetch, push or archive.

If only <infd> is given, it is assumed to be a bidirectional socket connected
to remote git server (git-upload-pack, git-receive-pack or
git-upload-achive). If both <infd> and <outfd> are given, they are assumed
to be pipes connected to a remote git server (<infd> being the inbound pipe
and <outfd> being the outbound pipe.

It is assumed that any handshaking procedures have already been completed
(such as sending service request for git://) before this helper is started.

<anything> can be any string. It is ignored. It is meant for providing
information to user in the URL in case that URL is displayed in some
context.

ENVIRONMENT VARIABLES
---------------------
GIT_TRANSLOOP_DEBUG::
	If set, prints debugging information about various reads/writes.

EXAMPLES
--------
`git fetch fd::17 master`::
	Fetch master, using file descriptor #17 to communicate with
	git-upload-pack.

`git fetch fd::17/foo master`::
	Same as above.

`git push fd::7,8 master (as URL)`::
	Push master, using file descriptor #7 to read data from
	git-receive-pack and file descriptor #8 to write data to
	same service.

`git push fd::7,8/bar master`::
	Same as above.

Documentation
--------------
Documentation by Ilari Liusvaara and the git list <git@vger.kernel.org>

GIT
---
Part of the linkgit:git[1] suite
back to top