Compare commits
58 Commits
v1.7.4-rc0
...
v1.7.4-rc2
Author | SHA1 | Date | |
---|---|---|---|
adf872e783 | |||
477039c53c | |||
17e1c9e2fd | |||
17fd68d0d8 | |||
857ba709df | |||
7810c6b6d6 | |||
37ee62bc6b | |||
4b297df9b2 | |||
4f93fc745a | |||
3e70e37e72 | |||
9cf3f14766 | |||
d2f15e29a6 | |||
3f14246899 | |||
7fad99e14a | |||
a6fd3d4925 | |||
54f4cd9e8c | |||
7a876edf5d | |||
567323d387 | |||
ab4356111a | |||
0316bba80f | |||
ea640cc691 | |||
920a5d436b | |||
fc7642a096 | |||
2cf08b6a0a | |||
5b5d53cbe5 | |||
a28adc2d79 | |||
906a9a7d1d | |||
a31d066524 | |||
b393515f8e | |||
e17aa8a9dc | |||
9cfdbf9bef | |||
bc2d159421 | |||
ed40ec551d | |||
e83c267f71 | |||
685e9d9145 | |||
8594495cd6 | |||
6e97ef31ce | |||
bf9b46c16d | |||
d3cae60efc | |||
9e98354ab9 | |||
0c30ed0cb5 | |||
3ca7353cab | |||
3ce19eb857 | |||
cc7e81674b | |||
3aa3047106 | |||
60d5985dab | |||
f2665ec9fa | |||
081f84ee9e | |||
469bfc962d | |||
6822052427 | |||
9d9f5e72dc | |||
57da204264 | |||
a25e47377d | |||
71a5d4bc0e | |||
4290f69067 | |||
a2b665de4b | |||
549ad6d2f3 | |||
b3e5bce1aa |
@ -157,7 +157,7 @@ Writing Documentation:
|
|||||||
--sort=<key>
|
--sort=<key>
|
||||||
--abbrev[=<n>]
|
--abbrev[=<n>]
|
||||||
|
|
||||||
Possibility of multiple occurences is indicated by three dots:
|
Possibility of multiple occurrences is indicated by three dots:
|
||||||
<file>...
|
<file>...
|
||||||
(One or more of <file>.)
|
(One or more of <file>.)
|
||||||
|
|
||||||
|
@ -30,3 +30,5 @@ Git 1.7.3.5 Release Notes
|
|||||||
* "git rebase --skip" to skip the last commit in a series used to fail
|
* "git rebase --skip" to skip the last commit in a series used to fail
|
||||||
to run post-rewrite hook and to copy notes from old commits that have
|
to run post-rewrite hook and to copy notes from old commits that have
|
||||||
successfully been rebased so far. Now it do (backmerge ef88ad2).
|
successfully been rebased so far. Now it do (backmerge ef88ad2).
|
||||||
|
|
||||||
|
* "gitweb" tried to show a wrong feed logo when none was specified.
|
||||||
|
@ -8,15 +8,14 @@ Updates since v1.7.3
|
|||||||
docbook-xsl >= 1.73. If you have older versions, you can set
|
docbook-xsl >= 1.73. If you have older versions, you can set
|
||||||
ASCIIDOC7 and ASCIIDOC_ROFF, respectively.
|
ASCIIDOC7 and ASCIIDOC_ROFF, respectively.
|
||||||
|
|
||||||
* The option parsers of various commands that create new branch (or
|
* The option parsers of various commands that create new branches (or
|
||||||
rename existing ones to a new name) were too loose and users were
|
rename existing ones to a new name) were too loose and users were
|
||||||
allowed to call a branch with a name that begins with a dash by
|
allowed to give a branch a name that begins with a dash by creative
|
||||||
creative abuse of their command line options, which only lead to
|
abuse of their command line options, which only led to burning
|
||||||
burn themselves. The name of a branch cannot begin with a dash
|
themselves. The name of a branch cannot begin with a dash now.
|
||||||
now.
|
|
||||||
|
|
||||||
* System-wide fallback default attributes can be stored in
|
* System-wide fallback default attributes can be stored in
|
||||||
/etc/gitattributes; core.attributesfile configuration variable can
|
/etc/gitattributes; the core.attributesfile configuration variable can
|
||||||
be used to customize the path to this file.
|
be used to customize the path to this file.
|
||||||
|
|
||||||
* The thread structure generated by "git send-email" has changed
|
* The thread structure generated by "git send-email" has changed
|
||||||
@ -26,34 +25,39 @@ Updates since v1.7.3
|
|||||||
cover letter of the previous series; this has been changed to make
|
cover letter of the previous series; this has been changed to make
|
||||||
the patches in the new series replies to the new cover letter.
|
the patches in the new series replies to the new cover letter.
|
||||||
|
|
||||||
* Bash completion script in contrib/ has been adjusted to be usable with
|
* The Bash completion script in contrib/ has been adjusted to be usable with
|
||||||
Bash 4 (options with '=value' didn't complete) It has been also made
|
Bash 4 (options with '=value' didn't complete). It has been also made
|
||||||
usable with zsh.
|
usable with zsh.
|
||||||
|
|
||||||
* Different pagers can be chosen depending on which subcommand is
|
* Different pagers can be chosen depending on which subcommand is
|
||||||
being run under the pager, using "pager.<subcommand>" variable.
|
being run under the pager, using the "pager.<subcommand>" variable.
|
||||||
|
|
||||||
* The hardcoded tab-width of 8 used in whitespace breakage checks is now
|
* The hardcoded tab-width of 8 that is used in whitespace breakage checks is now
|
||||||
configurable via the attributes mechanism.
|
configurable via the attributes mechanism.
|
||||||
|
|
||||||
* Support of case insensitive filesystems (i.e. "core.ignorecase") has
|
* Support of case insensitive filesystems (i.e. "core.ignorecase") has
|
||||||
been improved. For example, the gitignore mechanism didn't pay attention
|
been improved. For example, the gitignore mechanism didn't pay attention
|
||||||
to the case insensitivity.
|
to case insensitivity.
|
||||||
|
|
||||||
* The <tree>:<path> syntax to name a blob in a tree, and :<path>
|
* The <tree>:<path> syntax for naming a blob in a tree, and the :<path>
|
||||||
syntax to name a blob in the index (e.g. "master:Makefile",
|
syntax for naming a blob in the index (e.g. "master:Makefile",
|
||||||
":hello.c") have been extended. You can start <path> with "./" to
|
":hello.c") have been extended. You can start <path> with "./" to
|
||||||
implicitly have the (sub)directory you are in prefixed to the
|
implicitly have the (sub)directory you are in prefixed to the
|
||||||
lookup. Similarly, ":../Makefile" from a subdirectory would mean
|
lookup. Similarly, ":../Makefile" from a subdirectory would mean
|
||||||
"the Makefile of the parent directory in the index".
|
"the Makefile of the parent directory in the index".
|
||||||
|
|
||||||
* "git blame" learned --show-email option to display the e-mail
|
* "git blame" learned the --show-email option to display the e-mail
|
||||||
addresses instead of the names of authors.
|
addresses instead of the names of authors.
|
||||||
|
|
||||||
* "git commit" learned --fixup and --squash options to help later invocation
|
* "git commit" learned the --fixup and --squash options to help later invocation
|
||||||
of the interactive rebase.
|
of interactive rebase.
|
||||||
|
|
||||||
* "git daemon" can be built in MinGW environment.
|
* Command line options to "git cvsimport" whose names are in capital
|
||||||
|
letters (-A, -M, -R and -S) can now be specified as the default in
|
||||||
|
the .git/config file by their longer names (cvsimport.authorsFile,
|
||||||
|
cvsimport.mergeRegex, cvsimport.trackRevisions, cvsimport.ignorePaths).
|
||||||
|
|
||||||
|
* "git daemon" can be built in the MinGW environment.
|
||||||
|
|
||||||
* "git daemon" can take more than one --listen option to listen to
|
* "git daemon" can take more than one --listen option to listen to
|
||||||
multiple addresses.
|
multiple addresses.
|
||||||
@ -61,13 +65,13 @@ Updates since v1.7.3
|
|||||||
* "git describe --exact-match" was optimized not to read commit
|
* "git describe --exact-match" was optimized not to read commit
|
||||||
objects unnecessarily.
|
objects unnecessarily.
|
||||||
|
|
||||||
* "git diff" and "git grep" learned how functions and subroutines
|
* "git diff" and "git grep" learned what functions and subroutines
|
||||||
in Fortran look like.
|
in Fortran and Perl look like.
|
||||||
|
|
||||||
* "git fetch" learned "--recurse-submodules" option.
|
* "git fetch" learned the "--recurse-submodules" option.
|
||||||
|
|
||||||
* "git mergetool" tells vim/gvim to show three-way diff by default
|
* "git mergetool" tells vim/gvim to show a three-way diff by default
|
||||||
(use vimdiff2/gvimdiff2 as the tool name for old behaviour).
|
(use vimdiff2/gvimdiff2 as the tool name for old behavior).
|
||||||
|
|
||||||
* "git log -G<pattern>" limits the output to commits whose change has
|
* "git log -G<pattern>" limits the output to commits whose change has
|
||||||
added or deleted lines that match the given pattern.
|
added or deleted lines that match the given pattern.
|
||||||
@ -87,12 +91,20 @@ Updates since v1.7.3
|
|||||||
directory in one branch while a new file is created in place of that
|
directory in one branch while a new file is created in place of that
|
||||||
directory in the other branch.
|
directory in the other branch.
|
||||||
|
|
||||||
* "git rebase --autosquash" can use SHA-1 object names to name which
|
* "git merge" learned the "--abort" option, synonymous to
|
||||||
commit to fix up (e.g. "fixup! e83c5163").
|
"git reset --merge" when a merge is in progress.
|
||||||
|
|
||||||
* The default "recursive" merge strategy learned --rename-threshold
|
* "git notes" learned the "merge" subcommand to merge notes refs.
|
||||||
|
In addition to the default manual conflict resolution, there are
|
||||||
|
also several notes merge strategies for automatically resolving
|
||||||
|
notes merge conflicts.
|
||||||
|
|
||||||
|
* "git rebase --autosquash" can use SHA-1 object names to name the
|
||||||
|
commit which is to be fixed up (e.g. "fixup! e83c5163").
|
||||||
|
|
||||||
|
* The default "recursive" merge strategy learned the --rename-threshold
|
||||||
option to influence the rename detection, similar to the -M option
|
option to influence the rename detection, similar to the -M option
|
||||||
of "git diff". From "git merge" frontend, "-X<strategy option>"
|
of "git diff". From the "git merge" frontend, the "-X<strategy option>"
|
||||||
interface, e.g. "git merge -Xrename-threshold=50% ...", can be used
|
interface, e.g. "git merge -Xrename-threshold=50% ...", can be used
|
||||||
to trigger this.
|
to trigger this.
|
||||||
|
|
||||||
@ -100,21 +112,21 @@ Updates since v1.7.3
|
|||||||
changes; the most notable is -Xignore-space-at-eol.
|
changes; the most notable is -Xignore-space-at-eol.
|
||||||
|
|
||||||
* "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read
|
* "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read
|
||||||
recipient list from a command output.
|
the recipient list from a command output.
|
||||||
|
|
||||||
* "git send-email" learned to read and use "To:" from its input files.
|
* "git send-email" learned to read and use "To:" from its input files.
|
||||||
|
|
||||||
* you can extend "git shell", which is often used on boxes that allow
|
* you can extend "git shell", which is often used on boxes that allow
|
||||||
git-only login over ssh as login shell, with custom set of
|
git-only login over ssh as login shell, with a custom set of
|
||||||
commands.
|
commands.
|
||||||
|
|
||||||
* The current branch name in "git status" output can be colored differently
|
* The current branch name in "git status" output can be colored differently
|
||||||
from the generic header color by setting "color.status.branch" variable.
|
from the generic header color by setting the "color.status.branch" variable.
|
||||||
|
|
||||||
* "git submodule sync" updates metainformation for all submodules,
|
* "git submodule sync" updates metainformation for all submodules,
|
||||||
not just the ones that have been checked out.
|
not just the ones that have been checked out.
|
||||||
|
|
||||||
* gitweb can use custom 'highlight' command with its configuration file.
|
* gitweb can use a custom 'highlight' command with its configuration file.
|
||||||
|
|
||||||
* other gitweb updates.
|
* other gitweb updates.
|
||||||
|
|
||||||
@ -125,7 +137,7 @@ Also contains various documentation updates.
|
|||||||
Fixes since v1.7.3
|
Fixes since v1.7.3
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
All of the fixes in v1.7.3.X maintenance series are included in this
|
All of the fixes in the v1.7.3.X maintenance series are included in this
|
||||||
release, unless otherwise noted.
|
release, unless otherwise noted.
|
||||||
|
|
||||||
* "git log --author=me --author=her" did not find commits written by
|
* "git log --author=me --author=her" did not find commits written by
|
||||||
@ -142,6 +154,6 @@ release, unless otherwise noted.
|
|||||||
|
|
||||||
---
|
---
|
||||||
exec >/var/tmp/1
|
exec >/var/tmp/1
|
||||||
O=v1.7.3.4-687-g2cd900f
|
O=v1.7.4-rc2
|
||||||
echo O=$(git describe master)
|
echo O=$(git describe master)
|
||||||
git shortlog --no-merges ^maint ^$O master
|
git shortlog --no-merges ^maint ^$O master
|
||||||
|
@ -892,7 +892,7 @@ diff.wordRegex::
|
|||||||
|
|
||||||
fetch.recurseSubmodules::
|
fetch.recurseSubmodules::
|
||||||
A boolean value which changes the behavior for fetch and pull, the
|
A boolean value which changes the behavior for fetch and pull, the
|
||||||
default is to not recursively fetch populated sumodules unless
|
default is to not recursively fetch populated submodules unless
|
||||||
configured otherwise.
|
configured otherwise.
|
||||||
|
|
||||||
fetch.unpackLimit::
|
fetch.unpackLimit::
|
||||||
@ -1811,7 +1811,7 @@ submodule.<name>.update::
|
|||||||
|
|
||||||
submodule.<name>.fetchRecurseSubmodules::
|
submodule.<name>.fetchRecurseSubmodules::
|
||||||
This option can be used to enable/disable recursive fetching of this
|
This option can be used to enable/disable recursive fetching of this
|
||||||
submodule. It can be overriden by using the --[no-]recurse-submodules
|
submodule. It can be overridden by using the --[no-]recurse-submodules
|
||||||
command line option to "git fetch" and "git pull".
|
command line option to "git fetch" and "git pull".
|
||||||
This setting will override that from in the linkgit:gitmodules[5]
|
This setting will override that from in the linkgit:gitmodules[5]
|
||||||
file.
|
file.
|
||||||
|
@ -333,7 +333,7 @@ likely to introduce confusing changes to the index.
|
|||||||
There are also more complex operations that can be performed. But beware
|
There are also more complex operations that can be performed. But beware
|
||||||
that because the patch is applied only to the index and not the working
|
that because the patch is applied only to the index and not the working
|
||||||
tree, the working tree will appear to "undo" the change in the index.
|
tree, the working tree will appear to "undo" the change in the index.
|
||||||
For example, introducing a a new line into the index that is in neither
|
For example, introducing a new line into the index that is in neither
|
||||||
the HEAD nor the working tree will stage the new line for commit, but
|
the HEAD nor the working tree will stage the new line for commit, but
|
||||||
the line will appear to be reverted in the working tree.
|
the line will appear to be reverted in the working tree.
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ Note that attributes are by default taken from the `.gitattributes` files
|
|||||||
in the tree that is being archived. If you want to tweak the way the
|
in the tree that is being archived. If you want to tweak the way the
|
||||||
output is generated after the fact (e.g. you committed without adding an
|
output is generated after the fact (e.g. you committed without adding an
|
||||||
appropriate export-ignore in its `.gitattributes`), adjust the checked out
|
appropriate export-ignore in its `.gitattributes`), adjust the checked out
|
||||||
`.gitattributes` file as necessary and use `--work-tree-attributes`
|
`.gitattributes` file as necessary and use `--worktree-attributes`
|
||||||
option. Alternatively you can keep necessary attributes that should apply
|
option. Alternatively you can keep necessary attributes that should apply
|
||||||
while archiving any tree in your `$GIT_DIR/info/attributes` file.
|
while archiving any tree in your `$GIT_DIR/info/attributes` file.
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ unbundle <file>::
|
|||||||
|
|
||||||
<git-rev-list-args>::
|
<git-rev-list-args>::
|
||||||
A list of arguments, acceptable to 'git rev-parse' and
|
A list of arguments, acceptable to 'git rev-parse' and
|
||||||
'git rev-list' (and containg a named ref, see SPECIFYING REFERENCES
|
'git rev-list' (and containing a named ref, see SPECIFYING REFERENCES
|
||||||
below), that specifies the specific objects and references
|
below), that specifies the specific objects and references
|
||||||
to transport. For example, `master{tilde}10..master` causes the
|
to transport. For example, `master{tilde}10..master` causes the
|
||||||
current master reference to be packaged along with all objects
|
current master reference to be packaged along with all objects
|
||||||
|
@ -57,7 +57,7 @@ merge.log::
|
|||||||
In addition to branch names, populate the log message with at
|
In addition to branch names, populate the log message with at
|
||||||
most the specified number of one-line descriptions from the
|
most the specified number of one-line descriptions from the
|
||||||
actual commits that are being merged. Defaults to false, and
|
actual commits that are being merged. Defaults to false, and
|
||||||
true is a synoym for 20.
|
true is a synonym for 20.
|
||||||
|
|
||||||
merge.summary::
|
merge.summary::
|
||||||
Synonym to `merge.log`; this is deprecated and will be removed in
|
Synonym to `merge.log`; this is deprecated and will be removed in
|
||||||
|
@ -15,12 +15,12 @@ This remote helper uses the specified 'program' to connect
|
|||||||
to a remote git server.
|
to a remote git server.
|
||||||
|
|
||||||
Data written to stdin of this specified 'program' is assumed
|
Data written to stdin of this specified 'program' is assumed
|
||||||
to be sent to git:// server, git-upload-pack, git-receive-pack
|
to be sent to a git:// server, git-upload-pack, git-receive-pack
|
||||||
or git-upload-archive (depending on situation), and data read
|
or git-upload-archive (depending on situation), and data read
|
||||||
from stdout of this program is assumed to be received from
|
from stdout of this program is assumed to be received from
|
||||||
the same service.
|
the same service.
|
||||||
|
|
||||||
Command and arguments are separated by unescaped space.
|
Command and arguments are separated by an unescaped space.
|
||||||
|
|
||||||
The following sequences have a special meaning:
|
The following sequences have a special meaning:
|
||||||
|
|
||||||
@ -39,19 +39,19 @@ The following sequences have a special meaning:
|
|||||||
git-upload-pack, or git-upload-archive) of the service
|
git-upload-pack, or git-upload-archive) of the service
|
||||||
git wants to invoke.
|
git wants to invoke.
|
||||||
|
|
||||||
'%G' (must be first characters in argument)::
|
'%G' (must be the first characters in an argument)::
|
||||||
This argument will not be passed to 'program'. Instead, it
|
This argument will not be passed to 'program'. Instead, it
|
||||||
will cause helper to start by sending git:// service request to
|
will cause the helper to start by sending git:// service requests to
|
||||||
remote side with service field set to approiate value and
|
the remote side with the service field set to an appropriate value and
|
||||||
repository field set to rest of the argument. Default is not to send
|
the repository field set to rest of the argument. Default is not to send
|
||||||
such request.
|
such a request.
|
||||||
+
|
+
|
||||||
This is useful if remote side is git:// server accessed over
|
This is useful if remote side is git:// server accessed over
|
||||||
some tunnel.
|
some tunnel.
|
||||||
|
|
||||||
'%V' (must be first characters in argument)::
|
'%V' (must be first characters in argument)::
|
||||||
This argument will not be passed to 'program'. Instead it sets
|
This argument will not be passed to 'program'. Instead it sets
|
||||||
the vhost field in git:// service request (to rest of the argument).
|
the vhost field in the git:// service request (to rest of the argument).
|
||||||
Default is not to send vhost in such request (if sent).
|
Default is not to send vhost in such request (if sent).
|
||||||
|
|
||||||
ENVIRONMENT VARIABLES:
|
ENVIRONMENT VARIABLES:
|
||||||
|
@ -11,20 +11,20 @@ SYNOPSIS
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
This helper uses specified file descriptors to connect to remote git server.
|
This helper uses specified file descriptors to connect to a remote git server.
|
||||||
This is not meant for end users but for programs and scripts calling git
|
This is not meant for end users but for programs and scripts calling git
|
||||||
fetch, push or archive.
|
fetch, push or archive.
|
||||||
|
|
||||||
If only <infd> is given, it is assumed to be bidirectional socket connected
|
If only <infd> is given, it is assumed to be a bidirectional socket connected
|
||||||
to remote git server (git-upload-pack, git-receive-pack or
|
to remote git server (git-upload-pack, git-receive-pack or
|
||||||
git-upload-achive). If both <infd> and <outfd> are given, they are assumed
|
git-upload-achive). If both <infd> and <outfd> are given, they are assumed
|
||||||
to be pipes connected to remote git server (<infd> being the inbound pipe
|
to be pipes connected to a remote git server (<infd> being the inbound pipe
|
||||||
and <outfd> being the outbound pipe.
|
and <outfd> being the outbound pipe.
|
||||||
|
|
||||||
It is assumed that any handshaking procedures have already been completed
|
It is assumed that any handshaking procedures have already been completed
|
||||||
(such as sending service request for git://) before this helper is started.
|
(such as sending service request for git://) before this helper is started.
|
||||||
|
|
||||||
<anything> can be any string. It is ignored. It is meant for provoding
|
<anything> can be any string. It is ignored. It is meant for providing
|
||||||
information to user in the URL in case that URL is displayed in some
|
information to user in the URL in case that URL is displayed in some
|
||||||
context.
|
context.
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ old references to SVN revision numbers in existing documentation, bug
|
|||||||
reports and archives. If you plan to eventually migrate from SVN to git
|
reports and archives. If you plan to eventually migrate from SVN to git
|
||||||
and are certain about dropping SVN history, consider
|
and are certain about dropping SVN history, consider
|
||||||
linkgit:git-filter-branch[1] instead. filter-branch also allows
|
linkgit:git-filter-branch[1] instead. filter-branch also allows
|
||||||
reformating of metadata for ease-of-reading and rewriting authorship
|
reformatting of metadata for ease-of-reading and rewriting authorship
|
||||||
info for non-"svn.authorsFile" users.
|
info for non-"svn.authorsFile" users.
|
||||||
|
|
||||||
svn.useSvmProps::
|
svn.useSvmProps::
|
||||||
@ -729,8 +729,11 @@ have each person clone that repository with 'git clone':
|
|||||||
cd project
|
cd project
|
||||||
git init
|
git init
|
||||||
git remote add origin server:/pub/project
|
git remote add origin server:/pub/project
|
||||||
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
|
git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
|
||||||
git fetch
|
git fetch
|
||||||
|
# Prevent fetch/pull from remote git server in the future,
|
||||||
|
# we only want to use git svn for future updates
|
||||||
|
git config --remove-section remote.origin
|
||||||
# Create a local branch from one of the branches just fetched
|
# Create a local branch from one of the branches just fetched
|
||||||
git checkout -b master FETCH_HEAD
|
git checkout -b master FETCH_HEAD
|
||||||
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
|
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
|
||||||
|
@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
|
|||||||
branch of the `git.git` repository.
|
branch of the `git.git` repository.
|
||||||
Documentation for older releases are available here:
|
Documentation for older releases are available here:
|
||||||
|
|
||||||
* link:v1.7.3.4/git.html[documentation for release 1.7.3.4]
|
* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
|
||||||
|
|
||||||
* release notes for
|
* release notes for
|
||||||
|
link:RelNotes/1.7.3.5.txt[1.7.3.5],
|
||||||
link:RelNotes/1.7.3.4.txt[1.7.3.4],
|
link:RelNotes/1.7.3.4.txt[1.7.3.4],
|
||||||
link:RelNotes/1.7.3.3.txt[1.7.3.3],
|
link:RelNotes/1.7.3.3.txt[1.7.3.3],
|
||||||
link:RelNotes/1.7.3.2.txt[1.7.3.2],
|
link:RelNotes/1.7.3.2.txt[1.7.3.2],
|
||||||
|
@ -335,6 +335,16 @@ input that is already correctly indented. In this case, the lack of a
|
|||||||
smudge filter means that the clean filter _must_ accept its own output
|
smudge filter means that the clean filter _must_ accept its own output
|
||||||
without modifying it.
|
without modifying it.
|
||||||
|
|
||||||
|
Sequence "%f" on the filter command line is replaced with the name of
|
||||||
|
the file the filter is working on. A filter might use this in keyword
|
||||||
|
substitution. For example:
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
[filter "p4"]
|
||||||
|
clean = git-p4-filter --clean %f
|
||||||
|
smudge = git-p4-filter --smudge %f
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
|
||||||
Interaction between checkin/checkout attributes
|
Interaction between checkin/checkout attributes
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -494,6 +504,8 @@ patterns are available:
|
|||||||
|
|
||||||
- `pascal` suitable for source code in the Pascal/Delphi language.
|
- `pascal` suitable for source code in the Pascal/Delphi language.
|
||||||
|
|
||||||
|
- `perl` suitable for source code in the Perl language.
|
||||||
|
|
||||||
- `php` suitable for source code in the PHP language.
|
- `php` suitable for source code in the PHP language.
|
||||||
|
|
||||||
- `python` suitable for source code in the Python language.
|
- `python` suitable for source code in the Python language.
|
||||||
@ -581,6 +593,39 @@ and now produces better output), you can remove the cache
|
|||||||
manually with `git update-ref -d refs/notes/textconv/jpg` (where
|
manually with `git update-ref -d refs/notes/textconv/jpg` (where
|
||||||
"jpg" is the name of the diff driver, as in the example above).
|
"jpg" is the name of the diff driver, as in the example above).
|
||||||
|
|
||||||
|
Marking files as binary
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Git usually guesses correctly whether a blob contains text or binary
|
||||||
|
data by examining the beginning of the contents. However, sometimes you
|
||||||
|
may want to override its decision, either because a blob contains binary
|
||||||
|
data later in the file, or because the content, while technically
|
||||||
|
composed of text characters, is opaque to a human reader. For example,
|
||||||
|
many postscript files contain only ascii characters, but produce noisy
|
||||||
|
and meaningless diffs.
|
||||||
|
|
||||||
|
The simplest way to mark a file as binary is to unset the diff
|
||||||
|
attribute in the `.gitattributes` file:
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
*.ps -diff
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
This will cause git to generate `Binary files differ` (or a binary
|
||||||
|
patch, if binary patches are enabled) instead of a regular diff.
|
||||||
|
|
||||||
|
However, one may also want to specify other diff driver attributes. For
|
||||||
|
example, you might want to use `textconv` to convert postscript files to
|
||||||
|
an ascii representation for human viewing, but otherwise treat them as
|
||||||
|
binary files. You cannot specify both `-diff` and `diff=ps` attributes.
|
||||||
|
The solution is to use the `diff.*.binary` config option:
|
||||||
|
|
||||||
|
------------------------
|
||||||
|
[diff "ps"]
|
||||||
|
textconv = ps2ascii
|
||||||
|
binary = true
|
||||||
|
------------------------
|
||||||
|
|
||||||
Performing a three-way merge
|
Performing a three-way merge
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -350,10 +350,6 @@ rebase::
|
|||||||
The commits are guaranteed to be listed in the order that they were
|
The commits are guaranteed to be listed in the order that they were
|
||||||
processed by rebase.
|
processed by rebase.
|
||||||
|
|
||||||
There is no default 'post-rewrite' hook, but see the
|
|
||||||
`post-receive-copy-notes` script in `contrib/hooks` for an example
|
|
||||||
that copies your git-notes to the rewritten commits.
|
|
||||||
|
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
---
|
---
|
||||||
|
@ -49,7 +49,7 @@ submodule.<name>.fetchRecurseSubmodules::
|
|||||||
submodule. If this option is also present in the submodules entry in
|
submodule. If this option is also present in the submodules entry in
|
||||||
.git/config of the superproject, the setting there will override the
|
.git/config of the superproject, the setting there will override the
|
||||||
one found in .gitmodules.
|
one found in .gitmodules.
|
||||||
Both settings can be overriden on the command line by using the
|
Both settings can be overridden on the command line by using the
|
||||||
"--[no-]recurse-submodules" option to "git fetch" and "git pull"..
|
"--[no-]recurse-submodules" option to "git fetch" and "git pull"..
|
||||||
|
|
||||||
submodule.<name>.ignore::
|
submodule.<name>.ignore::
|
||||||
|
@ -10,7 +10,7 @@ merge.log::
|
|||||||
In addition to branch names, populate the log message with at
|
In addition to branch names, populate the log message with at
|
||||||
most the specified number of one-line descriptions from the
|
most the specified number of one-line descriptions from the
|
||||||
actual commits that are being merged. Defaults to false, and
|
actual commits that are being merged. Defaults to false, and
|
||||||
true is a synoym for 20.
|
true is a synonym for 20.
|
||||||
|
|
||||||
merge.renameLimit::
|
merge.renameLimit::
|
||||||
The number of files to consider when performing rename detection
|
The number of files to consider when performing rename detection
|
||||||
|
@ -32,7 +32,7 @@ and installation code should look something like:
|
|||||||
}
|
}
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
Handlers are given the typdef of sigchain_fun. This is the same type
|
Handlers are given the typedef of sigchain_fun. This is the same type
|
||||||
that is given to signal() or sigaction(). It is perfectly reasonable to
|
that is given to signal() or sigaction(). It is perfectly reasonable to
|
||||||
push SIG_DFL or SIG_IGN onto the stack.
|
push SIG_DFL or SIG_IGN onto the stack.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
GVF=GIT-VERSION-FILE
|
GVF=GIT-VERSION-FILE
|
||||||
DEF_VER=v1.7.4-rc0
|
DEF_VER=v1.7.4-rc2
|
||||||
|
|
||||||
LF='
|
LF='
|
||||||
'
|
'
|
||||||
|
@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
|
|||||||
" git config --global user.name \"Your Name\"\n"
|
" git config --global user.name \"Your Name\"\n"
|
||||||
" git config --global user.email you@example.com\n"
|
" git config --global user.email you@example.com\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If the identity used for this commit is wrong, you can fix it with:\n"
|
"After doing this, you may fix the identity used for this commit with:\n"
|
||||||
"\n"
|
"\n"
|
||||||
" git commit --amend --author='Your Name <you@example.com>'\n";
|
" git commit --amend --reset-author\n";
|
||||||
|
|
||||||
static const char empty_amend_advice[] =
|
static const char empty_amend_advice[] =
|
||||||
"You asked to amend the most recent commit, but doing so would make\n"
|
"You asked to amend the most recent commit, but doing so would make\n"
|
||||||
|
23
convert.c
23
convert.c
@ -1,6 +1,7 @@
|
|||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "attr.h"
|
#include "attr.h"
|
||||||
#include "run-command.h"
|
#include "run-command.h"
|
||||||
|
#include "quote.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* convert.c - convert a file when checking it out and checking it in.
|
* convert.c - convert a file when checking it out and checking it in.
|
||||||
@ -318,6 +319,7 @@ struct filter_params {
|
|||||||
const char *src;
|
const char *src;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
|
const char *path;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int filter_buffer(int in, int out, void *data)
|
static int filter_buffer(int in, int out, void *data)
|
||||||
@ -330,7 +332,23 @@ static int filter_buffer(int in, int out, void *data)
|
|||||||
int write_err, status;
|
int write_err, status;
|
||||||
const char *argv[] = { NULL, NULL };
|
const char *argv[] = { NULL, NULL };
|
||||||
|
|
||||||
argv[0] = params->cmd;
|
/* apply % substitution to cmd */
|
||||||
|
struct strbuf cmd = STRBUF_INIT;
|
||||||
|
struct strbuf path = STRBUF_INIT;
|
||||||
|
struct strbuf_expand_dict_entry dict[] = {
|
||||||
|
{ "f", NULL, },
|
||||||
|
{ NULL, NULL, },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* quote the path to preserve spaces, etc. */
|
||||||
|
sq_quote_buf(&path, params->path);
|
||||||
|
dict[0].value = path.buf;
|
||||||
|
|
||||||
|
/* expand all %f with the quoted path */
|
||||||
|
strbuf_expand(&cmd, params->cmd, strbuf_expand_dict_cb, &dict);
|
||||||
|
strbuf_release(&path);
|
||||||
|
|
||||||
|
argv[0] = cmd.buf;
|
||||||
|
|
||||||
memset(&child_process, 0, sizeof(child_process));
|
memset(&child_process, 0, sizeof(child_process));
|
||||||
child_process.argv = argv;
|
child_process.argv = argv;
|
||||||
@ -350,6 +368,8 @@ static int filter_buffer(int in, int out, void *data)
|
|||||||
status = finish_command(&child_process);
|
status = finish_command(&child_process);
|
||||||
if (status)
|
if (status)
|
||||||
error("external filter %s failed %d", params->cmd, status);
|
error("external filter %s failed %d", params->cmd, status);
|
||||||
|
|
||||||
|
strbuf_release(&cmd);
|
||||||
return (write_err || status);
|
return (write_err || status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,6 +397,7 @@ static int apply_filter(const char *path, const char *src, size_t len,
|
|||||||
params.src = src;
|
params.src = src;
|
||||||
params.size = len;
|
params.size = len;
|
||||||
params.cmd = cmd;
|
params.cmd = cmd;
|
||||||
|
params.path = path;
|
||||||
|
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
if (start_async(&async))
|
if (start_async(&async))
|
||||||
|
7
daemon.c
7
daemon.c
@ -1226,9 +1226,10 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* prepare argv for serving-processes */
|
/* prepare argv for serving-processes */
|
||||||
cld_argv = xmalloc(sizeof (char *) * (argc + 2));
|
cld_argv = xmalloc(sizeof (char *) * (argc + 2));
|
||||||
for (i = 0; i < argc; ++i)
|
cld_argv[0] = argv[0]; /* git-daemon */
|
||||||
cld_argv[i] = argv[i];
|
cld_argv[1] = "--serve";
|
||||||
cld_argv[argc] = "--serve";
|
for (i = 1; i < argc; ++i)
|
||||||
|
cld_argv[i+1] = argv[i];
|
||||||
cld_argv[argc+1] = NULL;
|
cld_argv[argc+1] = NULL;
|
||||||
|
|
||||||
return serve(&listen_addr, listen_port, cred);
|
return serve(&listen_addr, listen_port, cred);
|
||||||
|
@ -90,6 +90,14 @@ sub write_author_info($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# convert getopts specs for use by git config
|
# convert getopts specs for use by git config
|
||||||
|
my %longmap = (
|
||||||
|
'A:' => 'authors-file',
|
||||||
|
'M:' => 'merge-regex',
|
||||||
|
'P:' => undef,
|
||||||
|
'R' => 'track-revisions',
|
||||||
|
'S:' => 'ignore-paths',
|
||||||
|
);
|
||||||
|
|
||||||
sub read_repo_config {
|
sub read_repo_config {
|
||||||
# Split the string between characters, unless there is a ':'
|
# Split the string between characters, unless there is a ':'
|
||||||
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
|
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
|
||||||
@ -99,8 +107,17 @@ sub read_repo_config {
|
|||||||
$key =~ s/://g;
|
$key =~ s/://g;
|
||||||
my $arg = 'git config';
|
my $arg = 'git config';
|
||||||
$arg .= ' --bool' if ($o !~ /:$/);
|
$arg .= ' --bool' if ($o !~ /:$/);
|
||||||
|
my $ckey = $key;
|
||||||
|
|
||||||
chomp(my $tmp = `$arg --get cvsimport.$key`);
|
if (exists $longmap{$o}) {
|
||||||
|
# An uppercase option like -R cannot be
|
||||||
|
# expressed in the configuration, as the
|
||||||
|
# variable names are downcased.
|
||||||
|
$ckey = $longmap{$o};
|
||||||
|
next if (! defined $ckey);
|
||||||
|
$ckey =~ s/-//g;
|
||||||
|
}
|
||||||
|
chomp(my $tmp = `$arg --get cvsimport.$ckey`);
|
||||||
if ($tmp && !($arg =~ /--bool/ && $tmp eq 'false')) {
|
if ($tmp && !($arg =~ /--bool/ && $tmp eq 'false')) {
|
||||||
no strict 'refs';
|
no strict 'refs';
|
||||||
my $opt_name = "opt_" . $key;
|
my $opt_name = "opt_" . $key;
|
||||||
|
@ -37,13 +37,25 @@ resolve_relative_url ()
|
|||||||
die "remote ($remote) does not have a url defined in .git/config"
|
die "remote ($remote) does not have a url defined in .git/config"
|
||||||
url="$1"
|
url="$1"
|
||||||
remoteurl=${remoteurl%/}
|
remoteurl=${remoteurl%/}
|
||||||
|
sep=/
|
||||||
while test -n "$url"
|
while test -n "$url"
|
||||||
do
|
do
|
||||||
case "$url" in
|
case "$url" in
|
||||||
../*)
|
../*)
|
||||||
url="${url#../}"
|
url="${url#../}"
|
||||||
|
case "$remoteurl" in
|
||||||
|
*/*)
|
||||||
remoteurl="${remoteurl%/*}"
|
remoteurl="${remoteurl%/*}"
|
||||||
;;
|
;;
|
||||||
|
*:*)
|
||||||
|
remoteurl="${remoteurl%:*}"
|
||||||
|
sep=:
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "cannot strip one component off url '$remoteurl'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
./*)
|
./*)
|
||||||
url="${url#./}"
|
url="${url#./}"
|
||||||
;;
|
;;
|
||||||
@ -51,7 +63,7 @@ resolve_relative_url ()
|
|||||||
break;;
|
break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "$remoteurl/${url%/}"
|
echo "$remoteurl$sep${url%/}"
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
0
gitk-git/gitk
Normal file → Executable file
0
gitk-git/gitk
Normal file → Executable file
@ -250,13 +250,14 @@ our %highlight_ext = (
|
|||||||
# main extensions, defining name of syntax;
|
# main extensions, defining name of syntax;
|
||||||
# see files in /usr/share/highlight/langDefs/ directory
|
# see files in /usr/share/highlight/langDefs/ directory
|
||||||
map { $_ => $_ }
|
map { $_ => $_ }
|
||||||
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl),
|
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),
|
||||||
# alternate extensions, see /etc/highlight/filetypes.conf
|
# alternate extensions, see /etc/highlight/filetypes.conf
|
||||||
'h' => 'c',
|
'h' => 'c',
|
||||||
|
map { $_ => 'sh' } qw(bash zsh ksh),
|
||||||
map { $_ => 'cpp' } qw(cxx c++ cc),
|
map { $_ => 'cpp' } qw(cxx c++ cc),
|
||||||
map { $_ => 'php' } qw(php3 php4),
|
map { $_ => 'php' } qw(php3 php4 php5 phps),
|
||||||
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
|
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
|
||||||
'mak' => 'make',
|
map { $_ => 'make'} qw(mak mk),
|
||||||
map { $_ => 'xml' } qw(xhtml html htm),
|
map { $_ => 'xml' } qw(xhtml html htm),
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -3464,8 +3465,7 @@ sub run_highlighter {
|
|||||||
my ($fd, $highlight, $syntax) = @_;
|
my ($fd, $highlight, $syntax) = @_;
|
||||||
return $fd unless ($highlight && defined $syntax);
|
return $fd unless ($highlight && defined $syntax);
|
||||||
|
|
||||||
close $fd
|
close $fd;
|
||||||
or die_error(404, "Reading blob failed");
|
|
||||||
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
|
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
|
||||||
quote_command($highlight_bin).
|
quote_command($highlight_bin).
|
||||||
" --xhtml --fragment --syntax $syntax |"
|
" --xhtml --fragment --syntax $syntax |"
|
||||||
@ -3601,10 +3601,15 @@ EOF
|
|||||||
insert_file($site_header);
|
insert_file($site_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<div class=\"page_header\">\n" .
|
print "<div class=\"page_header\">\n";
|
||||||
$cgi->a({-href => esc_url($logo_url),
|
if (defined $logo) {
|
||||||
|
print $cgi->a({-href => esc_url($logo_url),
|
||||||
-title => $logo_label},
|
-title => $logo_label},
|
||||||
qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
|
$cgi->img({-src => esc_url($logo),
|
||||||
|
-width => 72, -height => 27,
|
||||||
|
-alt => "git",
|
||||||
|
-class => "logo"}));
|
||||||
|
}
|
||||||
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
|
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
|
||||||
if (defined $project) {
|
if (defined $project) {
|
||||||
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
|
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
|
||||||
@ -7169,7 +7174,7 @@ XML
|
|||||||
if (defined $favicon) {
|
if (defined $favicon) {
|
||||||
print "<icon>" . esc_url($favicon) . "</icon>\n";
|
print "<icon>" . esc_url($favicon) . "</icon>\n";
|
||||||
}
|
}
|
||||||
if (defined $logo_url) {
|
if (defined $logo) {
|
||||||
# not twice as wide as tall: 72 x 27 pixels
|
# not twice as wide as tall: 72 x 27 pixels
|
||||||
print "<logo>" . esc_url($logo) . "</logo>\n";
|
print "<logo>" . esc_url($logo) . "</logo>\n";
|
||||||
}
|
}
|
||||||
|
@ -68,8 +68,7 @@ svn_cmd () {
|
|||||||
svn "$orig_svncmd" --config-dir "$svnconf" "$@"
|
svn "$orig_svncmd" --config-dir "$svnconf" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
if test -n "$SVN_HTTPD_PORT"
|
prepare_httpd () {
|
||||||
then
|
|
||||||
for d in \
|
for d in \
|
||||||
"$SVN_HTTPD_PATH" \
|
"$SVN_HTTPD_PATH" \
|
||||||
/usr/sbin/apache2 \
|
/usr/sbin/apache2 \
|
||||||
@ -83,8 +82,8 @@ then
|
|||||||
done
|
done
|
||||||
if test -z "$SVN_HTTPD_PATH"
|
if test -z "$SVN_HTTPD_PATH"
|
||||||
then
|
then
|
||||||
skip_all='skipping git svn tests, Apache not found'
|
echo >&2 '*** error: Apache not found'
|
||||||
test_done
|
return 1
|
||||||
fi
|
fi
|
||||||
for d in \
|
for d in \
|
||||||
"$SVN_HTTPD_MODULE_PATH" \
|
"$SVN_HTTPD_MODULE_PATH" \
|
||||||
@ -99,23 +98,16 @@ then
|
|||||||
done
|
done
|
||||||
if test -z "$SVN_HTTPD_MODULE_PATH"
|
if test -z "$SVN_HTTPD_MODULE_PATH"
|
||||||
then
|
then
|
||||||
skip_all='skipping git svn tests, Apache module dir not found'
|
echo >&2 '*** error: Apache module dir not found'
|
||||||
test_done
|
return 1
|
||||||
fi
|
fi
|
||||||
|
if test ! -f "$SVN_HTTPD_MODULE_PATH/mod_dav_svn.so"
|
||||||
|
then
|
||||||
|
echo >&2 '*** error: Apache module "mod_dav_svn" not found'
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
start_httpd () {
|
repo_base_path="${1-svn}"
|
||||||
repo_base_path="$1"
|
|
||||||
if test -z "$SVN_HTTPD_PORT"
|
|
||||||
then
|
|
||||||
echo >&2 'SVN_HTTPD_PORT is not defined!'
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
if test -z "$repo_base_path"
|
|
||||||
then
|
|
||||||
repo_base_path=svn
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir "$GIT_DIR"/logs
|
mkdir "$GIT_DIR"/logs
|
||||||
|
|
||||||
cat > "$GIT_DIR/httpd.conf" <<EOF
|
cat > "$GIT_DIR/httpd.conf" <<EOF
|
||||||
@ -132,12 +124,24 @@ LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
|
|||||||
SVNPath "$rawsvnrepo"
|
SVNPath "$rawsvnrepo"
|
||||||
</Location>
|
</Location>
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
start_httpd () {
|
||||||
|
if test -z "$SVN_HTTPD_PORT"
|
||||||
|
then
|
||||||
|
echo >&2 'SVN_HTTPD_PORT is not defined!'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
prepare_httpd "$1" || return 1
|
||||||
|
|
||||||
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k start
|
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k start
|
||||||
svnrepo="http://127.0.0.1:$SVN_HTTPD_PORT/$repo_base_path"
|
svnrepo="http://127.0.0.1:$SVN_HTTPD_PORT/$repo_base_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_httpd () {
|
stop_httpd () {
|
||||||
test -z "$SVN_HTTPD_PORT" && return
|
test -z "$SVN_HTTPD_PORT" && return
|
||||||
|
test ! -f "$GIT_DIR/httpd.conf" && return
|
||||||
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop
|
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,11 +80,11 @@ EOF
|
|||||||
chmod +x passing-todo.sh &&
|
chmod +x passing-todo.sh &&
|
||||||
./passing-todo.sh >out 2>err &&
|
./passing-todo.sh >out 2>err &&
|
||||||
! test -s err &&
|
! test -s err &&
|
||||||
cat >expect <<EOF &&
|
sed -e 's/^> //' >expect <<EOF &&
|
||||||
ok 1 - pretend we have fixed a known breakage # TODO known breakage
|
> ok 1 - pretend we have fixed a known breakage # TODO known breakage
|
||||||
# fixed 1 known breakage(s)
|
> # fixed 1 known breakage(s)
|
||||||
# passed all 1 test(s)
|
> # passed all 1 test(s)
|
||||||
1..1
|
> 1..1
|
||||||
EOF
|
EOF
|
||||||
test_cmp expect out)
|
test_cmp expect out)
|
||||||
"
|
"
|
||||||
@ -164,19 +164,19 @@ EOF
|
|||||||
test_must_fail ./failing-cleanup.sh >out 2>err &&
|
test_must_fail ./failing-cleanup.sh >out 2>err &&
|
||||||
! test -s err &&
|
! test -s err &&
|
||||||
! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
|
! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
|
||||||
sed -e 's/Z$//' >expect <<\EOF &&
|
sed -e 's/Z$//' -e 's/^> //' >expect <<\EOF &&
|
||||||
not ok - 1 tests clean up even after a failure
|
> not ok - 1 tests clean up even after a failure
|
||||||
# Z
|
> # Z
|
||||||
# touch clean-after-failure &&
|
> # touch clean-after-failure &&
|
||||||
# test_when_finished rm clean-after-failure &&
|
> # test_when_finished rm clean-after-failure &&
|
||||||
# (exit 1)
|
> # (exit 1)
|
||||||
# Z
|
> # Z
|
||||||
not ok - 2 failure to clean up causes the test to fail
|
> not ok - 2 failure to clean up causes the test to fail
|
||||||
# Z
|
> # Z
|
||||||
# test_when_finished \"(exit 2)\"
|
> # test_when_finished \"(exit 2)\"
|
||||||
# Z
|
> # Z
|
||||||
# failed 2 among 2 test(s)
|
> # failed 2 among 2 test(s)
|
||||||
1..2
|
> 1..2
|
||||||
EOF
|
EOF
|
||||||
test_cmp expect out)
|
test_cmp expect out)
|
||||||
"
|
"
|
||||||
|
@ -35,7 +35,7 @@ test_expect_success 'plain' '
|
|||||||
|
|
||||||
test_expect_success 'plain nested in bare' '
|
test_expect_success 'plain nested in bare' '
|
||||||
(
|
(
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
git init --bare bare-ancestor.git &&
|
git init --bare bare-ancestor.git &&
|
||||||
cd bare-ancestor.git &&
|
cd bare-ancestor.git &&
|
||||||
mkdir plain-nested &&
|
mkdir plain-nested &&
|
||||||
@ -47,7 +47,7 @@ test_expect_success 'plain nested in bare' '
|
|||||||
|
|
||||||
test_expect_success 'plain through aliased command, outside any git repo' '
|
test_expect_success 'plain through aliased command, outside any git repo' '
|
||||||
(
|
(
|
||||||
unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
|
sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
|
||||||
HOME=$(pwd)/alias-config &&
|
HOME=$(pwd)/alias-config &&
|
||||||
export HOME &&
|
export HOME &&
|
||||||
mkdir alias-config &&
|
mkdir alias-config &&
|
||||||
@ -65,7 +65,7 @@ test_expect_success 'plain through aliased command, outside any git repo' '
|
|||||||
|
|
||||||
test_expect_failure 'plain nested through aliased command' '
|
test_expect_failure 'plain nested through aliased command' '
|
||||||
(
|
(
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
git init plain-ancestor-aliased &&
|
git init plain-ancestor-aliased &&
|
||||||
cd plain-ancestor-aliased &&
|
cd plain-ancestor-aliased &&
|
||||||
echo "[alias] aliasedinit = init" >>.git/config &&
|
echo "[alias] aliasedinit = init" >>.git/config &&
|
||||||
@ -78,7 +78,7 @@ test_expect_failure 'plain nested through aliased command' '
|
|||||||
|
|
||||||
test_expect_failure 'plain nested in bare through aliased command' '
|
test_expect_failure 'plain nested in bare through aliased command' '
|
||||||
(
|
(
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
git init --bare bare-ancestor-aliased.git &&
|
git init --bare bare-ancestor-aliased.git &&
|
||||||
cd bare-ancestor-aliased.git &&
|
cd bare-ancestor-aliased.git &&
|
||||||
echo "[alias] aliasedinit = init" >>config &&
|
echo "[alias] aliasedinit = init" >>config &&
|
||||||
|
@ -93,4 +93,47 @@ test_expect_success expanded_in_repo '
|
|||||||
cmp expanded-keywords expected-output
|
cmp expanded-keywords expected-output
|
||||||
'
|
'
|
||||||
|
|
||||||
|
# The use of %f in a filter definition is expanded to the path to
|
||||||
|
# the filename being smudged or cleaned. It must be shell escaped.
|
||||||
|
# First, set up some interesting file names and pet them in
|
||||||
|
# .gitattributes.
|
||||||
|
test_expect_success 'filter shell-escaped filenames' '
|
||||||
|
cat >argc.sh <<-EOF &&
|
||||||
|
#!$SHELL_PATH
|
||||||
|
cat >/dev/null
|
||||||
|
echo argc: \$# "\$@"
|
||||||
|
EOF
|
||||||
|
normal=name-no-magic &&
|
||||||
|
special="name with '\''sq'\'' and \$x" &&
|
||||||
|
echo some test text >"$normal" &&
|
||||||
|
echo some test text >"$special" &&
|
||||||
|
git add "$normal" "$special" &&
|
||||||
|
git commit -q -m "add files" &&
|
||||||
|
echo "name* filter=argc" >.gitattributes &&
|
||||||
|
|
||||||
|
# delete the files and check them out again, using a smudge filter
|
||||||
|
# that will count the args and echo the command-line back to us
|
||||||
|
git config filter.argc.smudge "sh ./argc.sh %f" &&
|
||||||
|
rm "$normal" "$special" &&
|
||||||
|
git checkout -- "$normal" "$special" &&
|
||||||
|
|
||||||
|
# make sure argc.sh counted the right number of args
|
||||||
|
echo "argc: 1 $normal" >expect &&
|
||||||
|
test_cmp expect "$normal" &&
|
||||||
|
echo "argc: 1 $special" >expect &&
|
||||||
|
test_cmp expect "$special" &&
|
||||||
|
|
||||||
|
# do the same thing, but with more args in the filter expression
|
||||||
|
git config filter.argc.smudge "sh ./argc.sh %f --my-extra-arg" &&
|
||||||
|
rm "$normal" "$special" &&
|
||||||
|
git checkout -- "$normal" "$special" &&
|
||||||
|
|
||||||
|
# make sure argc.sh counted the right number of args
|
||||||
|
echo "argc: 2 $normal --my-extra-arg" >expect &&
|
||||||
|
test_cmp expect "$normal" &&
|
||||||
|
echo "argc: 2 $special --my-extra-arg" >expect &&
|
||||||
|
test_cmp expect "$special" &&
|
||||||
|
:
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -80,7 +80,7 @@ test_repo() {
|
|||||||
# - cwd can't be outside worktree
|
# - cwd can't be outside worktree
|
||||||
|
|
||||||
test_expect_success '#0: setup' '
|
test_expect_success '#0: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 0 0/sub &&
|
mkdir 0 0/sub &&
|
||||||
cd 0 && git init && cd ..
|
cd 0 && git init && cd ..
|
||||||
'
|
'
|
||||||
@ -123,7 +123,7 @@ EOF
|
|||||||
# GIT_WORK_TREE is ignored -> #0
|
# GIT_WORK_TREE is ignored -> #0
|
||||||
|
|
||||||
test_expect_success '#1: setup' '
|
test_expect_success '#1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub &&
|
mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub &&
|
||||||
cd 1 &&
|
cd 1 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -174,7 +174,7 @@ EOF
|
|||||||
# - cwd can't be outside worktree
|
# - cwd can't be outside worktree
|
||||||
|
|
||||||
test_expect_success '#2: setup' '
|
test_expect_success '#2: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 2 2/sub &&
|
mkdir 2 2/sub &&
|
||||||
cd 2 && git init && cd ..
|
cd 2 && git init && cd ..
|
||||||
'
|
'
|
||||||
@ -241,7 +241,7 @@ EOF
|
|||||||
# - cwd can be outside worktree
|
# - cwd can be outside worktree
|
||||||
|
|
||||||
test_expect_success '#3: setup' '
|
test_expect_success '#3: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 3 3/sub 3/sub/sub 3.wt 3.wt/sub 3/wt 3/wt/sub &&
|
mkdir 3 3/sub 3/sub/sub 3.wt 3.wt/sub 3/wt 3/wt/sub &&
|
||||||
cd 3 && git init && cd ..
|
cd 3 && git init && cd ..
|
||||||
'
|
'
|
||||||
@ -504,7 +504,7 @@ EOF
|
|||||||
# core.worktree is ignored -> #0
|
# core.worktree is ignored -> #0
|
||||||
|
|
||||||
test_expect_success '#4: setup' '
|
test_expect_success '#4: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 4 4/sub &&
|
mkdir 4 4/sub &&
|
||||||
cd 4 &&
|
cd 4 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -550,7 +550,7 @@ EOF
|
|||||||
# GIT_WORK_TREE/core.worktree are ignored -> #0
|
# GIT_WORK_TREE/core.worktree are ignored -> #0
|
||||||
|
|
||||||
test_expect_success '#5: setup' '
|
test_expect_success '#5: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 5 5/sub &&
|
mkdir 5 5/sub &&
|
||||||
cd 5 &&
|
cd 5 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -602,7 +602,7 @@ EOF
|
|||||||
# - cwd can be outside worktree
|
# - cwd can be outside worktree
|
||||||
|
|
||||||
test_expect_success '#6: setup' '
|
test_expect_success '#6: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 6 6/sub 6/sub/sub 6.wt 6.wt/sub 6/wt 6/wt/sub &&
|
mkdir 6 6/sub 6/sub/sub 6.wt 6.wt/sub 6/wt 6/wt/sub &&
|
||||||
cd 6 && git init && cd ..
|
cd 6 && git init && cd ..
|
||||||
'
|
'
|
||||||
@ -889,7 +889,7 @@ EOF
|
|||||||
# core.worktree is overridden by GIT_WORK_TREE -> #3
|
# core.worktree is overridden by GIT_WORK_TREE -> #3
|
||||||
|
|
||||||
test_expect_success '#7: setup' '
|
test_expect_success '#7: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub &&
|
mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub &&
|
||||||
cd 7 &&
|
cd 7 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1155,7 +1155,7 @@ EOF
|
|||||||
# #0 except that git_dir is set by .git file
|
# #0 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#8: setup' '
|
test_expect_success '#8: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 8 8/sub &&
|
mkdir 8 8/sub &&
|
||||||
cd 8 &&
|
cd 8 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1202,7 +1202,7 @@ EOF
|
|||||||
# #1 except that git_dir is set by .git file
|
# #1 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#9: setup' '
|
test_expect_success '#9: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub &&
|
mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub &&
|
||||||
cd 9 &&
|
cd 9 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1251,7 +1251,7 @@ EOF
|
|||||||
# #2 except that git_dir is set by .git file
|
# #2 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#10: setup' '
|
test_expect_success '#10: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 10 10/sub &&
|
mkdir 10 10/sub &&
|
||||||
cd 10 &&
|
cd 10 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1318,7 +1318,7 @@ EOF
|
|||||||
# #3 except that git_dir is set by .git file
|
# #3 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#11: setup' '
|
test_expect_success '#11: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub &&
|
mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub &&
|
||||||
cd 11 &&
|
cd 11 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1586,7 +1586,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
test_expect_success '#12: setup' '
|
test_expect_success '#12: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 12 12/sub 12/sub/sub 12.wt 12.wt/sub 12/wt 12/wt/sub &&
|
mkdir 12 12/sub 12/sub/sub 12.wt 12.wt/sub 12/wt 12/wt/sub &&
|
||||||
cd 12 &&
|
cd 12 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1634,7 +1634,7 @@ EOF
|
|||||||
# #5 except that git_dir is set by .git file
|
# #5 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#13: setup' '
|
test_expect_success '#13: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 13 13/sub 13/sub/sub 13.wt 13.wt/sub 13/wt 13/wt/sub &&
|
mkdir 13 13/sub 13/sub/sub 13.wt 13.wt/sub 13/wt 13/wt/sub &&
|
||||||
cd 13 &&
|
cd 13 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1684,7 +1684,7 @@ EOF
|
|||||||
# #6 except that git_dir is set by .git file
|
# #6 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#14: setup' '
|
test_expect_success '#14: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub &&
|
mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub &&
|
||||||
cd 14 &&
|
cd 14 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -1975,7 +1975,7 @@ EOF
|
|||||||
# #7 except that git_dir is set by .git file
|
# #7 except that git_dir is set by .git file
|
||||||
|
|
||||||
test_expect_success '#15: setup' '
|
test_expect_success '#15: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub &&
|
mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub &&
|
||||||
cd 15 &&
|
cd 15 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2247,7 +2247,7 @@ EOF
|
|||||||
# - cwd can't be outside worktree
|
# - cwd can't be outside worktree
|
||||||
|
|
||||||
test_expect_success '#16.1: setup' '
|
test_expect_success '#16.1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 16 16/sub &&
|
mkdir 16 16/sub &&
|
||||||
cd 16 &&
|
cd 16 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2378,7 +2378,7 @@ EOF
|
|||||||
# GIT_WORK_TREE is ignored -> #16.1 (with warnings perhaps)
|
# GIT_WORK_TREE is ignored -> #16.1 (with warnings perhaps)
|
||||||
|
|
||||||
test_expect_success '#17.1: setup' '
|
test_expect_success '#17.1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 17 17/sub &&
|
mkdir 17 17/sub &&
|
||||||
cd 17 &&
|
cd 17 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2511,7 +2511,7 @@ EOF
|
|||||||
# - cwd can't be outside worktree
|
# - cwd can't be outside worktree
|
||||||
|
|
||||||
test_expect_success '#18: setup' '
|
test_expect_success '#18: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 18 18/sub &&
|
mkdir 18 18/sub &&
|
||||||
cd 18 &&
|
cd 18 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2578,7 +2578,7 @@ EOF
|
|||||||
# bare repo is overridden by GIT_WORK_TREE -> #3
|
# bare repo is overridden by GIT_WORK_TREE -> #3
|
||||||
|
|
||||||
test_expect_success '#19: setup' '
|
test_expect_success '#19: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub &&
|
mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub &&
|
||||||
cd 19 &&
|
cd 19 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2844,7 +2844,7 @@ EOF
|
|||||||
# core.worktree is ignored -> #16.1
|
# core.worktree is ignored -> #16.1
|
||||||
|
|
||||||
test_expect_success '#20.1: setup' '
|
test_expect_success '#20.1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 20 20/sub &&
|
mkdir 20 20/sub &&
|
||||||
cd 20 &&
|
cd 20 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -2972,7 +2972,7 @@ EOF
|
|||||||
# GIT_WORK_TREE/core.worktree are ignored -> #20.1
|
# GIT_WORK_TREE/core.worktree are ignored -> #20.1
|
||||||
|
|
||||||
test_expect_success '#21.1: setup' '
|
test_expect_success '#21.1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 21 21/sub &&
|
mkdir 21 21/sub &&
|
||||||
cd 21 &&
|
cd 21 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3108,7 +3108,7 @@ EOF
|
|||||||
# - cwd can be outside worktree
|
# - cwd can be outside worktree
|
||||||
|
|
||||||
test_expect_success '#22.1: setup' '
|
test_expect_success '#22.1: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 22 &&
|
mkdir 22 &&
|
||||||
cd 22 &&
|
cd 22 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3439,7 +3439,7 @@ test_expect_success '#22.2: at root' '
|
|||||||
# core.worktree is overridden by GIT_WORK_TREE -> #19
|
# core.worktree is overridden by GIT_WORK_TREE -> #19
|
||||||
|
|
||||||
test_expect_success '#23: setup' '
|
test_expect_success '#23: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub &&
|
mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub &&
|
||||||
cd 23 &&
|
cd 23 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3706,7 +3706,7 @@ EOF
|
|||||||
# #16.2 except git_dir is set according to .git file
|
# #16.2 except git_dir is set according to .git file
|
||||||
|
|
||||||
test_expect_success '#24: setup' '
|
test_expect_success '#24: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 24 24/sub &&
|
mkdir 24 24/sub &&
|
||||||
cd 24 &&
|
cd 24 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3754,7 +3754,7 @@ EOF
|
|||||||
# #17.2 except git_dir is set according to .git file
|
# #17.2 except git_dir is set according to .git file
|
||||||
|
|
||||||
test_expect_success '#25: setup' '
|
test_expect_success '#25: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 25 25/sub &&
|
mkdir 25 25/sub &&
|
||||||
cd 25 &&
|
cd 25 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3804,7 +3804,7 @@ EOF
|
|||||||
# #18 except git_dir is set according to .git file
|
# #18 except git_dir is set according to .git file
|
||||||
|
|
||||||
test_expect_success '#26: setup' '
|
test_expect_success '#26: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 26 26/sub &&
|
mkdir 26 26/sub &&
|
||||||
cd 26 &&
|
cd 26 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -3872,7 +3872,7 @@ EOF
|
|||||||
# #19 except git_dir is set according to .git file
|
# #19 except git_dir is set according to .git file
|
||||||
|
|
||||||
test_expect_success '#27: setup' '
|
test_expect_success '#27: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub &&
|
mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub &&
|
||||||
cd 27 &&
|
cd 27 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -4140,7 +4140,7 @@ EOF
|
|||||||
# core.worktree is ignored -> #24
|
# core.worktree is ignored -> #24
|
||||||
|
|
||||||
test_expect_success '#28: setup' '
|
test_expect_success '#28: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 28 28/sub &&
|
mkdir 28 28/sub &&
|
||||||
cd 28 &&
|
cd 28 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -4189,7 +4189,7 @@ EOF
|
|||||||
# GIT_WORK_TREE/core.worktree are ignored -> #28
|
# GIT_WORK_TREE/core.worktree are ignored -> #28
|
||||||
|
|
||||||
test_expect_success '#29: setup' '
|
test_expect_success '#29: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 29 29/sub &&
|
mkdir 29 29/sub &&
|
||||||
cd 29 &&
|
cd 29 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -4239,7 +4239,7 @@ EOF
|
|||||||
# core.worktree and core.bare conflict, won't fly.
|
# core.worktree and core.bare conflict, won't fly.
|
||||||
|
|
||||||
test_expect_success '#30: setup' '
|
test_expect_success '#30: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 30 &&
|
mkdir 30 &&
|
||||||
cd 30 &&
|
cd 30 &&
|
||||||
git init &&
|
git init &&
|
||||||
@ -4278,7 +4278,7 @@ test_expect_success '#30: at root' '
|
|||||||
# #23 except git_dir is set according to .git file
|
# #23 except git_dir is set according to .git file
|
||||||
|
|
||||||
test_expect_success '#31: setup' '
|
test_expect_success '#31: setup' '
|
||||||
unset GIT_DIR GIT_WORK_TREE &&
|
sane_unset GIT_DIR GIT_WORK_TREE &&
|
||||||
mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub &&
|
mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub &&
|
||||||
cd 31 &&
|
cd 31 &&
|
||||||
git init &&
|
git init &&
|
||||||
|
@ -13,16 +13,19 @@ test_description='merge-recursive options
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
|
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
|
||||||
|
test_have_prereq MINGW && export GREP_OPTIONS=-U
|
||||||
|
|
||||||
test_expect_success 'setup' '
|
test_expect_success 'setup' '
|
||||||
conflict_hunks () {
|
conflict_hunks () {
|
||||||
sed -n -e "
|
sed $SED_OPTIONS -n -e "
|
||||||
/^<<<</ b inconflict
|
/^<<<</ b conflict
|
||||||
b
|
b
|
||||||
: inconflict
|
: conflict
|
||||||
p
|
p
|
||||||
/^>>>>/ b
|
/^>>>>/ b
|
||||||
n
|
n
|
||||||
b inconflict
|
b conflict
|
||||||
" "$@"
|
" "$@"
|
||||||
} &&
|
} &&
|
||||||
|
|
||||||
|
@ -1067,7 +1067,7 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
|
|||||||
|
|
||||||
test_expect_success 'git notes get-ref (no overrides)' '
|
test_expect_success 'git notes get-ref (no overrides)' '
|
||||||
git config --unset core.notesRef &&
|
git config --unset core.notesRef &&
|
||||||
unset GIT_NOTES_REF &&
|
sane_unset GIT_NOTES_REF &&
|
||||||
test "$(git notes get-ref)" = "refs/notes/commits"
|
test "$(git notes get-ref)" = "refs/notes/commits"
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ EOF
|
|||||||
|
|
||||||
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
|
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
|
||||||
|
|
||||||
builtin_patterns="bibtex cpp csharp fortran html java objc pascal php python ruby tex"
|
builtin_patterns="bibtex cpp csharp fortran html java objc pascal perl php python ruby tex"
|
||||||
for p in $builtin_patterns
|
for p in $builtin_patterns
|
||||||
do
|
do
|
||||||
test_expect_success "builtin $p pattern compiles" '
|
test_expect_success "builtin $p pattern compiles" '
|
||||||
|
@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
test_have_prereq MINGW && SED_OPTIONS=-b
|
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
|
||||||
|
|
||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
git config core.autocrlf false &&
|
git config core.autocrlf false &&
|
||||||
|
@ -446,4 +446,42 @@ test_expect_success 'add should fail when path is used by an existing directory'
|
|||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'set up for relative path tests' '
|
||||||
|
mkdir reltest &&
|
||||||
|
(
|
||||||
|
cd reltest &&
|
||||||
|
git init &&
|
||||||
|
mkdir sub &&
|
||||||
|
(
|
||||||
|
cd sub &&
|
||||||
|
git init &&
|
||||||
|
test_commit foo
|
||||||
|
) &&
|
||||||
|
git add sub &&
|
||||||
|
git config -f .gitmodules submodule.sub.path sub &&
|
||||||
|
git config -f .gitmodules submodule.sub.url ../subrepo &&
|
||||||
|
cp .git/config pristine-.git-config
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'relative path works with URL' '
|
||||||
|
(
|
||||||
|
cd reltest &&
|
||||||
|
cp pristine-.git-config .git/config &&
|
||||||
|
git config remote.origin.url ssh://hostname/repo &&
|
||||||
|
git submodule init &&
|
||||||
|
test "$(git config submodule.sub.url)" = ssh://hostname/subrepo
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'relative path works with user@host:path' '
|
||||||
|
(
|
||||||
|
cd reltest &&
|
||||||
|
cp pristine-.git-config .git/config &&
|
||||||
|
git config remote.origin.url user@host:repo &&
|
||||||
|
git submodule init &&
|
||||||
|
test "$(git config submodule.sub.url)" = user@host:subrepo
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -265,7 +265,7 @@ test_expect_success $PREREQ 'Author From: in message body' '
|
|||||||
--to=nobody@example.com \
|
--to=nobody@example.com \
|
||||||
--smtp-server="$(pwd)/fake.sendmail" \
|
--smtp-server="$(pwd)/fake.sendmail" \
|
||||||
$patches &&
|
$patches &&
|
||||||
sed "1,/^\$/d" < msgtxt1 > msgbody1
|
sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
|
||||||
grep "From: A <author@example.com>" msgbody1
|
grep "From: A <author@example.com>" msgbody1
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ test_expect_success $PREREQ 'Author From: not in message body' '
|
|||||||
--to=nobody@example.com \
|
--to=nobody@example.com \
|
||||||
--smtp-server="$(pwd)/fake.sendmail" \
|
--smtp-server="$(pwd)/fake.sendmail" \
|
||||||
$patches &&
|
$patches &&
|
||||||
sed "1,/^\$/d" < msgtxt1 > msgbody1
|
sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
|
||||||
! grep "From: A <author@example.com>" msgbody1
|
! grep "From: A <author@example.com>" msgbody1
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
|
|||||||
--in-reply-to=" " \
|
--in-reply-to=" " \
|
||||||
--smtp-server="$(pwd)/fake.sendmail" \
|
--smtp-server="$(pwd)/fake.sendmail" \
|
||||||
$patches \
|
$patches \
|
||||||
2>errors
|
2>errors &&
|
||||||
! grep "^In-Reply-To: < *>" msgtxt1
|
! grep "^In-Reply-To: < *>" msgtxt1
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -617,7 +617,7 @@ EOF
|
|||||||
"
|
"
|
||||||
|
|
||||||
test_expect_success $PREREQ '--suppress-cc=sob' '
|
test_expect_success $PREREQ '--suppress-cc=sob' '
|
||||||
git config --unset sendemail.cccmd
|
test_might_fail git config --unset sendemail.cccmd &&
|
||||||
test_suppression sob
|
test_suppression sob
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -1135,7 +1135,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '
|
|||||||
# Note that the patches in this test are deliberately out of order; we
|
# Note that the patches in this test are deliberately out of order; we
|
||||||
# want to make sure it works even if the cover-letter is not in the
|
# want to make sure it works even if the cover-letter is not in the
|
||||||
# first mail.
|
# first mail.
|
||||||
test_expect_success 'refusing to send cover letter template' '
|
test_expect_success $PREREQ 'refusing to send cover letter template' '
|
||||||
clean_fake_sendmail &&
|
clean_fake_sendmail &&
|
||||||
rm -fr outdir &&
|
rm -fr outdir &&
|
||||||
git format-patch --cover-letter -2 -o outdir &&
|
git format-patch --cover-letter -2 -o outdir &&
|
||||||
@ -1151,7 +1151,7 @@ test_expect_success 'refusing to send cover letter template' '
|
|||||||
test -z "$(ls msgtxt*)"
|
test -z "$(ls msgtxt*)"
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success '--force sends cover letter template anyway' '
|
test_expect_success $PREREQ '--force sends cover letter template anyway' '
|
||||||
clean_fake_sendmail &&
|
clean_fake_sendmail &&
|
||||||
rm -fr outdir &&
|
rm -fr outdir &&
|
||||||
git format-patch --cover-letter -2 -o outdir &&
|
git format-patch --cover-letter -2 -o outdir &&
|
||||||
|
@ -4,45 +4,55 @@ test_description='check svn dumpfile importer'
|
|||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
|
||||||
if ! svnadmin -h >/dev/null 2>&1
|
reinit_git () {
|
||||||
then
|
rm -fr .git &&
|
||||||
skip_all='skipping svn-fe tests, svn not available'
|
git init
|
||||||
test_done
|
|
||||||
fi
|
|
||||||
|
|
||||||
svnconf=$PWD/svnconf
|
|
||||||
export svnconf
|
|
||||||
|
|
||||||
svn_cmd () {
|
|
||||||
subcommand=$1 &&
|
|
||||||
shift &&
|
|
||||||
mkdir -p "$svnconf" &&
|
|
||||||
svn "$subcommand" --config-dir "$svnconf" "$@"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_dump () {
|
>empty
|
||||||
label=$1
|
|
||||||
dump=$2
|
test_expect_success 'empty dump' '
|
||||||
test_expect_success "$dump" '
|
reinit_git &&
|
||||||
svnadmin create "$label-svn" &&
|
echo "SVN-fs-dump-format-version: 2" >input &&
|
||||||
svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
|
test-svn-fe input >stream &&
|
||||||
svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
|
git fast-import <stream
|
||||||
git init "$label-git" &&
|
'
|
||||||
test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
|
|
||||||
|
test_expect_success 'v3 dumps not supported' '
|
||||||
|
reinit_git &&
|
||||||
|
echo "SVN-fs-dump-format-version: 3" >input &&
|
||||||
|
test_must_fail test-svn-fe input >stream &&
|
||||||
|
test_cmp empty stream
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'set up svn repo' '
|
||||||
|
svnconf=$PWD/svnconf &&
|
||||||
|
mkdir -p "$svnconf" &&
|
||||||
|
|
||||||
|
if
|
||||||
|
svnadmin -h >/dev/null 2>&1 &&
|
||||||
|
svnadmin create simple-svn &&
|
||||||
|
svnadmin load simple-svn <"$TEST_DIRECTORY/t9135/svn.dump" &&
|
||||||
|
svn export --config-dir "$svnconf" "file://$PWD/simple-svn" simple-svnco
|
||||||
|
then
|
||||||
|
test_set_prereq SVNREPO
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success SVNREPO 't9135/svn.dump' '
|
||||||
|
git init simple-git &&
|
||||||
|
test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
|
||||||
(
|
(
|
||||||
cd "$label-git" &&
|
cd simple-git &&
|
||||||
git fast-import < ../"$label.fe"
|
git fast-import <../simple.fe
|
||||||
) &&
|
) &&
|
||||||
(
|
(
|
||||||
cd "$label-svnco" &&
|
cd simple-svnco &&
|
||||||
git init &&
|
git init &&
|
||||||
git add . &&
|
git add . &&
|
||||||
git fetch "../$label-git" master &&
|
git fetch ../simple-git master &&
|
||||||
git diff --exit-code FETCH_HEAD
|
git diff --exit-code FETCH_HEAD
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
}
|
|
||||||
|
|
||||||
test_dump simple t9135/svn.dump
|
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -6,6 +6,14 @@
|
|||||||
test_description='git svn merge detection'
|
test_description='git svn merge detection'
|
||||||
. ./lib-git-svn.sh
|
. ./lib-git-svn.sh
|
||||||
|
|
||||||
|
svn_ver="$(svn --version --quiet)"
|
||||||
|
case $svn_ver in
|
||||||
|
0.* | 1.[0-4].*)
|
||||||
|
skip_all="skipping git-svn test - SVN too old ($svn_ver)"
|
||||||
|
test_done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
test_expect_success 'initialize source svn repo' '
|
test_expect_success 'initialize source svn repo' '
|
||||||
svn_cmd mkdir -m x "$svnrepo"/trunk &&
|
svn_cmd mkdir -m x "$svnrepo"/trunk &&
|
||||||
svn_cmd mkdir -m x "$svnrepo"/branches &&
|
svn_cmd mkdir -m x "$svnrepo"/branches &&
|
||||||
|
@ -89,7 +89,8 @@ EOF
|
|||||||
test_expect_success PERL 'update git module' '
|
test_expect_success PERL 'update git module' '
|
||||||
|
|
||||||
(cd module-git &&
|
(cd module-git &&
|
||||||
git cvsimport -a -R -z 0 module &&
|
git config cvsimport.trackRevisions true &&
|
||||||
|
git cvsimport -a -z 0 module &&
|
||||||
git merge origin
|
git merge origin
|
||||||
) &&
|
) &&
|
||||||
test_cmp module-cvs/o_fortuna module-git/o_fortuna
|
test_cmp module-cvs/o_fortuna module-git/o_fortuna
|
||||||
@ -117,7 +118,8 @@ test_expect_success PERL 'cvsimport.module config works' '
|
|||||||
|
|
||||||
(cd module-git &&
|
(cd module-git &&
|
||||||
git config cvsimport.module module &&
|
git config cvsimport.module module &&
|
||||||
git cvsimport -a -R -z0 &&
|
git config cvsimport.trackRevisions true &&
|
||||||
|
git cvsimport -a -z0 &&
|
||||||
git merge origin
|
git merge origin
|
||||||
) &&
|
) &&
|
||||||
test_cmp module-cvs/tick module-git/tick
|
test_cmp module-cvs/tick module-git/tick
|
||||||
@ -137,6 +139,7 @@ test_expect_success PERL 'import from a CVS working tree' '
|
|||||||
|
|
||||||
$CVS co -d import-from-wt module &&
|
$CVS co -d import-from-wt module &&
|
||||||
(cd import-from-wt &&
|
(cd import-from-wt &&
|
||||||
|
git config cvsimport.trackRevisions false &&
|
||||||
git cvsimport -a -z0 &&
|
git cvsimport -a -z0 &&
|
||||||
echo 1 >expect &&
|
echo 1 >expect &&
|
||||||
git log -1 --pretty=format:%s%n >actual &&
|
git log -1 --pretty=format:%s%n >actual &&
|
||||||
|
@ -1057,6 +1057,13 @@ case $(uname -s) in
|
|||||||
# backslashes in pathspec are converted to '/'
|
# backslashes in pathspec are converted to '/'
|
||||||
# exec does not inherit the PID
|
# exec does not inherit the PID
|
||||||
test_set_prereq MINGW
|
test_set_prereq MINGW
|
||||||
|
test_set_prereq SED_STRIPS_CR
|
||||||
|
;;
|
||||||
|
*CYGWIN*)
|
||||||
|
test_set_prereq POSIXPERM
|
||||||
|
test_set_prereq EXECKEEPSPID
|
||||||
|
test_set_prereq NOT_MINGW
|
||||||
|
test_set_prereq SED_STRIPS_CR
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
test_set_prereq POSIXPERM
|
test_set_prereq POSIXPERM
|
||||||
|
9
trace.c
9
trace.c
@ -154,6 +154,7 @@ static const char *quote_crnl(const char *path)
|
|||||||
/* FIXME: move prefix to startup_info struct and get rid of this arg */
|
/* FIXME: move prefix to startup_info struct and get rid of this arg */
|
||||||
void trace_repo_setup(const char *prefix)
|
void trace_repo_setup(const char *prefix)
|
||||||
{
|
{
|
||||||
|
const char *git_work_tree;
|
||||||
char cwd[PATH_MAX];
|
char cwd[PATH_MAX];
|
||||||
char *trace = getenv("GIT_TRACE");
|
char *trace = getenv("GIT_TRACE");
|
||||||
|
|
||||||
@ -164,8 +165,14 @@ void trace_repo_setup(const char *prefix)
|
|||||||
if (!getcwd(cwd, PATH_MAX))
|
if (!getcwd(cwd, PATH_MAX))
|
||||||
die("Unable to get current working directory");
|
die("Unable to get current working directory");
|
||||||
|
|
||||||
|
if (!(git_work_tree = get_git_work_tree()))
|
||||||
|
git_work_tree = "(null)";
|
||||||
|
|
||||||
|
if (!prefix)
|
||||||
|
prefix = "(null)";
|
||||||
|
|
||||||
trace_printf("setup: git_dir: %s\n", quote_crnl(get_git_dir()));
|
trace_printf("setup: git_dir: %s\n", quote_crnl(get_git_dir()));
|
||||||
trace_printf("setup: worktree: %s\n", quote_crnl(get_git_work_tree()));
|
trace_printf("setup: worktree: %s\n", quote_crnl(git_work_tree));
|
||||||
trace_printf("setup: cwd: %s\n", quote_crnl(cwd));
|
trace_printf("setup: cwd: %s\n", quote_crnl(cwd));
|
||||||
trace_printf("setup: prefix: %s\n", quote_crnl(prefix));
|
trace_printf("setup: prefix: %s\n", quote_crnl(prefix));
|
||||||
}
|
}
|
||||||
|
17
userdiff.c
17
userdiff.c
@ -61,6 +61,23 @@ PATTERNS("pascal",
|
|||||||
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
|
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
|
||||||
"|<>|<=|>=|:=|\\.\\."
|
"|<>|<=|>=|:=|\\.\\."
|
||||||
"|[^[:space:]]|[\x80-\xff]+"),
|
"|[^[:space:]]|[\x80-\xff]+"),
|
||||||
|
PATTERNS("perl",
|
||||||
|
"^[ \t]*package .*;\n"
|
||||||
|
"^[ \t]*sub .* \\{\n"
|
||||||
|
"^[A-Z]+ \\{\n" /* BEGIN, END, ... */
|
||||||
|
"^=head[0-9] ", /* POD */
|
||||||
|
/* -- */
|
||||||
|
"[[:alpha:]_'][[:alnum:]_']*"
|
||||||
|
"|0[xb]?[0-9a-fA-F_]*"
|
||||||
|
/* taking care not to interpret 3..5 as (3.)(.5) */
|
||||||
|
"|[0-9a-fA-F_]+(\\.[0-9a-fA-F_]+)?([eE][-+]?[0-9_]+)?"
|
||||||
|
"|=>|-[rwxoRWXOezsfdlpSugkbctTBMAC>]|~~|::"
|
||||||
|
"|&&=|\\|\\|=|//=|\\*\\*="
|
||||||
|
"|&&|\\|\\||//|\\+\\+|--|\\*\\*|\\.\\.\\.?"
|
||||||
|
"|[-+*/%.^&<>=!|]="
|
||||||
|
"|=~|!~"
|
||||||
|
"|<<|<>|<=>|>>"
|
||||||
|
"|[^[:space:]]"),
|
||||||
PATTERNS("php",
|
PATTERNS("php",
|
||||||
"^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
|
"^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
|
||||||
"^[\t ]*(class.*)$",
|
"^[\t ]*(class.*)$",
|
||||||
|
@ -51,14 +51,14 @@ static struct {
|
|||||||
} rev_ctx;
|
} rev_ctx;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
uint32_t uuid, url;
|
uint32_t version, uuid, url;
|
||||||
} dump_ctx;
|
} dump_ctx;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
uint32_t svn_log, svn_author, svn_date, svn_executable, svn_special, uuid,
|
uint32_t svn_log, svn_author, svn_date, svn_executable, svn_special, uuid,
|
||||||
revision_number, node_path, node_kind, node_action,
|
revision_number, node_path, node_kind, node_action,
|
||||||
node_copyfrom_path, node_copyfrom_rev, text_content_length,
|
node_copyfrom_path, node_copyfrom_rev, text_content_length,
|
||||||
prop_content_length, content_length;
|
prop_content_length, content_length, svn_fs_dump_format_version;
|
||||||
} keys;
|
} keys;
|
||||||
|
|
||||||
static void reset_node_ctx(char *fname)
|
static void reset_node_ctx(char *fname)
|
||||||
@ -85,6 +85,7 @@ static void reset_rev_ctx(uint32_t revision)
|
|||||||
static void reset_dump_ctx(uint32_t url)
|
static void reset_dump_ctx(uint32_t url)
|
||||||
{
|
{
|
||||||
dump_ctx.url = url;
|
dump_ctx.url = url;
|
||||||
|
dump_ctx.version = 1;
|
||||||
dump_ctx.uuid = ~0;
|
dump_ctx.uuid = ~0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +106,7 @@ static void init_keys(void)
|
|||||||
keys.text_content_length = pool_intern("Text-content-length");
|
keys.text_content_length = pool_intern("Text-content-length");
|
||||||
keys.prop_content_length = pool_intern("Prop-content-length");
|
keys.prop_content_length = pool_intern("Prop-content-length");
|
||||||
keys.content_length = pool_intern("Content-length");
|
keys.content_length = pool_intern("Content-length");
|
||||||
|
keys.svn_fs_dump_format_version = pool_intern("SVN-fs-dump-format-version");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_props(void)
|
static void read_props(void)
|
||||||
@ -206,7 +208,12 @@ void svndump_read(const char *url)
|
|||||||
*val++ = '\0';
|
*val++ = '\0';
|
||||||
key = pool_intern(t);
|
key = pool_intern(t);
|
||||||
|
|
||||||
if (key == keys.uuid) {
|
if (key == keys.svn_fs_dump_format_version) {
|
||||||
|
dump_ctx.version = atoi(val);
|
||||||
|
if (dump_ctx.version > 2)
|
||||||
|
die("expected svn dump format version <= 2, found %d",
|
||||||
|
dump_ctx.version);
|
||||||
|
} else if (key == keys.uuid) {
|
||||||
dump_ctx.uuid = pool_intern(val);
|
dump_ctx.uuid = pool_intern(val);
|
||||||
} else if (key == keys.revision_number) {
|
} else if (key == keys.revision_number) {
|
||||||
if (active_ctx == NODE_CTX)
|
if (active_ctx == NODE_CTX)
|
||||||
|
Reference in New Issue
Block a user