author | Junio C Hamano <gitster@pobox.com> | |
Mon, 24 Sep 2007 00:08:45 +0000 (17:08 -0700) | ||
committer | Junio 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
User Manual: add a chapter for submodules
user-manual: don't assume refs are stored under .git/refs
24 files changed:
index e48607f008395e365800b82d52eda9854519a6ce..bc739117beaf0a3ca56c4158e40f8879d74018e3 100644 (file)
Author
------
-Written by Junio C Hamano 濱野 純 <junkio@cox.net>
+Written by Junio C Hamano <gitster@pobox.com>
Documentation
--------------
index f8a0be351188f39e94c9ffa4dc9a1fcea367e290..d18259d93fe1daf1785f373b475add8ff9d2f213 100644 (file)
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)
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)
. git-sh-setup
no_prune=:
-while case $# in 0) break ;; esac
+while test $# != 0
do
case "$1" in
--prune)
index 5ee3f50a3c083aa0685ad696fd1bc39b3ffbe607..ae7c5316664ce3aa14c567ddd9866499a5714eb7 100755 (executable)
list=
verify=
LINES=0
-while case "$#" in 0) break ;; esac
+while test $# != 0
do
case "$1" in
-a)
index 37b0023b270928cd80e0a6456c3d34d8173c975b..0902a5c21adc4123e36856f73acc1409e17eb0ac 100755 (executable)
. 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)
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:
data = file['data']
mode = "644"
- if file["type"].startswith("x"):
+ if isP4Exec(file["type"]):
mode = "755"
elif file["type"] == "symlink":
mode = "120000"
diff --git a/git-am.sh b/git-am.sh
index 6809aa07f60165855ebc0192750e85569f9685ff..b66173c0cd8e7908c1ac9ffc9c9a6a91160849a0 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
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 a5cfd9f07a48b97ceebfe54e88fdcc519c3e0015..44917381863e27de6bedc91fa742eb0f8211a492 100755 (executable)
--- a/git-clean.sh
+++ b/git-clean.sh
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 bb113e858b73945a1c637024277415cc5ad8f436..7a7a2cb4b47c62d4826aabd9d90a7af26427f980 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
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 c3a200120df636fe8db0f02902d92c351c6c5e2e..e44af2c86d8e7e44bc79aafcc8ccef3806804720 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
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 a4b6577bd496819232754c1275b7c1e798b0470c..a12f6c2d4c7ad3c4f69a783f7255b3010224d0c3 100755 (executable)
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
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 b79c6b6a42069168daf4e4ff191d08835f96e40f..f5629e7439955666b1755177135ac7ac198bad54 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
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 b7e5d0458470248e65da0893b8b9bb4ced9152da..d56cf92ebfa685fd724a47e1ca753f0735dbd5bd 100755 (executable)
--- a/git-ls-remote.sh
+++ b/git-ls-remote.sh
}
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 3a01db0d751e272541efd0f27177a9ca5cb63bbe..cde09d4d602811b610e0d744f4e8ede6f9fb0a39 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
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 47a80553ad3283c49cae0fbffcf444b93c8e34b7..a0e44f71c4acd5d995bf823913ba63e119ed2e68 100755 (executable)
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
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 5e96d1f228da506b11452abec70e7c50d8907733..c3f05f56de300ad48d940def184698fb37c40028 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
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|\
-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 9de54d19fbc96c18ad52b1fe6b1126432d40f17a..74a54d5d08f86ebbd6a4b3af1f6950dbfd91c743 100755 (executable)
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
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)
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 3bd66b0a04bac05a3447d68112d4d933480eaf04..058fcacb7eea33128436fa04c0412370562e9ff0 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
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 156c5e8f4aa2f6c04e33af323ef43356fd336adb..0aae1a3ed5571a010f80438f8e8a0fc7eb0dc285 100755 (executable)
--- a/git-repack.sh
+++ b/git-repack.sh
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 1dc606fbd3fd29f5f4c9928a2518df46109ef449..bafeb52cd113ad8a07ffd1912191f2bc17a7ef7a 100755 (executable)
--- a/git-reset.sh
+++ b/git-reset.sh
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 3320998c76ba72094755ec60369a6266751889ff..673aa27a452b11af62d89986bf21c8a4f10e0c41 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
done
}
-while case "$#" in 0) break ;; esac
+while test $# != 0
do
case "$1" in
add)
diff --git a/git-svn.perl b/git-svn.perl
index f8181609f942b22dc95992740326e8b5788feba5..c015ea8580e8e19dc27a0f66af38995335df8c82 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
}
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) {