Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/RelNotes-1.6.0.1.txt17
-rw-r--r--Documentation/RelNotes-1.6.0.2.txt87
-rw-r--r--Documentation/config.txt19
-rw-r--r--Documentation/diff-options.txt11
-rw-r--r--Documentation/git-annotate.txt5
-rw-r--r--Documentation/git-commit-tree.txt4
-rw-r--r--Documentation/git-for-each-ref.txt2
-rw-r--r--Documentation/git-name-rev.txt2
-rw-r--r--Documentation/git-send-email.txt3
-rw-r--r--Documentation/git-stash.txt16
-rw-r--r--Documentation/git-var.txt6
-rw-r--r--Documentation/git-web--browse.txt2
-rw-r--r--Documentation/git.txt7
-rw-r--r--Documentation/gitattributes.txt62
-rw-r--r--Documentation/gitk.txt7
-rw-r--r--Documentation/gitmodules.txt2
-rw-r--r--Documentation/gittutorial.txt29
-rw-r--r--Documentation/i18n.txt2
-rw-r--r--Documentation/merge-config.txt2
-rw-r--r--Documentation/pretty-formats.txt2
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile43
l---------RelNotes2
-rw-r--r--archive.c2
-rw-r--r--builtin-apply.c13
-rw-r--r--builtin-archive.c10
-rw-r--r--builtin-blame.c11
-rw-r--r--builtin-bundle.c4
-rw-r--r--builtin-cat-file.c4
-rw-r--r--builtin-check-ref-format.c2
-rw-r--r--builtin-checkout-index.c20
-rw-r--r--builtin-checkout.c39
-rw-r--r--builtin-clone.c19
-rw-r--r--builtin-commit-tree.c4
-rw-r--r--builtin-commit.c2
-rw-r--r--builtin-diff-files.c7
-rw-r--r--builtin-diff-index.c2
-rw-r--r--builtin-diff.c11
-rw-r--r--builtin-fast-export.c3
-rw-r--r--builtin-fetch-pack.c4
-rw-r--r--builtin-fetch.c6
-rw-r--r--builtin-for-each-ref.c3
-rw-r--r--builtin-grep.c7
-rw-r--r--builtin-http-fetch.c4
-rw-r--r--builtin-init-db.c2
-rw-r--r--builtin-ls-files.c6
-rw-r--r--builtin-merge.c16
-rw-r--r--builtin-pack-objects.c54
-rw-r--r--builtin-read-tree.c4
-rw-r--r--builtin-rev-list.c5
-rw-r--r--builtin-rm.c6
-rw-r--r--builtin-send-pack.c2
-rw-r--r--builtin-show-ref.c6
-rw-r--r--builtin-tar-tree.c20
-rw-r--r--builtin-unpack-objects.c2
-rw-r--r--builtin-update-index.c29
-rw-r--r--builtin-verify-pack.c3
-rw-r--r--cache.h3
-rw-r--r--combine-diff.c28
-rw-r--r--commit.h3
-rw-r--r--compat/fnmatch/fnmatch.c (renamed from compat/fnmatch.c)0
-rw-r--r--compat/fnmatch/fnmatch.h (renamed from compat/fnmatch.h)0
-rw-r--r--compat/regex/regex.c (renamed from compat/regex.c)0
-rw-r--r--compat/regex/regex.h (renamed from compat/regex.h)0
-rw-r--r--connect.c4
-rwxr-xr-xcontrib/completion/git-completion.bash12
-rwxr-xr-xcontrib/fast-import/git-p42
-rw-r--r--contrib/fast-import/git-p4.txt69
-rw-r--r--csum-file.c6
-rw-r--r--ctype.c5
-rw-r--r--diff.c26
-rw-r--r--diff.h2
-rw-r--r--entry.c20
-rw-r--r--fast-import.c3
-rwxr-xr-xgit-gui/git-gui.sh2
-rw-r--r--git-gui/lib/diff.tcl20
-rw-r--r--git-gui/lib/option.tcl2
-rw-r--r--git-gui/po/fr.po784
-rw-r--r--git-gui/po/po2msg.sh4
-rwxr-xr-xgit-stash.sh3
-rwxr-xr-xgit-svn.perl32
-rw-r--r--git.c2
-rwxr-xr-xgitweb/gitweb.perl2
-rw-r--r--grep.c52
-rw-r--r--grep.h7
-rw-r--r--help.c3
-rw-r--r--http.c11
-rw-r--r--index-pack.c46
-rw-r--r--merge-index.c6
-rw-r--r--pack-revindex.c12
-rw-r--r--pack-revindex.h1
-rw-r--r--pack-write.c79
-rw-r--r--pack.h2
-rw-r--r--perl/Git.pm42
-rw-r--r--pretty.c17
-rw-r--r--read-cache.c4
-rw-r--r--revision.c55
-rw-r--r--revision.h3
-rw-r--r--setup.c2
-rw-r--r--sha1_file.c5
-rw-r--r--shell.c21
-rw-r--r--sideband.c66
-rw-r--r--t/lib-git-svn.sh17
-rw-r--r--t/t0024-crlf-archive.sh46
-rwxr-xr-xt/t0050-filesystem.sh2
-rwxr-xr-xt/t1007-hash-object.sh2
-rwxr-xr-xt/t1200-tutorial.sh2
-rwxr-xr-xt/t1303-wacky-config.sh2
-rwxr-xr-xt/t1400-update-ref.sh10
-rwxr-xr-xt/t1501-worktree.sh64
-rwxr-xr-xt/t1503-rev-parse-verify.sh2
-rwxr-xr-xt/t2005-checkout-index-symlinks.sh4
-rwxr-xr-xt/t2050-git-dir-relative.sh4
-rwxr-xr-xt/t2101-update-index-reupdate.sh2
-rwxr-xr-xt/t2102-update-index-symlinks.sh2
-rwxr-xr-xt/t2200-add-update.sh12
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh2
-rwxr-xr-xt/t3020-ls-files-error-unmatch.sh2
-rwxr-xr-xt/t3030-merge-recursive.sh25
-rwxr-xr-xt/t3200-branch.sh58
-rwxr-xr-xt/t3210-pack-refs.sh4
-rwxr-xr-xt/t3300-funny-names.sh2
-rwxr-xr-xt/t3400-rebase.sh6
-rwxr-xr-xt/t3401-rebase-partial.sh22
-rwxr-xr-xt/t3403-rebase-skip.sh2
-rwxr-xr-xt/t3404-rebase-interactive.sh2
-rwxr-xr-xt/t3407-rebase-abort.sh2
-rwxr-xr-xt/t3500-cherry.sh12
-rwxr-xr-xt/t3600-rm.sh4
-rwxr-xr-xt/t3800-mktag.sh12
-rwxr-xr-xt/t3900-i18n-commit.sh6
-rwxr-xr-xt/t3901-i18n-patch.sh16
-rwxr-xr-xt/t3902-quoted.sh8
-rwxr-xr-xt/t3903-stash.sh2
-rwxr-xr-xt/t4012-diff-binary.sh4
-rwxr-xr-xt/t4015-diff-whitespace.sh16
-rwxr-xr-xt/t4016-diff-quote.sh4
-rwxr-xr-xt/t4018-diff-funcname.sh6
-rwxr-xr-xt/t4019-diff-wserror.sh12
-rwxr-xr-xt/t4103-apply-binary.sh26
-rwxr-xr-xt/t4104-apply-boundary.sh15
-rwxr-xr-xt/t4124-apply-ws-rule.sh2
-rwxr-xr-xt/t4127-apply-same-fn.sh4
-rwxr-xr-xt/t4150-am.sh2
-rwxr-xr-xt/t4151-am-abort.sh4
-rwxr-xr-xt/t4202-log.sh22
-rwxr-xr-xt/t5300-pack-object.sh22
-rwxr-xr-xt/t5301-sliding-window.sh4
-rwxr-xr-xt/t5302-pack-index.sh12
-rwxr-xr-xt/t5305-include-tag.sh2
-rwxr-xr-xt/t5306-pack-nobase.sh80
-rwxr-xr-xt/t5400-send-pack.sh30
-rwxr-xr-xt/t5401-update-hooks.sh4
-rwxr-xr-xt/t5402-post-merge-hook.sh4
-rwxr-xr-xt/t5403-post-checkout-hook.sh4
-rwxr-xr-xt/t5500-fetch-pack.sh4
-rwxr-xr-xt/t5505-remote.sh6
-rwxr-xr-xt/t5510-fetch.sh2
-rwxr-xr-xt/t5530-upload-pack-error.sh4
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh12
-rwxr-xr-xt/t5601-clone.sh18
-rwxr-xr-xt/t5602-clone-remote-exec.sh4
-rwxr-xr-xt/t6006-rev-list-format.sh12
-rwxr-xr-xt/t6025-merge-symlinks.sh32
-rwxr-xr-xt/t6026-merge-attr.sh12
-rwxr-xr-xt/t6030-bisect-porcelain.sh4
-rwxr-xr-xt/t6120-describe.sh30
-rwxr-xr-xt/t6300-for-each-ref.sh28
-rwxr-xr-xt/t7001-mv.sh12
-rwxr-xr-xt/t7002-grep.sh51
-rwxr-xr-xt/t7003-filter-branch.sh22
-rwxr-xr-xt/t7004-tag.sh318
-rwxr-xr-xt/t7101-reset.sh8
-rwxr-xr-xt/t7102-reset.sh4
-rwxr-xr-xt/t7103-reset-bare.sh2
-rwxr-xr-xt/t7201-co.sh24
-rwxr-xr-xt/t7300-clean.sh72
-rwxr-xr-xt/t7400-submodule-basic.sh48
-rwxr-xr-xt/t7401-submodule-summary.sh2
-rwxr-xr-xt/t7500-commit.sh2
-rwxr-xr-xt/t7501-commit.sh60
-rwxr-xr-xt/t7502-status.sh2
-rwxr-xr-xt/t7505-prepare-commit-msg-hook.sh2
-rwxr-xr-xt/t7506-status-submodule.sh2
-rwxr-xr-xt/t7600-merge.sh11
-rwxr-xr-xt/t7601-merge-pull-config.sh2
-rwxr-xr-xt/t7602-merge-octopus-many.sh2
-rwxr-xr-xt/t7603-merge-reduce-heads.sh2
-rwxr-xr-xt/t7604-merge-custom-message.sh2
-rwxr-xr-xt/t7605-merge-resolve.sh6
-rwxr-xr-xt/t7610-mergetool.sh2
-rwxr-xr-xt/t7701-repack-unpack-unreachable.sh2
-rwxr-xr-xt/t9001-send-email.sh2
-rwxr-xr-xt/t9113-git-svn-dcommit-new-file.sh14
-rwxr-xr-xt/t9118-git-svn-funky-branch-names.sh16
-rwxr-xr-xt/t9126-git-svn-follow-deleted-readded-directory.sh22
-rw-r--r--t/t9126/follow-deleted-readded.dump201
-rwxr-xr-xt/t9400-git-cvsserver-server.sh13
-rwxr-xr-xt/t9700/test.pl25
-rw-r--r--templates/Makefile12
-rw-r--r--tree-diff.c2
-rw-r--r--unpack-trees.c1
-rw-r--r--upload-pack.c18
203 files changed, 2555 insertions, 1370 deletions
diff --git a/Documentation/RelNotes-1.6.0.1.txt b/Documentation/RelNotes-1.6.0.1.txt
index bac117e89d..49d7a1cafa 100644
--- a/Documentation/RelNotes-1.6.0.1.txt
+++ b/Documentation/RelNotes-1.6.0.1.txt
@@ -4,6 +4,9 @@ GIT v1.6.0.1 Release Notes
Fixes since v1.6.0
------------------
+* "git diff --cc" did not honor content mangling specified by
+ gitattributes and core.autocrlf when reading from the work tree.
+
* "git diff --check" incorrectly detected new trailing blank lines when
whitespace check was in effect.
@@ -13,6 +16,8 @@ Fixes since v1.6.0
* "git format-patch" peeked before the beginning of a string when
"format.headers" variable is empty (a misconfiguration).
+* "git help help" did not work correctly.
+
* "git mailinfo" (hence "git am") was unhappy when MIME multipart message
contained garbage after the finishing boundary.
@@ -22,10 +27,10 @@ Fixes since v1.6.0
* "git merge" did not refresh the index correctly when a merge resulted in
a fast-forward.
-Contains other various documentation fixes.
+* "git merge" did not resolve a truly trivial merges that can be done
+ without content level merges.
---
-exec >/var/tmp/1
-O=v1.6.0-14-g3a634dc
-echo O=$(git describe maint)
-git shortlog --no-merges $O..maint
+* "git svn dcommit" to a repository with URL that has embedded usernames
+ did not work correctly.
+
+Contains other various documentation fixes.
diff --git a/Documentation/RelNotes-1.6.0.2.txt b/Documentation/RelNotes-1.6.0.2.txt
new file mode 100644
index 0000000000..7a9646fc4f
--- /dev/null
+++ b/Documentation/RelNotes-1.6.0.2.txt
@@ -0,0 +1,87 @@
+GIT v1.6.0.2 Release Notes
+==========================
+
+Fixes since v1.6.0.1
+--------------------
+
+* Installation on platforms that needs .exe suffix to git-* programs were
+ broken in 1.6.0.1.
+
+* Installation on filesystems without symbolic links support did nto
+ work well.
+
+* In-tree documentations and test scripts now use "git foo" form to set a
+ better example, instead of the "git-foo" form (which is an acceptable
+ form if you have "PATH=$(git --exec-path):$PATH" in your script)
+
+* Many commands did not use the correct working tree location when used
+ with GIT_WORK_TREE environment settings.
+
+* Some systems needs to use compatibility fnmach and regex libraries
+ independent from each other; the compat/ area has been reorganized to
+ allow this.
+
+
+* "git apply --unidiff-zero" incorrectly applied a -U0 patch that inserts
+ a new line before the second line.
+
+* "git blame -c" did not exactly work like "git annotate" when range
+ boundaries are involved.
+
+* "git checkout file" when file is still unmerged checked out contents from
+ a random high order stage, which was confusing.
+
+* "git clone $there $here/" with extra trailing slashes after explicit
+ local directory name $here did not work as expected.
+
+* "git diff" on tracked contents with CRLF line endings did not drive "less"
+ intelligently when showing added or removed lines.
+
+* "git diff --dirstat -M" did not add changes in subdirectories up
+ correctly for renamed paths.
+
+* "git diff --cumulative" did not imply "--dirstat".
+
+* "git for-each-ref refs/heads/" did not work as expected.
+
+* "git gui" allowed users to feed patch without any context to be applied.
+
+* "git gui" botched parsing "diff" output when a line that begins with two
+ dashes and a space gets removed or a line that begins with two pluses
+ and a space gets added.
+
+* "git gui" translation updates and i18n fixes.
+
+* "git index-pack" is more careful against disk corruption while completing
+ a thin pack.
+
+* "git log -i --grep=pattern" did not ignore case; neither "git log -E
+ --grep=pattern" triggered extended regexp.
+
+* "git log --pretty="%ad" --date=short" did not use short format when
+ showing the timestamp.
+
+* "git log --author=author" match incorrectly matched with the
+ timestamp part of "author " line in commit objects.
+
+* "git log -F --author=author" did not work at all.
+
+* Build procedure for "git shell" that used stub versions of some
+ functions and globals was not understood by linkers on some platforms.
+
+* "git stash" was fooled by a stat-dirty but otherwise unmodified paths
+ and refused to work until the user refreshed the index.
+
+* "git svn" was broken on Perl before 5.8 with recent fixes to reduce
+ use of temporary files.
+
+* "git verify-pack -v" did not work correctly when given more than one
+ packfile.
+
+Also contains many documentation updates.
+
+--
+exec >/var/tmp/1
+O=v1.6.0.1-78-g3632cfc
+echo O=$(git describe maint)
+git shortlog --no-merges $O..maint
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 676c39bb84..3727239891 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -358,8 +358,13 @@ core.editor::
`EDITOR` environment variables and then finally `vi`.
core.pager::
- The command that git will use to paginate output. Can be overridden
- with the `GIT_PAGER` environment variable.
+ The command that git will use to paginate output. Can
+ be overridden with the `GIT_PAGER` environment
+ variable. Note that git sets the `LESS` environment
+ variable to `FRSX` if it is unset when it runs the
+ pager. One can change these settings by setting the
+ `LESS` variable to some other value or by giving the
+ `core.pager` option a value such as "`less -+FRSX`".
core.whitespace::
A comma separated list of common whitespace problems to
@@ -688,7 +693,7 @@ gitcvs.logfile::
Path to a log file where the CVS server interface well... logs
various stuff. See linkgit:git-cvsserver[1].
-gitcvs.usecrlfattr
+gitcvs.usecrlfattr::
If true, the server will look up the `crlf` attribute for
files to determine the '-k' modes to use. If `crlf` is set,
the '-k' mode will be left blank, so cvs clients will
@@ -979,9 +984,11 @@ pack.packSizeLimit::
linkgit:git-repack[1].
pager.<cmd>::
- Allows to set your own pager preferences for each command, overriding
- the default. If `\--pager` or `\--no-pager` is specified on the command
- line, it takes precedence over this option.
+ Allows turning on or off pagination of the output of a
+ particular git subcommand when writing to a tty. If
+ `\--paginate` or `\--no-pager` is specified on the command line,
+ it takes precedence over this option. To disable pagination for
+ all commands, set `core.pager` or 'GIT_PAGER' to "`cat`".
pull.octopus::
The default merge strategy to use when pulling multiple branches
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index cba90fd27c..746646bb3d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -59,12 +59,11 @@ endif::git-format-patch[]
lines.
--dirstat[=limit]::
- Output only the sub-directories that are impacted by a diff,
- and to what degree they are impacted. You can override the
- default cut-off in percent (3) by "--dirstat=limit". If you
- want to enable "cumulative" directory statistics, you can use
- the "--cumulative" flag, which adds up percentages recursively
- even when they have been already reported for a sub-directory.
+ Output the distribution of relative amount of changes (number of lines added or
+ removed) for each sub-directory. Directories with changes below
+ a cut-off percent (3% by default) are not shown. The cut-off percent
+ can be set with "--dirstat=limit". Changes in a child directory is not
+ counted for the parent directory, unless "--cumulative" is used.
--summary::
Output a condensed summary of extended header information
diff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt
index 8b6b56a544..0aba022ba6 100644
--- a/Documentation/git-annotate.txt
+++ b/Documentation/git-annotate.txt
@@ -14,6 +14,11 @@ DESCRIPTION
Annotates each line in the given file with information from the commit
which introduced the line. Optionally annotate from a given revision.
+The only difference between this command and linkgit:git-blame[1] is that
+they use slightly different output formats, and this command exists only
+for backward compatibility to support existing scripts, and provide more
+familiar command name for people coming from other SCM systems.
+
OPTIONS
-------
include::blame-options.txt[]
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index 92ab3ab4a8..b8834baced 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -79,9 +79,9 @@ Diagnostics
You don't exist. Go away!::
The passwd(5) gecos field couldn't be read
Your parents must have hated you!::
- The password(5) gecos field is longer than a giant static buffer.
+ The passwd(5) gecos field is longer than a giant static buffer.
Your sysadmin must hate you!::
- The password(5) name field is longer than a giant static buffer.
+ The passwd(5) name field is longer than a giant static buffer.
Discussion
----------
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index eae6c0e7bc..ebd7c5fbb3 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -16,7 +16,7 @@ DESCRIPTION
Iterate over all refs that match `<pattern>` and show them
according to the given `<format>`, after sorting them according
-to the given set of `<key>`. If `<max>` is given, stop after
+to the given set of `<key>`. If `<count>` is given, stop after
showing that many refs. The interpolated values in `<format>`
can optionally be quoted as string literals in the specified
host language allowing their direct evaluation in that language.
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index abd2237e51..7ca8a7b48c 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -59,7 +59,7 @@ Enter 'git-name-rev':
------------
% git name-rev 33db5f4d9027a10e477ccf054b2c1ab94f74c85a
-33db5f4d9027a10e477ccf054b2c1ab94f74c85a tags/v0.99^0~940
+33db5f4d9027a10e477ccf054b2c1ab94f74c85a tags/v0.99~940
------------
Now you are wiser, because you know that it happened 940 revisions before v0.99.
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index e2437f30ca..3c3e1b0e77 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -179,6 +179,9 @@ user is prompted for a password while the input is masked for privacy.
This is useful if your default address is not the address that is
subscribed to a list. If you use the sendmail binary, you must have
suitable privileges for the -f parameter.
+ Default is the value of the 'sendemail.envelopesender' configuration
+ variable; if that is unspecified, choosing the envelope sender is left
+ to your MTA.
--to::
Specify the primary recipient of the emails generated.
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 49e2296a24..051f94d26f 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -159,7 +159,7 @@ perform a pull, and then unstash, like this:
+
----------------------------------------------------------------
$ git pull
-...
+ ...
file foobar not up to date, cannot merge.
$ git stash
$ git pull
@@ -174,7 +174,7 @@ make a commit to a temporary branch to store your changes away, and
return to your original branch to make the emergency fix, like this:
+
----------------------------------------------------------------
-... hack hack hack ...
+# ... hack hack hack ...
$ git checkout -b my_wip
$ git commit -a -m "WIP"
$ git checkout master
@@ -182,18 +182,18 @@ $ edit emergency fix
$ git commit -a -m "Fix in a hurry"
$ git checkout my_wip
$ git reset --soft HEAD^
-... continue hacking ...
+# ... continue hacking ...
----------------------------------------------------------------
+
You can use 'git-stash' to simplify the above, like this:
+
----------------------------------------------------------------
-... hack hack hack ...
+# ... hack hack hack ...
$ git stash
$ edit emergency fix
$ git commit -a -m "Fix in a hurry"
$ git stash apply
-... continue hacking ...
+# ... continue hacking ...
----------------------------------------------------------------
Testing partial commits::
@@ -203,13 +203,13 @@ more commits out of the changes in the work tree, and you want to test
each change before committing:
+
----------------------------------------------------------------
-... hack hack hack ...
+# ... hack hack hack ...
$ git add --patch foo # add just first part to the index
$ git stash save --keep-index # save all other changes to the stash
$ edit/build/test first part
-$ git commit foo -m 'First part' # commit fully tested change
+$ git commit -m 'First part' # commit fully tested change
$ git stash pop # prepare to work on all other changes
-... repeat above five steps until one commit remains ...
+# ... repeat above five steps until one commit remains ...
$ edit/build/test remaining parts
$ git commit foo -m 'Remaining parts'
----------------------------------------------------------------
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index 3647dd6c8f..e2f4c0901b 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -20,7 +20,7 @@ OPTIONS
Cause the logical variables to be listed. In addition, all the
variables of the git configuration file .git/config are listed
as well. (However, the configuration variables listing functionality
- is deprecated in favor of 'git-config -l'.)
+ is deprecated in favor of 'git config -l'.)
EXAMPLE
--------
@@ -41,9 +41,9 @@ Diagnostics
You don't exist. Go away!::
The passwd(5) gecos field couldn't be read
Your parents must have hated you!::
- The password(5) gecos field is longer than a giant static buffer.
+ The passwd(5) gecos field is longer than a giant static buffer.
Your sysadmin must hate you!::
- The password(5) name field is longer than a giant static buffer.
+ The passwd(5) name field is longer than a giant static buffer.
SEE ALSO
--------
diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt
index 36afad8d4e..7f7a45b2ea 100644
--- a/Documentation/git-web--browse.txt
+++ b/Documentation/git-web--browse.txt
@@ -77,7 +77,7 @@ the URLs passed as arguments.
Note about konqueror
--------------------
-When 'konqueror' is specified by the a command line option or a
+When 'konqueror' is specified by a command line option or a
configuration variable, we launch 'kfmclient' to try to open the HTML
man page on an already opened konqueror in a new tab if possible.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 1bc295dd54..df420aeb33 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,11 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.6.0/git.html[documentation for release 1.6.0]
+* link:v1.6.0.2/git.html[documentation for release 1.6.0.2]
* release notes for
+ link:RelNotes-1.6.0.2.txt[1.6.0.2],
+ link:RelNotes-1.6.0.1.txt[1.6.0.1],
link:RelNotes-1.6.0.txt[1.6.0].
* link:v1.5.6.5/git.html[documentation for release 1.5.6.5]
@@ -497,7 +499,8 @@ other
'GIT_PAGER'::
This environment variable overrides `$PAGER`. If it is set
to an empty string or to the value "cat", git will not launch
- a pager.
+ a pager. See also the `core.pager` option in
+ linkgit:git-config[1].
'GIT_SSH'::
If this environment variable is set then 'git-fetch'
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index db16b0ca5b..89627688b8 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -7,7 +7,7 @@ gitattributes - defining attributes per path
SYNOPSIS
--------
-$GIT_DIR/info/attributes, gitattributes
+$GIT_DIR/info/attributes, .gitattributes
DESCRIPTION
@@ -105,9 +105,8 @@ Set::
Unset::
- Unsetting the `crlf` attribute on a path is meant to
- mark the path as a "binary" file. The path never goes
- through line endings conversion upon checkin/checkout.
+ Unsetting the `crlf` attribute on a path tells git not to
+ attempt any end-of-line conversion upon checkin or checkout.
Unspecified::
@@ -271,27 +270,27 @@ See linkgit:git[1] for details.
Defining a custom hunk-header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Each group of changes (called "hunk") in the textual diff output
+Each group of changes (called a "hunk") in the textual diff output
is prefixed with a line of the form:
@@ -k,l +n,m @@ TEXT
-The text is called 'hunk header', and by default a line that
-begins with an alphabet, an underscore or a dollar sign is used,
-which matches what GNU 'diff -p' output uses. This default
-selection however is not suited for some contents, and you can
-use customized pattern to make a selection.
+This is called a 'hunk header'. The "TEXT" portion is by default a line
+that begins with an alphabet, an underscore or a dollar sign; this
+matches what GNU 'diff -p' output uses. This default selection however
+is not suited for some contents, and you can use a customized pattern
+to make a selection.
-First in .gitattributes, you would assign the `diff` attribute
+First, in .gitattributes, you would assign the `diff` attribute
for paths.
------------------------
*.tex diff=tex
------------------------
-Then, you would define "diff.tex.funcname" configuration to
+Then, you would define a "diff.tex.funcname" configuration to
specify a regular expression that matches a line that you would
-want to appear as the hunk header, like this:
+want to appear as the hunk header "TEXT", like this:
------------------------
[diff "tex"]
@@ -312,7 +311,7 @@ patterns are available:
- `bibtex` suitable for files with BibTeX coded references.
-- `java` suitable for source code in the Java lanugage.
+- `java` suitable for source code in the Java language.
- `pascal` suitable for source code in the Pascal/Delphi language.
@@ -482,6 +481,41 @@ in the file. E.g. the string `$Format:%H$` will be replaced by the
commit hash.
+USING ATTRIBUTE MACROS
+----------------------
+
+You do not want any end-of-line conversions applied to, nor textual diffs
+produced for, any binary file you track. You would need to specify e.g.
+
+------------
+*.jpg -crlf -diff
+------------
+
+but that may become cumbersome, when you have many attributes. Using
+attribute macros, you can specify groups of attributes set or unset at
+the same time. The system knows a built-in attribute macro, `binary`:
+
+------------
+*.jpg binary
+------------
+
+which is equivalent to the above. Note that the attribute macros can only
+be "Set" (see the above example that sets "binary" macro as if it were an
+ordinary attribute --- setting it in turn unsets "crlf" and "diff").
+
+
+DEFINING ATTRIBUTE MACROS
+-------------------------
+
+Custom attribute macros can be defined only in the `.gitattributes` file
+at the toplevel (i.e. not in any subdirectory). The built-in attribute
+macro "binary" is equivalent to:
+
+------------
+[attr]binary -diff -crlf
+------------
+
+
EXAMPLE
-------
diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt
index 6e827cd11c..ae29a00d59 100644
--- a/Documentation/gitk.txt
+++ b/Documentation/gitk.txt
@@ -49,6 +49,13 @@ frequently used options.
the history between two branches (i.e. the HEAD and the MERGE_HEAD)
that modify the conflicted files.
+--argscmd=<command>::
+ Command to be run each time gitk has to determine the list of
+ <revs> to show. The command is expected to print on its standard
+ output a list of additional revs to be shown, one per line.
+ Use this instead of explicitly specifying <revs> if the set of
+ commits to show may vary between refreshes.
+
<revs>::
Limit the revisions to show. This can be either a single revision
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index f8d122a8b9..d1a17e2625 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -7,7 +7,7 @@ gitmodules - defining submodule properties
SYNOPSIS
--------
-gitmodules
+$GIT_WORK_DIR/.gitmodules
DESCRIPTION
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 48d1454a90..384972cb9b 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -321,10 +321,37 @@ pulling, like this:
------------------------------------------------
alice$ git fetch /home/bob/myrepo master
-alice$ git log -p ..FETCH_HEAD
+alice$ git log -p HEAD..FETCH_HEAD
------------------------------------------------
This operation is safe even if Alice has uncommitted local changes.
+The range notation HEAD..FETCH_HEAD" means "show everything that is reachable
+from the FETCH_HEAD but exclude anything that is reachable from HEAD.
+Alice already knows everything that leads to her current state (HEAD),
+and reviewing what Bob has in his state (FETCH_HEAD) that she has not
+seen with this command
+
+If Alice wants to visualize what Bob did since their histories forked
+she can issue the following command:
+
+------------------------------------------------
+$ gitk HEAD..FETCH_HEAD
+------------------------------------------------
+
+This uses the same two-dot range notation we saw earlier with 'git log'.
+
+Alice may want to view what both of them did since they forked.
+She can use three-dot form instead of the two-dot form:
+
+------------------------------------------------
+$ gitk HEAD...FETCH_HEAD
+------------------------------------------------
+
+This means "show everything that is reachable from either one, but
+exclude anything that is reachable from both of them".
+
+Please note that these range notation can be used with both gitk
+and "git log".
After inspecting what Bob did, if there is nothing urgent, Alice may
decide to continue working without pulling from Bob. If Bob's history
diff --git a/Documentation/i18n.txt b/Documentation/i18n.txt
index fb0d7da56b..d2970f8357 100644
--- a/Documentation/i18n.txt
+++ b/Documentation/i18n.txt
@@ -21,7 +21,7 @@ project find it more convenient to use legacy encodings, git
does not forbid it. However, there are a few things to keep in
mind.
-. 'git-commit-tree' (hence, 'git-commit' which uses it) issues
+. 'git-commit' and 'git-commit-tree' issues
a warning if the commit log message given to it does not look
like a valid UTF-8 string, unless you explicitly say your
project uses a legacy encoding. The way to say this is to
diff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt
index 00277e0613..c735788b0f 100644
--- a/Documentation/merge-config.txt
+++ b/Documentation/merge-config.txt
@@ -1,5 +1,5 @@
merge.stat::
- Whether to print the diffstat between ORIG_HEAD and merge result
+ Whether to print the diffstat between ORIG_HEAD and the merge result
at the end of the merge. True by default.
merge.log::
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index c11d495771..388d4925e6 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -103,7 +103,7 @@ The placeholders are:
- '%an': author name
- '%aN': author name (respecting .mailmap)
- '%ae': author email
-- '%ad': author date
+- '%ad': author date (format respects --date= option)
- '%aD': author date, RFC2822 style
- '%ar': author date, relative
- '%at': author date, UNIX timestamp
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 156dc13733..6c7465c758 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.6.0.GIT
+DEF_VER=v1.6.0.2.GIT
LF='
'
diff --git a/Makefile b/Makefile
index 53ab4b5536..8d81095765 100644
--- a/Makefile
+++ b/Makefile
@@ -333,7 +333,6 @@ endif
export PERL_PATH
LIB_FILE=libgit.a
-COMPAT_LIB = compat/lib.a
XDIFF_LIB=xdiff/lib.a
LIB_H += archive.h
@@ -359,6 +358,7 @@ LIB_H += list-objects.h
LIB_H += ll-merge.h
LIB_H += log-tree.h
LIB_H += mailmap.h
+LIB_H += merge-recursive.h
LIB_H += object.h
LIB_H += pack.h
LIB_H += pack-refs.h
@@ -626,6 +626,8 @@ ifeq ($(uname_S),Darwin)
endif
NO_STRLCPY = YesPlease
NO_MEMMEM = YesPlease
+ COMPAT_CFLAGS += -Icompat/regex
+ COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),SunOS)
NEEDS_SOCKET = YesPlease
@@ -675,6 +677,8 @@ ifeq ($(uname_S),FreeBSD)
BASIC_CFLAGS += -I/usr/local/include
BASIC_LDFLAGS += -L/usr/local/lib
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
+ COMPAT_CFLAGS += -Icompat/regex
+ COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),OpenBSD)
NO_STRCASESTR = YesPlease
@@ -700,6 +704,8 @@ ifeq ($(uname_S),AIX)
INTERNAL_QSORT = UnfortunatelyYes
NEEDS_LIBICONV=YesPlease
BASIC_CFLAGS += -D_LARGE_FILES
+ COMPAT_CFLAGS += -Icompat/regex
+ COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),GNU)
# GNU/Hurd
@@ -727,6 +733,7 @@ ifeq ($(uname_S),HP-UX)
NO_UNSETENV = YesPlease
NO_HSTRERROR = YesPlease
NO_SYS_SELECT_H = YesPlease
+ SNPRINTF_RETURNS_BOGUS = YesPlease
endif
ifneq (,$(findstring MINGW,$(uname_S)))
NO_MMAP = YesPlease
@@ -749,10 +756,10 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_SVN_TESTS = YesPlease
NO_PERL_MAKEMAKER = YesPlease
NO_POSIX_ONLY_PROGRAMS = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch
COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
- COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o compat/winansi.o
+ COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/regex/regex.o compat/winansi.o
EXTLIBS += -lws2_32
X = .exe
gitexecdir = ../libexec/git-core
@@ -1098,7 +1105,10 @@ help.o: help.c common-cmds.h GIT-CFLAGS
'-DGIT_INFO_PATH="$(infodir_SQ)"' $<
$(BUILT_INS): git$X
- $(QUIET_BUILT_IN)$(RM) $@ && ln git$X $@
+ $(QUIET_BUILT_IN)$(RM) $@ && \
+ ln git$X $@ 2>/dev/null || \
+ ln -s git$X $@ 2>/dev/null || \
+ cp git$X $@
common-cmds.h: ./generate-cmdlist.sh command-list.txt
@@ -1223,12 +1233,6 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
-$(COMPAT_LIB): $(COMPAT_OBJS)
- $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(COMPAT_OBJS)
-
-git-shell$X: abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o $(COMPAT_LIB)
- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(COMPAT_LIB)
-
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
builtin-revert.o wt-status.o: wt-status.h
@@ -1363,16 +1367,13 @@ ifneq (,$X)
endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
- if test "z$$bindir" != "z$$execdir"; \
- then \
- ln -f "$$bindir/git$X" "$$execdir/git$X" || \
- cp "$$bindir/git$X" "$$execdir/git$X"; \
- fi && \
- { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \
- if test "z$$bindir" != "z$$execdir"; \
- then \
- $(RM) "$$execdir/git$X"; \
- fi && \
+ { $(RM) "$$execdir/git-add$X" && \
+ ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
+ cp git-add$X "$$execdir/git-add$X"; } && \
+ { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
+ ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
+ ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
+ cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
install-doc:
@@ -1441,7 +1442,7 @@ distclean: clean
clean:
$(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
- $(LIB_FILE) $(XDIFF_LIB) $(COMPAT_LIB)
+ $(LIB_FILE) $(XDIFF_LIB)
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
diff --git a/RelNotes b/RelNotes
index 8f32997335..726bff6d9f 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes-1.6.0.1.txt \ No newline at end of file
+Documentation/RelNotes-1.6.0.2.txt \ No newline at end of file
diff --git a/archive.c b/archive.c
index 5b40e261f1..e2280df567 100644
--- a/archive.c
+++ b/archive.c
@@ -48,7 +48,7 @@ static void format_subst(const struct commit *commit,
strbuf_add(&fmt, b + 8, c - b - 8);
strbuf_add(buf, src, b - src);
- format_commit_message(commit, fmt.buf, buf);
+ format_commit_message(commit, fmt.buf, buf, DATE_NORMAL);
len -= c + 1 - src;
src = c + 1;
}
diff --git a/builtin-apply.c b/builtin-apply.c
index 2216a0bf7c..20bef1f21d 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -274,7 +274,7 @@ static void say_patch_name(FILE *output, const char *pre,
static void read_patch_file(struct strbuf *sb, int fd)
{
if (strbuf_read(sb, fd, 0) < 0)
- die("git-apply: read returned %s", strerror(errno));
+ die("git apply: read returned %s", strerror(errno));
/*
* Make sure that we have some slop in the buffer
@@ -506,17 +506,17 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name,
name = orig_name;
len = strlen(name);
if (isnull)
- die("git-apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
+ die("git apply: bad git-diff - expected /dev/null, got %s on line %d", name, linenr);
another = find_name(line, NULL, p_value, TERM_TAB);
if (!another || memcmp(another, name, len))
- die("git-apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
+ die("git apply: bad git-diff - inconsistent %s filename on line %d", oldnew, linenr);
free(another);
return orig_name;
}
else {
/* expect "/dev/null" */
if (memcmp("/dev/null", line, 9) || line[9] != '\n')
- die("git-apply: bad git-diff - expected /dev/null on line %d", linenr);
+ die("git apply: bad git-diff - expected /dev/null on line %d", linenr);
return NULL;
}
}
@@ -1996,6 +1996,8 @@ static int apply_one_fragment(struct image *img, struct fragment *frag,
/*
* A hunk to change lines at the beginning would begin with
* @@ -1,L +N,M @@
+ * but we need to be careful. -U0 that inserts before the second
+ * line also has this pattern.
*
* And a hunk to add to an empty file would begin with
* @@ -0,0 +N,M @@
@@ -2003,7 +2005,8 @@ static int apply_one_fragment(struct image *img, struct fragment *frag,
* In other words, a hunk that is (frag->oldpos <= 1) with or
* without leading context must match at the beginning.
*/
- match_beginning = frag->oldpos <= 1;
+ match_beginning = (!frag->oldpos ||
+ (frag->oldpos == 1 && !unidiff_zero));
/*
* A hunk without trailing lines must match at the end.
diff --git a/builtin-archive.c b/builtin-archive.c
index 22445acbfc..432ce2acc6 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -47,18 +47,18 @@ static int run_remote_archiver(const char *remote, int argc,
len = packet_read_line(fd[0], buf, sizeof(buf));
if (!len)
- die("git-archive: expected ACK/NAK, got EOF");
+ die("git archive: expected ACK/NAK, got EOF");
if (buf[len-1] == '\n')
buf[--len] = 0;
if (strcmp(buf, "ACK")) {
if (len > 5 && !prefixcmp(buf, "NACK "))
- die("git-archive: NACK %s", buf + 5);
- die("git-archive: protocol error");
+ die("git archive: NACK %s", buf + 5);
+ die("git archive: protocol error");
}
len = packet_read_line(fd[0], buf, sizeof(buf));
if (len)
- die("git-archive: expected a flush");
+ die("git archive: expected a flush");
/* Now, start reading from fd[0] and spit it out to stdout */
rv = recv_sideband("archive", fd[0], 1, 2);
@@ -111,6 +111,8 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
{
const char *remote = NULL;
+ git_config(git_default_config, NULL);
+
remote = extract_remote_arg(&argc, argv);
if (remote)
return run_remote_archiver(remote, argc, argv);
diff --git a/builtin-blame.c b/builtin-blame.c
index 4ea343189f..9bc901c292 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -38,7 +38,6 @@ static int show_root;
static int reverse;
static int blank_boundary;
static int incremental;
-static int cmd_is_annotate;
static int xdl_opts = XDF_NEED_MINIMAL;
static struct string_list mailmap;
@@ -1686,7 +1685,7 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
if (suspect->commit->object.flags & UNINTERESTING) {
if (blank_boundary)
memset(hex, ' ', length);
- else if (!cmd_is_annotate) {
+ else if (!(opt & OUTPUT_ANNOTATE_COMPAT)) {
length--;
putchar('^');
}
@@ -1791,7 +1790,7 @@ static int prepare_lines(struct scoreboard *sb)
/*
* Add phony grafts for use with -S; this is primarily to
- * support git-cvsserver that wants to give a linear history
+ * support git's cvsserver that wants to give a linear history
* to its clients.
*/
static int read_ancestry(const char *graft_file)
@@ -2317,8 +2316,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
};
struct parse_opt_ctx_t ctx;
-
- cmd_is_annotate = !strcmp(argv[0], "annotate");
+ int cmd_is_annotate = !strcmp(argv[0], "annotate");
git_config(git_blame_config, NULL);
init_revisions(&revs, NULL);
@@ -2346,6 +2344,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
parse_done:
argc = parse_options_end(&ctx);
+ if (cmd_is_annotate)
+ output_option |= OUTPUT_ANNOTATE_COMPAT;
+
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
PICKAXE_BLAME_COPY_HARDER);
diff --git a/builtin-bundle.c b/builtin-bundle.c
index ac476e7a4b..9b58152047 100644
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
@@ -6,10 +6,10 @@
* Basic handler for bundle files to connect repositories via sneakernet.
* Invocation must include action.
* This function can create a bundle or provide information on an existing
- * bundle supporting git-fetch, git-pull, and git-ls-remote
+ * bundle supporting "fetch", "pull", and "ls-remote".
*/
-static const char *bundle_usage="git-bundle (create <bundle> <git-rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
+static const char *bundle_usage="git bundle (create <bundle> <git rev-list args> | verify <bundle> | list-heads <bundle> [refname]... | unbundle <bundle> [refname]... )";
int cmd_bundle(int argc, const char **argv, const char *prefix)
{
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 7441a56acd..3fba6b9e74 100644
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
@@ -137,11 +137,11 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
break;
default:
- die("git-cat-file: unknown option: %s\n", exp_type);
+ die("git cat-file: unknown option: %s\n", exp_type);
}
if (!buf)
- die("git-cat-file %s: bad file", obj_name);
+ die("git cat-file %s: bad file", obj_name);
write_or_die(1, buf, size);
return 0;
diff --git a/builtin-check-ref-format.c b/builtin-check-ref-format.c
index fe04be77a9..701de439ae 100644
--- a/builtin-check-ref-format.c
+++ b/builtin-check-ref-format.c
@@ -9,6 +9,6 @@
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
{
if (argc != 2)
- usage("git-check-ref-format refname");
+ usage("git check-ref-format refname");
return !!check_ref_format(argv[1]);
}
diff --git a/builtin-checkout-index.c b/builtin-checkout-index.c
index 71ebabf990..55b7aafe06 100644
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
@@ -5,26 +5,26 @@
*
* Careful: order of argument flags does matter. For example,
*
- * git-checkout-index -a -f file.c
+ * git checkout-index -a -f file.c
*
* Will first check out all files listed in the cache (but not
* overwrite any old ones), and then force-checkout "file.c" a
* second time (ie that one _will_ overwrite any old contents
* with the same filename).
*
- * Also, just doing "git-checkout-index" does nothing. You probably
- * meant "git-checkout-index -a". And if you want to force it, you
- * want "git-checkout-index -f -a".
+ * Also, just doing "git checkout-index" does nothing. You probably
+ * meant "git checkout-index -a". And if you want to force it, you
+ * want "git checkout-index -f -a".
*
* Intuitiveness is not the goal here. Repeatability is. The
* reason for the "no arguments means no work" thing is that
* from scripts you are supposed to be able to do things like
*
- * find . -name '*.h' -print0 | xargs -0 git-checkout-index -f --
+ * find . -name '*.h' -print0 | xargs -0 git checkout-index -f --
*
* or:
*
- * find . -name '*.h' -print0 | git-checkout-index -f -z --stdin
+ * find . -name '*.h' -print0 | git checkout-index -f -z --stdin
*
* which will force all existing *.h files to be replaced with
* their cached copies. If an empty command line implied "all",
@@ -107,7 +107,7 @@ static int checkout_file(const char *name, int prefix_length)
}
if (!state.quiet) {
- fprintf(stderr, "git-checkout-index: %s ", name);
+ fprintf(stderr, "git checkout-index: %s ", name);
if (!has_same_name)
fprintf(stderr, "is not in the cache");
else if (checkout_stage)
@@ -258,9 +258,9 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
const char *p;
if (all)
- die("git-checkout-index: don't mix '--all' and explicit filenames");
+ die("git checkout-index: don't mix '--all' and explicit filenames");
if (read_from_stdin)
- die("git-checkout-index: don't mix '--stdin' and explicit filenames");
+ die("git checkout-index: don't mix '--stdin' and explicit filenames");
p = prefix_path(prefix, prefix_length, arg);
checkout_file(p, prefix_length);
if (p < arg || p > arg + strlen(arg))
@@ -271,7 +271,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
struct strbuf buf, nbuf;
if (all)
- die("git-checkout-index: don't mix '--all' and '--stdin'");
+ die("git checkout-index: don't mix '--all' and '--stdin'");
strbuf_init(&buf, 0);
strbuf_init(&nbuf, 0);
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 411cc513c6..8e77767b49 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -76,6 +76,15 @@ static int read_tree_some(struct tree *tree, const char **pathspec)
return 0;
}
+static int skip_same_name(struct cache_entry *ce, int pos)
+{
+ while (++pos < active_nr &&
+ !strcmp(active_cache[pos]->name, ce->name))
+ ; /* skip */
+ return pos;
+}
+
+
static int checkout_paths(struct tree *source_tree, const char **pathspec)
{
int pos;
@@ -107,6 +116,20 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec)
if (report_path_error(ps_matched, pathspec, 0))
return 1;
+ /* Any unmerged paths? */
+ for (pos = 0; pos < active_nr; pos++) {
+ struct cache_entry *ce = active_cache[pos];
+ if (pathspec_match(pathspec, NULL, ce->name, 0)) {
+ if (!ce_stage(ce))
+ continue;
+ errs = 1;
+ error("path '%s' is unmerged", ce->name);
+ pos = skip_same_name(ce, pos) - 1;
+ }
+ }
+ if (errs)
+ return 1;
+
/* Now we are committed to check them out */
memset(&state, 0, sizeof(state));
state.force = 1;
@@ -114,7 +137,11 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec)
for (pos = 0; pos < active_nr; pos++) {
struct cache_entry *ce = active_cache[pos];
if (pathspec_match(pathspec, NULL, ce->name, 0)) {
- errs |= checkout_entry(ce, &state, NULL);
+ if (!ce_stage(ce)) {
+ errs |= checkout_entry(ce, &state, NULL);
+ continue;
+ }
+ pos = skip_same_name(ce, pos) - 1;
}
}
@@ -386,13 +413,11 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
}
/*
- * If the new thing isn't a branch and isn't HEAD and we're
- * not starting a new branch, and we want messages, and we
- * weren't on a branch, and we're moving to a new commit,
- * describe the old commit.
+ * If we were on a detached HEAD, but we are now moving to
+ * a new commit, we want to mention the old commit once more
+ * to remind the user that it might be lost.
*/
- if (!new->path && strcmp(new->name, "HEAD") && !opts->new_branch &&
- !opts->quiet && !old.path && new->commit != old.commit)
+ if (!opts->quiet && !old.path && new->commit != old.commit)
describe_detached_head("Previous HEAD position was", old.commit);
if (!old.commit) {
diff --git a/builtin-clone.c b/builtin-clone.c
index c0e3086437..c8435295ce 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -147,6 +147,15 @@ static int is_directory(const char *path)
return !stat(path, &buf) && S_ISDIR(buf.st_mode);
}
+static void strip_trailing_slashes(char *dir)
+{
+ char *end = dir + strlen(dir);
+
+ while (dir < end - 1 && is_dir_sep(end[-1]))
+ end--;
+ *end = '\0';
+}
+
static void setup_reference(const char *repo)
{
const char *ref_git;
@@ -387,7 +396,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
path = get_repo_path(repo_name, &is_bundle);
if (path)
- repo = path;
+ repo = xstrdup(make_nonrelative_path(repo_name));
else if (!strchr(repo_name, ':'))
repo = xstrdup(make_absolute_path(repo_name));
else
@@ -397,6 +406,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
dir = xstrdup(argv[1]);
else
dir = guess_dir_name(repo_name, is_bundle, option_bare);
+ strip_trailing_slashes(dir);
if (!stat(dir, &buf))
die("destination directory '%s' already exists.", dir);
@@ -422,10 +432,11 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (!option_bare) {
junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
- die("could not create leading directories of '%s'",
- work_tree);
+ die("could not create leading directories of '%s': %s",
+ work_tree, strerror(errno));
if (mkdir(work_tree, 0755))
- die("could not create work tree dir '%s'.", work_tree);
+ die("could not create work tree dir '%s': %s.",
+ work_tree, strerror(errno));
set_git_work_tree(work_tree);
}
junk_git_dir = git_dir;
diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c
index 7a9a309be0..9b84c48dce 100644
--- a/builtin-commit-tree.c
+++ b/builtin-commit-tree.c
@@ -24,7 +24,7 @@ static void check_valid(unsigned char *sha1, enum object_type expect)
typename(expect));
}
-static const char commit_tree_usage[] = "git-commit-tree <sha1> [-p <sha1>]* < changelog";
+static const char commit_tree_usage[] = "git commit-tree <sha1> [-p <sha1>]* < changelog";
static void new_parent(struct commit *parent, struct commit_list **parents_p)
{
@@ -118,7 +118,7 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
}
if (strbuf_read(&buffer, 0, 0) < 0)
- die("git-commit-tree: read returned %s", strerror(errno));
+ die("git commit-tree: read returned %s", strerror(errno));
if (!commit_tree(buffer.buf, tree_sha1, parents, commit_sha1)) {
printf("%s\n", sha1_to_hex(commit_sha1));
diff --git a/builtin-commit.c b/builtin-commit.c
index 649c8beb3e..c870037b07 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -882,7 +882,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
if (!log_tree_commit(&rev, commit)) {
struct strbuf buf = STRBUF_INIT;
- format_commit_message(commit, "%h: %s", &buf);
+ format_commit_message(commit, "%h: %s", &buf, DATE_NORMAL);
printf("%s\n", buf.buf);
strbuf_release(&buf);
}
diff --git a/builtin-diff-files.c b/builtin-diff-files.c
index 9bf10bb37e..2b578c714d 100644
--- a/builtin-diff-files.c
+++ b/builtin-diff-files.c
@@ -50,7 +50,12 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
3 < rev.max_count)
usage(diff_files_usage);
- if (rev.max_count == -1 &&
+ /*
+ * "diff-files --base -p" should not combine merges because it
+ * was not asked to. "diff-files -c -p" should not densify
+ * (the user should ask with "diff-files --cc" explicitly).
+ */
+ if (rev.max_count == -1 && !rev.combine_merges &&
(rev.diffopt.output_format & DIFF_FORMAT_PATCH))
rev.combine_merges = rev.dense_combined_merges = 1;
diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index 17d851b29e..04837494fe 100644
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
@@ -39,6 +39,8 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
if (rev.pending.nr != 1 ||
rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
usage(diff_cache_usage);
+ if (!cached)
+ setup_work_tree();
if (read_cache() < 0) {
perror("read_cache");
return -1;
diff --git a/builtin-diff.c b/builtin-diff.c
index 7ffea97505..d5fe775fc1 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -122,6 +122,8 @@ static int builtin_diff_index(struct rev_info *revs,
usage(builtin_diff_usage);
argv++; argc--;
}
+ if (!cached)
+ setup_work_tree();
/*
* Make sure there is one revision (i.e. pending object),
* and there is no revision filtering parameters.
@@ -221,10 +223,17 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
argv++; argc--;
}
- if (revs->max_count == -1 &&
+ /*
+ * "diff --base" should not combine merges because it was not
+ * asked to. "diff -c" should not densify (if the user wants
+ * dense one, --cc can be explicitly asked for, or just rely
+ * on the default).
+ */
+ if (revs->max_count == -1 && !revs->combine_merges &&
(revs->diffopt.output_format & DIFF_FORMAT_PATCH))
revs->combine_merges = revs->dense_combined_merges = 1;
+ setup_work_tree();
if (read_cache() < 0) {
perror("read_cache");
return -1;
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index 070971616d..7c93eb878d 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -417,7 +417,8 @@ static void export_marks(char *file)
for (i = 0; i < idnums.size; i++) {
if (deco->base && deco->base->type == 1) {
mark = ptr_to_mark(deco->decoration);
- fprintf(f, ":%u %s\n", mark, sha1_to_hex(deco->base->sha1));
+ fprintf(f, ":%"PRIu32" %s\n", mark,
+ sha1_to_hex(deco->base->sha1));
}
deco++;
}
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 273239af3b..85509f5ee5 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -609,7 +609,7 @@ static struct ref *do_fetch_pack(int fd[2],
fprintf(stderr, "warning: no common commits\n");
if (get_pack(fd, pack_lockfile))
- die("git-fetch-pack: fetch failed.");
+ die("git fetch-pack: fetch failed.");
all_done:
return ref;
@@ -750,7 +750,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
if (!ret && nr_heads) {
/* If the heads to pull were given, we should have
* consumed all of them by matching the remote.
- * Otherwise, 'git-fetch remote no-such-ref' would
+ * Otherwise, 'git fetch remote no-such-ref' would
* silently succeed without issuing an error.
*/
for (i = 0; i < nr_heads; i++)
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 7eec4a0e43..ee93d3a93d 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -86,10 +86,10 @@ static void add_merge_config(struct ref **head,
/*
* Not fetched to a tracking branch? We need to fetch
* it anyway to allow this branch's "branch.$name.merge"
- * to be honored by git-pull, but we do not have to
+ * to be honored by 'git pull', but we do not have to
* fail if branch.$name.merge is misconfigured to point
* at a nonexisting branch. If we were indeed called by
- * git-pull, it will notice the misconfiguration because
+ * 'git pull', it will notice the misconfiguration because
* there is no entry in the resulting FETCH_HEAD marked
* for merging.
*/
@@ -396,7 +396,7 @@ static int store_updated_refs(const char *url, const char *remote_name,
* The refs we are going to fetch are in to_fetch (nr_heads in
* total). If running
*
- * $ git-rev-list --objects to_fetch[0] to_fetch[1] ... --not --all
+ * $ git rev-list --objects to_fetch[0] to_fetch[1] ... --not --all
*
* does not error out, that means everything reachable from the
* refs we are going to fetch exists and is connected to some of
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 4d25ec51d0..21e92bbcb5 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -652,7 +652,8 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
if ((plen <= namelen) &&
!strncmp(refname, p, plen) &&
(refname[plen] == '\0' ||
- refname[plen] == '/'))
+ refname[plen] == '/' ||
+ p[plen-1] == '/'))
break;
if (!fnmatch(p, refname, FNM_PATHNAME))
break;
diff --git a/builtin-grep.c b/builtin-grep.c
index 631129ddfd..3a51662a35 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -774,7 +774,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
/* Make sure we do not get outside of paths */
for (i = 0; paths[i]; i++)
if (strncmp(prefix, paths[i], opt.prefix_length))
- die("git-grep: cannot generate relative filenames containing '..'");
+ die("git grep: cannot generate relative filenames containing '..'");
}
}
else if (prefix) {
@@ -783,8 +783,11 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
paths[1] = NULL;
}
- if (!list.nr)
+ if (!list.nr) {
+ if (!cached)
+ setup_work_tree();
return !grep_cache(&opt, paths, cached);
+ }
if (cached)
die("both --cached and trees are given.");
diff --git a/builtin-http-fetch.c b/builtin-http-fetch.c
index 3a062487a7..03f34d767d 100644
--- a/builtin-http-fetch.c
+++ b/builtin-http-fetch.c
@@ -42,7 +42,7 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
arg++;
}
if (argc < arg + 2 - commits_on_stdin) {
- usage("git-http-fetch [-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url");
+ usage("git http-fetch [-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url");
return 1;
}
if (commits_on_stdin) {
@@ -75,7 +75,7 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
fprintf(stderr,
"Some loose object were found to be corrupt, but they might be just\n"
"a false '404 Not Found' error message sent with incorrect HTTP\n"
-"status code. Suggest running git-fsck.\n");
+"status code. Suggest running 'git fsck'.\n");
}
walker_free(walker);
diff --git a/builtin-init-db.c b/builtin-init-db.c
index baf0d09ac4..8140c1299a 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -37,7 +37,7 @@ static void copy_templates_1(char *path, int baselen,
/* Note: if ".git/hooks" file exists in the repository being
* re-initialized, /etc/core-git/templates/hooks/update would
- * cause git-init to fail here. I think this is sane but
+ * cause "git init" to fail here. I think this is sane but
* it means that the set of templates we ship by default, along
* with the way the namespace under .git/ is organized, should
* be really carefully chosen.
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index e8d568eed7..068f424696 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -78,7 +78,7 @@ static void show_dir_entry(const char *tag, struct dir_entry *ent)
int offset = prefix_offset;
if (len >= ent->len)
- die("git-ls-files: internal error - directory entry not superset of prefix");
+ die("git ls-files: internal error - directory entry not superset of prefix");
if (pathspec && !pathspec_match(pathspec, ps_matched, ent->name, len))
return;
@@ -183,7 +183,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
int offset = prefix_offset;
if (len >= ce_namelen(ce))
- die("git-ls-files: internal error - cache entry not superset of prefix");
+ die("git ls-files: internal error - cache entry not superset of prefix");
if (pathspec && !pathspec_match(pathspec, ps_matched, ce->name, len))
return;
@@ -319,7 +319,7 @@ static const char *verify_pathspec(const char *prefix)
}
if (prefix_offset > max || memcmp(prev, prefix, prefix_offset))
- die("git-ls-files: cannot generate relative filenames containing '..'");
+ die("git ls-files: cannot generate relative filenames containing '..'");
prefix_len = max;
return max ? xmemdupz(prev, max) : NULL;
diff --git a/builtin-merge.c b/builtin-merge.c
index a201c6628d..b280444e10 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -564,8 +564,6 @@ static int checkout_fast_forward(unsigned char *head, unsigned char *remote)
struct dir_struct dir;
struct lock_file *lock_file = xcalloc(1, sizeof(struct lock_file));
- if (read_cache_unmerged())
- die("you need to resolve your current index first");
refresh_cache(REFRESH_QUIET);
fd = hold_locked_index(lock_file, 1);
@@ -651,13 +649,15 @@ static void add_strategies(const char *string, unsigned attr)
static int merge_trivial(void)
{
unsigned char result_tree[20], result_commit[20];
- struct commit_list parent;
+ struct commit_list *parent = xmalloc(sizeof(struct commit_list *));
write_tree_trivial(result_tree);
printf("Wonderful.\n");
- parent.item = remoteheads->item;
- parent.next = NULL;
- commit_tree(merge_msg.buf, result_tree, &parent, result_commit);
+ parent->item = lookup_commit(head);
+ parent->next = xmalloc(sizeof(struct commit_list *));
+ parent->next->item = remoteheads->item;
+ parent->next->next = NULL;
+ commit_tree(merge_msg.buf, result_tree, parent, result_commit);
finish(result_commit, "In-index merge");
drop_save();
return 0;
@@ -743,6 +743,7 @@ static int evaluate_result(void)
int cnt = 0;
struct rev_info rev;
+ discard_cache();
if (read_cache() < 0)
die("failed to read the cache");
@@ -776,7 +777,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
struct commit_list **remotes = &remoteheads;
setup_work_tree();
- if (unmerged_cache())
+ if (read_cache_unmerged())
die("You are in the middle of a conflicted merge.");
/*
@@ -1073,6 +1074,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
}
/* Automerge succeeded. */
+ discard_cache();
write_tree_trivial(result_tree);
automerge_was_ok = 1;
break;
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 2dadec1630..217fd49da9 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -23,7 +23,7 @@
#endif
static const char pack_usage[] = "\
-git-pack-objects [{ -q | --progress | --all-progress }] \n\
+git pack-objects [{ -q | --progress | --all-progress }] \n\
[--max-pack-size=N] [--local] [--incremental] \n\
[--window=N] [--window-memory=N] [--depth=N] \n\
[--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \n\
@@ -410,25 +410,22 @@ static unsigned long write_object(struct sha1file *f,
return hdrlen + datalen;
}
-static off_t write_one(struct sha1file *f,
+static int write_one(struct sha1file *f,
struct object_entry *e,
- off_t offset)
+ off_t *offset)
{
unsigned long size;
/* offset is non zero if object is written already. */
if (e->idx.offset || e->preferred_base)
- return offset;
+ return 1;
/* if we are deltified, write out base object first. */
- if (e->delta) {
- offset = write_one(f, e->delta, offset);
- if (!offset)
- return 0;
- }
+ if (e->delta && !write_one(f, e->delta, offset))
+ return 0;
- e->idx.offset = offset;
- size = write_object(f, e, offset);
+ e->idx.offset = *offset;
+ size = write_object(f, e, *offset);
if (!size) {
e->idx.offset = 0;
return 0;
@@ -436,9 +433,10 @@ static off_t write_one(struct sha1file *f,
written_list[nr_written++] = &e->idx;
/* make sure off_t is sufficiently large not to wrap */
- if (offset > offset + size)
+ if (*offset > *offset + size)
die("pack too large for current definition of off_t");
- return offset + size;
+ *offset += size;
+ return 1;
}
/* forward declaration for write_pack_file */
@@ -448,7 +446,7 @@ static void write_pack_file(void)
{
uint32_t i = 0, j;
struct sha1file *f;
- off_t offset, offset_one, last_obj_offset = 0;
+ off_t offset;
struct pack_header hdr;
uint32_t nr_remaining = nr_result;
time_t last_mtime = 0;
@@ -480,11 +478,8 @@ static void write_pack_file(void)
offset = sizeof(hdr);
nr_written = 0;
for (; i < nr_objects; i++) {
- last_obj_offset = offset;
- offset_one = write_one(f, objects + i, offset);
- if (!offset_one)
+ if (!write_one(f, objects + i, &offset))
break;
- offset = offset_one;
display_progress(progress_state, written);
}
@@ -497,9 +492,9 @@ static void write_pack_file(void)
} else if (nr_written == nr_remaining) {
sha1close(f, sha1, CSUM_FSYNC);
} else {
- int fd = sha1close(f, NULL, 0);
- fixup_pack_header_footer(fd, sha1, pack_tmp_name, nr_written);
- fsync_or_die(fd, pack_tmp_name);
+ int fd = sha1close(f, sha1, 0);
+ fixup_pack_header_footer(fd, sha1, pack_tmp_name,
+ nr_written, sha1, offset);
close(fd);
}
@@ -1096,9 +1091,12 @@ static void check_object(struct object_entry *entry)
}
entry->type = sha1_object_info(entry->idx.sha1, &entry->size);
- if (entry->type < 0)
- die("unable to get type of object %s",
- sha1_to_hex(entry->idx.sha1));
+ /*
+ * The error condition is checked in prepare_pack(). This is
+ * to permit a missing preferred base object to be ignored
+ * as a preferred base. Doing so can result in a larger
+ * pack file, but the transfer will still take place.
+ */
}
static int pack_offset_sort(const void *_a, const void *_b)
@@ -1722,8 +1720,12 @@ static void prepare_pack(int window, int depth)
if (entry->no_try_delta)
continue;
- if (!entry->preferred_base)
+ if (!entry->preferred_base) {
nr_deltas++;
+ if (entry->type < 0)
+ die("unable to get type of object %s",
+ sha1_to_hex(entry->idx.sha1));
+ }
delta_list[n++] = entry;
}
@@ -1870,7 +1872,7 @@ static void mark_in_pack_object(struct object *object, struct packed_git *p, str
/*
* Compare the objects in the offset order, in order to emulate the
- * "git-rev-list --objects" output that produced the pack originally.
+ * "git rev-list --objects" output that produced the pack originally.
*/
static int ofscmp(const void *a_, const void *b_)
{
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 72a6de302f..ac219ac2db 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -64,7 +64,7 @@ static void prime_cache_tree(void)
}
-static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <sha1> [<sha2> [<sha3>]])";
+static const char read_tree_usage[] = "git read-tree (<sha> | [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u | -i]] [--exclude-per-directory=<gitignore>] [--index-output=<file>] <sha1> [<sha2> [<sha3>]])";
static struct lock_file lock_file;
@@ -194,6 +194,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
usage(read_tree_usage);
if ((opts.dir && !opts.update))
die("--exclude-per-directory is meaningless unless -u");
+ if (opts.merge && !opts.index_only)
+ setup_work_tree();
if (opts.merge) {
if (stage < 2)
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 893762c80f..facaff288d 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -178,7 +178,7 @@ static void finish_object(struct object_array_entry *p)
static void show_object(struct object_array_entry *p)
{
/* An object with name "foo\n0000000..." can be used to
- * confuse downstream git-pack-objects very badly.
+ * confuse downstream "git pack-objects" very badly.
*/
const char *ep = strchr(p->name, '\n');
@@ -645,7 +645,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
revs.diff)
usage(rev_list_usage);
- save_commit_buffer = revs.verbose_header || revs.grep_filter;
+ save_commit_buffer = revs.verbose_header ||
+ revs.grep_filter.pattern_list;
if (bisect_list)
revs.limited = 1;
diff --git a/builtin-rm.c b/builtin-rm.c
index 0ed26bb8f1..fdac34f242 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -104,7 +104,7 @@ static int check_local_mod(unsigned char *head, int index_only)
"from both the file and the HEAD\n"
"(use -f to force removal)", name);
else if (!index_only) {
- /* It's not dangerous to git-rm --cached a
+ /* It's not dangerous to "git rm --cached" a
* file if the index matches the file or the
* HEAD, since it means the deleted content is
* still available somewhere.
@@ -221,7 +221,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
printf("rm '%s'\n", path);
if (remove_file_from_cache(path))
- die("git-rm: unable to remove %s", path);
+ die("git rm: unable to remove %s", path);
}
if (show_only)
@@ -244,7 +244,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
continue;
}
if (!removed)
- die("git-rm: %s: %s", path, strerror(errno));
+ die("git rm: %s: %s", path, strerror(errno));
}
}
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 7588d22885..2af9f29341 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -43,7 +43,7 @@ static int pack_objects(int fd, struct ref *refs)
po.out = fd;
po.git_cmd = 1;
if (start_command(&po))
- die("git-pack-objects failed (%s)", strerror(errno));
+ die("git pack-objects failed (%s)", strerror(errno));
/*
* We feed the pack-objects we just spawned with revision
diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index add16004f1..572b114119 100644
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
@@ -62,7 +62,7 @@ match:
* ref points at a nonexistent object.
*/
if (!has_sha1_file(sha1))
- die("git-show-ref: bad ref %s (%s)", refname,
+ die("git show-ref: bad ref %s (%s)", refname,
sha1_to_hex(sha1));
if (quiet)
@@ -82,12 +82,12 @@ match:
else {
obj = parse_object(sha1);
if (!obj)
- die("git-show-ref: bad ref %s (%s)", refname,
+ die("git show-ref: bad ref %s (%s)", refname,
sha1_to_hex(sha1));
if (obj->type == OBJ_TAG) {
obj = deref_tag(obj, refname, 0);
if (!obj)
- die("git-show-ref: bad tag at ref %s (%s)", refname,
+ die("git show-ref: bad tag at ref %s (%s)", refname,
sha1_to_hex(sha1));
hex = find_unique_abbrev(obj->sha1, abbrev);
printf("%s %s^{}\n", hex, refname);
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index f4bea4a322..0713bca778 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -9,26 +9,26 @@
static const char tar_tree_usage[] =
"git tar-tree [--remote=<repo>] <tree-ish> [basedir]\n"
-"*** Note that this command is now deprecated; use git-archive instead.";
+"*** Note that this command is now deprecated; use \"git archive\" instead.";
int cmd_tar_tree(int argc, const char **argv, const char *prefix)
{
/*
- * git-tar-tree is now a wrapper around git-archive --format=tar
+ * "git tar-tree" is now a wrapper around "git archive --format=tar"
*
* $0 --remote=<repo> arg... ==>
- * git-archive --format=tar --remote=<repo> arg...
+ * git archive --format=tar --remote=<repo> arg...
* $0 tree-ish ==>
- * git-archive --format=tar tree-ish
+ * git archive --format=tar tree-ish
* $0 tree-ish basedir ==>
- * git-archive --format-tar --prefix=basedir tree-ish
+ * git archive --format-tar --prefix=basedir tree-ish
*/
int i;
const char **nargv = xcalloc(sizeof(*nargv), argc + 2);
char *basedir_arg;
int nargc = 0;
- nargv[nargc++] = "git-archive";
+ nargv[nargc++] = "archive";
nargv[nargc++] = "--format=tar";
if (2 <= argc && !prefixcmp(argv[1], "--remote=")) {
@@ -53,8 +53,8 @@ int cmd_tar_tree(int argc, const char **argv, const char *prefix)
nargv[nargc] = NULL;
fprintf(stderr,
- "*** git-tar-tree is now deprecated.\n"
- "*** Running git-archive instead.\n***");
+ "*** \"git tar-tree\" is now deprecated.\n"
+ "*** Running \"git archive\" instead.\n***");
for (i = 0; i < nargc; i++) {
fputc(' ', stderr);
sq_quote_print(stderr, nargv[i]);
@@ -76,7 +76,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
n = read_in_full(0, buffer, HEADERSIZE);
if (n < HEADERSIZE)
- die("git-get-tar-commit-id: read error");
+ die("git get-tar-commit-id: read error");
if (header->typeflag[0] != 'g')
return 1;
if (memcmp(content, "52 comment=", 11))
@@ -84,7 +84,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
n = write_in_full(1, content + 11, 41);
if (n < 41)
- die("git-get-tar-commit-id: write error");
+ die("git get-tar-commit-id: write error");
return 0;
}
diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c
index a891866665..40b20f26e8 100644
--- a/builtin-unpack-objects.c
+++ b/builtin-unpack-objects.c
@@ -13,7 +13,7 @@
#include "fsck.h"
static int dry_run, quiet, recover, has_errors, strict;
-static const char unpack_usage[] = "git-unpack-objects [-n] [-q] [-r] [--strict] < pack-file";
+static const char unpack_usage[] = "git unpack-objects [-n] [-q] [-r] [--strict] < pack-file";
/* We always read in 4kB chunks. */
static unsigned char buffer[4096];
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 38eb53ccba..9d19c51e8e 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -14,7 +14,7 @@
* Default to not allowing changes to the list of files. The
* tool doesn't actually care, but this makes it harder to add
* files to the revision control by mistake by doing something
- * like "git-update-index *" and suddenly having all the object
+ * like "git update-index *" and suddenly having all the object
* files be revision controlled.
*/
static int allow_add;
@@ -262,7 +262,7 @@ static void chmod_path(int flip, const char *path)
report("chmod %cx '%s'", flip, path);
return;
fail:
- die("git-update-index: cannot chmod %cx '%s'", flip, path);
+ die("git update-index: cannot chmod %cx '%s'", flip, path);
}
static void update_one(const char *path, const char *prefix, int prefix_length)
@@ -280,7 +280,7 @@ static void update_one(const char *path, const char *prefix, int prefix_length)
if (force_remove) {
if (remove_file_from_cache(p))
- die("git-update-index: unable to remove %s", path);
+ die("git update-index: unable to remove %s", path);
report("remove '%s'", path);
goto free_return;
}
@@ -310,18 +310,18 @@ static void read_index_info(int line_termination)
/* This reads lines formatted in one of three formats:
*
* (1) mode SP sha1 TAB path
- * The first format is what "git-apply --index-info"
+ * The first format is what "git apply --index-info"
* reports, and used to reconstruct a partial tree
* that is used for phony merge base tree when falling
* back on 3-way merge.
*
* (2) mode SP type SP sha1 TAB path
- * The second format is to stuff git-ls-tree output
+ * The second format is to stuff "git ls-tree" output
* into the index file.
*
* (3) mode SP sha1 SP stage TAB path
* This format is to put higher order stages into the
- * index file and matches git-ls-files --stage output.
+ * index file and matches "git ls-files --stage" output.
*/
errno = 0;
ul = strtoul(buf.buf, &ptr, 8);
@@ -351,7 +351,7 @@ static void read_index_info(int line_termination)
if (line_termination && path_name[0] == '"') {
strbuf_reset(&uq);
if (unquote_c_style(&uq, path_name, NULL)) {
- die("git-update-index: bad quoting of path name");
+ die("git update-index: bad quoting of path name");
}
path_name = uq.buf;
}
@@ -364,7 +364,7 @@ static void read_index_info(int line_termination)
if (!mode) {
/* mode == 0 means there is no such path -- remove */
if (remove_file_from_cache(path_name))
- die("git-update-index: unable to remove %s",
+ die("git update-index: unable to remove %s",
ptr);
}
else {
@@ -374,7 +374,7 @@ static void read_index_info(int line_termination)
*/
ptr[-42] = ptr[-1] = 0;
if (add_cacheinfo(mode, sha1, path_name, stage))
- die("git-update-index: unable to update %s",
+ die("git update-index: unable to update %s",
path_name);
}
continue;
@@ -614,10 +614,12 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
continue;
}
if (!strcmp(path, "--refresh")) {
+ setup_work_tree();
has_errors |= refresh_cache(refresh_flags);
continue;
}
if (!strcmp(path, "--really-refresh")) {
+ setup_work_tree();
has_errors |= refresh_cache(REFRESH_REALLY | refresh_flags);
continue;
}
@@ -626,12 +628,12 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
unsigned int mode;
if (i+3 >= argc)
- die("git-update-index: --cacheinfo <mode> <sha1> <path>");
+ die("git update-index: --cacheinfo <mode> <sha1> <path>");
if (strtoul_ui(argv[i+1], 8, &mode) ||
get_sha1_hex(argv[i+2], sha1) ||
add_cacheinfo(mode, sha1, argv[i+3], 0))
- die("git-update-index: --cacheinfo"
+ die("git update-index: --cacheinfo"
" cannot add %s", argv[i+3]);
i += 3;
continue;
@@ -639,7 +641,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
if (!strcmp(path, "--chmod=-x") ||
!strcmp(path, "--chmod=+x")) {
if (argc <= i+1)
- die("git-update-index: %s <path>", path);
+ die("git update-index: %s <path>", path);
set_executable_bit = path[8];
continue;
}
@@ -684,6 +686,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
goto finish;
}
if (!strcmp(path, "--again") || !strcmp(path, "-g")) {
+ setup_work_tree();
has_errors = do_reupdate(argc - i, argv + i,
prefix, prefix_length);
if (has_errors)
@@ -702,6 +705,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
usage(update_index_usage);
die("unknown option %s", path);
}
+ setup_work_tree();
p = prefix_path(prefix, prefix_length, path);
update_one(p, NULL, 0);
if (set_executable_bit)
@@ -714,6 +718,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
strbuf_init(&buf, 0);
strbuf_init(&nbuf, 0);
+ setup_work_tree();
while (strbuf_getline(&buf, stdin, line_termination) != EOF) {
const char *p;
if (line_termination && buf.buf[0] == '"') {
diff --git a/builtin-verify-pack.c b/builtin-verify-pack.c
index f4ac595695..25a29f11a4 100644
--- a/builtin-verify-pack.c
+++ b/builtin-verify-pack.c
@@ -1,7 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "pack.h"
-
+#include "pack-revindex.h"
#define MAX_CHAIN 50
@@ -129,6 +129,7 @@ int cmd_verify_pack(int argc, const char **argv, const char *prefix)
else {
if (verify_one_pack(argv[1], verbose))
err = 1;
+ discard_revindex();
nothing_done = 0;
}
argc--; argv++;
diff --git a/cache.h b/cache.h
index 2475de9fa8..884fae826c 100644
--- a/cache.h
+++ b/cache.h
@@ -222,7 +222,8 @@ struct index_state {
struct cache_tree *cache_tree;
time_t timestamp;
void *alloc;
- unsigned name_hash_initialized : 1;
+ unsigned name_hash_initialized : 1,
+ initialized : 1;
struct hash_table name_hash;
};
diff --git a/combine-diff.c b/combine-diff.c
index 9f80a1c5e3..aa9d79ea0b 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -500,6 +500,18 @@ static int hunk_comment_line(const char *bol)
return (isalpha(ch) || ch == '_' || ch == '$');
}
+static void show_line_to_eol(const char *line, int len, const char *reset)
+{
+ int saw_cr_at_eol = 0;
+ if (len < 0)
+ len = strlen(line);
+ saw_cr_at_eol = (len && line[len-1] == '\r');
+
+ printf("%.*s%s%s\n", len - saw_cr_at_eol, line,
+ reset,
+ saw_cr_at_eol ? "\r" : "");
+}
+
static void dump_sline(struct sline *sline, unsigned long cnt, int num_parent,
int use_color)
{
@@ -593,7 +605,7 @@ static void dump_sline(struct sline *sline, unsigned long cnt, int num_parent,
else
putchar(' ');
}
- printf("%s%s\n", ll->line, c_reset);
+ show_line_to_eol(ll->line, -1, c_reset);
ll = ll->next;
}
if (cnt < lno)
@@ -617,7 +629,7 @@ static void dump_sline(struct sline *sline, unsigned long cnt, int num_parent,
putchar(' ');
p_mask <<= 1;
}
- printf("%.*s%s\n", sl->len, sl->bol, c_reset);
+ show_line_to_eol(sl->bol, sl->len, c_reset);
}
}
}
@@ -727,6 +739,18 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
die("early EOF '%s'", elem->path);
result[len] = 0;
+
+ /* If not a fake symlink, apply filters, e.g. autocrlf */
+ if (is_file) {
+ struct strbuf buf;
+
+ strbuf_init(&buf, 0);
+ if (convert_to_git(elem->path, result, len, &buf, safe_crlf)) {
+ free(result);
+ result = strbuf_detach(&buf, &len);
+ result_size = len;
+ }
+ }
}
else {
deleted_file:
diff --git a/commit.h b/commit.h
index 77de9621d9..ecdd5733f9 100644
--- a/commit.h
+++ b/commit.h
@@ -67,7 +67,8 @@ extern int non_ascii(int);
struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
extern void get_commit_format(const char *arg, struct rev_info *);
extern void format_commit_message(const struct commit *commit,
- const void *format, struct strbuf *sb);
+ const void *format, struct strbuf *sb,
+ enum date_mode dmode);
extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit*,
struct strbuf *,
int abbrev, const char *subject,
diff --git a/compat/fnmatch.c b/compat/fnmatch/fnmatch.c
index 1f4ead5f98..1f4ead5f98 100644
--- a/compat/fnmatch.c
+++ b/compat/fnmatch/fnmatch.c
diff --git a/compat/fnmatch.h b/compat/fnmatch/fnmatch.h
index cc3ec37940..cc3ec37940 100644
--- a/compat/fnmatch.h
+++ b/compat/fnmatch/fnmatch.h
diff --git a/compat/regex.c b/compat/regex/regex.c
index 87b33e4669..87b33e4669 100644
--- a/compat/regex.c
+++ b/compat/regex/regex.c
diff --git a/compat/regex.h b/compat/regex/regex.h
index 6eb64f1402..6eb64f1402 100644
--- a/compat/regex.h
+++ b/compat/regex/regex.h
diff --git a/connect.c b/connect.c
index 574f42fa47..dd96f8e043 100644
--- a/connect.c
+++ b/connect.c
@@ -97,7 +97,7 @@ int get_ack(int fd, unsigned char *result_sha1)
int len = packet_read_line(fd, line, sizeof(line));
if (!len)
- die("git-fetch-pack: expected ACK/NAK, got EOF");
+ die("git fetch-pack: expected ACK/NAK, got EOF");
if (line[len-1] == '\n')
line[--len] = 0;
if (!strcmp(line, "NAK"))
@@ -109,7 +109,7 @@ int get_ack(int fd, unsigned char *result_sha1)
return 1;
}
}
- die("git-fetch_pack: expected ACK/NAK, got '%s'", line);
+ die("git fetch_pack: expected ACK/NAK, got '%s'", line);
}
int path_match(const char *path, int nr, char **match)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a31004088a..1154ae1ac8 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -386,7 +386,9 @@ __git_porcelain_commands ()
cat-file) : plumbing;;
check-attr) : plumbing;;
check-ref-format) : plumbing;;
+ checkout-index) : plumbing;;
commit-tree) : plumbing;;
+ count-objects) : infrequent;;
cvsexportcommit) : export;;
cvsimport) : import;;
cvsserver) : daemon;;
@@ -395,6 +397,7 @@ __git_porcelain_commands ()
diff-index) : plumbing;;
diff-tree) : plumbing;;
fast-import) : import;;
+ fast-export) : export;;
fsck-objects) : plumbing;;
fetch-pack) : plumbing;;
fmt-merge-msg) : plumbing;;
@@ -404,6 +407,10 @@ __git_porcelain_commands ()
index-pack) : plumbing;;
init-db) : deprecated;;
local-fetch) : plumbing;;
+ lost-found) : infrequent;;
+ ls-files) : plumbing;;
+ ls-remote) : plumbing;;
+ ls-tree) : plumbing;;
mailinfo) : plumbing;;
mailsplit) : plumbing;;
merge-*) : plumbing;;
@@ -428,6 +435,7 @@ __git_porcelain_commands ()
runstatus) : plumbing;;
sh-setup) : internal;;
shell) : daemon;;
+ show-ref) : plumbing;;
send-pack) : plumbing;;
show-index) : plumbing;;
ssh-*) : transport;;
@@ -442,6 +450,8 @@ __git_porcelain_commands ()
upload-archive) : plumbing;;
upload-pack) : plumbing;;
write-tree) : plumbing;;
+ var) : infrequent;;
+ verify-pack) : infrequent;;
verify-tag) : plumbing;;
*) echo $i;;
esac
@@ -771,7 +781,7 @@ _git_diff ()
__gitcomp "--cached --stat --numstat --shortstat --summary
--patch-with-stat --name-only --name-status --color
--no-color --color-words --no-renames --check
- --full-index --binary --abbrev --diff-filter
+ --full-index --binary --abbrev --diff-filter=
--find-copies-harder --pickaxe-all --pickaxe-regex
--text --ignore-space-at-eol --ignore-space-change
--ignore-all-space --exit-code --quiet --ext-diff
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index f9865b444f..46136d49bf 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -76,7 +76,7 @@ def write_pipe(c, str):
def p4_write_pipe(c, str):
real_cmd = p4_build_cmd(c)
- return write_pipe(c, str)
+ return write_pipe(real_cmd, str)
def read_pipe(c, ignore_error=False):
if verbose:
diff --git a/contrib/fast-import/git-p4.txt b/contrib/fast-import/git-p4.txt
index ac551d45f1..49b335921a 100644
--- a/contrib/fast-import/git-p4.txt
+++ b/contrib/fast-import/git-p4.txt
@@ -3,14 +3,16 @@ git-p4 - Perforce <-> Git converter using git-fast-import
Usage
=====
-git-p4 supports two main modes: Importing from Perforce to a Git repository is
-done using "git-p4 sync" or "git-p4 rebase". Submitting changes from Git back
-to Perforce is done using "git-p4 submit".
+git-p4 can be used in two different ways:
+
+1) To import changes from Perforce to a Git repository, using "git-p4 sync".
+
+2) To submit changes from Git back to Perforce, using "git-p4 submit".
Importing
=========
-You can simply start with
+Simply start with
git-p4 clone //depot/path/project
@@ -18,11 +20,18 @@ or
git-p4 clone //depot/path/project myproject
-This will create an empty git repository in a subdirectory called "project" (or
-"myproject" with the second command), import the head revision from the
-specified perforce path into a git "p4" branch (remotes/p4 actually), create a
-master branch off it and check it out. If you want the entire history (not just
-the head revision) then you can simply append a "@all" to the depot path:
+This will:
+
+1) Create an empty git repository in a subdirectory called "project" (or
+"myproject" with the second command)
+
+2) Import the head revision from the given Perforce path into a git branch
+called "p4" (remotes/p4 actually)
+
+3) Create a master branch based on it and check it out.
+
+If you want the entire history (not just the head revision) then you can simply
+append a "@all" to the depot path:
git-p4 clone //depot/project/main@all myproject
@@ -37,31 +46,40 @@ If you want more control you can also use the git-p4 sync command directly:
This will import the current head revision of the specified depot path into a
"remotes/p4/master" branch of your git repository. You can use the
---branch=mybranch option to use a different branch.
+--branch=mybranch option to import into a different branch.
-If you want to import the entire history of a given depot path just use
+If you want to import the entire history of a given depot path simply use:
git-p4 sync //path/in/depot@all
+
+Note:
+
To achieve optimal compression you may want to run 'git repack -a -d -f' after
a big import. This may take a while.
-Support for Perforce integrations is still work in progress. Don't bother
-trying it unless you want to hack on it :)
-
Incremental Imports
===================
-After an initial import you can easily synchronize your git repository with
-newer changes from the Perforce depot by just calling
+After an initial import you can continue to synchronize your git repository
+with newer changes from the Perforce depot by just calling
git-p4 sync
in your git repository. By default the "remotes/p4/master" branch is updated.
-It is recommended to run 'git repack -a -d -f' from time to time when using
-incremental imports to optimally combine the individual git packs that each
-incremental import creates through the use of git-fast-import.
+Advanced Setup
+==============
+
+Suppose you have a periodically updated git repository somewhere, containing a
+complete import of a Perforce project. This repository can be cloned and used
+with git-p4. When updating the cloned repository with the "sync" command,
+git-p4 will try to fetch changes from the original repository first. The git
+protocol used with this is usually faster than importing from Perforce
+directly.
+
+This behaviour can be disabled by setting the "git-p4.syncFromOrigin" git
+configuration variable to "false".
Updating
========
@@ -79,7 +97,7 @@ Submitting
==========
git-p4 has support for submitting changes from a git repository back to the
-Perforce depot. This requires a Perforce checkout separate to your git
+Perforce depot. This requires a Perforce checkout separate from your git
repository. To submit all changes that are in the current git branch but not in
the "p4" branch (or "origin" if "p4" doesn't exist) simply call
@@ -97,17 +115,6 @@ continue importing the remaining changes with
git-p4 submit --continue
-After submitting you should sync your perforce import branch ("p4" or "origin")
-from Perforce using git-p4's sync command.
-
-If you have changes in your working directory that you haven't committed into
-git yet but that you want to commit to Perforce directly ("quick fixes") then
-you do not have to go through the intermediate step of creating a git commit
-first but you can just call
-
- git-p4 submit --direct
-
-
Example
=======
diff --git a/csum-file.c b/csum-file.c
index ace64f165e..28389541a3 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -42,11 +42,11 @@ int sha1close(struct sha1file *f, unsigned char *result, unsigned int flags)
sha1flush(f, offset);
f->offset = 0;
}
+ SHA1_Final(f->buffer, &f->ctx);
+ if (result)
+ hashcpy(result, f->buffer);
if (flags & (CSUM_CLOSE | CSUM_FSYNC)) {
/* write checksum and close fd */
- SHA1_Final(f->buffer, &f->ctx);
- if (result)
- hashcpy(result, f->buffer);
sha1flush(f, 20);
if (flags & CSUM_FSYNC)
fsync_or_die(f->fd, f->name);
diff --git a/ctype.c b/ctype.c
index ee06eb7f48..d2bd38e901 100644
--- a/ctype.c
+++ b/ctype.c
@@ -5,6 +5,11 @@
*/
#include "cache.h"
+/* Just so that no insane platform contaminate namespace with these symbols */
+#undef SS
+#undef AA
+#undef DD
+
#define SS GIT_SPACE
#define AA GIT_ALPHA
#define DD GIT_DIGIT
diff --git a/diff.c b/diff.c
index f70e6b4912..5e01b2bb27 100644
--- a/diff.c
+++ b/diff.c
@@ -511,13 +511,20 @@ const char *diff_get_color(int diff_use_color, enum color_diff ix)
static void emit_line(FILE *file, const char *set, const char *reset, const char *line, int len)
{
- int has_trailing_newline = (len > 0 && line[len-1] == '\n');
+ int has_trailing_newline, has_trailing_carriage_return;
+
+ has_trailing_newline = (len > 0 && line[len-1] == '\n');
if (has_trailing_newline)
len--;
+ has_trailing_carriage_return = (len > 0 && line[len-1] == '\r');
+ if (has_trailing_carriage_return)
+ len--;
fputs(set, file);
fwrite(line, len, 1, file);
fputs(reset, file);
+ if (has_trailing_carriage_return)
+ fputc('\r', file);
if (has_trailing_newline)
fputc('\n', file);
}
@@ -1054,6 +1061,13 @@ static long gather_dirstat(FILE *file, struct dirstat_dir *dir, unsigned long ch
return this_dir;
}
+static int dirstat_compare(const void *_a, const void *_b)
+{
+ const struct dirstat_file *a = _a;
+ const struct dirstat_file *b = _b;
+ return strcmp(a->name, b->name);
+}
+
static void show_dirstat(struct diff_options *options)
{
int i;
@@ -1065,7 +1079,7 @@ static void show_dirstat(struct diff_options *options)
dir.alloc = 0;
dir.nr = 0;
dir.percent = options->dirstat_percent;
- dir.cumulative = options->output_format & DIFF_FORMAT_CUMULATIVE;
+ dir.cumulative = DIFF_OPT_TST(options, DIRSTAT_CUMULATIVE);
changed = 0;
for (i = 0; i < q->nr; i++) {
@@ -1113,6 +1127,7 @@ static void show_dirstat(struct diff_options *options)
return;
/* Show all directories with more than x% of the changes */
+ qsort(dir.files, dir.nr, sizeof(dir.files[0]), dirstat_compare);
gather_dirstat(options->file, &dir, changed, "", 0);
}
@@ -2290,6 +2305,7 @@ void diff_setup(struct diff_options *options)
options->break_opt = -1;
options->rename_limit = -1;
options->dirstat_percent = 3;
+ DIFF_OPT_CLR(options, DIRSTAT_CUMULATIVE);
options->context = 3;
options->change = diff_change;
@@ -2462,8 +2478,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
options->output_format |= DIFF_FORMAT_SHORTSTAT;
else if (opt_arg(arg, 'X', "dirstat", &options->dirstat_percent))
options->output_format |= DIFF_FORMAT_DIRSTAT;
- else if (!strcmp(arg, "--cumulative"))
- options->output_format |= DIFF_FORMAT_CUMULATIVE;
+ else if (!strcmp(arg, "--cumulative")) {
+ options->output_format |= DIFF_FORMAT_DIRSTAT;
+ DIFF_OPT_SET(options, DIRSTAT_CUMULATIVE);
+ }
else if (!strcmp(arg, "--check"))
options->output_format |= DIFF_FORMAT_CHECKDIFF;
else if (!strcmp(arg, "--summary"))
diff --git a/diff.h b/diff.h
index 50fb5ddb0b..7f53bebf33 100644
--- a/diff.h
+++ b/diff.h
@@ -31,7 +31,6 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
#define DIFF_FORMAT_PATCH 0x0010
#define DIFF_FORMAT_SHORTSTAT 0x0020
#define DIFF_FORMAT_DIRSTAT 0x0040
-#define DIFF_FORMAT_CUMULATIVE 0x0080
/* These override all above */
#define DIFF_FORMAT_NAME 0x0100
@@ -64,6 +63,7 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
#define DIFF_OPT_CHECK_FAILED (1 << 16)
#define DIFF_OPT_RELATIVE_NAME (1 << 17)
#define DIFF_OPT_IGNORE_SUBMODULES (1 << 18)
+#define DIFF_OPT_DIRSTAT_CUMULATIVE (1 << 19)
#define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
#define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag)
#define DIFF_OPT_CLR(opts, flag) ((opts)->flags &= ~DIFF_OPT_##flag)
diff --git a/entry.c b/entry.c
index 222aaa374b..aa2ee46a84 100644
--- a/entry.c
+++ b/entry.c
@@ -111,7 +111,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
case S_IFREG:
new = read_blob_entry(ce, path, &size);
if (!new)
- return error("git-checkout-index: unable to read sha1 file of %s (%s)",
+ return error("git checkout-index: unable to read sha1 file of %s (%s)",
path, sha1_to_hex(ce->sha1));
/*
@@ -132,7 +132,7 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
fd = create_file(path, ce->ce_mode);
if (fd < 0) {
free(new);
- return error("git-checkout-index: unable to create file %s (%s)",
+ return error("git checkout-index: unable to create file %s (%s)",
path, strerror(errno));
}
@@ -140,12 +140,12 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
close(fd);
free(new);
if (wrote != size)
- return error("git-checkout-index: unable to write file %s", path);
+ return error("git checkout-index: unable to write file %s", path);
break;
case S_IFLNK:
new = read_blob_entry(ce, path, &size);
if (!new)
- return error("git-checkout-index: unable to read sha1 file of %s (%s)",
+ return error("git checkout-index: unable to read sha1 file of %s (%s)",
path, sha1_to_hex(ce->sha1));
if (to_tempfile || !has_symlinks) {
if (to_tempfile) {
@@ -155,31 +155,31 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout
fd = create_file(path, 0666);
if (fd < 0) {
free(new);
- return error("git-checkout-index: unable to create "
+ return error("git checkout-index: unable to create "
"file %s (%s)", path, strerror(errno));
}
wrote = write_in_full(fd, new, size);
close(fd);
free(new);
if (wrote != size)
- return error("git-checkout-index: unable to write file %s",
+ return error("git checkout-index: unable to write file %s",
path);
} else {
wrote = symlink(new, path);
free(new);
if (wrote)
- return error("git-checkout-index: unable to create "
+ return error("git checkout-index: unable to create "
"symlink %s (%s)", path, strerror(errno));
}
break;
case S_IFGITLINK:
if (to_tempfile)
- return error("git-checkout-index: cannot create temporary subproject %s", path);
+ return error("git checkout-index: cannot create temporary subproject %s", path);
if (mkdir(path, 0777) < 0)
- return error("git-checkout-index: cannot create subproject directory %s", path);
+ return error("git checkout-index: cannot create subproject directory %s", path);
break;
default:
- return error("git-checkout-index: unknown file mode for %s", path);
+ return error("git checkout-index: unknown file mode for %s", path);
}
if (state->refresh_cache) {
diff --git a/fast-import.c b/fast-import.c
index 7089e6f9e6..d85b3a561f 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -951,7 +951,8 @@ static void end_packfile(void)
close_pack_windows(pack_data);
fixup_pack_header_footer(pack_data->pack_fd, pack_data->sha1,
- pack_data->pack_name, object_count);
+ pack_data->pack_name, object_count,
+ NULL, 0);
close(pack_data->pack_fd);
idx_name = keep_pack(create_index());
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index ad65aaad5a..86402d49f7 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1932,7 +1932,7 @@ proc show_more_context {} {
proc show_less_context {} {
global repo_config
- if {$repo_config(gui.diffcontext) >= 1} {
+ if {$repo_config(gui.diffcontext) > 1} {
incr repo_config(gui.diffcontext) -1
reshow_diff
}
diff --git a/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index 52b79e4a1f..1970b601e1 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -175,7 +175,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
lappend cmd -p
lappend cmd --no-color
- if {$repo_config(gui.diffcontext) >= 0} {
+ if {$repo_config(gui.diffcontext) >= 1} {
lappend cmd "-U$repo_config(gui.diffcontext)"
}
if {$w eq $ui_index} {
@@ -192,6 +192,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
return
}
+ set ::current_diff_inheader 1
fconfigure $fd \
-blocking 0 \
-encoding binary \
@@ -207,18 +208,21 @@ proc read_diff {fd scroll_pos} {
while {[gets $fd line] >= 0} {
# -- Cleanup uninteresting diff header lines.
#
- if { [string match {diff --git *} $line]
- || [string match {diff --cc *} $line]
- || [string match {diff --combined *} $line]
- || [string match {--- *} $line]
- || [string match {+++ *} $line]} {
- append current_diff_header $line "\n"
- continue
+ if {$::current_diff_inheader} {
+ if { [string match {diff --git *} $line]
+ || [string match {diff --cc *} $line]
+ || [string match {diff --combined *} $line]
+ || [string match {--- *} $line]
+ || [string match {+++ *} $line]} {
+ append current_diff_header $line "\n"
+ continue
+ }
}
if {[string match {index *} $line]} continue
if {$line eq {deleted file mode 120000}} {
set line "deleted symlink"
}
+ set ::current_diff_inheader 0
# -- Automatically detect if this is a 3 way diff.
#
diff --git a/git-gui/lib/option.tcl b/git-gui/lib/option.tcl
index ffb3f00ff0..5e1346e601 100644
--- a/git-gui/lib/option.tcl
+++ b/git-gui/lib/option.tcl
@@ -125,7 +125,7 @@ proc do_options {} {
{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
{b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
- {i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+ {i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
} {
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
index 89b6d51ea0..26b866f551 100644
--- a/git-gui/po/fr.po
+++ b/git-gui/po/fr.po
@@ -1,50 +1,51 @@
-# translation of fr.po to French
+# translation of fr.po to Français
# Translation of git-gui to French.
# Copyright (C) 2008 Shawn Pearce, et al.
# This file is distributed under the same license as the git package.
#
# Christian Couder <chriscool@tuxfamily.org>, 2008.
+# Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-03-14 07:18+0100\n"
-"PO-Revision-Date: 2008-04-04 22:05+0200\n"
-"Last-Translator: Christian Couder <chriscool@tuxfamily.org>\n"
-"Language-Team: French\n"
+"POT-Creation-Date: 2008-08-02 14:45-0700\n"
+"PO-Revision-Date: 2008-08-11 17:12-0400\n"
+"Last-Translator: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>\n"
+"Language-Team: Français <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: git-gui.sh:41 git-gui.sh:634 git-gui.sh:648 git-gui.sh:661 git-gui.sh:744
-#: git-gui.sh:763
+#: git-gui.sh:41 git-gui.sh:688 git-gui.sh:702 git-gui.sh:715 git-gui.sh:798
+#: git-gui.sh:817
msgid "git-gui: fatal error"
msgstr "git-gui: erreur fatale"
-#: git-gui.sh:593
+#: git-gui.sh:644
#, tcl-format
msgid "Invalid font specified in %s:"
-msgstr "Invalide fonte spécifiée dans %s :"
+msgstr "Police invalide spécifiée dans %s :"
-#: git-gui.sh:620
+#: git-gui.sh:674
msgid "Main Font"
-msgstr "Fonte principale"
+msgstr "Police principale"
-#: git-gui.sh:621
+#: git-gui.sh:675
msgid "Diff/Console Font"
-msgstr "Fonte diff/console"
+msgstr "Police diff/console"
-#: git-gui.sh:635
+#: git-gui.sh:689
msgid "Cannot find git in PATH."
msgstr "Impossible de trouver git dans PATH."
-#: git-gui.sh:662
+#: git-gui.sh:716
msgid "Cannot parse Git version string:"
msgstr "Impossible de parser la version de Git :"
-#: git-gui.sh:680
+#: git-gui.sh:734
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -63,378 +64,381 @@ msgstr ""
"\n"
"Peut'on considérer que '%s' est en version 1.5.0 ?\n"
-#: git-gui.sh:918
+#: git-gui.sh:972
msgid "Git directory not found:"
-msgstr "Impossible de trouver le répertoire de Git :"
+msgstr "Impossible de trouver le répertoire git :"
-#: git-gui.sh:925
+#: git-gui.sh:979
msgid "Cannot move to top of working directory:"
msgstr "Impossible d'aller à la racine du répertoire de travail :"
-#: git-gui.sh:932
+#: git-gui.sh:986
msgid "Cannot use funny .git directory:"
-msgstr "Impossible d'utiliser un drôle de répertoire git :"
+msgstr "Impossible d'utiliser le répertoire .git:"
-#: git-gui.sh:937
+#: git-gui.sh:991
msgid "No working directory"
-msgstr "Pas de répertoire de travail"
+msgstr "Aucun répertoire de travail"
-#: git-gui.sh:1084 lib/checkout_op.tcl:283
+#: git-gui.sh:1138 lib/checkout_op.tcl:305
msgid "Refreshing file status..."
msgstr "Rafraichissement du status des fichiers..."
-#: git-gui.sh:1149
+#: git-gui.sh:1194
msgid "Scanning for modified files ..."
msgstr "Recherche de fichiers modifiés..."
-#: git-gui.sh:1324 lib/browser.tcl:246
+#: git-gui.sh:1369 lib/browser.tcl:246
msgid "Ready."
msgstr "Prêt."
-#: git-gui.sh:1590
+#: git-gui.sh:1635
msgid "Unmodified"
msgstr "Non modifié"
-#: git-gui.sh:1592
+#: git-gui.sh:1637
msgid "Modified, not staged"
-msgstr "Modifié, non pré-commité"
+msgstr "Modifié, pas indexé"
-#: git-gui.sh:1593 git-gui.sh:1598
+#: git-gui.sh:1638 git-gui.sh:1643
msgid "Staged for commit"
-msgstr "Pré-commité"
+msgstr "Indexé"
-#: git-gui.sh:1594 git-gui.sh:1599
+#: git-gui.sh:1639 git-gui.sh:1644
msgid "Portions staged for commit"
-msgstr "En partie pré-commité"
+msgstr "Portions indexées"
-#: git-gui.sh:1595 git-gui.sh:1600
+#: git-gui.sh:1640 git-gui.sh:1645
msgid "Staged for commit, missing"
-msgstr "Pré-commité, manquant"
+msgstr "Indexés, manquant"
-#: git-gui.sh:1597
+#: git-gui.sh:1642
msgid "Untracked, not staged"
-msgstr "Non suivi, non pré-commité"
+msgstr "Non versionné, non indexé"
-#: git-gui.sh:1602
+#: git-gui.sh:1647
msgid "Missing"
msgstr "Manquant"
-#: git-gui.sh:1603
+#: git-gui.sh:1648
msgid "Staged for removal"
-msgstr "Pré-commité pour suppression"
+msgstr "Indexé pour suppression"
-#: git-gui.sh:1604
+#: git-gui.sh:1649
msgid "Staged for removal, still present"
-msgstr "Pré-commité pour suppression, toujours présent"
+msgstr "Indexé pour suppression, toujours présent"
-#: git-gui.sh:1606 git-gui.sh:1607 git-gui.sh:1608 git-gui.sh:1609
+#: git-gui.sh:1651 git-gui.sh:1652 git-gui.sh:1653 git-gui.sh:1654
msgid "Requires merge resolution"
msgstr "Nécessite la résolution d'une fusion"
-#: git-gui.sh:1644
+#: git-gui.sh:1689
msgid "Starting gitk... please wait..."
-msgstr "Lancement de gitk... merci de patienter..."
+msgstr "Lancement de gitk... un instant..."
-#: git-gui.sh:1653
-#, tcl-format
-msgid ""
-"Unable to start gitk:\n"
-"\n"
-"%s does not exist"
-msgstr ""
-"Impossible de lancer gitk :\n"
-"\n"
-"%s inexistant"
+#: git-gui.sh:1698
+msgid "Couldn't find gitk in PATH"
+msgstr "Impossible de trouver gitk dans PATH."
-#: git-gui.sh:1860 lib/choose_repository.tcl:36
+#: git-gui.sh:1948 lib/choose_repository.tcl:36
msgid "Repository"
-msgstr "Référentiel"
+msgstr "Dépôt"
-#: git-gui.sh:1861
+#: git-gui.sh:1949
msgid "Edit"
-msgstr "Editer"
+msgstr "Edition"
-#: git-gui.sh:1863 lib/choose_rev.tcl:561
+#: git-gui.sh:1951 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "Branche"
-#: git-gui.sh:1866 lib/choose_rev.tcl:548
+#: git-gui.sh:1954 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "Commit"
-#: git-gui.sh:1869 lib/merge.tcl:120 lib/merge.tcl:149 lib/merge.tcl:167
+#: git-gui.sh:1957 lib/merge.tcl:120 lib/merge.tcl:149 lib/merge.tcl:167
msgid "Merge"
msgstr "Fusionner"
-#: git-gui.sh:1870 lib/choose_rev.tcl:557
+#: git-gui.sh:1958 lib/choose_rev.tcl:557
msgid "Remote"
-msgstr "Référentiel distant"
+msgstr "Dépôt distant"
-#: git-gui.sh:1879
+#: git-gui.sh:1967
msgid "Browse Current Branch's Files"
-msgstr "Visionner fichiers dans branche courante"
+msgstr "Naviguer dans la branche courante"
-#: git-gui.sh:1883
+#: git-gui.sh:1971
msgid "Browse Branch Files..."
-msgstr "Visionner fichiers de branche"
+msgstr "Naviguer dans la branche..."
-#: git-gui.sh:1888
+#: git-gui.sh:1976
msgid "Visualize Current Branch's History"
msgstr "Visualiser historique branche courante"
-#: git-gui.sh:1892
+#: git-gui.sh:1980
msgid "Visualize All Branch History"
-msgstr "Visualiser historique toutes branches"
+msgstr "Voir l'historique de toutes les branches"
-#: git-gui.sh:1899
+#: git-gui.sh:1987
#, tcl-format
msgid "Browse %s's Files"
-msgstr "Visionner fichiers de %s"
+msgstr "Naviguer l'arborescence de %s"
-#: git-gui.sh:1901
+#: git-gui.sh:1989
#, tcl-format
msgid "Visualize %s's History"
-msgstr "Visualiser historique de %s"
+msgstr "Voir l'historique de la branche: %s"
-#: git-gui.sh:1906 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:1994 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
-msgstr "Statistiques base de donnée"
+msgstr "Statistiques du dépôt"
-#: git-gui.sh:1909 lib/database.tcl:34
+#: git-gui.sh:1997 lib/database.tcl:34
msgid "Compress Database"
-msgstr "Comprimer base de donnée"
+msgstr "Comprimer le dépôt"
-#: git-gui.sh:1912
+#: git-gui.sh:2000
msgid "Verify Database"
-msgstr "Vérifier base de donnée"
+msgstr "Vérifier le dépôt"
-#: git-gui.sh:1919 git-gui.sh:1923 git-gui.sh:1927 lib/shortcut.tcl:7
+#: git-gui.sh:2007 git-gui.sh:2011 git-gui.sh:2015 lib/shortcut.tcl:7
#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
msgid "Create Desktop Icon"
msgstr "Créer icône sur bureau"
-#: git-gui.sh:1932 lib/choose_repository.tcl:177 lib/choose_repository.tcl:185
+#: git-gui.sh:2023 lib/choose_repository.tcl:177 lib/choose_repository.tcl:185
msgid "Quit"
msgstr "Quitter"
-#: git-gui.sh:1939
+#: git-gui.sh:2031
msgid "Undo"
msgstr "Défaire"
-#: git-gui.sh:1942
+#: git-gui.sh:2034
msgid "Redo"
msgstr "Refaire"
-#: git-gui.sh:1946 git-gui.sh:2443
+#: git-gui.sh:2038 git-gui.sh:2545
msgid "Cut"
msgstr "Couper"
-#: git-gui.sh:1949 git-gui.sh:2446 git-gui.sh:2520 git-gui.sh:2614
+#: git-gui.sh:2041 git-gui.sh:2548 git-gui.sh:2622 git-gui.sh:2715
#: lib/console.tcl:69
msgid "Copy"
msgstr "Copier"
-#: git-gui.sh:1952 git-gui.sh:2449
+#: git-gui.sh:2044 git-gui.sh:2551
msgid "Paste"
msgstr "Coller"
-#: git-gui.sh:1955 git-gui.sh:2452 lib/branch_delete.tcl:26
+#: git-gui.sh:2047 git-gui.sh:2554 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "Supprimer"
-#: git-gui.sh:1959 git-gui.sh:2456 git-gui.sh:2618 lib/console.tcl:71
+#: git-gui.sh:2051 git-gui.sh:2558 git-gui.sh:2719 lib/console.tcl:71
msgid "Select All"
msgstr "Tout sélectionner"
-#: git-gui.sh:1968
+#: git-gui.sh:2060
msgid "Create..."
msgstr "Créer..."
-#: git-gui.sh:1974
+#: git-gui.sh:2066
msgid "Checkout..."
-msgstr "Emprunter... "
+msgstr "Charger (checkout)..."
-#: git-gui.sh:1980
+#: git-gui.sh:2072
msgid "Rename..."
msgstr "Renommer..."
-#: git-gui.sh:1985 git-gui.sh:2085
+#: git-gui.sh:2077 git-gui.sh:2187
msgid "Delete..."
msgstr "Supprimer..."
-#: git-gui.sh:1990
+#: git-gui.sh:2082
msgid "Reset..."
msgstr "Réinitialiser..."
-#: git-gui.sh:2002 git-gui.sh:2389
+#: git-gui.sh:2094 git-gui.sh:2491
msgid "New Commit"
msgstr "Nouveau commit"
-#: git-gui.sh:2010 git-gui.sh:2396
+#: git-gui.sh:2102 git-gui.sh:2498
msgid "Amend Last Commit"
msgstr "Corriger dernier commit"
-#: git-gui.sh:2019 git-gui.sh:2356 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2111 git-gui.sh:2458 lib/remote_branch_delete.tcl:99
msgid "Rescan"
-msgstr "Resynchroniser"
+msgstr "Recharger modifs."
-#: git-gui.sh:2025
+#: git-gui.sh:2117
msgid "Stage To Commit"
-msgstr "Commiter un pré-commit"
+msgstr "Indexer"
-#: git-gui.sh:2031
+#: git-gui.sh:2123
msgid "Stage Changed Files To Commit"
-msgstr "Commiter fichiers modifiés dans pré-commit"
+msgstr "Indexer toutes modifications"
-#: git-gui.sh:2037
+#: git-gui.sh:2129
msgid "Unstage From Commit"
-msgstr "Commit vers pré-commit"
+msgstr "Désindexer"
-#: git-gui.sh:2042 lib/index.tcl:395
+#: git-gui.sh:2134 lib/index.tcl:395
msgid "Revert Changes"
-msgstr "Inverser modification"
+msgstr "Annuler les modifications (revert)"
-#: git-gui.sh:2049 git-gui.sh:2368 git-gui.sh:2467
+#: git-gui.sh:2141 git-gui.sh:2702
+msgid "Show Less Context"
+msgstr "Montrer moins de contexte"
+
+#: git-gui.sh:2145 git-gui.sh:2706
+msgid "Show More Context"
+msgstr "Montrer plus de contexte"
+
+#: git-gui.sh:2151 git-gui.sh:2470 git-gui.sh:2569
msgid "Sign Off"
-msgstr "Se désinscrire"
+msgstr "Signer"
-#: git-gui.sh:2053 git-gui.sh:2372
+#: git-gui.sh:2155 git-gui.sh:2474
msgid "Commit@@verb"
msgstr "Commiter"
-#: git-gui.sh:2064
+#: git-gui.sh:2166
msgid "Local Merge..."
msgstr "Fusion locale..."
-#: git-gui.sh:2069
+#: git-gui.sh:2171
msgid "Abort Merge..."
msgstr "Abandonner fusion..."
-#: git-gui.sh:2081
+#: git-gui.sh:2183
msgid "Push..."
msgstr "Pousser..."
-#: git-gui.sh:2092 lib/choose_repository.tcl:41
-msgid "Apple"
-msgstr "Pomme"
-
-#: git-gui.sh:2095 git-gui.sh:2117 lib/about.tcl:14
+#: git-gui.sh:2197 git-gui.sh:2219 lib/about.tcl:14
#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:50
#, tcl-format
msgid "About %s"
-msgstr "A propos de %s"
+msgstr "À propos de %s"
-#: git-gui.sh:2099
+#: git-gui.sh:2201
msgid "Preferences..."
msgstr "Préférences..."
-#: git-gui.sh:2107 git-gui.sh:2639
+#: git-gui.sh:2209 git-gui.sh:2740
msgid "Options..."
msgstr "Options..."
-#: git-gui.sh:2113 lib/choose_repository.tcl:47
+#: git-gui.sh:2215 lib/choose_repository.tcl:47
msgid "Help"
msgstr "Aide"
-#: git-gui.sh:2154
+#: git-gui.sh:2256
msgid "Online Documentation"
msgstr "Documentation en ligne"
-#: git-gui.sh:2238
+#: git-gui.sh:2340
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
-msgstr "erreur fatale : pas d'infos sur le chemin %s : Fichier ou répertoire inexistant"
+msgstr ""
+"erreur fatale : pas d'infos sur le chemin %s : Fichier ou répertoire "
+"inexistant"
-#: git-gui.sh:2271
+#: git-gui.sh:2373
msgid "Current Branch:"
msgstr "Branche courante :"
-#: git-gui.sh:2292
+#: git-gui.sh:2394
msgid "Staged Changes (Will Commit)"
-msgstr "Modifications pré-commitées"
+msgstr "Modifs. indexées (pour commit)"
-#: git-gui.sh:2312
+#: git-gui.sh:2414
msgid "Unstaged Changes"
-msgstr "Modifications non pré-commitées"
+msgstr "Modifs. non indexées"
-#: git-gui.sh:2362
+#: git-gui.sh:2464
msgid "Stage Changed"
-msgstr "Pré-commit modifié"
+msgstr "Indexer modifs."
-#: git-gui.sh:2378 lib/transport.tcl:93 lib/transport.tcl:182
+#: git-gui.sh:2480 lib/transport.tcl:93 lib/transport.tcl:182
msgid "Push"
msgstr "Pousser"
-#: git-gui.sh:2408
+#: git-gui.sh:2510
msgid "Initial Commit Message:"
msgstr "Message de commit initial :"
-#: git-gui.sh:2409
+#: git-gui.sh:2511
msgid "Amended Commit Message:"
msgstr "Message de commit corrigé :"
-#: git-gui.sh:2410
+#: git-gui.sh:2512
msgid "Amended Initial Commit Message:"
msgstr "Message de commit initial corrigé :"
-#: git-gui.sh:2411
+#: git-gui.sh:2513
msgid "Amended Merge Commit Message:"
msgstr "Message de commit de fusion corrigé :"
-#: git-gui.sh:2412
+#: git-gui.sh:2514
msgid "Merge Commit Message:"
msgstr "Message de commit de fusion :"
-#: git-gui.sh:2413
+#: git-gui.sh:2515
msgid "Commit Message:"
msgstr "Message de commit :"
-#: git-gui.sh:2459 git-gui.sh:2622 lib/console.tcl:73
+#: git-gui.sh:2561 git-gui.sh:2723 lib/console.tcl:73
msgid "Copy All"
msgstr "Copier tout"
-#: git-gui.sh:2483 lib/blame.tcl:107
+#: git-gui.sh:2585 lib/blame.tcl:100
msgid "File:"
msgstr "Fichier :"
-#: git-gui.sh:2589
+#: git-gui.sh:2691
msgid "Apply/Reverse Hunk"
msgstr "Appliquer/Inverser section"
-#: git-gui.sh:2595
-msgid "Show Less Context"
-msgstr "Montrer moins de contexte"
-
-#: git-gui.sh:2602
-msgid "Show More Context"
-msgstr "Montrer plus de contexte"
+#: git-gui.sh:2696
+msgid "Apply/Reverse Line"
+msgstr "Appliquer/Inverser la ligne"
-#: git-gui.sh:2610
+#: git-gui.sh:2711
msgid "Refresh"
msgstr "Rafraichir"
-#: git-gui.sh:2631
+#: git-gui.sh:2732
msgid "Decrease Font Size"
-msgstr "Réduire fonte"
+msgstr "Diminuer la police"
-#: git-gui.sh:2635
+#: git-gui.sh:2736
msgid "Increase Font Size"
-msgstr "Agrandir fonte"
+msgstr "Agrandir la police"
-#: git-gui.sh:2646
+#: git-gui.sh:2747
msgid "Unstage Hunk From Commit"
-msgstr "Enlever section pré-commitée"
+msgstr "Désindexer la section"
+
+#: git-gui.sh:2748
+msgid "Unstage Line From Commit"
+msgstr "Désindexer la ligne"
-#: git-gui.sh:2648
+#: git-gui.sh:2750
msgid "Stage Hunk For Commit"
-msgstr "Pré-commiter section"
+msgstr "Indexer la section"
-#: git-gui.sh:2667
+#: git-gui.sh:2751
+msgid "Stage Line For Commit"
+msgstr "Indexer la ligne"
+
+#: git-gui.sh:2771
msgid "Initializing..."
msgstr "Initialisation..."
-#: git-gui.sh:2762
+#: git-gui.sh:2876
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -451,7 +455,7 @@ msgstr ""
"sous-processus de Git lancés par %s\n"
"\n"
-#: git-gui.sh:2792
+#: git-gui.sh:2906
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -461,7 +465,7 @@ msgstr ""
"Ceci est du à un problème connu avec\n"
"le binaire Tcl distribué par Cygwin."
-#: git-gui.sh:2797
+#: git-gui.sh:2911
#, tcl-format
msgid ""
"\n"
@@ -482,78 +486,94 @@ msgstr ""
msgid "git-gui - a graphical user interface for Git."
msgstr "git-gui - une interface graphique utilisateur pour Git"
-#: lib/blame.tcl:77
+#: lib/blame.tcl:70
msgid "File Viewer"
msgstr "Visionneur de fichier"
-#: lib/blame.tcl:81
+#: lib/blame.tcl:74
msgid "Commit:"
msgstr "Commit :"
-#: lib/blame.tcl:264
+#: lib/blame.tcl:257
msgid "Copy Commit"
msgstr "Copier commit"
-#: lib/blame.tcl:384
+#: lib/blame.tcl:260
+msgid "Do Full Copy Detection"
+msgstr "Lancer la détection approfondie des copies"
+
+#: lib/blame.tcl:388
#, tcl-format
msgid "Reading %s..."
msgstr "Lecture de %s..."
-#: lib/blame.tcl:488
+#: lib/blame.tcl:492
msgid "Loading copy/move tracking annotations..."
msgstr "Chargement des annotations de suivi des copies/déplacements..."
-#: lib/blame.tcl:508
+#: lib/blame.tcl:512
msgid "lines annotated"
msgstr "lignes annotées"
-#: lib/blame.tcl:689
+#: lib/blame.tcl:704
msgid "Loading original location annotations..."
msgstr "Chargement des annotations d'emplacement original"
-#: lib/blame.tcl:692
+#: lib/blame.tcl:707
msgid "Annotation complete."
msgstr "Annotation terminée."
-#: lib/blame.tcl:746
+#: lib/blame.tcl:737
+msgid "Busy"
+msgstr "Occupé"
+
+#: lib/blame.tcl:738
+msgid "Annotation process is already running."
+msgstr "Annotation en cours d'exécution."
+
+#: lib/blame.tcl:777
+msgid "Running thorough copy detection..."
+msgstr "Recherche de copie approfondie en cours..."
+
+#: lib/blame.tcl:827
msgid "Loading annotation..."
msgstr "Chargement des annotations..."
-#: lib/blame.tcl:802
+#: lib/blame.tcl:883
msgid "Author:"
msgstr "Auteur :"
-#: lib/blame.tcl:806
+#: lib/blame.tcl:887
msgid "Committer:"
msgstr "Commiteur :"
-#: lib/blame.tcl:811
+#: lib/blame.tcl:892
msgid "Original File:"
msgstr "Fichier original :"
-#: lib/blame.tcl:925
+#: lib/blame.tcl:1006
msgid "Originally By:"
msgstr "A l'origine par :"
-#: lib/blame.tcl:931
+#: lib/blame.tcl:1012
msgid "In File:"
msgstr "Dans le fichier :"
-#: lib/blame.tcl:936
+#: lib/blame.tcl:1017
msgid "Copied Or Moved Here By:"
msgstr "Copié ou déplacé ici par :"
#: lib/branch_checkout.tcl:14 lib/branch_checkout.tcl:19
msgid "Checkout Branch"
-msgstr "Emprunter branche"
+msgstr "Charger la branche (checkout)"
#: lib/branch_checkout.tcl:23
msgid "Checkout"
-msgstr "Emprunter"
+msgstr "Charger (checkout)"
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:522 lib/choose_font.tcl:43 lib/merge.tcl:171
+#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:171
#: lib/option.tcl:103 lib/remote_branch_delete.tcl:42 lib/transport.tcl:97
msgid "Cancel"
msgstr "Annuler"
@@ -562,17 +582,17 @@ msgstr "Annuler"
msgid "Revision"
msgstr "Révision"
-#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:242
+#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:244
msgid "Options"
msgstr "Options"
#: lib/branch_checkout.tcl:39 lib/branch_create.tcl:92
msgid "Fetch Tracking Branch"
-msgstr "Branche suivant récupération"
+msgstr "Récupérer la branche de suivi"
#: lib/branch_checkout.tcl:44
msgid "Detach From Local Branch"
-msgstr "Détacher de branche locale"
+msgstr "Détacher de la branche locale"
#: lib/branch_create.tcl:22
msgid "Create Branch"
@@ -600,7 +620,7 @@ msgstr "Trouver nom de branche de suivi"
#: lib/branch_create.tcl:66
msgid "Starting Revision"
-msgstr "Début de révision"
+msgstr "Révision initiale"
#: lib/branch_create.tcl:72
msgid "Update Existing Branch:"
@@ -612,28 +632,28 @@ msgstr "Non"
#: lib/branch_create.tcl:80
msgid "Fast Forward Only"
-msgstr "Avance rapide seulement"
+msgstr "Mise-à-jour rectiligne seulement (fast-forward)"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:514
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
msgid "Reset"
msgstr "Réinitialiser"
#: lib/branch_create.tcl:97
msgid "Checkout After Creation"
-msgstr "Emprunt après création"
+msgstr "Charger (checkout) après création"
#: lib/branch_create.tcl:131
msgid "Please select a tracking branch."
-msgstr "Merci de choisir une branche de suivi"
+msgstr "Choisissez une branche de suivi"
#: lib/branch_create.tcl:140
#, tcl-format
msgid "Tracking branch %s is not a branch in the remote repository."
-msgstr "La branche de suivi %s n'est pas une branche dans le référentiel distant."
+msgstr "La branche de suivi %s n'est pas une branche dans le dépôt distant."
#: lib/branch_create.tcl:153 lib/branch_rename.tcl:86
msgid "Please supply a branch name."
-msgstr "Merci de fournir un nom de branche."
+msgstr "Fournissez un nom de branche."
#: lib/branch_create.tcl:164 lib/branch_rename.tcl:106
#, tcl-format
@@ -654,7 +674,7 @@ msgstr "Branches locales"
#: lib/branch_delete.tcl:52
msgid "Delete Only If Merged Into"
-msgstr "Supprimer ssi fusion dedans"
+msgstr "Supprimer seulement si fusionnée dans:"
#: lib/branch_delete.tcl:54
msgid "Always (Do not perform merge test.)"
@@ -704,7 +724,7 @@ msgstr "Nouveau nom :"
msgid "Please select a branch to rename."
msgstr "Merci de sélectionner une branche à renommer."
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:179
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:201
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "La branche '%s' existe déjà."
@@ -712,7 +732,7 @@ msgstr "La branche '%s' existe déjà."
#: lib/branch_rename.tcl:117
#, tcl-format
msgid "Failed to rename '%s'."
-msgstr "Le renommage de '%s' a échoué."
+msgstr "Échec pour renommer '%s'."
#: lib/browser.tcl:17
msgid "Starting..."
@@ -733,34 +753,39 @@ msgstr "[Jusqu'au parent]"
#: lib/browser.tcl:267 lib/browser.tcl:273
msgid "Browse Branch Files"
-msgstr "Visionner fichiers de branches"
+msgstr "Naviguer dans les fichiers de le branche"
#: lib/browser.tcl:278 lib/choose_repository.tcl:387
-#: lib/choose_repository.tcl:474 lib/choose_repository.tcl:484
-#: lib/choose_repository.tcl:987
+#: lib/choose_repository.tcl:472 lib/choose_repository.tcl:482
+#: lib/choose_repository.tcl:985
msgid "Browse"
-msgstr "Visionner"
+msgstr "Naviguer"
-#: lib/checkout_op.tcl:79
+#: lib/checkout_op.tcl:84
#, tcl-format
msgid "Fetching %s from %s"
msgstr "Récupération de %s à partir de %s"
-#: lib/checkout_op.tcl:127
+#: lib/checkout_op.tcl:132
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "erreur fatale : Impossible de résoudre %s"
-#: lib/checkout_op.tcl:140 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
msgid "Close"
msgstr "Fermer"
-#: lib/checkout_op.tcl:169
+#: lib/checkout_op.tcl:174
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "La branche '%s' n'existe pas."
-#: lib/checkout_op.tcl:206
+#: lib/checkout_op.tcl:193
+#, tcl-format
+msgid "Failed to configure simplified git-pull for '%s'."
+msgstr "Échec de la configuration simplifiée de git-pull pour '%s'."
+
+#: lib/checkout_op.tcl:228
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -770,24 +795,24 @@ msgid ""
msgstr ""
"La branche '%s' existe déjà.\n"
"\n"
-"Impossible d'avancer rapidement à %s.\n"
+"Impossible de faire une avance rapide (fast forward) vers %s.\n"
"Une fusion est nécessaire."
-#: lib/checkout_op.tcl:220
+#: lib/checkout_op.tcl:242
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "La stratégie de fusion '%s' n'est pas supportée."
-#: lib/checkout_op.tcl:239
+#: lib/checkout_op.tcl:261
#, tcl-format
msgid "Failed to update '%s'."
msgstr "La mise à jour de '%s' a échouée."
-#: lib/checkout_op.tcl:251
+#: lib/checkout_op.tcl:273
msgid "Staging area (index) is already locked."
-msgstr "L'espace de pré-commit ('index' ou 'staging') est déjà vérouillé."
+msgstr "L'index (staging area) est déjà vérouillé"
-#: lib/checkout_op.tcl:266
+#: lib/checkout_op.tcl:288
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -796,36 +821,39 @@ msgid ""
"\n"
"The rescan will be automatically started now.\n"
msgstr ""
-"L'état lors de la dernière synchronisation ne correspond plus à l'état du référentiel.\n"
+"L'état lors de la dernière synchronisation ne correspond plus à l'état du "
+"dépôt\n"
"\n"
-"Un autre programme Git a modifié ce référentiel depuis la dernière synchronisation. Une resynchronisation doit être effectuée avant de pouvoir modifier la branche courante.\n"
+"Un autre programme Git a modifié ce dépôt depuis la dernière "
+"synchronisation. Une resynchronisation doit être effectuée avant de pouvoir "
+"modifier la branche courante.\n"
"\n"
"Cela va être fait tout de suite automatiquement.\n"
-#: lib/checkout_op.tcl:322
+#: lib/checkout_op.tcl:344
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Mise à jour du répertoire courant avec '%s'..."
-#: lib/checkout_op.tcl:323
+#: lib/checkout_op.tcl:345
msgid "files checked out"
-msgstr "fichiers empruntés"
+msgstr "fichiers chargés"
-#: lib/checkout_op.tcl:353
+#: lib/checkout_op.tcl:375
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
-msgstr "Emprunt de '%s' abandonné. (Il est nécessaire de fusionner des fichiers.)"
+msgstr "Chargement de '%s' abandonné (il est nécessaire de fusionner des fichiers)."
-#: lib/checkout_op.tcl:354
+#: lib/checkout_op.tcl:376
msgid "File level merge required."
msgstr "Il est nécessaire de fusionner des fichiers."
-#: lib/checkout_op.tcl:358
+#: lib/checkout_op.tcl:380
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Le répertoire de travail reste sur la branche '%s'."
-#: lib/checkout_op.tcl:429
+#: lib/checkout_op.tcl:451
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -837,30 +865,30 @@ msgstr ""
"Si vous vouliez être sur une branche, créez en une maintenant en partant de "
"'Cet emprunt détaché'."
-#: lib/checkout_op.tcl:446 lib/checkout_op.tcl:450
+#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
#, tcl-format
msgid "Checked out '%s'."
-msgstr "'%s' emprunté."
+msgstr "'%s' chargé."
-#: lib/checkout_op.tcl:478
+#: lib/checkout_op.tcl:500
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr "Réinitialiser '%s' à '%s' va faire perdre les commits suivants :"
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:522
msgid "Recovering lost commits may not be easy."
msgstr "Récupérer les commits perdus ne sera peut être pas facile."
-#: lib/checkout_op.tcl:505
+#: lib/checkout_op.tcl:527
#, tcl-format
msgid "Reset '%s'?"
msgstr "Réinitialiser '%s' ?"
-#: lib/checkout_op.tcl:510 lib/merge.tcl:163
+#: lib/checkout_op.tcl:532 lib/merge.tcl:163
msgid "Visualize"
msgstr "Visualiser"
-#: lib/checkout_op.tcl:578
+#: lib/checkout_op.tcl:600
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -884,15 +912,15 @@ msgstr "Sélectionner"
#: lib/choose_font.tcl:53
msgid "Font Family"
-msgstr "Famille de fonte"
+msgstr "Familles de polices"
#: lib/choose_font.tcl:74
msgid "Font Size"
-msgstr "Taille de fonte"
+msgstr "Taille de police"
#: lib/choose_font.tcl:91
msgid "Font Example"
-msgstr "Exemple de fonte"
+msgstr "Exemple de police"
#: lib/choose_font.tcl:103
msgid ""
@@ -900,7 +928,7 @@ msgid ""
"If you like this text, it can be your font."
msgstr ""
"C'est un texte d'exemple.\n"
-"Si vous aimez ce texte, vous pouvez choisir cette fonte."
+"Si vous aimez ce texte, vous pouvez choisir cette police"
#: lib/choose_repository.tcl:28
msgid "Git Gui"
@@ -908,23 +936,23 @@ msgstr "Git Gui"
#: lib/choose_repository.tcl:81 lib/choose_repository.tcl:376
msgid "Create New Repository"
-msgstr "Créer nouveau référentiel"
+msgstr "Créer nouveau dépôt"
#: lib/choose_repository.tcl:87
msgid "New..."
msgstr "Nouveau..."
-#: lib/choose_repository.tcl:94 lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:94 lib/choose_repository.tcl:458
msgid "Clone Existing Repository"
-msgstr "Cloner référentiel existant"
+msgstr "Cloner dépôt existant"
#: lib/choose_repository.tcl:100
msgid "Clone..."
msgstr "Cloner..."
-#: lib/choose_repository.tcl:107 lib/choose_repository.tcl:976
+#: lib/choose_repository.tcl:107 lib/choose_repository.tcl:974
msgid "Open Existing Repository"
-msgstr "Ouvrir référentiel existant"
+msgstr "Ouvrir dépôt existant"
#: lib/choose_repository.tcl:113
msgid "Open..."
@@ -932,202 +960,202 @@ msgstr "Ouvrir..."
#: lib/choose_repository.tcl:126
msgid "Recent Repositories"
-msgstr "Référentiels récents"
+msgstr "Dépôt récemment utilisés"
#: lib/choose_repository.tcl:132
msgid "Open Recent Repository:"
-msgstr "Ouvrir référentiel récent :"
+msgstr "Ouvrir dépôt récent :"
#: lib/choose_repository.tcl:296 lib/choose_repository.tcl:303
#: lib/choose_repository.tcl:310
#, tcl-format
msgid "Failed to create repository %s:"
-msgstr "La création du référentiel %s a échouée :"
+msgstr "La création du dépôt %s a échouée :"
-#: lib/choose_repository.tcl:381 lib/choose_repository.tcl:478
+#: lib/choose_repository.tcl:381 lib/choose_repository.tcl:476
msgid "Directory:"
msgstr "Répertoire :"
-#: lib/choose_repository.tcl:412 lib/choose_repository.tcl:537
-#: lib/choose_repository.tcl:1011
+#: lib/choose_repository.tcl:410 lib/choose_repository.tcl:535
+#: lib/choose_repository.tcl:1007
msgid "Git Repository"
-msgstr "Référentiel Git"
+msgstr "Dépôt Git"
-#: lib/choose_repository.tcl:437
+#: lib/choose_repository.tcl:435
#, tcl-format
msgid "Directory %s already exists."
msgstr "Le répertoire %s existe déjà."
-#: lib/choose_repository.tcl:441
+#: lib/choose_repository.tcl:439
#, tcl-format
msgid "File %s already exists."
msgstr "Le fichier %s existe déjà."
-#: lib/choose_repository.tcl:455
+#: lib/choose_repository.tcl:453
msgid "Clone"
msgstr "Cloner"
-#: lib/choose_repository.tcl:468
+#: lib/choose_repository.tcl:466
msgid "URL:"
msgstr "URL :"
-#: lib/choose_repository.tcl:489
+#: lib/choose_repository.tcl:487
msgid "Clone Type:"
msgstr "Type de clonage :"
-#: lib/choose_repository.tcl:495
+#: lib/choose_repository.tcl:493
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Standard (rapide, semi-redondant, liens durs)"
-#: lib/choose_repository.tcl:501
+#: lib/choose_repository.tcl:499
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Copy complète (plus lent, sauvegarde redondante)"
-#: lib/choose_repository.tcl:507
+#: lib/choose_repository.tcl:505
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr "Partagé (le plus rapide, non recommandé, pas de sauvegarde)"
-#: lib/choose_repository.tcl:543 lib/choose_repository.tcl:590
-#: lib/choose_repository.tcl:736 lib/choose_repository.tcl:806
-#: lib/choose_repository.tcl:1017 lib/choose_repository.tcl:1025
+#: lib/choose_repository.tcl:541 lib/choose_repository.tcl:588
+#: lib/choose_repository.tcl:734 lib/choose_repository.tcl:804
+#: lib/choose_repository.tcl:1013 lib/choose_repository.tcl:1021
#, tcl-format
msgid "Not a Git repository: %s"
-msgstr "'%s' n'est pas un référentiel Git."
+msgstr "'%s' n'est pas un dépôt Git."
-#: lib/choose_repository.tcl:579
+#: lib/choose_repository.tcl:577
msgid "Standard only available for local repository."
-msgstr "Standard n'est disponible que pour un référentiel local."
+msgstr "Standard n'est disponible que pour un dépôt local."
-#: lib/choose_repository.tcl:583
+#: lib/choose_repository.tcl:581
msgid "Shared only available for local repository."
-msgstr "Partagé n'est disponible que pour un référentiel local."
+msgstr "Partagé n'est disponible que pour un dépôt local."
-#: lib/choose_repository.tcl:604
+#: lib/choose_repository.tcl:602
#, tcl-format
msgid "Location %s already exists."
msgstr "L'emplacement %s existe déjà."
-#: lib/choose_repository.tcl:615
+#: lib/choose_repository.tcl:613
msgid "Failed to configure origin"
msgstr "La configuration de l'origine a échouée."
-#: lib/choose_repository.tcl:627
+#: lib/choose_repository.tcl:625
msgid "Counting objects"
-msgstr "Comptage des objets"
+msgstr "Décompte des objets"
-#: lib/choose_repository.tcl:628
+#: lib/choose_repository.tcl:626
msgid "buckets"
msgstr "paniers"
-#: lib/choose_repository.tcl:652
+#: lib/choose_repository.tcl:650
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "Impossible de copier 'objects/info/alternates' : %s"
-#: lib/choose_repository.tcl:688
+#: lib/choose_repository.tcl:686
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "Il n'y a rien à cloner depuis %s."
-#: lib/choose_repository.tcl:690 lib/choose_repository.tcl:904
-#: lib/choose_repository.tcl:916
+#: lib/choose_repository.tcl:688 lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:914
msgid "The 'master' branch has not been initialized."
-msgstr "Cette branche 'master' n'a pas été initialisée."
+msgstr "La branche 'master' n'a pas été initialisée."
-#: lib/choose_repository.tcl:703
+#: lib/choose_repository.tcl:701
msgid "Hardlinks are unavailable. Falling back to copying."
-msgstr "Les liens durs ne sont pas disponibles. On se résoud à copier."
+msgstr "Les liens durs ne sont pas supportés. Une copie sera effectuée à la place."
-#: lib/choose_repository.tcl:715
+#: lib/choose_repository.tcl:713
#, tcl-format
msgid "Cloning from %s"
msgstr "Clonage depuis %s"
-#: lib/choose_repository.tcl:746
+#: lib/choose_repository.tcl:744
msgid "Copying objects"
msgstr "Copie des objets"
-#: lib/choose_repository.tcl:747
+#: lib/choose_repository.tcl:745
msgid "KiB"
msgstr "KiB"
-#: lib/choose_repository.tcl:771
+#: lib/choose_repository.tcl:769
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "Impossible de copier l'objet : %s"
-#: lib/choose_repository.tcl:781
+#: lib/choose_repository.tcl:779
msgid "Linking objects"
msgstr "Liaison des objets"
-#: lib/choose_repository.tcl:782
+#: lib/choose_repository.tcl:780
msgid "objects"
msgstr "objets"
-#: lib/choose_repository.tcl:790
+#: lib/choose_repository.tcl:788
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "Impossible créer un lien dur pour l'objet : %s"
-#: lib/choose_repository.tcl:845
+#: lib/choose_repository.tcl:843
msgid "Cannot fetch branches and objects. See console output for details."
msgstr ""
"Impossible de récupérer les branches et objets. Voir la sortie console pour "
"plus de détails."
-#: lib/choose_repository.tcl:856
+#: lib/choose_repository.tcl:854
msgid "Cannot fetch tags. See console output for details."
msgstr ""
-"Impossible de récupérer les marques. Voir la sortie console pour plus de "
-"détails."
+"Impossible de récupérer les marques (tags). Voir la sortie console pour plus "
+"de détails."
-#: lib/choose_repository.tcl:880
+#: lib/choose_repository.tcl:878
msgid "Cannot determine HEAD. See console output for details."
msgstr "Impossible de déterminer HEAD. Voir la sortie console pour plus de détails."
-#: lib/choose_repository.tcl:889
+#: lib/choose_repository.tcl:887
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "Impossible de nettoyer %s"
-#: lib/choose_repository.tcl:895
+#: lib/choose_repository.tcl:893
msgid "Clone failed."
msgstr "Le clonage a échoué."
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:900
msgid "No default branch obtained."
msgstr "Aucune branche par défaut n'a été obtenue."
-#: lib/choose_repository.tcl:913
+#: lib/choose_repository.tcl:911
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "Impossible de résoudre %s comme commit."
-#: lib/choose_repository.tcl:925
+#: lib/choose_repository.tcl:923
msgid "Creating working directory"
msgstr "Création du répertoire de travail"
-#: lib/choose_repository.tcl:926 lib/index.tcl:65 lib/index.tcl:127
+#: lib/choose_repository.tcl:924 lib/index.tcl:65 lib/index.tcl:127
#: lib/index.tcl:193
msgid "files"
msgstr "fichiers"
-#: lib/choose_repository.tcl:955
+#: lib/choose_repository.tcl:953
msgid "Initial file checkout failed."
-msgstr "L'emprunt initial de fichier a échoué."
+msgstr "Chargement initial du fichier échoué."
-#: lib/choose_repository.tcl:971
+#: lib/choose_repository.tcl:969
msgid "Open"
msgstr "Ouvrir"
-#: lib/choose_repository.tcl:981
+#: lib/choose_repository.tcl:979
msgid "Repository:"
-msgstr "Référentiel :"
+msgstr "Dépôt :"
-#: lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:1027
#, tcl-format
msgid "Failed to open repository %s:"
-msgstr "Impossible d'ouvrir le référentiel %s :"
+msgstr "Impossible d'ouvrir le dépôt %s :"
#: lib/choose_rev.tcl:53
msgid "This Detached Checkout"
@@ -1143,11 +1171,11 @@ msgstr "Branche locale"
#: lib/choose_rev.tcl:79
msgid "Tracking Branch"
-msgstr "Suivi de branche"
+msgstr "Branche de suivi"
#: lib/choose_rev.tcl:84 lib/choose_rev.tcl:538
msgid "Tag"
-msgstr "Marque"
+msgstr "Marque (tag)"
#: lib/choose_rev.tcl:317
#, tcl-format
@@ -1164,7 +1192,7 @@ msgstr "L'expression de révision est vide."
#: lib/choose_rev.tcl:531
msgid "Updated"
-msgstr "Misa à jour"
+msgstr "Mise-à-jour:"
#: lib/choose_rev.tcl:559
msgid "URL"
@@ -1218,9 +1246,9 @@ msgid ""
"The rescan will be automatically started now.\n"
msgstr ""
"L'état lors de la dernière synchronisation ne correspond plus à l'état du "
-"référentiel.\n"
+"dépôt.\n"
"\n"
-"Un autre programme Git a modifié ce référentiel depuis la dernière "
+"Un autre programme Git a modifié ce dépôt depuis la dernière "
"synchronisation. Une resynshronisation doit être effectuée avant de pouvoir "
"créer un nouveau commit.\n"
"\n"
@@ -1258,7 +1286,7 @@ msgid ""
msgstr ""
"Pas de modification à commiter.\n"
"\n"
-"Vous devez pré-commiter au moins 1 fichier avant de pouvoir commiter.\n"
+"Vous devez indexer au moins 1 fichier avant de pouvoir commiter.\n"
#: lib/commit.tcl:183
msgid ""
@@ -1285,19 +1313,19 @@ msgstr "attention : Tcl ne supporte pas l'encodage '%s'."
#: lib/commit.tcl:221
msgid "Calling pre-commit hook..."
-msgstr "Appel du programme externe d'avant commit..."
+msgstr "Lancement de l'action d'avant-commit..."
#: lib/commit.tcl:236
msgid "Commit declined by pre-commit hook."
-msgstr "Commit refusé par le programme externe d'avant commit."
+msgstr "Commit refusé par l'action d'avant-commit."
#: lib/commit.tcl:259
msgid "Calling commit-msg hook..."
-msgstr "Appel du programme externe de message de commit..."
+msgstr "Lancement de l'action \"message de commit\"..."
#: lib/commit.tcl:274
msgid "Commit declined by commit-msg hook."
-msgstr "Commit refusé par le programme externe de message de commit."
+msgstr "Commit refusé par l'action \"message de commit\"."
#: lib/commit.tcl:287
msgid "Committing changes..."
@@ -1406,7 +1434,7 @@ msgid ""
"\n"
"Compress the database now?"
msgstr ""
-"Ce référentiel comprend actuellement environ %i objets ayant leur fichier "
+"Ce dépôt comprend actuellement environ %i objets ayant leur fichier "
"particulier.\n"
"\n"
"Pour conserver une performance optimale, il est fortement recommandé de "
@@ -1420,7 +1448,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Date invalide de Git : %s"
-#: lib/diff.tcl:42
+#: lib/diff.tcl:44
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1443,39 +1471,47 @@ msgstr ""
"Une resynchronisation va être lancée automatiquement pour trouver d'autres "
"fichiers qui pourraient se trouver dans le même état."
-#: lib/diff.tcl:81
+#: lib/diff.tcl:83
#, tcl-format
msgid "Loading diff of %s..."
msgstr "Chargement des différences de %s..."
-#: lib/diff.tcl:114 lib/diff.tcl:184
+#: lib/diff.tcl:116 lib/diff.tcl:190
#, tcl-format
msgid "Unable to display %s"
msgstr "Impossible d'afficher %s"
-#: lib/diff.tcl:115
+#: lib/diff.tcl:117
msgid "Error loading file:"
msgstr "Erreur lors du chargement du fichier :"
-#: lib/diff.tcl:122
+#: lib/diff.tcl:124
msgid "Git Repository (subproject)"
-msgstr "Référentiel Git (sous projet)"
+msgstr "Dépôt Git (sous projet)"
-#: lib/diff.tcl:134
+#: lib/diff.tcl:136
msgid "* Binary file (not showing content)."
msgstr "* Fichier binaire (pas d'apperçu du contenu)."
-#: lib/diff.tcl:185
+#: lib/diff.tcl:191
msgid "Error loading diff:"
msgstr "Erreur lors du chargement des différences :"
-#: lib/diff.tcl:303
+#: lib/diff.tcl:313
msgid "Failed to unstage selected hunk."
-msgstr "La suppression dans le pré-commit de la section sélectionnée a échouée."
+msgstr "Échec lors de la désindexation de la section sélectionnée."
-#: lib/diff.tcl:310
+#: lib/diff.tcl:320
msgid "Failed to stage selected hunk."
-msgstr "Le pré-commit de la section sélectionnée a échoué."
+msgstr "Échec lors de l'indexation de la section."
+
+#: lib/diff.tcl:386
+msgid "Failed to unstage selected line."
+msgstr "Échec lors de la désindexation de la ligne sélectionnée."
+
+#: lib/diff.tcl:394
+msgid "Failed to stage selected line."
+msgstr "Échec lors de l'indexation de la ligne."
#: lib/error.tcl:20 lib/error.tcl:114
msgid "error"
@@ -1491,17 +1527,19 @@ msgstr "Vous devez corriger les erreurs suivantes avant de pouvoir commiter."
#: lib/index.tcl:6
msgid "Unable to unlock the index."
-msgstr "Impossible de dévérouiller le pré-commit."
+msgstr "Impossible de dévérouiller l'index."
#: lib/index.tcl:15
msgid "Index Error"
-msgstr "Erreur de pré-commit"
+msgstr "Erreur de l'index"
#: lib/index.tcl:21
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
-msgstr "Le pré-commit a échoué. Une resynchronisation va être lancée automatiquement."
+msgstr ""
+"Échec de la mise à jour de l'index. Une resynchronisation va être lancée "
+"automatiquement."
#: lib/index.tcl:27
msgid "Continue"
@@ -1509,12 +1547,12 @@ msgstr "Continuer"
#: lib/index.tcl:31
msgid "Unlock Index"
-msgstr "Dévérouiller le pré-commit"
+msgstr "Déverouiller l'index"
#: lib/index.tcl:282
#, tcl-format
msgid "Unstaging %s from commit"
-msgstr "Supprimer %s du commit"
+msgstr "Désindexation de: %s"
#: lib/index.tcl:313
msgid "Ready to commit."
@@ -1523,23 +1561,23 @@ msgstr "Prêt à être commité."
#: lib/index.tcl:326
#, tcl-format
msgid "Adding %s"
-msgstr "Ajouter %s"
+msgstr "Ajout de %s"
#: lib/index.tcl:381
#, tcl-format
msgid "Revert changes in file %s?"
-msgstr "Inverser les modifications dans le fichier %s ? "
+msgstr "Annuler les modifications dans le fichier %s ? "
#: lib/index.tcl:383
#, tcl-format
msgid "Revert changes in these %i files?"
-msgstr "Inverser les modifications dans ces %i fichiers ?"
+msgstr "Annuler les modifications dans ces %i fichiers ?"
#: lib/index.tcl:391
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr ""
-"Toutes les modifications non pré-commitées seront définitivement perdues "
-"lors de l'inversion."
+"Toutes les modifications non-indexées seront définitivement perdues par "
+"l'annulation."
#: lib/index.tcl:394
msgid "Do Nothing"
@@ -1551,7 +1589,7 @@ msgid ""
"\n"
"You must finish amending this commit before starting any type of merge.\n"
msgstr ""
-"Impossible de fucionner pendant une correction.\n"
+"Impossible de fusionner pendant une correction.\n"
"\n"
"Vous devez finir de corriger ce commit avant de lancer une quelconque "
"fusion.\n"
@@ -1566,9 +1604,9 @@ msgid ""
"The rescan will be automatically started now.\n"
msgstr ""
"L'état lors de la dernière synchronisation ne correspond plus à l'état du "
-"référentiel.\n"
+"dépôt.\n"
"\n"
-"Un autre programme Git a modifié ce référentiel depuis la dernière "
+"Un autre programme Git a modifié ce dépôt depuis la dernière "
"synchronisation. Une resynchronisation doit être effectuée avant de pouvoir "
"fusionner de nouveau.\n"
"\n"
@@ -1588,8 +1626,8 @@ msgstr ""
"\n"
"Le fichier %s a des conflicts de fusion.\n"
"\n"
-"Vous devez les résoudre, puis pré-commiter le fichier, et enfin commiter "
-"pour terminer la fusion courante. Seulementà ce moment là, il sera possible "
+"Vous devez les résoudre, puis indexer le fichier, et enfin commiter pour "
+"terminer la fusion courante. Seulement à ce moment là sera-t-il possible "
"d'effectuer une nouvelle fusion.\n"
#: lib/merge.tcl:54
@@ -1685,11 +1723,11 @@ msgstr "Abandon"
msgid "files reset"
msgstr "fichiers réinitialisés"
-#: lib/merge.tcl:265
+#: lib/merge.tcl:266
msgid "Abort failed."
msgstr "L'abandon a échoué."
-#: lib/merge.tcl:267
+#: lib/merge.tcl:268
msgid "Abort completed. Ready."
msgstr "Abandon teminé. Prêt."
@@ -1704,11 +1742,11 @@ msgstr "Sauvegarder"
#: lib/option.tcl:109
#, tcl-format
msgid "%s Repository"
-msgstr "Référentiel de %s"
+msgstr "Dépôt: %s"
#: lib/option.tcl:110
msgid "Global (All Repositories)"
-msgstr "Globales (tous les référentiels)"
+msgstr "Globales (tous les dépôts)"
#: lib/option.tcl:116
msgid "User Name"
@@ -1736,56 +1774,76 @@ msgstr "Faire confiance aux dates de modification de fichiers "
#: lib/option.tcl:124
msgid "Prune Tracking Branches During Fetch"
-msgstr "Nettoyer les branches de suivi pendant la récupération"
+msgstr "Purger les branches de suivi pendant la récupération"
#: lib/option.tcl:125
msgid "Match Tracking Branches"
msgstr "Faire correspondre les branches de suivi"
#: lib/option.tcl:126
+msgid "Blame Copy Only On Changed Files"
+msgstr "Annoter les copies seulement sur fichiers modifiés"
+
+#: lib/option.tcl:127
+msgid "Minimum Letters To Blame Copy On"
+msgstr "Minimum de caratères pour annoter une copie"
+
+#: lib/option.tcl:128
msgid "Number of Diff Context Lines"
msgstr "Nombre de lignes de contexte dans les diffs"
-#: lib/option.tcl:127
+#: lib/option.tcl:129
msgid "Commit Message Text Width"
msgstr "Largeur du texte de message de commit"
-#: lib/option.tcl:128
+#: lib/option.tcl:130
msgid "New Branch Name Template"
msgstr "Nouveau modèle de nom de branche"
-#: lib/option.tcl:192
+#: lib/option.tcl:194
msgid "Spelling Dictionary:"
msgstr "Dictionnaire d'orthographe :"
-#: lib/option.tcl:216
+#: lib/option.tcl:218
msgid "Change Font"
-msgstr "Modifier les fontes"
+msgstr "Modifier les polices"
-#: lib/option.tcl:220
+#: lib/option.tcl:222
#, tcl-format
msgid "Choose %s"
msgstr "Choisir %s"
-#: lib/option.tcl:226
+#: lib/option.tcl:228
msgid "pt."
msgstr "pt."
-#: lib/option.tcl:240
+#: lib/option.tcl:242
msgid "Preferences"
msgstr "Préférences"
-#: lib/option.tcl:275
+#: lib/option.tcl:277
msgid "Failed to completely save options:"
msgstr "La sauvegarde complète des options a échouée :"
+#: lib/remote.tcl:165
+msgid "Prune from"
+msgstr "Purger de"
+
+#: lib/remote.tcl:170
+msgid "Fetch from"
+msgstr "Récupérer de"
+
+#: lib/remote.tcl:213
+msgid "Push to"
+msgstr "Pousser vers"
+
#: lib/remote_branch_delete.tcl:29 lib/remote_branch_delete.tcl:34
msgid "Delete Remote Branch"
msgstr "Supprimer branche distante"
#: lib/remote_branch_delete.tcl:47
msgid "From Repository"
-msgstr "Référentiel"
+msgstr "Dépôt source"
#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
msgid "Remote:"
@@ -1856,25 +1914,13 @@ msgstr "Supprimer les branches de %s"
#: lib/remote_branch_delete.tcl:286
msgid "No repository selected."
-msgstr "Aucun référentiel n'est sélectionné."
+msgstr "Aucun dépôt n'est sélectionné."
#: lib/remote_branch_delete.tcl:291
#, tcl-format
msgid "Scanning %s..."
msgstr "Synchronisation de %s..."
-#: lib/remote.tcl:165
-msgid "Prune from"
-msgstr "Nettoyer de"
-
-#: lib/remote.tcl:170
-msgid "Fetch from"
-msgstr "Récupérer de"
-
-#: lib/remote.tcl:213
-msgid "Push to"
-msgstr "Pousser vers"
-
#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
msgid "Cannot write shortcut:"
msgstr "Impossible d'écrire le raccourcis :"
@@ -1908,15 +1954,15 @@ msgstr "La vérification d'orthographe a échouée silentieusement au démarrage
msgid "Unrecognized spell checker"
msgstr "Vérificateur d'orthographe non reconnu"
-#: lib/spellcheck.tcl:180
+#: lib/spellcheck.tcl:186
msgid "No Suggestions"
msgstr "Aucune suggestion"
-#: lib/spellcheck.tcl:381
+#: lib/spellcheck.tcl:387
msgid "Unexpected EOF from spell checker"
-msgstr "Fin de fichier innatendue envoyée par le vérificateur d'orthographe"
+msgstr "EOF inattendue envoyée par le vérificateur d'orthographe"
-#: lib/spellcheck.tcl:385
+#: lib/spellcheck.tcl:391
msgid "Spell Checker Failed"
msgstr "Le vérificateur d'orthographe a échoué"
@@ -1938,7 +1984,7 @@ msgstr "Récupération des dernières modifications de %s"
#: lib/transport.tcl:18
#, tcl-format
msgid "remote prune %s"
-msgstr "nettoyer à distance %s"
+msgstr "purger à distance %s"
#: lib/transport.tcl:19
#, tcl-format
@@ -1970,11 +2016,11 @@ msgstr "Branches source"
#: lib/transport.tcl:120
msgid "Destination Repository"
-msgstr "Référentiel de destination"
+msgstr "Dépôt de destination"
#: lib/transport.tcl:158
msgid "Transfer Options"
-msgstr "Transférer options"
+msgstr "Options de transfert"
#: lib/transport.tcl:160
msgid "Force overwrite existing branch (may discard changes)"
@@ -1988,5 +2034,5 @@ msgstr "Utiliser des petits paquets (pour les connexions lentes)"
#: lib/transport.tcl:168
msgid "Include tags"
-msgstr "Inclure les marques"
+msgstr "Inclure les marques (tags)"
diff --git a/git-gui/po/po2msg.sh b/git-gui/po/po2msg.sh
index b7c4bf3fdf..1e9f992528 100644
--- a/git-gui/po/po2msg.sh
+++ b/git-gui/po/po2msg.sh
@@ -11,8 +11,8 @@ proc u2a {s} {
foreach i [split $s ""] {
scan $i %c c
if {$c<128} {
- # escape '[', '\' and ']'
- if {$c == 0x5b || $c == 0x5d} {
+ # escape '[', '\', '$' and ']'
+ if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
append res "\\"
}
append res $i
diff --git a/git-stash.sh b/git-stash.sh
index e15c12abc3..d799c76378 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -39,6 +39,7 @@ clear_stash () {
create_stash () {
stash_msg="$1"
+ git update-index -q --refresh
if no_changes
then
exit 0
@@ -101,6 +102,7 @@ save_stash () {
stash_msg="$*"
+ git update-index -q --refresh
if no_changes
then
echo 'No local changes to save'
@@ -150,6 +152,7 @@ show_stash () {
}
apply_stash () {
+ git update-index -q --refresh &&
git diff-files --quiet --ignore-submodules ||
die 'Cannot restore on top of a dirty state'
diff --git a/git-svn.perl b/git-svn.perl
index 7a1d26db8b..7c7fc39483 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3284,7 +3284,7 @@ sub close_file {
my $out = syswrite($tmp_fh, $str, $res);
defined($out) && $out == $res
or croak("write ",
- $tmp_fh->filename,
+ Git::temp_path($tmp_fh),
": $!\n");
}
defined $res or croak $!;
@@ -3295,7 +3295,7 @@ sub close_file {
}
$hash = $::_repository->hash_and_insert_object(
- $fh->filename);
+ Git::temp_path($fh));
$hash =~ /^[a-f\d]{40}$/ or die "not a sha1: $hash\n";
Git::temp_release($fb->{base}, 1);
@@ -3969,21 +3969,21 @@ sub gs_do_switch {
my $old_url = $full_url;
$full_url .= '/' . escape_uri_only($path) if length $path;
my ($ra, $reparented);
- if ($old_url ne $full_url) {
- if ($old_url !~ m#^svn(\+ssh)?://#) {
- SVN::_Ra::svn_ra_reparent($self->{session}, $full_url,
- $pool);
- $self->{url} = $full_url;
- $reparented = 1;
- } else {
- $_[0] = undef;
- $self = undef;
- $RA = undef;
- $ra = Git::SVN::Ra->new($full_url);
- $ra_invalid = 1;
- }
+
+ if ($old_url =~ m#^svn(\+ssh)?://#) {
+ $_[0] = undef;
+ $self = undef;
+ $RA = undef;
+ $ra = Git::SVN::Ra->new($full_url);
+ $ra_invalid = 1;
+ } elsif ($old_url ne $full_url) {
+ SVN::_Ra::svn_ra_reparent($self->{session}, $full_url, $pool);
+ $self->{url} = $full_url;
+ $reparented = 1;
}
+
$ra ||= $self;
+ $url_b = escape_url($url_b);
my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();
$reporter->set_path('', $rev_a, 0, @lock, $pool);
@@ -4383,7 +4383,7 @@ sub config_pager {
sub run_pager {
return unless -t *STDOUT && defined $pager;
- pipe my $rfd, my $wfd or return;
+ pipe my ($rfd, $wfd) or return;
defined(my $pid = fork) or ::fatal "Can't fork: $!";
if (!$pid) {
open STDOUT, '>&', $wfd or
diff --git a/git.c b/git.c
index 37b1d76a08..fdb0f71019 100644
--- a/git.c
+++ b/git.c
@@ -286,7 +286,7 @@ static void handle_internal_command(int argc, const char **argv)
{ "count-objects", cmd_count_objects, RUN_SETUP },
{ "describe", cmd_describe, RUN_SETUP },
{ "diff", cmd_diff },
- { "diff-files", cmd_diff_files, RUN_SETUP },
+ { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
{ "diff-index", cmd_diff_index, RUN_SETUP },
{ "diff-tree", cmd_diff_tree, RUN_SETUP },
{ "fast-export", cmd_fast_export, RUN_SETUP },
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99bf91..269f1125d9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2092,7 +2092,7 @@ sub parse_commit_text {
last;
}
}
- if ($co{'title'} eq "") {
+ if (! defined $co{'title'} || $co{'title'} eq "") {
$co{'title'} = $co{'title_short'} = '(no commit message)';
}
# remove added spaces
diff --git a/grep.c b/grep.c
index f67d6716ea..706351197f 100644
--- a/grep.c
+++ b/grep.c
@@ -2,6 +2,19 @@
#include "grep.h"
#include "xdiff-interface.h"
+void append_header_grep_pattern(struct grep_opt *opt, enum grep_header_field field, const char *pat)
+{
+ struct grep_pat *p = xcalloc(1, sizeof(*p));
+ p->pattern = pat;
+ p->origin = "header";
+ p->no = 0;
+ p->token = GREP_PATTERN_HEAD;
+ p->field = field;
+ *opt->pattern_tail = p;
+ opt->pattern_tail = &p->next;
+ p->next = NULL;
+}
+
void append_grep_pattern(struct grep_opt *opt, const char *pat,
const char *origin, int no, enum grep_pat_token t)
{
@@ -247,16 +260,53 @@ static int fixmatch(const char *pattern, char *line, regmatch_t *match)
}
}
+static int strip_timestamp(char *bol, char **eol_p)
+{
+ char *eol = *eol_p;
+ int ch;
+
+ while (bol < --eol) {
+ if (*eol != '>')
+ continue;
+ *eol_p = ++eol;
+ ch = *eol;
+ *eol = '\0';
+ return ch;
+ }
+ return 0;
+}
+
+static struct {
+ const char *field;
+ size_t len;
+} header_field[] = {
+ { "author ", 7 },
+ { "committer ", 10 },
+};
+
static int match_one_pattern(struct grep_opt *opt, struct grep_pat *p, char *bol, char *eol, enum grep_context ctx)
{
int hit = 0;
int at_true_bol = 1;
+ int saved_ch = 0;
regmatch_t pmatch[10];
if ((p->token != GREP_PATTERN) &&
((p->token == GREP_PATTERN_HEAD) != (ctx == GREP_CONTEXT_HEAD)))
return 0;
+ if (p->token == GREP_PATTERN_HEAD) {
+ const char *field;
+ size_t len;
+ assert(p->field < ARRAY_SIZE(header_field));
+ field = header_field[p->field].field;
+ len = header_field[p->field].len;
+ if (strncmp(bol, field, len))
+ return 0;
+ bol += len;
+ saved_ch = strip_timestamp(bol, &eol);
+ }
+
again:
if (!opt->fixed) {
regex_t *exp = &p->regexp;
@@ -298,6 +348,8 @@ static int match_one_pattern(struct grep_opt *opt, struct grep_pat *p, char *bol
goto again;
}
}
+ if (p->token == GREP_PATTERN_HEAD && saved_ch)
+ *eol = saved_ch;
return hit;
}
diff --git a/grep.h b/grep.h
index d252dd25f8..59b3f871ea 100644
--- a/grep.h
+++ b/grep.h
@@ -17,12 +17,18 @@ enum grep_context {
GREP_CONTEXT_BODY,
};
+enum grep_header_field {
+ GREP_HEADER_AUTHOR = 0,
+ GREP_HEADER_COMMITTER,
+};
+
struct grep_pat {
struct grep_pat *next;
const char *origin;
int no;
enum grep_pat_token token;
const char *pattern;
+ enum grep_header_field field;
regex_t regexp;
};
@@ -74,6 +80,7 @@ struct grep_opt {
};
extern void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);
+extern void append_header_grep_pattern(struct grep_opt *, enum grep_header_field, const char *);
extern void compile_grep_patterns(struct grep_opt *opt);
extern void free_grep_patterns(struct grep_opt *opt);
extern int grep_buffer(struct grep_opt *opt, const char *name, char *buf, unsigned long size);
diff --git a/help.c b/help.c
index 3cb1962896..dc0786d800 100644
--- a/help.c
+++ b/help.c
@@ -555,7 +555,8 @@ static int is_git_command(const char *s)
{
load_command_list();
return is_in_cmdlist(&main_cmds, s) ||
- is_in_cmdlist(&other_cmds, s);
+ is_in_cmdlist(&other_cmds, s) ||
+ !strcmp(s, "help");
}
static const char *prepend(const char *prefix, const char *cmd)
diff --git a/http.c b/http.c
index 1108ab4a31..a97fdf5117 100644
--- a/http.c
+++ b/http.c
@@ -165,7 +165,16 @@ static CURL* get_curl_handle(void)
{
CURL* result = curl_easy_init();
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, curl_ssl_verify);
+ if (!curl_ssl_verify) {
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0);
+ } else {
+ /* Verify authenticity of the peer's certificate */
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1);
+ /* The name in the cert must match whom we tried to connect */
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
+ }
+
#if LIBCURL_VERSION_NUM >= 0x070907
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
#endif
diff --git a/index-pack.c b/index-pack.c
index 52064befdb..a6e91fe3ba 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -654,7 +654,7 @@ static void parse_pack_objects(unsigned char *sha1)
}
}
-static int write_compressed(int fd, void *in, unsigned int size, uint32_t *obj_crc)
+static int write_compressed(struct sha1file *f, void *in, unsigned int size)
{
z_stream stream;
unsigned long maxsize;
@@ -674,13 +674,12 @@ static int write_compressed(int fd, void *in, unsigned int size, uint32_t *obj_c
deflateEnd(&stream);
size = stream.total_out;
- write_or_die(fd, out, size);
- *obj_crc = crc32(*obj_crc, out, size);
+ sha1write(f, out, size);
free(out);
return size;
}
-static struct object_entry *append_obj_to_pack(
+static struct object_entry *append_obj_to_pack(struct sha1file *f,
const unsigned char *sha1, void *buf,
unsigned long size, enum object_type type)
{
@@ -696,15 +695,15 @@ static struct object_entry *append_obj_to_pack(
s >>= 7;
}
header[n++] = c;
- write_or_die(output_fd, header, n);
- obj[0].idx.crc32 = crc32(0, Z_NULL, 0);
- obj[0].idx.crc32 = crc32(obj[0].idx.crc32, header, n);
+ crc32_begin(f);
+ sha1write(f, header, n);
obj[0].size = size;
obj[0].hdr_size = n;
obj[0].type = type;
obj[0].real_type = type;
obj[1].idx.offset = obj[0].idx.offset + n;
- obj[1].idx.offset += write_compressed(output_fd, buf, size, &obj[0].idx.crc32);
+ obj[1].idx.offset += write_compressed(f, buf, size);
+ obj[0].idx.crc32 = crc32_end(f);
hashcpy(obj->idx.sha1, sha1);
return obj;
}
@@ -716,7 +715,7 @@ static int delta_pos_compare(const void *_a, const void *_b)
return a->obj_no - b->obj_no;
}
-static void fix_unresolved_deltas(int nr_unresolved)
+static void fix_unresolved_deltas(struct sha1file *f, int nr_unresolved)
{
struct delta_entry **sorted_by_pos;
int i, n = 0;
@@ -754,8 +753,8 @@ static void fix_unresolved_deltas(int nr_unresolved)
if (check_sha1_signature(d->base.sha1, base_obj.data,
base_obj.size, typename(type)))
die("local object %s is corrupt", sha1_to_hex(d->base.sha1));
- base_obj.obj = append_obj_to_pack(d->base.sha1, base_obj.data,
- base_obj.size, type);
+ base_obj.obj = append_obj_to_pack(f, d->base.sha1,
+ base_obj.data, base_obj.size, type);
link_base_data(NULL, &base_obj);
find_delta_children(&d->base, &first, &last);
@@ -875,8 +874,10 @@ int main(int argc, char **argv)
const char *keep_name = NULL, *keep_msg = NULL;
char *index_name_buf = NULL, *keep_name_buf = NULL;
struct pack_idx_entry **idx_objects;
- unsigned char sha1[20];
+ unsigned char pack_sha1[20];
+ int nongit = 0;
+ setup_git_directory_gently(&nongit);
git_config(git_index_pack_config, NULL);
for (i = 1; i < argc; i++) {
@@ -960,13 +961,15 @@ int main(int argc, char **argv)
parse_pack_header();
objects = xmalloc((nr_objects + 1) * sizeof(struct object_entry));
deltas = xmalloc(nr_objects * sizeof(struct delta_entry));
- parse_pack_objects(sha1);
+ parse_pack_objects(pack_sha1);
if (nr_deltas == nr_resolved_deltas) {
stop_progress(&progress);
/* Flush remaining pack final 20-byte SHA1. */
flush();
} else {
if (fix_thin_pack) {
+ struct sha1file *f;
+ unsigned char read_sha1[20], tail_sha1[20];
char msg[48];
int nr_unresolved = nr_deltas - nr_resolved_deltas;
int nr_objects_initial = nr_objects;
@@ -975,12 +978,19 @@ int main(int argc, char **argv)
objects = xrealloc(objects,
(nr_objects + nr_unresolved + 1)
* sizeof(*objects));
- fix_unresolved_deltas(nr_unresolved);
+ f = sha1fd(output_fd, curr_pack);
+ fix_unresolved_deltas(f, nr_unresolved);
sprintf(msg, "completed with %d local objects",
nr_objects - nr_objects_initial);
stop_progress_msg(&progress, msg);
- fixup_pack_header_footer(output_fd, sha1,
- curr_pack, nr_objects);
+ sha1close(f, tail_sha1, 0);
+ hashcpy(read_sha1, pack_sha1);
+ fixup_pack_header_footer(output_fd, pack_sha1,
+ curr_pack, nr_objects,
+ read_sha1, consumed_bytes-20);
+ if (hashcmp(read_sha1, tail_sha1) != 0)
+ die("Unexpected tail checksum for %s "
+ "(disk corruption?)", curr_pack);
}
if (nr_deltas != nr_resolved_deltas)
die("pack has %d unresolved deltas",
@@ -993,13 +1003,13 @@ int main(int argc, char **argv)
idx_objects = xmalloc((nr_objects) * sizeof(struct pack_idx_entry *));
for (i = 0; i < nr_objects; i++)
idx_objects[i] = &objects[i].idx;
- curr_index = write_idx_file(index_name, idx_objects, nr_objects, sha1);
+ curr_index = write_idx_file(index_name, idx_objects, nr_objects, pack_sha1);
free(idx_objects);
final(pack_name, curr_pack,
index_name, curr_index,
keep_name, keep_msg,
- sha1);
+ pack_sha1);
free(objects);
free(index_name_buf);
free(keep_name_buf);
diff --git a/merge-index.c b/merge-index.c
index 7491c56ad2..7827e87a92 100644
--- a/merge-index.c
+++ b/merge-index.c
@@ -27,7 +27,7 @@ static int merge_entry(int pos, const char *path)
int found;
if (pos >= active_nr)
- die("git-merge-index: %s not in the cache", path);
+ die("git merge-index: %s not in the cache", path);
arguments[0] = pgm;
arguments[1] = "";
arguments[2] = "";
@@ -53,7 +53,7 @@ static int merge_entry(int pos, const char *path)
arguments[stage + 4] = ownbuf[stage];
} while (++pos < active_nr);
if (!found)
- die("git-merge-index: %s not in the cache", path);
+ die("git merge-index: %s not in the cache", path);
run_program();
return found;
}
@@ -117,7 +117,7 @@ int main(int argc, char **argv)
merge_all();
continue;
}
- die("git-merge-index: unknown option %s", arg);
+ die("git merge-index: unknown option %s", arg);
}
merge_file(arg);
}
diff --git a/pack-revindex.c b/pack-revindex.c
index cd300bdff5..6096b6224a 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -142,3 +142,15 @@ struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs)
} while (lo < hi);
die("internal error: pack revindex corrupt");
}
+
+void discard_revindex(void)
+{
+ if (pack_revindex_hashsz) {
+ int i;
+ for (i = 0; i < pack_revindex_hashsz; i++)
+ if (pack_revindex[i].revindex)
+ free(pack_revindex[i].revindex);
+ free(pack_revindex);
+ pack_revindex_hashsz = 0;
+ }
+}
diff --git a/pack-revindex.h b/pack-revindex.h
index 36a514a6cf..8d5027ad91 100644
--- a/pack-revindex.h
+++ b/pack-revindex.h
@@ -7,5 +7,6 @@ struct revindex_entry {
};
struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs);
+void discard_revindex(void);
#endif
diff --git a/pack-write.c b/pack-write.c
index a8f0269936..939ed56362 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -144,41 +144,94 @@ char *write_idx_file(char *index_name, struct pack_idx_entry **objects,
return index_name;
}
+/*
+ * Update pack header with object_count and compute new SHA1 for pack data
+ * associated to pack_fd, and write that SHA1 at the end. That new SHA1
+ * is also returned in new_pack_sha1.
+ *
+ * If partial_pack_sha1 is non null, then the SHA1 of the existing pack
+ * (without the header update) is computed and validated against the
+ * one provided in partial_pack_sha1. The validation is performed at
+ * partial_pack_offset bytes in the pack file. The SHA1 of the remaining
+ * data (i.e. from partial_pack_offset to the end) is then computed and
+ * returned in partial_pack_sha1.
+ *
+ * Note that new_pack_sha1 is updated last, so both new_pack_sha1 and
+ * partial_pack_sha1 can refer to the same buffer if the caller is not
+ * interested in the resulting SHA1 of pack data above partial_pack_offset.
+ */
void fixup_pack_header_footer(int pack_fd,
- unsigned char *pack_file_sha1,
+ unsigned char *new_pack_sha1,
const char *pack_name,
- uint32_t object_count)
+ uint32_t object_count,
+ unsigned char *partial_pack_sha1,
+ off_t partial_pack_offset)
{
- static const int buf_sz = 128 * 1024;
- SHA_CTX c;
+ int aligned_sz, buf_sz = 8 * 1024;
+ SHA_CTX old_sha1_ctx, new_sha1_ctx;
struct pack_header hdr;
char *buf;
+ SHA1_Init(&old_sha1_ctx);
+ SHA1_Init(&new_sha1_ctx);
+
if (lseek(pack_fd, 0, SEEK_SET) != 0)
- die("Failed seeking to start: %s", strerror(errno));
+ die("Failed seeking to start of %s: %s", pack_name, strerror(errno));
if (read_in_full(pack_fd, &hdr, sizeof(hdr)) != sizeof(hdr))
die("Unable to reread header of %s: %s", pack_name, strerror(errno));
if (lseek(pack_fd, 0, SEEK_SET) != 0)
- die("Failed seeking to start: %s", strerror(errno));
+ die("Failed seeking to start of %s: %s", pack_name, strerror(errno));
+ SHA1_Update(&old_sha1_ctx, &hdr, sizeof(hdr));
hdr.hdr_entries = htonl(object_count);
+ SHA1_Update(&new_sha1_ctx, &hdr, sizeof(hdr));
write_or_die(pack_fd, &hdr, sizeof(hdr));
-
- SHA1_Init(&c);
- SHA1_Update(&c, &hdr, sizeof(hdr));
+ partial_pack_offset -= sizeof(hdr);
buf = xmalloc(buf_sz);
+ aligned_sz = buf_sz - sizeof(hdr);
for (;;) {
- ssize_t n = xread(pack_fd, buf, buf_sz);
+ ssize_t m, n;
+ m = (partial_pack_sha1 && partial_pack_offset < aligned_sz) ?
+ partial_pack_offset : aligned_sz;
+ n = xread(pack_fd, buf, m);
if (!n)
break;
if (n < 0)
die("Failed to checksum %s: %s", pack_name, strerror(errno));
- SHA1_Update(&c, buf, n);
+ SHA1_Update(&new_sha1_ctx, buf, n);
+
+ aligned_sz -= n;
+ if (!aligned_sz)
+ aligned_sz = buf_sz;
+
+ if (!partial_pack_sha1)
+ continue;
+
+ SHA1_Update(&old_sha1_ctx, buf, n);
+ partial_pack_offset -= n;
+ if (partial_pack_offset == 0) {
+ unsigned char sha1[20];
+ SHA1_Final(sha1, &old_sha1_ctx);
+ if (hashcmp(sha1, partial_pack_sha1) != 0)
+ die("Unexpected checksum for %s "
+ "(disk corruption?)", pack_name);
+ /*
+ * Now let's compute the SHA1 of the remainder of the
+ * pack, which also means making partial_pack_offset
+ * big enough not to matter anymore.
+ */
+ SHA1_Init(&old_sha1_ctx);
+ partial_pack_offset = ~partial_pack_offset;
+ partial_pack_offset -= MSB(partial_pack_offset, 1);
+ }
}
free(buf);
- SHA1_Final(pack_file_sha1, &c);
- write_or_die(pack_fd, pack_file_sha1, 20);
+ if (partial_pack_sha1)
+ SHA1_Final(partial_pack_sha1, &old_sha1_ctx);
+ SHA1_Final(new_pack_sha1, &new_sha1_ctx);
+ write_or_die(pack_fd, new_pack_sha1, 20);
+ fsync_or_die(pack_fd, pack_name);
}
char *index_pack_lockfile(int ip_out)
diff --git a/pack.h b/pack.h
index 76e6aa2aad..a883334b26 100644
--- a/pack.h
+++ b/pack.h
@@ -58,7 +58,7 @@ struct pack_idx_entry {
extern char *write_idx_file(char *index_name, struct pack_idx_entry **objects, int nr_objects, unsigned char *sha1);
extern int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, off_t offset, off_t len, unsigned int nr);
extern int verify_pack(struct packed_git *);
-extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t);
+extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t, unsigned char *, off_t);
extern char *index_pack_lockfile(int fd);
#define PH_ERROR_EOF (-1)
diff --git a/perl/Git.pm b/perl/Git.pm
index 102e6a4ce3..6aab712e6a 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -58,7 +58,7 @@ require Exporter;
command_bidi_pipe command_close_bidi_pipe
version exec_path hash_object git_cmd_try
remote_refs
- temp_acquire temp_release temp_reset);
+ temp_acquire temp_release temp_reset temp_path);
=head1 DESCRIPTION
@@ -937,7 +937,7 @@ sub _close_cat_blob {
{ # %TEMP_* Lexical Context
-my (%TEMP_LOCKS, %TEMP_FILES);
+my (%TEMP_FILEMAP, %TEMP_FILES);
=item temp_acquire ( NAME )
@@ -965,7 +965,7 @@ sub temp_acquire {
my $temp_fd = _temp_cache($name);
- $TEMP_LOCKS{$temp_fd} = 1;
+ $TEMP_FILES{$temp_fd}{locked} = 1;
$temp_fd;
}
@@ -991,16 +991,16 @@ the same string.
sub temp_release {
my ($self, $temp_fd, $trunc) = _maybe_self(@_);
- if (ref($temp_fd) ne 'File::Temp') {
+ if (exists $TEMP_FILEMAP{$temp_fd}) {
$temp_fd = $TEMP_FILES{$temp_fd};
}
- unless ($TEMP_LOCKS{$temp_fd}) {
+ unless ($TEMP_FILES{$temp_fd}{locked}) {
carp "Attempt to release temp file '",
$temp_fd, "' that has not been locked";
}
temp_reset($temp_fd) if $trunc and $temp_fd->opened;
- $TEMP_LOCKS{$temp_fd} = 0;
+ $TEMP_FILES{$temp_fd}{locked} = 0;
undef;
}
@@ -1009,9 +1009,9 @@ sub _temp_cache {
_verify_require();
- my $temp_fd = \$TEMP_FILES{$name};
+ my $temp_fd = \$TEMP_FILEMAP{$name};
if (defined $$temp_fd and $$temp_fd->opened) {
- if ($TEMP_LOCKS{$$temp_fd}) {
+ if ($TEMP_FILES{$$temp_fd}{locked}) {
throw Error::Simple("Temp file with moniker '",
$name, "' already in use");
}
@@ -1021,12 +1021,13 @@ sub _temp_cache {
carp "Temp file '", $name,
"' was closed. Opening replacement.";
}
- $$temp_fd = File::Temp->new(
- TEMPLATE => 'Git_XXXXXX',
- DIR => File::Spec->tmpdir
+ my $fname;
+ ($$temp_fd, $fname) = File::Temp->tempfile(
+ 'Git_XXXXXX', UNLINK => 1
) or throw Error::Simple("couldn't open new temp file");
$$temp_fd->autoflush;
binmode $$temp_fd;
+ $TEMP_FILES{$$temp_fd}{fname} = $fname;
}
$$temp_fd;
}
@@ -1053,8 +1054,25 @@ sub temp_reset {
or throw Error::Simple("expected file position to be reset");
}
+=item temp_path ( NAME )
+
+=item temp_path ( FILEHANDLE )
+
+Returns the filename associated with the given tempfile.
+
+=cut
+
+sub temp_path {
+ my ($self, $temp_fd) = _maybe_self(@_);
+
+ if (exists $TEMP_FILEMAP{$temp_fd}) {
+ $temp_fd = $TEMP_FILEMAP{$temp_fd};
+ }
+ $TEMP_FILES{$temp_fd}{fname};
+}
+
sub END {
- unlink values %TEMP_FILES if %TEMP_FILES;
+ unlink values %TEMP_FILEMAP if %TEMP_FILEMAP;
}
} # %TEMP_* Lexical Context
diff --git a/pretty.c b/pretty.c
index 33ef34a411..a29c290009 100644
--- a/pretty.c
+++ b/pretty.c
@@ -310,7 +310,7 @@ static int mailmap_name(struct strbuf *sb, const char *email)
}
static size_t format_person_part(struct strbuf *sb, char part,
- const char *msg, int len)
+ const char *msg, int len, enum date_mode dmode)
{
/* currently all placeholders have same length */
const int placeholder_len = 2;
@@ -377,7 +377,7 @@ static size_t format_person_part(struct strbuf *sb, char part,
switch (part) {
case 'd': /* date */
- strbuf_addstr(sb, show_date(date, tz, DATE_NORMAL));
+ strbuf_addstr(sb, show_date(date, tz, dmode));
return placeholder_len;
case 'D': /* date, RFC2822 style */
strbuf_addstr(sb, show_date(date, tz, DATE_RFC2822));
@@ -409,6 +409,7 @@ struct chunk {
struct format_commit_context {
const struct commit *commit;
+ enum date_mode dmode;
/* These offsets are relative to the start of the commit message. */
int commit_header_parsed;
@@ -584,10 +585,12 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
return 1;
case 'a': /* author ... */
return format_person_part(sb, placeholder[1],
- msg + c->author.off, c->author.len);
+ msg + c->author.off, c->author.len,
+ c->dmode);
case 'c': /* committer ... */
return format_person_part(sb, placeholder[1],
- msg + c->committer.off, c->committer.len);
+ msg + c->committer.off, c->committer.len,
+ c->dmode);
case 'e': /* encoding */
strbuf_add(sb, msg + c->encoding.off, c->encoding.len);
return 1;
@@ -599,12 +602,14 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
}
void format_commit_message(const struct commit *commit,
- const void *format, struct strbuf *sb)
+ const void *format, struct strbuf *sb,
+ enum date_mode dmode)
{
struct format_commit_context context;
memset(&context, 0, sizeof(context));
context.commit = commit;
+ context.dmode = dmode;
strbuf_expand(sb, format, format_commit_item, &context);
}
@@ -770,7 +775,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
const char *encoding;
if (fmt == CMIT_FMT_USERFORMAT) {
- format_commit_message(commit, user_format, sb);
+ format_commit_message(commit, user_format, sb, dmode);
return;
}
diff --git a/read-cache.c b/read-cache.c
index 6c57095f73..8f96fd1722 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1155,7 +1155,7 @@ int read_index_from(struct index_state *istate, const char *path)
size_t mmap_size;
errno = EBUSY;
- if (istate->alloc)
+ if (istate->initialized)
return istate->cache_nr;
errno = ENOENT;
@@ -1195,6 +1195,7 @@ int read_index_from(struct index_state *istate, const char *path)
* index size
*/
istate->alloc = xmalloc(estimate_cache_size(mmap_size, istate->cache_nr));
+ istate->initialized = 1;
src_offset = sizeof(*hdr);
dst_offset = 0;
@@ -1248,6 +1249,7 @@ int discard_index(struct index_state *istate)
cache_tree_free(&(istate->cache_tree));
free(istate->alloc);
istate->alloc = NULL;
+ istate->initialized = 0;
/* no need to throw away allocated active_cache */
return 0;
diff --git a/revision.c b/revision.c
index e75079a6e1..270294af83 100644
--- a/revision.c
+++ b/revision.c
@@ -782,6 +782,10 @@ void init_revisions(struct rev_info *revs, const char *prefix)
revs->commit_format = CMIT_FMT_DEFAULT;
+ revs->grep_filter.status_only = 1;
+ revs->grep_filter.pattern_tail = &(revs->grep_filter.pattern_list);
+ revs->grep_filter.regflags = REG_NEWLINE;
+
diff_setup(&revs->diffopt);
if (prefix && !revs->diffopt.prefix) {
revs->diffopt.prefix = prefix;
@@ -946,33 +950,12 @@ void read_revisions_from_stdin(struct rev_info *revs)
static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what)
{
- if (!revs->grep_filter) {
- struct grep_opt *opt = xcalloc(1, sizeof(*opt));
- opt->status_only = 1;
- opt->pattern_tail = &(opt->pattern_list);
- opt->regflags = REG_NEWLINE;
- revs->grep_filter = opt;
- }
- append_grep_pattern(revs->grep_filter, ptn,
- "command line", 0, what);
+ append_grep_pattern(&revs->grep_filter, ptn, "command line", 0, what);
}
-static void add_header_grep(struct rev_info *revs, const char *field, const char *pattern)
+static void add_header_grep(struct rev_info *revs, enum grep_header_field field, const char *pattern)
{
- char *pat;
- const char *prefix;
- int patlen, fldlen;
-
- fldlen = strlen(field);
- patlen = strlen(pattern);
- pat = xmalloc(patlen + fldlen + 10);
- prefix = ".*";
- if (*pattern == '^') {
- prefix = "";
- pattern++;
- }
- sprintf(pat, "^%s %s%s", field, prefix, pattern);
- add_grep(revs, pat, GREP_PATTERN_HEAD);
+ append_header_grep_pattern(&revs->grep_filter, field, pattern);
}
static void add_message_grep(struct rev_info *revs, const char *pattern)
@@ -1158,23 +1141,19 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
* Grepping the commit log
*/
else if (!prefixcmp(arg, "--author=")) {
- add_header_grep(revs, "author", arg+9);
+ add_header_grep(revs, GREP_HEADER_AUTHOR, arg+9);
} else if (!prefixcmp(arg, "--committer=")) {
- add_header_grep(revs, "committer", arg+12);
+ add_header_grep(revs, GREP_HEADER_COMMITTER, arg+12);
} else if (!prefixcmp(arg, "--grep=")) {
add_message_grep(revs, arg+7);
} else if (!strcmp(arg, "--extended-regexp") || !strcmp(arg, "-E")) {
- if (revs->grep_filter)
- revs->grep_filter->regflags |= REG_EXTENDED;
+ revs->grep_filter.regflags |= REG_EXTENDED;
} else if (!strcmp(arg, "--regexp-ignore-case") || !strcmp(arg, "-i")) {
- if (revs->grep_filter)
- revs->grep_filter->regflags |= REG_ICASE;
+ revs->grep_filter.regflags |= REG_ICASE;
} else if (!strcmp(arg, "--fixed-strings") || !strcmp(arg, "-F")) {
- if (revs->grep_filter)
- revs->grep_filter->fixed = 1;
+ revs->grep_filter.fixed = 1;
} else if (!strcmp(arg, "--all-match")) {
- if (revs->grep_filter)
- revs->grep_filter->all_match = 1;
+ revs->grep_filter.all_match = 1;
} else if (!prefixcmp(arg, "--encoding=")) {
arg += 11;
if (strcmp(arg, "none"))
@@ -1349,9 +1328,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
- if (revs->grep_filter) {
- compile_grep_patterns(revs->grep_filter);
- }
+ compile_grep_patterns(&revs->grep_filter);
if (revs->reverse && revs->reflog_info)
die("cannot combine --reverse with --walk-reflogs");
@@ -1492,9 +1469,9 @@ static int rewrite_parents(struct rev_info *revs, struct commit *commit)
static int commit_match(struct commit *commit, struct rev_info *opt)
{
- if (!opt->grep_filter)
+ if (!opt->grep_filter.pattern_list)
return 1;
- return grep_buffer(opt->grep_filter,
+ return grep_buffer(&opt->grep_filter,
NULL, /* we say nothing, not even filename */
commit->buffer, strlen(commit->buffer));
}
diff --git a/revision.h b/revision.h
index 1b045669ae..91f194478b 100644
--- a/revision.h
+++ b/revision.h
@@ -2,6 +2,7 @@
#define REVISION_H
#include "parse-options.h"
+#include "grep.h"
#define SEEN (1u<<0)
#define UNINTERESTING (1u<<1)
@@ -92,7 +93,7 @@ struct rev_info {
int show_log_size;
/* Filter by commit log message */
- struct grep_opt *grep_filter;
+ struct grep_opt grep_filter;
/* Display history graph */
struct git_graph *graph;
diff --git a/setup.c b/setup.c
index 6cf909463d..2e3248a0c4 100644
--- a/setup.c
+++ b/setup.c
@@ -581,6 +581,8 @@ const char *setup_git_directory(void)
if (retval && chdir(retval))
die ("Could not jump back into original cwd");
rel = get_relative_cwd(buffer, PATH_MAX, get_git_work_tree());
+ if (rel && *rel && chdir(get_git_work_tree()))
+ die ("Could not jump to working directory");
return rel && *rel ? strcat(rel, "/") : NULL;
}
diff --git a/sha1_file.c b/sha1_file.c
index 32e4664b1b..e2cb342a32 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -990,6 +990,7 @@ void prepare_packed_git(void)
void reprepare_packed_git(void)
{
+ discard_revindex();
prepare_packed_git_run_once = 0;
prepare_packed_git();
}
@@ -2135,7 +2136,9 @@ static void write_sha1_file_prepare(const void *buf, unsigned long len,
*/
int move_temp_to_file(const char *tmpfile, const char *filename)
{
- int ret = link(tmpfile, filename);
+ int ret = 0;
+ if (link(tmpfile, filename))
+ ret = errno;
/*
* Coda hack - coda doesn't like cross-directory links,
diff --git a/shell.c b/shell.c
index 6a48de05ff..e3393690dd 100644
--- a/shell.c
+++ b/shell.c
@@ -3,14 +3,6 @@
#include "exec_cmd.h"
#include "strbuf.h"
-/* Stubs for functions that make no sense for git-shell. These stubs
- * are provided here to avoid linking in external redundant modules.
- */
-void release_pack_memory(size_t need, int fd){}
-void trace_argv_printf(const char **argv, const char *fmt, ...){}
-void trace_printf(const char *fmt, ...){}
-
-
static int do_generic_cmd(const char *me, char *arg)
{
const char *my_argv[4];
@@ -56,6 +48,19 @@ int main(int argc, char **argv)
{
char *prog;
struct commands *cmd;
+ int devnull_fd;
+
+ /*
+ * Always open file descriptors 0/1/2 to avoid clobbering files
+ * in die(). It also avoids not messing up when the pipes are
+ * dup'ed onto stdin/stdout/stderr in the child processes we spawn.
+ */
+ devnull_fd = open("/dev/null", O_RDWR);
+ while (devnull_fd >= 0 && devnull_fd <= 2)
+ devnull_fd = dup(devnull_fd);
+ if (devnull_fd == -1)
+ die("opening /dev/null failed (%s)", strerror(errno));
+ close (devnull_fd);
/*
* Special hack to pretend to be a CVS server
diff --git a/sideband.c b/sideband.c
index b6777812cb..cca3360546 100644
--- a/sideband.c
+++ b/sideband.c
@@ -25,6 +25,7 @@ int recv_sideband(const char *me, int in_stream, int out, int err)
unsigned sf;
char buf[LARGE_PACKET_MAX + 2*FIX_SIZE];
char *suffix, *term;
+ int skip_pf = 0;
memcpy(buf, PREFIX, pf);
term = getenv("TERM");
@@ -54,39 +55,58 @@ int recv_sideband(const char *me, int in_stream, int out, int err)
return SIDEBAND_REMOTE_ERROR;
case 2:
buf[pf] = ' ';
- len += pf+1;
- while (1) {
- int brk = pf+1;
+ do {
+ char *b = buf;
+ int brk = 0;
- /* Break the buffer into separate lines. */
- while (brk < len) {
+ /*
+ * If the last buffer didn't end with a line
+ * break then we should not print a prefix
+ * this time around.
+ */
+ if (skip_pf) {
+ b += pf+1;
+ } else {
+ len += pf+1;
+ brk += pf+1;
+ }
+
+ /* Look for a line break. */
+ for (;;) {
brk++;
- if (buf[brk-1] == '\n' ||
- buf[brk-1] == '\r')
+ if (brk > len) {
+ brk = 0;
+ break;
+ }
+ if (b[brk-1] == '\n' ||
+ b[brk-1] == '\r')
break;
}
/*
* Let's insert a suffix to clear the end
- * of the screen line, but only if current
- * line data actually contains something.
+ * of the screen line if a line break was
+ * found. Also, if we don't skip the
+ * prefix, then a non-empty string must be
+ * present too.
*/
- if (brk > pf+1 + 1) {
+ if (brk > (skip_pf ? 0 : (pf+1 + 1))) {
char save[FIX_SIZE];
- memcpy(save, buf + brk, sf);
- buf[brk + sf - 1] = buf[brk - 1];
- memcpy(buf + brk - 1, suffix, sf);
- safe_write(err, buf, brk + sf);
- memcpy(buf + brk, save, sf);
- } else
- safe_write(err, buf, brk);
+ memcpy(save, b + brk, sf);
+ b[brk + sf - 1] = b[brk - 1];
+ memcpy(b + brk - 1, suffix, sf);
+ safe_write(err, b, brk + sf);
+ memcpy(b + brk, save, sf);
+ len -= brk;
+ } else {
+ int l = brk ? brk : len;
+ safe_write(err, b, l);
+ len -= l;
+ }
- if (brk < len) {
- memmove(buf + pf+1, buf + brk, len - brk);
- len = len - brk + pf+1;
- } else
- break;
- }
+ skip_pf = !brk;
+ memmove(buf + pf+1, b + brk, len);
+ } while (len);
continue;
case 1:
safe_write(out, buf + pf+1, len);
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index a841df2a9e..5b5f288809 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -135,3 +135,20 @@ close $wr or die $!;
close $rd or die $!;
EOF
}
+
+require_svnserve () {
+ if test -z "$SVNSERVE_PORT"
+ then
+ say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
+ test_done
+ exit
+ fi
+}
+
+start_svnserve () {
+ svnserve --listen-port $SVNSERVE_PORT \
+ --root "$rawsvnrepo" \
+ --listen-once \
+ --listen-host 127.0.0.1 &
+}
+
diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh
new file mode 100644
index 0000000000..e5330395fc
--- /dev/null
+++ b/t/t0024-crlf-archive.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+test_description='respect crlf in git archive'
+
+. ./test-lib.sh
+UNZIP=${UNZIP:-unzip}
+
+test_expect_success setup '
+
+ git config core.autocrlf true
+
+ printf "CRLF line ending\r\nAnd another\r\n" > sample &&
+ git add sample &&
+
+ test_tick &&
+ git commit -m Initial
+
+'
+
+test_expect_success 'tar archive' '
+
+ git archive --format=tar HEAD |
+ ( mkdir untarred && cd untarred && "$TAR" -xf - )
+
+ test_cmp sample untarred/sample
+
+'
+
+"$UNZIP" -v >/dev/null 2>&1
+if [ $? -eq 127 ]; then
+ echo "Skipping ZIP test, because unzip was not found"
+ test_done
+ exit
+fi
+
+test_expect_success 'zip archive' '
+
+ git archive --format=zip HEAD >test.zip &&
+
+ ( mkdir unzipped && cd unzipped && unzip ../test.zip ) &&
+
+ test_cmp sample unzipped/sample
+
+'
+
+test_done
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index b177174ef5..7edf49db3c 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -85,7 +85,7 @@ $test_case 'add (with different case)' '
rm camelcase &&
echo 1 >CamelCase &&
git add CamelCase &&
- test $(git-ls-files | grep -i camelcase | wc -l) = 1
+ test $(git ls-files | grep -i camelcase | wc -l) = 1
'
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index 1ec0535138..076b08292d 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description="git-hash-object"
+test_description="git hash-object"
. ./test-lib.sh
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index 09a8199335..67e637b781 100755
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
@@ -78,7 +78,7 @@ test_expect_success 'git whatchanged -p --root' 'cmp whatchanged.expect whatchan
git tag my-first-tag
test_expect_success 'git tag my-first-tag' 'cmp .git/refs/heads/master .git/refs/tags/my-first-tag'
-# TODO: test git-clone
+# TODO: test git clone
git checkout -b mybranch
test_expect_success 'git checkout -b mybranch' 'cmp .git/refs/heads/master .git/refs/heads/mybranch'
diff --git a/t/t1303-wacky-config.sh b/t/t1303-wacky-config.sh
index f98f4c5179..1983076c75 100755
--- a/t/t1303-wacky-config.sh
+++ b/t/t1303-wacky-config.sh
@@ -35,7 +35,7 @@ test_expect_success 'add key in different section' '
'
SECTION="test.q\"s\\sq'sp e.key"
-test_expect_success 'make sure git-config escapes section names properly' '
+test_expect_success 'make sure git config escapes section names properly' '
git config "$SECTION" bar &&
check "$SECTION" bar
'
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index b31e4b1ac6..04c2b164bc 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -228,21 +228,21 @@ test_expect_success \
'echo TEST >F &&
git add F &&
GIT_AUTHOR_DATE="2005-05-26 23:30" \
- GIT_COMMITTER_DATE="2005-05-26 23:30" git-commit -m add -a &&
+ GIT_COMMITTER_DATE="2005-05-26 23:30" git commit -m add -a &&
h_TEST=$(git rev-parse --verify HEAD)
echo The other day this did not work. >M &&
echo And then Bob told me how to fix it. >>M &&
echo OTHER >F &&
GIT_AUTHOR_DATE="2005-05-26 23:41" \
- GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
+ GIT_COMMITTER_DATE="2005-05-26 23:41" git commit -F M -a &&
h_OTHER=$(git rev-parse --verify HEAD) &&
GIT_AUTHOR_DATE="2005-05-26 23:44" \
- GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
+ GIT_COMMITTER_DATE="2005-05-26 23:44" git commit --amend &&
h_FIXED=$(git rev-parse --verify HEAD) &&
echo Merged initial commit and a later commit. >M &&
echo $h_TEST >.git/MERGE_HEAD &&
GIT_AUTHOR_DATE="2005-05-26 23:45" \
- GIT_COMMITTER_DATE="2005-05-26 23:45" git-commit -F M &&
+ GIT_COMMITTER_DATE="2005-05-26 23:45" git commit -F M &&
h_MERGED=$(git rev-parse --verify HEAD) &&
rm -f M'
@@ -253,7 +253,7 @@ $h_OTHER $h_FIXED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151040 +0000 co
$h_FIXED $h_MERGED $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117151100 +0000 commit (merge): Merged initial commit and a later commit.
EOF
test_expect_success \
- 'git-commit logged updates' \
+ 'git commit logged updates' \
"diff expect .git/logs/$m"
unset h_TEST h_OTHER h_FIXED h_MERGED
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 2ee88d8a06..c039ee3fd8 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -28,6 +28,7 @@ test_rev_parse() {
[ $# -eq 0 ] && return
}
+EMPTY_TREE=$(git write-tree)
mkdir -p work/sub/dir || exit 1
mv .git repo.git || exit 1
@@ -106,12 +107,71 @@ test_expect_success 'repo finds its work tree from work tree, too' '
'
test_expect_success '_gently() groks relative GIT_DIR & GIT_WORK_TREE' '
- cd repo.git/work/sub/dir &&
+ (cd repo.git/work/sub/dir &&
GIT_DIR=../../.. GIT_WORK_TREE=../.. GIT_PAGER= \
git diff --exit-code tracked &&
echo changed > tracked &&
! GIT_DIR=../../.. GIT_WORK_TREE=../.. GIT_PAGER= \
- git diff --exit-code tracked
+ git diff --exit-code tracked)
+'
+cat > diff-index-cached.expected <<\EOF
+:000000 100644 0000000000000000000000000000000000000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 A sub/dir/tracked
+EOF
+cat > diff-index.expected <<\EOF
+:000000 100644 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 A sub/dir/tracked
+EOF
+
+
+test_expect_success 'git diff-index' '
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work git diff-index $EMPTY_TREE > result &&
+ test_cmp diff-index.expected result &&
+ GIT_DIR=repo.git git diff-index --cached $EMPTY_TREE > result &&
+ test_cmp diff-index-cached.expected result
+'
+cat >diff-files.expected <<\EOF
+:100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M sub/dir/tracked
+EOF
+
+test_expect_success 'git diff-files' '
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work git diff-files > result &&
+ test_cmp diff-files.expected result
+'
+
+cat >diff-TREE.expected <<\EOF
+diff --git a/sub/dir/tracked b/sub/dir/tracked
+new file mode 100644
+index 0000000..5ea2ed4
+--- /dev/null
++++ b/sub/dir/tracked
+@@ -0,0 +1 @@
++changed
+EOF
+cat >diff-TREE-cached.expected <<\EOF
+diff --git a/sub/dir/tracked b/sub/dir/tracked
+new file mode 100644
+index 0000000..e69de29
+EOF
+cat >diff-FILES.expected <<\EOF
+diff --git a/sub/dir/tracked b/sub/dir/tracked
+index e69de29..5ea2ed4 100644
+--- a/sub/dir/tracked
++++ b/sub/dir/tracked
+@@ -0,0 +1 @@
++changed
+EOF
+
+test_expect_success 'git diff' '
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work git diff $EMPTY_TREE > result &&
+ test_cmp diff-TREE.expected result &&
+ GIT_DIR=repo.git git diff --cached $EMPTY_TREE > result &&
+ test_cmp diff-TREE-cached.expected result &&
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work git diff > result &&
+ test_cmp diff-FILES.expected result
+'
+
+test_expect_success 'git grep' '
+ (cd repo.git/work/sub &&
+ GIT_DIR=../.. GIT_WORK_TREE=.. git grep -l changed | grep -q dir/tracked)
'
test_done
diff --git a/t/t1503-rev-parse-verify.sh b/t/t1503-rev-parse-verify.sh
index 95244c9bcf..cc65394947 100755
--- a/t/t1503-rev-parse-verify.sh
+++ b/t/t1503-rev-parse-verify.sh
@@ -23,7 +23,7 @@ add_line_into_file()
fi
test_tick
- git-commit --quiet -m "$MSG" $_file
+ git commit --quiet -m "$MSG" $_file
}
HASH1=
diff --git a/t/t2005-checkout-index-symlinks.sh b/t/t2005-checkout-index-symlinks.sh
index a84c5a6af9..ed12c4d782 100755
--- a/t/t2005-checkout-index-symlinks.sh
+++ b/t/t2005-checkout-index-symlinks.sh
@@ -13,7 +13,7 @@ file if core.symlinks is false.'
test_expect_success \
'preparation' '
git config core.symlinks false &&
-l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
+l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info'
test_expect_success \
@@ -23,6 +23,6 @@ test -f symlink'
test_expect_success \
'the file must be the blob we added during the setup' '
-test "$(git-hash-object -t blob symlink)" = $l'
+test "$(git hash-object -t blob symlink)" = $l'
test_done
diff --git a/t/t2050-git-dir-relative.sh b/t/t2050-git-dir-relative.sh
index 88f268b9d7..b7131d8c08 100755
--- a/t/t2050-git-dir-relative.sh
+++ b/t/t2050-git-dir-relative.sh
@@ -26,8 +26,8 @@ chmod +x .git/hooks/post-commit'
test_expect_success 'post-commit hook used ordinarily' '
echo initial >top &&
-git-add top
-git-commit -m initial &&
+git add top
+git commit -m initial &&
test -r "${COMMIT_FILE}"
'
diff --git a/t/t2101-update-index-reupdate.sh b/t/t2101-update-index-reupdate.sh
index 59b560bfdf..648184fd98 100755
--- a/t/t2101-update-index-reupdate.sh
+++ b/t/t2101-update-index-reupdate.sh
@@ -40,7 +40,7 @@ test_expect_success 'update-index --remove --again' \
git ls-files -s >current &&
cmp current expected'
-test_expect_success 'first commit' 'git-commit -m initial'
+test_expect_success 'first commit' 'git commit -m initial'
cat > expected <<\EOF
100644 53ab446c3f4e42ce9bb728a0ccb283a101be4979 0 dir1/file3
diff --git a/t/t2102-update-index-symlinks.sh b/t/t2102-update-index-symlinks.sh
index 19d0894d26..f195aefe3a 100755
--- a/t/t2102-update-index-symlinks.sh
+++ b/t/t2102-update-index-symlinks.sh
@@ -13,7 +13,7 @@ even if a plain file is in the working tree if core.symlinks is false.'
test_expect_success \
'preparation' '
git config core.symlinks false &&
-l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
+l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info'
test_expect_success \
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index f57a6e077c..cd9231cf61 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -26,7 +26,7 @@ test_expect_success setup '
echo initial >dir2/sub3 &&
git add check dir1 dir2 top foo &&
test_tick
- git-commit -m initial &&
+ git commit -m initial &&
echo changed >check &&
echo changed >top &&
@@ -40,20 +40,20 @@ test_expect_success update '
'
test_expect_success 'update noticed a removal' '
- test "$(git-ls-files dir1/sub1)" = ""
+ test "$(git ls-files dir1/sub1)" = ""
'
test_expect_success 'update touched correct path' '
- test "$(git-diff-files --name-status dir2/sub3)" = ""
+ test "$(git diff-files --name-status dir2/sub3)" = ""
'
test_expect_success 'update did not touch other tracked files' '
- test "$(git-diff-files --name-status check)" = "M check" &&
- test "$(git-diff-files --name-status top)" = "M top"
+ test "$(git diff-files --name-status check)" = "M check" &&
+ test "$(git diff-files --name-status top)" = "M top"
'
test_expect_success 'update did not touch untracked files' '
- test "$(git-ls-files dir2/other)" = ""
+ test "$(git ls-files dir2/other)" = ""
'
test_expect_success 'cache tree has not been corrupted' '
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 1caeacafa7..8666946b02 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -96,7 +96,7 @@ cat > expect << EOF
# three/
EOF
-test_expect_success 'git-status honours core.excludesfile' \
+test_expect_success 'git status honors core.excludesfile' \
'test_cmp expect output'
test_expect_success 'trailing slash in exclude allows directory match(1)' '
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
index af8c4121ab..f4066cbc09 100755
--- a/t/t3020-ls-files-error-unmatch.sh
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -13,7 +13,7 @@ line.
touch foo bar
git update-index --add foo bar
-git-commit -m "add foo bar"
+git commit -m "add foo bar"
test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index aff360303a..de0cdb1cf4 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -241,7 +241,7 @@ test_expect_success 'merge-recursive simple' '
rm -fr [abcd] &&
git checkout -f "$c2" &&
- git-merge-recursive "$c0" -- "$c2" "$c1"
+ git merge-recursive "$c0" -- "$c2" "$c1"
status=$?
case "$status" in
1)
@@ -269,12 +269,23 @@ test_expect_success 'merge-recursive result' '
'
+test_expect_success 'fail if the index has unresolved entries' '
+
+ rm -fr [abcd] &&
+ git checkout -f "$c1" &&
+
+ test_must_fail git merge "$c5" &&
+ test_must_fail git merge "$c5" 2> out &&
+ grep "You are in the middle of a conflicted merge" out
+
+'
+
test_expect_success 'merge-recursive remove conflict' '
rm -fr [abcd] &&
git checkout -f "$c1" &&
- git-merge-recursive "$c0" -- "$c1" "$c5"
+ git merge-recursive "$c0" -- "$c1" "$c5"
status=$?
case "$status" in
1)
@@ -306,7 +317,7 @@ test_expect_success 'merge-recursive d/f simple' '
git reset --hard &&
git checkout -f "$c1" &&
- git-merge-recursive "$c0" -- "$c1" "$c3"
+ git merge-recursive "$c0" -- "$c1" "$c3"
'
test_expect_success 'merge-recursive result' '
@@ -328,7 +339,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c1" &&
- git-merge-recursive "$c0" -- "$c1" "$c4"
+ git merge-recursive "$c0" -- "$c1" "$c4"
status=$?
case "$status" in
1)
@@ -362,7 +373,7 @@ test_expect_success 'merge-recursive d/f conflict the other way' '
git reset --hard &&
git checkout -f "$c4" &&
- git-merge-recursive "$c0" -- "$c4" "$c1"
+ git merge-recursive "$c0" -- "$c4" "$c1"
status=$?
case "$status" in
1)
@@ -396,7 +407,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c1" &&
- git-merge-recursive "$c0" -- "$c1" "$c6"
+ git merge-recursive "$c0" -- "$c1" "$c6"
status=$?
case "$status" in
1)
@@ -430,7 +441,7 @@ test_expect_success 'merge-recursive d/f conflict' '
git reset --hard &&
git checkout -f "$c6" &&
- git-merge-recursive "$c0" -- "$c6" "$c1"
+ git merge-recursive "$c0" -- "$c6" "$c1"
status=$?
case "$status" in
1)
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 7a83fbfe4f..2147eacc50 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -14,10 +14,10 @@ test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
git update-index --add A &&
- git-commit -m "Initial commit." &&
+ git commit -m "Initial commit." &&
echo World >> A &&
git update-index --add A &&
- git-commit -m "Second commit." &&
+ git commit -m "Second commit." &&
HEAD=$(git rev-parse --verify HEAD)'
test_expect_success \
@@ -123,7 +123,7 @@ test_expect_success \
test_expect_success 'test tracking setup via --track' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my1 local/master &&
test $(git config branch.my1.remote) = local &&
test $(git config branch.my1.merge) = refs/heads/master'
@@ -131,7 +131,7 @@ test_expect_success 'test tracking setup via --track' \
test_expect_success 'test tracking setup (non-wildcard, matching)' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my4 local/master &&
test $(git config branch.my4.remote) = local &&
test $(git config branch.my4.merge) = refs/heads/master'
@@ -139,7 +139,7 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' \
test_expect_success 'test tracking setup (non-wildcard, not matching)' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my5 local/master &&
! test "$(git config branch.my5.remote)" = local &&
! test "$(git config branch.my5.merge)" = refs/heads/master'
@@ -148,7 +148,7 @@ test_expect_success 'test tracking setup via config' \
'git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch my3 local/master &&
test $(git config branch.my3.remote) = local &&
test $(git config branch.my3.merge) = refs/heads/master'
@@ -157,7 +157,7 @@ test_expect_success 'test overriding tracking setup via --no-track' \
'git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track my2 local/master &&
git config branch.autosetupmerge false &&
! test "$(git config branch.my2.remote)" = local &&
@@ -173,7 +173,7 @@ test_expect_success 'no tracking without .fetch entries' \
test_expect_success 'test tracking setup via --track but deeper' \
'git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/o/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o/o || git fetch local) &&
git branch --track my7 local/o/o &&
test "$(git config branch.my7.remote)" = local &&
test "$(git config branch.my7.merge)" = refs/heads/o/o'
@@ -209,7 +209,7 @@ EOF
test_expect_success \
'git checkout -b g/h/i -l should create a branch and a log' \
'GIT_COMMITTER_DATE="2005-05-26 23:30" \
- git-checkout -b g/h/i -l master &&
+ git checkout -b g/h/i -l master &&
test -f .git/refs/heads/g/h/i &&
test -f .git/logs/refs/heads/g/h/i &&
diff expect .git/logs/refs/heads/g/h/i'
@@ -228,7 +228,7 @@ test_expect_success 'autosetuprebase local on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
- (git show-ref -q refs/remotes/local/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase &&
git branch --track myr1 mybase &&
test "$(git config branch.myr1.remote)" = . &&
@@ -240,7 +240,7 @@ test_expect_success 'autosetuprebase always on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase always &&
- (git show-ref -q refs/remotes/local/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase2 &&
git branch --track myr2 mybase &&
test "$(git config branch.myr2.remote)" = . &&
@@ -252,7 +252,7 @@ test_expect_success 'autosetuprebase remote on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
- (git show-ref -q refs/remotes/local/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase3 &&
git branch --track myr3 mybase2 &&
test "$(git config branch.myr3.remote)" = . &&
@@ -264,7 +264,7 @@ test_expect_success 'autosetuprebase never on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
- (git show-ref -q refs/remotes/local/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase4 &&
git branch --track myr4 mybase2 &&
test "$(git config branch.myr4.remote)" = . &&
@@ -276,7 +276,7 @@ test_expect_success 'autosetuprebase local on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr5 local/master &&
test "$(git config branch.myr5.remote)" = local &&
test "$(git config branch.myr5.merge)" = refs/heads/master &&
@@ -287,7 +287,7 @@ test_expect_success 'autosetuprebase never on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr6 local/master &&
test "$(git config branch.myr6.remote)" = local &&
test "$(git config branch.myr6.merge)" = refs/heads/master &&
@@ -298,7 +298,7 @@ test_expect_success 'autosetuprebase remote on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr7 local/master &&
test "$(git config branch.myr7.remote)" = local &&
test "$(git config branch.myr7.merge)" = refs/heads/master &&
@@ -309,7 +309,7 @@ test_expect_success 'autosetuprebase always on a tracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr8 local/master &&
test "$(git config branch.myr8.remote)" = local &&
test "$(git config branch.myr8.merge)" = refs/heads/master &&
@@ -320,7 +320,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '
git config --unset branch.autosetuprebase &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr9 local/master &&
test "$(git config branch.myr9.remote)" = local &&
test "$(git config branch.myr9.merge)" = refs/heads/master &&
@@ -330,7 +330,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked remote branch' '
test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/o || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase10 &&
git branch --track myr10 mybase2 &&
test "$(git config branch.myr10.remote)" = . &&
@@ -341,7 +341,7 @@ test_expect_success 'autosetuprebase unconfigured on a tracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr11 mybase2 &&
test "z$(git config branch.myr11.remote)" = z &&
test "z$(git config branch.myr11.merge)" = z &&
@@ -351,7 +351,7 @@ test_expect_success 'autosetuprebase unconfigured on untracked local branch' '
test_expect_success 'autosetuprebase unconfigured on untracked remote branch' '
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr12 local/master &&
test "z$(git config branch.myr12.remote)" = z &&
test "z$(git config branch.myr12.merge)" = z &&
@@ -362,7 +362,7 @@ test_expect_success 'autosetuprebase never on an untracked local branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr13 mybase2 &&
test "z$(git config branch.myr13.remote)" = z &&
test "z$(git config branch.myr13.merge)" = z &&
@@ -373,7 +373,7 @@ test_expect_success 'autosetuprebase local on an untracked local branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr14 mybase2 &&
test "z$(git config branch.myr14.remote)" = z &&
test "z$(git config branch.myr14.merge)" = z &&
@@ -384,7 +384,7 @@ test_expect_success 'autosetuprebase remote on an untracked local branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr15 mybase2 &&
test "z$(git config branch.myr15.remote)" = z &&
test "z$(git config branch.myr15.merge)" = z &&
@@ -395,7 +395,7 @@ test_expect_success 'autosetuprebase always on an untracked local branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr16 mybase2 &&
test "z$(git config branch.myr16.remote)" = z &&
test "z$(git config branch.myr16.merge)" = z &&
@@ -406,7 +406,7 @@ test_expect_success 'autosetuprebase never on an untracked remote branch' '
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr17 local/master &&
test "z$(git config branch.myr17.remote)" = z &&
test "z$(git config branch.myr17.merge)" = z &&
@@ -417,7 +417,7 @@ test_expect_success 'autosetuprebase local on an untracked remote branch' '
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr18 local/master &&
test "z$(git config branch.myr18.remote)" = z &&
test "z$(git config branch.myr18.merge)" = z &&
@@ -428,7 +428,7 @@ test_expect_success 'autosetuprebase remote on an untracked remote branch' '
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr19 local/master &&
test "z$(git config branch.myr19.remote)" = z &&
test "z$(git config branch.myr19.merge)" = z &&
@@ -439,7 +439,7 @@ test_expect_success 'autosetuprebase always on an untracked remote branch' '
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
- (git show-ref -q refs/remotes/local/master || git-fetch local) &&
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr20 local/master &&
test "z$(git config branch.myr20.remote)" = z &&
test "z$(git config branch.myr20.merge)" = z &&
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index c2dec1c632..087ef75061 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -17,7 +17,7 @@ test_expect_success \
'prepare a trivial repository' \
'echo Hello > A &&
git update-index --add A &&
- git-commit -m "Initial commit." &&
+ git commit -m "Initial commit." &&
HEAD=$(git rev-parse --verify HEAD)'
SHA1=
@@ -97,7 +97,7 @@ test_expect_success \
git branch n'
test_expect_success 'pack, prune and repack' '
- git-tag foo &&
+ git tag foo &&
git pack-refs --all --prune &&
git show-ref >all-of-them &&
git pack-refs &&
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index 0574ef1f10..db46d53e82 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -21,7 +21,7 @@ cat >"$p0" <<\EOF
3. A quick brown fox jumps over the lazy cat, oops dog.
EOF
-cat >"$p1" "$p0"
+cat 2>/dev/null >"$p1" "$p0"
echo 'Foo Bar Baz' >"$p2"
test -f "$p1" && cmp "$p0" "$p1" || {
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 91bb5e1d9e..b7a670ef40 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -16,15 +16,15 @@ test_expect_success \
'prepare repository with topic branches' \
'echo First > A &&
git update-index --add A &&
- git-commit -m "Add A." &&
+ git commit -m "Add A." &&
git checkout -b my-topic-branch &&
echo Second > B &&
git update-index --add B &&
- git-commit -m "Add B." &&
+ git commit -m "Add B." &&
git checkout -f master &&
echo Third >> A &&
git update-index A &&
- git-commit -m "Modify A." &&
+ git commit -m "Modify A." &&
git checkout -b side my-topic-branch &&
echo Side >> C &&
git add C &&
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 166ddb1447..aea6685984 100755
--- a/t/t3401-rebase-partial.sh
+++ b/t/t3401-rebase-partial.sh
@@ -15,29 +15,29 @@ test_expect_success \
'prepare repository with topic branch' \
'echo First > A &&
git update-index --add A &&
- git-commit -m "Add A." &&
+ git commit -m "Add A." &&
- git-checkout -b my-topic-branch &&
+ git checkout -b my-topic-branch &&
echo Second > B &&
git update-index --add B &&
- git-commit -m "Add B." &&
+ git commit -m "Add B." &&
echo AnotherSecond > C &&
git update-index --add C &&
- git-commit -m "Add C." &&
+ git commit -m "Add C." &&
- git-checkout -f master &&
+ git checkout -f master &&
echo Third >> A &&
git update-index A &&
- git-commit -m "Modify A."
+ git commit -m "Modify A."
'
test_expect_success \
'pick top patch from topic branch into master' \
'git cherry-pick my-topic-branch^0 &&
- git-checkout -f my-topic-branch &&
+ git checkout -f my-topic-branch &&
git branch master-merge master &&
git branch my-topic-branch-merge my-topic-branch
'
@@ -49,13 +49,13 @@ test_debug \
'
test_expect_success \
- 'rebase topic branch against new master and check git-am did not get halted' \
- 'git-rebase master && test ! -d .git/rebase-apply'
+ 'rebase topic branch against new master and check git am did not get halted' \
+ 'git rebase master && test ! -d .git/rebase-apply'
test_expect_success \
'rebase --merge topic branch that was partially merged upstream' \
- 'git-checkout -f my-topic-branch-merge &&
- git-rebase --merge master-merge &&
+ 'git checkout -f my-topic-branch-merge &&
+ git rebase --merge master-merge &&
test ! -d .git/rebase-merge'
test_done
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 0d33c71daa..64446e3db3 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -7,7 +7,7 @@ test_description='git rebase --merge --skip tests'
. ./test-lib.sh
-# we assume the default git-am -3 --skip strategy is tested independently
+# we assume the default git am -3 --skip strategy is tested independently
# and always works :)
test_expect_success setup '
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 5aa487ac02..e0ded197ec 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -161,7 +161,7 @@ test_expect_success 'stop on conflicting pick' '
test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" &&
test_cmp expect .git/rebase-merge/patch &&
test_cmp expect2 file1 &&
- test "$(git-diff --name-status |
+ test "$(git diff --name-status |
sed -n -e "/^U/s/^U[^a-z]*//p")" = file1 &&
test 4 = $(grep -v "^#" < .git/rebase-merge/done | wc -l) &&
test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)
diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index 4de550a632..2999e78937 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -52,7 +52,7 @@ testrebase() {
test -d "$dotest" &&
test_must_fail git rebase --skip &&
test $(git rev-parse HEAD) = $(git rev-parse master) &&
- git-rebase --abort &&
+ git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
'
diff --git a/t/t3500-cherry.sh b/t/t3500-cherry.sh
index 4911c48378..dadbbc2a9f 100755
--- a/t/t3500-cherry.sh
+++ b/t/t3500-cherry.sh
@@ -17,25 +17,25 @@ test_expect_success \
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
'echo First > A &&
git update-index --add A &&
- git-commit -m "Add A." &&
+ git commit -m "Add A." &&
- git-checkout -b my-topic-branch &&
+ git checkout -b my-topic-branch &&
echo Second > B &&
git update-index --add B &&
- git-commit -m "Add B." &&
+ git commit -m "Add B." &&
sleep 2 &&
echo AnotherSecond > C &&
git update-index --add C &&
- git-commit -m "Add C." &&
+ git commit -m "Add C." &&
- git-checkout -f master &&
+ git checkout -f master &&
rm -f B C &&
echo Third >> A &&
git update-index A &&
- git-commit -m "Modify A." &&
+ git commit -m "Modify A." &&
expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
'
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 79c06adf1f..558c80edbf 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -12,14 +12,14 @@ test_expect_success \
'Initialize test directory' \
"touch -- foo bar baz 'space embedded' -q &&
git add -- foo bar baz 'space embedded' -q &&
- git-commit -m 'add normal files' &&
+ git commit -m 'add normal files' &&
test_tabs=y &&
if touch -- 'tab embedded' 'newline
embedded'
then
git add -- 'tab embedded' 'newline
embedded' &&
- git-commit -m 'add files with tabs and newlines'
+ git commit -m 'add files with tabs and newlines'
else
say 'Your filesystem does not allow tabs in filenames.'
test_tabs=n
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index c851db8ca9..6fb027ba57 100755
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
@@ -2,7 +2,7 @@
#
#
-test_description='git-mktag: tag object verify test'
+test_description='git mktag: tag object verify test'
. ./test-lib.sh
@@ -14,7 +14,7 @@ test_description='git-mktag: tag object verify test'
check_verify_failure () {
expect="$2"
test_expect_success "$1" '
- ( test_must_fail git-mktag <tag.sig 2>message ) &&
+ ( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
'
}
@@ -24,7 +24,7 @@ check_verify_failure () {
# for the tag.
echo Hello >A
git update-index --add A
-git-commit -m "Initial commit"
+git commit -m "Initial commit"
head=$(git rev-parse --verify HEAD)
############################################################
@@ -222,7 +222,7 @@ EOF
test_expect_success \
'allow empty tag email' \
- 'git-mktag <tag.sig >.git/refs/tags/mytag 2>message'
+ 'git mktag <tag.sig >.git/refs/tags/mytag 2>message'
############################################################
# 16. disallow spaces in tag email
@@ -350,14 +350,14 @@ EOF
test_expect_success \
'create valid tag' \
- 'git-mktag <tag.sig >.git/refs/tags/mytag 2>message'
+ 'git mktag <tag.sig >.git/refs/tags/mytag 2>message'
############################################################
# 25. check mytag
test_expect_success \
'check mytag' \
- 'git-tag -l | grep mytag'
+ 'git tag -l | grep mytag'
test_done
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index 883281dbd6..f31353323b 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -18,7 +18,7 @@ test_expect_success setup '
T=$(git write-tree) &&
C=$(git commit-tree $T <../t3900/1-UTF-8.txt) &&
git update-ref HEAD $C &&
- git-tag C0
+ git tag C0
'
test_expect_success 'no encoding header for base case' '
@@ -30,9 +30,9 @@ for H in ISO-8859-1 EUCJP ISO-2022-JP
do
test_expect_success "$H setup" '
git config i18n.commitencoding $H &&
- git-checkout -b $H C0 &&
+ git checkout -b $H C0 &&
echo $H >F &&
- git-commit -a -F ../t3900/$H.txt
+ git commit -a -F ../t3900/$H.txt
'
done
diff --git a/t/t3901-i18n-patch.sh b/t/t3901-i18n-patch.sh
index 235f372832..567760e1d2 100755
--- a/t/t3901-i18n-patch.sh
+++ b/t/t3901-i18n-patch.sh
@@ -103,7 +103,7 @@ test_expect_success 'rebase (U/U)' '
# we want UTF-8 encoded name.
. ../t3901-utf8.txt &&
git checkout -b test &&
- git-rebase master &&
+ git rebase master &&
check_encoding 2
'
@@ -114,7 +114,7 @@ test_expect_success 'rebase (U/L)' '
. ../t3901-utf8.txt &&
git reset --hard side &&
- git-rebase master &&
+ git rebase master &&
check_encoding 2
'
@@ -126,7 +126,7 @@ test_expect_success 'rebase (L/L)' '
. ../t3901-8859-1.txt &&
git reset --hard side &&
- git-rebase master &&
+ git rebase master &&
check_encoding 2 8859
'
@@ -139,7 +139,7 @@ test_expect_success 'rebase (L/U)' '
. ../t3901-8859-1.txt &&
git reset --hard side &&
- git-rebase master &&
+ git rebase master &&
check_encoding 2 8859
'
@@ -211,7 +211,7 @@ test_expect_success 'rebase --merge (U/U)' '
. ../t3901-utf8.txt &&
git reset --hard side &&
- git-rebase --merge master &&
+ git rebase --merge master &&
check_encoding 2
'
@@ -222,7 +222,7 @@ test_expect_success 'rebase --merge (U/L)' '
. ../t3901-utf8.txt &&
git reset --hard side &&
- git-rebase --merge master &&
+ git rebase --merge master &&
check_encoding 2
'
@@ -234,7 +234,7 @@ test_expect_success 'rebase --merge (L/L)' '
. ../t3901-8859-1.txt &&
git reset --hard side &&
- git-rebase --merge master &&
+ git rebase --merge master &&
check_encoding 2 8859
'
@@ -247,7 +247,7 @@ test_expect_success 'rebase --merge (L/U)' '
. ../t3901-8859-1.txt &&
git reset --hard side &&
- git-rebase --merge master &&
+ git rebase --merge master &&
check_encoding 2 8859
'
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index fe4fb5116a..5868052425 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -7,12 +7,6 @@ test_description='quoted output'
. ./test-lib.sh
-P1='pathname with HT'
-: >"$P1" 2>&1 && test -f "$P1" && rm -f "$P1" || {
- echo >&2 'Filesystem does not support HT in names'
- test_done
-}
-
FN='濱野'
GN='ç´”'
HT=' '
@@ -20,7 +14,7 @@ LF='
'
DQ='"'
-echo foo > "Name and an${HT}HT"
+echo foo 2>/dev/null > "Name and an${HT}HT"
test -f "Name and an${HT}HT" || {
# since FAT/NTFS does not allow tabs in filenames, skip this test
say 'Your filesystem does not allow tabs in filenames, test skipped.'
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 8d4804b658..7484cbede6 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Johannes E Schindelin
#
-test_description='Test git-stash'
+test_description='Test git stash'
. ./test-lib.sh
diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
index eced1f30fb..64c372a025 100755
--- a/t/t4012-diff-binary.sh
+++ b/t/t4012-diff-binary.sh
@@ -61,7 +61,7 @@ test_expect_success 'apply detecting corrupt patch correctly' \
detected=`sed -ne "${detected}p" broken` &&
test "$detected" = xCIT'
-test_expect_success 'initial commit' 'git-commit -a -m initial'
+test_expect_success 'initial commit' 'git commit -a -m initial'
# Try removal (b), modification (d), and creation (e).
test_expect_success 'diff-index with --binary' \
@@ -72,7 +72,7 @@ test_expect_success 'diff-index with --binary' \
git apply --stat --summary current'
test_expect_success 'apply binary patch' \
- 'git-reset --hard &&
+ 'git reset --hard &&
git apply --binary --index <current &&
tree1=`git write-tree` &&
test "$tree1" = "$tree0"'
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index ec98509fd2..b1cbd36d17 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -352,4 +352,20 @@ test_expect_success 'checkdiff allows new blank lines' '
git diff --check
'
+test_expect_success 'combined diff with autocrlf conversion' '
+
+ git reset --hard &&
+ echo >x hello &&
+ git commit -m "one side" x &&
+ git checkout HEAD^ &&
+ echo >x goodbye &&
+ git commit -m "the other side" x &&
+ git config core.autocrlf true &&
+ test_must_fail git merge master &&
+
+ git diff | sed -e "1,/^@@@/d" >actual &&
+ ! grep "^-" actual
+
+'
+
test_done
diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index f07035ab7e..55eb5f83f1 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -13,8 +13,8 @@ P1='pathname with HT'
P2='pathname with SP'
P3='pathname
with LF'
-: >"$P1" 2>&1 && test -f "$P1" && rm -f "$P1" || {
- echo >&2 'Filesystem does not support tabs in names'
+: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1" || {
+ say 'Your filesystem does not allow tabs in filenames, test skipped.'
test_done
}
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 833d6cbcfc..18bcd9713d 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -57,4 +57,10 @@ test_expect_success 'last regexp must not be negated' '
test_must_fail git diff --no-index Beer.java Beer-correct.java
'
+test_expect_success 'alternation in pattern' '
+ git config diff.java.funcname "^[ ]*\\(\\(public\\|static\\).*\\)$"
+ git diff --no-index Beer.java Beer-correct.java |
+ grep "^@@.*@@ public static void main("
+'
+
test_done
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh
index 7eae1f4500..84a1fe3115 100755
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -178,4 +178,16 @@ test_expect_success 'trailing empty lines (2)' '
'
+test_expect_success 'do not color trailing cr in context' '
+ git config --unset core.whitespace
+ rm -f .gitattributes &&
+ echo AAAQ | tr Q "\015" >G &&
+ git add G &&
+ echo BBBQ | tr Q "\015" >>G
+ git diff --color G | tr "\015" Q >output &&
+ grep "BBB.*${blue_grep}Q" output &&
+ grep "AAA.*\[mQ" output
+
+'
+
test_done
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 7da0b4bb8b..ad4cc1a757 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -21,16 +21,16 @@ cat file1 >file2
cat file1 >file4
git update-index --add --remove file1 file2 file4
-git-commit -m 'Initial Version' 2>/dev/null
+git commit -m 'Initial Version' 2>/dev/null
-git-checkout -b binary
+git checkout -b binary
perl -pe 'y/x/\000/' <file1 >file3
cat file3 >file4
git add file2
perl -pe 'y/\000/v/' <file3 >file1
rm -f file2
git update-index --add --remove file1 file2 file3 file4
-git-commit -m 'Second Version'
+git commit -m 'Second Version'
git diff-tree -p master binary >B.diff
git diff-tree -p -C master binary >C.diff
@@ -39,47 +39,47 @@ git diff-tree -p --binary master binary >BF.diff
git diff-tree -p --binary -C master binary >CF.diff
test_expect_success 'stat binary diff -- should not fail.' \
- 'git-checkout master
+ 'git checkout master
git apply --stat --summary B.diff'
test_expect_success 'stat binary diff (copy) -- should not fail.' \
- 'git-checkout master
+ 'git checkout master
git apply --stat --summary C.diff'
test_expect_success 'check binary diff -- should fail.' \
- 'git-checkout master &&
+ 'git checkout master &&
test_must_fail git apply --check B.diff'
test_expect_success 'check binary diff (copy) -- should fail.' \
- 'git-checkout master &&
+ 'git checkout master &&
test_must_fail git apply --check C.diff'
test_expect_success \
'check incomplete binary diff with replacement -- should fail.' '
- git-checkout master &&
+ git checkout master &&
test_must_fail git apply --check --allow-binary-replacement B.diff
'
test_expect_success \
'check incomplete binary diff with replacement (copy) -- should fail.' '
- git-checkout master &&
+ git checkout master &&
test_must_fail git apply --check --allow-binary-replacement C.diff
'
test_expect_success 'check binary diff with replacement.' \
- 'git-checkout master
+ 'git checkout master
git apply --check --allow-binary-replacement BF.diff'
test_expect_success 'check binary diff with replacement (copy).' \
- 'git-checkout master
+ 'git checkout master
git apply --check --allow-binary-replacement CF.diff'
# Now we start applying them.
do_reset () {
rm -f file? &&
- git-reset --hard &&
- git-checkout -f master
+ git reset --hard &&
+ git checkout -f master
}
test_expect_success 'apply binary diff -- should fail.' \
diff --git a/t/t4104-apply-boundary.sh b/t/t4104-apply-boundary.sh
index e7e2913de7..0e3ce3611d 100755
--- a/t/t4104-apply-boundary.sh
+++ b/t/t4104-apply-boundary.sh
@@ -27,6 +27,15 @@ test_expect_success setup '
git diff victim >add-a-patch.with &&
git diff --unified=0 >add-a-patch.without &&
+ : insert at line two
+ for i in b a '"$L"' y
+ do
+ echo $i
+ done >victim &&
+ cat victim >insert-a-expect &&
+ git diff victim >insert-a-patch.with &&
+ git diff --unified=0 >insert-a-patch.without &&
+
: modify at the head
for i in a '"$L"' y
do
@@ -55,7 +64,7 @@ test_expect_success setup '
git diff --unified=0 >add-z-patch.without &&
: modify at the tail
- for i in a '"$L"' y
+ for i in b '"$L"' z
do
echo $i
done >victim &&
@@ -81,7 +90,7 @@ do
with) u= ;;
without) u='--unidiff-zero ' ;;
esac
- for kind in add-a add-z mod-a mod-z del-a del-z
+ for kind in add-a add-z insert-a mod-a mod-z del-a del-z
do
test_expect_success "apply $kind-patch $with context" '
cat original >victim &&
@@ -95,7 +104,7 @@ do
done
done
-for kind in add-a add-z mod-a mod-z del-a del-z
+for kind in add-a add-z insert-a mod-a mod-z del-a del-z
do
rm -f $kind-ng.without
sed -e "s/^diff --git /diff /" \
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 85f3da2b98..f83322e513 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='core.whitespace rules and git-apply'
+test_description='core.whitespace rules and git apply'
. ./test-lib.sh
diff --git a/t/t4127-apply-same-fn.sh b/t/t4127-apply-same-fn.sh
index 1f859dd908..3a8202ea93 100755
--- a/t/t4127-apply-same-fn.sh
+++ b/t/t4127-apply-same-fn.sh
@@ -26,7 +26,7 @@ test_expect_success 'apply same filename with independent changes' '
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
- git-apply patch0 &&
+ git apply patch0 &&
diff same_fn same_fn2
'
@@ -39,7 +39,7 @@ test_expect_success 'apply same filename with overlapping changes' '
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
- git-apply patch0 &&
+ git apply patch0 &&
diff same_fn same_fn2
'
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 6e6aaf5936..1be5fb3f9d 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -164,7 +164,7 @@ test_expect_success 'am --keep really keeps the subject' '
git checkout HEAD^ &&
git am --keep patch4 &&
! test -d .git/rebase-apply &&
- git-cat-file commit HEAD |
+ git cat-file commit HEAD |
grep -q -F "Re: Re: Re: [PATCH 1/5 v2] third"
'
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 7d86cdff64..4448aba7e0 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -44,14 +44,14 @@ do
'
test_expect_success "am$with3 --skip continue after failed am$with3" '
- test_must_fail git-am$with3 --skip >output &&
+ test_must_fail git am$with3 --skip >output &&
test "$(grep "^Applying" output)" = "Applying: 6" &&
test_cmp file-2-expect file-2 &&
test ! -f .git/rr-cache/MERGE_RR
'
test_expect_success "am --abort goes back after failed am$with3" '
- git-am --abort &&
+ git am --abort &&
git rev-parse HEAD >actual &&
git rev-parse initial >expect &&
test_cmp expect actual &&
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 4c8af45f83..0ab925c4e4 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -69,7 +69,29 @@ test_expect_success 'diff-filter=D' '
'
+test_expect_success 'setup case sensitivity tests' '
+ echo case >one &&
+ test_tick &&
+ git commit -a -m Second
+'
+
+test_expect_success 'log --grep' '
+ echo second >expect &&
+ git log -1 --pretty="tformat:%s" --grep=sec >actual &&
+ test_cmp expect actual
+'
+test_expect_success 'log -i --grep' '
+ echo Second >expect &&
+ git log -1 --pretty="tformat:%s" -i --grep=sec >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log --grep -i' '
+ echo Second >expect &&
+ git log -1 --pretty="tformat:%s" --grep=sec -i >actual &&
+ test_cmp expect actual
+'
test_done
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 645583f9d7..3a0ef8759c 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2005 Junio C Hamano
#
-test_description='git-pack-object
+test_description='git pack-object
'
. ./test-lib.sh
@@ -187,6 +187,12 @@ test_expect_success \
test-3-${packname_3}.idx'
test_expect_success \
+ 'verify pack -v' \
+ 'git verify-pack -v test-1-${packname_1}.idx \
+ test-2-${packname_2}.idx \
+ test-3-${packname_3}.idx'
+
+test_expect_success \
'verify-pack catches mismatched .idx and .pack files' \
'cat test-1-${packname_1}.idx >test-3.idx &&
cat test-2-${packname_2}.pack >test-3.pack &&
@@ -236,24 +242,24 @@ test_expect_success \
test_expect_success \
'build pack index for an existing pack' \
'cat test-1-${packname_1}.pack >test-3.pack &&
- git-index-pack -o tmp.idx test-3.pack &&
+ git index-pack -o tmp.idx test-3.pack &&
cmp tmp.idx test-1-${packname_1}.idx &&
- git-index-pack test-3.pack &&
+ git index-pack test-3.pack &&
cmp test-3.idx test-1-${packname_1}.idx &&
cat test-2-${packname_2}.pack >test-3.pack &&
- git-index-pack -o tmp.idx test-2-${packname_2}.pack &&
+ git index-pack -o tmp.idx test-2-${packname_2}.pack &&
cmp tmp.idx test-2-${packname_2}.idx &&
- git-index-pack test-3.pack &&
+ git index-pack test-3.pack &&
cmp test-3.idx test-2-${packname_2}.idx &&
cat test-3-${packname_3}.pack >test-3.pack &&
- git-index-pack -o tmp.idx test-3-${packname_3}.pack &&
+ git index-pack -o tmp.idx test-3-${packname_3}.pack &&
cmp tmp.idx test-3-${packname_3}.idx &&
- git-index-pack test-3.pack &&
+ git index-pack test-3.pack &&
cmp test-3.idx test-3-${packname_3}.idx &&
:'
@@ -266,7 +272,7 @@ test_expect_success \
test_expect_success \
'make sure index-pack detects the SHA1 collision' \
- 'test_must_fail git-index-pack -o bad.idx test-3.pack'
+ 'test_must_fail git index-pack -o bad.idx test-3.pack'
test_expect_success \
'honor pack.packSizeLimit' \
diff --git a/t/t5301-sliding-window.sh b/t/t5301-sliding-window.sh
index 073ac0c6f9..0a24e61ff9 100755
--- a/t/t5301-sliding-window.sh
+++ b/t/t5301-sliding-window.sh
@@ -19,7 +19,7 @@ test_expect_success \
tree=`git write-tree` &&
commit1=`git commit-tree $tree </dev/null` &&
git update-ref HEAD $commit1 &&
- git-repack -a -d &&
+ git repack -a -d &&
test "`git count-objects`" = "0 objects, 0 kilobytes" &&
pack1=`ls .git/objects/pack/*.pack` &&
test -f "$pack1"'
@@ -45,7 +45,7 @@ test_expect_success \
git config core.packedGitLimit 512 &&
commit2=`git commit-tree $tree -p $commit1 </dev/null` &&
git update-ref HEAD $commit2 &&
- git-repack -a -d &&
+ git repack -a -d &&
test "`git count-objects`" = "0 objects, 0 kilobytes" &&
pack2=`ls .git/objects/pack/*.pack` &&
test -f "$pack2"
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 0639772ac4..6424db1f28 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -48,11 +48,11 @@ test_expect_success \
test_expect_success \
'index-pack with index version 1' \
- 'git-index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"'
+ 'git index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"'
test_expect_success \
'index-pack with index version 2' \
- 'git-index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"'
+ 'git index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"'
test_expect_success \
'index-pack results should match pack-objects ones' \
@@ -85,7 +85,7 @@ test_expect_success \
test "$have_64bits" &&
test_expect_success \
'index v2: force some 64-bit offsets with index-pack' \
- 'git-index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
+ 'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
test "$have_64bits" &&
test_expect_success \
@@ -94,7 +94,7 @@ test_expect_success \
test_expect_success \
'[index v1] 1) stream pack to repository' \
- 'git-index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
+ 'git index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
@@ -132,7 +132,7 @@ test_expect_success \
test_expect_success \
'[index v2] 1) stream pack to repository' \
'rm -f .git/objects/pack/* &&
- git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
+ git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
@@ -165,7 +165,7 @@ test_expect_success \
test_expect_success \
'[index v2] 6) verify-pack detects CRC mismatch' \
'rm -f .git/objects/pack/* &&
- git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
+ git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git verify-pack ".git/objects/pack/pack-${pack1}.pack" &&
chmod +w ".git/objects/pack/pack-${pack1}.idx" &&
dd if=/dev/zero of=".git/objects/pack/pack-${pack1}.idx" conv=notrunc \
diff --git a/t/t5305-include-tag.sh b/t/t5305-include-tag.sh
index fb471a08c6..b061864a87 100755
--- a/t/t5305-include-tag.sh
+++ b/t/t5305-include-tag.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-pack-object --include-tag'
+test_description='git pack-object --include-tag'
. ./test-lib.sh
TRASH=`pwd`
diff --git a/t/t5306-pack-nobase.sh b/t/t5306-pack-nobase.sh
new file mode 100755
index 0000000000..f4931c0c2a
--- /dev/null
+++ b/t/t5306-pack-nobase.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Google Inc.
+#
+
+test_description='git-pack-object with missing base
+
+'
+. ./test-lib.sh
+
+# Create A-B chain
+#
+test_expect_success \
+ 'setup base' \
+ 'for a in a b c d e f g h i; do echo $a >>text; done &&
+ echo side >side &&
+ git update-index --add text side &&
+ A=$(echo A | git commit-tree $(git write-tree)) &&
+
+ echo m >>text &&
+ git update-index text &&
+ B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
+ git update-ref HEAD $B
+ '
+
+# Create repository with C whose parent is B.
+# Repository contains C, C^{tree}, C:text, B, B^{tree}.
+# Repository is missing B:text (best delta base for C:text).
+# Repository is missing A (parent of B).
+# Repository is missing A:side.
+#
+test_expect_success \
+ 'setup patch_clone' \
+ 'base_objects=$(pwd)/.git/objects &&
+ (mkdir patch_clone &&
+ cd patch_clone &&
+ git init &&
+ echo "$base_objects" >.git/objects/info/alternates &&
+ echo q >>text &&
+ git read-tree $B &&
+ git update-index text &&
+ git update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&
+ rm .git/objects/info/alternates &&
+
+ git --git-dir=../.git cat-file commit $B |
+ git hash-object -t commit -w --stdin &&
+
+ git --git-dir=../.git cat-file tree "$B^{tree}" |
+ git hash-object -t tree -w --stdin
+ ) &&
+ C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
+ '
+
+# Clone patch_clone indirectly by cloning base and fetching.
+#
+test_expect_success \
+ 'indirectly clone patch_clone' \
+ '(mkdir user_clone &&
+ cd user_clone &&
+ git init &&
+ git pull ../.git &&
+ test $(git rev-parse HEAD) = $B &&
+
+ git pull ../patch_clone/.git &&
+ test $(git rev-parse HEAD) = $C
+ )
+ '
+
+# Cloning the patch_clone directly should fail.
+#
+test_expect_success \
+ 'clone of patch_clone is incomplete' \
+ '(mkdir user_direct &&
+ cd user_direct &&
+ git init &&
+ test_must_fail git fetch ../patch_clone/.git
+ )
+ '
+
+test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 68c2ae688c..544771d8fa 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -31,7 +31,7 @@ test_expect_success setup '
parent=$commit || return 1
done &&
git update-ref HEAD "$commit" &&
- git-clone ./. victim &&
+ git clone ./. victim &&
cd victim &&
git log &&
cd .. &&
@@ -68,7 +68,7 @@ test_expect_success 'pack the destination repository' '
test_expect_success \
'pushing rewound head should not barf but require --force' '
# should not fail but refuse to update.
- if git-send-pack ./victim/.git/ master
+ if git send-pack ./victim/.git/ master
then
# now it should fail with Pasky patch
echo >&2 Gaah, it should have failed.
@@ -85,7 +85,7 @@ test_expect_success \
true
fi &&
# this should update
- git-send-pack --force ./victim/.git/ master &&
+ git send-pack --force ./victim/.git/ master &&
cmp victim/.git/refs/heads/master .git/refs/heads/master
'
@@ -95,7 +95,7 @@ test_expect_success \
git branch extra master &&
cd .. &&
test -f victim/.git/refs/heads/extra &&
- git-send-pack ./victim/.git/ :extra master &&
+ git send-pack ./victim/.git/ :extra master &&
! test -f victim/.git/refs/heads/extra
'
@@ -109,27 +109,27 @@ test_expect_success \
git config receive.denyNonFastforwards true &&
cd .. &&
git update-ref refs/heads/master master^ || return 1
- git-send-pack --force ./victim/.git/ master && return 1
+ git send-pack --force ./victim/.git/ master && return 1
! test_cmp .git/refs/heads/master victim/.git/refs/heads/master
'
test_expect_success \
'pushing does not include non-head refs' '
mkdir parent && cd parent &&
- git-init && touch file && git-add file && git-commit -m add &&
+ git init && touch file && git add file && git commit -m add &&
cd .. &&
- git-clone parent child && cd child && git-push --all &&
+ git clone parent child && cd child && git push --all &&
cd ../parent &&
- git-branch -a >branches && ! grep origin/master branches
+ git branch -a >branches && ! grep origin/master branches
'
rewound_push_setup() {
rm -rf parent child &&
mkdir parent && cd parent &&
- git-init && echo one >file && git-add file && git-commit -m one &&
- echo two >file && git-commit -a -m two &&
+ git init && echo one >file && git add file && git commit -m one &&
+ echo two >file && git commit -a -m two &&
cd .. &&
- git-clone parent child && cd child && git-reset --hard HEAD^
+ git clone parent child && cd child && git reset --hard HEAD^
}
rewound_push_succeeded() {
@@ -148,26 +148,26 @@ rewound_push_failed() {
test_expect_success \
'pushing explicit refspecs respects forcing' '
rewound_push_setup &&
- if git-send-pack ../parent/.git refs/heads/master:refs/heads/master
+ if git send-pack ../parent/.git refs/heads/master:refs/heads/master
then
false
else
true
fi && rewound_push_failed &&
- git-send-pack ../parent/.git +refs/heads/master:refs/heads/master &&
+ git send-pack ../parent/.git +refs/heads/master:refs/heads/master &&
rewound_push_succeeded
'
test_expect_success \
'pushing wildcard refspecs respects forcing' '
rewound_push_setup &&
- if git-send-pack ../parent/.git refs/heads/*:refs/heads/*
+ if git send-pack ../parent/.git refs/heads/*:refs/heads/*
then
false
else
true
fi && rewound_push_failed &&
- git-send-pack ../parent/.git +refs/heads/*:refs/heads/* &&
+ git send-pack ../parent/.git +refs/heads/*:refs/heads/* &&
rewound_push_succeeded
'
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index ee769d6695..64f66c94f3 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -17,7 +17,7 @@ test_expect_success setup '
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git update-ref refs/heads/tofail $commit1 &&
- git-clone ./. victim &&
+ git clone ./. victim &&
GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
git update-ref refs/heads/master $commit1 &&
git update-ref refs/heads/tofail $commit0
@@ -61,7 +61,7 @@ EOF
chmod u+x victim/.git/hooks/post-update
test_expect_success push '
- test_must_fail git-send-pack --force ./victim/.git \
+ test_must_fail git send-pack --force ./victim/.git \
master tofail >send.out 2>send.err
'
diff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh
index 1394047a8d..6eb2ffd6ec 100755
--- a/t/t5402-post-merge-hook.sh
+++ b/t/t5402-post-merge-hook.sh
@@ -16,9 +16,9 @@ test_expect_success setup '
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
- git-clone ./. clone1 &&
+ git clone ./. clone1 &&
GIT_DIR=clone1/.git git update-index --add a &&
- git-clone ./. clone2 &&
+ git clone ./. clone2 &&
GIT_DIR=clone2/.git git update-index --add a
'
diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh
index 823239a251..9b2e1a94c5 100755
--- a/t/t5403-post-checkout-hook.sh
+++ b/t/t5403-post-checkout-hook.sh
@@ -14,8 +14,8 @@ test_expect_success setup '
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
git update-ref refs/heads/master $commit0 &&
- git-clone ./. clone1 &&
- git-clone ./. clone2 &&
+ git clone ./. clone1 &&
+ git clone ./. clone2 &&
GIT_DIR=clone2/.git git branch -a new2 &&
echo Data for commit1. >clone2/b &&
GIT_DIR=clone2/.git git add clone2/b &&
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 362cf7e928..448ec71565 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -58,7 +58,7 @@ pull_to_client () {
cd client
test_expect_success "$number pull" \
- "git-fetch-pack -k -v .. $heads"
+ "git fetch-pack -k -v .. $heads"
case "$heads" in *A*) echo $ATIP > .git/refs/heads/A;; esac
case "$heads" in *B*) echo $BTIP > .git/refs/heads/B;; esac
git symbolic-ref HEAD refs/heads/`echo $heads | sed -e 's/^\(.\).*$/\1/'`
@@ -129,7 +129,7 @@ pull_to_client 2nd "B" $((64*3))
pull_to_client 3rd "A" $((1*3)) # old fails
-test_expect_success "clone shallow" 'git-clone --depth 2 "file://$(pwd)/." shallow'
+test_expect_success "clone shallow" 'git clone --depth 2 "file://$(pwd)/." shallow'
(cd shallow; git count-objects -v) > count.shallow
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index be9ee9326f..c4496635df 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -109,7 +109,7 @@ test_expect_success 'remove remote' '
cat > test/expect << EOF
* remote origin
- URL: $(pwd)/one/.git
+ URL: $(pwd)/one
Remote branch merged with 'git pull' while on branch master
master
New remote branch (next fetch will store in remotes/origin)
@@ -140,7 +140,7 @@ test_expect_success 'show' '
cat > test/expect << EOF
* remote origin
- URL: $(pwd)/one/.git
+ URL: $(pwd)/one
Remote branch merged with 'git pull' while on branch master
master
Tracked remote branches
@@ -169,7 +169,7 @@ test_expect_success 'prune' '
cat > test/expect << EOF
Pruning origin
-URL: $(pwd)/one/.git
+URL: $(pwd)/one
* [would prune] origin/side2
EOF
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 13d1d826c2..de26c20327 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -111,7 +111,7 @@ test_expect_success 'fetch must not resolve short tag name' '
test_expect_success 'fetch must not resolve short remote name' '
cd "$D" &&
- git-update-ref refs/remotes/six/HEAD HEAD
+ git update-ref refs/remotes/six/HEAD HEAD
mkdir six &&
cd six &&
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index 1a15817cd5..f5102b902a 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -34,7 +34,7 @@ test_expect_success 'upload-pack fails due to error in pack-objects' '
! echo "0032want $(git rev-parse HEAD)
00000009done
-0000" | git-upload-pack . > /dev/null 2> output.err &&
+0000" | git upload-pack . > /dev/null 2> output.err &&
grep "pack-objects died" output.err
'
@@ -52,7 +52,7 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
! echo "0032want $(git rev-parse HEAD)
00000009done
-0000" | git-upload-pack . > /dev/null 2> output.err &&
+0000" | git upload-pack . > /dev/null 2> output.err &&
grep "waitpid (async) failed" output.err
'
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 3c013e2b6a..ee06d28649 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -3,9 +3,9 @@
# Copyright (C) 2006 Carl D. Worth <cworth@cworth.org>
#
-test_description='test git-clone to cleanup after failure
+test_description='test git clone to cleanup after failure
-This test covers the fact that if git-clone fails, it should remove
+This test covers the fact that if git clone fails, it should remove
the directory it created, to avoid the user having to manually
remove the directory before attempting a clone again.'
@@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
test_expect_success \
'clone of non-existent source should fail' \
- 'test_must_fail git-clone foo bar'
+ 'test_must_fail git clone foo bar'
test_expect_success \
'failed clone should not leave a directory' \
@@ -25,15 +25,15 @@ test_create_repo foo
# clone doesn't like it if there is no HEAD. Is that a bug?
(cd foo && touch file && git add file && git commit -m 'add file' >/dev/null 2>&1)
-# source repository given to git-clone should be relative to the
+# source repository given to git clone should be relative to the
# current path not to the target dir
test_expect_success \
'clone of non-existent (relative to $PWD) source should fail' \
- 'test_must_fail git-clone ../foo baz'
+ 'test_must_fail git clone ../foo baz'
test_expect_success \
'clone should work now that source exists' \
- 'git-clone foo bar'
+ 'git clone foo bar'
test_expect_success \
'successful clone must leave the directory' \
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 59c65fef28..78a3fa639c 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -107,4 +107,22 @@ test_expect_success 'clone --mirror does not repeat tags' '
'
+test_expect_success 'clone to destination with trailing /' '
+
+ git clone src target-1/ &&
+ T=$( cd target-1 && git rev-parse HEAD ) &&
+ S=$( cd src && git rev-parse HEAD ) &&
+ test "$T" = "$S"
+
+'
+
+test_expect_success 'clone to destination with extra trailing /' '
+
+ git clone src target-2/// &&
+ T=$( cd target-2 && git rev-parse HEAD ) &&
+ S=$( cd src && git rev-parse HEAD ) &&
+ test "$T" = "$S"
+
+'
+
test_done
diff --git a/t/t5602-clone-remote-exec.sh b/t/t5602-clone-remote-exec.sh
index 8367a6845f..82b1d1e2b3 100755
--- a/t/t5602-clone-remote-exec.sh
+++ b/t/t5602-clone-remote-exec.sh
@@ -11,13 +11,13 @@ test_expect_success setup '
chmod +x not_ssh
'
-test_expect_success 'clone calls git-upload-pack unqualified with no -u option' '
+test_expect_success 'clone calls git upload-pack unqualified with no -u option' '
GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk
echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected
test_cmp expected not_ssh_output
'
-test_expect_success 'clone calls specified git-upload-pack with -u option' '
+test_expect_success 'clone calls specified git upload-pack with -u option' '
GIT_SSH=./not_ssh git clone -u /something/bin/git-upload-pack localhost:/path/to/repo junk
echo "localhost /something/bin/git-upload-pack '\''/path/to/repo'\''" >expected
test_cmp expected not_ssh_output
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 9176484db2..86bf7e14ba 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -6,8 +6,8 @@ test_description='git rev-list --pretty=format test'
test_tick
test_expect_success 'setup' '
-touch foo && git add foo && git-commit -m "added foo" &&
- echo changed >foo && git-commit -a -m "changed foo"
+touch foo && git add foo && git commit -m "added foo" &&
+ echo changed >foo && git commit -a -m "changed foo"
'
# usage: test_format name format_string <expected_output
@@ -110,7 +110,7 @@ include an iso8859 character: ¡bueno!
EOF
test_expect_success 'setup complex body' '
git config i18n.commitencoding iso8859-1 &&
- echo change2 >foo && git-commit -a -F commit-msg
+ echo change2 >foo && git commit -a -F commit-msg
'
test_format complex-encoding %e <<'EOF'
@@ -139,6 +139,12 @@ commit 131a310eb913d107dd3c09a65d1651175898735d
commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
EOF
+test_expect_success '%ad respects --date=' '
+ echo 2005-04-07 >expect.ad-short &&
+ git log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&
+ test_cmp expect.ad-short output.ad-short
+'
+
test_expect_success 'empty email' '
test_tick &&
C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
diff --git a/t/t6025-merge-symlinks.sh b/t/t6025-merge-symlinks.sh
index fc58456a11..53892a555c 100755
--- a/t/t6025-merge-symlinks.sh
+++ b/t/t6025-merge-symlinks.sh
@@ -5,7 +5,7 @@
test_description='merging symlinks on filesystem w/o symlink support.
-This tests that git-merge-recursive writes merge results as plain files
+This tests that git merge-recursive writes merge results as plain files
if core.symlinks is false.'
. ./test-lib.sh
@@ -15,25 +15,25 @@ test_expect_success \
git config core.symlinks false &&
> file &&
git add file &&
-git-commit -m initial &&
+git commit -m initial &&
git branch b-symlink &&
git branch b-file &&
-l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
+l=$(echo -n file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
-git-commit -m master &&
-git-checkout b-symlink &&
-l=$(echo -n file-different | git-hash-object -t blob -w --stdin) &&
+git commit -m master &&
+git checkout b-symlink &&
+l=$(echo -n file-different | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
-git-commit -m b-symlink &&
-git-checkout b-file &&
+git commit -m b-symlink &&
+git checkout b-file &&
echo plain-file > symlink &&
git add symlink &&
-git-commit -m b-file'
+git commit -m b-file'
test_expect_success \
'merge master into b-symlink, which has a different symbolic link' '
-git-checkout b-symlink &&
-test_must_fail git-merge master'
+git checkout b-symlink &&
+test_must_fail git merge master'
test_expect_success \
'the merge result must be a file' '
@@ -41,8 +41,8 @@ test -f symlink'
test_expect_success \
'merge master into b-file, which has a file instead of a symbolic link' '
-git-reset --hard && git-checkout b-file &&
-test_must_fail git-merge master'
+git reset --hard && git checkout b-file &&
+test_must_fail git merge master'
test_expect_success \
'the merge result must be a file' '
@@ -50,9 +50,9 @@ test -f symlink'
test_expect_success \
'merge b-file, which has a file instead of a symbolic link, into master' '
-git-reset --hard &&
-git-checkout master &&
-test_must_fail git-merge b-file'
+git reset --hard &&
+git checkout master &&
+test_must_fail git merge b-file'
test_expect_success \
'the merge result must be a file' '
diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh
index 56fc341768..4b423e937d 100755
--- a/t/t6026-merge-attr.sh
+++ b/t/t6026-merge-attr.sh
@@ -106,9 +106,9 @@ test_expect_success 'custom merge backend' '
cmp binary union &&
sed -e 1,3d text >check-1 &&
- o=$(git-unpack-file master^:text) &&
- a=$(git-unpack-file side^:text) &&
- b=$(git-unpack-file master:text) &&
+ o=$(git unpack-file master^:text) &&
+ a=$(git unpack-file side^:text) &&
+ b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
@@ -133,9 +133,9 @@ test_expect_success 'custom merge backend' '
cmp binary union &&
sed -e 1,3d text >check-1 &&
- o=$(git-unpack-file master^:text) &&
- a=$(git-unpack-file anchor:text) &&
- b=$(git-unpack-file master:text) &&
+ o=$(git unpack-file master^:text) &&
+ a=$(git unpack-file anchor:text) &&
+ b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 244fda62a5..36c9a6965f 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -2,7 +2,7 @@
#
# Copyright (c) 2007 Christian Couder
#
-test_description='Tests git-bisect functionality'
+test_description='Tests git bisect functionality'
exec </dev/null
@@ -23,7 +23,7 @@ add_line_into_file()
fi
test_tick
- git-commit --quiet -m "$MSG" $_file
+ git commit --quiet -m "$MSG" $_file
}
HASH1=
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 2fb672c3b4..16cc635813 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -31,57 +31,57 @@ check_describe () {
test_expect_success setup '
test_tick &&
- echo one >file && git add file && git-commit -m initial &&
+ echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&
test_tick &&
- echo two >file && git add file && git-commit -m second &&
+ echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&
test_tick &&
- echo three >file && git add file && git-commit -m third &&
+ echo three >file && git add file && git commit -m third &&
test_tick &&
- echo A >file && git add file && git-commit -m A &&
+ echo A >file && git add file && git commit -m A &&
test_tick &&
- git-tag -a -m A A &&
+ git tag -a -m A A &&
test_tick &&
- echo c >file && git add file && git-commit -m c &&
+ echo c >file && git add file && git commit -m c &&
test_tick &&
- git-tag c &&
+ git tag c &&
git reset --hard $two &&
test_tick &&
- echo B >side && git add side && git-commit -m B &&
+ echo B >side && git add side && git commit -m B &&
test_tick &&
- git-tag -a -m B B &&
+ git tag -a -m B B &&
test_tick &&
- git-merge -m Merged c &&
+ git merge -m Merged c &&
merged=$(git rev-parse HEAD) &&
git reset --hard $two &&
test_tick &&
- echo D >another && git add another && git-commit -m D &&
+ echo D >another && git add another && git commit -m D &&
test_tick &&
- git-tag -a -m D D &&
+ git tag -a -m D D &&
test_tick &&
echo DD >another && git commit -a -m another &&
test_tick &&
- git-tag e &&
+ git tag e &&
test_tick &&
echo DDD >another && git commit -a -m "yet another" &&
test_tick &&
- git-merge -m Merged $merged &&
+ git merge -m Merged $merged &&
test_tick &&
echo X >file && echo X >side && git add file side &&
- git-commit -m x
+ git commit -m x
'
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 8ced59321e..26995b3cdd 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -97,27 +97,27 @@ test_atom tag contents 'Tagging at 1151939927
'
test_expect_success 'Check invalid atoms names are errors' '
- test_must_fail git-for-each-ref --format="%(INVALID)" refs/heads
+ test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
- git-for-each-ref --format="%(authordate)" refs/heads &&
- git-for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
- git-for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
- git-for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
+ git for-each-ref --format="%(authordate)" refs/heads &&
+ git for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
+ git for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
+ git for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
'
test_expect_success 'Check valid format specifiers for date fields' '
- git-for-each-ref --format="%(authordate:default)" refs/heads &&
- git-for-each-ref --format="%(authordate:relative)" refs/heads &&
- git-for-each-ref --format="%(authordate:short)" refs/heads &&
- git-for-each-ref --format="%(authordate:local)" refs/heads &&
- git-for-each-ref --format="%(authordate:iso8601)" refs/heads &&
- git-for-each-ref --format="%(authordate:rfc2822)" refs/heads
+ git for-each-ref --format="%(authordate:default)" refs/heads &&
+ git for-each-ref --format="%(authordate:relative)" refs/heads &&
+ git for-each-ref --format="%(authordate:short)" refs/heads &&
+ git for-each-ref --format="%(authordate:local)" refs/heads &&
+ git for-each-ref --format="%(authordate:iso8601)" refs/heads &&
+ git for-each-ref --format="%(authordate:rfc2822)" refs/heads
'
test_expect_success 'Check invalid format specifiers are errors' '
- test_must_fail git-for-each-ref --format="%(authordate:INVALID)" refs/heads
+ test_must_fail git for-each-ref --format="%(authordate:INVALID)" refs/heads
'
cat >expected <<\EOF
@@ -207,7 +207,7 @@ refs/tags/testtag
EOF
test_expect_success 'Verify ascending sort' '
- git-for-each-ref --format="%(refname)" --sort=refname >actual &&
+ git for-each-ref --format="%(refname)" --sort=refname >actual &&
test_cmp expected actual
'
@@ -218,7 +218,7 @@ refs/heads/master
EOF
test_expect_success 'Verify descending sort' '
- git-for-each-ref --format="%(refname)" --sort=-refname >actual &&
+ git for-each-ref --format="%(refname)" --sort=-refname >actual &&
test_cmp expected actual
'
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 910a28c7e2..66bb1264ff 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -8,7 +8,7 @@ test_expect_success \
'mkdir path0 path1 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
- git-commit -m add -a'
+ git commit -m add -a'
test_expect_success \
'moving the file out of subdirectory' \
@@ -17,7 +17,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
- 'cd .. && git-commit -m move-out -a'
+ 'cd .. && git commit -m move-out -a'
test_expect_success \
'checking the commit' \
@@ -31,7 +31,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
'commiting the change' \
- 'cd .. && git-commit -m move-in -a'
+ 'cd .. && git commit -m move-in -a'
test_expect_success \
'checking the commit' \
@@ -42,7 +42,7 @@ test_expect_success \
'adding another file' \
'cp ../../README path0/README &&
git add path0/README &&
- git-commit -m add2 -a'
+ git commit -m add2 -a'
test_expect_success \
'moving whole subdirectory' \
@@ -50,7 +50,7 @@ test_expect_success \
test_expect_success \
'commiting the change' \
- 'git-commit -m dir-move -a'
+ 'git commit -m dir-move -a'
test_expect_success \
'checking the commit' \
@@ -69,7 +69,7 @@ test_expect_success \
test_expect_success \
'commiting the change' \
- 'git-commit -m dir-move -a'
+ 'git commit -m dir-move -a'
test_expect_success \
'checking the commit' \
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index c8b4f65f38..5e359cb561 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -22,6 +22,7 @@ test_expect_success setup '
mkdir t &&
echo test >t/t &&
git add file x y z t/t &&
+ test_tick &&
git commit -m initial
'
@@ -113,4 +114,54 @@ do
done
+test_expect_success 'log grep setup' '
+ echo a >>file &&
+ test_tick &&
+ GIT_AUTHOR_NAME="With * Asterisk" \
+ GIT_AUTHOR_EMAIL="xyzzy@frotz.com" \
+ git commit -a -m "second" &&
+
+ echo a >>file &&
+ test_tick &&
+ git commit -a -m "third"
+
+'
+
+test_expect_success 'log grep (1)' '
+ git log --author=author --pretty=tformat:%s >actual &&
+ ( echo third ; echo initial ) >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log grep (2)' '
+ git log --author=" * " -F --pretty=tformat:%s >actual &&
+ ( echo second ) >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log grep (3)' '
+ git log --author="^A U" --pretty=tformat:%s >actual &&
+ ( echo third ; echo initial ) >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log grep (4)' '
+ git log --author="frotz\.com>$" --pretty=tformat:%s >actual &&
+ ( echo second ) >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log grep (5)' '
+ git log --author=Thor -F --grep=Thu --pretty=tformat:%s >actual &&
+ ( echo third ; echo initial ) >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'log grep (6)' '
+ git log --author=-0700 --pretty=tformat:%s >actual &&
+ >expect &&
+ test_cmp expect actual
+
+'
+
test_done
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index a0ab096c8f..182aea4267 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-filter-branch'
+test_description='git filter-branch'
. ./test-lib.sh
make_commit () {
@@ -32,14 +32,14 @@ test_expect_success 'setup' '
H=$(git rev-parse H)
test_expect_success 'rewrite identically' '
- git-filter-branch branch
+ git filter-branch branch
'
test_expect_success 'result is really identical' '
test $H = $(git rev-parse HEAD)
'
test_expect_success 'rewrite bare repository identically' '
- (git config core.bare true && cd .git && git-filter-branch branch)
+ (git config core.bare true && cd .git && git filter-branch branch)
'
git config core.bare false
test_expect_success 'result is really identical' '
@@ -47,7 +47,7 @@ test_expect_success 'result is really identical' '
'
test_expect_success 'rewrite, renaming a specific file' '
- git-filter-branch -f --tree-filter "mv d doh || :" HEAD
+ git filter-branch -f --tree-filter "mv d doh || :" HEAD
'
test_expect_success 'test that the file was renamed' '
@@ -58,7 +58,7 @@ test_expect_success 'test that the file was renamed' '
'
test_expect_success 'rewrite, renaming a specific directory' '
- git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
+ git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
'
test_expect_success 'test that the directory was renamed' '
@@ -73,7 +73,7 @@ test_expect_success 'test that the directory was renamed' '
git tag oldD HEAD~4
test_expect_success 'rewrite one branch, keeping a side branch' '
git branch modD oldD &&
- git-filter-branch -f --tree-filter "mv b boh || :" D..modD
+ git filter-branch -f --tree-filter "mv b boh || :" D..modD
'
test_expect_success 'common ancestor is still common (unchanged)' '
@@ -96,7 +96,7 @@ test_expect_success 'filter subdirectory only' '
test_tick &&
git commit -m "again not subdir" &&
git branch sub &&
- git-filter-branch -f --subdirectory-filter subdir refs/heads/sub
+ git filter-branch -f --subdirectory-filter subdir refs/heads/sub
'
test_expect_success 'subdirectory filter result looks okay' '
@@ -120,7 +120,7 @@ test_expect_success 'more setup' '
test_expect_success 'use index-filter to move into a subdirectory' '
git branch directorymoved &&
- git-filter-branch -f --index-filter \
+ git filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
@@ -129,7 +129,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
test_expect_success 'stops when msg filter fails' '
old=$(git rev-parse HEAD) &&
- test_must_fail git-filter-branch -f --msg-filter false HEAD &&
+ test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
'
@@ -140,7 +140,7 @@ test_expect_success 'author information is preserved' '
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
- git-filter-branch -f --msg-filter "cat; \
+ git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author &&
@@ -152,7 +152,7 @@ test_expect_success "remove a certain author's commits" '
test_tick &&
git commit -m i i &&
git branch removed-author &&
- git-filter-branch -f --commit-filter "\
+ git filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
then\
skip_commit \"\$@\";
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 8d44c2ed1f..33cde70595 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Carlos Rica
#
-test_description='git-tag
+test_description='git tag
Tests for operations with tags.'
@@ -22,25 +22,25 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
'
test_expect_success 'listing all tags in an empty tree should output nothing' '
- test `git-tag -l | wc -l` -eq 0 &&
- test `git-tag | wc -l` -eq 0
+ test `git tag -l | wc -l` -eq 0 &&
+ test `git tag | wc -l` -eq 0
'
test_expect_success 'looking for a tag in an empty tree should fail' \
'! (tag_exists mytag)'
test_expect_success 'creating a tag in an empty tree should fail' '
- test_must_fail git-tag mynotag &&
+ test_must_fail git tag mynotag &&
! tag_exists mynotag
'
test_expect_success 'creating a tag for HEAD in an empty tree should fail' '
- test_must_fail git-tag mytaghead HEAD &&
+ test_must_fail git tag mytaghead HEAD &&
! tag_exists mytaghead
'
test_expect_success 'creating a tag for an unknown revision should fail' '
- test_must_fail git-tag mytagnorev aaaaaaaaaaa &&
+ test_must_fail git tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
'
@@ -54,32 +54,32 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
'
test_expect_success 'listing all tags if one exists should succeed' '
- git-tag -l &&
- git-tag
+ git tag -l &&
+ git tag
'
test_expect_success 'listing all tags if one exists should output that tag' '
- test `git-tag -l` = mytag &&
- test `git-tag` = mytag
+ test `git tag -l` = mytag &&
+ test `git tag` = mytag
'
# pattern matching:
test_expect_success 'listing a tag using a matching pattern should succeed' \
- 'git-tag -l mytag'
+ 'git tag -l mytag'
test_expect_success \
'listing a tag using a matching pattern should output that tag' \
- 'test `git-tag -l mytag` = mytag'
+ 'test `git tag -l mytag` = mytag'
# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
'listing tags using a non-matching pattern should suceed' \
- 'git-tag -l xxx'
+ 'git tag -l xxx'
test_expect_success \
'listing tags using a non-matching pattern should output nothing' \
- 'test `git-tag -l xxx | wc -l` -eq 0'
+ 'test `git tag -l xxx | wc -l` -eq 0'
# special cases for creating tags:
@@ -89,13 +89,13 @@ test_expect_success \
test_expect_success \
'trying to create a tag with a non-valid name should fail' '
- test `git-tag -l | wc -l` -eq 1 &&
+ test `git tag -l | wc -l` -eq 1 &&
test_must_fail git tag "" &&
test_must_fail git tag .othertag &&
test_must_fail git tag "other tag" &&
test_must_fail git tag "othertag^" &&
test_must_fail git tag "other~tag" &&
- test `git-tag -l | wc -l` -eq 1
+ test `git tag -l | wc -l` -eq 1
'
test_expect_success 'creating a tag using HEAD directly should succeed' '
@@ -107,7 +107,7 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
test_expect_success 'trying to delete an unknown tag should fail' '
! tag_exists unknown-tag &&
- test_must_fail git-tag -d unknown-tag
+ test_must_fail git tag -d unknown-tag
'
cat >expect <<EOF
@@ -117,7 +117,7 @@ EOF
test_expect_success \
'trying to delete tags without params should succeed and do nothing' '
git tag -l > actual && test_cmp expect actual &&
- git-tag -d &&
+ git tag -d &&
git tag -l > actual && test_cmp expect actual
'
@@ -125,7 +125,7 @@ test_expect_success \
'deleting two existing tags in one command should succeed' '
tag_exists mytag &&
tag_exists myhead &&
- git-tag -d mytag myhead &&
+ git tag -d mytag myhead &&
! tag_exists mytag &&
! tag_exists myhead
'
@@ -133,7 +133,7 @@ test_expect_success \
test_expect_success \
'creating a tag with the name of another deleted one should succeed' '
! tag_exists mytag &&
- git-tag mytag &&
+ git tag mytag &&
tag_exists mytag
'
@@ -141,13 +141,13 @@ test_expect_success \
'trying to delete two tags, existing and not, should fail in the 2nd' '
tag_exists mytag &&
! tag_exists myhead &&
- test_must_fail git-tag -d mytag anothertag &&
+ test_must_fail git tag -d mytag anothertag &&
! tag_exists mytag &&
! tag_exists myhead
'
test_expect_success 'trying to delete an already deleted tag should fail' \
- 'test_must_fail git-tag -d mytag'
+ 'test_must_fail git tag -d mytag'
# listing various tags with pattern matching:
@@ -185,7 +185,7 @@ cba
EOF
test_expect_success \
'listing tags with substring as pattern must print those matching' '
- git-tag -l "*a*" > actual &&
+ git tag -l "*a*" > actual &&
test_cmp expect actual
'
@@ -195,7 +195,7 @@ v1.0.1
EOF
test_expect_success \
'listing tags with a suffix as pattern must print those matching' '
- git-tag -l "*.1" > actual &&
+ git tag -l "*.1" > actual &&
test_cmp expect actual
'
@@ -205,7 +205,7 @@ t211
EOF
test_expect_success \
'listing tags with a prefix as pattern must print those matching' '
- git-tag -l "t21*" > actual &&
+ git tag -l "t21*" > actual &&
test_cmp expect actual
'
@@ -214,7 +214,7 @@ a1
EOF
test_expect_success \
'listing tags using a name as pattern must print that one matching' '
- git-tag -l a1 > actual &&
+ git tag -l a1 > actual &&
test_cmp expect actual
'
@@ -223,7 +223,7 @@ v1.0
EOF
test_expect_success \
'listing tags using a name as pattern must print that one matching' '
- git-tag -l v1.0 > actual &&
+ git tag -l v1.0 > actual &&
test_cmp expect actual
'
@@ -233,14 +233,14 @@ v1.1.3
EOF
test_expect_success \
'listing tags with ? in the pattern should print those matching' '
- git-tag -l "v1.?.?" > actual &&
+ git tag -l "v1.?.?" > actual &&
test_cmp expect actual
'
>expect
test_expect_success \
'listing tags using v.* should print nothing because none have v.' '
- git-tag -l "v.*" > actual &&
+ git tag -l "v.*" > actual &&
test_cmp expect actual
'
@@ -252,7 +252,7 @@ v1.1.3
EOF
test_expect_success \
'listing tags using v* should print only those having v' '
- git-tag -l "v*" > actual &&
+ git tag -l "v*" > actual &&
test_cmp expect actual
'
@@ -260,21 +260,21 @@ test_expect_success \
test_expect_success \
'a non-annotated tag created without parameters should point to HEAD' '
- git-tag non-annotated-tag &&
+ git tag non-annotated-tag &&
test $(git cat-file -t non-annotated-tag) = commit &&
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
'
test_expect_success 'trying to verify an unknown tag should fail' \
- 'test_must_fail git-tag -v unknown-tag'
+ 'test_must_fail git tag -v unknown-tag'
test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
- 'test_must_fail git-tag -v non-annotated-tag'
+ 'test_must_fail git tag -v non-annotated-tag'
test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
- 'test_must_fail git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
+ 'test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2'
# creating annotated tags:
@@ -300,7 +300,7 @@ get_tag_header annotated-tag $commit commit $time >expect
echo "A message" >>expect
test_expect_success \
'creating an annotated tag with -m message should succeed' '
- git-tag -m "A message" annotated-tag &&
+ git tag -m "A message" annotated-tag &&
get_tag_msg annotated-tag >actual &&
test_cmp expect actual
'
@@ -313,7 +313,7 @@ get_tag_header file-annotated-tag $commit commit $time >expect
cat msgfile >>expect
test_expect_success \
'creating an annotated tag with -F messagefile should succeed' '
- git-tag -F msgfile file-annotated-tag &&
+ git tag -F msgfile file-annotated-tag &&
get_tag_msg file-annotated-tag >actual &&
test_cmp expect actual
'
@@ -325,7 +325,7 @@ EOF
get_tag_header stdin-annotated-tag $commit commit $time >expect
cat inputmsg >>expect
test_expect_success 'creating an annotated tag with -F - should succeed' '
- git-tag -F - stdin-annotated-tag <inputmsg &&
+ git tag -F - stdin-annotated-tag <inputmsg &&
get_tag_msg stdin-annotated-tag >actual &&
test_cmp expect actual
'
@@ -334,7 +334,7 @@ test_expect_success \
'trying to create a tag with a non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists notag &&
- test_must_fail git-tag -F nonexistingfile notag &&
+ test_must_fail git tag -F nonexistingfile notag &&
! tag_exists notag
'
@@ -343,11 +343,11 @@ test_expect_success \
echo "message file 1" >msgfile1 &&
echo "message file 2" >msgfile2 &&
! tag_exists msgtag &&
- test_must_fail git-tag -m "message 1" -F msgfile1 msgtag &&
+ test_must_fail git tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
- test_must_fail git-tag -F msgfile1 -m "message 1" msgtag &&
+ test_must_fail git tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
- test_must_fail git-tag -m "message 1" -F msgfile1 \
+ test_must_fail git tag -m "message 1" -F msgfile1 \
-m "message 2" msgtag &&
! tag_exists msgtag
'
@@ -357,7 +357,7 @@ test_expect_success \
get_tag_header empty-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with an empty -m message should succeed' '
- git-tag -m "" empty-annotated-tag &&
+ git tag -m "" empty-annotated-tag &&
get_tag_msg empty-annotated-tag >actual &&
test_cmp expect actual
'
@@ -366,7 +366,7 @@ test_expect_success \
get_tag_header emptyfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with an empty -F messagefile should succeed' '
- git-tag -F emptyfile emptyfile-annotated-tag &&
+ git tag -F emptyfile emptyfile-annotated-tag &&
get_tag_msg emptyfile-annotated-tag >actual &&
test_cmp expect actual
'
@@ -387,7 +387,7 @@ Trailing blank lines
EOF
test_expect_success \
'extra blanks in the message for an annotated tag should be removed' '
- git-tag -F blanksfile blanks-annotated-tag &&
+ git tag -F blanksfile blanks-annotated-tag &&
get_tag_msg blanks-annotated-tag >actual &&
test_cmp expect actual
'
@@ -395,7 +395,7 @@ test_expect_success \
get_tag_header blank-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with blank -m message with spaces should succeed' '
- git-tag -m " " blank-annotated-tag &&
+ git tag -m " " blank-annotated-tag &&
get_tag_msg blank-annotated-tag >actual &&
test_cmp expect actual
'
@@ -406,7 +406,7 @@ echo ' ' >>blankfile
get_tag_header blankfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with blank -F messagefile with spaces should succeed' '
- git-tag -F blankfile blankfile-annotated-tag &&
+ git tag -F blankfile blankfile-annotated-tag &&
get_tag_msg blankfile-annotated-tag >actual &&
test_cmp expect actual
'
@@ -415,7 +415,7 @@ printf ' ' >blanknonlfile
get_tag_header blanknonlfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with -F file of spaces and no newline should succeed' '
- git-tag -F blanknonlfile blanknonlfile-annotated-tag &&
+ git tag -F blanknonlfile blanknonlfile-annotated-tag &&
get_tag_msg blanknonlfile-annotated-tag >actual &&
test_cmp expect actual
'
@@ -450,7 +450,7 @@ Last line.
EOF
test_expect_success \
'creating a tag using a -F messagefile with #comments should succeed' '
- git-tag -F commentsfile comments-annotated-tag &&
+ git tag -F commentsfile comments-annotated-tag &&
get_tag_msg comments-annotated-tag >actual &&
test_cmp expect actual
'
@@ -458,7 +458,7 @@ test_expect_success \
get_tag_header comment-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with a #comment in the -m message should succeed' '
- git-tag -m "#comment" comment-annotated-tag &&
+ git tag -m "#comment" comment-annotated-tag &&
get_tag_msg comment-annotated-tag >actual &&
test_cmp expect actual
'
@@ -469,7 +469,7 @@ echo '####' >>commentfile
get_tag_header commentfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with #comments in the -F messagefile should succeed' '
- git-tag -F commentfile commentfile-annotated-tag &&
+ git tag -F commentfile commentfile-annotated-tag &&
get_tag_msg commentfile-annotated-tag >actual &&
test_cmp expect actual
'
@@ -478,7 +478,7 @@ printf '#comment' >commentnonlfile
get_tag_header commentnonlfile-annotated-tag $commit commit $time >expect
test_expect_success \
'creating a tag with a file of #comment and no newline should succeed' '
- git-tag -F commentnonlfile commentnonlfile-annotated-tag &&
+ git tag -F commentnonlfile commentnonlfile-annotated-tag &&
get_tag_msg commentnonlfile-annotated-tag >actual &&
test_cmp expect actual
'
@@ -487,51 +487,51 @@ test_expect_success \
test_expect_success \
'listing the one-line message of a non-signed tag should succeed' '
- git-tag -m "A msg" tag-one-line &&
+ git tag -m "A msg" tag-one-line &&
echo "tag-one-line" >expect &&
- git-tag -l | grep "^tag-one-line" >actual &&
+ git tag -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-one-line" >actual &&
+ git tag -n0 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-one-line >actual &&
+ git tag -n0 -l tag-one-line >actual &&
test_cmp expect actual &&
echo "tag-one-line A msg" >expect &&
- git-tag -n1 -l | grep "^tag-one-line" >actual &&
+ git tag -n1 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-one-line" >actual &&
+ git tag -n -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-one-line >actual &&
+ git tag -n1 -l tag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-one-line >actual &&
+ git tag -n2 -l tag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n999 -l tag-one-line >actual &&
+ git tag -n999 -l tag-one-line >actual &&
test_cmp expect actual
'
test_expect_success \
'listing the zero-lines message of a non-signed tag should succeed' '
- git-tag -m "" tag-zero-lines &&
+ git tag -m "" tag-zero-lines &&
echo "tag-zero-lines" >expect &&
- git-tag -l | grep "^tag-zero-lines" >actual &&
+ git tag -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-zero-lines" >actual &&
+ git tag -n0 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-zero-lines >actual &&
+ git tag -n0 -l tag-zero-lines >actual &&
test_cmp expect actual &&
echo "tag-zero-lines " >expect &&
- git-tag -n1 -l | grep "^tag-zero-lines" >actual &&
+ git tag -n1 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-zero-lines" >actual &&
+ git tag -n -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-zero-lines >actual &&
+ git tag -n1 -l tag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-zero-lines >actual &&
+ git tag -n2 -l tag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n999 -l tag-zero-lines >actual &&
+ git tag -n999 -l tag-zero-lines >actual &&
test_cmp expect actual
'
@@ -540,42 +540,42 @@ echo 'tag line two' >>annotagmsg
echo 'tag line three' >>annotagmsg
test_expect_success \
'listing many message lines of a non-signed tag should succeed' '
- git-tag -F annotagmsg tag-lines &&
+ git tag -F annotagmsg tag-lines &&
echo "tag-lines" >expect &&
- git-tag -l | grep "^tag-lines" >actual &&
+ git tag -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^tag-lines" >actual &&
+ git tag -n0 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l tag-lines >actual &&
+ git tag -n0 -l tag-lines >actual &&
test_cmp expect actual &&
echo "tag-lines tag line one" >expect &&
- git-tag -n1 -l | grep "^tag-lines" >actual &&
+ git tag -n1 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^tag-lines" >actual &&
+ git tag -n -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l tag-lines >actual &&
+ git tag -n1 -l tag-lines >actual &&
test_cmp expect actual &&
echo " tag line two" >>expect &&
- git-tag -n2 -l | grep "^ *tag.line" >actual &&
+ git tag -n2 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n2 -l tag-lines >actual &&
+ git tag -n2 -l tag-lines >actual &&
test_cmp expect actual &&
echo " tag line three" >>expect &&
- git-tag -n3 -l | grep "^ *tag.line" >actual &&
+ git tag -n3 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n3 -l tag-lines >actual &&
+ git tag -n3 -l tag-lines >actual &&
test_cmp expect actual &&
- git-tag -n4 -l | grep "^ *tag.line" >actual &&
+ git tag -n4 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n4 -l tag-lines >actual &&
+ git tag -n4 -l tag-lines >actual &&
test_cmp expect actual &&
- git-tag -n99 -l | grep "^ *tag.line" >actual &&
+ git tag -n99 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
- git-tag -n99 -l tag-lines >actual &&
+ git tag -n99 -l tag-lines >actual &&
test_cmp expect actual
'
@@ -592,19 +592,19 @@ fi
test_expect_success \
'trying to verify an annotated non-signed tag should fail' '
tag_exists annotated-tag &&
- test_must_fail git-tag -v annotated-tag
+ test_must_fail git tag -v annotated-tag
'
test_expect_success \
'trying to verify a file-annotated non-signed tag should fail' '
tag_exists file-annotated-tag &&
- test_must_fail git-tag -v file-annotated-tag
+ test_must_fail git tag -v file-annotated-tag
'
test_expect_success \
'trying to verify two annotated non-signed tags should fail' '
tag_exists annotated-tag file-annotated-tag &&
- test_must_fail git-tag -v annotated-tag file-annotated-tag
+ test_must_fail git tag -v annotated-tag file-annotated-tag
'
# creating and verifying signed tags:
@@ -634,7 +634,7 @@ get_tag_header signed-tag $commit commit $time >expect
echo 'A signed tag message' >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -m message should succeed' '
- git-tag -s -m "A signed tag message" signed-tag &&
+ git tag -s -m "A signed tag message" signed-tag &&
get_tag_msg signed-tag >actual &&
test_cmp expect actual
'
@@ -675,7 +675,7 @@ get_tag_header implied-sign $commit commit $time >expect
./fakeeditor >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-u implies signed tag' '
- GIT_EDITOR=./fakeeditor git-tag -u CDDE430D implied-sign &&
+ GIT_EDITOR=./fakeeditor git tag -u CDDE430D implied-sign &&
get_tag_msg implied-sign >actual &&
test_cmp expect actual
'
@@ -689,7 +689,7 @@ cat sigmsgfile >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with -F messagefile should succeed' '
- git-tag -s -F sigmsgfile file-signed-tag &&
+ git tag -s -F sigmsgfile file-signed-tag &&
get_tag_msg file-signed-tag >actual &&
test_cmp expect actual
'
@@ -702,7 +702,7 @@ get_tag_header stdin-signed-tag $commit commit $time >expect
cat siginputmsg >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success 'creating a signed tag with -F - should succeed' '
- git-tag -s -F - stdin-signed-tag <siginputmsg &&
+ git tag -s -F - stdin-signed-tag <siginputmsg &&
get_tag_msg stdin-signed-tag >actual &&
test_cmp expect actual
'
@@ -711,7 +711,7 @@ get_tag_header implied-annotate $commit commit $time >expect
./fakeeditor >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success '-s implies annotated tag' '
- GIT_EDITOR=./fakeeditor git-tag -s implied-annotate &&
+ GIT_EDITOR=./fakeeditor git tag -s implied-annotate &&
get_tag_msg implied-annotate >actual &&
test_cmp expect actual
'
@@ -720,23 +720,23 @@ test_expect_success \
'trying to create a signed tag with non-existing -F file should fail' '
! test -f nonexistingfile &&
! tag_exists nosigtag &&
- test_must_fail git-tag -s -F nonexistingfile nosigtag &&
+ test_must_fail git tag -s -F nonexistingfile nosigtag &&
! tag_exists nosigtag
'
test_expect_success 'verifying a signed tag should succeed' \
- 'git-tag -v signed-tag'
+ 'git tag -v signed-tag'
test_expect_success 'verifying two signed tags in one command should succeed' \
- 'git-tag -v signed-tag file-signed-tag'
+ 'git tag -v signed-tag file-signed-tag'
test_expect_success \
'verifying many signed and non-signed tags should fail' '
- test_must_fail git-tag -v signed-tag annotated-tag &&
- test_must_fail git-tag -v file-annotated-tag file-signed-tag &&
- test_must_fail git-tag -v annotated-tag \
+ test_must_fail git tag -v signed-tag annotated-tag &&
+ test_must_fail git tag -v file-annotated-tag file-signed-tag &&
+ test_must_fail git tag -v annotated-tag \
file-signed-tag file-annotated-tag &&
- test_must_fail git-tag -v signed-tag annotated-tag file-signed-tag
+ test_must_fail git tag -v signed-tag annotated-tag file-signed-tag
'
test_expect_success 'verifying a forged tag should fail' '
@@ -744,7 +744,7 @@ test_expect_success 'verifying a forged tag should fail' '
sed -e "s/signed-tag/forged-tag/" |
git mktag) &&
git tag forged-tag $forged &&
- test_must_fail git-tag -v forged-tag
+ test_must_fail git tag -v forged-tag
'
# blank and empty messages for signed tags:
@@ -753,10 +753,10 @@ get_tag_header empty-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with an empty -m message should succeed' '
- git-tag -s -m "" empty-signed-tag &&
+ git tag -s -m "" empty-signed-tag &&
get_tag_msg empty-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v empty-signed-tag
+ git tag -v empty-signed-tag
'
>sigemptyfile
@@ -764,10 +764,10 @@ get_tag_header emptyfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with an empty -F messagefile should succeed' '
- git-tag -s -F sigemptyfile emptyfile-signed-tag &&
+ git tag -s -F sigemptyfile emptyfile-signed-tag &&
get_tag_msg emptyfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v emptyfile-signed-tag
+ git tag -v emptyfile-signed-tag
'
printf '\n\n \n\t\nLeading blank lines\n' > sigblanksfile
@@ -787,20 +787,20 @@ EOF
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'extra blanks in the message for a signed tag should be removed' '
- git-tag -s -F sigblanksfile blanks-signed-tag &&
+ git tag -s -F sigblanksfile blanks-signed-tag &&
get_tag_msg blanks-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blanks-signed-tag
+ git tag -v blanks-signed-tag
'
get_tag_header blank-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a blank -m message should succeed' '
- git-tag -s -m " " blank-signed-tag &&
+ git tag -s -m " " blank-signed-tag &&
get_tag_msg blank-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blank-signed-tag
+ git tag -v blank-signed-tag
'
echo ' ' >sigblankfile
@@ -810,10 +810,10 @@ get_tag_header blankfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with blank -F file with spaces should succeed' '
- git-tag -s -F sigblankfile blankfile-signed-tag &&
+ git tag -s -F sigblankfile blankfile-signed-tag &&
get_tag_msg blankfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v blankfile-signed-tag
+ git tag -v blankfile-signed-tag
'
printf ' ' >sigblanknonlfile
@@ -821,10 +821,10 @@ get_tag_header blanknonlfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with spaces and no newline should succeed' '
- git-tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
+ git tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
get_tag_msg blanknonlfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v signed-tag
+ git tag -v signed-tag
'
# messages with commented lines for signed tags:
@@ -858,20 +858,20 @@ EOF
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a -F file with #comments should succeed' '
- git-tag -s -F sigcommentsfile comments-signed-tag &&
+ git tag -s -F sigcommentsfile comments-signed-tag &&
get_tag_msg comments-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v comments-signed-tag
+ git tag -v comments-signed-tag
'
get_tag_header comment-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with #commented -m message should succeed' '
- git-tag -s -m "#comment" comment-signed-tag &&
+ git tag -s -m "#comment" comment-signed-tag &&
get_tag_msg comment-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v comment-signed-tag
+ git tag -v comment-signed-tag
'
echo '#comment' >sigcommentfile
@@ -881,10 +881,10 @@ get_tag_header commentfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with #commented -F messagefile should succeed' '
- git-tag -s -F sigcommentfile commentfile-signed-tag &&
+ git tag -s -F sigcommentfile commentfile-signed-tag &&
get_tag_msg commentfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v commentfile-signed-tag
+ git tag -v commentfile-signed-tag
'
printf '#comment' >sigcommentnonlfile
@@ -892,61 +892,61 @@ get_tag_header commentnonlfile-signed-tag $commit commit $time >expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag with a #comment and no newline should succeed' '
- git-tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
+ git tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
get_tag_msg commentnonlfile-signed-tag >actual &&
test_cmp expect actual &&
- git-tag -v commentnonlfile-signed-tag
+ git tag -v commentnonlfile-signed-tag
'
# listing messages for signed tags:
test_expect_success \
'listing the one-line message of a signed tag should succeed' '
- git-tag -s -m "A message line signed" stag-one-line &&
+ git tag -s -m "A message line signed" stag-one-line &&
echo "stag-one-line" >expect &&
- git-tag -l | grep "^stag-one-line" >actual &&
+ git tag -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-one-line" >actual &&
+ git tag -n0 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-one-line >actual &&
+ git tag -n0 -l stag-one-line >actual &&
test_cmp expect actual &&
echo "stag-one-line A message line signed" >expect &&
- git-tag -n1 -l | grep "^stag-one-line" >actual &&
+ git tag -n1 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-one-line" >actual &&
+ git tag -n -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-one-line >actual &&
+ git tag -n1 -l stag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-one-line >actual &&
+ git tag -n2 -l stag-one-line >actual &&
test_cmp expect actual &&
- git-tag -n999 -l stag-one-line >actual &&
+ git tag -n999 -l stag-one-line >actual &&
test_cmp expect actual
'
test_expect_success \
'listing the zero-lines message of a signed tag should succeed' '
- git-tag -s -m "" stag-zero-lines &&
+ git tag -s -m "" stag-zero-lines &&
echo "stag-zero-lines" >expect &&
- git-tag -l | grep "^stag-zero-lines" >actual &&
+ git tag -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-zero-lines" >actual &&
+ git tag -n0 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-zero-lines >actual &&
+ git tag -n0 -l stag-zero-lines >actual &&
test_cmp expect actual &&
echo "stag-zero-lines " >expect &&
- git-tag -n1 -l | grep "^stag-zero-lines" >actual &&
+ git tag -n1 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-zero-lines" >actual &&
+ git tag -n -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-zero-lines >actual &&
+ git tag -n1 -l stag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-zero-lines >actual &&
+ git tag -n2 -l stag-zero-lines >actual &&
test_cmp expect actual &&
- git-tag -n999 -l stag-zero-lines >actual &&
+ git tag -n999 -l stag-zero-lines >actual &&
test_cmp expect actual
'
@@ -955,42 +955,42 @@ echo 'stag line two' >>sigtagmsg
echo 'stag line three' >>sigtagmsg
test_expect_success \
'listing many message lines of a signed tag should succeed' '
- git-tag -s -F sigtagmsg stag-lines &&
+ git tag -s -F sigtagmsg stag-lines &&
echo "stag-lines" >expect &&
- git-tag -l | grep "^stag-lines" >actual &&
+ git tag -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l | grep "^stag-lines" >actual &&
+ git tag -n0 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n0 -l stag-lines >actual &&
+ git tag -n0 -l stag-lines >actual &&
test_cmp expect actual &&
echo "stag-lines stag line one" >expect &&
- git-tag -n1 -l | grep "^stag-lines" >actual &&
+ git tag -n1 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n -l | grep "^stag-lines" >actual &&
+ git tag -n -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
- git-tag -n1 -l stag-lines >actual &&
+ git tag -n1 -l stag-lines >actual &&
test_cmp expect actual &&
echo " stag line two" >>expect &&
- git-tag -n2 -l | grep "^ *stag.line" >actual &&
+ git tag -n2 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n2 -l stag-lines >actual &&
+ git tag -n2 -l stag-lines >actual &&
test_cmp expect actual &&
echo " stag line three" >>expect &&
- git-tag -n3 -l | grep "^ *stag.line" >actual &&
+ git tag -n3 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n3 -l stag-lines >actual &&
+ git tag -n3 -l stag-lines >actual &&
test_cmp expect actual &&
- git-tag -n4 -l | grep "^ *stag.line" >actual &&
+ git tag -n4 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n4 -l stag-lines >actual &&
+ git tag -n4 -l stag-lines >actual &&
test_cmp expect actual &&
- git-tag -n99 -l | grep "^ *stag.line" >actual &&
+ git tag -n99 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
- git-tag -n99 -l stag-lines >actual &&
+ git tag -n99 -l stag-lines >actual &&
test_cmp expect actual
'
@@ -1005,7 +1005,7 @@ echo "A message for a tree" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to a tree should succeed' '
- git-tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
+ git tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
get_tag_msg tree-signed-tag >actual &&
test_cmp expect actual
'
@@ -1015,7 +1015,7 @@ echo "A message for a blob" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to a blob should succeed' '
- git-tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
+ git tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
get_tag_msg blob-signed-tag >actual &&
test_cmp expect actual
'
@@ -1025,7 +1025,7 @@ echo "A message for another tag" >>expect
echo '-----BEGIN PGP SIGNATURE-----' >>expect
test_expect_success \
'creating a signed tag pointing to another tag should succeed' '
- git-tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
+ git tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
get_tag_msg tag-signed-tag >actual &&
test_cmp expect actual
'
@@ -1033,7 +1033,7 @@ test_expect_success \
# try to sign with bad user.signingkey
git config user.signingkey BobTheMouse
test_expect_success \
- 'git-tag -s fails if gpg is misconfigured' \
+ 'git tag -s fails if gpg is misconfigured' \
'test_must_fail git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey
@@ -1042,10 +1042,10 @@ git config --unset user.signingkey
rm -rf gpghome
test_expect_success \
'verify signed tag fails when public key is not present' \
- 'test_must_fail git-tag -v signed-tag'
+ 'test_must_fail git tag -v signed-tag'
test_expect_success \
- 'git-tag -a fails if tag annotation is empty' '
+ 'git tag -a fails if tag annotation is empty' '
! (GIT_EDITOR=cat git tag -a initial-comment)
'
diff --git a/t/t7101-reset.sh b/t/t7101-reset.sh
index 0d9874bfd7..c4ef19e402 100755
--- a/t/t7101-reset.sh
+++ b/t/t7101-reset.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2006 Shawn Pearce
#
-test_description='git-reset should cull empty subdirs'
+test_description='git reset should cull empty subdirs'
. ./test-lib.sh
test_expect_success \
@@ -11,7 +11,7 @@ test_expect_success \
'mkdir path0 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
- git-commit -m add -a'
+ git commit -m add -a'
test_expect_success \
'creating second files' \
@@ -25,11 +25,11 @@ test_expect_success \
git add path1/COPYING &&
git add COPYING &&
git add path0/COPYING-TOO &&
- git-commit -m change -a'
+ git commit -m change -a'
test_expect_success \
'resetting tree HEAD^' \
- 'git-reset --hard HEAD^'
+ 'git reset --hard HEAD^'
test_expect_success \
'checking initial files exist after rewind' \
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 29f5678b4c..e637c7d4db 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -3,9 +3,9 @@
# Copyright (c) 2007 Carlos Rica
#
-test_description='git-reset
+test_description='git reset
-Documented tests for git-reset'
+Documented tests for git reset'
. ./test-lib.sh
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index cdecebe456..42bf518c68 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-reset in a bare repository'
+test_description='git reset in a bare repository'
. ./test-lib.sh
test_expect_success 'setup non-bare' '
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 9ad5d635a2..fbec70d3c6 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2006 Junio C Hamano
#
-test_description='git-checkout tests.
+test_description='git checkout tests.
Creates master, forks renamer and side branches from it.
Test switching across them.
@@ -337,4 +337,26 @@ test_expect_success \
test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
test_must_fail git checkout --track -b track'
+test_expect_success 'checkout an unmerged path should fail' '
+ rm -f .git/index &&
+ O=$(echo original | git hash-object -w --stdin) &&
+ A=$(echo ourside | git hash-object -w --stdin) &&
+ B=$(echo theirside | git hash-object -w --stdin) &&
+ (
+ echo "100644 $A 0 fild" &&
+ echo "100644 $O 1 file" &&
+ echo "100644 $A 2 file" &&
+ echo "100644 $B 3 file" &&
+ echo "100644 $A 0 filf"
+ ) | git update-index --index-info &&
+ echo "none of the above" >sample &&
+ cat sample >fild &&
+ cat sample >file &&
+ cat sample >filf &&
+ test_must_fail git checkout fild file filf &&
+ test_cmp sample fild &&
+ test_cmp sample filf &&
+ test_cmp sample file
+'
+
test_done
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 2b51c0d7d8..1636fac2a4 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Michael Spang
#
-test_description='git-clean basic tests'
+test_description='git clean basic tests'
. ./test-lib.sh
@@ -16,17 +16,17 @@ test_expect_success 'setup' '
echo build >.gitignore &&
echo \*.o >>.gitignore &&
git add . &&
- git-commit -m setup &&
+ git commit -m setup &&
touch src/part2.c README &&
git add .
'
-test_expect_success 'git-clean' '
+test_expect_success 'git clean' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean &&
+ git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -39,11 +39,11 @@ test_expect_success 'git-clean' '
'
-test_expect_success 'git-clean src/' '
+test_expect_success 'git clean src/' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean src/ &&
+ git clean src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -56,11 +56,11 @@ test_expect_success 'git-clean src/' '
'
-test_expect_success 'git-clean src/ src/' '
+test_expect_success 'git clean src/ src/' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean src/ src/ &&
+ git clean src/ src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -73,11 +73,11 @@ test_expect_success 'git-clean src/ src/' '
'
-test_expect_success 'git-clean with prefix' '
+test_expect_success 'git clean with prefix' '
mkdir -p build docs src/test &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so src/test/1.c &&
- (cd src/ && git-clean) &&
+ (cd src/ && git clean) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -91,7 +91,7 @@ test_expect_success 'git-clean with prefix' '
'
-test_expect_success 'git-clean with relative prefix' '
+test_expect_success 'git clean with relative prefix' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -106,7 +106,7 @@ test_expect_success 'git-clean with relative prefix' '
}
'
-test_expect_success 'git-clean with absolute path' '
+test_expect_success 'git clean with absolute path' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -121,7 +121,7 @@ test_expect_success 'git-clean with absolute path' '
}
'
-test_expect_success 'git-clean with out of work tree relative path' '
+test_expect_success 'git clean with out of work tree relative path' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -131,7 +131,7 @@ test_expect_success 'git-clean with out of work tree relative path' '
)
'
-test_expect_success 'git-clean with out of work tree absolute path' '
+test_expect_success 'git clean with out of work tree absolute path' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
@@ -142,11 +142,11 @@ test_expect_success 'git-clean with out of work tree absolute path' '
)
'
-test_expect_success 'git-clean -d with prefix and path' '
+test_expect_success 'git clean -d with prefix and path' '
mkdir -p build docs src/feature &&
touch a.out src/part3.c src/feature/file.c docs/manual.txt obj.o build/lib.so &&
- (cd src/ && git-clean -d feature/) &&
+ (cd src/ && git clean -d feature/) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -160,12 +160,12 @@ test_expect_success 'git-clean -d with prefix and path' '
'
-test_expect_success 'git-clean symbolic link' '
+test_expect_success 'git clean symbolic link' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
ln -s docs/manual.txt src/part4.c
- git-clean &&
+ git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -179,10 +179,10 @@ test_expect_success 'git-clean symbolic link' '
'
-test_expect_success 'git-clean with wildcard' '
+test_expect_success 'git clean with wildcard' '
touch a.clean b.clean other.c &&
- git-clean "*.clean" &&
+ git clean "*.clean" &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -193,11 +193,11 @@ test_expect_success 'git-clean with wildcard' '
'
-test_expect_success 'git-clean -n' '
+test_expect_success 'git clean -n' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -n &&
+ git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -210,11 +210,11 @@ test_expect_success 'git-clean -n' '
'
-test_expect_success 'git-clean -d' '
+test_expect_success 'git clean -d' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -d &&
+ git clean -d &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -227,11 +227,11 @@ test_expect_success 'git-clean -d' '
'
-test_expect_success 'git-clean -d src/ examples/' '
+test_expect_success 'git clean -d src/ examples/' '
mkdir -p build docs examples &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so examples/1.c &&
- git-clean -d src/ examples/ &&
+ git clean -d src/ examples/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -245,11 +245,11 @@ test_expect_success 'git-clean -d src/ examples/' '
'
-test_expect_success 'git-clean -x' '
+test_expect_success 'git clean -x' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -x &&
+ git clean -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -262,11 +262,11 @@ test_expect_success 'git-clean -x' '
'
-test_expect_success 'git-clean -d -x' '
+test_expect_success 'git clean -d -x' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -d -x &&
+ git clean -d -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -279,11 +279,11 @@ test_expect_success 'git-clean -d -x' '
'
-test_expect_success 'git-clean -X' '
+test_expect_success 'git clean -X' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -X &&
+ git clean -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -296,11 +296,11 @@ test_expect_success 'git-clean -X' '
'
-test_expect_success 'git-clean -d -X' '
+test_expect_success 'git clean -d -X' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -d -X &&
+ git clean -d -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -331,7 +331,7 @@ test_expect_success 'clean.requireForce and -n' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
- git-clean -n &&
+ git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
@@ -346,7 +346,7 @@ test_expect_success 'clean.requireForce and -n' '
test_expect_success 'clean.requireForce and -f' '
- git-clean -f &&
+ git clean -f &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index cbc0c34ce2..be73f7b60a 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -6,7 +6,7 @@
test_description='Basic porcelain support for submodules
This test tries to verify basic sanity of the init, update and status
-subcommands of git-submodule.
+subcommands of git submodule.
'
. ./test-lib.sh
@@ -22,16 +22,16 @@ subcommands of git-submodule.
#
test_expect_success 'Prepare submodule testing' '
: > t &&
- git-add t &&
- git-commit -m "initial commit" &&
+ git add t &&
+ git commit -m "initial commit" &&
git branch initial HEAD &&
mkdir init &&
cd init &&
git init &&
echo a >a &&
git add a &&
- git-commit -m "submodule commit 1" &&
- git-tag -a -m "rev-1" rev-1 &&
+ git commit -m "submodule commit 1" &&
+ git tag -a -m "rev-1" rev-1 &&
rev1=$(git rev-parse HEAD) &&
if test -z "$rev1"
then
@@ -42,13 +42,13 @@ test_expect_success 'Prepare submodule testing' '
echo a >a &&
echo z >z &&
git add a init z &&
- git-commit -m "super commit 1" &&
+ git commit -m "super commit 1" &&
mv init .subrepo &&
GIT_CONFIG=.gitmodules git config submodule.example.url git://example.com/init.git
'
test_expect_success 'status should fail for unmapped paths' '
- if git-submodule status
+ if git submodule status
then
echo "[OOPS] submodule status succeeded"
false
@@ -60,16 +60,16 @@ test_expect_success 'status should fail for unmapped paths' '
'
test_expect_success 'status should only print one line' '
- lines=$(git-submodule status | wc -l) &&
+ lines=$(git submodule status | wc -l) &&
test $lines = 1
'
test_expect_success 'status should initially be "missing"' '
- git-submodule status | grep "^-$rev1"
+ git submodule status | grep "^-$rev1"
'
test_expect_success 'init should register submodule url in .git/config' '
- git-submodule init &&
+ git submodule init &&
url=$(git config submodule.example.url) &&
if test "$url" != "git://example.com/init.git"
then
@@ -84,7 +84,7 @@ test_expect_success 'init should register submodule url in .git/config' '
test_expect_success 'update should fail when path is used by a file' '
echo "hello" >init &&
- if git-submodule update
+ if git submodule update
then
echo "[OOPS] update should have failed"
false
@@ -100,7 +100,7 @@ test_expect_success 'update should fail when path is used by a file' '
test_expect_success 'update should fail when path is used by a nonempty directory' '
mkdir init &&
echo "hello" >init/a &&
- if git-submodule update
+ if git submodule update
then
echo "[OOPS] update should have failed"
false
@@ -116,7 +116,7 @@ test_expect_success 'update should fail when path is used by a nonempty director
test_expect_success 'update should work when path is an empty dir' '
rm -rf init &&
mkdir init &&
- git-submodule update &&
+ git submodule update &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@@ -130,14 +130,14 @@ test_expect_success 'update should work when path is an empty dir' '
'
test_expect_success 'status should be "up-to-date" after update' '
- git-submodule status | grep "^ $rev1"
+ git submodule status | grep "^ $rev1"
'
test_expect_success 'status should be "modified" after submodule commit' '
cd init &&
echo b >b &&
git add b &&
- git-commit -m "submodule commit 2" &&
+ git commit -m "submodule commit 2" &&
rev2=$(git rev-parse HEAD) &&
cd .. &&
if test -z "$rev2"
@@ -145,19 +145,19 @@ test_expect_success 'status should be "modified" after submodule commit' '
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
- git-submodule status | grep "^+$rev2"
+ git submodule status | grep "^+$rev2"
'
test_expect_success 'the --cached sha1 should be rev1' '
- git-submodule --cached status | grep "^+$rev1"
+ git submodule --cached status | grep "^+$rev1"
'
test_expect_success 'git diff should report the SHA1 of the new submodule commit' '
- git-diff | grep "^+Subproject commit $rev2"
+ git diff | grep "^+Subproject commit $rev2"
'
test_expect_success 'update should checkout rev1' '
- git-submodule update init &&
+ git submodule update init &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
@@ -171,12 +171,12 @@ test_expect_success 'update should checkout rev1' '
'
test_expect_success 'status should be "up-to-date" after update' '
- git-submodule status | grep "^ $rev1"
+ git submodule status | grep "^ $rev1"
'
test_expect_success 'checkout superproject with subproject already present' '
- git-checkout initial &&
- git-checkout master
+ git checkout initial &&
+ git checkout master
'
test_expect_success 'apply submodule diff' '
@@ -188,8 +188,8 @@ test_expect_success 'apply submodule diff' '
git commit -m "change subproject"
) &&
git update-index --add init &&
- git-commit -m "change init" &&
- git-format-patch -1 --stdout >P.diff &&
+ git commit -m "change init" &&
+ git format-patch -1 --stdout >P.diff &&
git checkout second &&
git apply --index P.diff &&
D=$(git diff --cached master) &&
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index bf12dbdeef..61498293b9 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -5,7 +5,7 @@
test_description='Summary support for submodules
-This test tries to verify the sanity of summary subcommand of git-submodule.
+This test tries to verify the sanity of summary subcommand of git submodule.
'
. ./test-lib.sh
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 809bdba630..0fe745ea0d 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Steven Grimm
#
-test_description='git-commit
+test_description='git commit
Tests for selected commit options.'
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 0edd9ddf73..63bfc6d8b3 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -6,7 +6,7 @@
# FIXME: Test the various index usages, -i and -o, test reflog,
# signoff
-test_description='git-commit'
+test_description='git commit'
. ./test-lib.sh
test_tick
@@ -14,52 +14,52 @@ test_tick
test_expect_success \
"initial status" \
"echo 'bongo bongo' >file &&
- git-add file && \
- git-status | grep 'Initial commit'"
+ git add file && \
+ git status | grep 'Initial commit'"
test_expect_success \
"fail initial amend" \
- "test_must_fail git-commit --amend"
+ "test_must_fail git commit --amend"
test_expect_success \
"initial commit" \
- "git-commit -m initial"
+ "git commit -m initial"
test_expect_success \
"invalid options 1" \
- "test_must_fail git-commit -m foo -m bar -F file"
+ "test_must_fail git commit -m foo -m bar -F file"
test_expect_success \
"invalid options 2" \
- "test_must_fail git-commit -C HEAD -m illegal"
+ "test_must_fail git commit -C HEAD -m illegal"
test_expect_success \
"using paths with -a" \
"echo King of the bongo >file &&
- test_must_fail git-commit -m foo -a file"
+ test_must_fail git commit -m foo -a file"
test_expect_success \
"using paths with --interactive" \
"echo bong-o-bong >file &&
- ! (echo 7 | git-commit -m foo --interactive file)"
+ ! (echo 7 | git commit -m foo --interactive file)"
test_expect_success \
"using invalid commit with -C" \
- "test_must_fail git-commit -C bogus"
+ "test_must_fail git commit -C bogus"
test_expect_success \
"testing nothing to commit" \
- "test_must_fail git-commit -m initial"
+ "test_must_fail git commit -m initial"
test_expect_success \
"next commit" \
"echo 'bongo bongo bongo' >file \
- git-commit -m next -a"
+ git commit -m next -a"
test_expect_success \
"commit message from non-existing file" \
"echo 'more bongo: bongo bongo bongo bongo' >file && \
- test_must_fail git-commit -F gah -a"
+ test_must_fail git commit -F gah -a"
# Empty except stray tabs and spaces on a few lines.
sed -e 's/@$//' >msg <<EOF
@@ -70,12 +70,12 @@ Signed-off-by: hula
EOF
test_expect_success \
"empty commit message" \
- "test_must_fail git-commit -F msg -a"
+ "test_must_fail git commit -F msg -a"
test_expect_success \
"commit message from file" \
"echo 'this is the commit message, coming from a file' >msg && \
- git-commit -F msg -a"
+ git commit -F msg -a"
cat >editor <<\EOF
#!/bin/sh
@@ -86,16 +86,16 @@ chmod 755 editor
test_expect_success \
"amend commit" \
- "VISUAL=./editor git-commit --amend"
+ "VISUAL=./editor git commit --amend"
test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \
- test_must_fail git-commit -F msg -m amending ."
+ test_must_fail git commit -F msg -m amending ."
test_expect_success \
"using message from other commit" \
- "git-commit -C HEAD^ ."
+ "git commit -C HEAD^ ."
cat >editor <<\EOF
#!/bin/sh
@@ -107,25 +107,25 @@ chmod 755 editor
test_expect_success \
"editing message from other commit" \
"echo 'hula hula' >file && \
- VISUAL=./editor git-commit -c HEAD^ -a"
+ VISUAL=./editor git commit -c HEAD^ -a"
test_expect_success \
"message from stdin" \
"echo 'silly new contents' >file && \
- echo commit message from stdin | git-commit -F - -a"
+ echo commit message from stdin | git commit -F - -a"
test_expect_success \
"overriding author from command line" \
"echo 'gak' >file && \
- git-commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"
+ git commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"
test_expect_success \
"interactive add" \
- "echo 7 | git-commit --interactive | grep 'What now'"
+ "echo 7 | git commit --interactive | grep 'What now'"
test_expect_success \
"showing committed revisions" \
- "git-rev-list HEAD >current"
+ "git rev-list HEAD >current"
# We could just check the head sha1, but checking each commit makes it
# easier to isolate bugs.
@@ -140,8 +140,8 @@ d381ac431806e53f3dd7ac2f1ae0534f36d738b9
EOF
test_expect_success \
- 'validate git-rev-list output.' \
- 'diff current expected'
+ 'validate git rev-list output.' \
+ 'test_cmp expected current'
test_expect_success 'partial commit that involves removal (1)' '
@@ -151,7 +151,7 @@ test_expect_success 'partial commit that involves removal (1)' '
git commit -m "Partial: add elif" elif &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "A elif" >expected &&
- diff expected current
+ test_cmp expected current
'
@@ -160,7 +160,7 @@ test_expect_success 'partial commit that involves removal (2)' '
git commit -m "Partial: remove file" file &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "D file" >expected &&
- diff expected current
+ test_cmp expected current
'
@@ -171,7 +171,7 @@ test_expect_success 'partial commit that involves removal (3)' '
git commit -m "Partial: modify elif" elif &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "M elif" >expected &&
- diff expected current
+ test_cmp expected current
'
@@ -187,7 +187,7 @@ test_expect_success 'amend commit to fix author' '
expected &&
git commit --amend --author="$author" &&
git cat-file -p HEAD > current &&
- diff expected current
+ test_cmp expected current
'
@@ -256,7 +256,7 @@ test_expect_success 'amend commit to fix author' '
expected &&
git commit --amend --author="$author" &&
git cat-file -p HEAD > current &&
- diff expected current
+ test_cmp expected current
'
diff --git a/t/t7502-status.sh b/t/t7502-status.sh
index 38a48b57c7..c8e4c2e7b4 100755
--- a/t/t7502-status.sh
+++ b/t/t7502-status.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Johannes E. Schindelin
#
-test_description='git-status'
+test_description='git status'
. ./test-lib.sh
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index cd6c7c8342..ff189624d4 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -32,7 +32,7 @@ echo "#!$SHELL_PATH" > "$HOOK"
cat >> "$HOOK" <<'EOF'
if test "$2" = commit; then
- source=$(git-rev-parse "$3")
+ source=$(git rev-parse "$3")
else
source=${2-default}
fi
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
index a75130cdbb..d9a08aac56 100755
--- a/t/t7506-status-submodule.sh
+++ b/t/t7506-status-submodule.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-status for submodule'
+test_description='git status for submodule'
. ./test-lib.sh
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index fee8fb77d4..94bc556cb2 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2007 Lars Hjemli
#
-test_description='git-merge
+test_description='git merge
Testing basic merge operations/option parsing.'
@@ -498,4 +498,13 @@ test_expect_success 'merge fast-forward in a dirty tree' '
test_debug 'gitk --all'
+test_expect_success 'in-index merge' '
+ git reset --hard c0 &&
+ git merge --no-ff -s resolve c1 > out &&
+ grep "Wonderful." out &&
+ verify_parents $c0 $c1
+'
+
+test_debug 'gitk --all'
+
test_done
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index 55aa6b5f27..7ba94ea99b 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-merge
+test_description='git merge
Testing pull.* configuration parsing.'
diff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh
index fcb8285746..01e5415e94 100755
--- a/t/t7602-merge-octopus-many.sh
+++ b/t/t7602-merge-octopus-many.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-merge
+test_description='git merge
Testing octopus merge with more than 25 refs.'
diff --git a/t/t7603-merge-reduce-heads.sh b/t/t7603-merge-reduce-heads.sh
index 17b19dc11f..b47b7b9757 100755
--- a/t/t7603-merge-reduce-heads.sh
+++ b/t/t7603-merge-reduce-heads.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-merge
+test_description='git merge
Testing octopus merge when reducing parents to independent branches.'
diff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh
index 6081677d23..de977c5e2f 100755
--- a/t/t7604-merge-custom-message.sh
+++ b/t/t7604-merge-custom-message.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-merge
+test_description='git merge
Testing merge when using a custom message for the merge commit.'
diff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh
index ee21a107fd..0cb9d11f21 100755
--- a/t/t7605-merge-resolve.sh
+++ b/t/t7605-merge-resolve.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-merge
+test_description='git merge
Testing the resolve strategy.'
@@ -36,7 +36,9 @@ test_expect_success 'merge c1 to c2' '
git diff --exit-code &&
test -f c0.c &&
test -f c1.c &&
- test -f c2.c
+ test -f c2.c &&
+ test 3 = $(git ls-tree -r HEAD | wc -l) &&
+ test 3 = $(git ls-files | wc -l)
'
test_expect_success 'merge c2 to c3 (fails)' '
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index 9285071c47..09fa5f115c 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2008 Charles Bailey
#
-test_description='git-mergetool
+test_description='git mergetool
Testing basic merge tool invocation'
diff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh
index 31c340fd38..531dac060a 100755
--- a/t/t7701-repack-unpack-unreachable.sh
+++ b/t/t7701-repack-unpack-unreachable.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-repack works correctly'
+test_description='git repack works correctly'
. ./test-lib.sh
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 1c857cf4ab..d098a01ba3 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='git-send-email'
+test_description='git send-email'
. ./test-lib.sh
PROG='git send-email'
diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh
index ae78e334ac..c2b24a439d 100755
--- a/t/t9113-git-svn-dcommit-new-file.sh
+++ b/t/t9113-git-svn-dcommit-new-file.sh
@@ -12,19 +12,7 @@ test_description='git-svn dcommit new files over svn:// test'
. ./lib-git-svn.sh
-if test -z "$SVNSERVE_PORT"
-then
- say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
- test_done
- exit
-fi
-
-start_svnserve () {
- svnserve --listen-port $SVNSERVE_PORT \
- --root "$rawsvnrepo" \
- --listen-once \
- --listen-host 127.0.0.1 &
-}
+require_svnserve
test_expect_success 'start tracking an empty repo' '
svn mkdir -m "empty dir" "$svnrepo"/empty-dir &&
diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
index 3281cbd347..43ceb75d59 100755
--- a/t/t9118-git-svn-funky-branch-names.sh
+++ b/t/t9118-git-svn-funky-branch-names.sh
@@ -6,6 +6,10 @@
test_description='git-svn funky branch names'
. ./lib-git-svn.sh
+# Abo-Uebernahme (Bug #994)
+scary_uri='Abo-Uebernahme%20%28Bug%20%23994%29'
+scary_ref='Abo-Uebernahme%20(Bug%20#994)'
+
test_expect_success 'setup svnrepo' '
mkdir project project/trunk project/branches project/tags &&
echo foo > project/trunk/foo &&
@@ -15,6 +19,8 @@ test_expect_success 'setup svnrepo' '
"$svnrepo/pr ject/branches/fun plugin" &&
svn cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
"$svnrepo/pr ject/branches/more fun plugin!" &&
+ svn cp -m "scary" "$svnrepo/pr ject/branches/fun plugin" \
+ "$svnrepo/pr ject/branches/$scary_uri" &&
start_httpd
'
@@ -23,6 +29,7 @@ test_expect_success 'test clone with funky branch names' '
cd project &&
git rev-parse "refs/remotes/fun%20plugin" &&
git rev-parse "refs/remotes/more%20fun%20plugin!" &&
+ git rev-parse "refs/remotes/$scary_ref" &&
cd ..
'
@@ -35,6 +42,15 @@ test_expect_success 'test dcommit to funky branch' "
cd ..
"
+test_expect_success 'test dcommit to scary branch' '
+ cd project &&
+ git reset --hard "refs/remotes/$scary_ref" &&
+ echo urls are scary >> foo &&
+ git commit -m "eep" -- foo &&
+ git svn dcommit &&
+ cd ..
+ '
+
stop_httpd
test_done
diff --git a/t/t9126-git-svn-follow-deleted-readded-directory.sh b/t/t9126-git-svn-follow-deleted-readded-directory.sh
new file mode 100755
index 0000000000..edec640e97
--- /dev/null
+++ b/t/t9126-git-svn-follow-deleted-readded-directory.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Alec Berryman
+
+test_description='git svn fetch repository with deleted and readded directory'
+
+. ./lib-git-svn.sh
+
+# Don't run this by default; it opens up a port.
+require_svnserve
+
+test_expect_success 'load repository' '
+ svnadmin load -q "$rawsvnrepo" < "$TEST_DIRECTORY"/t9126/follow-deleted-readded.dump
+ '
+
+test_expect_success 'fetch repository' '
+ start_svnserve &&
+ git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
+ git svn fetch
+ '
+
+test_done
diff --git a/t/t9126/follow-deleted-readded.dump b/t/t9126/follow-deleted-readded.dump
new file mode 100644
index 0000000000..19da5d1ddc
--- /dev/null
+++ b/t/t9126/follow-deleted-readded.dump
@@ -0,0 +1,201 @@
+SVN-fs-dump-format-version: 2
+
+UUID: 1807dc6f-c693-4cda-9710-00e1be8c1f21
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2008-09-14T19:53:13.006748Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 111
+Content-length: 111
+
+K 7
+svn:log
+V 12
+Create trunk
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:13.239689Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 2
+Prop-content-length: 119
+Content-length: 119
+
+K 7
+svn:log
+V 20
+Create trunk/project
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:13.548860Z
+PROPS-END
+
+Node-path: trunk/project
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 3
+Prop-content-length: 111
+Content-length: 111
+
+K 7
+svn:log
+V 12
+add new file
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:15.433630Z
+PROPS-END
+
+Node-path: trunk/project/foo
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 4
+Text-content-md5: d3b07384d113edec49eaa6238ad5ff00
+Content-length: 14
+
+PROPS-END
+foo
+
+
+Revision-number: 4
+Prop-content-length: 116
+Content-length: 116
+
+K 7
+svn:log
+V 17
+change foo to bar
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:17.339884Z
+PROPS-END
+
+Node-path: trunk/project/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 4
+Text-content-md5: c157a79031e1c40f85931829bc5fc552
+Content-length: 4
+
+bar
+
+
+Revision-number: 5
+Prop-content-length: 114
+Content-length: 114
+
+K 7
+svn:log
+V 15
+don't like that
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:19.335001Z
+PROPS-END
+
+Node-path: trunk/project
+Node-action: delete
+
+
+Revision-number: 6
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 11
+reset trunk
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:19.845897Z
+PROPS-END
+
+Node-path: trunk/project
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 4
+Node-copyfrom-path: trunk/project
+
+
+Revision-number: 7
+Prop-content-length: 113
+Content-length: 113
+
+K 7
+svn:log
+V 14
+change to quux
+K 10
+svn:author
+V 4
+alec
+K 8
+svn:date
+V 27
+2008-09-14T19:53:21.367947Z
+PROPS-END
+
+Node-path: trunk/project/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 5
+Text-content-md5: d3b07a382ec010c01889250fce66fb13
+Content-length: 5
+
+quux
+
+
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 4b91f8d4c4..c1850d2923 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -488,4 +488,17 @@ test_expect_success 'cvs co -c (shows module database)' '
! grep -v "^master[ ]\+master$" < out
'
+#------------
+# CVS ANNOTATE
+#------------
+
+cd "$WORKDIR"
+test_expect_success 'cvs annotate' '
+ cd cvswork &&
+ GIT_CONFIG="$git_config" cvs annotate merge >../out &&
+ sed -e "s/ .*//" ../out >../actual &&
+ for i in 3 1 1 1 1 1 1 1 2 4; do echo 1.$i; done >../expect &&
+ test_cmp ../expect ../actual
+'
+
test_done
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 4d2312548a..504f95a47d 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -9,7 +9,6 @@ use Test::More qw(no_plan);
use Cwd;
use File::Basename;
-use File::Temp;
BEGIN { use_ok('Git') }
@@ -38,7 +37,7 @@ is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
# Failure cases for config:
# Save and restore STDERR; we will probably extract this into a
# "dies_ok" method and possibly move the STDERR handling to Git.pm.
-open our $tmpstderr, ">&", STDERR or die "cannot save STDERR"; close STDERR;
+open our $tmpstderr, ">&STDERR" or die "cannot save STDERR"; close STDERR;
eval { $r->config("test.dupstring") };
ok($@, "config: duplicate entry in scalar context fails");
eval { $r->config_bool("test.boolother") };
@@ -69,21 +68,25 @@ is($r->ident_person("Name", "email", "123 +0000"), "Name <email>",
# objects and hashes
ok(our $file1hash = $r->command_oneline('rev-parse', "HEAD:file1"), "(get file hash)");
-our $tmpfile = File::Temp->new;
-is($r->cat_blob($file1hash, $tmpfile), 15, "cat_blob: size");
+my $tmpfile = "file.tmp";
+open TEMPFILE, "+>$tmpfile" or die "Can't open $tmpfile: $!";
+is($r->cat_blob($file1hash, \*TEMPFILE), 15, "cat_blob: size");
our $blobcontents;
-{ local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }
+{ local $/; seek TEMPFILE, 0, 0; $blobcontents = <TEMPFILE>; }
is($blobcontents, "changed file 1\n", "cat_blob: data");
-seek $tmpfile, 0, 0;
+close TEMPFILE or die "Failed writing to $tmpfile: $!";
is(Git::hash_object("blob", $tmpfile), $file1hash, "hash_object: roundtrip");
-$tmpfile = File::Temp->new();
-print $tmpfile my $test_text = "test blob, to be inserted\n";
+open TEMPFILE, ">$tmpfile" or die "Can't open $tmpfile: $!";
+print TEMPFILE my $test_text = "test blob, to be inserted\n";
+close TEMPFILE or die "Failed writing to $tmpfile: $!";
like(our $newhash = $r->hash_and_insert_object($tmpfile), qr/[0-9a-fA-F]{40}/,
"hash_and_insert_object: returns hash");
-$tmpfile = File::Temp->new;
-is($r->cat_blob($newhash, $tmpfile), length $test_text, "cat_blob: roundtrip size");
-{ local $/; seek $tmpfile, 0, 0; $blobcontents = <$tmpfile>; }
+open TEMPFILE, "+>$tmpfile" or die "Can't open $tmpfile: $!";
+is($r->cat_blob($newhash, \*TEMPFILE), length $test_text, "cat_blob: roundtrip size");
+{ local $/; seek TEMPFILE, 0, 0; $blobcontents = <TEMPFILE>; }
is($blobcontents, $test_text, "cat_blob: roundtrip data");
+close TEMPFILE;
+unlink $tmpfile;
# paths
is($r->repo_path, "./.git", "repo_path");
diff --git a/templates/Makefile b/templates/Makefile
index cc3fc3094c..a12c6e214e 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -23,17 +23,19 @@ all: boilerplates.made custom
bpsrc = $(filter-out %~,$(wildcard *--*))
boilerplates.made : $(bpsrc)
- $(QUIET)ls *--* 2>/dev/null | \
+ $(QUIET)umask 022 && ls *--* 2>/dev/null | \
while read boilerplate; \
do \
case "$$boilerplate" in *~) continue ;; esac && \
dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
dir=`expr "$$dst" : '\(.*\)/'` && \
- $(INSTALL) -d -m 755 blt/$$dir && \
+ mkdir -p blt/$$dir && \
case "$$boilerplate" in \
- *--) ;; \
- *) cp -p $$boilerplate blt/$$dst ;; \
- esac || exit; \
+ *--) continue;; \
+ esac && \
+ cp $$boilerplate blt/$$dst && \
+ if test -x "blt/$$dst"; then rx=rx; else rx=r; fi && \
+ chmod a+$$rx "blt/$$dst" || exit; \
done && \
date >$@
diff --git a/tree-diff.c b/tree-diff.c
index bbb126fc46..9f67af6c1f 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -303,7 +303,7 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, stru
update_tree_entry(t2);
continue;
}
- die("git-diff-tree: internal error");
+ die("git diff-tree: internal error");
}
return 0;
}
diff --git a/unpack-trees.c b/unpack-trees.c
index cba0aca062..ef21c62195 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -376,6 +376,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
state.refresh_cache = 1;
memset(&o->result, 0, sizeof(o->result));
+ o->result.initialized = 1;
if (o->src_index)
o->result.timestamp = o->src_index->timestamp;
o->merge_size = len;
diff --git a/upload-pack.c b/upload-pack.c
index c911e70c9a..e5adbc011e 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -157,7 +157,7 @@ static void create_pack_file(void)
/* .data is just a boolean: any non-NULL value will do */
rev_list.data = create_full_pack ? &rev_list : NULL;
if (start_async(&rev_list))
- die("git-upload-pack: unable to fork git-rev-list");
+ die("git upload-pack: unable to fork git-rev-list");
argv[arg++] = "pack-objects";
argv[arg++] = "--stdout";
@@ -177,7 +177,7 @@ static void create_pack_file(void)
pack_objects.argv = argv;
if (start_command(&pack_objects))
- die("git-upload-pack: unable to fork git-pack-objects");
+ die("git upload-pack: unable to fork git-pack-objects");
/* We read from pack_objects.err to capture stderr output for
* progress bar, and pack_objects.out to capture the pack data.
@@ -271,7 +271,7 @@ static void create_pack_file(void)
}
if (finish_command(&pack_objects)) {
- error("git-upload-pack: git-pack-objects died with error.");
+ error("git upload-pack: git-pack-objects died with error.");
goto fail;
}
if (finish_async(&rev_list))
@@ -291,7 +291,7 @@ static void create_pack_file(void)
fail:
send_client_data(3, abort_msg, sizeof(abort_msg));
- die("git-upload-pack: %s", abort_msg);
+ die("git upload-pack: %s", abort_msg);
}
static int got_sha1(char *hex, unsigned char *sha1)
@@ -300,7 +300,7 @@ static int got_sha1(char *hex, unsigned char *sha1)
int we_knew_they_have = 0;
if (get_sha1_hex(hex, sha1))
- die("git-upload-pack: expected SHA1 object, got '%s'", hex);
+ die("git upload-pack: expected SHA1 object, got '%s'", hex);
if (!has_sha1_file(sha1))
return -1;
@@ -440,7 +440,7 @@ static int get_common_commits(void)
packet_write(1, "NAK\n");
return -1;
}
- die("git-upload-pack: expected SHA1 list, got '%s'", line);
+ die("git upload-pack: expected SHA1 list, got '%s'", line);
}
}
@@ -485,7 +485,7 @@ static void receive_needs(void)
}
if (prefixcmp(line, "want ") ||
get_sha1_hex(line+5, sha1_buf))
- die("git-upload-pack: protocol error, "
+ die("git upload-pack: protocol error, "
"expected to get sha, not '%s'", line);
if (strstr(line+45, "multi_ack"))
multi_ack = 1;
@@ -512,7 +512,7 @@ static void receive_needs(void)
*/
o = lookup_object(sha1_buf);
if (!o || !(o->flags & OUR_REF))
- die("git-upload-pack: not our ref %s", line+5);
+ die("git upload-pack: not our ref %s", line+5);
if (!(o->flags & WANTED)) {
o->flags |= WANTED;
add_object_array(o, NULL, &want_obj);
@@ -577,7 +577,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
struct object *o = parse_object(sha1);
if (!o)
- die("git-upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+ die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
if (capabilities)
packet_write(1, "%s %s%c%s\n", sha1_to_hex(sha1), refname,