From 8fceacee676ba9595a4dfdbe7b9726781bfd3ef9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 21 Sep 2007 12:52:30 -0700 Subject: Documentation/git-lost-found.txt: drop unnecessarily duplicated name. I only did this back when I wanted to make sure git-log and gitk work properly with non Occidental characters. There is really no reason to keep it around. Signed-off-by: Junio C Hamano --- Documentation/git-lost-found.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt index e48607f008..bc739117be 100644 --- a/Documentation/git-lost-found.txt +++ b/Documentation/git-lost-found.txt @@ -65,7 +65,7 @@ $ git rev-parse not-lost-anymore Author ------ -Written by Junio C Hamano 濱野 純 +Written by Junio C Hamano Documentation -------------- -- cgit v1.2.3 From 1e6ab5de4fc4ae2902a09f18fe43249c4d012a35 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 21 Sep 2007 06:43:44 -0700 Subject: Move the paragraph specifying where the .idx and .pack files should be Signed-off-by: Matt Kraai Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index f8a0be3511..d18259d93f 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -25,16 +25,16 @@ is efficient to access. The packed archive format (.pack) is designed to be unpackable without having anything else, but for random access, accompanied with the pack index file (.idx). +Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or +any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) +enables git to read from such an archive. + 'git-unpack-objects' command can read the packed archive and expand the objects contained in the pack into "one-file one-object" format; this is typically done by the smart-pull commands when a pack is created on-the-fly for efficient network transport by their peers. -Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or -any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) -enables git to read from such an archive. - In a packed archive, an object is either stored as a compressed whole, or as a difference from some other object. The latter is often called a delta. -- cgit v1.2.3 From 9c2d28c74e374174de01901238159b63a96a04ba Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 21 Sep 2007 07:37:18 -0700 Subject: Conjugate "search" correctly in the git-prune-packed man page. Signed-off-by: Matt Kraai Signed-off-by: Junio C Hamano --- Documentation/git-prune-packed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt index 3800edb7bb..9f85f3833e 100644 --- a/Documentation/git-prune-packed.txt +++ b/Documentation/git-prune-packed.txt @@ -13,7 +13,7 @@ SYNOPSIS DESCRIPTION ----------- -This program search the `$GIT_OBJECT_DIR` for all objects that currently +This program searches the `$GIT_OBJECT_DIR` for all objects that currently exist in a pack file as well as the independent object directories. All such extra objects are removed. -- cgit v1.2.3 From b9fc6ea9efdc988d851666d45d80076839d9c225 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 19 Sep 2007 13:12:48 -0700 Subject: Detect exec bit in more cases. git-p4 was missing the execute bit setting if the file had other attribute bits set. Acked-By: Simon Hausmann --- contrib/fast-import/git-p4 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 55778c5775..65c57ac4d8 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -63,6 +63,14 @@ def system(cmd): if os.system(cmd) != 0: die("command failed: %s" % cmd) +def isP4Exec(kind): + """Determine if a Perforce 'kind' should have execute permission + + 'p4 help filetypes' gives a list of the types. If it starts with 'x', + or x follows one of a few letters. Otherwise, if there is an 'x' after + a plus sign, it is also executable""" + return (re.search(r"(^[cku]?x)|\+.*x", kind) != None) + def p4CmdList(cmd, stdin=None, stdin_mode='w+b'): cmd = "p4 -G %s" % cmd if verbose: @@ -916,7 +924,7 @@ class P4Sync(Command): data = file['data'] mode = "644" - if file["type"].startswith("x"): + if isP4Exec(file["type"]): mode = "755" elif file["type"] == "symlink": mode = "120000" -- cgit v1.2.3 From fc74ecc12cd339c6d8abd1c363733e67eb50945c Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Sun, 9 Sep 2007 22:07:02 -0400 Subject: user-manual: don't assume refs are stored under .git/refs The scripts taken from Tony Luck's howto assume all refs can be found under .git/refs, but this is not necessarily true, especially since git-gc runs git-pack-refs. Also add a note warning of this in the chapter that introduces refs, and fix the same incorrect assumption in one other spot. Signed-off-by: J. Bruce Fields --- Documentation/user-manual.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index ecb2bf93f2..cf02e14ed0 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -369,6 +369,11 @@ shorthand: The full name is occasionally useful if, for example, there ever exists a tag and a branch with the same name. +(Newly created refs are actually stored in the .git/refs directory, +under the path given by their name. However, for efficiency reasons +they may also be packed together in a single file; see +gitlink:git-pack-refs[1]). + As another useful shortcut, the "HEAD" of a repository can be referred to just using the name of that repository. So, for example, "origin" is usually a shortcut for the HEAD branch in the repository "origin". @@ -2189,9 +2194,9 @@ test|release) git checkout $1 && git pull . origin ;; origin) - before=$(cat .git/refs/remotes/origin/master) + before=$(git rev-parse refs/remotes/origin/master) git fetch origin - after=$(cat .git/refs/remotes/origin/master) + after=$(git rev-parse refs/remotes/origin/master) if [ $before != $after ] then git log $before..$after | git shortlog @@ -2216,11 +2221,10 @@ usage() exit 1 } -if [ ! -f .git/refs/heads/"$1" ] -then +git show-ref -q --verify -- refs/heads/"$1" || { echo "Can't see branch <$1>" 1>&2 usage -fi +} case "$2" in test|release) @@ -2251,7 +2255,7 @@ then git log test..release fi -for branch in `ls .git/refs/heads` +for branch in `git show-ref --heads | sed 's|^.*/||'` do if [ $branch = test -o $branch = release ] then @@ -2946,7 +2950,7 @@ nLE/L9aUXdWeTFPron96DLA= See the gitlink:git-tag[1] command to learn how to create and verify tag objects. (Note that gitlink:git-tag[1] can also be used to create "lightweight tags", which are not tag objects at all, but just simple -references in .git/refs/tags/). +references whose names begin with "refs/tags/"). [[pack-files]] How git stores objects efficiently: pack files -- cgit v1.2.3 From 38a457baae8202e43b092dbb71dca736f6e45600 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 20 Sep 2007 02:34:14 +0200 Subject: User Manual: add a chapter for submodules Signed-off-by: Michael Smith Signed-off-by: Miklos Vajna Signed-off-by: J. Bruce Fields --- Documentation/user-manual.txt | 202 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index cf02e14ed0..a085ca1d39 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -3159,6 +3159,208 @@ a tree which you are in the process of working on. If you blow the index away entirely, you generally haven't lost any information as long as you have the name of the tree that it described. +[[submodules]] +Submodules +========== + +This tutorial explains how to create and publish a repository with submodules +using the gitlink:git-submodule[1] command. + +Submodules maintain their own identity; the submodule support just stores the +submodule repository location and commit ID, so other developers who clone the +superproject can easily clone all the submodules at the same revision. + +To see how submodule support works, create (for example) four example +repositories that can be used later as a submodule: + +------------------------------------------------- +$ mkdir ~/git +$ cd ~/git +$ for i in a b c d +do + mkdir $i + cd $i + git init + echo "module $i" > $i.txt + git add $i.txt + git commit -m "Initial commit, submodule $i" + cd .. +done +------------------------------------------------- + +Now create the superproject and add all the submodules: + +------------------------------------------------- +$ mkdir super +$ cd super +$ git init +$ for i in a b c d +do + git submodule add ~/git/$i +done +------------------------------------------------- + +NOTE: Do not use local URLs here if you plan to publish your superproject! + +See what files `git submodule` created: + +------------------------------------------------- +$ ls -a +. .. .git .gitmodules a b c d +------------------------------------------------- + +The `git submodule add` command does a couple of things: + +- It clones the submodule under the current directory and by default checks out + the master branch. +- It adds the submodule's clone path to the `.gitmodules` file and adds this + file to the index, ready to be committed. +- It adds the submodule's current commit ID to the index, ready to be + committed. + +Commit the superproject: + +------------------------------------------------- +$ git commit -m "Add submodules a, b, c and d." +------------------------------------------------- + +Now clone the superproject: + +------------------------------------------------- +$ cd .. +$ git clone super cloned +$ cd cloned +------------------------------------------------- + +The submodule directories are there, but they're empty: + +------------------------------------------------- +$ ls -a a +. .. +$ git submodule status +-d266b9873ad50488163457f025db7cdd9683d88b a +-e81d457da15309b4fef4249aba9b50187999670d b +-c1536a972b9affea0f16e0680ba87332dc059146 c +-d96249ff5d57de5de093e6baff9e0aafa5276a74 d +------------------------------------------------- + +NOTE: The commit object names shown above would be different for you, but they +should match the HEAD commit object names of your repositories. You can check +it by running `git ls-remote ../a`. + +Pulling down the submodules is a two-step process. First run `git submodule +init` to add the submodule repository URLs to `.git/config`: + +------------------------------------------------- +$ git submodule init +------------------------------------------------- + +Now use `git submodule update` to clone the repositories and check out the +commits specified in the superproject: + +------------------------------------------------- +$ git submodule update +$ cd a +$ ls -a +. .. .git a.txt +------------------------------------------------- + +One major difference between `git submodule update` and `git submodule add` is +that `git submodule update` checks out a specific commit, rather than the tip +of a branch. It's like checking out a tag: the head is detached, so you're not +working on a branch. + +------------------------------------------------- +$ git branch +* (no branch) + master +------------------------------------------------- + +If you want to make a change within a submodule and you have a detached head, +then you should create or checkout a branch, make your changes, publish the +change within the submodule, and then update the superproject to reference the +new commit: + +------------------------------------------------- +$ git checkout master +------------------------------------------------- + +or + +------------------------------------------------- +$ git checkout -b fix-up +------------------------------------------------- + +then + +------------------------------------------------- +$ echo "adding a line again" >> a.txt +$ git commit -a -m "Updated the submodule from within the superproject." +$ git push +$ cd .. +$ git diff +diff --git a/a b/a +index d266b98..261dfac 160000 +--- a/a ++++ b/a +@@ -1 +1 @@ +-Subproject commit d266b9873ad50488163457f025db7cdd9683d88b ++Subproject commit 261dfac35cb99d380eb966e102c1197139f7fa24 +$ git add a +$ git commit -m "Updated submodule a." +$ git push +------------------------------------------------- + +You have to run `git submodule update` after `git pull` if you want to update +submodules, too. + +Pitfalls with submodules +------------------------ + +Always publish the submodule change before publishing the change to the +superproject that references it. If you forget to publish the submodule change, +others won't be able to clone the repository: + +------------------------------------------------- +$ cd ~/git/super/a +$ echo i added another line to this file >> a.txt +$ git commit -a -m "doing it wrong this time" +$ cd .. +$ git add a +$ git commit -m "Updated submodule a again." +$ git push +$ cd ~/git/cloned +$ git pull +$ git submodule update +error: pathspec '261dfac35cb99d380eb966e102c1197139f7fa24' did not match any file(s) known to git. +Did you forget to 'git add'? +Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path 'a' +------------------------------------------------- + +You also should not rewind branches in a submodule beyond commits that were +ever recorded in any superproject. + +It's not safe to run `git submodule update` if you've made and committed +changes within a submodule without checking out a branch first. They will be +silently overwritten: + +------------------------------------------------- +$ cat a.txt +module a +$ echo line added from private2 >> a.txt +$ git commit -a -m "line added inside private2" +$ cd .. +$ git submodule update +Submodule path 'a': checked out 'd266b9873ad50488163457f025db7cdd9683d88b' +$ cd a +$ cat a.txt +module a +------------------------------------------------- + +NOTE: The changes are still visible in the submodule's reflog. + +This is not the case if you did not commit your changes. + [[low-level-operations]] Low-level git operations ======================== -- cgit v1.2.3 From 822f7c7349d61f6075961ce42c1bd1a85cf999e5 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 23 Sep 2007 22:42:08 +0200 Subject: Supplant the "while case ... break ;; esac" idiom A lot of shell scripts contained stuff starting with while case "$#" in 0) break ;; esac and similar. I consider breaking out of the condition instead of the body od the loop ugly, and the implied "true" value of the non-matching case is not really obvious to humans at first glance. It happens not to be obvious to some BSD shells, either, but that's because they are not POSIX-compliant. In most cases, this has been replaced by a straight condition using "test". "case" has the advantage of being faster than "test" on vintage shells where "test" is not a builtin. Since none of them is likely to run the git scripts, anyway, the added readability should be worth the change. A few loops have had their termination condition expressed differently. Signed-off-by: David Kastrup Signed-off-by: Junio C Hamano --- contrib/examples/git-gc.sh | 2 +- contrib/examples/git-tag.sh | 2 +- contrib/examples/git-verify-tag.sh | 2 +- git-am.sh | 2 +- git-clean.sh | 2 +- git-commit.sh | 2 +- git-fetch.sh | 2 +- git-filter-branch.sh | 3 ++- git-instaweb.sh | 2 +- git-ls-remote.sh | 2 +- git-merge.sh | 2 +- git-mergetool.sh | 2 +- git-pull.sh | 6 +++--- git-quiltimport.sh | 2 +- git-rebase--interactive.sh | 2 +- git-rebase.sh | 5 ++--- git-repack.sh | 2 +- git-reset.sh | 2 +- git-submodule.sh | 2 +- 19 files changed, 23 insertions(+), 23 deletions(-) diff --git a/contrib/examples/git-gc.sh b/contrib/examples/git-gc.sh index 2ae235b081..1597e9f33f 100755 --- a/contrib/examples/git-gc.sh +++ b/contrib/examples/git-gc.sh @@ -9,7 +9,7 @@ SUBDIRECTORY_OK=Yes . git-sh-setup no_prune=: -while case $# in 0) break ;; esac +while test $# != 0 do case "$1" in --prune) diff --git a/contrib/examples/git-tag.sh b/contrib/examples/git-tag.sh index 5ee3f50a3c..ae7c531666 100755 --- a/contrib/examples/git-tag.sh +++ b/contrib/examples/git-tag.sh @@ -14,7 +14,7 @@ username= list= verify= LINES=0 -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in -a) diff --git a/contrib/examples/git-verify-tag.sh b/contrib/examples/git-verify-tag.sh index 37b0023b27..0902a5c21a 100755 --- a/contrib/examples/git-verify-tag.sh +++ b/contrib/examples/git-verify-tag.sh @@ -5,7 +5,7 @@ SUBDIRECTORY_OK='Yes' . git-sh-setup verbose= -while case $# in 0) break;; esac +while test $# != 0 do case "$1" in -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose) diff --git a/git-am.sh b/git-am.sh index 6809aa07f6..b66173c0cd 100755 --- a/git-am.sh +++ b/git-am.sh @@ -109,7 +109,7 @@ dotest=.dotest sign= utf8=t keep= skip= interactive= resolved= binary= resolvemsg= resume= git_apply_opt= -while case "$#" in 0) break;; esac +while test $# != 0 do case "$1" in -d=*|--d=*|--do=*|--dot=*|--dote=*|--dotes=*|--dotest=*) diff --git a/git-clean.sh b/git-clean.sh index a5cfd9f07a..4491738186 100755 --- a/git-clean.sh +++ b/git-clean.sh @@ -26,7 +26,7 @@ rmrf="rm -rf --" rm_refuse="echo Not removing" echo1="echo" -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in -d) diff --git a/git-commit.sh b/git-commit.sh index bb113e858b..7a7a2cb4b4 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -89,7 +89,7 @@ force_author= only_include_assumed= untracked_files= templatefile="`git config commit.template`" -while case "$#" in 0) break;; esac +while test $# != 0 do case "$1" in -F|--F|-f|--f|--fi|--fil|--file) diff --git a/git-fetch.sh b/git-fetch.sh index c3a200120d..e44af2c86d 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -27,7 +27,7 @@ shallow_depth= no_progress= test -t 1 || no_progress=--no-progress quiet= -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in -a|--a|--ap|--app|--appe|--appen|--append) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index a4b6577bd4..a12f6c2d4c 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -105,8 +105,9 @@ filter_tag_name= filter_subdir= orig_namespace=refs/original/ force= -while case "$#" in 0) usage;; esac +while : do + test $# = 0 && usage case "$1" in --) shift diff --git a/git-instaweb.sh b/git-instaweb.sh index b79c6b6a42..f5629e7439 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -61,7 +61,7 @@ stop_httpd () { test -f "$fqgitdir/pid" && kill `cat "$fqgitdir/pid"` } -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in --stop|stop) diff --git a/git-ls-remote.sh b/git-ls-remote.sh index b7e5d04584..d56cf92ebf 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -13,7 +13,7 @@ die () { } exec= -while case "$#" in 0) break;; esac +while test $# != 0 do case "$1" in -h|--h|--he|--hea|--head|--heads) diff --git a/git-merge.sh b/git-merge.sh index 3a01db0d75..cde09d4d60 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -122,7 +122,7 @@ merge_name () { case "$#" in 0) usage ;; esac have_message= -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\ diff --git a/git-mergetool.sh b/git-mergetool.sh index 47a80553ad..a0e44f71c4 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -268,7 +268,7 @@ merge_file () { cleanup_temp_files } -while case $# in 0) break ;; esac +while test $# != 0 do case "$1" in -t|--tool*) diff --git a/git-pull.sh b/git-pull.sh index 5e96d1f228..c3f05f56de 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -16,7 +16,7 @@ test -z "$(git ls-files -u)" || die "You are in the middle of a conflicted merge." strategy_args= no_summary= no_commit= squash= -while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac +while : do case "$1" in -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\ @@ -46,8 +46,8 @@ do -h|--h|--he|--hel|--help) usage ;; - -*) - # Pass thru anything that is meant for fetch. + *) + # Pass thru anything that may be meant for fetch. break ;; esac diff --git a/git-quiltimport.sh b/git-quiltimport.sh index 9de54d19fb..74a54d5d08 100755 --- a/git-quiltimport.sh +++ b/git-quiltimport.sh @@ -5,7 +5,7 @@ SUBDIRECTORY_ON=Yes dry_run="" quilt_author="" -while case "$#" in 0) break;; esac +while test $# != 0 do case "$1" in --au=*|--aut=*|--auth=*|--autho=*|--author=*) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index abc2b1c3e0..2fa53fdaeb 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -317,7 +317,7 @@ do_rest () { done } -while case $# in 0) break ;; esac +while test $# != 0 do case "$1" in --continue) diff --git a/git-rebase.sh b/git-rebase.sh index 3bd66b0a04..058fcacb7e 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -122,15 +122,14 @@ finish_rb_merge () { is_interactive () { test -f "$dotest"/interactive || - while case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac - do + while :; do case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac shift done && test -n "$1" } is_interactive "$@" && exec git-rebase--interactive "$@" -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in --continue) diff --git a/git-repack.sh b/git-repack.sh index 156c5e8f4a..0aae1a3ed5 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -9,7 +9,7 @@ SUBDIRECTORY_OK='Yes' no_update_info= all_into_one= remove_redundant= local= quiet= no_reuse= extra= -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in -n) no_update_info=t ;; diff --git a/git-reset.sh b/git-reset.sh index 1dc606fbd3..bafeb52cd1 100755 --- a/git-reset.sh +++ b/git-reset.sh @@ -11,7 +11,7 @@ require_work_tree update= reset_type=--mixed unset rev -while case $# in 0) break ;; esac +while test $# != 0 do case "$1" in --mixed | --soft | --hard) diff --git a/git-submodule.sh b/git-submodule.sh index 3320998c76..673aa27a45 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -251,7 +251,7 @@ modules_list() done } -while case "$#" in 0) break ;; esac +while test $# != 0 do case "$1" in add) -- cgit v1.2.3 From b019304886c2f5d702988e8f8bd86a1b621183c6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 21 Sep 2007 18:48:45 -0700 Subject: git-svn: don't attempt to spawn pager if we don't want one Even though config_pager() unset the $pager variable, we were blindly calling exec() on it through run_pager(). Noticed-by: Chris Moore Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- git-svn.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index f8181609f9..c015ea8580 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3576,7 +3576,7 @@ sub config_pager { } sub run_pager { - return unless -t *STDOUT; + return unless -t *STDOUT && defined $pager; pipe my $rfd, my $wfd or return; defined(my $pid = fork) or ::fatal "Can't fork: $!\n"; if (!$pid) { -- cgit v1.2.3