Code

Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2007 00:08:45 +0000 (17:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2007 00:08:45 +0000 (17:08 -0700)
* 'maint' of git://linux-nfs.org/~bfields/git:
  User Manual: add a chapter for submodules
  user-manual: don't assume refs are stored under .git/refs

24 files changed:
Documentation/git-lost-found.txt
Documentation/git-pack-objects.txt
Documentation/git-prune-packed.txt
contrib/examples/git-gc.sh
contrib/examples/git-tag.sh
contrib/examples/git-verify-tag.sh
contrib/fast-import/git-p4
git-am.sh
git-clean.sh
git-commit.sh
git-fetch.sh
git-filter-branch.sh
git-instaweb.sh
git-ls-remote.sh
git-merge.sh
git-mergetool.sh
git-pull.sh
git-quiltimport.sh
git-rebase--interactive.sh
git-rebase.sh
git-repack.sh
git-reset.sh
git-submodule.sh
git-svn.perl

index e48607f008395e365800b82d52eda9854519a6ce..bc739117beaf0a3ca56c4158e40f8879d74018e3 100644 (file)
@@ -65,7 +65,7 @@ $ git rev-parse not-lost-anymore
 
 Author
 ------
-Written by Junio C Hamano 濱野 純 <junkio@cox.net>
+Written by Junio C Hamano <gitster@pobox.com>
 
 Documentation
 --------------
index f8a0be351188f39e94c9ffa4dc9a1fcea367e290..d18259d93fe1daf1785f373b475add8ff9d2f213 100644 (file)
@@ -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.
index 3800edb7bb7d9062dddb3393eaf1a80e5a44596d..9f85f3833ebc78b1de7981c5048330357a513f0e 100644 (file)
@@ -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.
index 2ae235b081ea9829a51758bba5a0d0d64111d32c..1597e9f33f5e001995085639a448f1214010b561 100755 (executable)
@@ -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)
index 5ee3f50a3c083aa0685ad696fd1bc39b3ffbe607..ae7c5316664ce3aa14c567ddd9866499a5714eb7 100755 (executable)
@@ -14,7 +14,7 @@ username=
 list=
 verify=
 LINES=0
-while case "$#" in 0) break ;; esac
+while test $# != 0
 do
     case "$1" in
     -a)
index 37b0023b270928cd80e0a6456c3d34d8173c975b..0902a5c21adc4123e36856f73acc1409e17eb0ac 100755 (executable)
@@ -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)
index 55778c577564dc2afde8cf36f3dbc1c994e4ded4..65c57ac4d8247ec279e4f018d36ef93dcca78061 100755 (executable)
@@ -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"
index 6809aa07f60165855ebc0192750e85569f9685ff..b66173c0cd8e7908c1ac9ffc9c9a6a91160849a0 100755 (executable)
--- 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=*)
index a5cfd9f07a48b97ceebfe54e88fdcc519c3e0015..44917381863e27de6bedc91fa742eb0f8211a492 100755 (executable)
@@ -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)
index bb113e858b73945a1c637024277415cc5ad8f436..7a7a2cb4b47c62d4826aabd9d90a7af26427f980 100755 (executable)
@@ -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)
index c3a200120df636fe8db0f02902d92c351c6c5e2e..e44af2c86d8e7e44bc79aafcc8ccef3806804720 100755 (executable)
@@ -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)
index a4b6577bd496819232754c1275b7c1e798b0470c..a12f6c2d4c7ad3c4f69a783f7255b3010224d0c3 100755 (executable)
@@ -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
index b79c6b6a42069168daf4e4ff191d08835f96e40f..f5629e7439955666b1755177135ac7ac198bad54 100755 (executable)
@@ -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)
index b7e5d0458470248e65da0893b8b9bb4ced9152da..d56cf92ebfa685fd724a47e1ca753f0735dbd5bd 100755 (executable)
@@ -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)
index 3a01db0d751e272541efd0f27177a9ca5cb63bbe..cde09d4d602811b610e0d744f4e8ede6f9fb0a39 100755 (executable)
@@ -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|\
index 47a80553ad3283c49cae0fbffcf444b93c8e34b7..a0e44f71c4acd5d995bf823913ba63e119ed2e68 100755 (executable)
@@ -268,7 +268,7 @@ merge_file () {
     cleanup_temp_files
 }
 
-while case $# in 0) break ;; esac
+while test $# != 0
 do
     case "$1" in
        -t|--tool*)
index 5e96d1f228da506b11452abec70e7c50d8907733..c3f05f56de300ad48d940def184698fb37c40028 100755 (executable)
@@ -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
index 9de54d19fbc96c18ad52b1fe6b1126432d40f17a..74a54d5d08f86ebbd6a4b3af1f6950dbfd91c743 100755 (executable)
@@ -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=*)
index abc2b1c3e06bf1904ed92a691e917e8718e9e299..2fa53fdaeb3a24495f023e1f1f79da23e7e34f7c 100755 (executable)
@@ -317,7 +317,7 @@ do_rest () {
        done
 }
 
-while case $# in 0) break ;; esac
+while test $# != 0
 do
        case "$1" in
        --continue)
index 3bd66b0a04bac05a3447d68112d4d933480eaf04..058fcacb7eea33128436fa04c0412370562e9ff0 100755 (executable)
@@ -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)
index 156c5e8f4aa2f6c04e33af323ef43356fd336adb..0aae1a3ed5571a010f80438f8e8a0fc7eb0dc285 100755 (executable)
@@ -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 ;;
index 1dc606fbd3fd29f5f4c9928a2518df46109ef449..bafeb52cd113ad8a07ffd1912191f2bc17a7ef7a 100755 (executable)
@@ -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)
index 3320998c76ba72094755ec60369a6266751889ff..673aa27a452b11af62d89986bf21c8a4f10e0c41 100755 (executable)
@@ -251,7 +251,7 @@ modules_list()
        done
 }
 
-while case "$#" in 0) break ;; esac
+while test $# != 0
 do
        case "$1" in
        add)
index f8181609f942b22dc95992740326e8b5788feba5..c015ea8580e8e19dc27a0f66af38995335df8c82 100755 (executable)
@@ -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) {