Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
92e802c6
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
92e802c6
编写于
1月 05, 2006
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
GIT 1.0.7
Signed-off-by:
N
Junio C Hamano
<
junkio@cox.net
>
上级
17dff84b
c1fe2fe4
变更
61
隐藏空白更改
内联
并排
Showing
61 changed file
with
203 addition
and
116 deletion
+203
-116
.gitignore
.gitignore
+1
-0
Documentation/cvs-migration.txt
Documentation/cvs-migration.txt
+1
-1
Documentation/diff-format.txt
Documentation/diff-format.txt
+1
-1
Documentation/diff-options.txt
Documentation/diff-options.txt
+1
-1
Documentation/git-add.txt
Documentation/git-add.txt
+1
-1
Documentation/git-am.txt
Documentation/git-am.txt
+1
-0
Documentation/git-apply.txt
Documentation/git-apply.txt
+4
-1
Documentation/git-archimport.txt
Documentation/git-archimport.txt
+4
-4
Documentation/git-cat-file.txt
Documentation/git-cat-file.txt
+1
-1
Documentation/git-checkout-index.txt
Documentation/git-checkout-index.txt
+2
-1
Documentation/git-clone.txt
Documentation/git-clone.txt
+3
-1
Documentation/git-commit-tree.txt
Documentation/git-commit-tree.txt
+2
-1
Documentation/git-commit.txt
Documentation/git-commit.txt
+3
-1
Documentation/git-cvsexportcommit.txt
Documentation/git-cvsexportcommit.txt
+1
-2
Documentation/git-cvsimport.txt
Documentation/git-cvsimport.txt
+4
-4
Documentation/git-daemon.txt
Documentation/git-daemon.txt
+2
-1
Documentation/git-diff-index.txt
Documentation/git-diff-index.txt
+2
-2
Documentation/git-diff-tree.txt
Documentation/git-diff-tree.txt
+4
-2
Documentation/git-diff.txt
Documentation/git-diff.txt
+1
-1
Documentation/git-format-patch.txt
Documentation/git-format-patch.txt
+4
-2
Documentation/git-fsck-objects.txt
Documentation/git-fsck-objects.txt
+3
-1
Documentation/git-grep.txt
Documentation/git-grep.txt
+1
-2
Documentation/git-http-fetch.txt
Documentation/git-http-fetch.txt
+2
-2
Documentation/git-init-db.txt
Documentation/git-init-db.txt
+14
-2
Documentation/git-ls-files.txt
Documentation/git-ls-files.txt
+1
-1
Documentation/git-pack-objects.txt
Documentation/git-pack-objects.txt
+1
-1
Documentation/git-repo-config.txt
Documentation/git-repo-config.txt
+2
-2
Documentation/git-rev-list.txt
Documentation/git-rev-list.txt
+13
-12
Documentation/git-show-branch.txt
Documentation/git-show-branch.txt
+1
-1
Documentation/git-svnimport.txt
Documentation/git-svnimport.txt
+4
-4
Documentation/git.txt
Documentation/git.txt
+1
-1
Documentation/glossary.txt
Documentation/glossary.txt
+1
-1
Documentation/howto/isolate-bugs-with-bisect.txt
Documentation/howto/isolate-bugs-with-bisect.txt
+1
-1
Documentation/repository-layout.txt
Documentation/repository-layout.txt
+2
-2
Makefile
Makefile
+1
-1
apply.c
apply.c
+3
-2
config.c
config.c
+12
-5
date.c
date.c
+2
-2
diff-index.c
diff-index.c
+1
-1
diff.c
diff.c
+1
-1
entry.c
entry.c
+1
-1
epoch.c
epoch.c
+1
-1
fetch-clone.c
fetch-clone.c
+1
-1
git-commit.sh
git-commit.sh
+2
-1
git-compat-util.h
git-compat-util.h
+6
-0
git-fetch.sh
git-fetch.sh
+14
-5
git-format-patch.sh
git-format-patch.sh
+1
-0
git-merge-one-file.sh
git-merge-one-file.sh
+2
-2
git-reset.sh
git-reset.sh
+1
-1
git-svnimport.perl
git-svnimport.perl
+4
-2
git.c
git.c
+5
-0
ident.c
ident.c
+1
-1
ls-files.c
ls-files.c
+1
-1
pack-objects.c
pack-objects.c
+1
-1
repo-config.c
repo-config.c
+8
-8
t/t3300-funny-names.sh
t/t3300-funny-names.sh
+6
-3
t/t4000-diff-format.sh
t/t4000-diff-format.sh
+8
-0
t/t4006-diff-mode.sh
t/t4006-diff-mode.sh
+15
-5
t/t4102-apply-rename.sh
t/t4102-apply-rename.sh
+7
-2
t/t6001-rev-list-merge-order.sh
t/t6001-rev-list-merge-order.sh
+7
-7
t/test-lib.sh
t/test-lib.sh
+1
-1
未找到文件。
.gitignore
浏览文件 @
92e802c6
...
...
@@ -119,3 +119,4 @@ git-core.spec
*.exe
libgit.a
*.o
*.py[co]
Documentation/cvs-migration.txt
浏览文件 @
92e802c6
...
...
@@ -138,7 +138,7 @@ mailing list archives for details).
git has a couple of alternatives, though, that you may find sufficient
or even superior depending on your use. One is called "git-whatchanged"
(for obvious reasons) and the other one is called "pickaxe" ("a tool for
the software archeologist").
the software arch
a
eologist").
The "git-whatchanged" script is a truly trivial script that can give you
a good overview of what has changed in a file or a directory (or an
...
...
Documentation/diff-format.txt
浏览文件 @
92e802c6
...
...
@@ -117,7 +117,7 @@ git specific extension to diff format
What -p option produces is slightly different from the
traditional diff format.
1. It is prece
e
ded with a "git diff" header, that looks like
1. It is preceded with a "git diff" header, that looks like
this:
diff --git a/file1 b/file2
...
...
Documentation/diff-options.txt
浏览文件 @
92e802c6
...
...
@@ -21,7 +21,7 @@
--abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object
name in diff-raw format output and diff-tree header
lines, show only handful
dhex
igits prefix. This is
lines, show only handful
hexd
igits prefix. This is
independent of --full-index option above, which controls
the diff-patch output format. Non default number of
digits can be specified with --abbrev=<n>.
...
...
Documentation/git-add.txt
浏览文件 @
92e802c6
...
...
@@ -31,7 +31,7 @@ DISCUSSION
----------
The list of <file> given to the command is fed to `git-ls-files`
command to list files that are not registerd in the index and
command to list files that are not register
e
d in the index and
are not ignored/excluded by `$GIT_DIR/info/exclude` file or
`.gitignore` file in each directory. This means two things:
...
...
Documentation/git-am.txt
浏览文件 @
92e802c6
...
...
@@ -8,6 +8,7 @@ git-am - Apply a series of patches in a mailbox
SYNOPSIS
--------
[verse]
'git-am' [--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way] <mbox>...
'git-am' [--skip | --resolved]
...
...
Documentation/git-apply.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,10 @@ git-apply - Apply patch on a git index file and a work tree
SYNOPSIS
--------
'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply] [--no-add] [--index-info] [--allow-binary-replacement] [-z] [<patch>...]
[verse]
'git-apply' [--stat] [--numstat] [--summary] [--check] [--index] [--apply]
[--no-add] [--index-info] [--allow-binary-replacement] [-z]
[<patch>...]
DESCRIPTION
-----------
...
...
Documentation/git-archimport.txt
浏览文件 @
92e802c6
...
...
@@ -8,15 +8,15 @@ git-archimport - Import an Arch repository into git
SYNOPSIS
--------
`git-archimport` [ -h ] [ -v ] [ -o ] [ -a ] [ -f ] [ -T
]
[ -D depth ] [ -t tempdir ]
<archive/branch> [ <archive/branch> ]
[verse
]
`git-archimport` [-h] [-v] [-o] [-a] [-f] [-T] [-D depth] [-t tempdir]
<archive/branch> [ <archive/branch> ]
DESCRIPTION
-----------
Imports a project from one or more Arch repositories. It will follow branches
and repositories within the namespaces defined by the <archive/branch>
parameters supp
p
lied. If it cannot find the remote branch a merge comes from
parameters supplied. If it cannot find the remote branch a merge comes from
it will just import it as a regular commit. If it can find it, it will mark it
as a merge whenever possible (see discussion below).
...
...
Documentation/git-cat-file.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,7 @@ git-cat-file - Provide content or type information for repository objects
SYNOPSIS
--------
'git-cat-file'
(-t | -s | -e | <type>)
<object>
'git-cat-file'
[-t | -s | -e | <type>]
<object>
DESCRIPTION
-----------
...
...
Documentation/git-checkout-index.txt
浏览文件 @
92e802c6
...
...
@@ -8,8 +8,9 @@ git-checkout-index - Copy files from the index to the working directory
SYNOPSIS
--------
[verse]
'git-checkout-index' [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]
[--stage=<number>] [--] <file>...
[--stage=<number>] [--] <file>...
DESCRIPTION
-----------
...
...
Documentation/git-clone.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,9 @@ git-clone - Clones a repository.
SYNOPSIS
--------
'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>] <repository> [<directory>]
[verse]
'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>]
<repository> [<directory>]
DESCRIPTION
-----------
...
...
Documentation/git-commit-tree.txt
浏览文件 @
92e802c6
...
...
@@ -60,7 +60,8 @@ either `.git/config` file, or using the following environment variables.
(nb "<", ">" and "\n"s are stripped)
In `.git/config` file, the following items are used:
In `.git/config` file, the following items are used for GIT_AUTHOR_NAME and
GIT_AUTHOR_EMAIL:
[user]
name = "Your Name"
...
...
Documentation/git-commit.txt
浏览文件 @
92e802c6
...
...
@@ -7,7 +7,9 @@ git-commit - Record your changes
SYNOPSIS
--------
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>] [-e] [--] <file>...
[verse]
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
[-e] [--] <file>...
DESCRIPTION
-----------
...
...
Documentation/git-cvsexportcommit.txt
浏览文件 @
92e802c6
...
...
@@ -8,8 +8,7 @@ git-cvsexportcommit - Export a commit to a CVS checkout
SYNOPSIS
--------
git-cvsexportcommmit.perl
[ -h ] [ -v ] [ -c ] [ -p ] [PARENTCOMMIT] COMMITID
'git-cvsexportcommmit' [-h] [-v] [-c] [-p] [PARENTCOMMIT] COMMITID
DESCRIPTION
...
...
Documentation/git-cvsimport.txt
浏览文件 @
92e802c6
...
...
@@ -8,10 +8,10 @@ git-cvsimport - Import a CVS repository into git
SYNOPSIS
--------
'git-cvsimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v
]
[ -d <CVSROOT> ] [ -p <options-for-cvsps>
]
[ -C <git_repository> ] [ -i ] [ -P <file> ] [ -k
]
[ -s <subst> ] [ -m ] [ -M regex ] [ <CVS_module>
]
[verse
]
'git-cvsimport' [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] [-s <subst>
]
[-p <options-for-cvsps>] [-C <git_repository>] [-i] [-P <file>
]
[-m] [-M regex] [<CVS_module>
]
DESCRIPTION
...
...
Documentation/git-daemon.txt
浏览文件 @
92e802c6
...
...
@@ -7,8 +7,9 @@ git-daemon - A really simple server for git repositories.
SYNOPSIS
--------
[verse]
'git-daemon' [--verbose] [--syslog] [--inetd | --port=n] [--export-all]
[--timeout=n] [--init-timeout=n] [--strict-paths] [directory...]
[--timeout=n] [--init-timeout=n] [--strict-paths] [directory...]
DESCRIPTION
-----------
...
...
Documentation/git-diff-index.txt
浏览文件 @
92e802c6
...
...
@@ -53,7 +53,7 @@ If '--cached' is specified, it allows you to ask:
contents (the ones I'd write with a "git-write-tree")
For example, let's say that you have worked on your working directory, updated
some files in the index and are ready to commit. You want to see eactly
some files in the index and are ready to commit. You want to see e
x
actly
*what* you are going to commit is without having to write a new tree
object and compare it that way, and to do that, you just do
...
...
@@ -110,7 +110,7 @@ NOTE: As with other commands of this type, "git-diff-index" does not
actually look at the contents of the file at all. So maybe
`kernel/sched.c` hasn't actually changed, and it's just that you
touched it. In either case, it's a note that you need to
"git-upate-index" it to make the index be in sync.
"git-up
d
ate-index" it to make the index be in sync.
NOTE: You can have a mixture of files show up as "has been updated"
and "is still dirty in the working directory" together. You can always
...
...
Documentation/git-diff-tree.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,9 @@ git-diff-tree - Compares the content and mode of blobs found via two tree object
SYNOPSIS
--------
'git-diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] [-t] [-r] [--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
[verse]
'git-diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] [-t] [-r]
[--root] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...]
DESCRIPTION
-----------
...
...
@@ -62,7 +64,7 @@ separated with a single space are given.
-s::
By default, "git-diff-tree --stdin" shows differences,
either in machine-readable form (without '-p') or in patch
form (with '-p'). This output can be supressed. It is
form (with '-p'). This output can be sup
p
ressed. It is
only useful with '-v' flag.
-v::
...
...
Documentation/git-diff.txt
浏览文件 @
92e802c6
...
...
@@ -67,7 +67,7 @@ $ git diff HEAD^ HEAD <3>
<1> instead of using the tip of the current branch, compare with the
tip of "test" branch.
<2> instead of comparing with the tip of "test" branch, compare with
the tip of the curren branch, but limit the comparison to the
the tip of the curren
t
branch, but limit the comparison to the
file "test".
<3> compare the version before the last commit and the last commit.
------------
...
...
Documentation/git-format-patch.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,9 @@ git-format-patch - Prepare patches for e-mail submission.
SYNOPSIS
--------
'git-format-patch' [-n | -k] [-o <dir> | --stdout] [-s] [-c] [--mbox] [--diff-options] <his> [<mine>]
[verse]
'git-format-patch' [-n | -k] [-o <dir> | --stdout] [-s] [-c] [--mbox]
[--diff-options] <his> [<mine>]
DESCRIPTION
-----------
...
...
@@ -96,7 +98,7 @@ git-format-patch -M -B origin::
See Also
--------
gitlink:git-am[1], gitlink:git-send-email
gitlink:git-am[1], gitlink:git-send-email
[1]
Author
...
...
Documentation/git-fsck-objects.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,9 @@ git-fsck-objects - Verifies the connectivity and validity of the objects in the
SYNOPSIS
--------
'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache] [--standalone | --full] [--strict] [<object>*]
[verse]
'git-fsck-objects' [--tags] [--root] [--unreachable] [--cache]
[--standalone | --full] [--strict] [<object>*]
DESCRIPTION
-----------
...
...
Documentation/git-grep.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,7 @@ git-grep - print lines matching a pattern
SYNOPSIS
--------
'git-grep'
<option>... <pattern> <path>...
'git-grep'
[<option>...] <pattern> [<path>...]
DESCRIPTION
-----------
...
...
@@ -27,7 +27,6 @@ OPTIONS
The pattern to look for.
<path>...::
Optional paths to limit the set of files to be searched;
passed to `git-ls-files`.
...
...
Documentation/git-http-fetch.txt
浏览文件 @
92e802c6
...
...
@@ -3,12 +3,12 @@ git-http-fetch(1)
NAME
----
git-http-fetch -
D
ownloads a remote git repository via HTTP
git-http-fetch -
d
ownloads a remote git repository via HTTP
SYNOPSIS
--------
'git-http-fetch' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover]
commit-id url
'git-http-fetch' [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover]
<commit> <url>
DESCRIPTION
-----------
...
...
Documentation/git-init-db.txt
浏览文件 @
92e802c6
...
...
@@ -8,7 +8,7 @@ git-init-db - Creates an empty git repository
SYNOPSIS
--------
'git-init-db' [--template=<template_directory>]
'git-init-db' [--template=<template_directory>]
[--shared]
OPTIONS
...
...
@@ -16,6 +16,9 @@ OPTIONS
--template=<template_directory>::
Provide the directory in from which templates will be used.
--shared::
Specify that the git repository is to be shared amongst several users.
DESCRIPTION
-----------
...
...
@@ -30,7 +33,16 @@ If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY`
environment variable then the sha1 directories are created underneath -
otherwise the default `$GIT_DIR/objects` directory is used.
`git-init-db` won't hurt an existing repository.
A shared repository allows users belonging to the same group to push into that
repository. When specifying `--shared` the config variable "core.sharedRepository"
is set to 'true' so that directories under `$GIT_DIR` are made group writable
(and g+sx, since the git group may be not the primary group of all users).
Running `git-init-db` in an existing repository is safe. It will not overwrite
things that are already there. The primary reason for rerunning `git-init-db`
is to pick up newly added templates.
EXAMPLES
...
...
Documentation/git-ls-files.txt
浏览文件 @
92e802c6
...
...
@@ -74,7 +74,7 @@ OPTIONS
H:: cached
M:: unmerged
R:: removed/deleted
C:: modifed/changed
C:: modif
i
ed/changed
K:: to be killed
? other
...
...
Documentation/git-pack-objects.txt
浏览文件 @
92e802c6
...
...
@@ -46,7 +46,7 @@ base-name::
output of the command.
--stdout::
Write the pack contents (what would have been writt
i
n to
Write the pack contents (what would have been writt
e
n to
.pack file) out to the standard output.
--window and --depth::
...
...
Documentation/git-repo-config.txt
浏览文件 @
92e802c6
...
...
@@ -21,9 +21,9 @@ You can query/set/replace/unset options with this command. The name is
actually the section and the key separated by a dot, and the value will be
escaped.
If you want to set/unset an option which can occ
o
r on multiple lines, you
If you want to set/unset an option which can occ
u
r on multiple lines, you
should provide a POSIX regex for the value. If you want to handle the lines
*not* matching the regex, just prepend a single exlamation mark in front
*not* matching the regex, just prepend a single ex
c
lamation mark in front
(see EXAMPLES).
This command will fail if
...
...
Documentation/git-rev-list.txt
浏览文件 @
92e802c6
...
...
@@ -8,18 +8,19 @@ git-rev-list - Lists commit objects in reverse chronological order
SYNOPSIS
--------
[verse]
'git-rev-list' [ \--max-count=number ]
[ \--max-age=timestamp ]
[ \--min-age=timestamp ]
[ \--sparse ]
[ \--no-merges ]
[ \--all ]
[ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ] |
]
[ \--parents ]
[ \--objects [ \--unpacked ] ]
[ \--pretty | \--header |
]
[ \--bisect ]
<commit>... [ \-- <paths>... ]
[ \--max-age=timestamp ]
[ \--min-age=timestamp ]
[ \--sparse ]
[ \--no-merges ]
[ \--all ]
[ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ]
]
[ \--parents ]
[ \--objects [ \--unpacked ] ]
[ \--pretty | \--header
]
[ \--bisect ]
<commit>... [ \-- <paths>... ]
DESCRIPTION
-----------
...
...
@@ -129,7 +130,7 @@ the marked commit in the list.
+
Commits marked with (^) are not parents of the immediately preceding commit.
These "breaks" represent necessary discontinuities implied by trying to
represent an arb
ti
rary DAG in a linear form.
represent an arb
it
rary DAG in a linear form.
+
`--show-breaks` is only valid if `--merge-order` is also specified.
...
...
Documentation/git-show-branch.txt
浏览文件 @
92e802c6
...
...
@@ -85,7 +85,7 @@ Following these N lines, one-line log for each commit is
displayed, indented N places. If a commit is on the I-th
branch, the I-th indentation character shows a '+' sign;
otherwise it shows a space. Each commit shows a short name that
can be used as an exended SHA1 to name that commit.
can be used as an ex
t
ended SHA1 to name that commit.
The following example shows three branches, "master", "fixes"
and "mhf":
...
...
Documentation/git-svnimport.txt
浏览文件 @
92e802c6
...
...
@@ -11,7 +11,7 @@ SYNOPSIS
--------
'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
[ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]
[ -b branch_subdir ] [ -
t trunk_subdir ] [ -T
tag_subdir ]
[ -b branch_subdir ] [ -
T trunk_subdir ] [ -t
tag_subdir ]
[ -s start_chg ] [ -m ] [ -M regex ]
<SVN_repository_URL> [ <path> ]
...
...
@@ -40,17 +40,17 @@ OPTIONS
-s <start_rev>::
Start importing at this SVN change number. The default is 1.
+
When importing incementally, you might need to edit the .git/svn2git file.
When importing inc
r
ementally, you might need to edit the .git/svn2git file.
-i::
Import-only: don't perform a checkout after importing. This option
ensures the working directory and index remain untouched and will
not create them if they do not exist.
-
t
<trunk_subdir>::
-
T
<trunk_subdir>::
Name the SVN trunk. Default "trunk".
-
T
<tag_subdir>::
-
t
<tag_subdir>::
Name the SVN subdirectory for tags. Default "tags".
-b <branch_subdir>::
...
...
Documentation/git.txt
浏览文件 @
92e802c6
...
...
@@ -422,7 +422,7 @@ gitlink:git-rev-parse[1]::
gitlink:git-send-email[1]::
Send patch e-mails out of "format-patch --mbox" output.
gitlink:git-symbolic-ref
s
[1]::
gitlink:git-symbolic-ref[1]::
Read and modify symbolic refs.
gitlink:git-stripspace[1]::
...
...
Documentation/glossary.txt
浏览文件 @
92e802c6
...
...
@@ -19,7 +19,7 @@ hash::
In git's context, synonym to object name.
object database::
Stores a set of "objects", and an individ
i
al object is identified
Stores a set of "objects", and an individ
u
al object is identified
by its object name. The objects usually live in `$GIT_DIR/objects/`.
blob object::
...
...
Documentation/howto/isolate-bugs-with-bisect.txt
浏览文件 @
92e802c6
...
...
@@ -24,7 +24,7 @@ Then do
git bisect bad master <- mark "master" as the bad state
git bisect good ORIG_HEAD <- mark ORIG_HEAD as good (or
whatever other known-good
thing you booted last
e
)
thing you booted last)
and at this point "git bisect" will churn for a while, and tell you what
the mid-point between those two commits are, and check that state out as
...
...
Documentation/repository-layout.txt
浏览文件 @
92e802c6
...
...
@@ -21,7 +21,7 @@ outside world but sometimes useful for private repository.
. You can be using `objects/info/alternates` mechanism, or
`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
objects from other object stores. A repository with this kind
of incompete object store is not suitable to be published for
of incomp
l
ete object store is not suitable to be published for
use with dumb transports but otherwise is OK as long as
`objects/info/alternates` points at the right object stores
it borrows from.
...
...
@@ -106,7 +106,7 @@ info/refs::
up-to-date if the repository is published for dumb
transports. The `git-receive-pack` command, which is
run on a remote repository when you `git push` into it,
runs `hooks/update` hook to help you achive this.
runs `hooks/update` hook to help you achi
e
ve this.
info/grafts::
This file records fake commit ancestry information, to
...
...
Makefile
浏览文件 @
92e802c6
...
...
@@ -55,7 +55,7 @@ all:
# Define USE_STDEV below if you want git to care about the underlying device
# change being considered an inode change from the update-cache perspective.
GIT_VERSION
=
1.0.
6
GIT_VERSION
=
1.0.
7
# CFLAGS and LDFLAGS are for the users to override from the command line.
...
...
apply.c
浏览文件 @
92e802c6
...
...
@@ -1588,7 +1588,7 @@ static int try_create_file(const char *path, unsigned int mode, const char *buf,
if
(
S_ISLNK
(
mode
))
return
symlink
(
buf
,
path
);
fd
=
open
(
path
,
O_CREAT
|
O_EXCL
|
O_WRONLY
|
O_TRUNC
,
(
mode
&
0100
)
?
0777
:
0666
);
fd
=
open
(
path
,
O_CREAT
|
O_EXCL
|
O_WRONLY
,
(
mode
&
0100
)
?
0777
:
0666
);
if
(
fd
<
0
)
return
-
1
;
while
(
size
)
{
...
...
@@ -1635,7 +1635,8 @@ static void create_one_file(const char *path, unsigned mode, const char *buf, un
}
if
(
errno
!=
EEXIST
)
break
;
}
++
nr
;
}
}
die
(
"unable to write file %s mode %o"
,
path
,
mode
);
}
...
...
config.c
浏览文件 @
92e802c6
...
...
@@ -409,8 +409,7 @@ int git_config_set_multivar(const char* key, const char* value,
const
char
*
value_regex
,
int
multi_replace
)
{
int
i
;
struct
stat
st
;
int
fd
;
int
fd
,
in_fd
;
char
*
config_filename
=
strdup
(
git_path
(
"config"
));
char
*
lock_file
=
strdup
(
git_path
(
"config.lock"
));
const
char
*
last_dot
=
strrchr
(
key
,
'.'
);
...
...
@@ -457,9 +456,17 @@ int git_config_set_multivar(const char* key, const char* value,
/*
* If .git/config does not exist yet, write a minimal version.
*/
if
(
stat
(
config_filename
,
&
st
))
{
in_fd
=
open
(
config_filename
,
O_RDONLY
);
if
(
in_fd
<
0
)
{
free
(
store
.
key
);
if
(
ENOENT
!=
errno
)
{
error
(
"opening %s: %s"
,
config_filename
,
strerror
(
errno
));
close
(
fd
);
unlink
(
lock_file
);
return
3
;
/* same as "invalid config file" */
}
/* if nothing to unset, error out */
if
(
value
==
NULL
)
{
close
(
fd
);
...
...
@@ -471,7 +478,7 @@ int git_config_set_multivar(const char* key, const char* value,
store_write_section
(
fd
,
key
);
store_write_pair
(
fd
,
key
,
value
);
}
else
{
int
in_fd
;
struct
stat
st
;
char
*
contents
;
int
i
,
copy_begin
,
copy_end
,
new_line
=
0
;
...
...
@@ -528,7 +535,7 @@ int git_config_set_multivar(const char* key, const char* value,
return
5
;
}
in_fd
=
open
(
config_filename
,
O_RDONLY
,
0666
);
fstat
(
in_fd
,
&
st
);
contents
=
mmap
(
NULL
,
st
.
st_size
,
PROT_READ
,
MAP_PRIVATE
,
in_fd
,
0
);
close
(
in_fd
);
...
...
date.c
浏览文件 @
92e802c6
...
...
@@ -326,7 +326,7 @@ static int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt
/*
* NOTE! We will give precedence to day-of-month over month or
* year num
e
bers in the 1-12 range. So 05 is always "mday 5",
* year numbers in the 1-12 range. So 05 is always "mday 5",
* unless we already have a mday..
*
* IOW, 01 Apr 05 parses as "April 1st, 2005".
...
...
@@ -640,7 +640,7 @@ unsigned long approxidate(const char *date)
}
if
(
number
>
0
&&
number
<
32
)
tm
.
tm_mday
=
number
;
if
(
tm
.
tm_mon
>
now
.
tm_mon
)
if
(
tm
.
tm_mon
>
now
.
tm_mon
&&
tm
.
tm_year
==
now
.
tm_year
)
tm
.
tm_year
--
;
return
mktime
(
&
tm
);
}
diff-index.c
浏览文件 @
92e802c6
...
...
@@ -116,7 +116,7 @@ static int diff_cache(struct cache_entry **ac, int entries, const char **pathspe
/* We come here with ce pointing at stage 1
* (original tree) and ac[1] pointing at stage
* 3 (unmerged). show-modified with
* report-mising set to false does not say the
* report-mis
s
ing set to false does not say the
* file is deleted but reports true if work
* tree does not have it, in which case we
* fall through to report the unmerged state.
...
...
diff.c
浏览文件 @
92e802c6
...
...
@@ -787,7 +787,7 @@ int diff_setup_done(struct diff_options *options)
* so it is safe for us to do this here. Also
* it does not smudge active_cache or active_nr
* when it fails, so we do not have to worry about
* cleaning it up ou
f
selves either.
* cleaning it up ou
r
selves either.
*/
read_cache
();
}
...
...
entry.c
浏览文件 @
92e802c6
...
...
@@ -60,7 +60,7 @@ static void remove_subtree(const char *path)
static
int
create_file
(
const
char
*
path
,
unsigned
int
mode
)
{
mode
=
(
mode
&
0100
)
?
0777
:
0666
;
return
open
(
path
,
O_WRONLY
|
O_
TRUNC
|
O_
CREAT
|
O_EXCL
,
mode
);
return
open
(
path
,
O_WRONLY
|
O_CREAT
|
O_EXCL
,
mode
);
}
static
int
write_entry
(
struct
cache_entry
*
ce
,
const
char
*
path
,
struct
checkout
*
state
)
...
...
epoch.c
浏览文件 @
92e802c6
...
...
@@ -190,7 +190,7 @@ static void free_mass_counter(struct mass_counter *counter)
* enqueued, enqueuing the commit in a list of pending commits, in latest
* commit date first order.
*
* The algorithm then pr
e
ceeds to visit each commit in the pending queue.
* The algorithm then pr
o
ceeds to visit each commit in the pending queue.
* Upon each visit, the pending mass is added to the mass already seen for that
* commit and then divided into N equal portions, where N is the number of
* parents of the commit being visited. The divided portions are then injected
...
...
fetch-clone.c
浏览文件 @
92e802c6
...
...
@@ -47,7 +47,7 @@ static int finish_pack(const char *pack_tmp_name, const char *me)
if
(
retval
<
0
)
{
if
(
errno
==
EINTR
)
continue
;
error
(
"waitpid failed (%s)"
,
strerror
(
retval
));
error
(
"waitpid failed (%s)"
,
strerror
(
errno
));
goto
error_die
;
}
if
(
WIFSIGNALED
(
status
))
{
...
...
git-commit.sh
浏览文件 @
92e802c6
...
...
@@ -148,7 +148,7 @@ esac
if
[
-f
"
$GIT_DIR
/MERGE_HEAD"
]
;
then
echo
"#"
echo
"# It looks like you
r
may be committing a MERGE."
echo
"# It looks like you may be committing a MERGE."
echo
"# If this is not correct, please remove the file"
echo
"#
$GIT_DIR
/MERGE_HEAD"
echo
"# and try again"
...
...
@@ -165,6 +165,7 @@ then
then
pick_author_script
=
'
/^author /{
s/'
\'
'/'
\'
'\\'
\'\'
'/g
h
s/^author \([^<]*\) <[^>]*> .*$/\1/
s/'
\'
'/'
\'
'\'
\'\'
'/g
...
...
git-compat-util.h
浏览文件 @
92e802c6
...
...
@@ -63,6 +63,8 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
static
inline
void
*
xmalloc
(
size_t
size
)
{
void
*
ret
=
malloc
(
size
);
if
(
!
ret
&&
!
size
)
ret
=
malloc
(
1
);
if
(
!
ret
)
die
(
"Out of memory, malloc failed"
);
return
ret
;
...
...
@@ -71,6 +73,8 @@ static inline void *xmalloc(size_t size)
static
inline
void
*
xrealloc
(
void
*
ptr
,
size_t
size
)
{
void
*
ret
=
realloc
(
ptr
,
size
);
if
(
!
ret
&&
!
size
)
ret
=
realloc
(
ptr
,
1
);
if
(
!
ret
)
die
(
"Out of memory, realloc failed"
);
return
ret
;
...
...
@@ -79,6 +83,8 @@ static inline void *xrealloc(void *ptr, size_t size)
static
inline
void
*
xcalloc
(
size_t
nmemb
,
size_t
size
)
{
void
*
ret
=
calloc
(
nmemb
,
size
);
if
(
!
ret
&&
(
!
nmemb
||
!
size
))
ret
=
calloc
(
1
,
1
);
if
(
!
ret
)
die
(
"Out of memory, calloc failed"
);
return
ret
;
...
...
git-fetch.sh
浏览文件 @
92e802c6
...
...
@@ -188,11 +188,20 @@ esac
reflist
=
$(
get_remote_refs_for_fetch
"
$@
"
)
if
test
"
$tags
"
then
taglist
=
$(
git-ls-remote
--tags
"
$remote
"
|
sed
-e
'
/\^/d
s/^[^ ]* //
s/.*/.&:&/'
)
taglist
=
$(
IFS
=
" "
&&
git-ls-remote
--tags
"
$remote
"
|
while
read
sha1 name
do
case
"
$name
"
in
(
*
^
*
)
continue
;;
esac
if
git-check-ref-format
"
$name
"
then
echo
".
${
name
}
:
${
name
}
"
else
echo
>
&2
"warning: tag
${
name
}
ignored"
fi
done
)
if
test
"$#"
-gt
1
then
# remote URL plus explicit refspecs; we need to merge them.
...
...
git-format-patch.sh
浏览文件 @
92e802c6
...
...
@@ -173,6 +173,7 @@ titleScript='
whosepatchScript
=
'
/^author /{
s/'
\'
'/'
\'
'\\'
\'\'
'/g
s/author \(.*>\) \(.*\)$/au='
\'
'\1'
\'
' ad='
\'
'\2'
\'
'/p
q
}'
...
...
git-merge-one-file.sh
浏览文件 @
92e802c6
...
...
@@ -82,7 +82,7 @@ case "${1:-.}${2:-.}${3:-.}" in
expr
"
$sz0
"
\<
"
$sz1
"
\*
2
>
/dev/null
||
:
>
$orig
;;
*
)
echo
"Auto-merging
$4
.
"
echo
"Auto-merging
$4
"
orig
=
`
git-unpack-file
$1
`
;;
esac
...
...
@@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
fi
if
[
$ret
-ne
0
]
;
then
echo
"ERROR: Merge conflict in
$4
.
"
echo
"ERROR: Merge conflict in
$4
"
exit
1
fi
exec
git-update-index
--
"
$4
"
...
...
git-reset.sh
浏览文件 @
92e802c6
...
...
@@ -3,7 +3,7 @@
USAGE
=
'[--mixed | --soft | --hard] [<commit-ish>]'
.
git-sh-setup
tmp
=
/var/tmp
/reset.
$$
tmp
=
${
GIT_DIR
}
/reset.
$$
trap
'rm -f $tmp-*'
0 1 2 3 15
reset_type
=
--mixed
...
...
git-svnimport.perl
浏览文件 @
92e802c6
...
...
@@ -96,8 +96,10 @@ sub new {
sub conn {
my $self = shift;
my $repo = $self->{'
fullrep
'};
my $s = SVN::Ra->new($repo);
my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider,
SVN::Client::get_ssl_server_trust_file_provider,
SVN::Client::get_username_provider]);
my $s = SVN::Ra->new(url => $repo, auth => $auth);
die "SVN connection to $repo: $!\n" unless defined $s;
$self->{'
svn
'} = $s;
$self->{'
repo
'} = $repo;
...
...
git.c
浏览文件 @
92e802c6
...
...
@@ -244,6 +244,11 @@ int main(int argc, char **argv, char **envp)
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
char
*
arg
=
argv
[
i
];
if
(
!
strcmp
(
arg
,
"help"
))
{
show_help
=
1
;
continue
;
}
if
(
strncmp
(
arg
,
"--"
,
2
))
break
;
...
...
ident.c
浏览文件 @
92e802c6
...
...
@@ -140,7 +140,7 @@ static int copy(char *buf, int size, int offset, const char *src)
/*
* Copy the rest to the buffer, but avoid the special
* characters '\n' '<' and '>' that act as delim
e
ters on
* characters '\n' '<' and '>' that act as delim
i
ters on
* a identification line
*/
for
(
i
=
0
;
i
<
len
;
i
++
)
{
...
...
ls-files.c
浏览文件 @
92e802c6
...
...
@@ -169,7 +169,7 @@ static int excluded_1(const char *pathname,
}
else
{
/* match with FNM_PATHNAME:
* exclude has base (baselen long) i
n
plicitly
* exclude has base (baselen long) i
m
plicitly
* in front of it.
*/
int
baselen
=
x
->
baselen
;
...
...
pack-objects.c
浏览文件 @
92e802c6
...
...
@@ -119,7 +119,7 @@ static unsigned long write_one(struct sha1file *f,
return
offset
;
e
->
offset
=
offset
;
offset
+=
write_object
(
f
,
e
);
/* if we are del
i
tified, write out its base object. */
/* if we are deltified, write out its base object. */
if
(
e
->
delta
)
offset
=
write_one
(
f
,
e
->
delta
,
offset
);
return
offset
;
...
...
repo-config.c
浏览文件 @
92e802c6
...
...
@@ -6,7 +6,7 @@ static const char git_config_set_usage[] =
static
char
*
key
=
NULL
;
static
char
*
value
=
NULL
;
static
regex_t
*
regex
=
NULL
;
static
regex_t
*
regex
p
=
NULL
;
static
int
do_all
=
0
;
static
int
do_not_match
=
0
;
static
int
seen
=
0
;
...
...
@@ -14,9 +14,9 @@ static int seen = 0;
static
int
show_config
(
const
char
*
key_
,
const
char
*
value_
)
{
if
(
!
strcmp
(
key_
,
key
)
&&
(
regex
==
NULL
||
(
regex
p
==
NULL
||
(
do_not_match
^
!
regexec
(
regex
,
value_
,
0
,
NULL
,
0
))))
{
!
regexec
(
regex
p
,
value_
,
0
,
NULL
,
0
))))
{
if
(
do_all
)
{
printf
(
"%s
\n
"
,
value_
);
return
0
;
...
...
@@ -46,8 +46,8 @@ static int get_value(const char* key_, const char* regex_)
regex_
++
;
}
regex
=
(
regex_t
*
)
malloc
(
sizeof
(
regex_t
));
if
(
regcomp
(
regex
,
regex_
,
REG_EXTENDED
))
{
regex
p
=
(
regex_t
*
)
malloc
(
sizeof
(
regex_t
));
if
(
regcomp
(
regex
p
,
regex_
,
REG_EXTENDED
))
{
fprintf
(
stderr
,
"Invalid pattern: %s
\n
"
,
regex_
);
return
-
1
;
}
...
...
@@ -59,9 +59,9 @@ static int get_value(const char* key_, const char* regex_)
free
(
value
);
}
free
(
key
);
if
(
regex
)
{
regfree
(
regex
);
free
(
regex
);
if
(
regex
p
)
{
regfree
(
regex
p
);
free
(
regex
p
);
}
if
(
do_all
)
...
...
t/t3300-funny-names.sh
浏览文件 @
92e802c6
...
...
@@ -9,9 +9,6 @@ This test tries pathnames with funny characters in the working
tree, index, and tree objects.
'
# since FAT/NTFS does not allow tabs in filenames, skip this test
test
"
$(
uname
-o
2>/dev/null
)
"
=
Cygwin
&&
exit
0
.
./test-lib.sh
p0
=
'no-funny'
...
...
@@ -27,6 +24,12 @@ EOF
cat
>
"
$p1
"
"
$p0
"
echo
'Foo Bar Baz'
>
"
$p2
"
test
-f
"
$p1
"
&&
cmp
"
$p0
"
"
$p1
"
||
{
# since FAT/NTFS does not allow tabs in filenames, skip this test
say
'Your filesystem does not allow tabs in filenames, test skipped.'
test_done
}
echo
'just space
no-funny'
>
expected
test_expect_success
'git-ls-files no-funny'
\
...
...
t/t4000-diff-format.sh
浏览文件 @
92e802c6
...
...
@@ -26,6 +26,14 @@ rm -f path1
test_expect_success
\
'git-diff-files -p after editing work tree.'
\
'git-diff-files -p >current'
# that's as far as it comes
if
[
"
$(
git repo-config
--get
core.filemode
)
"
=
false
]
then
say
'filemode disabled on the filesystem'
test_done
fi
cat
>
expected
<<
\
EOF
diff --git a/path0 b/path0
old mode 100644
...
...
t/t4006-diff-mode.sh
浏览文件 @
92e802c6
...
...
@@ -15,11 +15,21 @@ test_expect_success \
tree=`git-write-tree` &&
echo $tree'
test_expect_success
\
'chmod'
\
'chmod +x rezrov &&
git-update-index rezrov &&
git-diff-index $tree >current'
if
[
"
$(
git repo-config
--get
core.filemode
)
"
=
false
]
then
say
'filemode disabled on the filesystem, using update-index --chmod=+x'
test_expect_success
\
'git-update-index --chmod=+x'
\
'git-update-index rezrov &&
git-update-index --chmod=+x rezrov &&
git-diff-index $tree >current'
else
test_expect_success
\
'chmod'
\
'chmod +x rezrov &&
git-update-index rezrov &&
git-diff-index $tree >current'
fi
_x40
=
'[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40
=
"
$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40
"
...
...
t/t4102-apply-rename.sh
浏览文件 @
92e802c6
...
...
@@ -31,7 +31,12 @@ test_expect_success setup \
test_expect_success apply
\
'git-apply --index --stat --summary --apply test-patch'
test_expect_success validate
\
'test -f bar && ls -l bar | grep "^-..x......"'
if
[
"
$(
git repo-config
--get
core.filemode
)
"
=
false
]
then
say
'filemode disabled on the filesystem'
else
test_expect_success validate
\
'test -f bar && ls -l bar | grep "^-..x......"'
fi
test_done
t/t6001-rev-list-merge-order.sh
浏览文件 @
92e802c6
...
...
@@ -8,13 +8,6 @@ test_description='Tests git-rev-list --merge-order functionality'
.
./test-lib.sh
.
../t6000lib.sh
# t6xxx specific functions
if
git-rev-list
--merge-order
2>&1 |
grep
'OpenSSL not linked'
>
/dev/null
then
test_expect_success
'skipping merge-order test'
:
test_done
exit
fi
# test-case specific test function
check_adjacency
()
{
...
...
@@ -114,6 +107,13 @@ test_output_expect_success 'rev-list has correct number of entries' 'git-rev-lis
19
EOF
if
git-rev-list
--merge-order
HEAD 2>&1 |
grep
'OpenSSL not linked'
>
/dev/null
then
test_expect_success
'skipping merge-order test'
:
test_done
exit
fi
normal_adjacency_count
=
$(
git-rev-list HEAD | check_adjacency |
grep
-c
"
\^
"
|
tr
-d
' '
)
merge_order_adjacency_count
=
$(
git-rev-list
--merge-order
HEAD | check_adjacency |
grep
-c
"
\^
"
|
tr
-d
' '
)
test_expect_success
'--merge-order produces as many or fewer discontinuities'
'[ $merge_order_adjacency_count -le $normal_adjacency_count ]'
...
...
t/test-lib.sh
浏览文件 @
92e802c6
...
...
@@ -195,7 +195,7 @@ test -d ../templates/blt || {
test
=
trash
rm
-fr
"
$test
"
mkdir
"
$test
"
cd
"
$test
"
cd
"
$test
"
||
error
"Cannot setup test environment"
"
$GIT_EXEC_PATH
/git"
init-db
--template
=
../../templates/blt/ 2>/dev/null
||
error
"cannot run git init-db -- have you built things yet?"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录