зеркало из https://github.com/microsoft/git.git
Merge branch 'vb/sendemail' into next
* vb/sendemail: Cleanup git-send-email.perl:extract_valid_email read-tree --reset: update working tree file for conflicted paths. Documentation: Spelling fixes Builtin git-rev-parse. fetch: do not report "same" unless -verbose.
This commit is contained in:
Коммит
f63237a18e
|
@ -2,7 +2,7 @@ CONFIGURATION FILE
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
The git configuration file contains a number of variables that affect
|
The git configuration file contains a number of variables that affect
|
||||||
the git commands behaviour. They can be used by both the git plumbing
|
the git commands behavior. They can be used by both the git plumbing
|
||||||
and the porcelains. The variables are divided to sections, where
|
and the porcelains. The variables are divided to sections, where
|
||||||
in the fully qualified variable name the variable itself is the last
|
in the fully qualified variable name the variable itself is the last
|
||||||
dot-separated segment and the section name is everything before the last
|
dot-separated segment and the section name is everything before the last
|
||||||
|
@ -53,7 +53,7 @@ core.gitProxy::
|
||||||
may be set multiple times and is matched in the given order;
|
may be set multiple times and is matched in the given order;
|
||||||
the first match wins.
|
the first match wins.
|
||||||
|
|
||||||
Can be overriden by the 'GIT_PROXY_COMMAND' environment variable
|
Can be overridden by the 'GIT_PROXY_COMMAND' environment variable
|
||||||
(which always applies universally, without the special "for"
|
(which always applies universally, without the special "for"
|
||||||
handling).
|
handling).
|
||||||
|
|
||||||
|
@ -123,12 +123,12 @@ http.sslCert::
|
||||||
|
|
||||||
http.sslKey::
|
http.sslKey::
|
||||||
File containing the SSL private key when fetching or pushing
|
File containing the SSL private key when fetching or pushing
|
||||||
over HTTPS. Can be overriden by the 'GIT_SSL_KEY' environment
|
over HTTPS. Can be overridden by the 'GIT_SSL_KEY' environment
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
http.sslCAInfo::
|
http.sslCAInfo::
|
||||||
File containing the certificates to verify the peer with when
|
File containing the certificates to verify the peer with when
|
||||||
fetching or pushing over HTTPS. Can be overriden by the
|
fetching or pushing over HTTPS. Can be overridden by the
|
||||||
'GIT_SSL_CAINFO' environment variable.
|
'GIT_SSL_CAINFO' environment variable.
|
||||||
|
|
||||||
http.sslCAPath::
|
http.sslCAPath::
|
||||||
|
@ -137,13 +137,13 @@ http.sslCAPath::
|
||||||
by the 'GIT_SSL_CAPATH' environment variable.
|
by the 'GIT_SSL_CAPATH' environment variable.
|
||||||
|
|
||||||
http.maxRequests::
|
http.maxRequests::
|
||||||
How many HTTP requests to launch in parallel. Can be overriden
|
How many HTTP requests to launch in parallel. Can be overridden
|
||||||
by the 'GIT_HTTP_MAX_REQUESTS' environment variable. Default is 5.
|
by the 'GIT_HTTP_MAX_REQUESTS' environment variable. Default is 5.
|
||||||
|
|
||||||
http.lowSpeedLimit, http.lowSpeedTime::
|
http.lowSpeedLimit, http.lowSpeedTime::
|
||||||
If the HTTP transfer speed is less than 'http.lowSpeedLimit'
|
If the HTTP transfer speed is less than 'http.lowSpeedLimit'
|
||||||
for longer than 'http.lowSpeedTime' seconds, the transfer is aborted.
|
for longer than 'http.lowSpeedTime' seconds, the transfer is aborted.
|
||||||
Can be overriden by the 'GIT_HTTP_LOW_SPEED_LIMIT' and
|
Can be overridden by the 'GIT_HTTP_LOW_SPEED_LIMIT' and
|
||||||
'GIT_HTTP_LOW_SPEED_TIME' environment variables.
|
'GIT_HTTP_LOW_SPEED_TIME' environment variables.
|
||||||
|
|
||||||
i18n.commitEncoding::
|
i18n.commitEncoding::
|
||||||
|
@ -174,12 +174,12 @@ showbranch.default::
|
||||||
|
|
||||||
user.email::
|
user.email::
|
||||||
Your email address to be recorded in any newly created commits.
|
Your email address to be recorded in any newly created commits.
|
||||||
Can be overriden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL'
|
Can be overridden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL'
|
||||||
environment variables. See gitlink:git-commit-tree[1].
|
environment variables. See gitlink:git-commit-tree[1].
|
||||||
|
|
||||||
user.name::
|
user.name::
|
||||||
Your full name to be recorded in any newly created commits.
|
Your full name to be recorded in any newly created commits.
|
||||||
Can be overriden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
|
Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
|
||||||
environment variables. See gitlink:git-commit-tree[1].
|
environment variables. See gitlink:git-commit-tree[1].
|
||||||
|
|
||||||
whatchanged.difftree::
|
whatchanged.difftree::
|
||||||
|
|
|
@ -184,7 +184,7 @@ $ git-cat-file -t 557db03de997c86a4a028e1ebd3a1ceb225be238
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
where the `-t` tells `git-cat-file` to tell you what the "type" of the
|
where the `-t` tells `git-cat-file` to tell you what the "type" of the
|
||||||
object is. git will tell you that you have a "blob" object (ie just a
|
object is. git will tell you that you have a "blob" object (i.e., just a
|
||||||
regular file), and you can see the contents with
|
regular file), and you can see the contents with
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
|
@ -619,7 +619,7 @@ $ git tag -s <tagname>
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
which will sign the current `HEAD` (but you can also give it another
|
which will sign the current `HEAD` (but you can also give it another
|
||||||
argument that specifies the thing to tag, ie you could have tagged the
|
argument that specifies the thing to tag, i.e., you could have tagged the
|
||||||
current `mybranch` point by using `git tag <tagname> mybranch`).
|
current `mybranch` point by using `git tag <tagname> mybranch`).
|
||||||
|
|
||||||
You normally only do signed tags for major releases or things
|
You normally only do signed tags for major releases or things
|
||||||
|
@ -1097,7 +1097,7 @@ commit object by downloading from `repo.git/objects/xx/xxx\...`
|
||||||
using the object name of that commit object. Then it reads the
|
using the object name of that commit object. Then it reads the
|
||||||
commit object to find out its parent commits and the associate
|
commit object to find out its parent commits and the associate
|
||||||
tree object; it repeats this process until it gets all the
|
tree object; it repeats this process until it gets all the
|
||||||
necessary objects. Because of this behaviour, they are
|
necessary objects. Because of this behavior, they are
|
||||||
sometimes also called 'commit walkers'.
|
sometimes also called 'commit walkers'.
|
||||||
+
|
+
|
||||||
The 'commit walkers' are sometimes also called 'dumb
|
The 'commit walkers' are sometimes also called 'dumb
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
git for CVS users
|
git for CVS users
|
||||||
=================
|
=================
|
||||||
|
|
||||||
So you're a CVS user. That's ok, it's a treatable condition. The job of
|
So you're a CVS user. That's OK, it's a treatable condition. The job of
|
||||||
this document is to put you on the road to recovery, by helping you
|
this document is to put you on the road to recovery, by helping you
|
||||||
convert an existing cvs repository to git, and by showing you how to use a
|
convert an existing cvs repository to git, and by showing you how to use a
|
||||||
git repository in a cvs-like fashion.
|
git repository in a cvs-like fashion.
|
||||||
|
@ -159,7 +159,7 @@ other than `master`.
|
||||||
|
|
||||||
[NOTE]
|
[NOTE]
|
||||||
============
|
============
|
||||||
Because of this behaviour, if the shared repository and the developer's
|
Because of this behavior, if the shared repository and the developer's
|
||||||
repository both have branches named `origin`, then a push like the above
|
repository both have branches named `origin`, then a push like the above
|
||||||
attempts to update the `origin` branch in the shared repository from the
|
attempts to update the `origin` branch in the shared repository from the
|
||||||
developer's `origin` branch. The results may be unexpected, so it's
|
developer's `origin` branch. The results may be unexpected, so it's
|
||||||
|
|
|
@ -113,7 +113,7 @@ OPTIONS
|
||||||
When `git-apply` is used for statistics and not applying a
|
When `git-apply` is used for statistics and not applying a
|
||||||
patch, it defaults to `nowarn`.
|
patch, it defaults to `nowarn`.
|
||||||
You can use different `<option>` to control this
|
You can use different `<option>` to control this
|
||||||
behaviour:
|
behavior:
|
||||||
+
|
+
|
||||||
* `nowarn` turns off the trailing whitespace warning.
|
* `nowarn` turns off the trailing whitespace warning.
|
||||||
* `warn` outputs warnings for a few such errors, but applies the
|
* `warn` outputs warnings for a few such errors, but applies the
|
||||||
|
|
|
@ -16,7 +16,7 @@ which introduced the line. Start annotation from the given revision.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
-c, --compability::
|
-c, --compatibility::
|
||||||
Use the same output mode as git-annotate (Default: off).
|
Use the same output mode as git-annotate (Default: off).
|
||||||
|
|
||||||
-l, --long::
|
-l, --long::
|
||||||
|
|
|
@ -98,7 +98,7 @@ but can be used to amend a merge commit.
|
||||||
Instead of committing only the files specified on the
|
Instead of committing only the files specified on the
|
||||||
command line, update them in the index file and then
|
command line, update them in the index file and then
|
||||||
commit the whole index. This is the traditional
|
commit the whole index. This is the traditional
|
||||||
behaviour.
|
behavior.
|
||||||
|
|
||||||
-o|--only::
|
-o|--only::
|
||||||
Commit only the files specified on the command line.
|
Commit only the files specified on the command line.
|
||||||
|
|
|
@ -94,7 +94,7 @@ To get a checkout with the Eclipse CVS client:
|
||||||
4. Pick 'HEAD' when it asks what branch/tag to check out. Untick the
|
4. Pick 'HEAD' when it asks what branch/tag to check out. Untick the
|
||||||
"launch commit wizard" to avoid committing the .project file.
|
"launch commit wizard" to avoid committing the .project file.
|
||||||
|
|
||||||
Protocol notes: If you are using anonymous acces via pserver, just select that.
|
Protocol notes: If you are using anonymous access via pserver, just select that.
|
||||||
Those using SSH access should choose the 'ext' protocol, and configure 'ext'
|
Those using SSH access should choose the 'ext' protocol, and configure 'ext'
|
||||||
access on the Preferences->Team->CVS->ExtConnection pane. Set CVS_SERVER to
|
access on the Preferences->Team->CVS->ExtConnection pane. Set CVS_SERVER to
|
||||||
'git-cvsserver'. Not that password support is not good when using 'ext',
|
'git-cvsserver'. Not that password support is not good when using 'ext',
|
||||||
|
|
|
@ -20,7 +20,7 @@ aka 9418. It waits for a connection, and will just execute "git-upload-pack"
|
||||||
when it gets one.
|
when it gets one.
|
||||||
|
|
||||||
It's careful in that there's a magic request-line that gives the command and
|
It's careful in that there's a magic request-line that gives the command and
|
||||||
what directory to upload, and it verifies that the directory is ok.
|
what directory to upload, and it verifies that the directory is OK.
|
||||||
|
|
||||||
It verifies that the directory has the magic file "git-daemon-export-ok", and
|
It verifies that the directory has the magic file "git-daemon-export-ok", and
|
||||||
it will refuse to export any git directory that hasn't explicitly been marked
|
it will refuse to export any git directory that hasn't explicitly been marked
|
||||||
|
@ -28,7 +28,7 @@ for export this way (unless the '--export-all' parameter is specified). If you
|
||||||
pass some directory paths as 'git-daemon' arguments, you can further restrict
|
pass some directory paths as 'git-daemon' arguments, you can further restrict
|
||||||
the offers to a whitelist comprising of those.
|
the offers to a whitelist comprising of those.
|
||||||
|
|
||||||
This is ideally suited for read-only updates, ie pulling from git repositories.
|
This is ideally suited for read-only updates, i.e., pulling from git repositories.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -101,7 +101,7 @@ have not actually done a "git-update-index" on it yet - there is no
|
||||||
torvalds@ppc970:~/v2.6/linux> git-diff-index HEAD
|
torvalds@ppc970:~/v2.6/linux> git-diff-index HEAD
|
||||||
*100644->100664 blob 7476bb......->000000...... kernel/sched.c
|
*100644->100664 blob 7476bb......->000000...... kernel/sched.c
|
||||||
|
|
||||||
ie it shows that the tree has changed, and that `kernel/sched.c` has is
|
i.e., it shows that the tree has changed, and that `kernel/sched.c` has is
|
||||||
not up-to-date and may contain new stuff. The all-zero sha1 means that to
|
not up-to-date and may contain new stuff. The all-zero sha1 means that to
|
||||||
get the real diff, you need to look at the object in the working directory
|
get the real diff, you need to look at the object in the working directory
|
||||||
directly rather than do an object-to-object diff.
|
directly rather than do an object-to-object diff.
|
||||||
|
|
|
@ -32,7 +32,7 @@ include::diff-options.txt[]
|
||||||
<path>...::
|
<path>...::
|
||||||
If provided, the results are limited to a subset of files
|
If provided, the results are limited to a subset of files
|
||||||
matching one of these prefix strings.
|
matching one of these prefix strings.
|
||||||
ie file matches `/^<pattern1>|<pattern2>|.../`
|
i.e., file matches `/^<pattern1>|<pattern2>|.../`
|
||||||
Note that this parameter does not provide any wildcard or regexp
|
Note that this parameter does not provide any wildcard or regexp
|
||||||
features.
|
features.
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ include::diff-options.txt[]
|
||||||
+
|
+
|
||||||
When a single commit is given on one line of such input, it compares
|
When a single commit is given on one line of such input, it compares
|
||||||
the commit with its parents. The following flags further affects its
|
the commit with its parents. The following flags further affects its
|
||||||
behaviour. This does not apply to the case where two <tree-ish>
|
behavior. This does not apply to the case where two <tree-ish>
|
||||||
separated with a single space are given.
|
separated with a single space are given.
|
||||||
|
|
||||||
-m::
|
-m::
|
||||||
|
|
|
@ -85,7 +85,7 @@ $ git diff arch/i386 include/asm-i386 <3>
|
||||||
nor deletion.
|
nor deletion.
|
||||||
<2> show only names and the nature of change, but not actual
|
<2> show only names and the nature of change, but not actual
|
||||||
diff output. --name-status disables usual patch generation
|
diff output. --name-status disables usual patch generation
|
||||||
which in turn also disables recursive behaviour, so without -r
|
which in turn also disables recursive behavior, so without -r
|
||||||
you would only see the directory name if there is a change in a
|
you would only see the directory name if there is a change in a
|
||||||
file in a subdirectory.
|
file in a subdirectory.
|
||||||
<3> limit diff output to named subtrees.
|
<3> limit diff output to named subtrees.
|
||||||
|
|
|
@ -71,7 +71,7 @@ sorted properly etc), but on the whole if "git-fsck-objects" is happy, you
|
||||||
do have a valid tree.
|
do have a valid tree.
|
||||||
|
|
||||||
Any corrupt objects you will have to find in backups or other archives
|
Any corrupt objects you will have to find in backups or other archives
|
||||||
(ie you can just remove them and do an "rsync" with some other site in
|
(i.e., you can just remove them and do an "rsync" with some other site in
|
||||||
the hopes that somebody else has the object you have corrupted).
|
the hopes that somebody else has the object you have corrupted).
|
||||||
|
|
||||||
Of course, "valid tree" doesn't mean that it wasn't generated by some
|
Of course, "valid tree" doesn't mean that it wasn't generated by some
|
||||||
|
|
|
@ -30,7 +30,7 @@ OPTIONS
|
||||||
-------
|
-------
|
||||||
--cached::
|
--cached::
|
||||||
Instead of searching in the working tree files, check
|
Instead of searching in the working tree files, check
|
||||||
the blobs registerd in the index file.
|
the blobs registered in the index file.
|
||||||
|
|
||||||
-a | --text::
|
-a | --text::
|
||||||
Process binary files as if they were text.
|
Process binary files as if they were text.
|
||||||
|
@ -65,7 +65,7 @@ OPTIONS
|
||||||
-[ABC] <context>::
|
-[ABC] <context>::
|
||||||
Show `context` trailing (`A` -- after), or leading (`B`
|
Show `context` trailing (`A` -- after), or leading (`B`
|
||||||
-- before), or both (`C` -- context) lines, and place a
|
-- before), or both (`C` -- context) lines, and place a
|
||||||
line containing `--` between continguous groups of
|
line containing `--` between contiguous groups of
|
||||||
matches.
|
matches.
|
||||||
|
|
||||||
-f <file>::
|
-f <file>::
|
||||||
|
|
|
@ -69,7 +69,7 @@ or
|
||||||
fatal: merge program failed
|
fatal: merge program failed
|
||||||
|
|
||||||
where the latter example shows how "git-merge-index" will stop trying to
|
where the latter example shows how "git-merge-index" will stop trying to
|
||||||
merge once anything has returned an error (ie "cat" returned an error
|
merge once anything has returned an error (i.e., "cat" returned an error
|
||||||
for the AA file, because it didn't exist in the original, and thus
|
for the AA file, because it didn't exist in the original, and thus
|
||||||
"git-merge-index" didn't even try to merge the MM thing).
|
"git-merge-index" didn't even try to merge the MM thing).
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with
|
A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with
|
||||||
whitespace and line numbers ignored. As such, it's "reasonably stable", but at
|
whitespace and line numbers ignored. As such, it's "reasonably stable", but at
|
||||||
the same time also reasonably unique, ie two patches that have the same "patch
|
the same time also reasonably unique, i.e., two patches that have the same "patch
|
||||||
ID" are almost guaranteed to be the same thing.
|
ID" are almost guaranteed to be the same thing.
|
||||||
|
|
||||||
IOW, you can use this thing to look for likely duplicate commits.
|
IOW, you can use this thing to look for likely duplicate commits.
|
||||||
|
|
|
@ -214,7 +214,7 @@ The `git-write-tree` command refuses to write a nonsensical tree, and it
|
||||||
will complain about unmerged entries if it sees a single entry that is not
|
will complain about unmerged entries if it sees a single entry that is not
|
||||||
stage 0.
|
stage 0.
|
||||||
|
|
||||||
Ok, this all sounds like a collection of totally nonsensical rules,
|
OK, this all sounds like a collection of totally nonsensical rules,
|
||||||
but it's actually exactly what you want in order to do a fast
|
but it's actually exactly what you want in order to do a fast
|
||||||
merge. The different stages represent the "result tree" (stage 0, aka
|
merge. The different stages represent the "result tree" (stage 0, aka
|
||||||
"merged"), the original tree (stage 1, aka "orig"), and the two trees
|
"merged"), the original tree (stage 1, aka "orig"), and the two trees
|
||||||
|
@ -235,7 +235,7 @@ populated. Here is an outline of how the algorithm works:
|
||||||
|
|
||||||
- the index file saves and restores with all this information, so you
|
- the index file saves and restores with all this information, so you
|
||||||
can merge things incrementally, but as long as it has entries in
|
can merge things incrementally, but as long as it has entries in
|
||||||
stages 1/2/3 (ie "unmerged entries") you can't write the result. So
|
stages 1/2/3 (i.e., "unmerged entries") you can't write the result. So
|
||||||
now the merge algorithm ends up being really simple:
|
now the merge algorithm ends up being really simple:
|
||||||
|
|
||||||
* you walk the index in order, and ignore all entries of stage 0,
|
* you walk the index in order, and ignore all entries of stage 0,
|
||||||
|
|
|
@ -49,7 +49,7 @@ OPTIONS
|
||||||
-------
|
-------
|
||||||
|
|
||||||
--replace-all::
|
--replace-all::
|
||||||
Default behaviour is to replace at most one line. This replaces
|
Default behavior is to replace at most one line. This replaces
|
||||||
all lines matching the key (and optionally the value_regex).
|
all lines matching the key (and optionally the value_regex).
|
||||||
|
|
||||||
--get::
|
--get::
|
||||||
|
|
|
@ -24,7 +24,7 @@ gitlink:git-revert[1] is your friend.
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
--mixed::
|
--mixed::
|
||||||
Resets the index but not the working tree (ie, the changed files
|
Resets the index but not the working tree (i.e., the changed files
|
||||||
are preserved but not marked for commit) and reports what has not
|
are preserved but not marked for commit) and reports what has not
|
||||||
been updated. This is the default action.
|
been updated. This is the default action.
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ SYNOPSIS
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Many git Porcelainish commands take mixture of flags
|
Many git porcelainish commands take mixture of flags
|
||||||
(i.e. parameters that begin with a dash '-') and parameters
|
(i.e. parameters that begin with a dash '-') and parameters
|
||||||
meant for underlying `git-rev-list` command they use internally
|
meant for underlying `git-rev-list` command they use internally
|
||||||
and flags and parameters for other commands they use as the
|
and flags and parameters for other commands they use as the
|
||||||
|
@ -91,7 +91,7 @@ OPTIONS
|
||||||
|
|
||||||
--short, --short=number::
|
--short, --short=number::
|
||||||
Instead of outputting the full SHA1 values of object names try to
|
Instead of outputting the full SHA1 values of object names try to
|
||||||
abbriviate them to a shorter unique name. When no length is specified
|
abbreviate them to a shorter unique name. When no length is specified
|
||||||
7 is used. The minimum length is 4.
|
7 is used. The minimum length is 4.
|
||||||
|
|
||||||
--since=datestring, --after=datestring::
|
--since=datestring, --after=datestring::
|
||||||
|
|
|
@ -52,7 +52,7 @@ The options available are:
|
||||||
is not set, this will be prompted for.
|
is not set, this will be prompted for.
|
||||||
|
|
||||||
--no-signed-off-by-cc::
|
--no-signed-off-by-cc::
|
||||||
Do not add emails foudn in Signed-off-by: lines to the cc list.
|
Do not add emails found in Signed-off-by: lines to the cc list.
|
||||||
|
|
||||||
--quiet::
|
--quiet::
|
||||||
Make git-send-email less verbose. One line per email should be
|
Make git-send-email less verbose. One line per email should be
|
||||||
|
|
|
@ -53,7 +53,7 @@ Specifying the Refs
|
||||||
There are three ways to specify which refs to update on the
|
There are three ways to specify which refs to update on the
|
||||||
remote end.
|
remote end.
|
||||||
|
|
||||||
With '--all' flag, all refs that exist locally are transfered to
|
With '--all' flag, all refs that exist locally are transferred to
|
||||||
the remote side. You cannot specify any '<ref>' if you use
|
the remote side. You cannot specify any '<ref>' if you use
|
||||||
this flag.
|
this flag.
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Sets up the normal git environment variables and a few helper functions
|
Sets up the normal git environment variables and a few helper functions
|
||||||
(currently just "die()"), and returns ok if it all looks like a git archive.
|
(currently just "die()"), and returns OK if it all looks like a git archive.
|
||||||
So, to make the rest of the git scripts more careful and readable,
|
So, to make the rest of the git scripts more careful and readable,
|
||||||
use it as follows:
|
use it as follows:
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ This document presents a brief summary of each tool and the corresponding
|
||||||
link.
|
link.
|
||||||
|
|
||||||
|
|
||||||
Alternative/Augmentative Procelains
|
Alternative/Augmentative Porcelains
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- *Cogito* (http://www.kernel.org/pub/software/scm/cogito/)
|
- *Cogito* (http://www.kernel.org/pub/software/scm/cogito/)
|
||||||
|
|
|
@ -40,7 +40,7 @@ OPTIONS
|
||||||
--remove::
|
--remove::
|
||||||
If a specified file is in the index but is missing then it's
|
If a specified file is in the index but is missing then it's
|
||||||
removed.
|
removed.
|
||||||
Default behaviour is to ignore removed file.
|
Default behavior is to ignore removed file.
|
||||||
|
|
||||||
--refresh::
|
--refresh::
|
||||||
Looks at the current index and checks to see if merges or
|
Looks at the current index and checks to see if merges or
|
||||||
|
|
|
@ -100,7 +100,7 @@ update
|
||||||
This hook is invoked by `git-receive-pack` on the remote repository,
|
This hook is invoked by `git-receive-pack` on the remote repository,
|
||||||
which is happens when a `git push` is done on a local repository.
|
which is happens when a `git push` is done on a local repository.
|
||||||
Just before updating the ref on the remote repository, the update hook
|
Just before updating the ref on the remote repository, the update hook
|
||||||
is invoked. It's exit status determins the success or failure of
|
is invoked. It's exit status determines the success or failure of
|
||||||
the ref update.
|
the ref update.
|
||||||
|
|
||||||
The hook executes once for each ref to be updated, and takes
|
The hook executes once for each ref to be updated, and takes
|
||||||
|
@ -151,7 +151,7 @@ so it is a poor place to do log old..new.
|
||||||
|
|
||||||
The default post-update hook, when enabled, runs
|
The default post-update hook, when enabled, runs
|
||||||
`git-update-server-info` to keep the information used by dumb
|
`git-update-server-info` to keep the information used by dumb
|
||||||
transports (eg, http) up-to-date. If you are publishing
|
transports (e.g., http) up-to-date. If you are publishing
|
||||||
a git repository that is accessible via http, you should
|
a git repository that is accessible via http, you should
|
||||||
probably enable this hook.
|
probably enable this hook.
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ And of course there is the "Other Shoe" Factor too.
|
||||||
- we actively try to generate deltas from a larger object to a
|
- we actively try to generate deltas from a larger object to a
|
||||||
smaller one
|
smaller one
|
||||||
- this means that the top-of-tree very seldom has deltas
|
- this means that the top-of-tree very seldom has deltas
|
||||||
(ie deltas in _practice_ are "backwards deltas")
|
(i.e. deltas in _practice_ are "backwards deltas")
|
||||||
|
|
||||||
Again, we should reread that whole paragraph. Not just because
|
Again, we should reread that whole paragraph. Not just because
|
||||||
Linus has slipped Linus's Law in there on us, but because it is
|
Linus has slipped Linus's Law in there on us, but because it is
|
||||||
|
|
|
@ -49,7 +49,7 @@ tree
|
||||||
|
|
||||||
A tree can refer to one or more "blob" objects, each corresponding to
|
A tree can refer to one or more "blob" objects, each corresponding to
|
||||||
a file. In addition, a tree can also refer to other tree objects,
|
a file. In addition, a tree can also refer to other tree objects,
|
||||||
thus creating a directory heirarchy. You can examine the contents of
|
thus creating a directory hierarchy. You can examine the contents of
|
||||||
any tree using ls-tree (remember that a long enough initial portion
|
any tree using ls-tree (remember that a long enough initial portion
|
||||||
of the SHA1 will also work):
|
of the SHA1 will also work):
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ $ git clone /home/alice/project myrepo
|
||||||
|
|
||||||
This creates a new directory "myrepo" containing a clone of Alice's
|
This creates a new directory "myrepo" containing a clone of Alice's
|
||||||
repository. The clone is on an equal footing with the original
|
repository. The clone is on an equal footing with the original
|
||||||
project, posessing its own copy of the original project's history.
|
project, possessing its own copy of the original project's history.
|
||||||
|
|
||||||
Bob then makes some changes and commits them:
|
Bob then makes some changes and commits them:
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ $ git log -p master..bob-incoming
|
||||||
shows a list of all the changes that Bob made since he branched from
|
shows a list of all the changes that Bob made since he branched from
|
||||||
Alice's master branch.
|
Alice's master branch.
|
||||||
|
|
||||||
After examing those changes, and possibly fixing things, Alice can
|
After examining those changes, and possibly fixing things, Alice can
|
||||||
pull the changes into her master branch:
|
pull the changes into her master branch:
|
||||||
|
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
@ -374,7 +374,7 @@ project, so
|
||||||
$ git grep "hello" v2.5
|
$ git grep "hello" v2.5
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
searches for all occurences of "hello" in v2.5.
|
searches for all occurrences of "hello" in v2.5.
|
||||||
|
|
||||||
If you leave out the commit name, git grep will search any of the
|
If you leave out the commit name, git grep will search any of the
|
||||||
files it manages in your current directory. So
|
files it manages in your current directory. So
|
||||||
|
@ -482,6 +482,6 @@ digressions that may be interesting at this point are:
|
||||||
smart enough to perform a close-to-optimal search even in the
|
smart enough to perform a close-to-optimal search even in the
|
||||||
case of complex non-linear history with lots of merged branches.
|
case of complex non-linear history with lots of merged branches.
|
||||||
|
|
||||||
* link:everyday.html[Everday GIT with 20 Commands Or So]
|
* link:everyday.html[Everyday GIT with 20 Commands Or So]
|
||||||
|
|
||||||
* link:cvs-migration.html[git for CVS users].
|
* link:cvs-migration.html[git for CVS users].
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -154,8 +154,7 @@ PROGRAMS = \
|
||||||
git-hash-object$X git-index-pack$X git-local-fetch$X \
|
git-hash-object$X git-index-pack$X git-local-fetch$X \
|
||||||
git-mailinfo$X git-merge-base$X \
|
git-mailinfo$X git-merge-base$X \
|
||||||
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
|
git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
|
||||||
git-peek-remote$X git-prune-packed$X \
|
git-peek-remote$X git-prune-packed$X git-receive-pack$X \
|
||||||
git-receive-pack$X git-rev-parse$X \
|
|
||||||
git-send-pack$X git-shell$X \
|
git-send-pack$X git-shell$X \
|
||||||
git-show-index$X git-ssh-fetch$X \
|
git-show-index$X git-ssh-fetch$X \
|
||||||
git-ssh-upload$X git-unpack-file$X \
|
git-ssh-upload$X git-unpack-file$X \
|
||||||
|
@ -168,7 +167,7 @@ PROGRAMS = \
|
||||||
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
|
BUILT_INS = git-log$X git-whatchanged$X git-show$X \
|
||||||
git-count-objects$X git-diff$X git-push$X \
|
git-count-objects$X git-diff$X git-push$X \
|
||||||
git-grep$X git-add$X git-rm$X git-rev-list$X \
|
git-grep$X git-add$X git-rm$X git-rev-list$X \
|
||||||
git-check-ref-format$X \
|
git-check-ref-format$X git-rev-parse$X \
|
||||||
git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \
|
git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \
|
||||||
git-ls-files$X git-ls-tree$X \
|
git-ls-files$X git-ls-tree$X \
|
||||||
git-read-tree$X git-commit-tree$X \
|
git-read-tree$X git-commit-tree$X \
|
||||||
|
@ -222,7 +221,7 @@ LIB_OBJS = \
|
||||||
BUILTIN_OBJS = \
|
BUILTIN_OBJS = \
|
||||||
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
|
builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
|
||||||
builtin-grep.o builtin-add.o builtin-rev-list.o builtin-check-ref-format.o \
|
builtin-grep.o builtin-add.o builtin-rev-list.o builtin-check-ref-format.o \
|
||||||
builtin-rm.o builtin-init-db.o \
|
builtin-rm.o builtin-init-db.o builtin-rev-parse.o \
|
||||||
builtin-tar-tree.o builtin-upload-tar.o \
|
builtin-tar-tree.o builtin-upload-tar.o \
|
||||||
builtin-ls-files.o builtin-ls-tree.o \
|
builtin-ls-files.o builtin-ls-tree.o \
|
||||||
builtin-read-tree.o builtin-commit-tree.o \
|
builtin-read-tree.o builtin-commit-tree.o \
|
||||||
|
|
|
@ -817,25 +817,26 @@ static int oneway_merge(struct cache_entry **src)
|
||||||
|
|
||||||
static int read_cache_unmerged(void)
|
static int read_cache_unmerged(void)
|
||||||
{
|
{
|
||||||
int i, deleted;
|
int i;
|
||||||
struct cache_entry **dst;
|
struct cache_entry **dst;
|
||||||
|
struct cache_entry *last = NULL;
|
||||||
|
|
||||||
read_cache();
|
read_cache();
|
||||||
dst = active_cache;
|
dst = active_cache;
|
||||||
deleted = 0;
|
|
||||||
for (i = 0; i < active_nr; i++) {
|
for (i = 0; i < active_nr; i++) {
|
||||||
struct cache_entry *ce = active_cache[i];
|
struct cache_entry *ce = active_cache[i];
|
||||||
if (ce_stage(ce)) {
|
if (ce_stage(ce)) {
|
||||||
deleted++;
|
if (last && !strcmp(ce->name, last->name))
|
||||||
|
continue;
|
||||||
invalidate_ce_path(ce);
|
invalidate_ce_path(ce);
|
||||||
continue;
|
last = ce;
|
||||||
|
ce->ce_mode = 0;
|
||||||
|
ce->ce_flags &= ~htons(CE_STAGEMASK);
|
||||||
}
|
}
|
||||||
if (deleted)
|
*dst++ = ce;
|
||||||
*dst = ce;
|
|
||||||
dst++;
|
|
||||||
}
|
}
|
||||||
active_nr -= deleted;
|
active_nr = dst - active_cache;
|
||||||
return deleted;
|
return !!last;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
|
static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
|
||||||
|
@ -935,7 +936,10 @@ int cmd_read_tree(int argc, const char **argv, char **envp)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This differs from "-m" in that we'll silently ignore unmerged entries */
|
/* This differs from "-m" in that we'll silently ignore
|
||||||
|
* unmerged entries and overwrite working tree files that
|
||||||
|
* correspond to them.
|
||||||
|
*/
|
||||||
if (!strcmp(arg, "--reset")) {
|
if (!strcmp(arg, "--reset")) {
|
||||||
if (stage || merge || prefix)
|
if (stage || merge || prefix)
|
||||||
usage(read_tree_usage);
|
usage(read_tree_usage);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include "refs.h"
|
#include "refs.h"
|
||||||
#include "quote.h"
|
#include "quote.h"
|
||||||
|
#include "builtin.h"
|
||||||
|
|
||||||
#define DO_REVS 1
|
#define DO_REVS 1
|
||||||
#define DO_NOREV 2
|
#define DO_NOREV 2
|
||||||
|
@ -163,7 +164,7 @@ static int show_file(const char *arg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int cmd_rev_parse(int argc, const char **argv, char **envp)
|
||||||
{
|
{
|
||||||
int i, as_is = 0, verify = 0;
|
int i, as_is = 0, verify = 0;
|
||||||
unsigned char sha1[20];
|
unsigned char sha1[20];
|
|
@ -43,5 +43,6 @@ extern int cmd_diff_index(int argc, const char **argv, char **envp);
|
||||||
extern int cmd_diff_stages(int argc, const char **argv, char **envp);
|
extern int cmd_diff_stages(int argc, const char **argv, char **envp);
|
||||||
extern int cmd_diff_tree(int argc, const char **argv, char **envp);
|
extern int cmd_diff_tree(int argc, const char **argv, char **envp);
|
||||||
extern int cmd_cat_file(int argc, const char **argv, char **envp);
|
extern int cmd_cat_file(int argc, const char **argv, char **envp);
|
||||||
|
extern int cmd_rev_parse(int argc, const char **argv, char **envp);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -166,7 +166,10 @@ fast_forward_local () {
|
||||||
mb=$(git-merge-base "$local" "$2") &&
|
mb=$(git-merge-base "$local" "$2") &&
|
||||||
case "$2,$mb" in
|
case "$2,$mb" in
|
||||||
$local,*)
|
$local,*)
|
||||||
echo >&2 "* $1: same as $3"
|
if test -n "$verbose"
|
||||||
|
then
|
||||||
|
echo >&2 "* $1: same as $3"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*,$local)
|
*,$local)
|
||||||
echo >&2 "* $1: fast forward to $3"
|
echo >&2 "* $1: fast forward to $3"
|
||||||
|
|
|
@ -314,18 +314,15 @@ sub extract_valid_address {
|
||||||
my $address = shift;
|
my $address = shift;
|
||||||
|
|
||||||
# check for a local address:
|
# check for a local address:
|
||||||
return $address if ($address =~ /^([\w\-]+)$/);
|
return $address if ($address =~ /^([\w\-.]+)$/);
|
||||||
|
|
||||||
if ($have_email_valid) {
|
if ($have_email_valid) {
|
||||||
return Email::Valid->address($address);
|
return Email::Valid->address($address);
|
||||||
} else {
|
} else {
|
||||||
# less robust/correct than the monster regexp in Email::Valid,
|
# less robust/correct than the monster regexp in Email::Valid,
|
||||||
# but still does a 99% job, and one less dependency
|
# but still does a 99% job, and one less dependency
|
||||||
my $cleaned_address;
|
$address =~ /([\w\-.]+@[\w\-.]+)/;
|
||||||
if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
|
return $1;
|
||||||
$cleaned_address = $1;
|
|
||||||
}
|
|
||||||
return $cleaned_address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
git.c
3
git.c
|
@ -69,7 +69,8 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
|
||||||
{ "diff-index", cmd_diff_index },
|
{ "diff-index", cmd_diff_index },
|
||||||
{ "diff-stages", cmd_diff_stages },
|
{ "diff-stages", cmd_diff_stages },
|
||||||
{ "diff-tree", cmd_diff_tree },
|
{ "diff-tree", cmd_diff_tree },
|
||||||
{ "cat-file", cmd_cat_file }
|
{ "cat-file", cmd_cat_file },
|
||||||
|
{ "rev-parse", cmd_rev_parse }
|
||||||
};
|
};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче