aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--Documentation/.gitattributes1
-rw-r--r--Documentation/Makefile11
-rw-r--r--Documentation/RelNotes-1.5.3.3.txt2
-rw-r--r--Documentation/RelNotes-1.5.3.8.txt25
-rw-r--r--Documentation/RelNotes-1.5.4.txt85
-rw-r--r--Documentation/asciidoc.conf8
-rw-r--r--Documentation/blame-options.txt4
-rwxr-xr-xDocumentation/cmd-list.perl2
-rw-r--r--Documentation/config.txt194
-rw-r--r--Documentation/core-tutorial.txt2
-rw-r--r--Documentation/cvs-migration.txt10
-rw-r--r--Documentation/diff-options.txt4
-rw-r--r--Documentation/everyday.txt48
-rw-r--r--Documentation/fetch-options.txt14
-rw-r--r--Documentation/git-add.txt16
-rw-r--r--Documentation/git-am.txt16
-rw-r--r--Documentation/git-annotate.txt4
-rw-r--r--Documentation/git-apply.txt12
-rw-r--r--Documentation/git-archimport.txt2
-rw-r--r--Documentation/git-archive.txt2
-rw-r--r--Documentation/git-bisect.txt2
-rw-r--r--Documentation/git-blame.txt8
-rw-r--r--Documentation/git-branch.txt27
-rw-r--r--Documentation/git-bundle.txt10
-rw-r--r--Documentation/git-cat-file.txt4
-rw-r--r--Documentation/git-check-attr.txt7
-rw-r--r--Documentation/git-check-ref-format.txt6
-rw-r--r--Documentation/git-checkout-index.txt2
-rw-r--r--Documentation/git-checkout.txt11
-rw-r--r--Documentation/git-cherry-pick.txt6
-rw-r--r--Documentation/git-cherry.txt2
-rw-r--r--Documentation/git-citool.txt6
-rw-r--r--Documentation/git-clean.txt4
-rw-r--r--Documentation/git-clone.txt10
-rw-r--r--Documentation/git-commit-tree.txt6
-rw-r--r--Documentation/git-commit.txt42
-rw-r--r--Documentation/git-config.txt4
-rw-r--r--Documentation/git-count-objects.txt2
-rw-r--r--Documentation/git-cvsexportcommit.txt2
-rw-r--r--Documentation/git-cvsimport.txt4
-rw-r--r--Documentation/git-cvsserver.txt10
-rw-r--r--Documentation/git-daemon.txt2
-rw-r--r--Documentation/git-describe.txt2
-rw-r--r--Documentation/git-diff-files.txt2
-rw-r--r--Documentation/git-diff-index.txt2
-rw-r--r--Documentation/git-diff-tree.txt2
-rw-r--r--Documentation/git-diff.txt8
-rw-r--r--Documentation/git-fast-export.txt12
-rw-r--r--Documentation/git-fast-import.txt18
-rw-r--r--Documentation/git-fetch-pack.txt4
-rw-r--r--Documentation/git-fetch.txt4
-rw-r--r--Documentation/git-filter-branch.txt16
-rw-r--r--Documentation/git-fmt-merge-msg.txt4
-rw-r--r--Documentation/git-format-patch.txt8
-rw-r--r--Documentation/git-fsck-objects.txt2
-rw-r--r--Documentation/git-fsck.txt2
-rw-r--r--Documentation/git-gc.txt20
-rw-r--r--Documentation/git-get-tar-commit-id.txt4
-rw-r--r--Documentation/git-grep.txt2
-rw-r--r--Documentation/git-gui.txt4
-rw-r--r--Documentation/git-hash-object.txt2
-rw-r--r--Documentation/git-help.txt16
-rw-r--r--Documentation/git-http-fetch.txt2
-rw-r--r--Documentation/git-http-push.txt5
-rw-r--r--Documentation/git-imap-send.txt2
-rw-r--r--Documentation/git-index-pack.txt10
-rw-r--r--Documentation/git-init-db.txt2
-rw-r--r--Documentation/git-init.txt2
-rw-r--r--Documentation/git-instaweb.txt2
-rw-r--r--Documentation/git-log.txt25
-rw-r--r--Documentation/git-lost-found.txt4
-rw-r--r--Documentation/git-ls-files.txt8
-rw-r--r--Documentation/git-ls-remote.txt4
-rw-r--r--Documentation/git-ls-tree.txt2
-rw-r--r--Documentation/git-mailinfo.txt4
-rw-r--r--Documentation/git-mailsplit.txt2
-rw-r--r--Documentation/git-merge-base.txt2
-rw-r--r--Documentation/git-merge-file.txt4
-rw-r--r--Documentation/git-merge-index.txt2
-rw-r--r--Documentation/git-merge-one-file.txt2
-rw-r--r--Documentation/git-merge-tree.txt2
-rw-r--r--Documentation/git-merge.txt19
-rw-r--r--Documentation/git-mergetool.txt4
-rw-r--r--Documentation/git-mktag.txt2
-rw-r--r--Documentation/git-mktree.txt2
-rw-r--r--Documentation/git-mv.txt2
-rw-r--r--Documentation/git-name-rev.txt4
-rw-r--r--Documentation/git-pack-objects.txt13
-rw-r--r--Documentation/git-pack-redundant.txt8
-rw-r--r--Documentation/git-pack-refs.txt2
-rw-r--r--Documentation/git-parse-remote.txt2
-rw-r--r--Documentation/git-patch-id.txt2
-rw-r--r--Documentation/git-peek-remote.txt2
-rw-r--r--Documentation/git-prune-packed.txt6
-rw-r--r--Documentation/git-prune.txt2
-rw-r--r--Documentation/git-pull.txt23
-rw-r--r--Documentation/git-push.txt4
-rw-r--r--Documentation/git-quiltimport.txt2
-rw-r--r--Documentation/git-read-tree.txt8
-rw-r--r--Documentation/git-rebase.txt10
-rw-r--r--Documentation/git-receive-pack.txt4
-rw-r--r--Documentation/git-reflog.txt8
-rw-r--r--Documentation/git-relink.txt9
-rw-r--r--Documentation/git-remote.txt14
-rw-r--r--Documentation/git-repack.txt14
-rw-r--r--Documentation/git-repo-config.txt2
-rw-r--r--Documentation/git-request-pull.txt2
-rw-r--r--Documentation/git-rerere.txt8
-rw-r--r--Documentation/git-reset.txt12
-rw-r--r--Documentation/git-rev-list.txt359
-rw-r--r--Documentation/git-rev-parse.txt17
-rw-r--r--Documentation/git-revert.txt6
-rw-r--r--Documentation/git-rm.txt4
-rw-r--r--Documentation/git-send-email.txt4
-rw-r--r--Documentation/git-send-pack.txt6
-rw-r--r--Documentation/git-sh-setup.txt11
-rw-r--r--Documentation/git-shell.txt2
-rw-r--r--Documentation/git-shortlog.txt19
-rw-r--r--Documentation/git-show-branch.txt2
-rw-r--r--Documentation/git-show-index.txt2
-rw-r--r--Documentation/git-show-ref.txt6
-rw-r--r--Documentation/git-show.txt8
-rw-r--r--Documentation/git-stash.txt17
-rw-r--r--Documentation/git-status.txt6
-rw-r--r--Documentation/git-stripspace.txt2
-rw-r--r--Documentation/git-submodule.txt13
-rw-r--r--Documentation/git-svn.txt30
-rw-r--r--Documentation/git-symbolic-ref.txt2
-rw-r--r--Documentation/git-tag.txt2
-rw-r--r--Documentation/git-tar-tree.txt2
-rw-r--r--Documentation/git-unpack-file.txt2
-rw-r--r--Documentation/git-unpack-objects.txt2
-rw-r--r--Documentation/git-update-index.txt12
-rw-r--r--Documentation/git-update-ref.txt2
-rw-r--r--Documentation/git-update-server-info.txt2
-rw-r--r--Documentation/git-upload-archive.txt2
-rw-r--r--Documentation/git-upload-pack.txt2
-rw-r--r--Documentation/git-var.txt8
-rw-r--r--Documentation/git-verify-pack.txt2
-rw-r--r--Documentation/git-verify-tag.txt2
-rw-r--r--Documentation/git-whatchanged.txt2
-rw-r--r--Documentation/git-write-tree.txt2
-rw-r--r--Documentation/git.txt28
-rw-r--r--Documentation/gitattributes.txt47
-rw-r--r--Documentation/gitcli.txt4
-rw-r--r--Documentation/gitignore.txt6
-rw-r--r--Documentation/gitk.txt6
-rw-r--r--Documentation/gitmodules.txt6
-rw-r--r--Documentation/glossary.txt18
-rw-r--r--Documentation/howto/using-merge-subtree.txt75
-rw-r--r--Documentation/i18n.txt2
-rw-r--r--Documentation/manpage-1.72.xsl17
-rw-r--r--Documentation/repository-layout.txt10
-rw-r--r--Documentation/rev-list-options.txt361
-rw-r--r--Documentation/technical/api-diff.txt6
-rw-r--r--Documentation/technical/api-lockfile.txt76
-rw-r--r--Documentation/technical/pack-format.txt2
-rw-r--r--Documentation/technical/racy-git.txt2
-rw-r--r--Documentation/tutorial-2.txt2
-rw-r--r--Documentation/tutorial.txt24
-rw-r--r--Documentation/urls.txt2
-rw-r--r--Documentation/user-manual.conf2
-rw-r--r--Documentation/user-manual.txt248
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--INSTALL4
-rw-r--r--Makefile25
-rw-r--r--archive-tar.c2
-rw-r--r--archive.c84
-rw-r--r--attr.c6
-rw-r--r--builtin-add.c2
-rw-r--r--builtin-apply.c6
-rw-r--r--builtin-archive.c80
-rw-r--r--builtin-blame.c2
-rw-r--r--builtin-branch.c9
-rw-r--r--builtin-checkout-index.c4
-rw-r--r--builtin-clean.c25
-rw-r--r--builtin-commit.c154
-rw-r--r--builtin-config.c2
-rw-r--r--builtin-diff-files.c2
-rw-r--r--builtin-diff-index.c2
-rw-r--r--builtin-diff-tree.c2
-rw-r--r--builtin-diff.c2
-rw-r--r--builtin-fetch-pack.c1
-rw-r--r--builtin-fsck.c19
-rw-r--r--builtin-gc.c4
-rw-r--r--builtin-grep.c2
-rw-r--r--builtin-http-fetch.c10
-rw-r--r--builtin-init-db.c6
-rw-r--r--builtin-log.c7
-rw-r--r--builtin-ls-remote.c4
-rw-r--r--builtin-mv.c1
-rw-r--r--builtin-pack-objects.c30
-rw-r--r--builtin-pack-refs.c6
-rw-r--r--builtin-prune.c39
-rw-r--r--builtin-read-tree.c2
-rw-r--r--builtin-reflog.c56
-rw-r--r--builtin-rerere.c4
-rw-r--r--builtin-reset.c4
-rw-r--r--builtin-rev-list.c2
-rw-r--r--builtin-rev-parse.c37
-rw-r--r--builtin-revert.c4
-rw-r--r--builtin-rm.c2
-rw-r--r--builtin-send-pack.c10
-rw-r--r--builtin-shortlog.c2
-rw-r--r--builtin-show-branch.c2
-rw-r--r--builtin-tag.c2
-rw-r--r--builtin-update-index.c2
-rw-r--r--builtin-write-tree.c9
-rw-r--r--bundle.c22
-rw-r--r--cache.h4
-rw-r--r--color.c2
-rw-r--r--combine-diff.c32
-rw-r--r--command-list.txt1
-rw-r--r--commit.c27
-rw-r--r--config.c89
-rw-r--r--config.mak.in2
-rw-r--r--configure.ac12
-rw-r--r--connect.c2
-rwxr-xr-xcontrib/completion/git-completion.bash45
-rw-r--r--contrib/emacs/git-blame.el10
-rw-r--r--contrib/emacs/git.el284
-rwxr-xr-xcontrib/examples/git-revert.sh197
-rwxr-xr-xcontrib/examples/git-tag.sh2
-rwxr-xr-xcontrib/fast-import/git-p4102
-rwxr-xr-xcontrib/hg-to-git/hg-to-git.py46
-rw-r--r--contrib/hooks/post-receive-email34
-rw-r--r--convert.c13
-rw-r--r--diff.c87
-rw-r--r--diff.h1
-rw-r--r--fast-import.c108
-rwxr-xr-xgit-add--interactive.perl43
-rwxr-xr-xgit-am.sh6
-rwxr-xr-xgit-bisect.sh8
-rwxr-xr-xgit-checkout.sh7
-rw-r--r--git-compat-util.h9
-rwxr-xr-xgit-cvsimport.perl7
-rwxr-xr-xgit-cvsserver.perl9
-rwxr-xr-xgit-filter-branch.sh28
-rw-r--r--git-gui/Makefile18
-rwxr-xr-xgit-gui/git-gui.sh70
-rw-r--r--git-gui/lib/choose_repository.tcl50
-rw-r--r--git-gui/lib/choose_rev.tcl3
-rw-r--r--git-gui/lib/commit.tcl149
-rw-r--r--git-gui/lib/diff.tcl3
-rw-r--r--git-gui/lib/error.tcl18
-rw-r--r--git-gui/lib/index.tcl4
-rw-r--r--git-gui/po/de.po47
-rw-r--r--git-gui/po/fr.po1875
-rw-r--r--git-gui/po/glossary/de.po12
-rw-r--r--git-gui/po/glossary/fr.po166
-rw-r--r--git-gui/po/glossary/git-gui-glossary.pot6
-rw-r--r--git-gui/po/glossary/git-gui-glossary.txt1
-rw-r--r--git-gui/po/po2msg.sh25
-rw-r--r--git-gui/po/sv.po1895
-rwxr-xr-xgit-instaweb.sh10
-rwxr-xr-xgit-mergetool.sh7
-rwxr-xr-xgit-pull.sh78
-rwxr-xr-xgit-rebase--interactive.sh46
-rwxr-xr-xgit-relink.perl2
-rwxr-xr-xgit-remote.perl10
-rwxr-xr-xgit-send-email.perl80
-rwxr-xr-xgit-stash.sh13
-rwxr-xr-xgit-submodule.sh169
-rwxr-xr-xgit-svn.perl88
-rw-r--r--git.c2
-rw-r--r--git.spec.in22
-rw-r--r--gitk-git/Makefile38
-rw-r--r--gitk-git/gitk592
-rw-r--r--gitk-git/po/.gitignore1
-rw-r--r--gitk-git/po/de.po725
-rw-r--r--gitk-git/po/po2msg.sh133
-rw-r--r--gitweb/README17
-rwxr-xr-xgitweb/gitweb.perl17
-rw-r--r--help.c2
-rw-r--r--http-push.c46
-rw-r--r--http.c25
-rw-r--r--http.h8
-rw-r--r--ident.c2
-rw-r--r--imap-send.c4
-rw-r--r--lockfile.c30
-rw-r--r--merge-recursive.c15
-rw-r--r--object.c12
-rw-r--r--parse-options.c30
-rw-r--r--pretty.c20
-rw-r--r--quote.c16
-rw-r--r--quote.h1
-rw-r--r--receive-pack.c17
-rw-r--r--refs.c77
-rw-r--r--refs.h5
-rw-r--r--remote.c9
-rw-r--r--revision.c6
-rw-r--r--server-info.c2
-rw-r--r--setup.c4
-rw-r--r--sha1_file.c18
-rw-r--r--sideband.c23
-rw-r--r--strbuf.c9
-rw-r--r--t/.gitattributes1
-rw-r--r--t/README14
-rwxr-xr-xt/t0000-basic.sh30
-rwxr-xr-xt/t0003-attributes.sh49
-rwxr-xr-xt/t0020-crlf.sh24
-rwxr-xr-xt/t0030-stripspace.sh40
-rwxr-xr-xt/t0040-parse-options.sh15
-rwxr-xr-xt/t1000-read-tree-m-3way.sh161
-rwxr-xr-xt/t1200-tutorial.sh8
-rwxr-xr-xt/t1300-repo-config.sh98
-rwxr-xr-xt/t1302-repo-version.sh5
-rwxr-xr-xt/t1303-wacky-config.sh37
-rwxr-xr-xt/t1400-update-ref.sh43
-rwxr-xr-xt/t2000-checkout-cache-clash.sh4
-rwxr-xr-xt/t2002-checkout-cache-u.sh4
-rwxr-xr-xt/t2008-checkout-subdir.sh16
-rwxr-xr-xt/t2100-update-cache-badpath.sh4
-rwxr-xr-xt/t3020-ls-files-error-unmatch.sh4
-rwxr-xr-xt/t3200-branch.sh36
-rwxr-xr-xt/t3210-pack-refs.sh26
-rwxr-xr-xt/t3400-rebase.sh4
-rwxr-xr-xt/t3403-rebase-skip.sh6
-rwxr-xr-xt/t3404-rebase-interactive.sh16
-rwxr-xr-xt/t3600-rm.sh19
-rwxr-xr-xt/t3800-mktag.sh89
-rwxr-xr-xt/t4025-hunk-header.sh44
-rwxr-xr-xt/t4026-color.sh69
-rwxr-xr-xt/t4103-apply-binary.sh68
-rwxr-xr-xt/t4113-apply-ending.sh8
-rwxr-xr-xt/t4201-shortlog.sh2
-rwxr-xr-xt/t4202-log.sh74
-rwxr-xr-xt/t5300-pack-object.sh10
-rwxr-xr-xt/t5302-pack-index.sh32
-rw-r--r--t/t5304-prune.sh32
-rwxr-xr-xt/t5401-update-hooks.sh18
-rwxr-xr-xt/t5402-post-merge-hook.sh4
-rwxr-xr-xt/t5500-fetch-pack.sh4
-rwxr-xr-xt/t5510-fetch.sh12
-rwxr-xr-xt/t5520-pull.sh17
-rwxr-xr-xt/t5530-upload-pack-error.sh14
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh12
-rwxr-xr-xt/t5710-info-alternate.sh26
-rwxr-xr-xt/t6006-rev-list-format.sh10
-rwxr-xr-xt/t6009-rev-list-parent.sh38
-rwxr-xr-xt/t6023-merge-file.sh12
-rwxr-xr-xt/t6024-recursive-merge.sh2
-rwxr-xr-xt/t6025-merge-symlinks.sh21
-rwxr-xr-xt/t6030-bisect-porcelain.sh12
-rwxr-xr-xt/t6101-rev-parse-parents.sh2
-rwxr-xr-xt/t6300-for-each-ref.sh8
-rwxr-xr-xt/t7001-mv.sh16
-rwxr-xr-xt/t7002-grep.sh4
-rwxr-xr-xt/t7004-tag.sh36
-rwxr-xr-xt/t7005-editor.sh2
-rwxr-xr-xt/t7101-reset.sh24
-rwxr-xr-xt/t7103-reset-bare.sh28
-rwxr-xr-xt/t7201-co.sh16
-rwxr-xr-xt/t7400-submodule-basic.sh56
-rwxr-xr-xt/t7501-commit.sh58
-rwxr-xr-xt/t7502-commit.sh65
-rwxr-xr-xt/t7503-pre-commit-hook.sh4
-rwxr-xr-xt/t7504-commit-msg-hook.sh8
-rwxr-xr-xt/t7600-merge.sh4
-rwxr-xr-xt/t9001-send-email.sh38
-rwxr-xr-xt/t9100-git-svn-basic.sh28
-rwxr-xr-xt/t9106-git-svn-commit-diff-clobber.sh18
-rwxr-xr-xt/t9106-git-svn-dcommit-clobber-series.sh4
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh2
-rwxr-xr-xt/t9300-fast-import.sh24
-rwxr-xr-xt/t9400-git-cvsserver-server.sh47
-rw-r--r--t/test-lib.sh39
-rw-r--r--tag.c5
-rw-r--r--templates/hooks--pre-commit2
-rw-r--r--templates/hooks--update6
-rw-r--r--test-parse-options.c1
-rw-r--r--transport.c9
-rw-r--r--tree-walk.c10
-rw-r--r--utf8.c99
-rw-r--r--utf8.h5
-rw-r--r--wt-status.c2
377 files changed, 10292 insertions, 2921 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..6b9c715d2
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+* whitespace=!indent,trail,space
+*.[ch] whitespace
diff --git a/Documentation/.gitattributes b/Documentation/.gitattributes
new file mode 100644
index 000000000..ddb030137
--- /dev/null
+++ b/Documentation/.gitattributes
@@ -0,0 +1 @@
+*.txt whitespace
diff --git a/Documentation/Makefile b/Documentation/Makefile
index c4486d3d4..43781fb24 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -23,7 +23,7 @@ ARTICLES += everyday
ARTICLES += git-tools
ARTICLES += glossary
# with their own formatting rules.
-SP_ARTICLES = howto/revert-branch-rebase user-manual
+SP_ARTICLES = howto/revert-branch-rebase howto/using-merge-subtree user-manual
API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
SP_ARTICLES += $(API_DOCS)
SP_ARTICLES += technical/api-index
@@ -45,6 +45,7 @@ man7dir=$(mandir)/man7
ASCIIDOC=asciidoc
ASCIIDOC_EXTRA =
+MANPAGE_XSL = callouts.xsl
INSTALL?=install
RM ?= rm -f
DOC_REF = origin/man
@@ -65,6 +66,7 @@ ASCIIDOC_EXTRA += -a asciidoc7compatible
endif
ifdef DOCBOOK_XSL_172
ASCIIDOC_EXTRA += -a docbook-xsl-172
+MANPAGE_XSL = manpage-1.72.xsl
endif
#
@@ -145,7 +147,8 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
git.7 git.html: git.txt
clean:
- $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 *.texi *.texi+ git.info
+ $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
+ $(RM) *.texi *.texi+ git.info gitman.info
$(RM) howto-index.txt howto/*.html doc.dep
$(RM) technical/api-*.html technical/api-index.txt
$(RM) $(cmds_txt) *.made
@@ -158,7 +161,7 @@ $(MAN_HTML): %.html : %.txt
%.1 %.5 %.7 : %.xml
$(RM) $@
- xmlto -m callouts.xsl man $<
+ xmlto -m $(MANPAGE_XSL) man $<
%.xml : %.txt
$(RM) $@+ $@
@@ -224,6 +227,6 @@ install-webdoc : html
sh ./install-webdoc.sh $(WEBDOC_DEST)
quick-install:
- sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
+ sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
.PHONY: .FORCE-GIT-VERSION-FILE
diff --git a/Documentation/RelNotes-1.5.3.3.txt b/Documentation/RelNotes-1.5.3.3.txt
index 2a7bfdd5c..d21384695 100644
--- a/Documentation/RelNotes-1.5.3.3.txt
+++ b/Documentation/RelNotes-1.5.3.3.txt
@@ -12,7 +12,7 @@ Fixes since v1.5.3.2
* The default shell on some FreeBSD did not execute the
argument parsing code correctly and made git unusable.
- * git-svn incorrectly spawned pager even when the user user
+ * git-svn incorrectly spawned pager even when the user
explicitly asked not to.
* sample post-receive hook overquoted the envelope sender
diff --git a/Documentation/RelNotes-1.5.3.8.txt b/Documentation/RelNotes-1.5.3.8.txt
new file mode 100644
index 000000000..0e3ff58a4
--- /dev/null
+++ b/Documentation/RelNotes-1.5.3.8.txt
@@ -0,0 +1,25 @@
+GIT v1.5.3.8 Release Notes
+==========================
+
+Fixes since v1.5.3.7
+--------------------
+
+ * Some documentation used "email.com" as an example domain.
+
+ * git-svn fix to handle funky branch and project names going over
+ http/https correctly.
+
+ * git-svn fix to tone down a needlessly alarming warning message.
+
+ * git-clone did not correctly report errors while fetching over http.
+
+ * git-send-email added redundant Message-Id: header to the outgoing
+ e-mail when the patch text already had one.
+
+ * a read-beyond-end-of-buffer bug in configuration file updater was fixed.
+
+ * git-grep used to show the same hit repeatedly for unmerged paths.
+
+ * After amending the patch title in "git-am -i", the command did not
+ report the patch it applied with the updated title.
+
diff --git a/Documentation/RelNotes-1.5.4.txt b/Documentation/RelNotes-1.5.4.txt
index 528b26f7c..f1323b617 100644
--- a/Documentation/RelNotes-1.5.4.txt
+++ b/Documentation/RelNotes-1.5.4.txt
@@ -11,18 +11,31 @@ Removal
helper script lost all its users and has been removed.
+Temporarily disabled
+--------------------
+
+ * "git http-push" is known not to work well with cURL library older
+ than 7.16, and we had reports of repository corruption. It is
+ disabled on such platforms for now. Unfortunately, 1.5.3.8 shares
+ the same issue. In other words, this does not mean you will be
+ fine if you stick to an older git release. For now, please do not
+ use http-push from older git with cURL older than 7.16 if you
+ value your data. A proper fix will hopefully materialize in
+ later versions.
+
+
Deprecation notices
-------------------
- * The next feature release of git (this change is scheduled for v1.6.0)
- will by default install dashed form of commands (e.g. "git-commit")
- outside of users' normal $PATH, and will install only selected
- commands ("git" itself, and "gitk") in $PATH. This implies:
+ * From v1.6.0, git will by default install dashed form of commands
+ (e.g. "git-commit") outside of users' normal $PATH, and will install
+ only selected commands ("git" itself, and "gitk") in $PATH. This
+ implies:
- Using dashed forms of git commands (e.g. "git-commit") from the
command line has been informally deprecated since early 2006, but
now it officially is, and will be removed in the future. Use
- dashless forms (e.g. "git commit") instead.
+ dash-less forms (e.g. "git commit") instead.
- Using dashed forms from your scripts, without first prepending the
return value from "git --exec-path" to the scripts' PATH, has been
@@ -31,8 +44,8 @@ Deprecation notices
- Use of dashed forms with "PATH=$(git --exec-path):$PATH; export
PATH" early in your script is not deprecated with this change.
- Users are strongly encouraged to adjust their habits and scripts now
- to prepare for this.
+ Users are strongly encouraged to adjust their habits and scripts now
+ to prepare for this change.
* The post-receive hook was introduced in March 2007 to supersede
the post-update hook, primarily to overcome the command line length
@@ -46,6 +59,10 @@ Deprecation notices
and works for all transports; "git peek-remote" will be removed in
the future.
+ * "git repo-config" which was an old name for "git config" command
+ has been supported without being advertised for a long time. The
+ next feature release will remove it.
+
* From v1.6.0, the repack.usedeltabaseoffset config option will default
to true, which will give denser packfiles (i.e. more efficient storage).
The downside is that git older than version 1.4.4 will not be able
@@ -61,9 +78,9 @@ Deprecation notices
Updates since v1.5.3
--------------------
- * Comes with much improved gitk.
+ * Comes with much improved gitk, with i18n.
- * Comes with "git gui" 0.9.1 with i18n.
+ * Comes with git-gui 0.9.2 with i18n.
* gitk is now merged as a subdirectory of git.git project, in
preparation for its i18n.
@@ -91,6 +108,16 @@ Updates since v1.5.3
* "git diff" Porcelain now respects diff.external configuration, which
is another way to specify GIT_EXTERNAL_DIFF.
+ * "git diff" can be told to use different prefixes other than
+ "a/" and "b/" e.g. "git diff --src-prefix=l/ --dst-prefix=k/".
+
+ * "git diff" sometimes did not quote paths with funny
+ characters properly.
+
+ * "git log" (and any revision traversal commands) misbehaved
+ when --diff-filter is given but was not asked to actually
+ produce diff.
+
* HTTP proxy can be specified per remote repository using
remote.*.httpproxy configuration, or global http.proxy configuration
variable.
@@ -104,6 +131,9 @@ Updates since v1.5.3
* "git reset" is now built-in and its output can be squelched with -q.
+ * "git reset --hard" does not make any sense in a bare
+ repository, but did not error out; fixed.
+
* "git send-email" can optionally talk over ssmtp and use SMTP-AUTH.
* "git rebase" learned --whitespace option.
@@ -136,7 +166,7 @@ Updates since v1.5.3
command line in the generated log message, when told to cherry-pick a
commit by naming a tag that points at it. It does not anymore.
- * "git for-each-ref" learned %(xxxdate:<dateformat>) syntax to show the
+ * "git for-each-ref" learned %(xxxdate:<date-format>) syntax to show the
various date fields in different formats.
* "git gc --auto" is a low-impact way to automatically run a variant of
@@ -191,7 +221,7 @@ Updates since v1.5.3
* "git pull --rebase" is a different way to integrate what you fetched
into your current branch.
- * "git fast-export" produces datastream that can be fed to fast-import
+ * "git fast-export" produces data-stream that can be fed to fast-import
to reproduce the history recorded in a git repository.
* "git add -i" takes pathspecs to limit the set of files to work on.
@@ -199,7 +229,10 @@ Updates since v1.5.3
* "git add -p" is a short-hand to go directly to the selective patch
subcommand in the interactive command loop and to exit when done.
- * "git add -i" UI has been colorized.
+ * "git add -i" UI has been colorized. The interactive prompt
+ and menu can be colored by setting color.interactive
+ configuration. The diff output (including the hunk picker)
+ are colored with color.diff configuration.
* "git commit --allow-empty" allows you to create a single-parent
commit that records the same tree as its parent, overriding the usual
@@ -208,12 +241,21 @@ Updates since v1.5.3
* "git commit --amend" can amend a merge that does not change the tree
from its first parent.
+ * "git commit" used to unconditionally strip comment lines that
+ began with '#' and removed excess blank lines. This behavior has
+ been made configurable.
+
* "git commit" has been rewritten in C.
* "git stash random-text" does not create a new stash anymore. It was
a UI mistake. Use "git stash save random-text", or "git stash"
(without extra args) for that.
+ * "git stash clear extra-text" does not clear the whole stash
+ anymore. It is tempting to expect "git stash clear stash@{2}"
+ to drop only a single named stash entry, and it is rude to
+ discard everything when that is asked (but not provided).
+
* "git prune --expire <time>" can exempt young loose objects from
getting pruned.
@@ -251,6 +293,9 @@ Updates since v1.5.3
reasonable usability fix and people's scripts shouldn't have been
relying on the exact output from "git show" Porcelain anyway.
+ * "git cvsimport" did not notice errors from underlying "cvsps"
+ and produced a corrupt import silently.
+
* "git cvsexportcommit" learned -w option to specify and switch to the
CVS working directory.
@@ -282,7 +327,7 @@ Updates since v1.5.3
* "git status" from a subdirectory now shows relative paths, which
makes copy-and-pasting for git-checkout/git-add/git-rm easier. The
- traditional behaviour to show the full path relative to the top of
+ traditional behavior to show the full path relative to the top of
the work tree can be had by setting status.relativepaths
configuration variable to false.
@@ -297,7 +342,7 @@ Updates since v1.5.3
* "git help" learned "-w" option to show documentation in browsers.
- * In addition there are quite a few internal clean-ups. Notably
+ * In addition there are quite a few internal clean-ups. Notably:
- many fork/exec have been replaced with run-command API,
brought from the msysgit effort.
@@ -306,6 +351,7 @@ Updates since v1.5.3
- enhancement and more use of the strbuf API.
+ * Makefile tweaks to support HP-UX is in.
Fixes since v1.5.3
------------------
@@ -319,14 +365,13 @@ series.
* The way "git diff --check" behaves is much more consistent with the way
"git apply --whitespace=warn" works.
- * "git svn" talking with the SVN over http will correctly quote branch
+ * "git svn" talking with the SVN over HTTP will correctly quote branch
and project names.
* "git config" did not work correctly on platforms that define
REG_NOMATCH to an even number.
---
-exec >/var/tmp/1
-O=v1.5.4-rc0-85-gdbedf97
-echo O=`git describe refs/heads/master`
-git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint
+ * Recent versions of AsciiDoc 8 has a change to break our
+ documentation; a workaround has been implemented.
+
+ * "git diff --color-words" colored context lines in a wrong color.
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 99d8874aa..10c1a151a 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -1,6 +1,6 @@
-## gitlink: macro
+## linkgit: macro
#
-# Usage: gitlink:command[manpage-section]
+# Usage: linkgit:command[manpage-section]
#
# Note, {0} is the manpage section, while {target} is the command.
#
@@ -15,7 +15,7 @@ endsb=&#93;
tilde=&#126;
ifdef::backend-docbook[]
-[gitlink-inlinemacro]
+[linkgit-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
@@ -61,6 +61,6 @@ endif::backend-docbook[]
endif::doctype-manpage[]
ifdef::backend-xhtml11[]
-[gitlink-inlinemacro]
+[linkgit-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index 17379f057..c11bb7d36 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -39,7 +39,7 @@ of lines before or after the line given by <start>.
Show raw timestamp (Default: off).
-S <revs-file>::
- Use revs from revs-file instead of calling gitlink:git-rev-list[1].
+ Use revs from revs-file instead of calling linkgit:git-rev-list[1].
-p, --porcelain::
Show in a format designed for machine consumption.
@@ -52,7 +52,7 @@ of lines before or after the line given by <start>.
When <rev> is not specified, the command annotates the
changes starting backwards from the working tree copy.
This flag makes the command pretend as if the working
- tree copy has the contents of he named file (specify
+ tree copy has the contents of the named file (specify
`-` to make the command read from the standard input).
-M|<num>|::
diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl
index c2d55cdb5..04f99778d 100755
--- a/Documentation/cmd-list.perl
+++ b/Documentation/cmd-list.perl
@@ -27,7 +27,7 @@ sub format_one {
die "No description found in $name.txt";
}
if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) {
- print $out "gitlink:$name\[1\]::\n\t";
+ print $out "linkgit:$name\[1\]::\n\t";
if ($attr =~ / deprecated /) {
print $out "(deprecated) ";
}
diff --git a/Documentation/config.txt b/Documentation/config.txt
index ee0884545..f9bdb164e 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -115,7 +115,7 @@ porcelain configuration variables in the respective porcelain documentation.
core.fileMode::
If false, the executable bit differences between the index and
the working copy are ignored; useful on broken filesystems like FAT.
- See gitlink:git-update-index[1]. True by default.
+ See linkgit:git-update-index[1]. True by default.
core.quotepath::
The commands that output paths (e.g. `ls-files`,
@@ -141,8 +141,8 @@ core.autocrlf::
core.symlinks::
If false, symbolic links are checked out as small plain files that
- contain the link text. gitlink:git-update-index[1] and
- gitlink:git-add[1] will not change the recorded type to regular
+ contain the link text. linkgit:git-update-index[1] and
+ linkgit:git-add[1] will not change the recorded type to regular
file. Useful on filesystems like FAT that do not support
symbolic links. True by default.
@@ -163,7 +163,7 @@ core.ignoreStat::
The working copy files are assumed to stay unchanged until you
mark them otherwise manually - Git will not detect the file changes
by lstat() calls. This is useful on systems where those are very
- slow, such as Microsoft Windows. See gitlink:git-update-index[1].
+ slow, such as Microsoft Windows. See linkgit:git-update-index[1].
False by default.
core.preferSymlinkRefs::
@@ -176,10 +176,10 @@ core.bare::
If true this repository is assumed to be 'bare' and has no
working directory associated with it. If this is the case a
number of commands that require a working directory will be
- disabled, such as gitlink:git-add[1] or gitlink:git-merge[1].
+ disabled, such as linkgit:git-add[1] or linkgit:git-merge[1].
+
-This setting is automatically guessed by gitlink:git-clone[1] or
-gitlink:git-init[1] when the repository was created. By default a
+This setting is automatically guessed by linkgit:git-clone[1] or
+linkgit:git-init[1] when the repository was created. By default a
repository that ends in "/.git" is assumed to be not bare (bare =
false), while all other repositories are assumed to be bare (bare
= true).
@@ -216,7 +216,7 @@ core.sharedRepository::
group-writable). When 'all' (or 'world' or 'everybody'), the
repository will be readable by all users, additionally to being
group-shareable. When 'umask' (or 'false'), git will use permissions
- reported by umask(2). See gitlink:git-init[1]. False by default.
+ reported by umask(2). See linkgit:git-init[1]. False by default.
core.warnAmbiguousRefs::
If true, git will warn you if the ref name you passed it is ambiguous
@@ -281,7 +281,7 @@ core.excludesfile::
In addition to '.gitignore' (per-directory) and
'.git/info/exclude', git looks into this file for patterns
of files which are not meant to be tracked. See
- gitlink:gitignore[5].
+ linkgit:gitignore[5].
core.editor::
Commands such as `commit` and `tag` that lets you edit
@@ -310,7 +310,7 @@ core.whitespace::
space characters as an error (not enabled by default).
alias.*::
- Command aliases for the gitlink:git[1] command wrapper - e.g.
+ Command aliases for the linkgit:git[1] command wrapper - e.g.
after defining "alias.last = cat-file commit HEAD", the invocation
"git last" is equivalent to "git cat-file commit HEAD". To avoid
confusion and troubles with script usage, aliases that
@@ -326,14 +326,14 @@ it will be treated as a shell command. For example, defining
apply.whitespace::
Tells `git-apply` how to handle whitespaces, in the same way
- as the '--whitespace' option. See gitlink:git-apply[1].
+ as the '--whitespace' option. See linkgit:git-apply[1].
branch.autosetupmerge::
Tells `git-branch` and `git-checkout` to setup new branches
- so that gitlink:git-pull[1] will appropriately merge from that
+ so that linkgit:git-pull[1] will appropriately merge from that
remote branch. Note that even if this option is not set,
this behavior can be chosen per-branch using the `--track`
- and `--no-track` options. This option defaults to false.
+ and `--no-track` options. This option defaults to true.
branch.<name>.remote::
When in branch <name>, it tells `git fetch` which remote to fetch.
@@ -356,7 +356,7 @@ branch.<name>.merge::
branch.<name>.mergeoptions::
Sets default options for merging into branch <name>. The syntax and
- supported options are equal to that of gitlink:git-merge[1], but
+ supported options are equal to that of linkgit:git-merge[1], but
option values containing whitespace characters are currently not
supported.
@@ -364,16 +364,21 @@ branch.<name>.rebase::
When true, rebase the branch <name> on top of the fetched branch,
instead of merging the default branch from the default remote.
*NOTE*: this is a possibly dangerous operation; do *not* use
- it unless you understand the implications (see gitlink:git-rebase[1]
+ it unless you understand the implications (see linkgit:git-rebase[1]
for details).
+browser.<tool>.path::
+ Override the path for the given tool that may be used to
+ browse HTML help (see '-w' option in linkgit:git-help[1]) or a
+ working repository in gitweb (see linkgit:git-instaweb[1]).
+
clean.requireForce::
A boolean to make git-clean do nothing unless given -f
or -n. Defaults to true.
color.branch::
A boolean to enable/disable color in the output of
- gitlink:git-branch[1]. May be set to `always`,
+ linkgit:git-branch[1]. May be set to `always`,
`false` (or `never`) or `auto` (or `true`), in which case colors are used
only when the output is to a terminal. Defaults to false.
@@ -406,7 +411,8 @@ color.diff.<slot>::
in color.branch.<slot>.
color.interactive::
- When set to `always`, always use colors in `git add --interactive`.
+ When set to `always`, always use colors for interactive prompts
+ and displays (such as those used by "git add --interactive").
When false (or `never`), never. When set to `true` or `auto`, use
colors only when the output is to the terminal. Defaults to false.
@@ -423,7 +429,7 @@ color.pager::
color.status::
A boolean to enable/disable color in the output of
- gitlink:git-status[1]. May be set to `always`,
+ linkgit:git-status[1]. May be set to `always`,
`false` (or `never`) or `auto` (or `true`), in which case colors are used
only when the output is to a terminal. Defaults to false.
@@ -453,7 +459,7 @@ diff.external::
performed using the internal diff machinery, but using the
given command. Note: if you want to use an external diff
program only on a subset of your files, you might want to
- use gitlink:gitattributes[5] instead.
+ use linkgit:gitattributes[5] instead.
diff.renameLimit::
The number of files to consider when performing the copy/rename
@@ -472,17 +478,18 @@ fetch.unpackLimit::
exceeds this limit then the received pack will be stored as
a pack, after adding any missing delta bases. Storing the
pack from a push can make the push operation complete faster,
- especially on slow filesystems.
+ especially on slow filesystems. If not set, the value of
+ `transfer.unpackLimit` is used instead.
format.numbered::
A boolean which can enable sequence numbers in patch subjects.
Setting this option to "auto" will enable it only if there is
more than one patch. See --numbered option in
- gitlink:git-format-patch[1].
+ linkgit:git-format-patch[1].
format.headers::
Additional email headers to include in a patch to be submitted
- by mail. See gitlink:git-format-patch[1].
+ by mail. See linkgit:git-format-patch[1].
format.suffix::
The default for format-patch is to output files with the suffix
@@ -498,14 +505,14 @@ gc.auto::
When there are approximately more than this many loose
objects in the repository, `git gc --auto` will pack them.
Some Porcelain commands use this command to perform a
- light-weight garbage collection from time to time. Setting
- this to 0 disables it.
+ light-weight garbage collection from time to time. The
+ default value is 6700. Setting this to 0 disables it.
gc.autopacklimit::
When there are more than this many packs that are not
marked with `*.keep` file in the repository, `git gc
- --auto` consolidates them into one larger pack. Setting
- this to 0 disables this.
+ --auto` consolidates them into one larger pack. The
+ default value is 20. Setting this to 0 disables it.
gc.packrefs::
`git gc` does not run `git pack-refs` in a bare repository by
@@ -530,27 +537,27 @@ gc.reflogexpireunreachable::
gc.rerereresolved::
Records of conflicted merge you resolved earlier are
kept for this many days when `git rerere gc` is run.
- The default is 60 days. See gitlink:git-rerere[1].
+ The default is 60 days. See linkgit:git-rerere[1].
gc.rerereunresolved::
Records of conflicted merge you have not resolved are
kept for this many days when `git rerere gc` is run.
- The default is 15 days. See gitlink:git-rerere[1].
+ The default is 15 days. See linkgit:git-rerere[1].
rerere.enabled::
Activate recording of resolved conflicts, so that identical
conflict hunks can be resolved automatically, should they
- be encountered again. gitlink:git-rerere[1] command is by
- default enabled, but can be disabled by setting this option to
- false.
+ be encountered again. linkgit:git-rerere[1] command is by
+ default enabled if you create `rr-cache` directory under
+ `$GIT_DIR`, but can be disabled by setting this option to false.
gitcvs.enabled::
Whether the CVS server interface is enabled for this repository.
- See gitlink:git-cvsserver[1].
+ See linkgit:git-cvsserver[1].
gitcvs.logfile::
Path to a log file where the CVS server interface well... logs
- various stuff. See gitlink:git-cvsserver[1].
+ various stuff. See linkgit:git-cvsserver[1].
gitcvs.allbinary::
If true, all files are sent to the client in mode '-kb'. This
@@ -563,7 +570,7 @@ gitcvs.dbname::
derived from the git repository. The exact meaning depends on the
used database driver, for SQLite (which is the default driver) this
is a filename. Supports variable substitution (see
- gitlink:git-cvsserver[1] for details). May not contain semicolons (`;`).
+ linkgit:git-cvsserver[1] for details). May not contain semicolons (`;`).
Default: '%Ggitcvs.%m.sqlite'
gitcvs.dbdriver::
@@ -572,22 +579,31 @@ gitcvs.dbdriver::
with 'DBD::SQLite', reported to work with 'DBD::Pg', and
reported *not* to work with 'DBD::mysql'. Experimental feature.
May not contain double colons (`:`). Default: 'SQLite'.
- See gitlink:git-cvsserver[1].
+ See linkgit:git-cvsserver[1].
gitcvs.dbuser, gitcvs.dbpass::
Database user and password. Only useful if setting 'gitcvs.dbdriver',
since SQLite has no concept of database users and/or passwords.
'gitcvs.dbuser' supports variable substitution (see
- gitlink:git-cvsserver[1] for details).
+ linkgit:git-cvsserver[1] for details).
All gitcvs variables except for 'gitcvs.allbinary' can also be
specified as 'gitcvs.<access_method>.<varname>' (where 'access_method'
is one of "ext" and "pserver") to make them apply only for the given
access method.
+help.browser::
+ Specify the browser that will be used to display help in the
+ 'web' format. See linkgit:git-help[1].
+
+help.format::
+ Override the default help format used by linkgit:git-help[1].
+ Values 'man', 'info', 'web' and 'html' are supported. 'man' is
+ the default. 'web' and 'html' are the same.
+
http.proxy::
Override the HTTP proxy, normally configured using the 'http_proxy'
- environment variable (see gitlink:curl[1]). This can be overridden
+ environment variable (see linkgit:curl[1]). This can be overridden
on a per-remote basis; see remote.<name>.proxy
http.sslVerify::
@@ -636,16 +652,35 @@ i18n.commitEncoding::
does not care per se, but this information is necessary e.g. when
importing commits from emails or in the gitk graphical history
browser (and possibly at other places in the future or in other
- porcelains). See e.g. gitlink:git-mailinfo[1]. Defaults to 'utf-8'.
+ porcelains). See e.g. linkgit:git-mailinfo[1]. Defaults to 'utf-8'.
i18n.logOutputEncoding::
Character encoding the commit messages are converted to when
running `git-log` and friends.
+instaweb.browser::
+ Specify the program that will be used to browse your working
+ repository in gitweb. See linkgit:git-instaweb[1].
+
+instaweb.httpd::
+ The HTTP daemon command-line to start gitweb on your working
+ repository. See linkgit:git-instaweb[1].
+
+instaweb.local::
+ If true the web server started by linkgit:git-instaweb[1] will
+ be bound to the local IP (127.0.0.1).
+
+instaweb.modulepath::
+ The module path for an apache httpd used by linkgit:git-instaweb[1].
+
+instaweb.port::
+ The port number to bind the gitweb httpd to. See
+ linkgit:git-instaweb[1].
+
log.showroot::
If true, the initial commit will be shown as a big creation event.
This is equivalent to a diff against an empty tree.
- Tools like gitlink:git-log[1] or gitlink:git-whatchanged[1], which
+ Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
normally hide the root commit will now show it. True by default.
merge.summary::
@@ -654,7 +689,7 @@ merge.summary::
merge.tool::
Controls which merge resolution program is used by
- gitlink:git-mergetool[1]. Valid values are: "kdiff3", "tkdiff",
+ linkgit:git-mergetool[1]. Valid values are: "kdiff3", "tkdiff",
"meld", "xxdiff", "emerge", "vimdiff", "gvimdiff", and "opendiff".
merge.verbosity::
@@ -667,31 +702,31 @@ merge.verbosity::
merge.<driver>.name::
Defines a human readable name for a custom low-level
- merge driver. See gitlink:gitattributes[5] for details.
+ merge driver. See linkgit:gitattributes[5] for details.
merge.<driver>.driver::
Defines the command that implements a custom low-level
- merge driver. See gitlink:gitattributes[5] for details.
+ merge driver. See linkgit:gitattributes[5] for details.
merge.<driver>.recursive::
Names a low-level merge driver to be used when
performing an internal merge between common ancestors.
- See gitlink:gitattributes[5] for details.
+ See linkgit:gitattributes[5] for details.
mergetool.<tool>.path::
Override the path for the given tool. This is useful in case
your tool is not in the PATH.
pack.window::
- The size of the window used by gitlink:git-pack-objects[1] when no
+ The size of the window used by linkgit:git-pack-objects[1] when no
window size is given on the command line. Defaults to 10.
pack.depth::
- The maximum delta depth used by gitlink:git-pack-objects[1] when no
+ The maximum delta depth used by linkgit:git-pack-objects[1] when no
maximum depth is given on the command line. Defaults to 50.
pack.windowMemory::
- The window memory size limit used by gitlink:git-pack-objects[1]
+ The window memory size limit used by linkgit:git-pack-objects[1]
when no limit is given on the command line. The value can be
suffixed with "k", "m", or "g". Defaults to 0, meaning no
limit.
@@ -707,16 +742,16 @@ pack.compression::
pack.deltaCacheSize::
The maximum memory in bytes used for caching deltas in
- gitlink:git-pack-objects[1].
+ linkgit:git-pack-objects[1].
A value of 0 means no limit. Defaults to 0.
pack.deltaCacheLimit::
The maximum size of a delta, that is cached in
- gitlink:git-pack-objects[1]. Defaults to 1000.
+ linkgit:git-pack-objects[1]. Defaults to 1000.
pack.threads::
Specifies the number of threads to spawn when searching for best
- delta matches. This requires that gitlink:git-pack-objects[1]
+ delta matches. This requires that linkgit:git-pack-objects[1]
be compiled with pthreads otherwise this option is ignored with a
warning. This is meant to reduce packing time on multiprocessor
machines. The required amount of memory for the delta search window
@@ -731,6 +766,12 @@ pack.indexVersion::
whenever the corresponding pack is larger than 2 GB. Otherwise
the default is 1.
+pack.packSizeLimit:
+ The default maximum size of a pack. This setting only affects
+ packing to a file, i.e. the git:// protocol is unaffected. It
+ can be overridden by the `\--max-pack-size` option of
+ linkgit:git-repack[1].
+
pull.octopus::
The default merge strategy to use when pulling multiple branches
at once.
@@ -739,8 +780,8 @@ pull.twohead::
The default merge strategy to use when pulling a single branch.
remote.<name>.url::
- The URL of a remote repository. See gitlink:git-fetch[1] or
- gitlink:git-push[1].
+ The URL of a remote repository. See linkgit:git-fetch[1] or
+ linkgit:git-push[1].
remote.<name>.proxy::
For remotes that require curl (http, https and ftp), the URL to
@@ -748,24 +789,24 @@ remote.<name>.proxy::
disable proxying for that remote.
remote.<name>.fetch::
- The default set of "refspec" for gitlink:git-fetch[1]. See
- gitlink:git-fetch[1].
+ The default set of "refspec" for linkgit:git-fetch[1]. See
+ linkgit:git-fetch[1].
remote.<name>.push::
- The default set of "refspec" for gitlink:git-push[1]. See
- gitlink:git-push[1].
+ The default set of "refspec" for linkgit:git-push[1]. See
+ linkgit:git-push[1].
remote.<name>.skipDefaultUpdate::
If true, this remote will be skipped by default when updating
- using the remote subcommand of gitlink:git-remote[1].
+ using the update subcommand of linkgit:git-remote[1].
remote.<name>.receivepack::
The default program to execute on the remote side when pushing. See
- option \--exec of gitlink:git-push[1].
+ option \--exec of linkgit:git-push[1].
remote.<name>.uploadpack::
The default program to execute on the remote side when fetching. See
- option \--exec of gitlink:git-fetch-pack[1].
+ option \--exec of linkgit:git-fetch-pack[1].
remote.<name>.tagopt::
Setting this value to --no-tags disables automatic tag following when fetching
@@ -773,22 +814,22 @@ remote.<name>.tagopt::
remotes.<group>::
The list of remotes which are fetched by "git remote update
- <group>". See gitlink:git-remote[1].
+ <group>". See linkgit:git-remote[1].
repack.usedeltabaseoffset::
- Allow gitlink:git-repack[1] to create packs that uses
+ Allow linkgit:git-repack[1] to create packs that uses
delta-base offset. Defaults to false.
show.difftree::
- The default gitlink:git-diff-tree[1] arguments to be used
- for gitlink:git-show[1].
+ The default linkgit:git-diff-tree[1] arguments to be used
+ for linkgit:git-show[1].
showbranch.default::
- The default set of branches for gitlink:git-show-branch[1].
- See gitlink:git-show-branch[1].
+ The default set of branches for linkgit:git-show-branch[1].
+ See linkgit:git-show-branch[1].
status.relativePaths::
- By default, gitlink:git-status[1] shows paths relative to the
+ By default, linkgit:git-status[1] shows paths relative to the
current directory. Setting this variable to `false` shows paths
relative to the repository root (this was the default for git
prior to v1.5.4).
@@ -798,32 +839,32 @@ tar.umask::
tar archive entries. The default is 0002, which turns off the
world write bit. The special value "user" indicates that the
archiving user's umask will be used instead. See umask(2) and
- gitlink:git-archive[1].
+ linkgit:git-archive[1].
user.email::
Your email address to be recorded in any newly created commits.
Can be overridden by the 'GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL', and
- 'EMAIL' environment variables. See gitlink:git-commit-tree[1].
+ 'EMAIL' environment variables. See linkgit:git-commit-tree[1].
user.name::
Your full name to be recorded in any newly created commits.
Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME'
- environment variables. See gitlink:git-commit-tree[1].
+ environment variables. See linkgit:git-commit-tree[1].
user.signingkey::
- If gitlink:git-tag[1] is not selecting the key you want it to
+ If linkgit:git-tag[1] is not selecting the key you want it to
automatically when creating a signed tag, you can override the
default selection with this variable. This option is passed
unchanged to gpg's --local-user parameter, so you may specify a key
using any method that gpg supports.
whatchanged.difftree::
- The default gitlink:git-diff-tree[1] arguments to be used
- for gitlink:git-whatchanged[1].
+ The default linkgit:git-diff-tree[1] arguments to be used
+ for linkgit:git-whatchanged[1].
imap::
The configuration variables in the 'imap' section are described
- in gitlink:git-imap-send[1].
+ in linkgit:git-imap-send[1].
receive.unpackLimit::
If the number of objects received in a push is below this
@@ -832,7 +873,8 @@ receive.unpackLimit::
exceeds this limit then the received pack will be stored as
a pack, after adding any missing delta bases. Storing the
pack from a push can make the push operation complete faster,
- especially on slow filesystems.
+ especially on slow filesystems. If not set, the value of
+ `transfer.unpackLimit` is used instead.
receive.denyNonFastForwards::
If set to true, git-receive-pack will deny a ref update which is
@@ -843,3 +885,9 @@ receive.denyNonFastForwards::
transfer.unpackLimit::
When `fetch.unpackLimit` or `receive.unpackLimit` are
not set, the value of this variable is used instead.
+ The default value is 100.
+
+web.browser::
+ Specify a web browser that may be used by some commands.
+ Currently only linkgit:git-instaweb[1] and linkgit:git-help[1]
+ may use it.
diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt
index bd6cd4124..aa40dfd36 100644
--- a/Documentation/core-tutorial.txt
+++ b/Documentation/core-tutorial.txt
@@ -578,7 +578,7 @@ particular state. You can, for example, do
$ git diff my-first-tag
----------------
-to diff your current state against that tag (which at this point will
+to diff your current state against that tag which at this point will
obviously be an empty diff, but if you continue to develop and commit
stuff, you can use your tag as an "anchor-point" to see what has changed
since you tagged it.
diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt
index 3b6b49416..ea9890022 100644
--- a/Documentation/cvs-migration.txt
+++ b/Documentation/cvs-migration.txt
@@ -36,12 +36,12 @@ them first before running git pull.
================================
The `pull` command knows where to get updates from because of certain
configuration variables that were set by the first `git clone`
-command; see `git config -l` and the gitlink:git-config[1] man
+command; see `git config -l` and the linkgit:git-config[1] man
page for details.
================================
You can update the shared repository with your changes by first committing
-your changes, and then using the gitlink:git-push[1] command:
+your changes, and then using the linkgit:git-push[1] command:
------------------------------------------------
$ git push origin master
@@ -88,7 +88,7 @@ Next, give every team member read/write access to this repository. One
easy way to do this is to give all the team members ssh access to the
machine where the repository is hosted. If you don't want to give them a
full shell on the machine, there is a restricted shell which only allows
-users to do git pushes and pulls; see gitlink:git-shell[1].
+users to do git pushes and pulls; see linkgit:git-shell[1].
Put all the committers in the same group, and make the repository
writable by that group:
@@ -106,7 +106,7 @@ Importing a CVS archive
First, install version 2.1 or higher of cvsps from
link:http://www.cobite.com/cvsps/[http://www.cobite.com/cvsps/] and make
sure it is in your path. Then cd to a checked out CVS working directory
-of the project you are interested in and run gitlink:git-cvsimport[1]:
+of the project you are interested in and run linkgit:git-cvsimport[1]:
-------------------------------------------
$ git cvsimport -C <destination> <module>
@@ -146,7 +146,7 @@ Providing CVS Access to a git Repository
----------------------------------------
It is also possible to provide true CVS access to a git repository, so
-that developers can still use CVS; see gitlink:git-cvsserver[1] for
+that developers can still use CVS; see linkgit:git-cvsserver[1] for
details.
Alternative Development Models
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 1a78635fb..8d35cbd60 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -205,8 +205,8 @@ endif::git-format-patch[]
--ext-diff::
Allow an external diff helper to be executed. If you set an
- external diff driver with gitlink:gitattributes[5], you need
- to use this option with gitlink:git-log[1] and friends.
+ external diff driver with linkgit:gitattributes[5], you need
+ to use this option with linkgit:git-log[1] and friends.
--no-ext-diff::
Disallow external diff drivers.
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index f1993e293..fdbd15a18 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -25,12 +25,12 @@ Basic Repository[[Basic Repository]]
Everybody uses these commands to maintain git repositories.
- * gitlink:git-init[1] or gitlink:git-clone[1] to create a
+ * linkgit:git-init[1] or linkgit:git-clone[1] to create a
new repository.
- * gitlink:git-fsck[1] to check the repository for errors.
+ * linkgit:git-fsck[1] to check the repository for errors.
- * gitlink:git-gc[1] to do common housekeeping tasks such as
+ * linkgit:git-gc[1] to do common housekeeping tasks such as
repack and prune.
Examples
@@ -69,28 +69,28 @@ A standalone individual developer does not exchange patches with
other people, and works alone in a single repository, using the
following commands.
- * gitlink:git-show-branch[1] to see where you are.
+ * linkgit:git-show-branch[1] to see where you are.
- * gitlink:git-log[1] to see what happened.
+ * linkgit:git-log[1] to see what happened.
- * gitlink:git-checkout[1] and gitlink:git-branch[1] to switch
+ * linkgit:git-checkout[1] and linkgit:git-branch[1] to switch
branches.
- * gitlink:git-add[1] to manage the index file.
+ * linkgit:git-add[1] to manage the index file.
- * gitlink:git-diff[1] and gitlink:git-status[1] to see what
+ * linkgit:git-diff[1] and linkgit:git-status[1] to see what
you are in the middle of doing.
- * gitlink:git-commit[1] to advance the current branch.
+ * linkgit:git-commit[1] to advance the current branch.
- * gitlink:git-reset[1] and gitlink:git-checkout[1] (with
+ * linkgit:git-reset[1] and linkgit:git-checkout[1] (with
pathname parameters) to undo changes.
- * gitlink:git-merge[1] to merge between local branches.
+ * linkgit:git-merge[1] to merge between local branches.
- * gitlink:git-rebase[1] to maintain topic branches.
+ * linkgit:git-rebase[1] to maintain topic branches.
- * gitlink:git-tag[1] to mark known point.
+ * linkgit:git-tag[1] to mark known point.
Examples
~~~~~~~~
@@ -156,16 +156,16 @@ A developer working as a participant in a group project needs to
learn how to communicate with others, and uses these commands in
addition to the ones needed by a standalone developer.
- * gitlink:git-clone[1] from the upstream to prime your local
+ * linkgit:git-clone[1] from the upstream to prime your local
repository.
- * gitlink:git-pull[1] and gitlink:git-fetch[1] from "origin"
+ * linkgit:git-pull[1] and linkgit:git-fetch[1] from "origin"
to keep up-to-date with the upstream.
- * gitlink:git-push[1] to shared repository, if you adopt CVS
+ * linkgit:git-push[1] to shared repository, if you adopt CVS
style shared repository workflow.
- * gitlink:git-format-patch[1] to prepare e-mail submission, if
+ * linkgit:git-format-patch[1] to prepare e-mail submission, if
you adopt Linux kernel-style public forum workflow.
Examples
@@ -258,17 +258,17 @@ project receives changes made by others, reviews and integrates
them and publishes the result for others to use, using these
commands in addition to the ones needed by participants.
- * gitlink:git-am[1] to apply patches e-mailed in from your
+ * linkgit:git-am[1] to apply patches e-mailed in from your
contributors.
- * gitlink:git-pull[1] to merge from your trusted lieutenants.
+ * linkgit:git-pull[1] to merge from your trusted lieutenants.
- * gitlink:git-format-patch[1] to prepare and send suggested
+ * linkgit:git-format-patch[1] to prepare and send suggested
alternative to contributors.
- * gitlink:git-revert[1] to undo botched commits.
+ * linkgit:git-revert[1] to undo botched commits.
- * gitlink:git-push[1] to publish the bleeding edge.
+ * linkgit:git-push[1] to publish the bleeding edge.
Examples
@@ -343,10 +343,10 @@ Repository Administration[[Repository Administration]]
A repository administrator uses the following tools to set up
and maintain access to the repository by developers.
- * gitlink:git-daemon[1] to allow anonymous download from
+ * linkgit:git-daemon[1] to allow anonymous download from
repository.
- * gitlink:git-shell[1] can be used as a 'restricted login shell'
+ * linkgit:git-shell[1] can be used as a 'restricted login shell'
for shared central repository users.
link:howto/update-hook-example.txt[update hook howto] has a good
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index da034223f..b67591148 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -23,11 +23,15 @@
fetches is a descendant of `<lbranch>`. This option
overrides that check.
+ifdef::git-pull[]
+\--no-tags::
+endif::git-pull[]
+ifndef::git-pull[]
-n, \--no-tags::
- By default, `git-fetch` fetches tags that point at
- objects that are downloaded from the remote repository
- and stores them locally. This option disables this
- automatic tag following.
+endif::git-pull[]
+ By default, tags that point at objects that are downloaded
+ from the remote repository are fetched and stored locally.
+ This option disables this automatic tag following.
-t, \--tags::
Most of the tags are fetched automatically as branch
@@ -50,5 +54,5 @@
\--depth=<depth>::
Deepen the history of a 'shallow' repository created by
- `git clone` with `--depth=<depth>` option (see gitlink:git-clone[1])
+ `git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
by the specified number of commits.
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 721ca998c..9d2ac865d 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -37,7 +37,7 @@ directory recursion or filename globbing performed by Git (quote your
globs before the shell) will be silently ignored. The 'add' command can
be used to add ignored files with the `-f` (force) option.
-Please see gitlink:git-commit[1] for alternative ways to add content to a
+Please see linkgit:git-commit[1] for alternative ways to add content to a
commit.
@@ -231,12 +231,12 @@ diff::
See Also
--------
-gitlink:git-status[1]
-gitlink:git-rm[1]
-gitlink:git-reset[1]
-gitlink:git-mv[1]
-gitlink:git-commit[1]
-gitlink:git-update-index[1]
+linkgit:git-status[1]
+linkgit:git-rm[1]
+linkgit:git-reset[1]
+linkgit:git-mv[1]
+linkgit:git-commit[1]
+linkgit:git-update-index[1]
Author
------
@@ -248,4 +248,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index e4a6b3a6f..2ffba2102 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -37,10 +37,10 @@ OPTIONS
area to store extracted patches.
-k, --keep::
- Pass `-k` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
+ Pass `-k` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
-u, --utf8::
- Pass `-u` flag to `git-mailinfo` (see gitlink:git-mailinfo[1]).
+ Pass `-u` flag to `git-mailinfo` (see linkgit:git-mailinfo[1]).
The proposed commit log message taken from the e-mail
is re-coded into UTF-8 encoding (configuration variable
`i18n.commitencoding` can be used to specify project's
@@ -51,7 +51,7 @@ default. You could use `--no-utf8` to override this.
--no-utf8::
Pass `-n` flag to `git-mailinfo` (see
- gitlink:git-mailinfo[1]).
+ linkgit:git-mailinfo[1]).
-3, --3way::
When the patch does not apply cleanly, fall back on
@@ -61,15 +61,15 @@ default. You could use `--no-utf8` to override this.
-b, --binary::
Pass `--allow-binary-replacement` flag to `git-apply`
- (see gitlink:git-apply[1]).
+ (see linkgit:git-apply[1]).
--whitespace=<option>::
- This flag is passed to the `git-apply` (see gitlink:git-apply[1])
+ This flag is passed to the `git-apply` (see linkgit:git-apply[1])
program that applies
the patch.
-C<n>, -p<n>::
- These flags are passed to the `git-apply` (see gitlink:git-apply[1])
+ These flags are passed to the `git-apply` (see linkgit:git-apply[1])
program that applies
the patch.
@@ -144,7 +144,7 @@ names.
SEE ALSO
--------
-gitlink:git-apply[1].
+linkgit:git-apply[1].
Author
@@ -157,4 +157,4 @@ Documentation by Petr Baudis, Junio C Hamano and the git-list <git@vger.kernel.o
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt
index 02dc4740d..45a6a7251 100644
--- a/Documentation/git-annotate.txt
+++ b/Documentation/git-annotate.txt
@@ -20,7 +20,7 @@ include::blame-options.txt[]
SEE ALSO
--------
-gitlink:git-blame[1]
+linkgit:git-blame[1]
AUTHOR
------
@@ -28,4 +28,4 @@ Written by Ryan Anderson <ryan@michonline.com>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 9ec38f92b..2dec2ec1c 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -77,7 +77,7 @@ the information is read from the current index instead.
Apply the patch in reverse.
--reject::
- For atomicity, gitlink:git-apply[1] by default fails the whole patch and
+ For atomicity, linkgit:git-apply[1] by default fails the whole patch and
does not touch the working tree when some of the hunks
do not apply. This option makes it apply
the parts of the patch that are applicable, and leave the
@@ -101,7 +101,7 @@ the information is read from the current index instead.
ever ignored.
--unidiff-zero::
- By default, gitlink:git-apply[1] expects that the patch being
+ By default, linkgit:git-apply[1] expects that the patch being
applied is a unified diff with at least one line of context.
This provides good safety measures, but breaks down when
applying a diff generated with --unified=0. To bypass these
@@ -112,7 +112,7 @@ discouraged.
--apply::
If you use any of the options marked "Turns off
- 'apply'" above, gitlink:git-apply[1] reads and outputs the
+ 'apply'" above, linkgit:git-apply[1] reads and outputs the
information you asked without actually applying the
patch. Give this flag after those flags to also apply
the patch.
@@ -145,7 +145,7 @@ discouraged.
considered whitespace errors.
+
By default, the command outputs warning messages but applies the patch.
-When gitlink:git-apply[1] is used for statistics and not applying a
+When linkgit:git-apply[1] is used for statistics and not applying a
patch, it defaults to `nowarn`.
+
You can use different `<action>` to control this
@@ -183,7 +183,7 @@ apply.whitespace::
Submodules
----------
-If the patch contains any changes to submodules then gitlink:git-apply[1]
+If the patch contains any changes to submodules then linkgit:git-apply[1]
treats these changes as follows.
If --index is specified (explicitly or implicitly), then the submodule
@@ -206,4 +206,4 @@ Documentation by Junio C Hamano
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-archimport.txt b/Documentation/git-archimport.txt
index 7091b8d61..bd20fd820 100644
--- a/Documentation/git-archimport.txt
+++ b/Documentation/git-archimport.txt
@@ -117,4 +117,4 @@ Documentation by Junio C Hamano, Martin Langhoff and the git-list <git@vger.kern
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 7cd652655..d3eaa16af 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -118,4 +118,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 8b9d61a8a..96585ae8d 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -227,4 +227,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index 66f120370..14163b65f 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -21,7 +21,7 @@ last modified the line. Optionally, start annotating from the given revision.
Also it can limit the range of lines annotated.
This report doesn't tell you anything about lines which have been deleted or
-replaced; you need to use a tool such as gitlink:git-diff[1] or the "pickaxe"
+replaced; you need to use a tool such as linkgit:git-diff[1] or the "pickaxe"
interface briefly mentioned in the following paragraph.
Apart from supporting file annotation, git also supports searching the
@@ -41,7 +41,7 @@ OPTIONS
include::blame-options.txt[]
-c::
- Use the same output mode as gitlink:git-annotate[1] (Default: off).
+ Use the same output mode as linkgit:git-annotate[1] (Default: off).
--score-debug::
Include debugging information related to the movement of
@@ -184,7 +184,7 @@ commit commentary), a blame viewer won't ever care.
SEE ALSO
--------
-gitlink:git-annotate[1]
+linkgit:git-annotate[1]
AUTHOR
------
@@ -192,4 +192,4 @@ Written by Junio C Hamano <junkio@cox.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index d3f21c797..7e8874aca 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -34,11 +34,11 @@ Note that this will create the new branch, but it will not switch the
working tree to it; use "git checkout <newbranch>" to switch to the
new branch.
-When a local branch is started off a remote branch, git can setup the
-branch so that gitlink:git-pull[1] will appropriately merge from that
-remote branch. If this behavior is desired, it is possible to make it
-the default using the global `branch.autosetupmerge` configuration
-flag. Otherwise, it can be chosen per-branch using the `--track`
+When a local branch is started off a remote branch, git sets up the
+branch so that linkgit:git-pull[1] will appropriately merge from that
+remote branch. If this behavior is not desired, it is possible to
+disable it using the global `branch.autosetupmerge` configuration
+flag. That setting can be overridden by using the `--track`
and `--no-track` options.
With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
@@ -53,8 +53,8 @@ has a reflog then the reflog will also be deleted.
Use -r together with -d to delete remote-tracking branches. Note, that it
only makes sense to delete remote-tracking branches if they no longer exist
-in remote repository or if gitlink:git-fetch[1] was configured not to fetch
-them again. See also 'prune' subcommand of gitlink:git-remote[1] for way to
+in remote repository or if linkgit:git-fetch[1] was configured not to fetch
+them again. See also 'prune' subcommand of linkgit:git-remote[1] for way to
clean up all obsolete remote-tracking branches.
@@ -108,10 +108,11 @@ OPTIONS
Set up configuration so that git-pull will automatically
retrieve data from the remote branch. Use this if you always
pull from the same remote branch into the new branch, or if you
- don't want to use "git pull <repository> <refspec>" explicitly. Set the
- branch.autosetupmerge configuration variable to true if you
+ don't want to use "git pull <repository> <refspec>" explicitly.
+ This behavior is the default. Set the
+ branch.autosetupmerge configuration variable to false if you
want git-checkout and git-branch to always behave as if
- '--track' were given.
+ '--no-track' were given.
--no-track::
When a branch is created off a remote branch,
@@ -122,7 +123,7 @@ OPTIONS
<branchname>::
The name of the branch to create or delete.
The new branch name must pass all checks defined by
- gitlink:git-check-ref-format[1]. Some of these checks
+ linkgit:git-check-ref-format[1]. Some of these checks
may restrict the characters allowed in a branch name.
<start-point>::
@@ -164,7 +165,7 @@ $ git branch -D test <2>
+
<1> Delete remote-tracking branches "todo", "html", "man". Next 'fetch' or
'pull' will create them again unless you configure them not to. See
-gitlink:git-fetch[1].
+linkgit:git-fetch[1].
<2> Delete "test" branch even if the "master" branch (or whichever branch is
currently checked out) does not have all commits from test branch.
@@ -187,4 +188,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 0cc6511bd..72f080a97 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -23,7 +23,7 @@ be directly connected so the interactive git protocols (git, ssh,
rsync, http) cannot be used. This command provides support for
git-fetch and git-pull to operate by packaging objects and references
in an archive at the originating machine, then importing those into
-another repository using gitlink:git-fetch[1] and gitlink:git-pull[1]
+another repository using linkgit:git-fetch[1] and linkgit:git-pull[1]
after moving the archive by some means (i.e., by sneakernet). As no
direct connection between repositories exists, the user must specify a
basis for the bundle that is held by the destination repository: the
@@ -51,12 +51,12 @@ list-heads <file>::
printed out.
unbundle <file>::
- Passes the objects in the bundle to gitlink:git-index-pack[1]
+ Passes the objects in the bundle to linkgit:git-index-pack[1]
for storage in the repository, then prints the names of all
defined references. If a reflist is given, only references
matching those in the given list are printed. This command is
really plumbing, intended to be called only by
- gitlink:git-fetch[1].
+ linkgit:git-fetch[1].
[git-rev-list-args...]::
A list of arguments, acceptable to git-rev-parse and
@@ -73,7 +73,7 @@ unbundle <file>::
available. This is principally of use to git-fetch, which
expects to receive only those references asked for and not
necessarily everything in the pack (in this case, git-bundle is
- acting like gitlink:git-fetch-pack[1]).
+ acting like linkgit:git-fetch-pack[1]).
SPECIFYING REFERENCES
---------------------
@@ -145,4 +145,4 @@ Written by Mark Levedahl <mdl123@verizon.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
index afa095c79..df42cb10f 100644
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -21,7 +21,7 @@ OPTIONS
<object>::
The name of the object to show.
For a more complete list of ways to spell object names, see
- "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+ "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
-t::
Instead of the content, show the object type identified by
@@ -70,4 +70,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt
index 856d2af2e..290f10f16 100644
--- a/Documentation/git-check-attr.txt
+++ b/Documentation/git-check-attr.txt
@@ -23,6 +23,11 @@ OPTIONS
be treated as an attribute.
+SEE ALSO
+--------
+linkgit:gitattributes[5].
+
+
Author
------
Written by Junio C Hamano <junkio@cox.net>
@@ -33,4 +38,4 @@ Documentation by James Bowes.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index 13a5f4304..a67688042 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -35,7 +35,7 @@ imposes the following rules on how refs are named:
These rules makes it easy for shell script based tools to parse
refnames, pathname expansion by the shell when a refname is used
unquoted (by mistake), and also avoids ambiguities in certain
-refname expressions (see gitlink:git-rev-parse[1]). Namely:
+refname expressions (see linkgit:git-rev-parse[1]). Namely:
. double-dot `..` are often used as in `ref1..ref2`, and in some
context this notation means `{caret}ref1 ref2` (i.e. not in
@@ -47,9 +47,9 @@ refname expressions (see gitlink:git-rev-parse[1]). Namely:
. colon `:` is used as in `srcref:dstref` to mean "use srcref\'s
value and store it in dstref" in fetch and push operations.
It may also be used to select a specific object such as with
- gitlink:git-cat-file[1] "git-cat-file blob v1.3.3:refs.c".
+ linkgit:git-cat-file[1] "git-cat-file blob v1.3.3:refs.c".
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt
index b1a8ce110..cbbb0b509 100644
--- a/Documentation/git-checkout-index.txt
+++ b/Documentation/git-checkout-index.txt
@@ -181,4 +181,4 @@ Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 2e58481ed..b4cfa044b 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -44,7 +44,7 @@ OPTIONS
-b::
Create a new branch named <new_branch> and start it at
<branch>. The new branch name must pass all checks defined
- by gitlink:git-check-ref-format[1]. Some of these checks
+ by linkgit:git-check-ref-format[1]. Some of these checks
may restrict the characters allowed in a branch name.
--track::
@@ -52,10 +52,11 @@ OPTIONS
set up configuration so that git-pull will automatically
retrieve data from the remote branch. Use this if you always
pull from the same remote branch into the new branch, or if you
- don't want to use "git pull <repository> <refspec>" explicitly. Set the
- branch.autosetupmerge configuration variable to true if you
+ don't want to use "git pull <repository> <refspec>" explicitly.
+ This behavior is the default. Set the
+ branch.autosetupmerge configuration variable to false if you
want git-checkout and git-branch to always behave as if
- '--track' were given.
+ '--no-track' were given.
--no-track::
When -b is given and a branch is created off a remote branch,
@@ -216,4 +217,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 937c4a792..877ab66ef 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -20,11 +20,11 @@ OPTIONS
<commit>::
Commit to cherry-pick.
For a more complete list of ways to spell commits, see
- "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+ "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
-e|--edit::
With this option, `git-cherry-pick` will let you edit the commit
- message prior committing.
+ message prior to committing.
-x::
When recording the commit, append to the original commit
@@ -75,4 +75,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt
index e6943822c..b0468aa74 100644
--- a/Documentation/git-cherry.txt
+++ b/Documentation/git-cherry.txt
@@ -66,4 +66,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-citool.txt b/Documentation/git-citool.txt
index 5217ab223..aca1d75e5 100644
--- a/Documentation/git-citool.txt
+++ b/Documentation/git-citool.txt
@@ -14,10 +14,10 @@ DESCRIPTION
A Tcl/Tk based graphical interface to review modified files, stage
them into the index, enter a commit message and record the new
commit onto the current branch. This interface is an alternative
-to the less interactive gitlink:git-commit[1] program.
+to the less interactive linkgit:git-commit[1] program.
git-citool is actually a standard alias for 'git gui citool'.
-See gitlink:git-gui[1] for more details.
+See linkgit:git-gui[1] for more details.
Author
------
@@ -29,4 +29,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index e3252d59d..5e9da036b 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -39,7 +39,7 @@ OPTIONS
-x::
Don't use the ignore rules. This allows removing all untracked
files, including build products. This can be used (possibly in
- conjunction with gitlink:git-reset[1]) to create a pristine
+ conjunction with linkgit:git-reset[1]) to create a pristine
working directory to test a clean build.
-X::
@@ -54,4 +54,4 @@ Written by Pavel Roskin <proski@gnu.org>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index c90bcece2..234188161 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -62,6 +62,14 @@ OPTIONS
.git/objects/info/alternates to share the objects
with the source repository. The resulting repository
starts out without any object of its own.
+ *NOTE*: this is a possibly dangerous operation; do *not* use
+ it unless you understand what it does. If you clone your
+ repository using this option, then delete branches in the
+ source repository and then run linkgit:git-gc[1] using the
+ '--prune' option in the source repository, it may remove
+ objects which are referenced by the cloned repository.
+
+
--reference <repository>::
If the reference repository is on the local machine
@@ -191,4 +199,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index a2537e179..170803a6d 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -13,7 +13,7 @@ SYNOPSIS
DESCRIPTION
-----------
This is usually not what an end user wants to run directly. See
-gitlink:git-commit[1] instead.
+linkgit:git-commit[1] instead.
Creates a new commit object based on the provided tree object and
emits the new commit object id on stdout. If no parent is given then
@@ -90,7 +90,7 @@ include::i18n.txt[]
See Also
--------
-gitlink:git-write-tree[1]
+linkgit:git-write-tree[1]
Author
@@ -103,4 +103,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 426138415..c3725b2ed 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -11,7 +11,7 @@ SYNOPSIS
'git-commit' [-a | --interactive] [-s] [-v] [-u]
[(-c | -C) <commit> | -F <file> | -m <msg> | --amend]
[--allow-empty] [--no-verify] [-e] [--author <author>]
- [--] [[-i | -o ]<file>...]
+ [--cleanup=<mode>] [--] [[-i | -o ]<file>...]
DESCRIPTION
-----------
@@ -20,11 +20,11 @@ commit along with a log message describing the changes you have made.
The content to be added can be specified in several ways:
-1. by using gitlink:git-add[1] to incrementally "add" changes to the
+1. by using linkgit:git-add[1] to incrementally "add" changes to the
index before using the 'commit' command (Note: even modified
files must be "added");
-2. by using gitlink:git-rm[1] to remove files from the working tree
+2. by using linkgit:git-rm[1] to remove files from the working tree
and the index, again before using the 'commit' command;
3. by listing files as arguments to the 'commit' command, in which
@@ -41,13 +41,13 @@ The content to be added can be specified in several ways:
by one which files should be part of the commit, before finalizing the
operation. Currently, this is done by invoking `git-add --interactive`.
-The gitlink:git-status[1] command can be used to obtain a
+The linkgit:git-status[1] command can be used to obtain a
summary of what is included by any of the above for the next
commit by giving the same set of parameters you would give to
this command.
If you make a commit and then found a mistake immediately after
-that, you can recover from it with gitlink:git-reset[1].
+that, you can recover from it with linkgit:git-reset[1].
OPTIONS
@@ -95,6 +95,16 @@ OPTIONS
from making such a commit. This option bypasses the safety, and
is primarily for use by foreign scm interface scripts.
+--cleanup=<mode>::
+ This option sets how the commit message is cleaned up.
+ The '<mode>' can be one of 'verbatim', 'whitespace', 'strip',
+ and 'default'. The 'default' mode will strip leading and
+ trailing empty lines and #commentary from the commit message
+ only if the message is to be edited. Otherwise only whitespace
+ removed. The 'verbatim' mode does not change message at all,
+ 'whitespace' removes just leading/trailing whitespace lines
+ and 'strip' removes both whitespace and commentary.
+
-e|--edit::
The message taken from file with `-F`, command line with
`-m`, and from file with `-C` are usually used as the
@@ -160,7 +170,7 @@ EXAMPLES
--------
When recording your own work, the contents of modified files in
your working tree are temporarily stored to a staging area
-called the "index" with gitlink:git-add[1]. A file can be
+called the "index" with linkgit:git-add[1]. A file can be
reverted back, only in the index but not in the working tree,
to that of the last commit with `git-reset HEAD -- <file>`,
which effectively reverts `git-add` and prevents the changes to
@@ -219,13 +229,13 @@ $ git commit
this second commit would record the changes to `hello.c` and
`hello.h` as expected.
-After a merge (initiated by either gitlink:git-merge[1] or
-gitlink:git-pull[1]) stops because of conflicts, cleanly merged
+After a merge (initiated by either linkgit:git-merge[1] or
+linkgit:git-pull[1]) stops because of conflicts, cleanly merged
paths are already staged to be committed for you, and paths that
conflicted are left in unmerged state. You would have to first
-check which paths are conflicting with gitlink:git-status[1]
+check which paths are conflicting with linkgit:git-status[1]
and after fixing them manually in your working tree, you would
-stage the result as usual with gitlink:git-add[1]:
+stage the result as usual with linkgit:git-add[1]:
------------
$ git status | grep unmerged
@@ -277,11 +287,11 @@ information.
SEE ALSO
--------
-gitlink:git-add[1],
-gitlink:git-rm[1],
-gitlink:git-mv[1],
-gitlink:git-merge[1],
-gitlink:git-commit-tree[1]
+linkgit:git-add[1],
+linkgit:git-rm[1],
+linkgit:git-mv[1],
+linkgit:git-merge[1],
+linkgit:git-commit-tree[1]
Author
------
@@ -291,4 +301,4 @@ Junio C Hamano <junkio@cox.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 98509b4f4..fa161718d 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -130,7 +130,7 @@ See also <<FILES>>.
-z, --null::
For all options that output values and/or keys, always
- end values with with the null character (instead of a
+ end values with the null character (instead of a
newline). Use newline instead as a delimiter between
key and value. This allows for secure parsing of the
output without getting confused e.g. by values that
@@ -332,4 +332,4 @@ Documentation by Johannes Schindelin, Petr Baudis and the git-list <git@vger.ker
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt
index 81614111a..7fb08e934 100644
--- a/Documentation/git-count-objects.txt
+++ b/Documentation/git-count-objects.txt
@@ -34,4 +34,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt
index 3f9d2295d..9a47b4c39 100644
--- a/Documentation/git-cvsexportcommit.txt
+++ b/Documentation/git-cvsexportcommit.txt
@@ -106,4 +106,4 @@ Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index fdd7ec7ed..dbce50369 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -142,7 +142,7 @@ file each time git-cvsimport is run.
+
It is not recommended to use this feature if you intend to
export changes back to CVS again later with
-gitlink:git-cvsexportcommit[1].
+linkgit:git-cvsexportcommit[1].
-h::
Print a short usage message and exit.
@@ -166,4 +166,4 @@ Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt
index 258a62f7e..d3e99931d 100644
--- a/Documentation/git-cvsserver.txt
+++ b/Documentation/git-cvsserver.txt
@@ -28,7 +28,7 @@ OPTIONS
-------
All these options obviously only make sense if enforced by the server side.
-They have been implemented to resemble the gitlink:git-daemon[1] options as
+They have been implemented to resemble the linkgit:git-daemon[1] options as
closely as possible.
--base-path <path>::
@@ -183,7 +183,7 @@ access method and requested operation.
That means that even if you offer only read access (e.g. by using
the pserver method), git-cvsserver should have write access to
the database to work reliably (otherwise you need to make sure
-that the database if up-to-date all the time git-cvsserver is run).
+that the database is up-to-date any time git-cvsserver is executed).
By default it uses SQLite databases in the git directory, named
`gitcvs.<module_name>.sqlite`. Note that the SQLite backend creates
@@ -204,7 +204,7 @@ about `DBI->connect()`.
gitcvs.dbname::
Database name. The exact meaning depends on the
- used database driver, for SQLite this is a filename.
+ selected database driver, for SQLite this is a filename.
Supports variable substitution (see below). May
not contain semicolons (`;`).
Default: '%Ggitcvs.%m.sqlite'
@@ -215,7 +215,7 @@ gitcvs.dbdriver::
with 'DBD::SQLite', reported to work with
'DBD::Pg', and reported *not* to work with 'DBD::mysql'.
Please regard this as an experimental feature. May not
- contain double colons (`:`).
+ contain colons (`:`).
Default: 'SQLite'
gitcvs.dbuser::
@@ -319,4 +319,4 @@ Documentation by Martyn Smith <martyn@catalyst.net.nz>, Martin Langhoff <martin@
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
index f1e48dd02..fd83bc783 100644
--- a/Documentation/git-daemon.txt
+++ b/Documentation/git-daemon.txt
@@ -272,4 +272,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 9c7a03234..1c3dfb40c 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -127,4 +127,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt
index d8a0a8602..6d2ea16a2 100644
--- a/Documentation/git-diff-files.txt
+++ b/Documentation/git-diff-files.txt
@@ -57,4 +57,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt
index 7bd262cef..e86777859 100644
--- a/Documentation/git-diff-index.txt
+++ b/Documentation/git-diff-index.txt
@@ -129,4 +129,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 6b3f74efe..58d02c6a2 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -165,4 +165,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 2808a5ec4..57c28628b 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -21,7 +21,7 @@ tree and the index file, or the index file and the working tree.
the index (staging area for the next commit). In other
words, the differences are what you _could_ tell git to
further add to the index but you still haven't. You can
- stage these changes by using gitlink:git-add[1].
+ stage these changes by using linkgit:git-add[1].
+
If exactly two paths are given, and at least one is untracked,
compare the two files / directories. This behavior can be
@@ -67,11 +67,11 @@ for the last two forms that use ".." notations, can be any
<tree-ish>.
For a more complete list of ways to spell <commit>, see
-"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
However, "diff" is about comparing two _endpoints_, not ranges,
and the range notations ("<commit>..<commit>" and
"<commit>\...<commit>") do not mean a range as defined in the
-"SPECIFYING RANGES" section in gitlink:git-rev-parse[1].
+"SPECIFYING RANGES" section in linkgit:git-rev-parse[1].
OPTIONS
-------
@@ -168,4 +168,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
index fd3d57146..6dac475a0 100644
--- a/Documentation/git-fast-export.txt
+++ b/Documentation/git-fast-export.txt
@@ -13,18 +13,18 @@ SYNOPSIS
DESCRIPTION
-----------
This program dumps the given revisions in a form suitable to be piped
-into gitlink:git-fast-import[1].
+into linkgit:git-fast-import[1].
You can use it as a human readable bundle replacement (see
-gitlink:git-bundle[1]), or as a kind of an interactive
-gitlink:git-filter-branch[1].
+linkgit:git-bundle[1]), or as a kind of an interactive
+linkgit:git-filter-branch[1].
OPTIONS
-------
--progress=<n>::
Insert 'progress' statements every <n> objects, to be shown by
- gitlink:git-fast-import[1] during import.
+ linkgit:git-fast-import[1] during import.
--signed-tags=(verbatim|warn|strip|abort)::
Specify how to handle signed tags. Since any transformation
@@ -65,7 +65,7 @@ referenced by that revision range contains the string
Limitations
-----------
-Since gitlink:git-fast-import[1] cannot tag trees, you will not be
+Since linkgit:git-fast-import[1] cannot tag trees, you will not be
able to export the linux-2.6.git repository completely, as it contains
a tag referencing a tree instead of a commit.
@@ -80,4 +80,4 @@ Documentation by Johannes E. Schindelin <johannes.schindelin@gmx.de>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index d5119678b..bd625abab 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -24,7 +24,7 @@ updated branch and tag refs, fully updating the current repository
with the newly imported data.
The fast-import backend itself can import into an empty repository (one that
-has already been initialized by gitlink:git-init[1]) or incrementally
+has already been initialized by linkgit:git-init[1]) or incrementally
update an existing populated repository. Whether or not incremental
imports are supported from a particular foreign source depends on
the frontend program in use.
@@ -82,7 +82,7 @@ OPTIONS
This information may be useful after importing projects
whose total object set exceeds the 4 GiB packfile limit,
as these commits can be used as edge points during calls
- to gitlink:git-pack-objects[1].
+ to linkgit:git-pack-objects[1].
--quiet::
Disable all non-fatal output, making fast-import silent when it
@@ -220,7 +220,7 @@ variation in formatting will cause fast-import to reject the value.
+
An example value is ``Tue Feb 6 11:22:18 2007 -0500''. The Git
parser is accurate, but a little on the lenient side. It is the
-same parser used by gitlink:git-am[1] when applying patches
+same parser used by linkgit:git-am[1] when applying patches
received from email.
+
Some malformed strings may be accepted as valid dates. In some of
@@ -256,7 +256,7 @@ timezone.
This particular format is supplied as its short to implement and
may be useful to a process that wants to create a new commit
right now, without needing to use a working directory or
-gitlink:git-update-index[1].
+linkgit:git-update-index[1].
+
If separate `author` and `committer` commands are used in a `commit`
the timestamps may not match, as the system clock will be polled
@@ -411,7 +411,7 @@ Marks must be declared (via `mark`) before they can be used.
* A complete 40 byte or abbreviated commit SHA-1 in hex.
* Any valid Git SHA-1 expression that resolves to a commit. See
- ``SPECIFYING REVISIONS'' in gitlink:git-rev-parse[1] for details.
+ ``SPECIFYING REVISIONS'' in linkgit:git-rev-parse[1] for details.
The special case of restarting an incremental import from the
current branch value should be written as:
@@ -649,7 +649,7 @@ recommended, as the frontend does not (easily) have access to the
complete set of bytes which normally goes into such a signature.
If signing is required, create lightweight tags from within fast-import with
`reset`, then create the annotated versions of those tags offline
-with the standard gitlink:git-tag[1] process.
+with the standard linkgit:git-tag[1] process.
`reset`
~~~~~~~
@@ -863,7 +863,7 @@ is not `refs/heads/TAG_FIXUP`).
When committing fixups, consider using `merge` to connect the
commit(s) which are supplying file revisions to the fixup branch.
-Doing so will allow tools such as gitlink:git-blame[1] to track
+Doing so will allow tools such as linkgit:git-blame[1] to track
through the real commit history and properly annotate the source
files.
@@ -892,7 +892,7 @@ Repacking Historical Data
~~~~~~~~~~~~~~~~~~~~~~~~~
If you are repacking very old imported data (e.g. older than the
last year), consider expending some extra CPU time and supplying
-\--window=50 (or higher) when you run gitlink:git-repack[1].
+\--window=50 (or higher) when you run linkgit:git-repack[1].
This will take longer, but will also produce a smaller packfile.
You only need to expend the effort once, and everyone using your
project will benefit from the smaller repository.
@@ -1027,4 +1027,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
index a99a5b321..2b8ffe532 100644
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -12,7 +12,7 @@ SYNOPSIS
DESCRIPTION
-----------
-Usually you would want to use gitlink:git-fetch[1] which is a
+Usually you would want to use linkgit:git-fetch[1] which is a
higher level wrapper of this command instead.
Invokes 'git-upload-pack' on a potentially remote repository,
@@ -93,4 +93,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 900347359..d982f961f 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -39,7 +39,7 @@ include::urls-remotes.txt[]
SEE ALSO
--------
-gitlink:git-pull[1]
+linkgit:git-pull[1]
Author
@@ -53,4 +53,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 895d75031..e22dfa580 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -72,7 +72,7 @@ OPTIONS
This is the filter for modifying the environment in which
the commit will be performed. Specifically, you might want
to rewrite the author/committer name/email/time environment
- variables (see gitlink:git-commit[1] for details). Do not forget
+ variables (see linkgit:git-commit[1] for details). Do not forget
to re-export the variables.
--tree-filter <command>::
@@ -86,13 +86,13 @@ OPTIONS
--index-filter <command>::
This is the filter for rewriting the index. It is similar to the
tree filter but does not check out the tree, which makes it much
- faster. For hairy cases, see gitlink:git-update-index[1].
+ faster. For hairy cases, see linkgit:git-update-index[1].
--parent-filter <command>::
This is the filter for rewriting the commit's parent list.
It will receive the parent string on stdin and shall output
the new parent string on stdout. The parent string is in
- a format accepted by gitlink:git-commit-tree[1]: empty for
+ a format accepted by linkgit:git-commit-tree[1]: empty for
the initial commit, "-p parent" for a normal commit and
"-p parent1 -p parent2 -p parent3 ..." for a merge commit.
@@ -105,7 +105,7 @@ OPTIONS
--commit-filter <command>::
This is the filter for performing the commit.
If this filter is specified, it will be called instead of the
- gitlink:git-commit-tree[1] command, with arguments of the form
+ linkgit:git-commit-tree[1] command, with arguments of the form
"<TREE_ID> [-p <PARENT_COMMIT_ID>]..." and the log message on
stdin. The commit id is expected on stdout.
+
@@ -116,7 +116,7 @@ have all of them as parents.
You can use the 'map' convenience function in this filter, and other
convenience functions, too. For example, calling 'skip_commit "$@"'
will leave out the current commit (but not its changes! If you want
-that, use gitlink:git-rebase[1] instead).
+that, use linkgit:git-rebase[1] instead).
--tag-name-filter <command>::
This is the filter for rewriting tag names. When passed,
@@ -159,7 +159,7 @@ definition impossible to preserve signatures at any rate.)
<rev-list-options>::
When options are given after the new branch name, they will
- be passed to gitlink:git-rev-list[1]. Only commits in the resulting
+ be passed to linkgit:git-rev-list[1]. Only commits in the resulting
output will be filtered, although the filtered commits can still
reference parents which are outside of that set.
@@ -249,7 +249,7 @@ will print.
*NOTE* the changes introduced by the commits, and which are not reverted
by subsequent commits, will still be in the rewritten branch. If you want
to throw out _changes_ together with the commits, you should use the
-interactive mode of gitlink:git-rebase[1].
+interactive mode of linkgit:git-rebase[1].
Consider this history:
@@ -295,4 +295,4 @@ Documentation by Petr Baudis and the git list.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt
index 7088ed409..8615ae353 100644
--- a/Documentation/git-fmt-merge-msg.txt
+++ b/Documentation/git-fmt-merge-msg.txt
@@ -46,7 +46,7 @@ merge.summary::
SEE ALSO
--------
-gitlink:git-merge[1]
+linkgit:git-merge[1]
Author
@@ -59,4 +59,4 @@ Documentation by Petr Baudis, Junio C Hamano and the git-list <git@vger.kernel.o
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 6fb942985..651efe6ca 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -25,7 +25,7 @@ DESCRIPTION
Prepare each commit with its patch in
one file per commit, formatted to resemble UNIX mailbox format.
The output of this command is convenient for e-mail submission or
-for use with gitlink:git-am[1].
+for use with linkgit:git-am[1].
There are two ways to specify which commits to operate on.
@@ -34,7 +34,7 @@ There are two ways to specify which commits to operate on.
that leads to the <since> to be output.
2. Generic <revision range> expression (see "SPECIFYING
- REVISIONS" section in gitlink:git-rev-parse[1]) means the
+ REVISIONS" section in linkgit:git-rev-parse[1]) means the
commits in the specified range.
A single commit, when interpreted as a <revision range>
@@ -192,7 +192,7 @@ git-format-patch -3::
See Also
--------
-gitlink:git-am[1], gitlink:git-send-email[1]
+linkgit:git-am[1], linkgit:git-send-email[1]
Author
@@ -205,4 +205,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-fsck-objects.txt b/Documentation/git-fsck-objects.txt
index f21061ecf..6e9f71764 100644
--- a/Documentation/git-fsck-objects.txt
+++ b/Documentation/git-fsck-objects.txt
@@ -13,5 +13,5 @@ SYNOPSIS
DESCRIPTION
-----------
-This is a synonym for gitlink:git-fsck[1]. Please refer to the
+This is a synonym for linkgit:git-fsck[1]. Please refer to the
documentation of that command.
diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt
index 45c0bee50..f16cb9861 100644
--- a/Documentation/git-fsck.txt
+++ b/Documentation/git-fsck.txt
@@ -150,4 +150,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 872056ea0..4b2dfefa6 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -15,7 +15,7 @@ DESCRIPTION
Runs a number of housekeeping tasks within the current repository,
such as compressing file revisions (to reduce disk space and increase
performance) and removing unreachable objects which may have been
-created from prior invocations of gitlink:git-add[1].
+created from prior invocations of linkgit:git-add[1].
Users are encouraged to run this task on a regular basis within
each repository to maintain good disk space utilization and good
@@ -90,23 +90,23 @@ how long records of conflicted merge you have not resolved are
kept. This defaults to 15 days.
The optional configuration variable 'gc.packrefs' determines if
-`git gc` runs `git-pack-refs`. Without the configuration, `git-pack-refs`
-is not run in bare repositories by default, to allow older dumb-transport
-clients fetch from the repository, but this will change in the future.
+`git gc` runs `git-pack-refs`. This can be set to "nobare" to enable
+it within all non-bare repos or it can be set to a boolean value.
+This defaults to true.
The optional configuration variable 'gc.aggressiveWindow' controls how
much time is spent optimizing the delta compression of the objects in
the repository when the --aggressive option is specified. The larger
the value, the more time is spent optimizing the delta compression. See
-the documentation for the --window' option in gitlink:git-repack[1] for
+the documentation for the --window' option in linkgit:git-repack[1] for
more details. This defaults to 10.
See Also
--------
-gitlink:git-prune[1]
-gitlink:git-reflog[1]
-gitlink:git-repack[1]
-gitlink:git-rerere[1]
+linkgit:git-prune[1]
+linkgit:git-reflog[1]
+linkgit:git-repack[1]
+linkgit:git-rerere[1]
Author
------
@@ -114,4 +114,4 @@ Written by Shawn O. Pearce <spearce@spearce.org>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-get-tar-commit-id.txt b/Documentation/git-get-tar-commit-id.txt
index 60d1c52f4..dea41490c 100644
--- a/Documentation/git-get-tar-commit-id.txt
+++ b/Documentation/git-get-tar-commit-id.txt
@@ -14,7 +14,7 @@ SYNOPSIS
DESCRIPTION
-----------
Acts as a filter, extracting the commit ID stored in archives created by
-gitlink:git-archive[1]. It reads only the first 1024 bytes of input, thus its
+linkgit:git-archive[1]. It reads only the first 1024 bytes of input, thus its
runtime is not influenced by the size of <tarfile> very much.
If no commit ID is found, git-get-tar-commit-id quietly exists with a
@@ -33,4 +33,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 97faaa1d3..f3cb24f25 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -143,4 +143,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-gui.txt b/Documentation/git-gui.txt
index 13252a1aa..6d6cd5d87 100644
--- a/Documentation/git-gui.txt
+++ b/Documentation/git-gui.txt
@@ -16,7 +16,7 @@ on allowing users to make changes to their repository by making
new commits, amending existing ones, creating branches, performing
local merges, and fetching/pushing to remote repositories.
-Unlike gitlink:gitk[1], git-gui focuses on commit generation
+Unlike linkgit:gitk[1], git-gui focuses on commit generation
and single file annotation, and does not show project history.
It does however supply menu actions to start a gitk session from
within git-gui.
@@ -112,4 +112,4 @@ Documentation by Shawn O. Pearce <spearce@spearce.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
index 616f196d8..33030c022 100644
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -42,4 +42,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt
index a8ffcbe78..fb77ca3a5 100644
--- a/Documentation/git-help.txt
+++ b/Documentation/git-help.txt
@@ -58,6 +58,16 @@ is available in PATH.
+
Note that the script tries, as much as possible, to display the HTML
page in a new tab on an already opened browser.
++
+The following browsers are currently supported by 'git-help--browse':
++
+* firefox (this is the default under X Window when not using KDE)
+* iceweasel
+* konqueror (this is the default under KDE)
+* w3m (this is the default outside X Window)
+* links
+* lynx
+* dillo
CONFIGURATION VARIABLES
-----------------------
@@ -85,7 +95,7 @@ $ git config --global web.browser firefox
------------------------------------------------
as they are probably more user specific than repository specific.
-See gitlink:git-config[1] for more information about this.
+See linkgit:git-config[1] for more information about this.
Author
------
@@ -94,10 +104,10 @@ Written by Junio C Hamano <gitster@pobox.com> and the git-list
Documentation
-------------
-Initial documentation was part of the gitlink:git[7] man page.
+Initial documentation was part of the linkgit:git[7] man page.
Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
little. Maintenance is done by the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt
index 389c6edfb..b784a9d07 100644
--- a/Documentation/git-http-fetch.txt
+++ b/Documentation/git-http-fetch.txt
@@ -53,4 +53,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-http-push.txt b/Documentation/git-http-push.txt
index 3a69b719b..0b8272234 100644
--- a/Documentation/git-http-push.txt
+++ b/Documentation/git-http-push.txt
@@ -15,6 +15,9 @@ DESCRIPTION
Sends missing objects to remote repository, and updates the
remote branch.
+*NOTE*: This command is temporarily disabled if your cURL
+library is older than 7.16, as the combination has been reported
+not to work and sometimes corrupts repository.
OPTIONS
-------
@@ -98,4 +101,4 @@ Documentation by Nick Hengeveld
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index eca9e9cce..522b73c12 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -59,4 +59,4 @@ Documentation by Mike McCormack
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt
index bf5c2bddf..72b5d0011 100644
--- a/Documentation/git-index-pack.txt
+++ b/Documentation/git-index-pack.txt
@@ -43,10 +43,10 @@ OPTIONS
a default name determined from the pack content. If
<pack-file> is not specified consider using --keep to
prevent a race condition between this process and
- gitlink::git-repack[1].
+ linkgit:git-repack[1].
--fix-thin::
- It is possible for gitlink:git-pack-objects[1] to build
+ It is possible for linkgit:git-pack-objects[1] to build
"thin" pack, which records objects in deltified form based on
objects not included in the pack to reduce network traffic.
Those objects are expected to be present on the receiving end
@@ -59,7 +59,7 @@ OPTIONS
Before moving the index into its final destination
create an empty .keep file for the associated pack file.
This option is usually necessary with --stdin to prevent a
- simultaneous gitlink:git-repack[1] process from deleting
+ simultaneous linkgit:git-repack[1] process from deleting
the newly constructed pack and index before refs can be
updated to use objects contained in the pack.
@@ -83,7 +83,7 @@ Once the index has been created, the list of object names is sorted
and the SHA1 hash of that list is printed to stdout. If --stdin was
also used then this is prefixed by either "pack\t", or "keep\t" if a
new .keep file was successfully created. This is useful to remove a
-.keep file used as a lock to prevent the race with gitlink:git-repack[1]
+.keep file used as a lock to prevent the race with linkgit:git-repack[1]
mentioned above.
@@ -97,4 +97,4 @@ Documentation by Sergey Vlasov
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt
index d4e01cb32..439cabb73 100644
--- a/Documentation/git-init-db.txt
+++ b/Documentation/git-init-db.txt
@@ -14,5 +14,5 @@ SYNOPSIS
DESCRIPTION
-----------
-This is a synonym for gitlink:git-init[1]. Please refer to the
+This is a synonym for linkgit:git-init[1]. Please refer to the
documentation of that command.
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index e51351dd5..62914da97 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -111,4 +111,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt
index d2ce7790e..841e8fac7 100644
--- a/Documentation/git-instaweb.txt
+++ b/Documentation/git-instaweb.txt
@@ -84,4 +84,4 @@ Documentation by Eric Wong <normalperson@yhbt.net>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 5920d1799..ebaee4b33 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -14,19 +14,15 @@ DESCRIPTION
-----------
Shows the commit logs.
-The command takes options applicable to the gitlink:git-rev-list[1]
+The command takes options applicable to the linkgit:git-rev-list[1]
command to control what is shown and how, and options applicable to
-the gitlink:git-diff-tree[1] commands to control how the changes
+the linkgit:git-diff-tree[1] commands to control how the changes
each commit introduces are shown.
-This manual page describes only the most frequently used options.
-
OPTIONS
-------
-include::pretty-options.txt[]
-
:git-log: 1
include::diff-options.txt[]
@@ -39,18 +35,7 @@ include::diff-options.txt[]
`HEAD`, i.e. the tip of the current branch.
For a more complete list of ways to spell <since>
and <until>, see "SPECIFYING REVISIONS" section in
- gitlink:git-rev-parse[1].
-
---first-parent::
- Follow only the first parent commit upon seeing a merge
- commit. This option gives a better overview of the
- evolution of a particular branch.
-
--g, \--walk-reflogs::
- Show commits as they were recorded in the reflog. The log contains
- a record about how the tip of a reference was changed.
- Cannot be combined with --reverse.
- See also gitlink:git-reflog[1].
+ linkgit:git-rev-parse[1].
--decorate::
Print out the ref names of any commits that are shown.
@@ -76,6 +61,8 @@ include::diff-options.txt[]
Show only commits that affect the specified paths.
+include::rev-list-options.txt[]
+
include::pretty-formats.txt[]
include::diff-generate-patch.txt[]
@@ -125,4 +112,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt
index 7f808fcd7..b1c797f10 100644
--- a/Documentation/git-lost-found.txt
+++ b/Documentation/git-lost-found.txt
@@ -12,7 +12,7 @@ SYNOPSIS
DESCRIPTION
-----------
-*NOTE*: this command is deprecated. Use gitlink:git-fsck[1] with
+*NOTE*: this command is deprecated. Use linkgit:git-fsck[1] with
the option '--lost-found' instead.
Finds dangling commits and tags from the object database, and
@@ -78,4 +78,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index d0c3aa21d..da9ebf405 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -106,7 +106,7 @@ OPTIONS
-v::
Similar to `-t`, but use lowercase letters for files
that are marked as 'assume unchanged' (see
- gitlink:git-update-index[1]).
+ linkgit:git-update-index[1]).
--full-name::
When run from a subdirectory, the command usually
@@ -152,7 +152,7 @@ Exclude Patterns
'git-ls-files' can use a list of "exclude patterns" when
traversing the directory tree and finding files to show when the
-flags --others or --ignored are specified. gitlink:gitignore[5]
+flags --others or --ignored are specified. linkgit:gitignore[5]
specifies the format of exclude patterns.
These exclude patterns come from these places, in order:
@@ -179,7 +179,7 @@ pattern file appears in.
See Also
--------
-gitlink:git-read-tree[1], gitlink:gitignore[5]
+linkgit:git-read-tree[1], linkgit:gitignore[5]
Author
@@ -192,4 +192,4 @@ Documentation by David Greaves, Junio C Hamano, Josh Triplett, and the git-list
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 445bedaa9..c5ba0aad1 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -27,7 +27,7 @@ OPTIONS
displayed.
-u <exec>, --upload-pack=<exec>::
- Specify the full path of gitlink:git-upload-pack[1] on the remote
+ Specify the full path of linkgit:git-upload-pack[1] on the remote
host. This allows listing references from repositories accessed via
SSH and where the SSH daemon does not use the PATH configured by the
user.
@@ -69,4 +69,4 @@ Written by Junio C Hamano <junkio@cox.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
index 7b7859967..360c0a1b9 100644
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -91,4 +91,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt
index 64aa6a1ea..3846f0e6e 100644
--- a/Documentation/git-mailinfo.txt
+++ b/Documentation/git-mailinfo.txt
@@ -18,7 +18,7 @@ writes the commit log message in <msg> file, and the patches in
<patch> file. The author name, e-mail and e-mail subject are
written out to the standard output to be used by git-am
to create a commit. It is usually not necessary to use this
-command directly. See gitlink:git-am[1] instead.
+command directly. See linkgit:git-am[1] instead.
OPTIONS
@@ -66,4 +66,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index c4f4cabbd..8243f6911 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -55,4 +55,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt
index 6b71880ec..07f78b4ae 100644
--- a/Documentation/git-merge-base.txt
+++ b/Documentation/git-merge-base.txt
@@ -39,4 +39,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt
index 31882abb8..c513184ba 100644
--- a/Documentation/git-merge-file.txt
+++ b/Documentation/git-merge-file.txt
@@ -41,7 +41,7 @@ conflicts otherwise. If the merge was clean, the exit value is 0.
git-merge-file is designed to be a minimal clone of RCS merge, that is, it
implements all of RCS merge's functionality which is needed by
-gitlink:git[1].
+linkgit:git[1].
OPTIONS
@@ -89,4 +89,4 @@ with parts copied from the original documentation of RCS merge.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge-index.txt b/Documentation/git-merge-index.txt
index b726ddfe1..5d816d0d8 100644
--- a/Documentation/git-merge-index.txt
+++ b/Documentation/git-merge-index.txt
@@ -84,4 +84,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge-one-file.txt b/Documentation/git-merge-one-file.txt
index f35d0e1b4..ee95df3bc 100644
--- a/Documentation/git-merge-one-file.txt
+++ b/Documentation/git-merge-one-file.txt
@@ -26,4 +26,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt
index 6892fdac3..4cc0964e7 100644
--- a/Documentation/git-merge-tree.txt
+++ b/Documentation/git-merge-tree.txt
@@ -33,4 +33,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index eabd7ef33..0c9ad7f2b 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -42,7 +42,7 @@ include::merge-strategies.txt[]
If you tried a merge which resulted in a complex conflicts and
would want to start over, you can recover with
-gitlink:git-reset[1].
+linkgit:git-reset[1].
CONFIGURATION
-------------
@@ -74,14 +74,14 @@ it happens. In other words, `git-diff --cached HEAD` must
report no changes.
[NOTE]
-This is a bit of lie. In certain special cases, your index are
-allowed to be different from the tree of `HEAD` commit. The most
+This is a bit of a lie. In certain special cases, your index is
+allowed to be different from the tree of the `HEAD` commit. The most
notable case is when your `HEAD` commit is already ahead of what
is being merged, in which case your index can have arbitrary
-difference from your `HEAD` commit. Otherwise, your index entries
-are allowed have differences from your `HEAD` commit that match
-the result of trivial merge (e.g. you received the same patch
-from external source to produce the same result as what you are
+differences from your `HEAD` commit. Also, your index entries
+may have differences from your `HEAD` commit that match
+the result of a trivial merge (e.g. you received the same patch
+from an external source to produce the same result as what you are
merging). For example, if a path did not exist in the common
ancestor and your head commit but exists in the tree you are
merging into your repository, and if you already happen to have
@@ -163,7 +163,8 @@ After seeing a conflict, you can do two things:
SEE ALSO
--------
-gitlink:git-fmt-merge-msg[1], gitlink:git-pull[1]
+linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],
+linkgit:gitattributes[5]
Author
@@ -177,4 +178,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index a26c26016..50f106ec5 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -13,7 +13,7 @@ DESCRIPTION
-----------
Use 'git mergetool' to run one of several merge utilities to resolve
-merge conflicts. It is typically run after gitlink:git-merge[1].
+merge conflicts. It is typically run after linkgit:git-merge[1].
If one or more <file> parameters are given, the merge tool program will
be run to resolve differences on each file. If no <file> names are
@@ -48,4 +48,4 @@ Documentation by Theodore Y Ts'o.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mktag.txt b/Documentation/git-mktag.txt
index ea7a75234..82db9f5d8 100644
--- a/Documentation/git-mktag.txt
+++ b/Documentation/git-mktag.txt
@@ -43,4 +43,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mktree.txt b/Documentation/git-mktree.txt
index 638abc7d0..f312036ab 100644
--- a/Documentation/git-mktree.txt
+++ b/Documentation/git-mktree.txt
@@ -31,4 +31,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index 3b8ca76df..bff3fbe74 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -50,4 +50,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index 306e1a495..efcabdc27 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -38,7 +38,7 @@ OPTIONS
Instead of printing both the SHA-1 and the name, print only
the name. If given with --tags the usual tag prefix of
"tags/" is also omitted from the name, matching the output
- of gitlink::git-describe[1] more closely. This option
+ of linkgit:git-describe[1] more closely. This option
cannot be combined with --stdin.
EXAMPLE
@@ -75,4 +75,4 @@ Documentation by Johannes Schindelin.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 5237ab0c0..8353be186 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -58,7 +58,7 @@ base-name::
--revs::
Read the revision arguments from the standard input, instead of
individual object names. The revision arguments are processed
- the same way as gitlink:git-rev-list[1] with `--objects` flag
+ the same way as linkgit:git-rev-list[1] with `--objects` flag
uses its `commit` arguments to build the list of objects it
outputs. The objects on the resulting list are packed.
@@ -99,7 +99,8 @@ base-name::
--max-pack-size=<n>::
Maximum size of each output packfile, expressed in MiB.
If specified, multiple packfiles may be created.
- The default is unlimited.
+ The default is unlimited, unless the config variable
+ `pack.packSizeLimit` is set.
--incremental::
This flag causes an object already in a pack ignored
@@ -193,10 +194,10 @@ Documentation by Junio C Hamano
See Also
--------
-gitlink:git-rev-list[1]
-gitlink:git-repack[1]
-gitlink:git-prune-packed[1]
+linkgit:git-rev-list[1]
+linkgit:git-repack[1]
+linkgit:git-prune-packed[1]
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-pack-redundant.txt b/Documentation/git-pack-redundant.txt
index f2ceebac4..af4aa4a2e 100644
--- a/Documentation/git-pack-redundant.txt
+++ b/Documentation/git-pack-redundant.txt
@@ -48,10 +48,10 @@ Documentation by Lukas Sandström <lukass@etek.chalmers.se>
See Also
--------
-gitlink:git-pack-objects[1]
-gitlink:git-repack[1]
-gitlink:git-prune-packed[1]
+linkgit:git-pack-objects[1]
+linkgit:git-repack[1]
+linkgit:git-prune-packed[1]
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-pack-refs.txt b/Documentation/git-pack-refs.txt
index a20fc7de4..e4ff93471 100644
--- a/Documentation/git-pack-refs.txt
+++ b/Documentation/git-pack-refs.txt
@@ -63,4 +63,4 @@ Written by Linus Torvalds <torvalds@osdl.org>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-parse-remote.txt b/Documentation/git-parse-remote.txt
index 11b1f4d2e..deb8b2f01 100644
--- a/Documentation/git-parse-remote.txt
+++ b/Documentation/git-parse-remote.txt
@@ -47,4 +47,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt
index ad528a922..894852a78 100644
--- a/Documentation/git-patch-id.txt
+++ b/Documentation/git-patch-id.txt
@@ -39,4 +39,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt
index 09b005b10..000171007 100644
--- a/Documentation/git-peek-remote.txt
+++ b/Documentation/git-peek-remote.txt
@@ -47,4 +47,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt
index 9f85f3833..93ee82ae5 100644
--- a/Documentation/git-prune-packed.txt
+++ b/Documentation/git-prune-packed.txt
@@ -44,9 +44,9 @@ Documentation by Ryan Anderson <ryan@michonline.com>
See Also
--------
-gitlink:git-pack-objects[1]
-gitlink:git-repack[1]
+linkgit:git-pack-objects[1]
+linkgit:git-repack[1]
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt
index 9835bdb87..f151cff5d 100644
--- a/Documentation/git-prune.txt
+++ b/Documentation/git-prune.txt
@@ -60,4 +60,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index d4d26afea..179bdfc69 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -25,6 +25,7 @@ OPTIONS
-------
include::merge-options.txt[]
+:git-pull: 1
include::fetch-options.txt[]
include::pull-fetch-param.txt[]
@@ -34,11 +35,15 @@ include::urls-remotes.txt[]
include::merge-strategies.txt[]
\--rebase::
- Instead of a merge, perform a rebase after fetching.
- *NOTE:* This is a potentially _dangerous_ mode of operation.
- It rewrites history, which does not bode well when you
- published that history already. Do *not* use this option
- unless you have read gitlink:git-rebase[1] carefully.
+ Instead of a merge, perform a rebase after fetching. If
+ there is a remote ref for the upstream branch, and this branch
+ was rebased since last fetched, the rebase uses that information
+ to avoid rebasing non-local changes.
++
+*NOTE:* This is a potentially _dangerous_ mode of operation.
+It rewrites history, which does not bode well when you
+published that history already. Do *not* use this option
+unless you have read linkgit:git-rebase[1] carefully.
\--no-rebase::
Override earlier \--rebase.
@@ -106,7 +111,7 @@ git pull, git pull origin::
current branch. Normally the branch merged in is
the HEAD of the remote repository, but the choice is
determined by the branch.<name>.remote and
- branch.<name>.merge options; see gitlink:git-config[1]
+ branch.<name>.merge options; see linkgit:git-config[1]
for details.
git pull origin next::
@@ -153,12 +158,12 @@ The final command then merges the newly fetched `tmp` into master.
If you tried a pull which resulted in a complex conflicts and
would want to start over, you can recover with
-gitlink:git-reset[1].
+linkgit:git-reset[1].
SEE ALSO
--------
-gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-config[1]
+linkgit:git-fetch[1], linkgit:git-merge[1], linkgit:git-config[1]
Author
@@ -174,4 +179,4 @@ Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index b8003c63c..5f2494495 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -20,7 +20,7 @@ necessary to complete the given refs.
You can make interesting things happen to a repository
every time you push into it, by setting up 'hooks' there. See
-documentation for gitlink:git-receive-pack[1].
+documentation for linkgit:git-receive-pack[1].
OPTIONS
@@ -145,4 +145,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt
index 1c3ef4c59..0fc2b56c1 100644
--- a/Documentation/git-quiltimport.txt
+++ b/Documentation/git-quiltimport.txt
@@ -57,4 +57,4 @@ Documentation by Eric Biederman <ebiederm@lnxi.com>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 74c5478ba..8421d1fd7 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -15,7 +15,7 @@ DESCRIPTION
-----------
Reads the tree information given by <tree-ish> into the index,
but does not actually *update* any of the files it "caches". (see:
-gitlink:git-checkout-index[1])
+linkgit:git-checkout-index[1])
Optionally, it can merge a tree into the index, perform a
fast-forward (i.e. 2-way) merge, or a 3-way merge, with the `-m`
@@ -347,8 +347,8 @@ have finished your work-in-progress), attempt the merge again.
See Also
--------
-gitlink:git-write-tree[1]; gitlink:git-ls-files[1];
-gitlink:gitignore[5]
+linkgit:git-write-tree[1]; linkgit:git-ls-files[1];
+linkgit:gitignore[5]
Author
@@ -361,4 +361,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index e4326d332..c11c6453e 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -235,7 +235,7 @@ OPTIONS
--whitespace=<nowarn|warn|error|error-all|strip>::
This flag is passed to the `git-apply` program
- (see gitlink:git-apply[1]) that applies the patch.
+ (see linkgit:git-apply[1]) that applies the patch.
-i, \--interactive::
Make a list of the commits which are about to be rebased. Let the
@@ -374,8 +374,8 @@ add other commits. This can be used to split a commit into two:
However, the working tree stays the same.
- Now add the changes to the index that you want to have in the first
- commit. You can use gitlink:git-add[1] (possibly interactively) and/or
- gitlink:git-gui[1] to do that.
+ commit. You can use linkgit:git-add[1] (possibly interactively) and/or
+ linkgit:git-gui[1] to do that.
- Commit the now-current index with whatever commit message is appropriate
now.
@@ -386,7 +386,7 @@ add other commits. This can be used to split a commit into two:
If you are not absolutely sure that the intermediate revisions are
consistent (they compile, pass the testsuite, etc.) you should use
-gitlink:git-stash[1] to stash away the not-yet-committed changes
+linkgit:git-stash[1] to stash away the not-yet-committed changes
after each commit, test, and amend the commit if fixes are necessary.
@@ -401,4 +401,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt
index 2633d94c5..4111434bb 100644
--- a/Documentation/git-receive-pack.txt
+++ b/Documentation/git-receive-pack.txt
@@ -149,7 +149,7 @@ if the repository is packed and is served via a dumb transport.
SEE ALSO
--------
-gitlink:git-send-pack[1]
+linkgit:git-send-pack[1]
Author
@@ -162,4 +162,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 25003c386..f9bba36c2 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -28,19 +28,19 @@ The subcommand "expire" is used to prune older reflog entries.
Entries older than `expire` time, or entries older than
`expire-unreachable` time and are not reachable from the current
tip, are removed from the reflog. This is typically not used
-directly by the end users -- instead, see gitlink:git-gc[1].
+directly by the end users -- instead, see linkgit:git-gc[1].
The subcommand "show" (which is also the default, in the absence of any
subcommands) will take all the normal log options, and show the log of
the reference provided in the command-line (or `HEAD`, by default).
The reflog will cover all recent actions (HEAD reflog records branch switching
as well). It is an alias for 'git log -g --abbrev-commit --pretty=oneline';
-see gitlink:git-log[1].
+see linkgit:git-log[1].
The reflog is useful in various git commands, to specify the old value
of a reference. For example, `HEAD@\{2\}` means "where HEAD used to be
two moves ago", `master@\{one.week.ago\}` means "where master used to
-point to one week ago", and so on. See gitlink:git-rev-parse[1] for
+point to one week ago", and so on. See linkgit:git-rev-parse[1] for
more details.
@@ -88,4 +88,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-relink.txt b/Documentation/git-relink.txt
index fe631bb3d..1b024ded3 100644
--- a/Documentation/git-relink.txt
+++ b/Documentation/git-relink.txt
@@ -7,12 +7,13 @@ git-relink - Hardlink common objects in local repositories
SYNOPSIS
--------
-'git-relink' [--safe] <dir> <dir> [<dir>]\*
+'git-relink' [--safe] <dir> [<dir>]\* <master_dir>
DESCRIPTION
-----------
-This will scan 2 or more object repositories and look for common objects, check
-if they are hardlinked, and replace one with a hardlink to the other if not.
+This will scan 1 or more object repositories and look for objects in common
+with a master repository. Objects not already hardlinked to the master
+repository will be replaced with a hardlink to the master repository.
OPTIONS
-------
@@ -33,4 +34,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index 4b263c249..2cbd1f764 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git-remote'
-'git-remote' add [-t <branch>] [-m <branch>] [-f] [--mirror] <name> <url>
+'git-remote' add [-t <branch>] [-m <master>] [-f] [--mirror] <name> <url>
'git-remote' rm <name>
'git-remote' show <name>
'git-remote' prune <name>
@@ -81,7 +81,7 @@ remotes.<group>. If a named group is not specified on the command line,
the configuration parameter remotes.default will get used; if
remotes.default is not defined, all remotes which do not have the
configuration parameter remote.<name>.skipDefaultUpdate set to true will
-be updated. (See gitlink:git-config[1]).
+be updated. (See linkgit:git-config[1]).
DISCUSSION
@@ -89,7 +89,7 @@ DISCUSSION
The remote configuration is achieved using the `remote.origin.url` and
`remote.origin.fetch` configuration variables. (See
-gitlink:git-config[1]).
+linkgit:git-config[1]).
Examples
--------
@@ -128,9 +128,9 @@ $ git merge origin
See Also
--------
-gitlink:git-fetch[1]
-gitlink:git-branch[1]
-gitlink:git-config[1]
+linkgit:git-fetch[1]
+linkgit:git-branch[1]
+linkgit:git-config[1]
Author
------
@@ -144,4 +144,4 @@ Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 12e2079a7..3d957492f 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -40,19 +40,19 @@ OPTIONS
-d::
After packing, if the newly created packs make some
existing packs redundant, remove the redundant packs.
- Also runs gitlink:git-prune-packed[1].
+ Also runs linkgit:git-prune-packed[1].
-l::
Pass the `--local` option to `git pack-objects`, see
- gitlink:git-pack-objects[1].
+ linkgit:git-pack-objects[1].
-f::
Pass the `--no-reuse-delta` option to `git pack-objects`, see
- gitlink:git-pack-objects[1].
+ linkgit:git-pack-objects[1].
-q::
Pass the `-q` option to `git pack-objects`, see
- gitlink:git-pack-objects[1].
+ linkgit:git-pack-objects[1].
-n::
Do not update the server information with
@@ -109,9 +109,9 @@ Documentation by Ryan Anderson <ryan@michonline.com>
See Also
--------
-gitlink:git-pack-objects[1]
-gitlink:git-prune-packed[1]
+linkgit:git-pack-objects[1]
+linkgit:git-prune-packed[1]
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt
index 2deba3176..2ca39946b 100644
--- a/Documentation/git-repo-config.txt
+++ b/Documentation/git-repo-config.txt
@@ -14,5 +14,5 @@ SYNOPSIS
DESCRIPTION
-----------
-This is a synonym for gitlink:git-config[1]. Please refer to the
+This is a synonym for linkgit:git-config[1]. Please refer to the
documentation of that command.
diff --git a/Documentation/git-request-pull.txt b/Documentation/git-request-pull.txt
index 087eeb7cc..270df9b18 100644
--- a/Documentation/git-request-pull.txt
+++ b/Documentation/git-request-pull.txt
@@ -36,4 +36,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt
index 8ce492c8f..a53858e25 100644
--- a/Documentation/git-rerere.txt
+++ b/Documentation/git-rerere.txt
@@ -22,6 +22,10 @@ automerge results and corresponding hand-resolve results on the
initial manual merge, and later by noticing the same automerge
results and applying the previously recorded hand resolution.
+[NOTE]
+You need to set the configuration variable rerere.enabled to
+enable this command.
+
COMMANDS
--------
@@ -33,7 +37,7 @@ its working state.
'clear'::
This resets the metadata used by rerere if a merge resolution is to be
-is aborted. Calling gitlink:git-am[1] --skip or gitlink:git-rebase[1]
+is aborted. Calling linkgit:git-am[1] --skip or linkgit:git-rebase[1]
[--skip|--abort] will automatically invoke this command.
'diff'::
@@ -204,4 +208,4 @@ Written by Junio C Hamano <junkio@cox.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 050e4eadb..a4e0a779d 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git-reset' [--mixed | --soft | --hard] [-q] [<commit>]
-'git-reset' [--mixed] [-q] <commit> [--] <paths>...
+'git-reset' [--mixed] [-q] [<commit>] [--] <paths>...
DESCRIPTION
-----------
@@ -21,7 +21,7 @@ commit (or set of commits) and want to redo that part without showing
the undo in the history.
If you want to undo a commit other than the latest on a branch,
-gitlink:git-revert[1] is your friend.
+linkgit:git-revert[1] is your friend.
The second form with 'paths' is used to revert selected paths in
the index from a given commit, without moving HEAD.
@@ -37,7 +37,7 @@ OPTIONS
--soft::
Does not touch the index file nor the working tree at all, but
requires them to be in a good order. This leaves all your changed
- files "Added but not yet committed", as gitlink:git-status[1] would
+ files "Added but not yet committed", as linkgit:git-status[1] would
put it.
--hard::
@@ -49,7 +49,7 @@ OPTIONS
Be quiet, only report errors.
<commit>::
- Commit to make the current HEAD.
+ Commit to make the current HEAD. If not given defaults to HEAD.
Examples
--------
@@ -71,7 +71,7 @@ message, or both. Leaves working tree as it was before "reset".
commit by starting with its log message. If you do not need to
edit the message further, you can give -C option instead.
+
-See also the --amend option to gitlink:git-commit[1].
+See also the --amend option to linkgit:git-commit[1].
Undo commits permanently::
+
@@ -186,4 +186,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index a03f9fe5f..5b96eabfc 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -15,6 +15,7 @@ SYNOPSIS
[ \--min-age=timestamp ]
[ \--sparse ]
[ \--no-merges ]
+ [ \--first-parent ]
[ \--remove-empty ]
[ \--full-history ]
[ \--not ]
@@ -78,363 +79,17 @@ between the two operands. The following two commands are equivalent:
$ git-rev-list A...B
-----------------------------------------------------------------------
-gitlink:git-rev-list[1] is a very essential git program, since it
+linkgit:git-rev-list[1] is a very essential git program, since it
provides the ability to build and traverse commit ancestry graphs. For
this reason, it has a lot of different options that enables it to be
-used by commands as different as gitlink:git-bisect[1] and
-gitlink:git-repack[1].
+used by commands as different as linkgit:git-bisect[1] and
+linkgit:git-repack[1].
OPTIONS
-------
-Commit Formatting
-~~~~~~~~~~~~~~~~~
-
-Using these options, gitlink:git-rev-list[1] will act similar to the
-more specialized family of commit log tools: gitlink:git-log[1],
-gitlink:git-show[1], and gitlink:git-whatchanged[1]
-
-include::pretty-options.txt[]
-
---relative-date::
-
- Synonym for `--date=relative`.
-
---date={relative,local,default,iso,rfc}::
-
- Only takes effect for dates shown in human-readable format, such
- as when using "--pretty".
-+
-`--date=relative` shows dates relative to the current time,
-e.g. "2 hours ago".
-+
-`--date=local` shows timestamps in user's local timezone.
-+
-`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
-+
-`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822
-format, often found in E-mail messages.
-+
-`--date=short` shows only date but not time, in `YYYY-MM-DD` format.
-+
-`--date=default` shows timestamps in the original timezone
-(either committer's or author's).
-
---header::
-
- Print the contents of the commit in raw-format; each record is
- separated with a NUL character.
-
---parents::
-
- Print the parents of the commit.
-
---timestamp::
- Print the raw commit timestamp.
-
---left-right::
-
- Mark which side of a symmetric diff a commit is reachable from.
- Commits from the left side are prefixed with `<` and those from
- the right with `>`. If combined with `--boundary`, those
- commits are prefixed with `-`.
-+
-For example, if you have this topology:
-+
------------------------------------------------------------------------
- y---b---b branch B
- / \ /
- / .
- / / \
- o---x---a---a branch A
------------------------------------------------------------------------
-+
-you would get an output line this:
-+
------------------------------------------------------------------------
- $ git rev-list --left-right --boundary --pretty=oneline A...B
-
- >bbbbbbb... 3rd on b
- >bbbbbbb... 2nd on b
- <aaaaaaa... 3rd on a
- <aaaaaaa... 2nd on a
- -yyyyyyy... 1st on b
- -xxxxxxx... 1st on a
------------------------------------------------------------------------
-
-Diff Formatting
-~~~~~~~~~~~~~~~
-
-Below are listed options that control the formatting of diff output.
-Some of them are specific to gitlink:git-rev-list[1], however other diff
-options may be given. See gitlink:git-diff-files[1] for more options.
-
--c::
-
- This flag changes the way a merge commit is displayed. It shows
- the differences from each of the parents to the merge result
- simultaneously instead of showing pairwise diff between a parent
- and the result one at a time. Furthermore, it lists only files
- which were modified from all parents.
-
---cc::
-
- This flag implies the '-c' options and further compresses the
- patch output by omitting hunks that show differences from only
- one parent, or show the same change from all but one parent for
- an Octopus merge.
-
--r::
-
- Show recursive diffs.
-
--t::
-
- Show the tree objects in the diff output. This implies '-r'.
-
-Commit Limiting
-~~~~~~~~~~~~~~~
-
-Besides specifying a range of commits that should be listed using the
-special notations explained in the description, additional commit
-limiting may be applied.
-
---
-
--n 'number', --max-count='number'::
-
- Limit the number of commits output.
-
---skip='number'::
-
- Skip 'number' commits before starting to show the commit output.
-
---since='date', --after='date'::
-
- Show commits more recent than a specific date.
-
---until='date', --before='date'::
-
- Show commits older than a specific date.
-
---max-age='timestamp', --min-age='timestamp'::
-
- Limit the commits output to specified time range.
-
---author='pattern', --committer='pattern'::
-
- Limit the commits output to ones with author/committer
- header lines that match the specified pattern (regular expression).
-
---grep='pattern'::
-
- Limit the commits output to ones with log message that
- matches the specified pattern (regular expression).
-
--i, --regexp-ignore-case::
-
- Match the regexp limiting patterns without regard to letters case.
-
--E, --extended-regexp::
-
- Consider the limiting patterns to be extended regular expressions
- instead of the default basic regular expressions.
-
---remove-empty::
-
- Stop when a given path disappears from the tree.
-
---full-history::
-
- Show also parts of history irrelevant to current state of a given
- path. This turns off history simplification, which removed merges
- which didn't change anything at all at some child. It will still actually
- simplify away merges that didn't change anything at all into either
- child.
-
---no-merges::
-
- Do not print commits with more than one parent.
-
---not::
-
- Reverses the meaning of the '{caret}' prefix (or lack thereof)
- for all following revision specifiers, up to the next '--not'.
-
---all::
-
- Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
- command line as '<commit>'.
-
---stdin::
-
- In addition to the '<commit>' listed on the command
- line, read them from the standard input.
-
---quiet::
-
- Don't print anything to standard output. This form of
- git-rev-list is primarily meant to allow the caller to
- test the exit status to see if a range of objects is fully
- connected (or not). It is faster than redirecting stdout
- to /dev/null as the output does not have to be formatted.
-
---cherry-pick::
-
- Omit any commit that introduces the same change as
- another commit on the "other side" when the set of
- commits are limited with symmetric difference.
-+
-For example, if you have two branches, `A` and `B`, a usual way
-to list all commits on only one side of them is with
-`--left-right`, like the example above in the description of
-that option. It however shows the commits that were cherry-picked
-from the other branch (for example, "3rd on b" may be cherry-picked
-from branch A). With this option, such pairs of commits are
-excluded from the output.
-
--g, --walk-reflogs::
-
- Instead of walking the commit ancestry chain, walk
- reflog entries from the most recent one to older ones.
- When this option is used you cannot specify commits to
- exclude (that is, '{caret}commit', 'commit1..commit2',
- nor 'commit1...commit2' notations cannot be used).
-+
-With '\--pretty' format other than oneline (for obvious reasons),
-this causes the output to have two extra lines of information
-taken from the reflog. By default, 'commit@\{Nth}' notation is
-used in the output. When the starting commit is specified as
-'commit@{now}', output also uses 'commit@\{timestamp}' notation
-instead. Under '\--pretty=oneline', the commit message is
-prefixed with this information on the same line.
-
-Cannot be combined with '\--reverse'.
-
---merge::
-
- After a failed merge, show refs that touch files having a
- conflict and don't exist on all heads to merge.
-
---boundary::
-
- Output uninteresting commits at the boundary, which are usually
- not shown.
-
---dense, --sparse::
-
-When optional paths are given, the default behaviour ('--dense') is to
-only output commits that changes at least one of them, and also ignore
-merges that do not touch the given paths.
-
-Use the '--sparse' flag to makes the command output all eligible commits
-(still subject to count and age limitation), but apply merge
-simplification nevertheless.
-
---bisect::
-
-Limit output to the one commit object which is roughly halfway between
-the included and excluded commits. Thus, if
-
------------------------------------------------------------------------
- $ git-rev-list --bisect foo ^bar ^baz
------------------------------------------------------------------------
-
-outputs 'midpoint', the output of the two commands
-
------------------------------------------------------------------------
- $ git-rev-list foo ^midpoint
- $ git-rev-list midpoint ^bar ^baz
------------------------------------------------------------------------
-
-would be of roughly the same length. Finding the change which
-introduces a regression is thus reduced to a binary search: repeatedly
-generate and test new 'midpoint's until the commit chain is of length
-one.
-
---bisect-vars::
-
-This calculates the same as `--bisect`, but outputs text ready
-to be eval'ed by the shell. These lines will assign the name of
-the midpoint revision to the variable `bisect_rev`, and the
-expected number of commits to be tested after `bisect_rev` is
-tested to `bisect_nr`, the expected number of commits to be
-tested if `bisect_rev` turns out to be good to `bisect_good`,
-the expected number of commits to be tested if `bisect_rev`
-turns out to be bad to `bisect_bad`, and the number of commits
-we are bisecting right now to `bisect_all`.
-
---bisect-all::
-
-This outputs all the commit objects between the included and excluded
-commits, ordered by their distance to the included and excluded
-commits. The farthest from them is displayed first. (This is the only
-one displayed by `--bisect`.)
-
-This is useful because it makes it easy to choose a good commit to
-test when you want to avoid to test some of them for some reason (they
-may not compile for example).
-
-This option can be used along with `--bisect-vars`, in this case,
-after all the sorted commit objects, there will be the same text as if
-`--bisect-vars` had been used alone.
-
---
-
-Commit Ordering
-~~~~~~~~~~~~~~~
-
-By default, the commits are shown in reverse chronological order.
-
---topo-order::
-
- This option makes them appear in topological order (i.e.
- descendant commits are shown before their parents).
-
---date-order::
-
- This option is similar to '--topo-order' in the sense that no
- parent comes before all of its children, but otherwise things
- are still ordered in the commit timestamp order.
-
---reverse::
-
- Output the commits in reverse order.
- Cannot be combined with '\--walk-reflogs'.
-
-Object Traversal
-~~~~~~~~~~~~~~~~
-
-These options are mostly targeted for packing of git repositories.
-
---objects::
-
- Print the object IDs of any object referenced by the listed
- commits. 'git-rev-list --objects foo ^bar' thus means "send me
- all object IDs which I need to download if I have the commit
- object 'bar', but not 'foo'".
-
---objects-edge::
-
- Similar to '--objects', but also print the IDs of excluded
- commits prefixed with a "-" character. This is used by
- gitlink:git-pack-objects[1] to build "thin" pack, which records
- objects in deltified form based on objects contained in these
- excluded commits to reduce network traffic.
-
---unpacked::
-
- Only useful with '--objects'; print the object IDs that are not
- in packs.
-
---no-walk::
-
- Only show the given revs, but do not traverse their ancestors.
-
---do-walk::
-
- Overrides a previous --no-walk.
-
+:git-rev-list: 1
+include::rev-list-options.txt[]
include::pretty-formats.txt[]
@@ -450,4 +105,4 @@ and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 329fce0aa..f02f6bbb4 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -70,6 +70,13 @@ OPTIONS
possible '{caret}' prefix); this option makes them output in a
form as close to the original input as possible.
+--symbolic-full-name::
+ This is similar to \--symbolic, but it omits input that
+ are not refs (i.e. branch or tag names; or more
+ explicitly disambiguating "heads/master" form, when you
+ want to name the "master" branch when there is an
+ unfortunately named tag "master"), and show them as full
+ refnames (e.g. "refs/heads/master").
--all::
Show all refs found in `$GIT_DIR/refs`.
@@ -222,13 +229,13 @@ blobs contained in a commit.
* A colon, optionally followed by a stage number (0 to 3) and a
colon, followed by a path; this names a blob object in the
index at the given path. Missing stage number (and the colon
- that follows it) names an stage 0 entry. During a merge, stage
+ that follows it) names a stage 0 entry. During a merge, stage
1 is the common ancestor, stage 2 is the target branch's version
(typically the current branch), and stage 3 is the version from
the branch being merged.
-Here is an illustration, by Jon Loeliger. Both node B and C are
-a commit parents of commit node A. Parent commits are ordered
+Here is an illustration, by Jon Loeliger. Both commit nodes B
+and C are parents of commit node A. Parent commits are ordered
left-to-right.
G H I J
@@ -284,7 +291,7 @@ and its parent commits exists. `r1{caret}@` notation means all
parents of `r1`. `r1{caret}!` includes commit `r1` but excludes
its all parents.
-Here are a handful examples:
+Here are a handful of examples:
D G H D
D F G H I J D F
@@ -371,4 +378,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index 3457c4078..93e20f775 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -20,11 +20,11 @@ OPTIONS
<commit>::
Commit to revert.
For a more complete list of ways to spell commit names, see
- "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+ "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
-e|--edit::
With this option, `git-revert` will let you edit the commit
- message prior committing the revert. This is the default if
+ message prior to committing the revert. This is the default if
you run the command from a terminal.
-m parent-number|--mainline parent-number::
@@ -62,4 +62,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index 48c1d97f9..dc36c662a 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -83,7 +83,7 @@ git-rm -f git-*.sh::
See Also
--------
-gitlink:git-add[1]
+linkgit:git-add[1]
Author
------
@@ -95,4 +95,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index f0bd2851d..0554f2b37 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -137,6 +137,8 @@ The --cc option must be repeated for each user you want on the cc list.
Specify the primary recipient of the emails generated.
Generally, this will be the upstream maintainer of the
project involved.
+ Default is the value of the 'sendemail.to' configuration value;
+ if that is unspecified, this will be prompted for.
+
The --to option must be repeated for each user you want on the to list.
@@ -196,4 +198,4 @@ Documentation by Ryan Anderson
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index a2d9cb61b..777515b12 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -12,7 +12,7 @@ SYNOPSIS
DESCRIPTION
-----------
-Usually you would want to use gitlink:git-push[1] which is a
+Usually you would want to use linkgit:git-push[1] which is a
higher level wrapper of this command instead.
Invokes 'git-receive-pack' on a possibly remote repository, and
@@ -86,7 +86,7 @@ and the destination side (after the colon). The ref to be
pushed is determined by finding a match that matches the source
side, and where it is pushed is determined by using the
destination side. The rules used to match a ref are the same
-rules used by gitlink:git-rev-parse[1] to resolve a symbolic ref
+rules used by linkgit:git-rev-parse[1] to resolve a symbolic ref
name.
- It is an error if <src> does not match exactly one of the
@@ -125,4 +125,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt
index 1ea1faa1b..16b8b7514 100644
--- a/Documentation/git-sh-setup.txt
+++ b/Documentation/git-sh-setup.txt
@@ -44,6 +44,11 @@ set_reflog_action::
end-user action in the reflog, when the script updates a
ref.
+git_editor::
+ runs an editor of user's choice (GIT_EDITOR, core.editor, VISUAL or
+ EDITOR) on a given file, but error out if no editor is specified
+ and the terminal is dumb.
+
is_bare_repository::
outputs `true` or `false` to the standard output stream
to indicate if the repository is a bare repository
@@ -57,6 +62,10 @@ require_work_tree::
if so. Used by scripts that require working tree
(e.g. `checkout`).
+get_author_ident_from_commit::
+ outputs code for use with eval to set the GIT_AUTHOR_NAME,
+ GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.
+
Author
------
@@ -68,4 +77,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt
index 48f2d57b7..bc031e0cc 100644
--- a/Documentation/git-shell.txt
+++ b/Documentation/git-shell.txt
@@ -31,4 +31,4 @@ Documentation by Petr Baudis and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
index e14720b73..c7752575d 100644
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -38,15 +38,16 @@ OPTIONS
FILES
-----
-.mailmap::
- If this file exists, it will be used for mapping author email
- addresses to a real author name. One mapping per line, first
- the author name followed by the email address enclosed by
- '<' and '>'. Use hash '#' for comments. Example:
+If the file `.mailmap` exists, it will be used for mapping author
+email addresses to a real author name. One mapping per line, first
+the author name followed by the email address enclosed by
+'<' and '>'. Use hash '#' for comments. Example:
- # Keep alphabetized
- Adam Morrow <adam@localhost.localdomain>
- Eve Jones <eve@laptop.(none)>
+------------
+# Keep alphabetized
+Adam Morrow <adam@localhost.localdomain>
+Eve Jones <eve@laptop.(none)>
+------------
Author
------
@@ -58,4 +59,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
index ba5313d51..0bb8250b2 100644
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -190,4 +190,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt
index 764d99356..535a88464 100644
--- a/Documentation/git-show-index.txt
+++ b/Documentation/git-show-index.txt
@@ -31,4 +31,4 @@ Documentation by Junio C Hamano
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 7893a5088..ce0e643fb 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -130,7 +130,7 @@ When using the '--verify' flag, the command requires an exact path:
will only match the exact branch called "master".
-If nothing matches, gitlink:git-show-ref[1] will return an error code of 1,
+If nothing matches, linkgit:git-show-ref[1] will return an error code of 1,
and in the case of verification, it will show an error message.
For scripting, you can ask it to be quiet with the "--quiet" flag, which
@@ -160,7 +160,7 @@ to get a listing of all tags together with what they dereference.
SEE ALSO
--------
-gitlink:git-ls-remote[1]
+linkgit:git-ls-remote[1]
AUTHORS
-------
@@ -169,4 +169,4 @@ Man page by Jonas Fonseca <fonseca@diku.dk>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index a42e12115..dccf0e20e 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -20,12 +20,12 @@ presents the merge commit in a special format as produced by
For tags, it shows the tag message and the referenced objects.
-For trees, it shows the names (equivalent to gitlink:git-ls-tree[1]
+For trees, it shows the names (equivalent to linkgit:git-ls-tree[1]
with \--name-only).
For plain blobs, it shows the plain contents.
-The command takes options applicable to the gitlink:git-diff-tree[1] command to
+The command takes options applicable to the linkgit:git-diff-tree[1] command to
control how the changes the commit introduces are shown.
This manual page describes only the most frequently used options.
@@ -36,7 +36,7 @@ OPTIONS
<object>::
The name of the object to show.
For a more complete list of ways to spell object names, see
- "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+ "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
include::pretty-options.txt[]
@@ -83,4 +83,4 @@ This manual page is a stub. You can help the git documentation by expanding it.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index c0147b99a..cd0dc1bd9 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git-stash' (list | show [<stash>] | apply [<stash>] | clear)
-'git-stash' [save] [message...]
+'git-stash' [save [<message>]]
DESCRIPTION
-----------
@@ -36,11 +36,12 @@ is also possible).
OPTIONS
-------
-save::
+save [<message>]::
Save your local modifications to a new 'stash', and run `git-reset
--hard` to revert them. This is the default action when no
- subcommand is given.
+ subcommand is given. The <message> part is optional and gives
+ the description along with the stashed state.
list::
@@ -156,10 +157,10 @@ $ git stash apply
SEE ALSO
--------
-gitlink:git-checkout[1],
-gitlink:git-commit[1],
-gitlink:git-reflog[1],
-gitlink:git-reset[1]
+linkgit:git-checkout[1],
+linkgit:git-commit[1],
+linkgit:git-reflog[1],
+linkgit:git-reset[1]
AUTHOR
------
@@ -167,4 +168,4 @@ Written by Nanako Shiraishi <nanako3@bluebottle.com>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 5c5a480ec..3ea269aa7 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -15,7 +15,7 @@ DESCRIPTION
Displays paths that have differences between the index file and the
current HEAD commit, paths that have differences between the working
tree and the index file, and paths in the working tree that are not
-tracked by git (and are not ignored by gitlink:gitignore[5]). The first
+tracked by git (and are not ignored by linkgit:gitignore[5]). The first
are what you _would_ commit by running `git commit`; the second and
third are what you _could_ commit by running `git add` before running
`git commit`.
@@ -54,7 +54,7 @@ directory.
See Also
--------
-gitlink:gitignore[5]
+linkgit:gitignore[5]
Author
------
@@ -67,4 +67,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index f80526ba7..fc5687502 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -32,4 +32,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 3f5970568..e818e6e78 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -9,8 +9,9 @@ git-submodule - Initialize, update or inspect submodules
SYNOPSIS
--------
[verse]
-'git-submodule' [--quiet] [-b branch] add <repository> [<path>]
-'git-submodule' [--quiet] [--cached] [status|init|update] [--] [<path>...]
+'git-submodule' [--quiet] add [-b branch] [--] <repository> [<path>]
+'git-submodule' [--quiet] status [--cached] [--] [<path>...]
+'git-submodule' [--quiet] [init|update] [--] [<path>...]
COMMANDS
@@ -28,7 +29,7 @@ add::
status::
Show the status of the submodules. This will print the SHA-1 of the
currently checked out commit for each submodule, along with the
- submodule path and the output of gitlink:git-describe[1] for the
+ submodule path and the output of linkgit:git-describe[1] for the
SHA-1. Each SHA-1 will be prefixed with `-` if the submodule is not
initialized and `+` if the currently checked out submodule commit
does not match the SHA-1 found in the index of the containing
@@ -67,8 +68,8 @@ FILES
-----
When initializing submodules, a .gitmodules file in the top-level directory
of the containing repository is used to find the url of each submodule.
-This file should be formatted in the same way as $GIR_DIR/config. The key
-to each submodule url is "submodule.$name.url". See gitlink:gitmodules[5]
+This file should be formatted in the same way as `$GIT_DIR/config`. The key
+to each submodule url is "submodule.$name.url". See linkgit:gitmodules[5]
for details.
@@ -78,4 +79,4 @@ Written by Lars Hjemli <hjemli@gmail.com>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 918a9928b..340f1be02 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -12,7 +12,7 @@ SYNOPSIS
DESCRIPTION
-----------
git-svn is a simple conduit for changesets between Subversion and git.
-It is not to be confused with gitlink:git-svnimport[1], which is
+It is not to be confused with linkgit:git-svnimport[1], which is
read-only.
git-svn was originally designed for an individual developer who wants a
@@ -161,6 +161,13 @@ New features:
+
Any other arguments are passed directly to `git log'
+'blame'::
+ Show what revision and author last modified each line of a file. This is
+ identical to `git blame', but SVN revision numbers are shown instead of git
+ commit hashes.
++
+All arguments are passed directly to `git blame'.
+
--
'find-rev'::
When given an SVN revision number of the form 'rN', returns the
@@ -208,7 +215,7 @@ OPTIONS
--shared[={false|true|umask|group|all|world|everybody}]::
--template=<template_directory>::
Only used with the 'init' command.
- These are passed directly to gitlink:git-init[1].
+ These are passed directly to linkgit:git-init[1].
-r <ARG>::
--revision <ARG>::
@@ -261,7 +268,7 @@ config key: svn.edit
Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
They are both passed directly to git-diff-tree see
-gitlink:git-diff-tree[1] for more information.
+linkgit:git-diff-tree[1] for more information.
[verse]
config key: svn.l
@@ -299,7 +306,7 @@ with many revisions.
to fetch before repacking. This defaults to repacking every
1000 commits fetched if no argument is specified.
---repack-flags are passed directly to gitlink:git-repack[1].
+--repack-flags are passed directly to linkgit:git-repack[1].
[verse]
config key: svn.repack
@@ -456,10 +463,13 @@ have each person clone that repository with 'git clone':
------------------------------------------------------------------------
# Do the initial import on a server
ssh server "cd /pub && git-svn clone http://svn.foo.org/project
-# Clone locally
- git clone server:/pub/project
-# Tell git-svn which branch contains the Subversion commits
- git update-ref refs/remotes/git-svn origin/master
+# Clone locally - make sure the refs/remotes/ space matches the server
+ mkdir project
+ cd project
+ git-init
+ git remote add origin server:/pub/project
+ git config --add remote.origin.fetch=+refs/remotes/*:refs/remotes/*
+ git fetch
# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
git-svn init http://svn.foo.org/project
# Pull the latest changes from Subversion
@@ -561,11 +571,11 @@ however the remote wildcard may be anywhere as long as it's own
independent path component (surrounded by '/' or EOL). This
type of configuration is not automatically created by 'init' and
should be manually entered with a text-editor or using
-gitlink:git-config[1]
+linkgit:git-config[1]
SEE ALSO
--------
-gitlink:git-rebase[1]
+linkgit:git-rebase[1]
Author
------
diff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt
index 694cabab2..a5b40f3e8 100644
--- a/Documentation/git-symbolic-ref.txt
+++ b/Documentation/git-symbolic-ref.txt
@@ -58,4 +58,4 @@ Written by Junio C Hamano <junkio@cox.net>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 784ec6d4c..b62a3d1c5 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -248,4 +248,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt
index 434607bfb..65c68176e 100644
--- a/Documentation/git-tar-tree.txt
+++ b/Documentation/git-tar-tree.txt
@@ -86,4 +86,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-unpack-file.txt b/Documentation/git-unpack-file.txt
index 20bb6a780..1864d13ed 100644
--- a/Documentation/git-unpack-file.txt
+++ b/Documentation/git-unpack-file.txt
@@ -32,4 +32,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt
index d529a43f5..b79be3fd4 100644
--- a/Documentation/git-unpack-objects.txt
+++ b/Documentation/git-unpack-objects.txt
@@ -51,4 +51,4 @@ Documentation by Junio C Hamano
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 0a1953803..66be18ef3 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -27,7 +27,7 @@ Modifies the index or directory cache. Each file mentioned is updated
into the index and any 'unmerged' or 'needs updating' state is
cleared.
-See also gitlink:git-add[1] for a more user-friendly way to do some of
+See also linkgit:git-add[1] for a more user-friendly way to do some of
the most common operations on the index.
The way "git-update-index" handles files it is told about can be modified
@@ -292,14 +292,14 @@ Configuration
The command honors `core.filemode` configuration variable. If
your repository is on an filesystem whose executable bits are
-unreliable, this should be set to 'false' (see gitlink:git-config[1]).
+unreliable, this should be set to 'false' (see linkgit:git-config[1]).
This causes the command to ignore differences in file modes recorded
in the index and the file mode on the filesystem if they differ only on
executable bit. On such an unfortunate filesystem, you may
need to use `git-update-index --chmod=`.
Quite similarly, if `core.symlinks` configuration variable is set
-to 'false' (see gitlink:git-config[1]), symbolic links are checked out
+to 'false' (see linkgit:git-config[1]), symbolic links are checked out
as plain files, and this command does not modify a recorded file mode
from symbolic link to regular file.
@@ -309,8 +309,8 @@ The command looks at `core.ignorestat` configuration variable. See
See Also
--------
-gitlink:git-config[1],
-gitlink:git-add[1]
+linkgit:git-config[1],
+linkgit:git-add[1]
Author
@@ -323,4 +323,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index f22261659..4dc475992 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -90,4 +90,4 @@ Written by Linus Torvalds <torvalds@osdl.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-update-server-info.txt b/Documentation/git-update-server-info.txt
index e7e82a31e..1cf89fd79 100644
--- a/Documentation/git-update-server-info.txt
+++ b/Documentation/git-update-server-info.txt
@@ -54,4 +54,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-upload-archive.txt b/Documentation/git-upload-archive.txt
index 403871d7c..c1ef1440b 100644
--- a/Documentation/git-upload-archive.txt
+++ b/Documentation/git-upload-archive.txt
@@ -34,4 +34,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt
index fd6519299..2330d1381 100644
--- a/Documentation/git-upload-pack.txt
+++ b/Documentation/git-upload-pack.txt
@@ -43,4 +43,4 @@ Documentation by Junio C Hamano.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index 813942368..298028390 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -47,9 +47,9 @@ Your sysadmin must hate you!::
See Also
--------
-gitlink:git-commit-tree[1]
-gitlink:git-tag[1]
-gitlink:git-config[1]
+linkgit:git-commit-tree[1]
+linkgit:git-tag[1]
+linkgit:git-config[1]
Author
------
@@ -61,4 +61,4 @@ Documentation by Eric Biederman and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-verify-pack.txt b/Documentation/git-verify-pack.txt
index f4c540f39..db019a2b8 100644
--- a/Documentation/git-verify-pack.txt
+++ b/Documentation/git-verify-pack.txt
@@ -50,4 +50,4 @@ Documentation by Junio C Hamano
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-verify-tag.txt b/Documentation/git-verify-tag.txt
index ac7fb1915..7e9c1ed15 100644
--- a/Documentation/git-verify-tag.txt
+++ b/Documentation/git-verify-tag.txt
@@ -28,4 +28,4 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-whatchanged.txt b/Documentation/git-whatchanged.txt
index 607df48f0..54947b676 100644
--- a/Documentation/git-whatchanged.txt
+++ b/Documentation/git-whatchanged.txt
@@ -77,4 +77,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git-write-tree.txt b/Documentation/git-write-tree.txt
index cb8d6aade..461c813f5 100644
--- a/Documentation/git-write-tree.txt
+++ b/Documentation/git-write-tree.txt
@@ -46,4 +46,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 37235b993..17aee93ec 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -28,7 +28,7 @@ link:user-manual.html[Git User's Manual] for a more in-depth
introduction.
The COMMAND is either a name of a Git command (see below) or an alias
-as defined in the configuration file (see gitlink:git-config[1]).
+as defined in the configuration file (see linkgit:git-config[1]).
Formatted and hyperlinked version of the latest git
documentation can be viewed at
@@ -43,9 +43,15 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.5.3/git.html[documentation for release 1.5.3]
+* link:v1.5.4/git.html[documentation for release 1.5.4]
* release notes for
+ link:RelNotes-1.5.4.txt[1.5.4].
+
+* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
+
+* release notes for
+ link:RelNotes-1.5.3.8.txt[1.5.3.8],
link:RelNotes-1.5.3.7.txt[1.5.3.7],
link:RelNotes-1.5.3.6.txt[1.5.3.6],
link:RelNotes-1.5.3.5.txt[1.5.3.5],
@@ -106,7 +112,7 @@ OPTIONS
option will bring up the manual page for that command.
+
Other options are available to control how the manual page is
-displayed. See gitlink:git-help[1] for more information,
+displayed. See linkgit:git-help[1] for more information,
because 'git --help ...' is converted internally into 'git
help ...'.
@@ -198,8 +204,8 @@ Low-level commands (plumbing)
Although git includes its
own porcelain layer, its low-level commands are sufficient to support
development of alternative porcelains. Developers of such porcelains
-might start by reading about gitlink:git-update-index[1] and
-gitlink:git-read-tree[1].
+might start by reading about linkgit:git-update-index[1] and
+linkgit:git-read-tree[1].
The interface (input, output, set of options and the semantics)
to these low-level commands are meant to be a lot more stable
@@ -331,7 +337,7 @@ HEAD::
(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
For a more complete list of ways to spell object names, see
-"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
File/Directory Structure
@@ -399,7 +405,7 @@ git Commits
'GIT_COMMITTER_EMAIL'::
'GIT_COMMITTER_DATE'::
'EMAIL'::
- see gitlink:git-commit-tree[1]
+ see linkgit:git-commit-tree[1]
git Diffs
~~~~~~~~~
@@ -439,7 +445,7 @@ other
'GIT_MERGE_VERBOSITY'::
A number controlling the amount of output shown by
the recursive merge strategy. Overrides merge.verbosity.
- See gitlink:git-merge[1]
+ See linkgit:git-merge[1]
'GIT_PAGER'::
This environment variable overrides `$PAGER`. If it is set
@@ -447,8 +453,8 @@ other
a pager.
'GIT_SSH'::
- If this environment variable is set then gitlink:git-fetch[1]
- and gitlink:git-push[1] will use this command instead
+ If this environment variable is set then linkgit:git-fetch[1]
+ and linkgit:git-push[1] will use this command instead
of `ssh` when they need to connect to a remote system.
The 'GIT_SSH' command will be given exactly two arguments:
the 'username@host' (or just 'host') from the URL and the
@@ -554,4 +560,4 @@ contributors on the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 71c7ad76d..35a29fd60 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -238,7 +238,7 @@ When git needs to show you a diff for the path with `diff`
attribute set to `jcdiff`, it calls the command you specified
with the above configuration, i.e. `j-c-diff`, with 7
parameters, just like `GIT_EXTERNAL_DIFF` program is called.
-See gitlink:git[7] for details.
+See linkgit:git[7] for details.
Defining a custom hunk-header
@@ -322,12 +322,43 @@ String::
requested with "binary".
+Built-in merge drivers
+^^^^^^^^^^^^^^^^^^^^^^
+
+There are a few built-in low-level merge drivers defined that
+can be asked for via the `merge` attribute.
+
+text::
+
+ Usual 3-way file level merge for text files. Conflicted
+ regions are marked with conflict markers `<<<<<<<`,
+ `=======` and `>>>>>>>`. The version from your branch
+ appears before the `=======` marker, and the version
+ from the merged branch appears after the `=======`
+ marker.
+
+binary::
+
+ Keep the version from your branch in the work tree, but
+ leave the path in the conflicted state for the user to
+ sort out.
+
+union::
+
+ Run 3-way file level merge for text files, but take
+ lines from both versions, instead of leaving conflict
+ markers. This tends to leave the added lines in the
+ resulting file in random order and the user should
+ verify the result. Do not use this if you do not
+ understand the implications.
+
+
Defining a custom merge driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The definition of a merge driver is done in `gitconfig` not
-`gitattributes` file, so strictly speaking this manual page is a
-wrong place to talk about it. However...
+The definition of a merge driver is done in the `.git/config`
+file, not in the `gitattributes` file, so strictly speaking this
+manual page is a wrong place to talk about it. However...
To define a custom merge driver `filfre`, add a section to your
`$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this:
@@ -369,7 +400,7 @@ Checking whitespace errors
The `core.whitespace` configuration variable allows you to define what
`diff` and `apply` should consider whitespace errors for all paths in
-the project (See gitlink:git-config[1]). This attribute gives you finer
+the project (See linkgit:git-config[1]). This attribute gives you finer
control per path.
Set::
@@ -450,9 +481,9 @@ Creating an archive
If the attribute `export-subst` is set for a file then git will expand
several placeholders when adding this file to an archive. The
expansion depends on the availability of a commit ID, i.e. if
-gitlink:git-archive[1] has been given a tree instead of a commit or a
+linkgit:git-archive[1] has been given a tree instead of a commit or a
tag then no replacement will be done. The placeholders are the same
-as those for the option `--pretty=format:` of gitlink:git-log[1],
+as those for the option `--pretty=format:` of linkgit:git-log[1],
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
in the file. E.g. the string `$Format:%H$` will be replaced by the
commit hash.
@@ -460,4 +491,4 @@ commit hash.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index b7dcf9ca1..7ee5ce386 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -95,7 +95,7 @@ $ git foo -oArg
$ git foo -o Arg
----------------------------
-However, this is *NOT* allowed for switches with an optionnal value, where the
+However, this is *NOT* allowed for switches with an optional value, where the
'sticked' form must be used:
----------------------------
$ git describe --abbrev HEAD # correct
@@ -110,4 +110,4 @@ Documentation by Pierre Habouzit.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index e8b8581f5..08373f52b 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -39,10 +39,10 @@ precedence, the last matching pattern decides the outcome):
variable 'core.excludesfile'.
The underlying git plumbing tools, such as
-gitlink:git-ls-files[1] and gitlink:git-read-tree[1], read
+linkgit:git-ls-files[1] and linkgit:git-read-tree[1], read
`gitignore` patterns specified by command-line options, or from
files specified by command-line options. Higher-level git
-tools, such as gitlink:git-status[1] and gitlink:git-add[1],
+tools, such as linkgit:git-status[1] and linkgit:git-add[1],
use patterns from the sources specified above.
Patterns have the following format:
@@ -119,4 +119,4 @@ Frank Lichtenheld, and the git-list <git@vger.kernel.org>.
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt
index 8dbfb0d5a..29edafced 100644
--- a/Documentation/gitk.txt
+++ b/Documentation/gitk.txt
@@ -22,7 +22,7 @@ git repository.
OPTIONS
-------
To control which revisions to shown, the command takes options applicable to
-the gitlink:git-rev-list[1] command. This manual page describes only the most
+the linkgit:git-rev-list[1] command. This manual page describes only the most
frequently used options.
-n <number>, --max-count=<number>::
@@ -48,7 +48,7 @@ frequently used options.
the form "'<from>'..'<to>'" to show all revisions between '<from>' and
back to '<to>'. Note, more advanced revision selection can be applied.
For a more complete list of ways to spell object names, see
- "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
+ "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
<path>::
@@ -98,4 +98,4 @@ Documentation by Junio C Hamano, Jonas Fonseca, and the git-list
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 035294e20..cc95b69f2 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -15,7 +15,7 @@ DESCRIPTION
The `.gitmodules` file, located in the top-level directory of a git
working tree, is a text file with a syntax matching the requirements
-of gitlink:git-config[1].
+of linkgit:git-config[1].
The file contains one subsection per submodule, and the subsection value
is the name of the submodule. Each submodule section also contains the
@@ -51,7 +51,7 @@ submodules an url is specified which can be used for cloning the submodules.
SEE ALSO
--------
-gitlink:git-submodule[1] gitlink:git-config[1]
+linkgit:git-submodule[1] linkgit:git-config[1]
DOCUMENTATION
-------------
@@ -59,4 +59,4 @@ Documentation by Lars Hjemli <hjemli@gmail.com>
GIT
---
-Part of the gitlink:git[7] suite
+Part of the linkgit:git[7] suite
diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt
index 65f55e4ce..ab4caf4e2 100644
--- a/Documentation/glossary.txt
+++ b/Documentation/glossary.txt
@@ -140,7 +140,7 @@ to point at the new commit.
branch's <<def_head_ref,head ref>> from a remote
<<def_repository,repository>>, to find out which objects are
missing from the local <<def_object_database,object database>>,
- and to get them, too. See also gitlink:git-fetch[1].
+ and to get them, too. See also linkgit:git-fetch[1].
[[def_file_system]]file system::
Linus Torvalds originally designed git to be a user space file system,
@@ -164,7 +164,7 @@ to point at the new commit.
A <<def_ref,named reference>> to the <<def_commit,commit>> at the tip of a
<<def_branch,branch>>. Heads are stored in
`$GIT_DIR/refs/heads/`, except when using packed refs. (See
- gitlink:git-pack-refs[1].)
+ linkgit:git-pack-refs[1].)
[[def_HEAD]]HEAD::
The current <<def_branch,branch>>. In more detail: Your <<def_working_tree,
@@ -282,7 +282,7 @@ This commit is referred to as a "merge commit", or sometimes just a
routines that help select changes that add or delete a given text
string. With the `--pickaxe-all` option, it can be used to view the full
<<def_changeset,changeset>> that introduced or removed, say, a
- particular line of text. See gitlink:git-diff[1].
+ particular line of text. See linkgit:git-diff[1].
[[def_plumbing]]plumbing::
Cute name for <<def_core_git,core git>>.
@@ -295,7 +295,7 @@ This commit is referred to as a "merge commit", or sometimes just a
[[def_pull]]pull::
Pulling a <<def_branch,branch>> means to <<def_fetch,fetch>> it and
- <<def_merge,merge>> it. See also gitlink:git-pull[1].
+ <<def_merge,merge>> it. See also linkgit:git-pull[1].
[[def_push]]push::
Pushing a <<def_branch,branch>> means to get the branch's
@@ -333,7 +333,7 @@ This commit is referred to as a "merge commit", or sometimes just a
A reflog shows the local "history" of a ref. In other words,
it can tell you what the 3rd last revision in _this_ repository
was, and what was the current state in _this_ repository,
- yesterday 9:14pm. See gitlink:git-reflog[1] for details.
+ yesterday 9:14pm. See linkgit:git-reflog[1] for details.
[[def_refspec]]refspec::
A "refspec" is used by <<def_fetch,fetch>> and
@@ -346,7 +346,7 @@ This commit is referred to as a "merge commit", or sometimes just a
it as my origin branch head". And `git push
$URL refs/heads/master:refs/heads/to-upstream` means "publish my
master branch head as to-upstream branch at $URL". See also
- gitlink:git-push[1].
+ linkgit:git-push[1].
[[def_repository]]repository::
A collection of <<def_ref,refs>> together with an
@@ -383,15 +383,15 @@ This commit is referred to as a "merge commit", or sometimes just a
object>>). This is sometimes useful when you are interested only in the
recent history of a project even though the real history recorded in the
upstream is much larger. A shallow repository
- is created by giving the `--depth` option to gitlink:git-clone[1], and
- its history can be later deepened with gitlink:git-fetch[1].
+ is created by giving the `--depth` option to linkgit:git-clone[1], and
+ its history can be later deepened with linkgit:git-fetch[1].
[[def_symref]]symref::
Symbolic reference: instead of containing the <<def_SHA1,SHA1>>
id itself, it is of the format 'ref: refs/some/thing' and when
referenced, it recursively dereferences to this reference.
'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic
- references are manipulated with the gitlink:git-symbolic-ref[1]
+ references are manipulated with the linkgit:git-symbolic-ref[1]
command.
[[def_tag]]tag::
diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt
new file mode 100644
index 000000000..0953a50b6
--- /dev/null
+++ b/Documentation/howto/using-merge-subtree.txt
@@ -0,0 +1,75 @@
+Date: Sat, 5 Jan 2008 20:17:40 -0500
+From: Sean <seanlkml@sympatico.ca>
+To: Miklos Vajna <vmiklos@frugalware.org>
+Cc: git@vger.kernel.org
+Subject: how to use git merge -s subtree?
+Abstract: In this article, Sean demonstrates how one can use the subtree merge
+ strategy.
+Content-type: text/asciidoc
+Message-ID: <BAYC1-PASMTP12374B54BA370A1E1C6E78AE4E0@CEZ.ICE>
+
+How to use the subtree merge strategy
+=====================================
+
+There are situations where you want to include contents in your project
+from an independently developed project. You can just pull from the
+other project as long as there are no conflicting paths.
+
+The problematic case is when there are conflicting files. Potential
+candidates are Makefiles and other standard filenames. You could merge
+these files but probably you do not want to. A better solution for this
+problem can be to merge the project as its own subdirectory. This is not
+supported by the 'recursive' merge strategy, so just pulling won't work.
+
+What you want is the 'subtree' merge strategy, which helps you in such a
+situation.
+
+In this example, let's say you have the repository at `/path/to/B` (but
+it can be an URL as well, if you want). You want to merge the 'master'
+branch of that repository to the `dir-B` subdirectory in your current
+branch.
+
+Here is the command sequence you need:
+
+----------------
+$ git remote add -f Bproject /path/to/B <1>
+$ git merge -s ours --no-commit Bproject/master <2>
+$ git read-tree --prefix=dir-B/ -u Bproject/master <3>
+$ git commit -m "Merge B project as our subdirectory" <4>
+
+$ git pull -s subtree Bproject master <5>
+----------------
+<1> name the other project "Bproject", and fetch.
+<2> prepare for the later step to record the result as a merge.
+<3> read "master" branch of Bproject to the subdirectory "dir-B".
+<4> record the merge result.
+<5> maintain the result with subsequent merges using "subtree"
+
+The first four commands are used for the initial merge, while the last
+one is to merge updates from 'B project'.
+
+Comparing 'subtree' merge with submodules
+-----------------------------------------
+
+- The benefit of using subtree merge is that it requires less
+ administrative burden from the users of your repository. It works with
+ older (before Git v1.5.2) clients and you have the code right after
+ clone.
+
+- However if you use submodules then you can choose not to transfer the
+ submodule objects. This may be a problem with the subtree merge.
+
+- Also, in case you make changes to the other project, it is easier to
+ submit changes if you just use submodules.
+
+Additional tips
+---------------
+
+- If you made changes to the other project in your repository, they may
+ want to merge from your project. This is possible using subtree -- it
+ can shift up the paths in your tree and then they can merge only the
+ relevant parts of your tree.
+
+- Please note that if the other project merges from you, then it will
+ connects its history to yours, which can be something they don't want
+ to.
diff --git a/Documentation/i18n.txt b/Documentation/i18n.txt
index b95f99be6..1e188e6e7 100644
--- a/Documentation/i18n.txt
+++ b/Documentation/i18n.txt
@@ -22,7 +22,7 @@ does not forbid it. However, there are a few things to keep in
mind.
. `git-commit-tree` (hence, `git-commit` which uses it) issues
- an warning if the commit log message given to it does not look
+ 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
have i18n.commitencoding in `.git/config` file, like this:
diff --git a/Documentation/manpage-1.72.xsl b/Documentation/manpage-1.72.xsl
new file mode 100644
index 000000000..fe3cd72d6
--- /dev/null
+++ b/Documentation/manpage-1.72.xsl
@@ -0,0 +1,17 @@
+<!-- callout.xsl: converts asciidoc callouts to man page format -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="co">
+ <xsl:value-of select="concat('&#x2593;fB(',substring-after(@id,'-'),')&#x2593;fR')"/>
+</xsl:template>
+<xsl:template match="calloutlist">
+ <xsl:text>&#x2302;sp&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;</xsl:text>
+</xsl:template>
+<xsl:template match="callout">
+ <xsl:value-of select="concat('&#x2593;fB',substring-after(@arearefs,'-'),'. &#x2593;fR')"/>
+ <xsl:apply-templates/>
+ <xsl:text>&#x2302;br&#10;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/Documentation/repository-layout.txt b/Documentation/repository-layout.txt
index 4c92e375f..693913009 100644
--- a/Documentation/repository-layout.txt
+++ b/Documentation/repository-layout.txt
@@ -19,7 +19,7 @@ trees this way, for example. A repository with this kind of
incomplete object store is not suitable to be published to the
outside world but sometimes useful for private repository.
. You also could have an incomplete but locally usable repository
-by cloning shallowly. See gitlink:git-clone[1].
+by cloning shallowly. See linkgit:git-clone[1].
. You can be using `objects/info/alternates` mechanism, or
`$GIT_ALTERNATE_OBJECT_DIRECTORIES` mechanism to 'borrow'
objects from other object stores. A repository with this kind
@@ -89,7 +89,7 @@ refs/remotes/`name`::
packed-refs::
records the same information as refs/heads/, refs/tags/,
and friends record in a more efficient way. See
- gitlink:git-pack-refs[1].
+ linkgit:git-pack-refs[1].
HEAD::
A symref (see glossary) to the `refs/heads/` namespace
@@ -106,7 +106,7 @@ HEAD::
HEAD can also record a specific commit directly, instead of
being a symref to point at the current branch. Such a state
is often called 'detached HEAD', and almost all commands work
-identically as normal. See gitlink:git-checkout[1] for
+identically as normal. See linkgit:git-checkout[1] for
details.
branches::
@@ -155,7 +155,7 @@ info/exclude::
exclude pattern list. `.gitignore` is the per-directory
ignore file. `git status`, `git add`, `git rm` and `git
clean` look at it but the core git commands do not look
- at it. See also: gitlink:gitignore[5].
+ at it. See also: linkgit:gitignore[5].
remotes::
Stores shorthands to be used to give URL and default
@@ -176,4 +176,4 @@ logs/refs/tags/`name`::
shallow::
This is similar to `info/grafts` but is internally used
and maintained by shallow clone mechanism. See `--depth`
- option to gitlink:git-clone[1] and gitlink:git-fetch[1].
+ option to linkgit:git-clone[1] and linkgit:git-fetch[1].
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
new file mode 100644
index 000000000..a8138e27a
--- /dev/null
+++ b/Documentation/rev-list-options.txt
@@ -0,0 +1,361 @@
+Commit Formatting
+~~~~~~~~~~~~~~~~~
+
+ifdef::git-rev-list[]
+Using these options, linkgit:git-rev-list[1] will act similar to the
+more specialized family of commit log tools: linkgit:git-log[1],
+linkgit:git-show[1], and linkgit:git-whatchanged[1]
+endif::git-rev-list[]
+
+include::pretty-options.txt[]
+
+--relative-date::
+
+ Synonym for `--date=relative`.
+
+--date={relative,local,default,iso,rfc}::
+
+ Only takes effect for dates shown in human-readable format, such
+ as when using "--pretty".
++
+`--date=relative` shows dates relative to the current time,
+e.g. "2 hours ago".
++
+`--date=local` shows timestamps in user's local timezone.
++
+`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
++
+`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822
+format, often found in E-mail messages.
++
+`--date=short` shows only date but not time, in `YYYY-MM-DD` format.
++
+`--date=default` shows timestamps in the original timezone
+(either committer's or author's).
+
+--header::
+
+ Print the contents of the commit in raw-format; each record is
+ separated with a NUL character.
+
+--parents::
+
+ Print the parents of the commit.
+
+--timestamp::
+ Print the raw commit timestamp.
+
+--left-right::
+
+ Mark which side of a symmetric diff a commit is reachable from.
+ Commits from the left side are prefixed with `<` and those from
+ the right with `>`. If combined with `--boundary`, those
+ commits are prefixed with `-`.
++
+For example, if you have this topology:
++
+-----------------------------------------------------------------------
+ y---b---b branch B
+ / \ /
+ / .
+ / / \
+ o---x---a---a branch A
+-----------------------------------------------------------------------
++
+you would get an output line this:
++
+-----------------------------------------------------------------------
+ $ git rev-list --left-right --boundary --pretty=oneline A...B
+
+ >bbbbbbb... 3rd on b
+ >bbbbbbb... 2nd on b
+ <aaaaaaa... 3rd on a
+ <aaaaaaa... 2nd on a
+ -yyyyyyy... 1st on b
+ -xxxxxxx... 1st on a
+-----------------------------------------------------------------------
+
+Diff Formatting
+~~~~~~~~~~~~~~~
+
+Below are listed options that control the formatting of diff output.
+Some of them are specific to linkgit:git-rev-list[1], however other diff
+options may be given. See linkgit:git-diff-files[1] for more options.
+
+-c::
+
+ This flag changes the way a merge commit is displayed. It shows
+ the differences from each of the parents to the merge result
+ simultaneously instead of showing pairwise diff between a parent
+ and the result one at a time. Furthermore, it lists only files
+ which were modified from all parents.
+
+--cc::
+
+ This flag implies the '-c' options and further compresses the
+ patch output by omitting hunks that show differences from only
+ one parent, or show the same change from all but one parent for
+ an Octopus merge.
+
+-r::
+
+ Show recursive diffs.
+
+-t::
+
+ Show the tree objects in the diff output. This implies '-r'.
+
+Commit Limiting
+~~~~~~~~~~~~~~~
+
+Besides specifying a range of commits that should be listed using the
+special notations explained in the description, additional commit
+limiting may be applied.
+
+--
+
+-n 'number', --max-count='number'::
+
+ Limit the number of commits output.
+
+--skip='number'::
+
+ Skip 'number' commits before starting to show the commit output.
+
+--since='date', --after='date'::
+
+ Show commits more recent than a specific date.
+
+--until='date', --before='date'::
+
+ Show commits older than a specific date.
+
+--max-age='timestamp', --min-age='timestamp'::
+
+ Limit the commits output to specified time range.
+
+--author='pattern', --committer='pattern'::
+
+ Limit the commits output to ones with author/committer
+ header lines that match the specified pattern (regular expression).
+
+--grep='pattern'::
+
+ Limit the commits output to ones with log message that
+ matches the specified pattern (regular expression).
+
+-i, --regexp-ignore-case::
+
+ Match the regexp limiting patterns without regard to letters case.
+
+-E, --extended-regexp::
+
+ Consider the limiting patterns to be extended regular expressions
+ instead of the default basic regular expressions.
+
+--remove-empty::
+
+ Stop when a given path disappears from the tree.
+
+--full-history::
+
+ Show also parts of history irrelevant to current state of a given
+ path. This turns off history simplification, which removed merges
+ which didn't change anything at all at some child. It will still actually
+ simplify away merges that didn't change anything at all into either
+ child.
+
+--no-merges::
+
+ Do not print commits with more than one parent.
+
+--first-parent::
+ Follow only the first parent commit upon seeing a merge
+ commit. This option can give a better overview when
+ viewing the evolution of a particular topic branch,
+ because merges into a topic branch tend to be only about
+ adjusting to updated upstream from time to time, and
+ this option allows you to ignore the individual commits
+ brought in to your history by such a merge.
+
+--not::
+
+ Reverses the meaning of the '{caret}' prefix (or lack thereof)
+ for all following revision specifiers, up to the next '--not'.
+
+--all::
+
+ Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
+ command line as '<commit>'.
+
+--stdin::
+
+ In addition to the '<commit>' listed on the command
+ line, read them from the standard input.
+
+--quiet::
+
+ Don't print anything to standard output. This form
+ is primarily meant to allow the caller to
+ test the exit status to see if a range of objects is fully
+ connected (or not). It is faster than redirecting stdout
+ to /dev/null as the output does not have to be formatted.
+
+--cherry-pick::
+
+ Omit any commit that introduces the same change as
+ another commit on the "other side" when the set of
+ commits are limited with symmetric difference.
++
+For example, if you have two branches, `A` and `B`, a usual way
+to list all commits on only one side of them is with
+`--left-right`, like the example above in the description of
+that option. It however shows the commits that were cherry-picked
+from the other branch (for example, "3rd on b" may be cherry-picked
+from branch A). With this option, such pairs of commits are
+excluded from the output.
+
+-g, --walk-reflogs::
+
+ Instead of walking the commit ancestry chain, walk
+ reflog entries from the most recent one to older ones.
+ When this option is used you cannot specify commits to
+ exclude (that is, '{caret}commit', 'commit1..commit2',
+ nor 'commit1...commit2' notations cannot be used).
++
+With '\--pretty' format other than oneline (for obvious reasons),
+this causes the output to have two extra lines of information
+taken from the reflog. By default, 'commit@\{Nth}' notation is
+used in the output. When the starting commit is specified as
+'commit@{now}', output also uses 'commit@\{timestamp}' notation
+instead. Under '\--pretty=oneline', the commit message is
+prefixed with this information on the same line.
+
+Cannot be combined with '\--reverse'.
+See also linkgit:git-reflog[1].
+
+--merge::
+
+ After a failed merge, show refs that touch files having a
+ conflict and don't exist on all heads to merge.
+
+--boundary::
+
+ Output uninteresting commits at the boundary, which are usually
+ not shown.
+
+--dense, --sparse::
+
+When optional paths are given, the default behaviour ('--dense') is to
+only output commits that changes at least one of them, and also ignore
+merges that do not touch the given paths.
+
+Use the '--sparse' flag to makes the command output all eligible commits
+(still subject to count and age limitation), but apply merge
+simplification nevertheless.
+
+ifdef::git-rev-list[]
+--bisect::
+
+Limit output to the one commit object which is roughly halfway between
+the included and excluded commits. Thus, if
+
+-----------------------------------------------------------------------
+ $ git-rev-list --bisect foo ^bar ^baz
+-----------------------------------------------------------------------
+
+outputs 'midpoint', the output of the two commands
+
+-----------------------------------------------------------------------
+ $ git-rev-list foo ^midpoint
+ $ git-rev-list midpoint ^bar ^baz
+-----------------------------------------------------------------------
+
+would be of roughly the same length. Finding the change which
+introduces a regression is thus reduced to a binary search: repeatedly
+generate and test new 'midpoint's until the commit chain is of length
+one.
+
+--bisect-vars::
+
+This calculates the same as `--bisect`, but outputs text ready
+to be eval'ed by the shell. These lines will assign the name of
+the midpoint revision to the variable `bisect_rev`, and the
+expected number of commits to be tested after `bisect_rev` is
+tested to `bisect_nr`, the expected number of commits to be
+tested if `bisect_rev` turns out to be good to `bisect_good`,
+the expected number of commits to be tested if `bisect_rev`
+turns out to be bad to `bisect_bad`, and the number of commits
+we are bisecting right now to `bisect_all`.
+
+--bisect-all::
+
+This outputs all the commit objects between the included and excluded
+commits, ordered by their distance to the included and excluded
+commits. The farthest from them is displayed first. (This is the only
+one displayed by `--bisect`.)
+
+This is useful because it makes it easy to choose a good commit to
+test when you want to avoid to test some of them for some reason (they
+may not compile for example).
+
+This option can be used along with `--bisect-vars`, in this case,
+after all the sorted commit objects, there will be the same text as if
+`--bisect-vars` had been used alone.
+endif::git-rev-list[]
+
+--
+
+Commit Ordering
+~~~~~~~~~~~~~~~
+
+By default, the commits are shown in reverse chronological order.
+
+--topo-order::
+
+ This option makes them appear in topological order (i.e.
+ descendant commits are shown before their parents).
+
+--date-order::
+
+ This option is similar to '--topo-order' in the sense that no
+ parent comes before all of its children, but otherwise things
+ are still ordered in the commit timestamp order.
+
+--reverse::
+
+ Output the commits in reverse order.
+ Cannot be combined with '\--walk-reflogs'.
+
+Object Traversal
+~~~~~~~~~~~~~~~~
+
+These options are mostly targeted for packing of git repositories.
+
+--objects::
+
+ Print the object IDs of any object referenced by the listed
+ commits. '--objects foo ^bar' thus means "send me
+ all object IDs which I need to download if I have the commit
+ object 'bar', but not 'foo'".
+
+--objects-edge::
+
+ Similar to '--objects', but also print the IDs of excluded
+ commits prefixed with a "-" character. This is used by
+ linkgit:git-pack-objects[1] to build "thin" pack, which records
+ objects in deltified form based on objects contained in these
+ excluded commits to reduce network traffic.
+
+--unpacked::
+
+ Only useful with '--objects'; print the object IDs that are not
+ in packs.
+
+--no-walk::
+
+ Only show the given revs, but do not traverse their ancestors.
+
+--do-walk::
+
+ Overrides a previous --no-walk.
diff --git a/Documentation/technical/api-diff.txt b/Documentation/technical/api-diff.txt
index 822609bcd..83b007e70 100644
--- a/Documentation/technical/api-diff.txt
+++ b/Documentation/technical/api-diff.txt
@@ -102,13 +102,13 @@ Notable members are:
and copies.
`abbrev`::
- Number of hexdigits to abbrevate raw format output to.
+ Number of hexdigits to abbreviate raw format output to.
`pickaxe`::
A constant string (can and typically does contain newlines to
look for a block of text, not just a single line) to filter out
the filepairs that do not change the number of strings contained
- in its preimage and postmage of the diff_queue.
+ in its preimage and postimage of the diff_queue.
`flags`::
This is mostly a collection of boolean options that affects the
@@ -149,7 +149,7 @@ REVERSE_DIFF;;
EXIT_WITH_STATUS;;
For communication between the calling program and the options
- parser; tell the calling program to signal the presense of
+ parser; tell the calling program to signal the presence of
difference using program exit code.
HAS_CHANGES;;
diff --git a/Documentation/technical/api-lockfile.txt b/Documentation/technical/api-lockfile.txt
index 73ac1025f..dd894043a 100644
--- a/Documentation/technical/api-lockfile.txt
+++ b/Documentation/technical/api-lockfile.txt
@@ -1,12 +1,74 @@
lockfile API
============
-Talk about <lockfile.c>, things like:
+The lockfile API serves two purposes:
-* lockfile lifetime -- atexit(3) looks at them, do not put them on the
- stack;
-* hold_lock_file_for_update()
-* commit_lock_file()
-* rollback_rock_file()
+* Mutual exclusion. When we write out a new index file, first
+ we create a new file `$GIT_DIR/index.lock`, write the new
+ contents into it, and rename it to the final destination
+ `$GIT_DIR/index`. We try to create the `$GIT_DIR/index.lock`
+ file with O_EXCL so that we can notice and fail when somebody
+ else is already trying to update the index file.
-(JC, Dscho, Shawn)
+* Automatic cruft removal. After we create the "lock" file, we
+ may decide to `die()`, and we would want to make sure that we
+ remove the file that has not been committed to its final
+ destination. This is done by remembering the lockfiles we
+ created in a linked list and cleaning them up from an
+ `atexit(3)` handler. Outstanding lockfiles are also removed
+ when the program dies on a signal.
+
+
+The functions
+-------------
+
+hold_lock_file_for_update::
+
+ Take a pointer to `struct lock_file`, the filename of
+ the final destination (e.g. `$GIT_DIR/index`) and a flag
+ `die_on_error`. Attempt to create a lockfile for the
+ destination and return the file descriptor for writing
+ to the file. If `die_on_error` flag is true, it dies if
+ a lock is already taken for the file; otherwise it
+ returns a negative integer to the caller on failure.
+
+commit_lock_file::
+
+ Take a pointer to the `struct lock_file` initialized
+ with an earlier call to `hold_lock_file_for_update()`,
+ close the file descriptor and rename the lockfile to its
+ final destination. Returns 0 upon success, a negative
+ value on failure to close(2) or rename(2).
+
+rollback_lock_file::
+
+ Take a pointer to the `struct lock_file` initialized
+ with an earlier call to `hold_lock_file_for_update()`,
+ close the file descriptor and remove the lockfile.
+
+close_lock_file::
+ Take a pointer to the `struct lock_file` initialized
+ with an earlier call to `hold_lock_file_for_update()`,
+ and close the file descriptor. Returns 0 upon success,
+ a negative value on failure to close(2).
+
+Because the structure is used in an `atexit(3)` handler, its
+storage has to stay throughout the life of the program. It
+cannot be an auto variable allocated on the stack.
+
+Call `commit_lock_file()` or `rollback_lock_file()` when you are
+done writing to the file descriptor. If you do not call either
+and simply `exit(3)` from the program, an `atexit(3)` handler
+will close and remove the lockfile.
+
+If you need to close the file descriptor you obtained from
+`hold_lock_file_for_update` function yourself, do so by calling
+`close_lock_file()`. You should never call `close(2)` yourself!
+Otherwise the `struct
+lock_file` structure still remembers that the file descriptor
+needs to be closed, and a later call to `commit_lock_file()` or
+`rollback_lock_file()` will result in duplicate calls to
+`close(2)`. Worse yet, if you `close(2)`, open another file
+descriptor for completely different purpose, and then call
+`commit_lock_file()` or `rollback_lock_file()`, they may close
+that unrelated file descriptor.
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index a80baa438..aa87756a5 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -125,7 +125,7 @@ Pack file entry: <+
- A table of 4-byte CRC32 values of the packed object data.
This is new in v2 so compressed data can be copied directly
- from pack to pack during repacking withough undetected
+ from pack to pack during repacking without undetected
data corruption.
- A table of 4-byte offset values (in network byte order).
diff --git a/Documentation/technical/racy-git.txt b/Documentation/technical/racy-git.txt
index 5030d9f2f..6bdf034b3 100644
--- a/Documentation/technical/racy-git.txt
+++ b/Documentation/technical/racy-git.txt
@@ -184,7 +184,7 @@ In a large project where raciness avoidance cost really matters,
however, the initial computation of all object names in the
index takes more than one second, and the index file is written
out after all that happens. Therefore the timestamp of the
-index file will be more than one seconds later than the the
+index file will be more than one seconds later than the
youngest file in the working tree. This means that in these
cases there actually will not be any racily clean entry in
the resulting index.
diff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt
index 5c39a165f..7fac47de8 100644
--- a/Documentation/tutorial-2.txt
+++ b/Documentation/tutorial-2.txt
@@ -172,7 +172,7 @@ merge, with the parent references pointing to the heads of the merged
branches.
Besides blobs, trees, and commits, the only remaining type of object
-is a "tag", which we won't discuss here; refer to gitlink:git-tag[1]
+is a "tag", which we won't discuss here; refer to linkgit:git-tag[1]
for details.
So now we know how git uses the object database to represent a
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index fff1068c5..e2bbda53f 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -47,7 +47,7 @@ You've now initialized the working directory--you may notice a new
directory created, named ".git".
Next, tell git to take a snapshot of the contents of all files under the
-current directory (note the '.'), with gitlink:git-add[1]:
+current directory (note the '.'), with linkgit:git-add[1]:
------------------------------------------------
$ git add .
@@ -55,7 +55,7 @@ $ git add .
This snapshot is now stored in a temporary staging area which git calls
the "index". You can permanently store the contents of the index in the
-repository with gitlink:git-commit[1]:
+repository with linkgit:git-commit[1]:
------------------------------------------------
$ git commit
@@ -74,15 +74,15 @@ $ git add file1 file2 file3
------------------------------------------------
You are now ready to commit. You can see what is about to be committed
-using gitlink:git-diff[1] with the --cached option:
+using linkgit:git-diff[1] with the --cached option:
------------------------------------------------
$ git diff --cached
------------------------------------------------
-(Without --cached, gitlink:git-diff[1] will show you any changes that
+(Without --cached, linkgit:git-diff[1] will show you any changes that
you've made but not yet added to the index.) You can also get a brief
-summary of the situation with gitlink:git-status[1]:
+summary of the situation with linkgit:git-status[1]:
------------------------------------------------
$ git status
@@ -358,7 +358,7 @@ $ git config --get remote.origin.url
-------------------------------------
(The complete configuration created by git-clone is visible using
-"git config -l", and the gitlink:git-config[1] man page
+"git config -l", and the linkgit:git-config[1] man page
explains the meaning of each option.)
Git also keeps a pristine copy of Alice's master branch under the
@@ -377,10 +377,10 @@ $ git clone alice.org:/home/alice/project myrepo
-------------------------------------
Alternatively, git has a native protocol, or can use rsync or http;
-see gitlink:git-pull[1] for details.
+see linkgit:git-pull[1] for details.
Git can also be used in a CVS-like mode, with a central repository
-that various users push changes to; see gitlink:git-push[1] and
+that various users push changes to; see linkgit:git-push[1] and
link:cvs-migration.html[git for CVS users].
Exploring history
@@ -442,7 +442,7 @@ $ git-tag v2.5 1b2e1d63ff
you can refer to 1b2e1d63ff by the name "v2.5". If you intend to
share this name with other people (for example, to identify a release
version), you should create a "tag" object, and perhaps sign it; see
-gitlink:git-tag[1] for details.
+linkgit:git-tag[1] for details.
Any git command that needs to know a commit can take any of these
names. For example:
@@ -461,7 +461,7 @@ this branch. If this branch is the only branch containing those
commits, they will be lost. Also, don't use "git reset" on a
publicly-visible branch that other developers pull from, as it will
force needless merges on other developers to clean up the history.
-If you need to undo changes that you have pushed, use gitlink:git-revert[1]
+If you need to undo changes that you have pushed, use linkgit:git-revert[1]
instead.
The git grep command can search for strings in any version of your
@@ -567,12 +567,12 @@ need to make the most of git.
If you don't want to continue with that right away, a few other
digressions that may be interesting at this point are:
- * gitlink:git-format-patch[1], gitlink:git-am[1]: These convert
+ * linkgit:git-format-patch[1], linkgit:git-am[1]: These convert
series of git commits into emailed patches, and vice versa,
useful for projects such as the linux kernel which rely heavily
on emailed patches.
- * gitlink:git-bisect[1]: When there is a regression in your
+ * linkgit:git-bisect[1]: When there is a regression in your
project, one way to track down the bug is by searching through
the history to find the exact commit that's to blame. Git bisect
can help you perform a binary search for that commit. It is
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index 4f667382e..81ac17f32 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -38,7 +38,7 @@ To sync with a local directory, you can use:
ifndef::git-clone[]
They are mostly equivalent, except when cloning. See
-gitlink:git-clone[1] for details.
+linkgit:git-clone[1] for details.
endif::git-clone[]
ifdef::git-clone[]
diff --git a/Documentation/user-manual.conf b/Documentation/user-manual.conf
index 92b01ecf7..339b30919 100644
--- a/Documentation/user-manual.conf
+++ b/Documentation/user-manual.conf
@@ -7,7 +7,7 @@ startsb=&#91;
endsb=&#93;
tilde=&#126;
-[gitlink-inlinemacro]
+[linkgit-inlinemacro]
<ulink url="{target}.html">{target}{0?({0})}</ulink>
ifdef::backend-docbook[]
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index f2b42068f..40b0de087 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -42,7 +42,7 @@ How to get a git repository
It will be useful to have a git repository to experiment with as you
read this manual.
-The best way to get one is by using the gitlink:git-clone[1] command to
+The best way to get one is by using the linkgit:git-clone[1] command to
download a copy of an existing repository. If you don't already have a
project in mind, here are some interesting examples:
@@ -74,12 +74,12 @@ version is called a <<def_commit,commit>>.
Those snapshots aren't necessarily all arranged in a single line from
oldest to newest; instead, work may simultaneously proceed along
-parallel lines of development, called <def_branch,branches>>, which may
+parallel lines of development, called <<def_branch,branches>>, which may
merge and diverge.
A single git repository can track development on multiple branches. It
does this by keeping a list of <<def_head,heads>> which reference the
-latest commit on each branch; the gitlink:git-branch[1] command shows
+latest commit on each branch; the linkgit:git-branch[1] command shows
you the list of branch heads:
------------------------------------------------
@@ -93,7 +93,7 @@ the project referred to by that branch head.
Most projects also use <<def_tag,tags>>. Tags, like heads, are
references into the project's history, and can be listed using the
-gitlink:git-tag[1] command:
+linkgit:git-tag[1] command:
------------------------------------------------
$ git tag -l
@@ -113,14 +113,14 @@ Tags are expected to always point at the same version of a project,
while heads are expected to advance as development progresses.
Create a new branch head pointing to one of these versions and check it
-out using gitlink:git-checkout[1]:
+out using linkgit:git-checkout[1]:
------------------------------------------------
$ git checkout -b new v2.6.13
------------------------------------------------
The working directory then reflects the contents that the project had
-when it was tagged v2.6.13, and gitlink:git-branch[1] shows two
+when it was tagged v2.6.13, and linkgit:git-branch[1] shows two
branches, with an asterisk marking the currently checked-out branch:
------------------------------------------------
@@ -146,7 +146,7 @@ Understanding History: Commits
------------------------------
Every change in the history of a project is represented by a commit.
-The gitlink:git-show[1] command shows the most recent commit on the
+The linkgit:git-show[1] command shows the most recent commit on the
current branch:
------------------------------------------------
@@ -208,7 +208,7 @@ representing a merge can therefore have more than one parent, with
each parent representing the most recent commit on one of the lines
of development leading to that point.
-The best way to see how this works is using the gitlink:gitk[1]
+The best way to see how this works is using the linkgit:gitk[1]
command; running gitk now on a git repository and looking for merge
commits will help understand how the git organizes history.
@@ -335,7 +335,7 @@ The "master" branch that was created at the time you cloned is a copy
of the HEAD in the repository that you cloned from. That repository
may also have had other branches, though, and your local repository
keeps branches which track each of those remote branches, which you
-can view using the "-r" option to gitlink:git-branch[1]:
+can view using the "-r" option to linkgit:git-branch[1]:
------------------------------------------------
$ git branch -r
@@ -378,7 +378,7 @@ exists a tag and a branch with the same name.
(Newly created refs are actually stored in the .git/refs directory,
under the path given by their name. However, for efficiency reasons
they may also be packed together in a single file; see
-gitlink:git-pack-refs[1]).
+linkgit:git-pack-refs[1]).
As another useful shortcut, the "HEAD" of a repository can be referred
to just using the name of that repository. So, for example, "origin"
@@ -387,7 +387,7 @@ is usually a shortcut for the HEAD branch in the repository "origin".
For the complete list of paths which git checks for references, and
the order it uses to decide which to choose when there are multiple
references with the same shorthand name, see the "SPECIFYING
-REVISIONS" section of gitlink:git-rev-parse[1].
+REVISIONS" section of linkgit:git-rev-parse[1].
[[Updating-a-repository-with-git-fetch]]
Updating a repository with git fetch
@@ -407,7 +407,7 @@ Fetching branches from other repositories
-----------------------------------------
You can also track branches from repositories other than the one you
-cloned from, using gitlink:git-remote[1]:
+cloned from, using linkgit:git-remote[1]:
-------------------------------------------------
$ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
@@ -443,7 +443,7 @@ $ cat .git/config
This is what causes git to track the remote's branches; you may modify
or delete these configuration options by editing .git/config with a
text editor. (See the "CONFIGURATION FILE" section of
-gitlink:git-config[1] for details.)
+linkgit:git-config[1] for details.)
[[exploring-git-history]]
Exploring git history
@@ -468,7 +468,7 @@ Suppose version 2.6.18 of your project worked, but the version at
"master" crashes. Sometimes the best way to find the cause of such a
regression is to perform a brute-force search through the project's
history to find the particular commit that caused the problem. The
-gitlink:git-bisect[1] command can help you do this:
+linkgit:git-bisect[1] command can help you do this:
-------------------------------------------------
$ git bisect start
@@ -497,7 +497,7 @@ half each time.
After about 13 tests (in this case), it will output the commit id of
the guilty commit. You can then examine the commit with
-gitlink:git-show[1], find out who wrote it, and mail them your bug
+linkgit:git-show[1], find out who wrote it, and mail them your bug
report with the commit id. Finally, run
-------------------------------------------------
@@ -543,7 +543,7 @@ We have seen several ways of naming commits already:
- HEAD: refers to the head of the current branch
There are many more; see the "SPECIFYING REVISIONS" section of the
-gitlink:git-rev-parse[1] man page for the complete list of ways to
+linkgit:git-rev-parse[1] man page for the complete list of ways to
name revisions. Some examples:
-------------------------------------------------
@@ -584,7 +584,7 @@ When we discuss merges we'll also see the special name MERGE_HEAD,
which refers to the other branch that we're merging in to the current
branch.
-The gitlink:git-rev-parse[1] command is a low-level command that is
+The linkgit:git-rev-parse[1] command is a low-level command that is
occasionally useful for translating some name for a commit to the object
name for that commit:
@@ -608,14 +608,14 @@ You can use stable-1 to refer to the commit 1b2e1d63ff.
This creates a "lightweight" tag. If you would also like to include a
comment with the tag, and possibly sign it cryptographically, then you
-should create a tag object instead; see the gitlink:git-tag[1] man page
+should create a tag object instead; see the linkgit:git-tag[1] man page
for details.
[[browsing-revisions]]
Browsing revisions
------------------
-The gitlink:git-log[1] command can show lists of commits. On its
+The linkgit:git-log[1] command can show lists of commits. On its
own, it shows all commits reachable from the parent commit; but you
can also make more specific requests:
@@ -645,7 +645,7 @@ You can also ask git log to show patches:
$ git log -p
-------------------------------------------------
-See the "--pretty" option in the gitlink:git-log[1] man page for more
+See the "--pretty" option in the linkgit:git-log[1] man page for more
display options.
Note that git log starts with the most recent commit and works
@@ -658,7 +658,7 @@ Generating diffs
----------------
You can generate diffs between any two versions using
-gitlink:git-diff[1]:
+linkgit:git-diff[1]:
-------------------------------------------------
$ git diff master..test
@@ -673,7 +673,7 @@ $ git diff master...test
-------------------------------------------------
Sometimes what you want instead is a set of patches; for this you can
-use gitlink:git-format-patch[1]:
+use linkgit:git-format-patch[1]:
-------------------------------------------------
$ git format-patch master..test
@@ -714,7 +714,7 @@ $ git log --pretty=oneline origin..mybranch | wc -l
-------------------------------------------------
Alternatively, you may often see this sort of thing done with the
-lower-level command gitlink:git-rev-list[1], which just lists the SHA1's
+lower-level command linkgit:git-rev-list[1], which just lists the SHA1's
of all the given commits:
-------------------------------------------------
@@ -772,7 +772,7 @@ You could just visually inspect the commits since e05db0fd:
$ gitk e05db0fd..
-------------------------------------------------
-Or you can use gitlink:git-name-rev[1], which will give the commit a
+Or you can use linkgit:git-name-rev[1], which will give the commit a
name based on any tag it finds pointing to one of the commit's
descendants:
@@ -781,7 +781,7 @@ $ git name-rev --tags e05db0fd
e05db0fd tags/v1.5.0-rc1^0~23
-------------------------------------------------
-The gitlink:git-describe[1] command does the opposite, naming the
+The linkgit:git-describe[1] command does the opposite, naming the
revision using a tag on which the given commit is based:
-------------------------------------------------
@@ -793,7 +793,7 @@ but that may sometimes help you guess which tags might come after the
given commit.
If you just want to verify whether a given tagged version contains a
-given commit, you could use gitlink:git-merge-base[1]:
+given commit, you could use linkgit:git-merge-base[1]:
-------------------------------------------------
$ git merge-base e05db0fd v1.5.0-rc1
@@ -814,7 +814,7 @@ $ git log v1.5.0-rc1..e05db0fd
will produce empty output if and only if v1.5.0-rc1 includes e05db0fd,
because it outputs only commits that are not reachable from v1.5.0-rc1.
-As yet another alternative, the gitlink:git-show-branch[1] command lists
+As yet another alternative, the linkgit:git-show-branch[1] command lists
the commits reachable from its arguments with a display on the left-hand
side that indicates which arguments that commit is reachable from. So,
you can run something like
@@ -847,7 +847,7 @@ Suppose you would like to see all the commits reachable from the branch
head named "master" but not from any other head in your repository.
We can list all the heads in this repository with
-gitlink:git-show-ref[1]:
+linkgit:git-show-ref[1]:
-------------------------------------------------
$ git show-ref --heads
@@ -884,14 +884,14 @@ commits reachable from some head but not from any tag in the repository:
$ gitk $( git show-ref --heads ) --not $( git show-ref --tags )
-------------------------------------------------
-(See gitlink:git-rev-parse[1] for explanations of commit-selecting
+(See linkgit:git-rev-parse[1] for explanations of commit-selecting
syntax such as `--not`.)
[[making-a-release]]
Creating a changelog and tarball for a software release
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The gitlink:git-archive[1] command can create a tar or zip archive from
+The linkgit:git-archive[1] command can create a tar or zip archive from
any version of a project; for example:
-------------------------------------------------
@@ -944,8 +944,8 @@ $ git log --raw --abbrev=40 --pretty=oneline |
-------------------------------------------------
Figuring out why this works is left as an exercise to the (advanced)
-student. The gitlink:git-log[1], gitlink:git-diff-tree[1], and
-gitlink:git-hash-object[1] man pages may prove helpful.
+student. The linkgit:git-log[1], linkgit:git-diff-tree[1], and
+linkgit:git-hash-object[1] man pages may prove helpful.
[[Developing-with-git]]
Developing with git
@@ -965,7 +965,7 @@ file named .gitconfig in your home directory:
email = you@yourdomain.example.com
------------------------------------------------
-(See the "CONFIGURATION FILE" section of gitlink:git-config[1] for
+(See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
details on the configuration file.)
@@ -1088,7 +1088,7 @@ $ git diff HEAD # difference between HEAD and working tree; what
$ git status # a brief per-file summary of the above.
-------------------------------------------------
-You can also use gitlink:git-gui[1] to create commits, view changes in
+You can also use linkgit:git-gui[1] to create commits, view changes in
the index and the working tree files, and individually select diff hunks
for inclusion in the index (by right-clicking on the diff hunk and
choosing "Stage Hunk For Commit").
@@ -1131,7 +1131,7 @@ foo.txt
*.[oa]
-------------------------------------------------
-See gitlink:gitignore[5] for a detailed explanation of the syntax. You can
+See linkgit:gitignore[5] for a detailed explanation of the syntax. You can
also place .gitignore files in other directories in your working tree, and they
will apply to those directories and their subdirectories. The `.gitignore`
files can be added to your repository like any other files (just run `git add
@@ -1144,14 +1144,14 @@ If you wish the exclude patterns to affect only certain repositories
them in a file in your repository named .git/info/exclude, or in any file
specified by the `core.excludesfile` configuration variable. Some git
commands can also take exclude patterns directly on the command line.
-See gitlink:gitignore[5] for the details.
+See linkgit:gitignore[5] for the details.
[[how-to-merge]]
How to merge
------------
You can rejoin two diverging branches of development using
-gitlink:git-merge[1]:
+linkgit:git-merge[1]:
-------------------------------------------------
$ git merge branchname
@@ -1188,7 +1188,7 @@ the working tree in a special state that gives you all the
information you need to help resolve the merge.
Files with conflicts are marked specially in the index, so until you
-resolve the problem and update the index, gitlink:git-commit[1] will
+resolve the problem and update the index, linkgit:git-commit[1] will
fail:
-------------------------------------------------
@@ -1196,7 +1196,7 @@ $ git commit
file.txt: needs merge
-------------------------------------------------
-Also, gitlink:git-status[1] will list those files as "unmerged", and the
+Also, linkgit:git-status[1] will list those files as "unmerged", and the
files with conflicts will have conflict markers added, like this:
-------------------------------------------------
@@ -1227,7 +1227,7 @@ Getting conflict-resolution help during a merge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All of the changes that git was able to merge automatically are
-already added to the index file, so gitlink:git-diff[1] shows only
+already added to the index file, so linkgit:git-diff[1] shows only
the conflicts. It uses an unusual syntax:
-------------------------------------------------
@@ -1262,7 +1262,7 @@ $ git show :3:file.txt # the version from MERGE_HEAD, but including any
Since the stage 2 and stage 3 versions have already been updated with
nonconflicting changes, the only remaining differences between them are
-the important ones; thus gitlink:git-diff[1] can use the information in
+the important ones; thus linkgit:git-diff[1] can use the information in
the index to show only those conflicts.
The diff above shows the differences between the working-tree version of
@@ -1271,7 +1271,7 @@ each line by a single "+" or "-", it now uses two columns: the first
column is used for differences between the first parent and the working
directory copy, and the second for differences between the second parent
and the working directory copy. (See the "COMBINED DIFF FORMAT" section
-of gitlink:git-diff-files[1] for a details of the format.)
+of linkgit:git-diff-files[1] for a details of the format.)
After resolving the conflict in the obvious way (but before updating the
index), the diff will look like:
@@ -1304,7 +1304,7 @@ $ git diff -3 file.txt # diff against stage 3
$ git diff --theirs file.txt # same as the above.
-------------------------------------------------
-The gitlink:git-log[1] and gitk[1] commands also provide special help
+The linkgit:git-log[1] and gitk[1] commands also provide special help
for merges:
-------------------------------------------------
@@ -1315,7 +1315,7 @@ $ gitk --merge
These will display all commits which exist only on HEAD or on
MERGE_HEAD, and which touch an unmerged file.
-You may also use gitlink:git-mergetool[1], which lets you merge the
+You may also use linkgit:git-mergetool[1], which lets you merge the
unmerged files using external tools such as emacs or kdiff3.
Each time you resolve the conflicts in a file and update the index:
@@ -1394,7 +1394,7 @@ Fixing a mistake with a new commit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Creating a new commit that reverts an earlier change is very easy;
-just pass the gitlink:git-revert[1] command a reference to the bad
+just pass the linkgit:git-revert[1] command a reference to the bad
commit; for example, to revert the most recent commit:
-------------------------------------------------
@@ -1437,7 +1437,7 @@ which will replace the old commit by a new commit incorporating your
changes, giving you a chance to edit the old commit message first.
Again, you should never do this to a commit that may already have
-been merged into another branch; use gitlink:git-revert[1] instead in
+been merged into another branch; use linkgit:git-revert[1] instead in
that case.
It is also possible to replace commits further back in the history, but
@@ -1450,7 +1450,7 @@ Checking out an old version of a file
In the process of undoing a previous bad change, you may find it
useful to check out an older version of a particular file using
-gitlink:git-checkout[1]. We've used git checkout before to switch
+linkgit:git-checkout[1]. We've used git checkout before to switch
branches, but it has quite different behavior if it is given a path
name: the command
@@ -1463,7 +1463,7 @@ also updates the index to match. It does not change branches.
If you just want to look at an old version of the file, without
modifying the working directory, you can do that with
-gitlink:git-show[1]:
+linkgit:git-show[1]:
-------------------------------------------------
$ git show HEAD^:path/to/file
@@ -1477,7 +1477,7 @@ Temporarily setting aside work in progress
While you are in the middle of working on something complicated, you
find an unrelated but obvious and trivial bug. You would like to fix it
-before continuing. You can use gitlink:git-stash[1] to save the current
+before continuing. You can use linkgit:git-stash[1] to save the current
state of your work, and after fixing the bug (or, optionally after doing
so on a different branch and then coming back), unstash the
work-in-progress changes.
@@ -1511,7 +1511,7 @@ On large repositories, git depends on compression to keep the history
information from taking up too much space on disk or in memory.
This compression is not performed automatically. Therefore you
-should occasionally run gitlink:git-gc[1]:
+should occasionally run linkgit:git-gc[1]:
-------------------------------------------------
$ git gc
@@ -1529,7 +1529,7 @@ Ensuring reliability
Checking the repository for corruption
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The gitlink:git-fsck[1] command runs a number of self-consistency checks
+The linkgit:git-fsck[1] command runs a number of self-consistency checks
on the repository, and reports on any problems. This may take some
time. The most common warning by far is about "dangling" objects:
@@ -1549,8 +1549,8 @@ dangling tree b24c2473f1fd3d91352a624795be026d64c8841f
Dangling objects are not a problem. At worst they may take up a little
extra disk space. They can sometimes provide a last-resort method for
recovering lost work--see <<dangling-objects>> for details. However, if
-you wish, you can remove them with gitlink:git-prune[1] or the `--prune`
-option to gitlink:git-gc[1]:
+you wish, you can remove them with linkgit:git-prune[1] or the `--prune`
+option to linkgit:git-gc[1]:
-------------------------------------------------
$ git gc --prune
@@ -1560,7 +1560,7 @@ This may be time-consuming. Unlike most other git operations (including
git-gc when run without any options), it is not safe to prune while
other git operations are in progress in the same repository.
-If gitlink:git-fsck[1] complains about sha1 mismatches or missing
+If linkgit:git-fsck[1] complains about sha1 mismatches or missing
objects, you may have a much more serious problem; your best option is
probably restoring from backups. See
<<recovering-from-repository-corruption>> for a detailed discussion.
@@ -1573,7 +1573,7 @@ Recovering lost changes
Reflogs
^^^^^^^
-Say you modify a branch with `gitlink:git-reset[1] --hard`, and then
+Say you modify a branch with `linkgit:git-reset[1] --hard`, and then
realize that the branch was the only reference you had to that point in
history.
@@ -1608,9 +1608,9 @@ pointed to one week ago. This allows you to see the history of what
you've checked out.
The reflogs are kept by default for 30 days, after which they may be
-pruned. See gitlink:git-reflog[1] and gitlink:git-gc[1] to learn
+pruned. See linkgit:git-reflog[1] and linkgit:git-gc[1] to learn
how to control this pruning, and see the "SPECIFYING REVISIONS"
-section of gitlink:git-rev-parse[1] for details.
+section of linkgit:git-rev-parse[1] for details.
Note that the reflog history is very different from normal git history.
While normal history is shared by every repository that works on the
@@ -1675,7 +1675,7 @@ may wish to check the original repository for updates and merge them
into your own work.
We have already seen <<Updating-a-repository-with-git-fetch,how to
-keep remote tracking branches up to date>> with gitlink:git-fetch[1],
+keep remote tracking branches up to date>> with linkgit:git-fetch[1],
and how to merge two branches. So you can merge in changes from the
original repository's master branch with:
@@ -1684,7 +1684,7 @@ $ git fetch
$ git merge origin/master
-------------------------------------------------
-However, the gitlink:git-pull[1] command provides a way to do this in
+However, the linkgit:git-pull[1] command provides a way to do this in
one step:
-------------------------------------------------
@@ -1702,8 +1702,8 @@ $ git pull
More generally, a branch that is created from a remote branch will pull
by default from that branch. See the descriptions of the
branch.<name>.remote and branch.<name>.merge options in
-gitlink:git-config[1], and the discussion of the `--track` option in
-gitlink:git-checkout[1], to learn how to control these defaults.
+linkgit:git-config[1], and the discussion of the `--track` option in
+linkgit:git-checkout[1], to learn how to control these defaults.
In addition to saving you keystrokes, "git pull" also helps you by
producing a default commit message documenting the branch and
@@ -1731,7 +1731,7 @@ Submitting patches to a project
If you just have a few changes, the simplest way to submit them may
just be to send them as patches in email:
-First, use gitlink:git-format-patch[1]; for example:
+First, use linkgit:git-format-patch[1]; for example:
-------------------------------------------------
$ git format-patch origin
@@ -1742,7 +1742,7 @@ for each patch in the current branch but not in origin/HEAD.
You can then import these into your mail client and send them by
hand. However, if you have a lot to send at once, you may prefer to
-use the gitlink:git-send-email[1] script to automate the process.
+use the linkgit:git-send-email[1] script to automate the process.
Consult the mailing list for your project first to determine how they
prefer such patches be handled.
@@ -1750,7 +1750,7 @@ prefer such patches be handled.
Importing patches to a project
------------------------------
-Git also provides a tool called gitlink:git-am[1] (am stands for
+Git also provides a tool called linkgit:git-am[1] (am stands for
"apply mailbox"), for importing such an emailed series of patches.
Just save all of the patch-containing messages, in order, into a
single mailbox file, say "patches.mbox", then run
@@ -1785,7 +1785,7 @@ Public git repositories
Another way to submit changes to a project is to tell the maintainer
of that project to pull the changes from your repository using
-gitlink:git-pull[1]. In the section "<<getting-updates-with-git-pull,
+linkgit:git-pull[1]. In the section "<<getting-updates-with-git-pull,
Getting updates with git pull>>" we described this as a way to get
updates from the "main" repository, but it works just as well in the
other direction.
@@ -1866,14 +1866,14 @@ at. You can then skip to the section
"<<pushing-changes-to-a-public-repository,Pushing changes to a public
repository>>", below.
-Otherwise, all you need to do is start gitlink:git-daemon[1]; it will
+Otherwise, all you need to do is start linkgit:git-daemon[1]; it will
listen on port 9418. By default, it will allow access to any directory
that looks like a git directory and contains the magic file
git-daemon-export-ok. Passing some directory paths as git-daemon
arguments will further restrict the exports to those paths.
You can also run git-daemon as an inetd service; see the
-gitlink:git-daemon[1] man page for details. (See especially the
+linkgit:git-daemon[1] man page for details. (See especially the
examples section.)
[[exporting-via-http]]
@@ -1895,7 +1895,7 @@ $ chmod a+x hooks/post-update
-------------------------------------------------
(For an explanation of the last two lines, see
-gitlink:git-update-server-info[1], and the documentation
+linkgit:git-update-server-info[1], and the documentation
link:hooks.html[Hooks used by git].)
Advertise the URL of proj.git. Anybody else should then be able to
@@ -1920,7 +1920,7 @@ maintainers to fetch your latest changes, but they do not allow write
access, which you will need to update the public repository with the
latest changes created in your private repository.
-The simplest way to do this is using gitlink:git-push[1] and ssh; to
+The simplest way to do this is using linkgit:git-push[1] and ssh; to
update the remote branch named "master" with the latest state of your
branch named "master", run
@@ -1961,7 +1961,7 @@ $ git push public-repo master
-------------------------------------------------
See the explanations of the remote.<name>.url, branch.<name>.remote,
-and remote.<name>.push options in gitlink:git-config[1] for
+and remote.<name>.push options in linkgit:git-config[1] for
details.
[[forcing-push]]
@@ -2083,14 +2083,14 @@ $ cd work
-------------------------------------------------
Linus's tree will be stored in the remote branch named origin/master,
-and can be updated using gitlink:git-fetch[1]; you can track other
-public trees using gitlink:git-remote[1] to set up a "remote" and
-gitlink:git-fetch[1] to keep them up-to-date; see
+and can be updated using linkgit:git-fetch[1]; you can track other
+public trees using linkgit:git-remote[1] to set up a "remote" and
+linkgit:git-fetch[1] to keep them up-to-date; see
<<repositories-and-branches>>.
Now create the branches in which you are going to work; these start out
at the current tip of origin/master branch, and should be set up (using
-the --track option to gitlink:git-branch[1]) to merge changes in from
+the --track option to linkgit:git-branch[1]) to merge changes in from
Linus by default.
-------------------------------------------------
@@ -2098,7 +2098,7 @@ $ git branch --track test origin/master
$ git branch --track release origin/master
-------------------------------------------------
-These can be easily kept up to date using gitlink:git-pull[1].
+These can be easily kept up to date using linkgit:git-pull[1].
-------------------------------------------------
$ git checkout test && git pull
@@ -2113,7 +2113,7 @@ doing this capriciously in the "release" branch, as these noisy commits
will become part of the permanent history when you ask Linus to pull
from the release branch.
-A few configuration variables (see gitlink:git-config[1]) can
+A few configuration variables (see linkgit:git-config[1]) can
make it easy to push both branches to your public tree. (See
<<setting-up-a-public-repository>>.)
@@ -2127,7 +2127,7 @@ EOF
-------------------------------------------------
Then you can push both the test and release trees using
-gitlink:git-push[1]:
+linkgit:git-push[1]:
-------------------------------------------------
$ git push mytree
@@ -2440,7 +2440,7 @@ the result would create a new merge commit, like this:
However, if you prefer to keep the history in mywork a simple series of
commits without any merges, you may instead choose to use
-gitlink:git-rebase[1]:
+linkgit:git-rebase[1]:
-------------------------------------------------
$ git checkout mywork
@@ -2491,7 +2491,7 @@ $ git commit --amend
which will replace the old commit by a new commit incorporating your
changes, giving you a chance to edit the old commit message first.
-You can also use a combination of this and gitlink:git-rebase[1] to
+You can also use a combination of this and linkgit:git-rebase[1] to
replace a commit further back in your history and recreate the
intervening changes on top of it. First, tag the problematic commit
with
@@ -2529,7 +2529,7 @@ new commits having new object names.
Reordering or selecting from a patch series
-------------------------------------------
-Given one existing commit, the gitlink:git-cherry-pick[1] command
+Given one existing commit, the linkgit:git-cherry-pick[1] command
allows you to apply the change introduced by that commit and create a
new commit that records it. So, for example, if "mywork" points to a
series of patches on top of "origin", you might do something like:
@@ -2542,7 +2542,7 @@ $ gitk origin..mywork &
and browse through the list of patches in the mywork branch using gitk,
applying them (possibly in a different order) to mywork-new using
cherry-pick, and possibly modifying them as you go using `commit --amend`.
-The gitlink:git-gui[1] command may also help as it allows you to
+The linkgit:git-gui[1] command may also help as it allows you to
individually select diff hunks for inclusion in the index (by
right-clicking on the diff hunk and choosing "Stage Hunk for Commit").
@@ -2555,7 +2555,7 @@ $ git reset --hard origin
-------------------------------------------------
Then modify, reorder, or eliminate patches as preferred before applying
-them again with gitlink:git-am[1].
+them again with linkgit:git-am[1].
[[patch-series-tools]]
Other tools
@@ -2618,7 +2618,7 @@ published branches should never be rewritten.
Why bisecting merge commits can be harder than bisecting linear history
-----------------------------------------------------------------------
-The gitlink:git-bisect[1] command correctly handles history that
+The linkgit:git-bisect[1] command correctly handles history that
includes merge commits. However, when the commit that it finds is a
merge commit, the user may need to work harder than usual to figure out
why that commit introduced a problem.
@@ -2651,7 +2651,7 @@ Nevertheless, the code at C is broken, because the callers added
on the lower line of development have not been converted to the new
semantics introduced on the upper line of development. So if all
you know is that D is bad, that Z is good, and that
-gitlink:git-bisect[1] identifies C as the culprit, how will you
+linkgit:git-bisect[1] identifies C as the culprit, how will you
figure out that the problem is due to this change in semantics?
When the result of a git-bisect is a non-merge commit, you should
@@ -2688,7 +2688,7 @@ Advanced branch management
Fetching individual branches
----------------------------
-Instead of using gitlink:git-remote[1], you can also choose just
+Instead of using linkgit:git-remote[1], you can also choose just
to update one branch at a time, and to store it locally under an
arbitrary name:
@@ -2779,7 +2779,7 @@ Configuring remote branches
We saw above that "origin" is just a shortcut to refer to the
repository that you originally cloned from. This information is
stored in git configuration variables, which you can see using
-gitlink:git-config[1]:
+linkgit:git-config[1]:
-------------------------------------------------
$ git config -l
@@ -2832,9 +2832,9 @@ throwing away commits on mybranch.
Also note that all of the above configuration can be performed by
directly editing the file .git/config instead of using
-gitlink:git-config[1].
+linkgit:git-config[1].
-See gitlink:git-config[1] for more details on the configuration
+See linkgit:git-config[1] for more details on the configuration
options mentioned above.
@@ -2900,7 +2900,7 @@ Commit Object
The "commit" object links a physical state of a tree with a description
of how we got there and why. Use the --pretty=raw option to
-gitlink:git-show[1] or gitlink:git-log[1] to examine your favorite
+linkgit:git-show[1] or linkgit:git-log[1] to examine your favorite
commit:
------------------------------------------------
@@ -2941,9 +2941,9 @@ of the tree referred to by this commit with the trees associated with
its parents. In particular, git does not attempt to record file renames
explicitly, though it can identify cases where the existence of the same
file data at changing paths suggests a rename. (See, for example, the
--M option to gitlink:git-diff[1]).
+-M option to linkgit:git-diff[1]).
-A commit is usually created by gitlink:git-commit[1], which creates a
+A commit is usually created by linkgit:git-commit[1], which creates a
commit whose parent is normally the current HEAD, and whose tree is
taken from the content currently stored in the index.
@@ -2951,8 +2951,8 @@ taken from the content currently stored in the index.
Tree Object
~~~~~~~~~~~
-The ever-versatile gitlink:git-show[1] command can also be used to
-examine tree objects, but gitlink:git-ls-tree[1] will give you more
+The ever-versatile linkgit:git-show[1] command can also be used to
+examine tree objects, but linkgit:git-ls-tree[1] will give you more
details:
------------------------------------------------
@@ -2991,7 +2991,7 @@ attention to the executable bit.
Blob Object
~~~~~~~~~~~
-You can use gitlink:git-show[1] to examine the contents of a blob; take,
+You can use linkgit:git-show[1] to examine the contents of a blob; take,
for example, the blob in the entry for "COPYING" from the tree above:
------------------------------------------------
@@ -3013,7 +3013,7 @@ is totally independent of its location in the directory tree, and
renaming a file does not change the object that file is associated with.
Note that any tree or blob object can be examined using
-gitlink:git-show[1] with the <revision>:<path> syntax. This can
+linkgit:git-show[1] with the <revision>:<path> syntax. This can
sometimes be useful for browsing the contents of a tree that is not
currently checked out.
@@ -3053,7 +3053,7 @@ Tag Object
A tag object contains an object, object type, tag name, the name of the
person ("tagger") who created the tag, and a message, which may contain
-a signature, as can be seen using the gitlink:git-cat-file[1]:
+a signature, as can be seen using the linkgit:git-cat-file[1]:
------------------------------------------------
$ git cat-file tag v1.5.0
@@ -3072,8 +3072,8 @@ nLE/L9aUXdWeTFPron96DLA=
-----END PGP SIGNATURE-----
------------------------------------------------
-See the gitlink:git-tag[1] command to learn how to create and verify tag
-objects. (Note that gitlink:git-tag[1] can also be used to create
+See the linkgit:git-tag[1] command to learn how to create and verify tag
+objects. (Note that linkgit:git-tag[1] can also be used to create
"lightweight tags", which are not tag objects at all, but just simple
references whose names begin with "refs/tags/").
@@ -3135,14 +3135,14 @@ $ git count-objects
Although the object files are gone, any commands that refer to those
objects will work exactly as they did before.
-The gitlink:git-gc[1] command performs packing, pruning, and more for
+The linkgit:git-gc[1] command performs packing, pruning, and more for
you, so is normally the only high-level command you need.
[[dangling-objects]]
Dangling objects
~~~~~~~~~~~~~~~~
-The gitlink:git-fsck[1] command will sometimes complain about dangling
+The linkgit:git-fsck[1] command will sometimes complain about dangling
objects. They are not a problem.
The most common cause of dangling objects is that you've rebased a
@@ -3246,7 +3246,7 @@ which is sometimes a solvable problem. (Recovering missing trees and
especially commits is *much* harder).
Before starting, verify that there is corruption, and figure out where
-it is with gitlink:git-fsck[1]; this may be time-consuming.
+it is with linkgit:git-fsck[1]; this may be time-consuming.
Assume the output looks like this:
@@ -3264,7 +3264,7 @@ Now you know that blob 4b9458b3 is missing, and that the tree 2d9263c6
points to it. If you could find just one copy of that missing blob
object, possibly in some other repository, you could move it into
.git/objects/4b/9458b3... and be done. Suppose you can't. You can
-still examine the tree that pointed to it with gitlink:git-ls-tree[1],
+still examine the tree that pointed to it with linkgit:git-ls-tree[1],
which might output something like:
------------------------------------------------
@@ -3282,7 +3282,7 @@ So now you know that the missing blob was the data for a file named
say it's in "somedirectory". If you're lucky the missing copy might be
the same as the copy you have checked out in your working tree at
"somedirectory/myfile"; you can test whether that's right with
-gitlink:git-hash-object[1]:
+linkgit:git-hash-object[1]:
------------------------------------------------
$ git hash-object -w somedirectory/myfile
@@ -3352,7 +3352,7 @@ The index
The index is a binary file (generally kept in .git/index) containing a
sorted list of path names, each with permissions and the SHA1 of a blob
-object; gitlink:git-ls-files[1] can show you the contents of the index:
+object; linkgit:git-ls-files[1] can show you the contents of the index:
-------------------------------------------------
$ git ls-files --stage
@@ -3374,7 +3374,7 @@ properties:
1. The index contains all the information necessary to generate a single
(uniquely determined) tree object.
+
-For example, running gitlink:git-commit[1] generates this tree object
+For example, running linkgit:git-commit[1] generates this tree object
from the index, stores it in the object database, and uses it as the
tree object associated with the new commit.
@@ -3395,7 +3395,7 @@ you can create a three-way merge between them.
+
We saw in <<conflict-resolution>> that during a merge the index can
store multiple versions of a single file (called "stages"). The third
-column in the gitlink:git-ls-files[1] output above is the stage
+column in the linkgit:git-ls-files[1] output above is the stage
number, and will take on values other than 0 for files with merge
conflicts.
@@ -3444,7 +3444,7 @@ commit ID, so other developers who clone the containing project
Partial checkouts of the superproject are possible: you can tell Git to
clone none, some or all of the submodules.
-The gitlink:git-submodule[1] command is available since Git 1.5.3. Users
+The linkgit:git-submodule[1] command is available since Git 1.5.3. Users
with Git 1.5.2 can look up the submodule commits in the repository and
manually check them out; earlier versions won't recognize the submodules at
all.
@@ -3492,7 +3492,7 @@ The `git submodule add` command does a couple of things:
- It clones the submodule under the current directory and by default checks out
the master branch.
-- It adds the submodule's clone path to the gitlink:gitmodules[5] file and
+- It adds the submodule's clone path to the linkgit:gitmodules[5] file and
adds this file to the index, ready to be committed.
- It adds the submodule's current commit ID to the index, ready to be
committed.
@@ -3653,26 +3653,26 @@ understand its inner workings.
Object access and manipulation
------------------------------
-The gitlink:git-cat-file[1] command can show the contents of any object,
-though the higher-level gitlink:git-show[1] is usually more useful.
+The linkgit:git-cat-file[1] command can show the contents of any object,
+though the higher-level linkgit:git-show[1] is usually more useful.
-The gitlink:git-commit-tree[1] command allows constructing commits with
+The linkgit:git-commit-tree[1] command allows constructing commits with
arbitrary parents and trees.
-A tree can be created with gitlink:git-write-tree[1] and its data can be
-accessed by gitlink:git-ls-tree[1]. Two trees can be compared with
-gitlink:git-diff-tree[1].
+A tree can be created with linkgit:git-write-tree[1] and its data can be
+accessed by linkgit:git-ls-tree[1]. Two trees can be compared with
+linkgit:git-diff-tree[1].
-A tag is created with gitlink:git-mktag[1], and the signature can be
-verified by gitlink:git-verify-tag[1], though it is normally simpler to
-use gitlink:git-tag[1] for both.
+A tag is created with linkgit:git-mktag[1], and the signature can be
+verified by linkgit:git-verify-tag[1], though it is normally simpler to
+use linkgit:git-tag[1] for both.
[[the-workflow]]
The Workflow
------------
-High-level operations such as gitlink:git-commit[1],
-gitlink:git-checkout[1] and gitlink:git-reset[1] work by moving data
+High-level operations such as linkgit:git-commit[1],
+linkgit:git-checkout[1] and linkgit:git-reset[1] work by moving data
between the working tree, the index, and the object database. Git
provides low-level operations which perform each of these steps
individually.
@@ -3687,7 +3687,7 @@ combinations:
working directory -> index
~~~~~~~~~~~~~~~~~~~~~~~~~~
-The gitlink:git-update-index[1] command updates the index with
+The linkgit:git-update-index[1] command updates the index with
information from the working directory. You generally update the
index information by just specifying the filename you want to update,
like so:
@@ -3717,8 +3717,8 @@ stat information. It will 'not' update the object status itself, and
it will only update the fields that are used to quickly test whether
an object still matches its old backing store object.
-The previously introduced gitlink:git-add[1] is just a wrapper for
-gitlink:git-update-index[1].
+The previously introduced linkgit:git-add[1] is just a wrapper for
+linkgit:git-update-index[1].
[[index-to-object-database]]
index -> object database
@@ -3865,7 +3865,7 @@ Examining the data
You can examine the data represented in the object database and the
index with various helper tools. For every object, you can use
-gitlink:git-cat-file[1] to examine details about the
+linkgit:git-cat-file[1] to examine details about the
object:
-------------------------------------------------
@@ -4528,7 +4528,7 @@ Scan Documentation/ for other stuff left out; in particular:
- howto's
- some of technical/?
- hooks
-- list of commands in gitlink:git[1]
+- list of commands in linkgit:git[1]
Scan email archives for other stuff left out
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index ad7e05662..38a327397 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.5.4-rc1.GIT
+DEF_VER=v1.5.4.GIT
LF='
'
diff --git a/INSTALL b/INSTALL
index f1eb4049b..6f3bcb452 100644
--- a/INSTALL
+++ b/INSTALL
@@ -79,8 +79,8 @@ Issues of note:
- "perl" and POSIX-compliant shells are needed to use most of
the barebone Porcelainish scripts.
- - "cpio" is used by git-merge for saving and restoring the index,
- and by git-clone when doing a local (possibly hardlinked) clone.
+ - "cpio" is used by git-clone when doing a local (possibly
+ hardlinked) clone.
- Some platform specific issues are dealt with Makefile rules,
but depending on your specific installation, you may not
diff --git a/Makefile b/Makefile
index 21c80e6bf..92341c4bb 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,12 @@ all::
#
# Define NO_SETENV if you don't have setenv in the C library.
#
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+#
# Define NO_MKDTEMP if you don't have mkdtemp in the C library.
#
+# Define NO_SYS_SELECT_H if you don't have sys/select.h.
+#
# Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
# Enable it on Windows. By default, symrefs are still used.
#
@@ -316,7 +320,7 @@ LIB_OBJS = \
alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \
- transport.o bundle.o walker.o parse-options.o ws.o
+ transport.o bundle.o walker.o parse-options.o ws.o archive.o
BUILTIN_OBJS = \
builtin-add.o \
@@ -501,6 +505,17 @@ ifeq ($(uname_S),IRIX64)
# for now, build 32-bit version
BASIC_LDFLAGS += -L/usr/lib32
endif
+ifeq ($(uname_S),HP-UX)
+ NO_IPV6=YesPlease
+ NO_SETENV=YesPlease
+ NO_STRCASESTR=YesPlease
+ NO_MEMMEM = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_MKDTEMP = YesPlease
+ NO_UNSETENV = YesPlease
+ NO_HSTRERROR = YesPlease
+ NO_SYS_SELECT_H = YesPlease
+endif
ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
endif
@@ -633,6 +648,9 @@ ifdef NO_UNSETENV
COMPAT_CFLAGS += -DNO_UNSETENV
COMPAT_OBJS += compat/unsetenv.o
endif
+ifdef NO_SYS_SELECT_H
+ BASIC_CFLAGS += -DNO_SYS_SELECT_H
+endif
ifdef NO_MMAP
COMPAT_CFLAGS += -DNO_MMAP
COMPAT_OBJS += compat/mmap.o
@@ -926,7 +944,7 @@ git-%$X: %.o $(GITLIBS)
git-imap-send$X: imap-send.o $(LIB_FILE)
-http.o http-walker.o http-push.o: http.h
+http.o http-walker.o http-push.o transport.o: http.h
git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
@@ -1145,7 +1163,7 @@ check-docs::
case "$$v" in \
git-merge-octopus | git-merge-ours | git-merge-recursive | \
git-merge-resolve | git-merge-stupid | git-merge-subtree | \
- git-fsck-objects | git-init-db | git-repo-config | \
+ git-fsck-objects | git-init-db | \
git-?*--?* ) continue ;; \
esac ; \
test -f "Documentation/$$v.txt" || \
@@ -1187,3 +1205,4 @@ check-docs::
#
check-builtins::
./check-builtins.sh
+
diff --git a/archive-tar.c b/archive-tar.c
index e1bced560..30aa2e23f 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -222,7 +222,7 @@ static void write_global_extended_header(const unsigned char *sha1)
static int git_tar_config(const char *var, const char *value)
{
if (!strcmp(var, "tar.umask")) {
- if (!strcmp(value, "user")) {
+ if (value && !strcmp(value, "user")) {
tar_umask = umask(0);
umask(tar_umask);
} else {
diff --git a/archive.c b/archive.c
new file mode 100644
index 000000000..fb159fe59
--- /dev/null
+++ b/archive.c
@@ -0,0 +1,84 @@
+#include "cache.h"
+#include "commit.h"
+#include "attr.h"
+
+static void format_subst(const struct commit *commit,
+ const char *src, size_t len,
+ struct strbuf *buf)
+{
+ char *to_free = NULL;
+ struct strbuf fmt;
+
+ if (src == buf->buf)
+ to_free = strbuf_detach(buf, NULL);
+ strbuf_init(&fmt, 0);
+ for (;;) {
+ const char *b, *c;
+
+ b = memmem(src, len, "$Format:", 8);
+ if (!b || src + len < b + 9)
+ break;
+ c = memchr(b + 8, '$', len - 8);
+ if (!c)
+ break;
+
+ strbuf_reset(&fmt);
+ strbuf_add(&fmt, b + 8, c - b - 8);
+
+ strbuf_add(buf, src, b - src);
+ format_commit_message(commit, fmt.buf, buf);
+ len -= c + 1 - src;
+ src = c + 1;
+ }
+ strbuf_add(buf, src, len);
+ strbuf_release(&fmt);
+ free(to_free);
+}
+
+static int convert_to_archive(const char *path,
+ const void *src, size_t len,
+ struct strbuf *buf,
+ const struct commit *commit)
+{
+ static struct git_attr *attr_export_subst;
+ struct git_attr_check check[1];
+
+ if (!commit)
+ return 0;
+
+ if (!attr_export_subst)
+ attr_export_subst = git_attr("export-subst", 12);
+
+ check[0].attr = attr_export_subst;
+ if (git_checkattr(path, ARRAY_SIZE(check), check))
+ return 0;
+ if (!ATTR_TRUE(check[0].value))
+ return 0;
+
+ format_subst(commit, src, len, buf);
+ return 1;
+}
+
+void *sha1_file_to_archive(const char *path, const unsigned char *sha1,
+ unsigned int mode, enum object_type *type,
+ unsigned long *sizep,
+ const struct commit *commit)
+{
+ void *buffer;
+
+ buffer = read_sha1_file(sha1, type, sizep);
+ if (buffer && S_ISREG(mode)) {
+ struct strbuf buf;
+ size_t size = 0;
+
+ strbuf_init(&buf, 0);
+ strbuf_attach(&buf, buffer, *sizep, *sizep + 1);
+ convert_to_working_tree(path, buf.buf, buf.len, &buf);
+ convert_to_archive(path, buf.buf, buf.len, &buf, commit);
+ buffer = strbuf_detach(&buf, &size);
+ *sizep = size;
+ }
+
+ return buffer;
+}
+
diff --git a/attr.c b/attr.c
index 741db3b46..64b77b166 100644
--- a/attr.c
+++ b/attr.c
@@ -406,7 +406,7 @@ static void debug_info(const char *what, struct attr_stack *elem)
{
fprintf(stderr, "%s: %s\n", what, elem->origin ? elem->origin : "()");
}
-static void debug_set(const char *what, const char *match, struct git_attr *attr, void *v)
+static void debug_set(const char *what, const char *match, struct git_attr *attr, const void *v)
{
const char *value = v;
@@ -543,10 +543,10 @@ static int path_matches(const char *pathname, int pathlen,
if (*pattern == '/')
pattern++;
if (pathlen < baselen ||
- (baselen && pathname[baselen - 1] != '/') ||
+ (baselen && pathname[baselen] != '/') ||
strncmp(pathname, base, baselen))
return 0;
- return fnmatch(pattern, pathname + baselen, FNM_PATHNAME) == 0;
+ return fnmatch(pattern, pathname + baselen + 1, FNM_PATHNAME) == 0;
}
static int fill_one(const char *what, struct match_attr *a, int rem)
diff --git a/builtin-add.c b/builtin-add.c
index 5c29cc2f3..4a91e3eb1 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -259,7 +259,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
finish:
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file))
+ commit_locked_index(&lock_file))
die("Unable to write new index file");
}
diff --git a/builtin-apply.c b/builtin-apply.c
index 5e3b4a144..a11b1bbee 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2746,6 +2746,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof)
static int git_apply_config(const char *var, const char *value)
{
if (!strcmp(var, "apply.whitespace")) {
+ if (!value)
+ return config_error_nonbool(var);
apply_default_whitespace = xstrdup(value);
return 0;
}
@@ -2907,7 +2909,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
whitespace_error,
whitespace_error == 1 ? "" : "s",
whitespace_error == 1 ? "s" : "");
- if (applied_after_fixing_ws)
+ if (applied_after_fixing_ws && apply)
fprintf(stderr, "warning: %d line%s applied after"
" fixing whitespace errors.\n",
applied_after_fixing_ws,
@@ -2921,7 +2923,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
if (update_index) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file))
+ commit_locked_index(&lock_file))
die("Unable to write new index file");
}
diff --git a/builtin-archive.c b/builtin-archive.c
index 14a1b3077..c2e0c1ea5 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -79,86 +79,6 @@ static int run_remote_archiver(const char *remote, int argc,
return !!rv;
}
-static void format_subst(const struct commit *commit,
- const char *src, size_t len,
- struct strbuf *buf)
-{
- char *to_free = NULL;
- struct strbuf fmt;
-
- if (src == buf->buf)
- to_free = strbuf_detach(buf, NULL);
- strbuf_init(&fmt, 0);
- for (;;) {
- const char *b, *c;
-
- b = memmem(src, len, "$Format:", 8);
- if (!b || src + len < b + 9)
- break;
- c = memchr(b + 8, '$', len - 8);
- if (!c)
- break;
-
- strbuf_reset(&fmt);
- strbuf_add(&fmt, b + 8, c - b - 8);
-
- strbuf_add(buf, src, b - src);
- format_commit_message(commit, fmt.buf, buf);
- len -= c + 1 - src;
- src = c + 1;
- }
- strbuf_add(buf, src, len);
- strbuf_release(&fmt);
- free(to_free);
-}
-
-static int convert_to_archive(const char *path,
- const void *src, size_t len,
- struct strbuf *buf,
- const struct commit *commit)
-{
- static struct git_attr *attr_export_subst;
- struct git_attr_check check[1];
-
- if (!commit)
- return 0;
-
- if (!attr_export_subst)
- attr_export_subst = git_attr("export-subst", 12);
-
- check[0].attr = attr_export_subst;
- if (git_checkattr(path, ARRAY_SIZE(check), check))
- return 0;
- if (!ATTR_TRUE(check[0].value))
- return 0;
-
- format_subst(commit, src, len, buf);
- return 1;
-}
-
-void *sha1_file_to_archive(const char *path, const unsigned char *sha1,
- unsigned int mode, enum object_type *type,
- unsigned long *sizep,
- const struct commit *commit)
-{
- void *buffer;
-
- buffer = read_sha1_file(sha1, type, sizep);
- if (buffer && S_ISREG(mode)) {
- struct strbuf buf;
- size_t size = 0;
-
- strbuf_init(&buf, 0);
- strbuf_attach(&buf, buffer, *sizep, *sizep + 1);
- convert_to_working_tree(path, buf.buf, buf.len, &buf);
- convert_to_archive(path, buf.buf, buf.len, &buf, commit);
- buffer = strbuf_detach(&buf, &size);
- *sizep = size;
- }
-
- return buffer;
-}
-
static int init_archiver(const char *name, struct archiver *ar)
{
int rv = -1, i;
diff --git a/builtin-blame.c b/builtin-blame.c
index d98caaf21..9b4c02e87 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -606,7 +606,7 @@ static void add_blame_entry(struct scoreboard *sb, struct blame_entry *e)
/*
* src typically is on-stack; we want to copy the information in it to
- * an malloced blame_entry that is already on the linked list of the
+ * a malloced blame_entry that is already on the linked list of the
* scoreboard. The origin of dst loses a refcnt while the origin of src
* gains one.
*/
diff --git a/builtin-branch.c b/builtin-branch.c
index 089cae592..e414c8898 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -70,12 +70,15 @@ static int git_branch_config(const char *var, const char *value)
}
if (!prefixcmp(var, "color.branch.")) {
int slot = parse_branch_color_slot(var, 13);
+ if (!value)
+ return config_error_nonbool(var);
color_parse(value, var, branch_colors[slot]);
return 0;
}
- if (!strcmp(var, "branch.autosetupmerge"))
- branch_track = git_config_bool(var, value);
-
+ if (!strcmp(var, "branch.autosetupmerge")) {
+ branch_track = git_config_bool(var, value);
+ return 0;
+ }
return git_default_config(var, value);
}
diff --git a/builtin-checkout-index.c b/builtin-checkout-index.c
index 70d619da8..7e42024c6 100644
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
@@ -246,8 +246,8 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
* want to update cache.
*/
if (state.refresh_cache) {
- close(newfd); newfd = -1;
rollback_lock_file(&lock_file);
+ newfd = -1;
}
state.refresh_cache = 0;
}
@@ -297,7 +297,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
if (0 <= newfd &&
(write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file)))
+ commit_locked_index(&lock_file)))
die("Unable to write new index file");
return 0;
}
diff --git a/builtin-clean.c b/builtin-clean.c
index ae30d4e76..eb853a37c 100644
--- a/builtin-clean.c
+++ b/builtin-clean.c
@@ -34,6 +34,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
struct dir_struct dir;
const char *path, *base;
static const char **pathspec;
+ int prefix_offset = 0;
char *seen = NULL;
struct option options[] = {
OPT__QUIET(&quiet),
@@ -71,6 +72,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
if (!ignored)
setup_standard_excludes(&dir);
+ if (prefix)
+ prefix_offset = strlen(prefix);
pathspec = get_pathspec(prefix, argv);
read_cache();
@@ -87,7 +90,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
strbuf_init(&directory, 0);
if (pathspec)
- seen = xmalloc(argc);
+ seen = xmalloc(argc > 0 ? argc : 1);
for (i = 0; i < dir.nr; i++) {
struct dir_entry *ent = dir.entries[i];
@@ -122,7 +125,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
continue;
if (pathspec) {
- memset(seen, 0, argc);
+ memset(seen, 0, argc > 0 ? argc : 1);
matches = match_pathspec(pathspec, ent->name, ent->len,
baselen, seen);
} else {
@@ -132,26 +135,32 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
if (S_ISDIR(st.st_mode)) {
strbuf_addstr(&directory, ent->name);
if (show_only && (remove_directories || matches)) {
- printf("Would remove %s\n", directory.buf);
+ printf("Would remove %s\n",
+ directory.buf + prefix_offset);
} else if (quiet && (remove_directories || matches)) {
remove_dir_recursively(&directory, 0);
} else if (remove_directories || matches) {
- printf("Removing %s\n", directory.buf);
+ printf("Removing %s\n",
+ directory.buf + prefix_offset);
remove_dir_recursively(&directory, 0);
} else if (show_only) {
- printf("Would not remove %s\n", directory.buf);
+ printf("Would not remove %s\n",
+ directory.buf + prefix_offset);
} else {
- printf("Not removing %s\n", directory.buf);
+ printf("Not removing %s\n",
+ directory.buf + prefix_offset);
}
strbuf_reset(&directory);
} else {
if (pathspec && !matches)
continue;
if (show_only) {
- printf("Would remove %s\n", ent->name);
+ printf("Would remove %s\n",
+ ent->name + prefix_offset);
continue;
} else if (!quiet) {
- printf("Removing %s\n", ent->name);
+ printf("Removing %s\n",
+ ent->name + prefix_offset);
}
unlink(ent->name);
}
diff --git a/builtin-commit.c b/builtin-commit.c
index 96410de55..a43f20199 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -21,6 +21,7 @@
#include "utf8.h"
#include "parse-options.h"
#include "path-list.h"
+#include "unpack-trees.h"
static const char * const builtin_commit_usage[] = {
"git-commit [options] [--] <filepattern>...",
@@ -47,8 +48,21 @@ static char *logfile, *force_author, *template_file;
static char *edit_message, *use_message;
static int all, edit_flag, also, interactive, only, amend, signoff;
static int quiet, verbose, untracked_files, no_verify, allow_empty;
+/*
+ * The default commit message cleanup mode will remove the lines
+ * beginning with # (shell comments) and leading and trailing
+ * whitespaces (empty lines or containing only whitespaces)
+ * if editor is used, and only the whitespaces if the message
+ * is specified explicitly.
+ */
+static enum {
+ CLEANUP_SPACE,
+ CLEANUP_NONE,
+ CLEANUP_ALL,
+} cleanup_mode;
+static char *cleanup_arg;
-static int no_edit, initial_commit, in_merge;
+static int use_editor = 1, initial_commit, in_merge;
const char *only_include_assumed;
struct strbuf message;
@@ -88,6 +102,7 @@ static struct option builtin_commit_options[] = {
OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
OPT_BOOLEAN(0, "untracked-files", &untracked_files, "show all untracked files"),
OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"),
+ OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"),
OPT_END()
};
@@ -107,19 +122,23 @@ static void rollback_index_files(void)
}
}
-static void commit_index_files(void)
+static int commit_index_files(void)
{
+ int err = 0;
+
switch (commit_style) {
case COMMIT_AS_IS:
break; /* nothing to do */
case COMMIT_NORMAL:
- commit_lock_file(&index_lock);
+ err = commit_lock_file(&index_lock);
break;
case COMMIT_PARTIAL:
- commit_lock_file(&index_lock);
+ err = commit_lock_file(&index_lock);
rollback_lock_file(&false_lock);
break;
}
+
+ return err;
}
/*
@@ -163,10 +182,34 @@ static void add_remove_files(struct path_list *list)
}
}
+static void create_base_index(void)
+{
+ struct tree *tree;
+ struct unpack_trees_options opts;
+ struct tree_desc t;
+
+ if (initial_commit) {
+ discard_cache();
+ return;
+ }
+
+ memset(&opts, 0, sizeof(opts));
+ opts.head_idx = 1;
+ opts.index_only = 1;
+ opts.merge = 1;
+
+ opts.fn = oneway_merge;
+ tree = parse_tree_indirect(head_sha1);
+ if (!tree)
+ die("failed to unpack HEAD tree object");
+ parse_tree(tree);
+ init_tree_desc(&t, tree->buffer, tree->size);
+ unpack_trees(1, &t, &opts);
+}
+
static char *prepare_index(int argc, const char **argv, const char *prefix)
{
int fd;
- struct tree *tree;
struct path_list partial;
const char **pathspec = NULL;
@@ -198,7 +241,8 @@ static char *prepare_index(int argc, const char **argv, const char *prefix)
int fd = hold_locked_index(&index_lock, 1);
add_files_to_cache(0, also ? prefix : NULL, pathspec);
refresh_cache(REFRESH_QUIET);
- if (write_cache(fd, active_cache, active_nr) || close(fd))
+ if (write_cache(fd, active_cache, active_nr) ||
+ close_lock_file(&index_lock))
die("unable to write new_index file");
commit_style = COMMIT_NORMAL;
return index_lock.filename;
@@ -217,7 +261,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix)
fd = hold_locked_index(&index_lock, 1);
refresh_cache(REFRESH_QUIET);
if (write_cache(fd, active_cache, active_nr) ||
- close(fd) || commit_locked_index(&index_lock))
+ commit_locked_index(&index_lock))
die("unable to write new_index file");
commit_style = COMMIT_AS_IS;
return get_index_file();
@@ -259,23 +303,19 @@ static char *prepare_index(int argc, const char **argv, const char *prefix)
fd = hold_locked_index(&index_lock, 1);
add_remove_files(&partial);
refresh_cache(REFRESH_QUIET);
- if (write_cache(fd, active_cache, active_nr) || close(fd))
+ if (write_cache(fd, active_cache, active_nr) ||
+ close_lock_file(&index_lock))
die("unable to write new_index file");
fd = hold_lock_file_for_update(&false_lock,
git_path("next-index-%d", getpid()), 1);
- discard_cache();
- if (!initial_commit) {
- tree = parse_tree_indirect(head_sha1);
- if (!tree)
- die("failed to unpack HEAD tree object");
- if (read_tree(tree, 0, NULL))
- die("failed to read HEAD tree object");
- }
+
+ create_base_index();
add_remove_files(&partial);
refresh_cache(REFRESH_QUIET);
- if (write_cache(fd, active_cache, active_nr) || close(fd))
+ if (write_cache(fd, active_cache, active_nr) ||
+ close_lock_file(&false_lock))
die("unable to write temporary index file");
return false_lock.filename;
}
@@ -346,7 +386,8 @@ static int prepare_log_message(const char *index_file, const char *prefix)
if (fp == NULL)
die("could not open %s", git_path(commit_editmsg));
- stripspace(&sb, 0);
+ if (cleanup_mode != CLEANUP_NONE)
+ stripspace(&sb, 0);
if (signoff) {
struct strbuf sob;
@@ -372,9 +413,9 @@ static int prepare_log_message(const char *index_file, const char *prefix)
strbuf_release(&sb);
- if (no_edit) {
+ if (!use_editor) {
struct rev_info rev;
- unsigned char sha1[40];
+ unsigned char sha1[20];
const char *parent = "HEAD";
fclose(fp);
@@ -382,12 +423,12 @@ static int prepare_log_message(const char *index_file, const char *prefix)
if (!active_nr && read_cache() < 0)
die("Cannot read index");
- if (get_sha1("HEAD", sha1) != 0)
- return !!active_nr;
-
if (amend)
parent = "HEAD^1";
+ if (get_sha1(parent, sha1))
+ return !!active_nr;
+
init_revisions(&rev, "");
rev.abbrev = 0;
setup_revisions(0, NULL, &rev, parent);
@@ -398,7 +439,7 @@ static int prepare_log_message(const char *index_file, const char *prefix)
return !!DIFF_OPT_TST(&rev.diffopt, HAS_CHANGES);
}
- if (in_merge && !no_edit)
+ if (in_merge)
fprintf(fp,
"#\n"
"# It looks like you may be committing a MERGE.\n"
@@ -411,7 +452,12 @@ static int prepare_log_message(const char *index_file, const char *prefix)
fprintf(fp,
"\n"
"# Please enter the commit message for your changes.\n"
- "# (Comment lines starting with '#' will not be included)\n");
+ "# (Comment lines starting with '#' will ");
+ if (cleanup_mode == CLEANUP_ALL)
+ fprintf(fp, "not be included)\n");
+ else /* CLEANUP_SPACE, that is. */
+ fprintf(fp, "be kept.\n"
+ "# You can remove them yourself if you want to)\n");
if (only_include_assumed)
fprintf(fp, "# %s\n", only_include_assumed);
@@ -435,10 +481,13 @@ static int message_is_empty(struct strbuf *sb, int start)
const char *nl;
int eol, i;
+ if (cleanup_mode == CLEANUP_NONE && sb->len)
+ return 0;
+
/* See if the template is just a prefix of the message. */
strbuf_init(&tmpl, 0);
if (template_file && strbuf_read_file(&tmpl, template_file, 0) > 0) {
- stripspace(&tmpl, 1);
+ stripspace(&tmpl, cleanup_mode == CLEANUP_ALL);
if (start + tmpl.len <= sb->len &&
memcmp(tmpl.buf, sb->buf + start, tmpl.len) == 0)
start += tmpl.len;
@@ -513,9 +562,9 @@ static int parse_and_validate_options(int argc, const char *argv[],
argc = parse_options(argc, argv, builtin_commit_options, usage, 0);
if (logfile || message.len || use_message)
- no_edit = 1;
+ use_editor = 0;
if (edit_flag)
- no_edit = 0;
+ use_editor = 1;
if (get_sha1("HEAD", head_sha1))
initial_commit = 1;
@@ -552,7 +601,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
if (get_sha1(use_message, sha1))
die("could not lookup commit %s", use_message);
- commit = lookup_commit(sha1);
+ commit = lookup_commit_reference(sha1);
if (!commit || parse_commit(commit))
die("could not parse commit %s", use_message);
@@ -591,6 +640,16 @@ static int parse_and_validate_options(int argc, const char *argv[],
only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths...";
also = 0;
}
+ if (!cleanup_arg || !strcmp(cleanup_arg, "default"))
+ cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE;
+ else if (!strcmp(cleanup_arg, "verbatim"))
+ cleanup_mode = CLEANUP_NONE;
+ else if (!strcmp(cleanup_arg, "whitespace"))
+ cleanup_mode = CLEANUP_SPACE;
+ else if (!strcmp(cleanup_arg, "strip"))
+ cleanup_mode = CLEANUP_ALL;
+ else
+ die("Invalid cleanup mode %s", cleanup_arg);
if (all && argc > 0)
die("Paths with -a does not make sense.");
@@ -684,6 +743,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
int git_commit_config(const char *k, const char *v)
{
if (!strcmp(k, "commit.template")) {
+ if (!v)
+ return config_error_nonbool(v);
template_file = xstrdup(v);
return 0;
}
@@ -704,6 +765,17 @@ static const char commit_utf8_warn[] =
"You may want to amend it after fixing the message, or set the config\n"
"variable i18n.commitencoding to the encoding your project uses.\n";
+static void add_parent(struct strbuf *sb, const unsigned char *sha1)
+{
+ struct object *obj = parse_object(sha1);
+ const char *parent = sha1_to_hex(sha1);
+ if (!obj)
+ die("Unable to find commit parent %s", parent);
+ if (obj->type != OBJ_COMMIT)
+ die("Parent %s isn't a proper commit", parent);
+ strbuf_addf(sb, "parent %s\n", parent);
+}
+
int cmd_commit(int argc, const char **argv, const char *prefix)
{
int header_len;
@@ -766,21 +838,24 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
die("could not parse HEAD commit");
for (c = commit->parents; c; c = c->next)
- strbuf_addf(&sb, "parent %s\n",
- sha1_to_hex(c->item->object.sha1));
+ add_parent(&sb, c->item->object.sha1);
} else if (in_merge) {
struct strbuf m;
FILE *fp;
reflog_msg = "commit (merge)";
- strbuf_addf(&sb, "parent %s\n", sha1_to_hex(head_sha1));
+ add_parent(&sb, head_sha1);
strbuf_init(&m, 0);
fp = fopen(git_path("MERGE_HEAD"), "r");
if (fp == NULL)
die("could not open %s for reading: %s",
git_path("MERGE_HEAD"), strerror(errno));
- while (strbuf_getline(&m, fp, '\n') != EOF)
- strbuf_addf(&sb, "parent %s\n", m.buf);
+ while (strbuf_getline(&m, fp, '\n') != EOF) {
+ unsigned char sha1[20];
+ if (get_sha1_hex(m.buf, sha1) < 0)
+ die("Corrupt MERGE_HEAD file (%s)", m.buf);
+ add_parent(&sb, sha1);
+ }
fclose(fp);
strbuf_release(&m);
} else {
@@ -796,7 +871,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
/* Get the commit message and validate it */
header_len = sb.len;
- if (!no_edit) {
+ if (use_editor) {
char index[PATH_MAX];
const char *env[2] = { index, NULL };
snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file);
@@ -817,7 +892,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (p != NULL)
strbuf_setlen(&sb, p - sb.buf + 1);
- stripspace(&sb, 1);
+ if (cleanup_mode != CLEANUP_NONE)
+ stripspace(&sb, cleanup_mode == CLEANUP_ALL);
if (sb.len < header_len || message_is_empty(&sb, header_len)) {
rollback_index_files();
die("no commit message? aborting commit.");
@@ -855,8 +931,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
unlink(git_path("MERGE_HEAD"));
unlink(git_path("MERGE_MSG"));
+ unlink(git_path("SQUASH_MSG"));
- commit_index_files();
+ if (commit_index_files())
+ die ("Repository has been updated, but unable to write\n"
+ "new_index file. Check that disk is not full or quota is\n"
+ "not exceeded, and then \"git reset HEAD\" to recover.");
rerere();
run_hook(get_index_file(), "post-commit", NULL);
diff --git a/builtin-config.c b/builtin-config.c
index e4a12e316..077d8ef2d 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -168,6 +168,8 @@ static char parsed_color[COLOR_MAXLEN];
static int git_get_color_config(const char *var, const char *value)
{
if (!strcmp(var, get_color_slot)) {
+ if (!value)
+ config_error_nonbool(var);
color_parse(value, var, parsed_color);
get_color_found = 1;
}
diff --git a/builtin-diff-files.c b/builtin-diff-files.c
index 9c0411165..4abe3c28f 100644
--- a/builtin-diff-files.c
+++ b/builtin-diff-files.c
@@ -21,7 +21,7 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
prefix = setup_git_directory_gently(&nongit);
init_revisions(&rev, prefix);
- git_config(git_default_config); /* no "diff" UI options */
+ git_config(git_diff_basic_config); /* no "diff" UI options */
rev.abbrev = 0;
if (!setup_diff_no_index(&rev, argc, argv, nongit, prefix))
diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index 0f2390a20..2b955deb9 100644
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
@@ -17,7 +17,7 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
int result;
init_revisions(&rev, prefix);
- git_config(git_default_config); /* no "diff" UI options */
+ git_config(git_diff_basic_config); /* no "diff" UI options */
rev.abbrev = 0;
argc = setup_revisions(argc, argv, &rev, NULL);
diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c
index ebc50efbd..832797ff3 100644
--- a/builtin-diff-tree.c
+++ b/builtin-diff-tree.c
@@ -68,7 +68,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
int read_stdin = 0;
init_revisions(opt, prefix);
- git_config(git_default_config); /* no "diff" UI options */
+ git_config(git_diff_basic_config); /* no "diff" UI options */
nr_sha1 = 0;
opt->abbrev = 0;
opt->diff = 1;
diff --git a/builtin-diff.c b/builtin-diff.c
index 29365a0b1..8d7a5697f 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -190,7 +190,7 @@ static void refresh_index_quietly(void)
refresh_cache(REFRESH_QUIET|REFRESH_UNMERGED);
if (active_cache_changed &&
- !write_cache(fd, active_cache, active_nr) && !close(fd))
+ !write_cache(fd, active_cache, active_nr))
commit_locked_index(lock_file);
rollback_lock_file(lock_file);
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 807fa93b5..e68e01592 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -783,7 +783,6 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
unlink(shallow);
rollback_lock_file(&lock);
} else {
- close(fd);
commit_lock_file(&lock);
}
}
diff --git a/builtin-fsck.c b/builtin-fsck.c
index e4874f64a..8c564345f 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -360,6 +360,9 @@ static int fsck_commit(struct commit *commit)
fprintf(stderr, "Checking commit %s\n",
sha1_to_hex(commit->object.sha1));
+ if (!commit->date)
+ return objerror(&commit->object, "invalid author/committer line");
+
if (memcmp(buffer, "tree ", 5))
return objerror(&commit->object, "invalid format - expected 'tree' line");
if (get_sha1_hex(buffer+5, tree_sha1) || buffer[45] != '\n')
@@ -378,9 +381,6 @@ static int fsck_commit(struct commit *commit)
return objerror(&commit->object, "could not load commit's tree %s", tree_sha1);
if (!commit->parents && show_root)
printf("root %s\n", sha1_to_hex(commit->object.sha1));
- if (!commit->date)
- printf("bad commit date in %s\n",
- sha1_to_hex(commit->object.sha1));
return 0;
}
@@ -555,20 +555,23 @@ static int fsck_handle_reflog(const char *logname, const unsigned char *sha1, in
return 0;
}
+static int is_branch(const char *refname)
+{
+ return !strcmp(refname, "HEAD") || !prefixcmp(refname, "refs/heads/");
+}
+
static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
{
struct object *obj;
- obj = lookup_object(sha1);
+ obj = parse_object(sha1);
if (!obj) {
- if (has_sha1_file(sha1)) {
- default_refs++;
- return 0; /* it is in a pack */
- }
error("%s: invalid sha1 pointer %s", refname, sha1_to_hex(sha1));
/* We'll continue with the rest despite the error.. */
return 0;
}
+ if (obj->type != OBJ_COMMIT && is_branch(refname))
+ error("%s: not a commit", refname);
default_refs++;
obj->used = 1;
mark_reachable(obj, REACHABLE);
diff --git a/builtin-gc.c b/builtin-gc.c
index 799c26393..ad4a75eed 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -37,7 +37,7 @@ static const char *argv_rerere[] = {"rerere", "gc", NULL};
static int gc_config(const char *var, const char *value)
{
if (!strcmp(var, "gc.packrefs")) {
- if (!strcmp(value, "notbare"))
+ if (value && !strcmp(value, "notbare"))
pack_refs = -1;
else
pack_refs = git_config_bool(var, value);
@@ -205,7 +205,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
prune = 0;
if (!need_to_gc())
return 0;
- fprintf(stderr, "Packing your repository for optimum "
+ fprintf(stderr, "Auto packing your repository for optimum "
"performance. You may also\n"
"run \"git gc\" manually. See "
"\"git help gc\" for more information.\n");
diff --git a/builtin-grep.c b/builtin-grep.c
index f1ff8dc55..0d6cc7361 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -644,7 +644,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
die("'%s': %s", argv[1], strerror(errno));
while (fgets(buf, sizeof(buf), patterns)) {
int len = strlen(buf);
- if (buf[len-1] == '\n')
+ if (len && buf[len-1] == '\n')
buf[len-1] = 0;
/* ignore empty line like grep does */
if (!buf[0])
diff --git a/builtin-http-fetch.c b/builtin-http-fetch.c
index 4a50dbd95..7f450c61d 100644
--- a/builtin-http-fetch.c
+++ b/builtin-http-fetch.c
@@ -9,6 +9,7 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
const char **write_ref = NULL;
char **commit_id;
const char *url;
+ char *rewritten_url = NULL;
int arg = 1;
int rc = 0;
int get_tree = 0;
@@ -51,6 +52,12 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
commits = 1;
}
url = argv[arg];
+ if (url && url[strlen(url)-1] != '/') {
+ rewritten_url = malloc(strlen(url)+2);
+ strcpy(rewritten_url, url);
+ strcat(rewritten_url, "/");
+ url = rewritten_url;
+ }
walker = get_http_walker(url);
walker->get_tree = get_tree;
@@ -73,5 +80,8 @@ int cmd_http_fetch(int argc, const char **argv, const char *prefix)
walker_free(walker);
+ if (rewritten_url)
+ free(rewritten_url);
+
return rc;
}
diff --git a/builtin-init-db.c b/builtin-init-db.c
index e1393b8d1..5d7cdda93 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -141,9 +141,9 @@ static void copy_templates(const char *git_dir, int len, const char *template_di
*/
template_dir = DEFAULT_GIT_TEMPLATE_DIR;
if (!is_absolute_path(template_dir)) {
- const char *exec_path = git_exec_path();
- template_dir = prefix_path(exec_path, strlen(exec_path),
- template_dir);
+ struct strbuf d = STRBUF_INIT;
+ strbuf_addf(&d, "%s/%s", git_exec_path(), template_dir);
+ template_dir = strbuf_detach(&d, NULL);
}
}
strcpy(template_path, template_dir);
diff --git a/builtin-log.c b/builtin-log.c
index dcc9f8179..99d69f079 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -219,7 +219,7 @@ static int git_log_config(const char *var, const char *value)
{
if (!strcmp(var, "format.subjectprefix")) {
if (!value)
- die("format.subjectprefix without value");
+ config_error_nonbool(var);
fmt_patch_subject_prefix = xstrdup(value);
return 0;
}
@@ -432,7 +432,7 @@ static int git_format_config(const char *var, const char *value)
}
if (!strcmp(var, "format.suffix")) {
if (!value)
- die("format.suffix without value");
+ return config_error_nonbool(var);
fmt_patch_suffix = xstrdup(value);
return 0;
}
@@ -440,11 +440,10 @@ static int git_format_config(const char *var, const char *value)
return 0;
}
if (!strcmp(var, "format.numbered")) {
- if (!strcasecmp(value, "auto")) {
+ if (value && !strcasecmp(value, "auto")) {
auto_number = 1;
return 0;
}
-
numbered = git_config_bool(var, value);
return 0;
}
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index c2caeeabe..6dd31d1dd 100644
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
@@ -54,11 +54,11 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
uploadpack = arg + 7;
continue;
}
- if (!strcmp("--tags", arg)) {
+ if (!strcmp("--tags", arg) || !strcmp("-t", arg)) {
flags |= REF_TAGS;
continue;
}
- if (!strcmp("--heads", arg)) {
+ if (!strcmp("--heads", arg) || !strcmp("-h", arg)) {
flags |= REF_HEADS;
continue;
}
diff --git a/builtin-mv.c b/builtin-mv.c
index a3f9ad174..990e21355 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -264,7 +264,6 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) ||
commit_locked_index(&lock_file))
die("Unable to write new index file");
}
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index e0ce114be..acb05554d 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -68,7 +68,7 @@ static int allow_ofs_delta;
static const char *base_name;
static int progress = 1;
static int window = 10;
-static uint32_t pack_size_limit;
+static uint32_t pack_size_limit, pack_size_limit_cfg;
static int depth = 50;
static int delta_search_threads = 1;
static int pack_to_stdout;
@@ -445,7 +445,7 @@ static unsigned long write_object(struct sha1file *f,
/* nothing */;
deflateEnd(&stream);
datalen = stream.total_out;
- deflateEnd(&stream);
+
/*
* The object header is a byte of 'type' followed by zero or
* more bytes of length.
@@ -1464,7 +1464,7 @@ static unsigned int check_delta_limit(struct object_entry *me, unsigned int n)
return m;
}
-static unsigned long free_unpacked(struct unpacked *n)
+static unsigned long free_unpacked_data(struct unpacked *n)
{
unsigned long freed_mem = sizeof_delta_index(n->index);
free_delta_index(n->index);
@@ -1474,6 +1474,12 @@ static unsigned long free_unpacked(struct unpacked *n)
free(n->data);
n->data = NULL;
}
+ return freed_mem;
+}
+
+static unsigned long free_unpacked(struct unpacked *n)
+{
+ unsigned long freed_mem = free_unpacked_data(n);
n->entry = NULL;
n->depth = 0;
return freed_mem;
@@ -1514,7 +1520,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
mem_usage > window_memory_limit &&
count > 1) {
uint32_t tail = (idx + window - count) % window;
- mem_usage -= free_unpacked(array + tail);
+ mem_usage -= free_unpacked_data(array + tail);
count--;
}
@@ -1547,6 +1553,9 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
if (!m->entry)
break;
ret = try_delta(n, m, max_depth, &mem_usage);
+ if (window_memory_limit &&
+ mem_usage > window_memory_limit)
+ mem_usage -= free_unpacked_data(m);
if (ret < 0)
break;
else if (ret > 0)
@@ -1672,7 +1681,8 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
p[i].data_ready = 0;
/* try to split chunks on "path" boundaries */
- while (sub_size < list_size && list[sub_size]->hash &&
+ while (sub_size && sub_size < list_size &&
+ list[sub_size]->hash &&
list[sub_size]->hash == list[sub_size-1]->hash)
sub_size++;
@@ -1866,6 +1876,10 @@ static int git_pack_config(const char *k, const char *v)
die("bad pack.indexversion=%d", pack_idx_default_version);
return 0;
}
+ if (!strcmp(k, "pack.packsizelimit")) {
+ pack_size_limit_cfg = git_config_ulong(k, v);
+ return 0;
+ }
return git_default_config(k, v);
}
@@ -2013,7 +2027,7 @@ static void get_object_list(int ac, const char **av)
while (fgets(line, sizeof(line), stdin) != NULL) {
int len = strlen(line);
- if (line[len - 1] == '\n')
+ if (len && line[len - 1] == '\n')
line[--len] = 0;
if (!len)
break;
@@ -2095,6 +2109,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
}
if (!prefixcmp(arg, "--max-pack-size=")) {
char *end;
+ pack_size_limit_cfg = 0;
pack_size_limit = strtoul(arg+16, &end, 0) * 1024 * 1024;
if (!arg[16] || *end)
usage(pack_usage);
@@ -2219,6 +2234,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
if (pack_to_stdout != !base_name)
usage(pack_usage);
+ if (!pack_to_stdout && !pack_size_limit)
+ pack_size_limit = pack_size_limit_cfg;
+
if (pack_to_stdout && pack_size_limit)
die("--max-pack-size cannot be used to build a pack for transfer.");
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index 1923fb191..1aaa76dd1 100644
--- a/builtin-pack-refs.c
+++ b/builtin-pack-refs.c
@@ -108,6 +108,12 @@ static int pack_refs(unsigned int flags)
die("failed to write ref-pack file");
if (fflush(cbdata.refs_file) || fsync(fd) || fclose(cbdata.refs_file))
die("failed to write ref-pack file (%s)", strerror(errno));
+ /*
+ * Since the lock file was fdopen()'ed and then fclose()'ed above,
+ * assign -1 to the lock file descriptor so that commit_lock_file()
+ * won't try to close() it.
+ */
+ packed.fd = -1;
if (commit_lock_file(&packed) < 0)
die("unable to overwrite old ref-pack file (%s)", strerror(errno));
if (cbdata.flags & PACK_REFS_PRUNE)
diff --git a/builtin-prune.c b/builtin-prune.c
index b5e768421..bb8ead92c 100644
--- a/builtin-prune.c
+++ b/builtin-prune.c
@@ -83,6 +83,44 @@ static void prune_object_dir(const char *path)
}
}
+/*
+ * Write errors (particularly out of space) can result in
+ * failed temporary packs (and more rarely indexes and other
+ * files begining with "tmp_") accumulating in the
+ * object directory.
+ */
+static void remove_temporary_files(void)
+{
+ DIR *dir;
+ struct dirent *de;
+ char* dirname=get_object_directory();
+
+ dir = opendir(dirname);
+ if (!dir) {
+ fprintf(stderr, "Unable to open object directory %s\n",
+ dirname);
+ return;
+ }
+ while ((de = readdir(dir)) != NULL) {
+ if (!prefixcmp(de->d_name, "tmp_")) {
+ char name[PATH_MAX];
+ int c = snprintf(name, PATH_MAX, "%s/%s",
+ dirname, de->d_name);
+ if (c < 0 || c >= PATH_MAX)
+ continue;
+ if (expire) {
+ struct stat st;
+ if (stat(name, &st) != 0 || st.st_mtime >= expire)
+ continue;
+ }
+ printf("Removing stale temporary file %s\n", name);
+ if (!show_only)
+ unlink(name);
+ }
+ }
+ closedir(dir);
+}
+
int cmd_prune(int argc, const char **argv, const char *prefix)
{
int i;
@@ -115,5 +153,6 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
sync();
prune_packed_objects(show_only);
+ remove_temporary_files();
return 0;
}
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 43cd56a3b..c0ea0342b 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -283,7 +283,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
}
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file))
+ commit_locked_index(&lock_file))
die("unable to write new index file");
return 0;
}
diff --git a/builtin-reflog.c b/builtin-reflog.c
index ce093cad7..4836ec951 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -34,6 +34,16 @@ struct expire_reflog_cb {
struct cmd_reflog_expire_cb *cmd;
};
+struct collected_reflog {
+ unsigned char sha1[20];
+ char reflog[FLEX_ARRAY];
+};
+struct collect_reflog_cb {
+ struct collected_reflog **e;
+ int alloc;
+ int nr;
+};
+
#define INCOMPLETE (1u<<10)
#define STUDYING (1u<<11)
@@ -281,15 +291,35 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
return status;
}
+static int collect_reflog(const char *ref, const unsigned char *sha1, int unused, void *cb_data)
+{
+ struct collected_reflog *e;
+ struct collect_reflog_cb *cb = cb_data;
+ size_t namelen = strlen(ref);
+
+ e = xmalloc(sizeof(*e) + namelen + 1);
+ hashcpy(e->sha1, sha1);
+ memcpy(e->reflog, ref, namelen + 1);
+ ALLOC_GROW(cb->e, cb->nr + 1, cb->alloc);
+ cb->e[cb->nr++] = e;
+ return 0;
+}
+
static int reflog_expire_config(const char *var, const char *value)
{
- if (!strcmp(var, "gc.reflogexpire"))
+ if (!strcmp(var, "gc.reflogexpire")) {
+ if (!value)
+ config_error_nonbool(var);
default_reflog_expire = approxidate(value);
- else if (!strcmp(var, "gc.reflogexpireunreachable"))
+ return 0;
+ }
+ if (!strcmp(var, "gc.reflogexpireunreachable")) {
+ if (!value)
+ config_error_nonbool(var);
default_reflog_expire_unreachable = approxidate(value);
- else
- return git_default_config(var, value);
- return 0;
+ return 0;
+ }
+ return git_default_config(var, value);
}
static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
@@ -349,8 +379,20 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
putchar('\n');
}
- if (do_all)
- status |= for_each_reflog(expire_reflog, &cb);
+ if (do_all) {
+ struct collect_reflog_cb collected;
+ int i;
+
+ memset(&collected, 0, sizeof(collected));
+ for_each_reflog(collect_reflog, &collected);
+ for (i = 0; i < collected.nr; i++) {
+ struct collected_reflog *e = collected.e[i];
+ status |= expire_reflog(e->reflog, e->sha1, 0, &cb);
+ free(e);
+ }
+ free(collected.e);
+ }
+
while (i < argc) {
const char *ref = argv[i++];
unsigned char sha1[20];
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 37e624813..a9e3ebc13 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -61,9 +61,9 @@ static int write_rr(struct path_list *rr, int out_fd)
write_in_full(out_fd, path, length) != length)
die("unable to write rerere record");
}
- if (close(out_fd) != 0)
+ if (commit_lock_file(&write_lock) != 0)
die("unable to write rerere record");
- return commit_lock_file(&write_lock);
+ return 0;
}
static int handle_file(const char *path,
diff --git a/builtin-reset.c b/builtin-reset.c
index 713c2d534..7ee811f0b 100644
--- a/builtin-reset.c
+++ b/builtin-reset.c
@@ -108,7 +108,6 @@ static int update_index_refresh(int fd, struct lock_file *index_lock)
return error("Could not read index");
result = refresh_cache(0) ? 1 : 0;
if (write_cache(fd, active_cache, active_nr) ||
- close(fd) ||
commit_locked_index(index_lock))
return error ("Could not refresh index");
return result;
@@ -244,6 +243,9 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == NONE)
reset_type = MIXED; /* by default */
+ if (reset_type == HARD && is_bare_repository())
+ die("hard reset makes no sense in a bare repository");
+
/* Soft reset does not touch the index file nor the working tree
* at all, but requires them in a good order. Other resets reset
* the index file to the tree object we are switching to. */
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 1cb5f6711..de80158fd 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -520,7 +520,7 @@ static void read_revisions_from_stdin(struct rev_info *revs)
while (fgets(line, sizeof(line), stdin) != NULL) {
int len = strlen(line);
- if (line[len - 1] == '\n')
+ if (len && line[len - 1] == '\n')
line[--len] = 0;
if (!len)
break;
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index 20d1789e0..b9af1a5a5 100644
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
@@ -21,6 +21,9 @@ static const char *def;
#define NORMAL 0
#define REVERSED 1
static int show_type = NORMAL;
+
+#define SHOW_SYMBOLIC_ASIS 1
+#define SHOW_SYMBOLIC_FULL 2
static int symbolic;
static int abbrev;
static int output_sq;
@@ -103,8 +106,32 @@ static void show_rev(int type, const unsigned char *sha1, const char *name)
if (type != show_type)
putchar('^');
- if (symbolic && name)
- show(name);
+ if (symbolic && name) {
+ if (symbolic == SHOW_SYMBOLIC_FULL) {
+ unsigned char discard[20];
+ char *full;
+
+ switch (dwim_ref(name, strlen(name), discard, &full)) {
+ case 0:
+ /*
+ * Not found -- not a ref. We could
+ * emit "name" here, but symbolic-full
+ * users are interested in finding the
+ * refs spelled in full, and they would
+ * need to filter non-refs if we did so.
+ */
+ break;
+ case 1: /* happy */
+ show(full);
+ break;
+ default: /* ambiguous */
+ error("refname '%s' is ambiguous", name);
+ break;
+ }
+ } else {
+ show(name);
+ }
+ }
else if (abbrev)
show(find_unique_abbrev(sha1, abbrev));
else
@@ -421,7 +448,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
continue;
}
if (!strcmp(arg, "--symbolic")) {
- symbolic = 1;
+ symbolic = SHOW_SYMBOLIC_ASIS;
+ continue;
+ }
+ if (!strcmp(arg, "--symbolic-full-name")) {
+ symbolic = SHOW_SYMBOLIC_FULL;
continue;
}
if (!strcmp(arg, "--all")) {
diff --git a/builtin-revert.c b/builtin-revert.c
index 4bf8eb2f5..358af5374 100644
--- a/builtin-revert.c
+++ b/builtin-revert.c
@@ -371,13 +371,13 @@ static int revert_or_cherry_pick(int argc, const char **argv)
i++;
}
}
- if (close(msg_fd) || commit_lock_file(&msg_file) < 0)
+ if (commit_lock_file(&msg_file) < 0)
die ("Error wrapping up %s", defmsg);
fprintf(stderr, "Automatic %s failed.%s\n",
me, help_msg(commit->object.sha1));
exit(1);
}
- if (close(msg_fd) || commit_lock_file(&msg_file) < 0)
+ if (commit_lock_file(&msg_file) < 0)
die ("Error wrapping up %s", defmsg);
fprintf(stderr, "Finished one %s.\n", me);
diff --git a/builtin-rm.c b/builtin-rm.c
index a3d25e6a5..c0a8bb6cf 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -250,7 +250,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(&lock_file))
+ commit_locked_index(&lock_file))
die("Unable to write new index file");
}
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 25ae1fe86..8afb1d0bc 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -541,10 +541,12 @@ static void verify_remote_names(int nr_heads, const char **heads)
remote = remote ? (remote + 1) : heads[i];
switch (check_ref_format(remote)) {
case 0: /* ok */
- case -2: /* ok but a single level -- that is fine for
- * a match pattern.
- */
- case -3: /* ok but ends with a pattern-match character */
+ case CHECK_REF_FORMAT_ONELEVEL:
+ /* ok but a single level -- that is fine for
+ * a match pattern.
+ */
+ case CHECK_REF_FORMAT_WILDCARD:
+ /* ok but ends with a pattern-match character */
continue;
}
die("remote part of refspec is not a valid name in %s",
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 3d8d7094a..fa8bc7d02 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -8,7 +8,7 @@
#include "mailmap.h"
static const char shortlog_usage[] =
-"git-shortlog [-n] [-s] [<commit-id>... ]";
+"git-shortlog [-n] [-s] [-e] [<commit-id>... ]";
static char *common_repo_prefix;
static int email;
diff --git a/builtin-show-branch.c b/builtin-show-branch.c
index 6dc835d30..019abd352 100644
--- a/builtin-show-branch.c
+++ b/builtin-show-branch.c
@@ -536,6 +536,8 @@ static void append_one_rev(const char *av)
static int git_show_branch_config(const char *var, const char *value)
{
if (!strcmp(var, "showbranch.default")) {
+ if (!value)
+ return config_error_nonbool(var);
if (default_alloc <= default_num + 1) {
default_alloc = default_alloc * 3 / 2 + 20;
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
diff --git a/builtin-tag.c b/builtin-tag.c
index 03e70155f..4a4a88c10 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -258,7 +258,7 @@ static int git_tag_config(const char *var, const char *value)
{
if (!strcmp(var, "user.signingkey")) {
if (!value)
- die("user.signingkey without value");
+ return config_error_nonbool(value);
set_signingkey(value);
return 0;
}
diff --git a/builtin-update-index.c b/builtin-update-index.c
index e1a938d89..c3a14c74e 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -738,7 +738,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
get_index_file(), strerror(lock_error));
}
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_locked_index(lock_file))
+ commit_locked_index(lock_file))
die("Unable to write new index file");
}
diff --git a/builtin-write-tree.c b/builtin-write-tree.c
index b89d02efe..d16b9ed00 100644
--- a/builtin-write-tree.c
+++ b/builtin-write-tree.c
@@ -35,11 +35,9 @@ int write_tree(unsigned char *sha1, int missing_ok, const char *prefix)
missing_ok, 0) < 0)
die("git-write-tree: error building trees");
if (0 <= newfd) {
- if (!write_cache(newfd, active_cache, active_nr)
- && !close(newfd)) {
- commit_lock_file(lock_file);
+ if (!write_cache(newfd, active_cache, active_nr) &&
+ !commit_lock_file(lock_file))
newfd = -1;
- }
}
/* Not being able to write is fine -- we are only interested
* in updating the cache-tree part, and if the next caller
@@ -60,8 +58,7 @@ int write_tree(unsigned char *sha1, int missing_ok, const char *prefix)
hashcpy(sha1, active_cache_tree->sha1);
if (0 <= newfd)
- close(newfd);
- rollback_lock_file(lock_file);
+ rollback_lock_file(lock_file);
return 0;
}
diff --git a/bundle.c b/bundle.c
index 9b9b9166d..5c95eca07 100644
--- a/bundle.c
+++ b/bundle.c
@@ -48,7 +48,7 @@ int read_bundle_header(const char *path, struct bundle_header *header)
: &header->references;
char delim;
- if (buffer[len - 1] == '\n')
+ if (len && buffer[len - 1] == '\n')
buffer[len - 1] = '\0';
if (get_sha1_hex(buffer + offset, sha1)) {
warning("unrecognized header: %s", buffer);
@@ -317,19 +317,25 @@ int create_bundle(struct bundle_header *header, const char *path,
rls.git_cmd = 1;
if (start_command(&rls))
return error("Could not spawn pack-objects");
+
+ /*
+ * start_command closed bundle_fd if it was > 1
+ * so set the lock fd to -1 so commit_lock_file()
+ * won't fail trying to close it.
+ */
+ lock.fd = -1;
+
for (i = 0; i < revs.pending.nr; i++) {
struct object *object = revs.pending.objects[i].item;
if (object->flags & UNINTERESTING)
- write(rls.in, "^", 1);
- write(rls.in, sha1_to_hex(object->sha1), 40);
- write(rls.in, "\n", 1);
+ write_or_die(rls.in, "^", 1);
+ write_or_die(rls.in, sha1_to_hex(object->sha1), 40);
+ write_or_die(rls.in, "\n", 1);
}
if (finish_command(&rls))
return error ("pack-objects died");
- close(bundle_fd);
- if (!bundle_to_stdout)
- commit_lock_file(&lock);
- return 0;
+
+ return bundle_to_stdout ? close(bundle_fd) : commit_lock_file(&lock);
}
int unbundle(struct bundle_header *header, int bundle_fd)
diff --git a/cache.h b/cache.h
index 39331c28b..6abcee437 100644
--- a/cache.h
+++ b/cache.h
@@ -308,7 +308,7 @@ extern int commit_lock_file(struct lock_file *);
extern int hold_locked_index(struct lock_file *, int);
extern int commit_locked_index(struct lock_file *);
extern void set_alternate_index_output(const char *);
-
+extern int close_lock_file(struct lock_file *);
extern void rollback_lock_file(struct lock_file *);
extern int delete_ref(const char *, const unsigned char *sha1);
@@ -561,6 +561,7 @@ extern struct packed_git *find_sha1_pack(const unsigned char *sha1,
extern void pack_report(void);
extern int open_pack_index(struct packed_git *);
extern unsigned char* use_pack(struct packed_git *, struct pack_window **, off_t, unsigned int *);
+extern void close_pack_windows(struct packed_git *);
extern void unuse_pack(struct pack_window **);
extern struct packed_git *add_packed_git(const char *, int, int);
extern const unsigned char *nth_packed_object_sha1(struct packed_git *, uint32_t);
@@ -588,6 +589,7 @@ extern int git_config_set_multivar(const char *, const char *, const char *, int
extern int git_config_rename_section(const char *, const char *);
extern const char *git_etc_gitconfig(void);
extern int check_repository_format_version(const char *var, const char *value);
+extern int config_error_nonbool(const char *);
#define MAX_GITNAME (1000)
extern char git_default_email[MAX_GITNAME];
diff --git a/color.c b/color.c
index 7f66c29fa..cb7034042 100644
--- a/color.c
+++ b/color.c
@@ -17,7 +17,7 @@ static int parse_color(const char *name, int len)
return i - 1;
}
i = strtol(name, &end, 10);
- if (*name && !*end && i >= -1 && i <= 255)
+ if (end - name == len && i >= -1 && i <= 255)
return i;
return -2;
}
diff --git a/combine-diff.c b/combine-diff.c
index e22db8993..0e19cbaac 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -646,12 +646,19 @@ static void reuse_combine_diff(struct sline *sline, unsigned long cnt,
sline->p_lno[i] = sline->p_lno[j];
}
-static void dump_quoted_path(const char *prefix, const char *path,
+static void dump_quoted_path(const char *head,
+ const char *prefix,
+ const char *path,
const char *c_meta, const char *c_reset)
{
- printf("%s%s", c_meta, prefix);
- quote_c_style(path, NULL, stdout, 0);
- printf("%s\n", c_reset);
+ static struct strbuf buf = STRBUF_INIT;
+
+ strbuf_reset(&buf);
+ strbuf_addstr(&buf, c_meta);
+ strbuf_addstr(&buf, head);
+ quote_two_c_style(&buf, prefix, path, 0);
+ strbuf_addstr(&buf, c_reset);
+ puts(buf.buf);
}
static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
@@ -793,7 +800,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
if (rev->loginfo && !rev->no_commit_id)
show_log(rev, opt->msg_sep);
dump_quoted_path(dense ? "diff --cc " : "diff --combined ",
- elem->path, c_meta, c_reset);
+ "", elem->path, c_meta, c_reset);
printf("%sindex ", c_meta);
for (i = 0; i < num_parent; i++) {
abb = find_unique_abbrev(elem->parent[i].sha1,
@@ -829,14 +836,19 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
printf("%s\n", c_reset);
}
if (added)
- dump_quoted_path("--- /dev/", "null", c_meta, c_reset);
+ dump_quoted_path("--- ", "", "/dev/null",
+ c_meta, c_reset);
else
- dump_quoted_path("--- a/", elem->path, c_meta, c_reset);
+ dump_quoted_path("--- ", opt->a_prefix, elem->path,
+ c_meta, c_reset);
if (deleted)
- dump_quoted_path("+++ /dev/", "null", c_meta, c_reset);
+ dump_quoted_path("+++ ", "", "/dev/null",
+ c_meta, c_reset);
else
- dump_quoted_path("+++ b/", elem->path, c_meta, c_reset);
- dump_sline(sline, cnt, num_parent, DIFF_OPT_TST(opt, COLOR_DIFF));
+ dump_quoted_path("+++ ", opt->b_prefix, elem->path,
+ c_meta, c_reset);
+ dump_sline(sline, cnt, num_parent,
+ DIFF_OPT_TST(opt, COLOR_DIFF));
}
free(result);
diff --git a/command-list.txt b/command-list.txt
index 6c2b1d830..3583a33ee 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -91,6 +91,7 @@ git-reflog ancillarymanipulators
git-relink ancillarymanipulators
git-remote ancillarymanipulators
git-repack ancillarymanipulators
+git-repo-config ancillarymanipulators deprecated
git-request-pull foreignscminterface
git-rerere ancillaryinterrogators
git-reset mainporcelain common
diff --git a/commit.c b/commit.c
index f074811ed..8b8fb04d1 100644
--- a/commit.c
+++ b/commit.c
@@ -48,19 +48,32 @@ struct commit *lookup_commit(const unsigned char *sha1)
return check_commit(obj, sha1, 0);
}
-static unsigned long parse_commit_date(const char *buf)
+static unsigned long parse_commit_date(const char *buf, const char *tail)
{
unsigned long date;
+ const char *dateptr;
+ if (buf + 6 >= tail)
+ return 0;
if (memcmp(buf, "author", 6))
return 0;
- while (*buf++ != '\n')
+ while (buf < tail && *buf++ != '\n')
/* nada */;
+ if (buf + 9 >= tail)
+ return 0;
if (memcmp(buf, "committer", 9))
return 0;
- while (*buf++ != '>')
+ while (buf < tail && *buf++ != '>')
/* nada */;
- date = strtoul(buf, NULL, 10);
+ if (buf >= tail)
+ return 0;
+ dateptr = buf;
+ while (buf < tail && *buf++ != '\n')
+ /* nada */;
+ if (buf >= tail)
+ return 0;
+ /* dateptr < buf && buf[-1] == '\n', so strtoul will stop at buf-1 */
+ date = strtoul(dateptr, NULL, 10);
if (date == ULONG_MAX)
date = 0;
return date;
@@ -236,9 +249,9 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
return 0;
item->object.parsed = 1;
tail += size;
- if (tail <= bufptr + 5 || memcmp(bufptr, "tree ", 5))
+ if (tail <= bufptr + 46 || memcmp(bufptr, "tree ", 5) || bufptr[45] != '\n')
return error("bogus commit object %s", sha1_to_hex(item->object.sha1));
- if (tail <= bufptr + 45 || get_sha1_hex(bufptr + 5, parent) < 0)
+ if (get_sha1_hex(bufptr + 5, parent) < 0)
return error("bad tree pointer in commit %s",
sha1_to_hex(item->object.sha1));
item->tree = lookup_tree(parent);
@@ -275,7 +288,7 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
n_refs++;
}
}
- item->date = parse_commit_date(bufptr);
+ item->date = parse_commit_date(bufptr, tail);
if (track_object_refs) {
unsigned i = 0;
diff --git a/config.c b/config.c
index 9a5c5470c..3e72778e9 100644
--- a/config.c
+++ b/config.c
@@ -13,6 +13,7 @@
static FILE *config_file;
static const char *config_file_name;
static int config_linenr;
+static int config_file_eof;
static int zlib_compression_seen;
static int get_next_char(void)
@@ -34,7 +35,7 @@ static int get_next_char(void)
if (c == '\n')
config_linenr++;
if (c == EOF) {
- config_file = NULL;
+ config_file_eof = 1;
c = '\n';
}
}
@@ -118,7 +119,7 @@ static int get_value(config_fn_t fn, char *name, unsigned int len)
/* Get the full name */
for (;;) {
c = get_next_char();
- if (c == EOF)
+ if (config_file_eof)
break;
if (!iskeychar(c))
break;
@@ -182,7 +183,7 @@ static int get_base_var(char *name)
for (;;) {
int c = get_next_char();
- if (c == EOF)
+ if (config_file_eof)
return -1;
if (c == ']')
return baselen;
@@ -205,8 +206,7 @@ static int git_parse_file(config_fn_t fn)
for (;;) {
int c = get_next_char();
if (c == '\n') {
- /* EOF? */
- if (!config_file)
+ if (config_file_eof)
return 0;
comment = 0;
continue;
@@ -234,17 +234,23 @@ static int git_parse_file(config_fn_t fn)
die("bad config file line %d in %s", config_linenr, config_file_name);
}
-static unsigned long get_unit_factor(const char *end)
+static int parse_unit_factor(const char *end, unsigned long *val)
{
if (!*end)
return 1;
- else if (!strcasecmp(end, "k"))
- return 1024;
- else if (!strcasecmp(end, "m"))
- return 1024 * 1024;
- else if (!strcasecmp(end, "g"))
- return 1024 * 1024 * 1024;
- die("unknown unit: '%s'", end);
+ else if (!strcasecmp(end, "k")) {
+ *val *= 1024;
+ return 1;
+ }
+ else if (!strcasecmp(end, "m")) {
+ *val *= 1024 * 1024;
+ return 1;
+ }
+ else if (!strcasecmp(end, "g")) {
+ *val *= 1024 * 1024 * 1024;
+ return 1;
+ }
+ return 0;
}
int git_parse_long(const char *value, long *ret)
@@ -252,7 +258,10 @@ int git_parse_long(const char *value, long *ret)
if (value && *value) {
char *end;
long val = strtol(value, &end, 0);
- *ret = val * get_unit_factor(end);
+ unsigned long factor = 1;
+ if (!parse_unit_factor(end, &factor))
+ return 0;
+ *ret = val * factor;
return 1;
}
return 0;
@@ -263,7 +272,9 @@ int git_parse_ulong(const char *value, unsigned long *ret)
if (value && *value) {
char *end;
unsigned long val = strtoul(value, &end, 0);
- *ret = val * get_unit_factor(end);
+ if (!parse_unit_factor(end, &val))
+ return 0;
+ *ret = val;
return 1;
}
return 0;
@@ -397,21 +408,29 @@ int git_default_config(const char *var, const char *value)
}
if (!strcmp(var, "user.name")) {
+ if (!value)
+ return config_error_nonbool(var);
strlcpy(git_default_name, value, sizeof(git_default_name));
return 0;
}
if (!strcmp(var, "user.email")) {
+ if (!value)
+ return config_error_nonbool(var);
strlcpy(git_default_email, value, sizeof(git_default_email));
return 0;
}
if (!strcmp(var, "i18n.commitencoding")) {
+ if (!value)
+ return config_error_nonbool(var);
git_commit_encoding = xstrdup(value);
return 0;
}
if (!strcmp(var, "i18n.logoutputencoding")) {
+ if (!value)
+ return config_error_nonbool(var);
git_log_output_encoding = xstrdup(value);
return 0;
}
@@ -423,23 +442,29 @@ int git_default_config(const char *var, const char *value)
}
if (!strcmp(var, "core.pager")) {
+ if (!value)
+ return config_error_nonbool(var);
pager_program = xstrdup(value);
return 0;
}
if (!strcmp(var, "core.editor")) {
+ if (!value)
+ return config_error_nonbool(var);
editor_program = xstrdup(value);
return 0;
}
if (!strcmp(var, "core.excludesfile")) {
if (!value)
- die("core.excludesfile without value");
+ return config_error_nonbool(var);
excludes_file = xstrdup(value);
return 0;
}
if (!strcmp(var, "core.whitespace")) {
+ if (!value)
+ return config_error_nonbool(var);
whitespace_rule_cfg = parse_whitespace_rule(value);
return 0;
}
@@ -458,6 +483,7 @@ int git_config_from_file(config_fn_t fn, const char *filename)
config_file = f;
config_file_name = filename;
config_linenr = 1;
+ config_file_eof = 0;
ret = git_parse_file(fn);
fclose(f);
config_file_name = NULL;
@@ -472,9 +498,9 @@ const char *git_etc_gitconfig(void)
system_wide = ETC_GITCONFIG;
if (!is_absolute_path(system_wide)) {
/* interpret path relative to exec-dir */
- const char *exec_path = git_exec_path();
- system_wide = prefix_path(exec_path, strlen(exec_path),
- system_wide);
+ struct strbuf d = STRBUF_INIT;
+ strbuf_addf(&d, "%s/%s", git_exec_path(), system_wide);
+ system_wide = strbuf_detach(&d, NULL);
}
}
return system_wide;
@@ -689,12 +715,17 @@ static ssize_t find_beginning_of_line(const char* contents, size_t size,
size_t equal_offset = size, bracket_offset = size;
ssize_t offset;
+contline:
for (offset = offset_-2; offset > 0
&& contents[offset] != '\n'; offset--)
switch (contents[offset]) {
case '=': equal_offset = offset; break;
case ']': bracket_offset = offset; break;
}
+ if (offset > 0 && contents[offset-1] == '\\') {
+ offset_ = offset;
+ goto contline;
+ }
if (bracket_offset < equal_offset) {
*found_bracket = 1;
offset = bracket_offset+1;
@@ -907,6 +938,9 @@ int git_config_set_multivar(const char* key, const char* value,
contents, contents_sz,
store.offset[i]-2, &new_line);
+ if (copy_end > 0 && contents[copy_end-1] != '\n')
+ new_line = 1;
+
/* write the first part of the config */
if (copy_end > copy_begin) {
if (write_in_full(fd, contents + copy_begin,
@@ -940,14 +974,12 @@ int git_config_set_multivar(const char* key, const char* value,
munmap(contents, contents_sz);
}
- if (close(fd) || commit_lock_file(lock) < 0) {
+ if (commit_lock_file(lock) < 0) {
fprintf(stderr, "Cannot commit config file!\n");
ret = 4;
goto out_free;
}
- /* fd is closed, so don't try to close it below. */
- fd = -1;
/*
* lock is committed, so don't try to roll it back below.
* NOTE: Since lockfile.c keeps a linked list of all created
@@ -958,8 +990,6 @@ int git_config_set_multivar(const char* key, const char* value,
ret = 0;
out_free:
- if (0 <= fd)
- close(fd);
if (lock)
rollback_lock_file(lock);
free(config_filename);
@@ -1057,9 +1087,18 @@ int git_config_rename_section(const char *old_name, const char *new_name)
}
fclose(config_file);
unlock_and_out:
- if (close(out_fd) || commit_lock_file(lock) < 0)
+ if (commit_lock_file(lock) < 0)
ret = error("Cannot commit config file!");
out:
free(config_filename);
return ret;
}
+
+/*
+ * Call this to report error for your variable that should not
+ * get a boolean value (i.e. "[my] var" means "true").
+ */
+int config_error_nonbool(const char *var)
+{
+ return error("Missing value for '%s'", var);
+}
diff --git a/config.mak.in b/config.mak.in
index 15fb26cb9..ee6c33df0 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -30,6 +30,7 @@ NO_CURL=@NO_CURL@
NO_EXPAT=@NO_EXPAT@
NEEDS_LIBICONV=@NEEDS_LIBICONV@
NEEDS_SOCKET=@NEEDS_SOCKET@
+NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@
NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@
@@ -40,6 +41,7 @@ NO_MEMMEM=@NO_MEMMEM@
NO_STRLCPY=@NO_STRLCPY@
NO_STRTOUMAX=@NO_STRTOUMAX@
NO_SETENV=@NO_SETENV@
+NO_UNSETENV=@NO_UNSETENV@
NO_MKDTEMP=@NO_MKDTEMP@
NO_ICONV=@NO_ICONV@
OLD_ICONV=@OLD_ICONV@
diff --git a/configure.ac b/configure.ac
index 6f641e32f..85d7ef570 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,12 @@ test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
## Checks for header files.
AC_MSG_NOTICE([CHECKS for header files])
#
+# Define NO_SYS_SELECT_H if you don't have sys/select.h.
+AC_CHECK_HEADER([sys/select.h],
+[NO_SYS_SELECT_H=],
+[NO_SYS_SELECT_H=UnfortunatelyYes])
+AC_SUBST(NO_SYS_SELECT_H)
+#
# Define OLD_ICONV if your library has an old iconv(), where the second
# (input buffer pointer) parameter is declared with type (const char **).
AC_DEFUN([OLDICONVTEST_SRC], [[
@@ -356,6 +362,12 @@ AC_CHECK_FUNC(setenv,
[NO_SETENV=YesPlease])
AC_SUBST(NO_SETENV)
#
+# Define NO_UNSETENV if you don't have unsetenv in the C library.
+AC_CHECK_FUNC(unsetenv,
+[NO_UNSETENV=],
+[NO_UNSETENV=YesPlease])
+AC_SUBST(NO_UNSETENV)
+#
# Define NO_MKDTEMP if you don't have mkdtemp in the C library.
AC_CHECK_FUNC(mkdtemp,
[NO_MKDTEMP=],
diff --git a/connect.c b/connect.c
index 3aefd4ace..71597d492 100644
--- a/connect.c
+++ b/connect.c
@@ -370,6 +370,8 @@ static int git_proxy_command_options(const char *var, const char *value)
if (git_proxy_command)
return 0;
+ if (!value)
+ return config_error_nonbool(var);
/* [core]
* ;# matches www.kernel.org as well
* gitproxy = netcatter-1 for kernel.org
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 343364de0..4ea727b14 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -64,12 +64,41 @@ __gitdir ()
__git_ps1 ()
{
- local b="$(git symbolic-ref HEAD 2>/dev/null)"
- if [ -n "$b" ]; then
+ local g="$(git rev-parse --git-dir 2>/dev/null)"
+ if [ -n "$g" ]; then
+ local r
+ local b
+ if [ -d "$g/../.dotest" ]
+ then
+ r="|AM/REBASE"
+ b="$(git symbolic-ref HEAD 2>/dev/null)"
+ elif [ -f "$g/.dotest-merge/interactive" ]
+ then
+ r="|REBASE-i"
+ b="$(cat $g/.dotest-merge/head-name)"
+ elif [ -d "$g/.dotest-merge" ]
+ then
+ r="|REBASE-m"
+ b="$(cat $g/.dotest-merge/head-name)"
+ elif [ -f "$g/MERGE_HEAD" ]
+ then
+ r="|MERGING"
+ b="$(git symbolic-ref HEAD 2>/dev/null)"
+ else
+ if [ -f $g/BISECT_LOG ]
+ then
+ r="|BISECTING"
+ fi
+ if ! b="$(git symbolic-ref HEAD 2>/dev/null)"
+ then
+ b="$(cut -c1-7 $g/HEAD)..."
+ fi
+ fi
+
if [ -n "$1" ]; then
- printf "$1" "${b##refs/heads/}"
+ printf "$1" "${b##refs/heads/}$r"
else
- printf " (%s)" "${b##refs/heads/}"
+ printf " (%s)" "${b##refs/heads/}$r"
fi
fi
}
@@ -333,7 +362,7 @@ __git_commands ()
read-tree) : plumbing;;
receive-pack) : plumbing;;
reflog) : plumbing;;
- repo-config) : plumbing;;
+ repo-config) : deprecated;;
rerere) : plumbing;;
rev-list) : plumbing;;
rev-parse) : plumbing;;
@@ -970,18 +999,18 @@ _git_remote ()
while [ $c -lt $COMP_CWORD ]; do
i="${COMP_WORDS[c]}"
case "$i" in
- add|show|prune|update) command="$i"; break ;;
+ add|rm|show|prune|update) command="$i"; break ;;
esac
c=$((++c))
done
if [ $c -eq $COMP_CWORD -a -z "$command" ]; then
- __gitcomp "add show prune update"
+ __gitcomp "add rm show prune update"
return
fi
case "$command" in
- show|prune)
+ rm|show|prune)
__gitcomp "$(__git_remotes)"
;;
update)
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
index bb671d561..9f92cd250 100644
--- a/contrib/emacs/git-blame.el
+++ b/contrib/emacs/git-blame.el
@@ -105,6 +105,13 @@ selected element from l."
(setq ,l (remove e ,l))
e))
+(defvar git-blame-log-oneline-format
+ "format:[%cr] %cn: %s"
+ "*Formatting option used for describing current line in the minibuffer.
+
+This option is used to pass to git log --pretty= command-line option,
+and describe which commit the current line was made.")
+
(defvar git-blame-dark-colors
(git-blame-color-scale "0c" "04" "24" "1c" "2c" "34" "14" "3c")
"*List of colors (format #RGB) to use in a dark environment.
@@ -371,7 +378,8 @@ See also function `git-blame-mode'."
(defun git-describe-commit (hash)
(with-temp-buffer
(call-process "git" nil t nil
- "log" "-1" "--pretty=oneline"
+ "log" "-1"
+ (concat "--pretty=" git-blame-log-oneline-format)
hash)
(buffer-substring (point-min) (1- (point-max)))))
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index 28a4899a0..a8bf0ef88 100644
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
@@ -35,7 +35,6 @@
;;
;; TODO
;; - portability to XEmacs
-;; - better handling of subprocess errors
;; - diff against other branch
;; - renaming files from the status buffer
;; - creating tags
@@ -191,6 +190,18 @@ if there is already one that displays the same directory."
(append (git-get-env-strings env) (list "git") args))
(apply #'call-process "git" nil buffer nil args)))
+(defun git-call-process-display-error (&rest args)
+ "Wrapper for call-process that displays error messages."
+ (let* ((dir default-directory)
+ (buffer (get-buffer-create "*Git Command Output*"))
+ (ok (with-current-buffer buffer
+ (let ((default-directory dir)
+ (buffer-read-only nil))
+ (erase-buffer)
+ (eq 0 (apply 'call-process "git" nil (list buffer t) nil args))))))
+ (unless ok (display-message-or-buffer buffer))
+ ok))
+
(defun git-call-process-env-string (env &rest args)
"Wrapper for call-process that sets environment strings,
and returns the process output as a string."
@@ -377,7 +388,7 @@ and returns the process output as a string."
(when reason
(push reason args)
(push "-m" args))
- (eq 0 (apply #'git-call-process-env nil nil "update-ref" args))))
+ (apply 'git-call-process-display-error "update-ref" args)))
(defun git-read-tree (tree &optional index-file)
"Read a tree into the index file."
@@ -489,8 +500,7 @@ and returns the process output as a string."
"Set the state of a file info."
(unless (eq (git-fileinfo->state info) state)
(setf (git-fileinfo->state info) state
- (git-fileinfo->old-perm info) 0
- (git-fileinfo->new-perm info) 0
+ (git-fileinfo->new-perm info) (git-fileinfo->old-perm info)
(git-fileinfo->rename-state info) nil
(git-fileinfo->orig-name info) nil
(git-fileinfo->needs-refresh info) t)))
@@ -524,6 +534,7 @@ and returns the process output as a string."
(?A 'added)
(?D 'deleted)
(?U 'unmerged)
+ (?T 'modified)
(t nil)))
(defun git-status-code-as-string (code)
@@ -538,6 +549,36 @@ and returns the process output as a string."
('ignored (propertize "Ignored " 'face 'git-ignored-face))
(t "? ")))
+(defun git-file-type-as-string (old-perm new-perm)
+ "Return a string describing the file type based on its permissions."
+ (let* ((old-type (lsh (or old-perm 0) -9))
+ (new-type (lsh (or new-perm 0) -9))
+ (str (case new-type
+ (?\100 ;; file
+ (case old-type
+ (?\100 nil)
+ (?\120 " (type change symlink -> file)")
+ (?\160 " (type change subproject -> file)")))
+ (?\120 ;; symlink
+ (case old-type
+ (?\100 " (type change file -> symlink)")
+ (?\160 " (type change subproject -> symlink)")
+ (t " (symlink)")))
+ (?\160 ;; subproject
+ (case old-type
+ (?\100 " (type change file -> subproject)")
+ (?\120 " (type change symlink -> subproject)")
+ (t " (subproject)")))
+ (?\110 nil) ;; directory (internal, not a real git state)
+ (?\000 ;; deleted or unknown
+ (case old-type
+ (?\120 " (symlink)")
+ (?\160 " (subproject)")))
+ (t (format " (unknown type %o)" new-type)))))
+ (cond (str (propertize str 'face 'git-status-face))
+ ((eq new-type ?\110) "/")
+ (t ""))))
+
(defun git-rename-as-string (info)
"Return a string describing the copy or rename associated with INFO, or an empty string if none."
(let ((state (git-fileinfo->rename-state info)))
@@ -563,11 +604,14 @@ and returns the process output as a string."
(defun git-fileinfo-prettyprint (info)
"Pretty-printer for the git-fileinfo structure."
- (insert (concat " " (if (git-fileinfo->marked info) (propertize "*" 'face 'git-mark-face) " ")
- " " (git-status-code-as-string (git-fileinfo->state info))
- " " (git-permissions-as-string (git-fileinfo->old-perm info) (git-fileinfo->new-perm info))
- " " (git-escape-file-name (git-fileinfo->name info))
- (git-rename-as-string info))))
+ (let ((old-perm (git-fileinfo->old-perm info))
+ (new-perm (git-fileinfo->new-perm info)))
+ (insert (concat " " (if (git-fileinfo->marked info) (propertize "*" 'face 'git-mark-face) " ")
+ " " (git-status-code-as-string (git-fileinfo->state info))
+ " " (git-permissions-as-string old-perm new-perm)
+ " " (git-escape-file-name (git-fileinfo->name info))
+ (git-file-type-as-string old-perm new-perm)
+ (git-rename-as-string info)))))
(defun git-insert-info-list (status infolist)
"Insert a list of file infos in the status buffer, replacing existing ones if any."
@@ -578,9 +622,8 @@ and returns the process output as a string."
(let ((info (pop infolist))
(node (ewoc-nth status 0)))
(while info
- (setf (git-fileinfo->needs-refresh info) t)
(cond ((not node)
- (ewoc-enter-last status info)
+ (setq node (ewoc-enter-last status info))
(setq info (pop infolist)))
((string-lessp (git-fileinfo->name (ewoc-data node))
(git-fileinfo->name info))
@@ -589,21 +632,23 @@ and returns the process output as a string."
(git-fileinfo->name info))
;; preserve the marked flag
(setf (git-fileinfo->marked info) (git-fileinfo->marked (ewoc-data node)))
+ (setf (git-fileinfo->needs-refresh info) t)
(setf (ewoc-data node) info)
(setq info (pop infolist)))
(t
- (ewoc-enter-before status node info)
+ (setq node (ewoc-enter-before status node info))
(setq info (pop infolist)))))))
(defun git-run-diff-index (status files)
"Run git-diff-index on FILES and parse the results into STATUS.
Return the list of files that haven't been handled."
- (let (infolist)
+ (let ((remaining (copy-sequence files))
+ infolist)
(with-temp-buffer
(apply #'git-call-process-env t nil "diff-index" "-z" "-M" "HEAD" "--" files)
(goto-char (point-min))
(while (re-search-forward
- ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMU]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
+ ":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
nil t 1)
(let ((old-perm (string-to-number (match-string 1) 8))
(new-perm (string-to-number (match-string 2) 8))
@@ -616,10 +661,10 @@ Return the list of files that haven't been handled."
(push (git-create-fileinfo 'deleted name 0 0 'rename new-name) infolist)
(push (git-create-fileinfo 'added new-name old-perm new-perm 'rename name) infolist))
(push (git-create-fileinfo (git-state-code state) name old-perm new-perm) infolist))
- (setq files (delete name files))
- (when new-name (setq files (delete new-name files))))))
+ (setq remaining (delete name remaining))
+ (when new-name (setq remaining (delete new-name remaining))))))
(git-insert-info-list status infolist)
- files))
+ remaining))
(defun git-find-status-file (status file)
"Find a given file in the status ewoc and return its node."
@@ -635,13 +680,32 @@ Return the list of files that haven't been handled."
(with-temp-buffer
(apply #'git-call-process-env t nil "ls-files" "-z" (append options (list "--") files))
(goto-char (point-min))
- (while (re-search-forward "\\([^\0]*\\)\0" nil t 1)
+ (while (re-search-forward "\\([^\0]*?\\)\\(/?\\)\0" nil t 1)
(let ((name (match-string 1)))
- (push (git-create-fileinfo default-state name) infolist)
+ (push (git-create-fileinfo default-state name 0
+ (if (string-equal "/" (match-string 2)) (lsh ?\110 9) 0))
+ infolist)
(setq files (delete name files)))))
(git-insert-info-list status infolist)
files))
+(defun git-run-ls-files-cached (status files default-state)
+ "Run git-ls-files -c on FILES and parse the results into STATUS.
+Return the list of files that haven't been handled."
+ (let ((remaining (copy-sequence files))
+ infolist)
+ (with-temp-buffer
+ (apply #'git-call-process-env t nil "ls-files" "-z" "-s" "-c" "--" files)
+ (goto-char (point-min))
+ (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
+ (let* ((new-perm (string-to-number (match-string 1) 8))
+ (old-perm (if (eq default-state 'added) 0 new-perm))
+ (name (match-string 2)))
+ (push (git-create-fileinfo default-state name old-perm new-perm) infolist)
+ (setq remaining (delete name remaining)))))
+ (git-insert-info-list status infolist)
+ remaining))
+
(defun git-run-ls-unmerged (status files)
"Run git-ls-files -u on FILES and parse the results into STATUS."
(with-temp-buffer
@@ -665,18 +729,18 @@ Return the list of files that haven't been handled."
(defun git-run-ls-files-with-excludes (status files default-state &rest options)
"Run git-ls-files on FILES with appropriate --exclude-from options."
(let ((exclude-files (git-get-exclude-files)))
- (apply #'git-run-ls-files status files default-state
+ (apply #'git-run-ls-files status files default-state "--directory"
(concat "--exclude-per-directory=" git-per-dir-ignore-file)
(append options (mapcar (lambda (f) (concat "--exclude-from=" f)) exclude-files)))))
(defun git-update-status-files (files &optional default-state)
"Update the status of FILES from the index."
(unless git-status (error "Not in git-status buffer."))
- (unless files
- (when git-show-uptodate (git-run-ls-files git-status nil 'uptodate "-c")))
+ (when (or git-show-uptodate files)
+ (git-run-ls-files-cached git-status files 'uptodate))
(let* ((remaining-files
(if (git-empty-db-p) ; we need some special handling for an empty db
- (git-run-ls-files git-status files 'added "-c")
+ (git-run-ls-files-cached git-status files 'added)
(git-run-diff-index git-status files))))
(git-run-ls-unmerged git-status files)
(when (or remaining-files (and git-show-unknown (not files)))
@@ -687,6 +751,27 @@ Return the list of files that haven't been handled."
(git-refresh-files)
(git-refresh-ewoc-hf git-status)))
+(defun git-mark-files (status files)
+ "Mark all the specified FILES, and unmark the others."
+ (setq files (sort files #'string-lessp))
+ (let ((file (and files (pop files)))
+ (node (ewoc-nth status 0)))
+ (while node
+ (let ((info (ewoc-data node)))
+ (if (and file (string-equal (git-fileinfo->name info) file))
+ (progn
+ (unless (git-fileinfo->marked info)
+ (setf (git-fileinfo->marked info) t)
+ (setf (git-fileinfo->needs-refresh info) t))
+ (setq file (pop files))
+ (setq node (ewoc-next status node)))
+ (when (git-fileinfo->marked info)
+ (setf (git-fileinfo->marked info) nil)
+ (setf (git-fileinfo->needs-refresh info) t))
+ (if (and file (string-lessp file (git-fileinfo->name info)))
+ (setq file (pop files))
+ (setq node (ewoc-next status node))))))))
+
(defun git-marked-files ()
"Return a list of all marked files, or if none a list containing just the file at cursor position."
(unless git-status (error "Not in git-status buffer."))
@@ -792,16 +877,17 @@ Return the list of files that haven't been handled."
(if (or (not (string-equal tree head-tree))
(yes-or-no-p "The tree was not modified, do you really want to perform an empty commit? "))
(let ((commit (git-commit-tree buffer tree head)))
- (condition-case nil (delete-file ".git/MERGE_HEAD") (error nil))
- (condition-case nil (delete-file ".git/MERGE_MSG") (error nil))
- (with-current-buffer buffer (erase-buffer))
- (dolist (info files) (git-set-fileinfo-state info 'uptodate))
- (git-call-process-env nil nil "rerere")
- (git-call-process-env nil nil "gc" "--auto")
- (git-refresh-files)
- (git-refresh-ewoc-hf git-status)
- (message "Committed %s." commit)
- (git-run-hook "post-commit" nil))
+ (when commit
+ (condition-case nil (delete-file ".git/MERGE_HEAD") (error nil))
+ (condition-case nil (delete-file ".git/MERGE_MSG") (error nil))
+ (with-current-buffer buffer (erase-buffer))
+ (git-update-status-files (git-get-filenames files) 'uptodate)
+ (git-call-process-env nil nil "rerere")
+ (git-call-process-env nil nil "gc" "--auto")
+ (git-refresh-files)
+ (git-refresh-ewoc-hf git-status)
+ (message "Committed %s." commit)
+ (git-run-hook "post-commit" nil)))
(message "Commit aborted."))))
(message "No files to commit.")))
(delete-file index-file))))))
@@ -909,11 +995,12 @@ Return the list of files that haven't been handled."
"Add marked file(s) to the index cache."
(interactive)
(let ((files (git-get-filenames (git-marked-files-state 'unknown 'ignored))))
+ ;; FIXME: add support for directories
(unless files
(push (file-relative-name (read-file-name "File to add: " nil nil t)) files))
- (apply #'git-call-process-env nil nil "update-index" "--add" "--" files)
- (git-update-status-files files 'uptodate)
- (git-success-message "Added" files)))
+ (when (apply 'git-call-process-display-error "update-index" "--add" "--" files)
+ (git-update-status-files files 'uptodate)
+ (git-success-message "Added" files))))
(defun git-ignore-file ()
"Add marked file(s) to the ignore list."
@@ -935,16 +1022,19 @@ Return the list of files that haven't been handled."
(format "Remove %d file%s? " (length files) (if (> (length files) 1) "s" "")))
(progn
(dolist (name files)
- (when (file-exists-p name) (delete-file name)))
- (apply #'git-call-process-env nil nil "update-index" "--remove" "--" files)
- (git-update-status-files files nil)
- (git-success-message "Removed" files))
+ (ignore-errors
+ (if (file-directory-p name)
+ (delete-directory name)
+ (delete-file name))))
+ (when (apply 'git-call-process-display-error "update-index" "--remove" "--" files)
+ (git-update-status-files files nil)
+ (git-success-message "Removed" files)))
(message "Aborting"))))
(defun git-revert-file ()
"Revert changes to the marked file(s)."
(interactive)
- (let ((files (git-marked-files))
+ (let ((files (git-marked-files-state 'added 'deleted 'modified 'unmerged))
added modified)
(when (and files
(yes-or-no-p
@@ -955,21 +1045,31 @@ Return the list of files that haven't been handled."
('deleted (push (git-fileinfo->name info) modified))
('unmerged (push (git-fileinfo->name info) modified))
('modified (push (git-fileinfo->name info) modified))))
- (when added
- (apply #'git-call-process-env nil nil "update-index" "--force-remove" "--" added))
- (when modified
- (apply #'git-call-process-env nil nil "checkout" "HEAD" modified))
- (git-update-status-files (append added modified) 'uptodate)
- (git-success-message "Reverted" (git-get-filenames files)))))
+ ;; check if a buffer contains one of the files and isn't saved
+ (dolist (file modified)
+ (let ((buffer (get-file-buffer file)))
+ (when (and buffer (buffer-modified-p buffer))
+ (error "Buffer %s is modified. Please kill or save modified buffers before reverting." (buffer-name buffer)))))
+ (let ((ok (and
+ (or (not added)
+ (apply 'git-call-process-display-error "update-index" "--force-remove" "--" added))
+ (or (not modified)
+ (apply 'git-call-process-display-error "checkout" "HEAD" modified)))))
+ (git-update-status-files (append added modified) 'uptodate)
+ (when ok
+ (dolist (file modified)
+ (let ((buffer (get-file-buffer file)))
+ (when buffer (with-current-buffer buffer (revert-buffer t t t)))))
+ (git-success-message "Reverted" (git-get-filenames files)))))))
(defun git-resolve-file ()
"Resolve conflicts in marked file(s)."
(interactive)
(let ((files (git-get-filenames (git-marked-files-state 'unmerged))))
(when files
- (apply #'git-call-process-env nil nil "update-index" "--" files)
- (git-update-status-files files 'uptodate)
- (git-success-message "Resolved" files))))
+ (when (apply 'git-call-process-display-error "update-index" "--" files)
+ (git-update-status-files files 'uptodate)
+ (git-success-message "Resolved" files)))))
(defun git-remove-handled ()
"Remove handled files from the status list."
@@ -1015,6 +1115,16 @@ Return the list of files that haven't been handled."
(message "Inserting unknown files...done"))
(git-remove-handled)))
+(defun git-expand-directory (info)
+ "Expand the directory represented by INFO to list its files."
+ (when (eq (lsh (git-fileinfo->new-perm info) -9) ?\110)
+ (let ((dir (git-fileinfo->name info)))
+ (git-set-filenames-state git-status (list dir) nil)
+ (git-run-ls-files-with-excludes git-status (list (concat dir "/")) 'unknown "-o")
+ (git-refresh-files)
+ (git-refresh-ewoc-hf git-status)
+ t)))
+
(defun git-setup-diff-buffer (buffer)
"Setup a buffer for displaying a diff."
(let ((dir default-directory))
@@ -1024,7 +1134,9 @@ Return the list of files that haven't been handled."
(setq default-directory dir)
(setq buffer-read-only t)))
(display-buffer buffer)
- (shrink-window-if-larger-than-buffer))
+ ; shrink window only if it displays the status buffer
+ (when (eq (window-buffer) (current-buffer))
+ (shrink-window-if-larger-than-buffer)))
(defun git-diff-file ()
"Diff the marked file(s) against HEAD."
@@ -1097,6 +1209,11 @@ Return the list of files that haven't been handled."
(with-current-buffer log-edit-parent-buffer
(git-get-filenames (git-marked-files-state 'added 'deleted 'modified))))
+(defun git-log-edit-diff ()
+ "Run a diff of the current files being committed from a log-edit buffer."
+ (with-current-buffer log-edit-parent-buffer
+ (git-diff-file)))
+
(defun git-append-sign-off (name email)
"Append a Signed-off-by entry to the current buffer, avoiding duplicates."
(let ((sign-off (format "Signed-off-by: %s <%s>" name email))
@@ -1144,7 +1261,8 @@ Return the list of files that haven't been handled."
(goto-char (point-min))
(when (re-search-forward "\n+\\'" nil t)
(replace-match "\n" t t))
- (when sign-off (git-append-sign-off committer-name committer-email)))))
+ (when sign-off (git-append-sign-off committer-name committer-email)))
+ buffer))
(defun git-commit-file ()
"Commit the marked file(s), asking for a commit message."
@@ -1169,19 +1287,69 @@ Return the list of files that haven't been handled."
(when (re-search-forward "^Date: \\(.*\\)$" nil t)
(setq date (match-string 1)))))
(git-setup-log-buffer buffer author-name author-email subject date))
- (log-edit #'git-do-commit nil #'git-log-edit-files buffer)
+ (if (boundp 'log-edit-diff-function)
+ (log-edit 'git-do-commit nil '((log-edit-listfun . git-log-edit-files)
+ (log-edit-diff-function . git-log-edit-diff)) buffer)
+ (log-edit 'git-do-commit nil 'git-log-edit-files buffer))
(setq font-lock-keywords (font-lock-compile-keywords git-log-edit-font-lock-keywords))
(setq buffer-file-coding-system coding-system)
(re-search-forward (regexp-quote (concat git-log-msg-separator "\n")) nil t))))
+(defun git-setup-commit-buffer (commit)
+ "Setup the commit buffer with the contents of COMMIT."
+ (let (author-name author-email subject date msg)
+ (with-temp-buffer
+ (let ((coding-system (git-get-logoutput-coding-system)))
+ (git-call-process-env t nil "log" "-1" commit)
+ (goto-char (point-min))
+ (when (re-search-forward "^Author: *\\(.*\\) <\\(.*\\)>$" nil t)
+ (setq author-name (match-string 1))
+ (setq author-email (match-string 2)))
+ (when (re-search-forward "^Date: *\\(.*\\)$" nil t)
+ (setq date (match-string 1)))
+ (while (re-search-forward "^ \\(.*\\)$" nil t)
+ (push (match-string 1) msg))
+ (setq msg (nreverse msg))
+ (setq subject (pop msg))
+ (while (and msg (zerop (length (car msg))) (pop msg)))))
+ (git-setup-log-buffer (get-buffer-create "*git-commit*")
+ author-name author-email subject date
+ (mapconcat #'identity msg "\n"))))
+
+(defun git-get-commit-files (commit)
+ "Retrieve the list of files modified by COMMIT."
+ (let (files)
+ (with-temp-buffer
+ (git-call-process-env t nil "diff-tree" "-r" "-z" "--name-only" "--no-commit-id" commit)
+ (goto-char (point-min))
+ (while (re-search-forward "\\([^\0]*\\)\0" nil t 1)
+ (push (match-string 1) files)))
+ files))
+
+(defun git-amend-commit ()
+ "Undo the last commit on HEAD, and set things up to commit an
+amended version of it."
+ (interactive)
+ (unless git-status (error "Not in git-status buffer."))
+ (when (git-empty-db-p) (error "No commit to amend."))
+ (let* ((commit (git-rev-parse "HEAD"))
+ (files (git-get-commit-files commit)))
+ (when (git-call-process-display-error "reset" "--soft" "HEAD^")
+ (git-update-status-files (copy-sequence files) 'uptodate)
+ (git-mark-files git-status files)
+ (git-refresh-files)
+ (git-setup-commit-buffer commit)
+ (git-commit-file))))
+
(defun git-find-file ()
"Visit the current file in its own buffer."
(interactive)
(unless git-status (error "Not in git-status buffer."))
(let ((info (ewoc-data (ewoc-locate git-status))))
- (find-file (git-fileinfo->name info))
- (when (eq 'unmerged (git-fileinfo->state info))
- (smerge-mode 1))))
+ (unless (git-expand-directory info)
+ (find-file (git-fileinfo->name info))
+ (when (eq 'unmerged (git-fileinfo->state info))
+ (smerge-mode 1)))))
(defun git-find-file-other-window ()
"Visit the current file in its own buffer in another window."
@@ -1251,6 +1419,7 @@ Return the list of files that haven't been handled."
(unless git-status-mode-map
(let ((map (make-keymap))
+ (commit-map (make-sparse-keymap))
(diff-map (make-sparse-keymap))
(toggle-map (make-sparse-keymap)))
(suppress-keymap map)
@@ -1259,6 +1428,7 @@ Return the list of files that haven't been handled."
(define-key map " " 'git-next-file)
(define-key map "a" 'git-add-file)
(define-key map "c" 'git-commit-file)
+ (define-key map "\C-c" commit-map)
(define-key map "d" diff-map)
(define-key map "=" 'git-diff-file)
(define-key map "f" 'git-find-file)
@@ -1284,6 +1454,8 @@ Return the list of files that haven't been handled."
(define-key map "x" 'git-remove-handled)
(define-key map "\C-?" 'git-unmark-file-up)
(define-key map "\M-\C-?" 'git-unmark-all)
+ ; the commit submap
+ (define-key commit-map "\C-a" 'git-amend-commit)
; the diff submap
(define-key diff-map "b" 'git-diff-file-base)
(define-key diff-map "c" 'git-diff-file-combined)
diff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh
new file mode 100755
index 000000000..49f00321b
--- /dev/null
+++ b/contrib/examples/git-revert.sh
@@ -0,0 +1,197 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Linus Torvalds
+# Copyright (c) 2005 Junio C Hamano
+#
+
+case "$0" in
+*-revert* )
+ test -t 0 && edit=-e
+ replay=
+ me=revert
+ USAGE='[--edit | --no-edit] [-n] <commit-ish>' ;;
+*-cherry-pick* )
+ replay=t
+ edit=
+ me=cherry-pick
+ USAGE='[--edit] [-n] [-r] [-x] <commit-ish>' ;;
+* )
+ echo >&2 "What are you talking about?"
+ exit 1 ;;
+esac
+
+SUBDIRECTORY_OK=Yes ;# we will cd up
+. git-sh-setup
+require_work_tree
+cd_to_toplevel
+
+no_commit=
+while case "$#" in 0) break ;; esac
+do
+ case "$1" in
+ -n|--n|--no|--no-|--no-c|--no-co|--no-com|--no-comm|\
+ --no-commi|--no-commit)
+ no_commit=t
+ ;;
+ -e|--e|--ed|--edi|--edit)
+ edit=-e
+ ;;
+ --n|--no|--no-|--no-e|--no-ed|--no-edi|--no-edit)
+ edit=
+ ;;
+ -r)
+ : no-op ;;
+ -x|--i-really-want-to-expose-my-private-commit-object-name)
+ replay=
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+set_reflog_action "$me"
+
+test "$me,$replay" = "revert,t" && usage
+
+case "$no_commit" in
+t)
+ # We do not intend to commit immediately. We just want to
+ # merge the differences in.
+ head=$(git-write-tree) ||
+ die "Your index file is unmerged."
+ ;;
+*)
+ head=$(git-rev-parse --verify HEAD) ||
+ die "You do not have a valid HEAD"
+ files=$(git-diff-index --cached --name-only $head) || exit
+ if [ "$files" ]; then
+ die "Dirty index: cannot $me (dirty: $files)"
+ fi
+ ;;
+esac
+
+rev=$(git-rev-parse --verify "$@") &&
+commit=$(git-rev-parse --verify "$rev^0") ||
+ die "Not a single commit $@"
+prev=$(git-rev-parse --verify "$commit^1" 2>/dev/null) ||
+ die "Cannot run $me a root commit"
+git-rev-parse --verify "$commit^2" >/dev/null 2>&1 &&
+ die "Cannot run $me a multi-parent commit."
+
+encoding=$(git config i18n.commitencoding || echo UTF-8)
+
+# "commit" is an existing commit. We would want to apply
+# the difference it introduces since its first parent "prev"
+# on top of the current HEAD if we are cherry-pick. Or the
+# reverse of it if we are revert.
+
+case "$me" in
+revert)
+ git show -s --pretty=oneline --encoding="$encoding" $commit |
+ sed -e '
+ s/^[^ ]* /Revert "/
+ s/$/"/
+ '
+ echo
+ echo "This reverts commit $commit."
+ test "$rev" = "$commit" ||
+ echo "(original 'git revert' arguments: $@)"
+ base=$commit next=$prev
+ ;;
+
+cherry-pick)
+ pick_author_script='
+ /^author /{
+ s/'\''/'\''\\'\'\''/g
+ h
+ s/^author \([^<]*\) <[^>]*> .*$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_NAME='\''&'\''/p
+
+ g
+ s/^author [^<]* <\([^>]*\)> .*$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_EMAIL='\''&'\''/p
+
+ g
+ s/^author [^<]* <[^>]*> \(.*\)$/\1/
+ s/'\''/'\''\'\'\''/g
+ s/.*/GIT_AUTHOR_DATE='\''&'\''/p
+
+ q
+ }'
+
+ logmsg=`git show -s --pretty=raw --encoding="$encoding" "$commit"`
+ set_author_env=`echo "$logmsg" |
+ LANG=C LC_ALL=C sed -ne "$pick_author_script"`
+ eval "$set_author_env"
+ export GIT_AUTHOR_NAME
+ export GIT_AUTHOR_EMAIL
+ export GIT_AUTHOR_DATE
+
+ echo "$logmsg" |
+ sed -e '1,/^$/d' -e 's/^ //'
+ case "$replay" in
+ '')
+ echo "(cherry picked from commit $commit)"
+ test "$rev" = "$commit" ||
+ echo "(original 'git cherry-pick' arguments: $@)"
+ ;;
+ esac
+ base=$prev next=$commit
+ ;;
+
+esac >.msg
+
+eval GITHEAD_$head=HEAD
+eval GITHEAD_$next='`git show -s \
+ --pretty=oneline --encoding="$encoding" "$commit" |
+ sed -e "s/^[^ ]* //"`'
+export GITHEAD_$head GITHEAD_$next
+
+# This three way merge is an interesting one. We are at
+# $head, and would want to apply the change between $commit
+# and $prev on top of us (when reverting), or the change between
+# $prev and $commit on top of us (when cherry-picking or replaying).
+
+git-merge-recursive $base -- $head $next &&
+result=$(git-write-tree 2>/dev/null) || {
+ mv -f .msg "$GIT_DIR/MERGE_MSG"
+ {
+ echo '
+Conflicts:
+'
+ git ls-files --unmerged |
+ sed -e 's/^[^ ]* / /' |
+ uniq
+ } >>"$GIT_DIR/MERGE_MSG"
+ echo >&2 "Automatic $me failed. After resolving the conflicts,"
+ echo >&2 "mark the corrected paths with 'git-add <paths>'"
+ echo >&2 "and commit the result."
+ case "$me" in
+ cherry-pick)
+ echo >&2 "You may choose to use the following when making"
+ echo >&2 "the commit:"
+ echo >&2 "$set_author_env"
+ esac
+ exit 1
+}
+echo >&2 "Finished one $me."
+
+# If we are cherry-pick, and if the merge did not result in
+# hand-editing, we will hit this commit and inherit the original
+# author date and name.
+# If we are revert, or if our cherry-pick results in a hand merge,
+# we had better say that the current user is responsible for that.
+
+case "$no_commit" in
+'')
+ git-commit -n -F .msg $edit
+ rm -f .msg
+ ;;
+esac
diff --git a/contrib/examples/git-tag.sh b/contrib/examples/git-tag.sh
index ae7c53166..e9f3a228a 100755
--- a/contrib/examples/git-tag.sh
+++ b/contrib/examples/git-tag.sh
@@ -167,7 +167,7 @@ type=$(git cat-file -t $object) || exit 1
tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
test -n "$username" ||
- username=$(git repo-config user.signingkey) ||
+ username=$(git config user.signingkey) ||
username=$(expr "z$tagger" : 'z\(.*>\)')
trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG "$GIT_DIR"/TAG_EDITMSG' 0
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index c80a6da25..781a0cbbb 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -469,9 +469,7 @@ class P4Submit(Command):
optparse.make_option("--origin", dest="origin"),
optparse.make_option("--reset", action="store_true", dest="reset"),
optparse.make_option("--log-substitutions", dest="substFile"),
- optparse.make_option("--dry-run", action="store_true"),
optparse.make_option("--direct", dest="directSubmit", action="store_true"),
- optparse.make_option("--trust-me-like-a-fool", dest="trustMeLikeAFool", action="store_true"),
optparse.make_option("-M", dest="detectRename", action="store_true"),
]
self.description = "Submit changes from git to the perforce depot."
@@ -479,12 +477,10 @@ class P4Submit(Command):
self.firstTime = True
self.reset = False
self.interactive = True
- self.dryRun = False
self.substFile = ""
self.firstTime = True
self.origin = ""
self.directSubmit = False
- self.trustMeLikeAFool = False
self.detectRename = False
self.verbose = False
self.isWindows = (platform.system() == "Windows")
@@ -681,57 +677,30 @@ class P4Submit(Command):
separatorLine += "\r"
separatorLine += "\n"
- response = "e"
- if self.trustMeLikeAFool:
- response = "y"
-
- firstIteration = True
- while response == "e":
- if not firstIteration:
- response = raw_input("Do you want to submit this change? [y]es/[e]dit/[n]o/[s]kip ")
- firstIteration = False
- if response == "e":
- [handle, fileName] = tempfile.mkstemp()
- tmpFile = os.fdopen(handle, "w+")
- tmpFile.write(submitTemplate + separatorLine + diff)
- tmpFile.close()
- defaultEditor = "vi"
- if platform.system() == "Windows":
- defaultEditor = "notepad"
- editor = os.environ.get("EDITOR", defaultEditor);
- system(editor + " " + fileName)
- tmpFile = open(fileName, "rb")
- message = tmpFile.read()
- tmpFile.close()
- os.remove(fileName)
- submitTemplate = message[:message.index(separatorLine)]
- if self.isWindows:
- submitTemplate = submitTemplate.replace("\r\n", "\n")
-
- if response == "y" or response == "yes":
- if self.dryRun:
- print submitTemplate
- raw_input("Press return to continue...")
- else:
- if self.directSubmit:
- print "Submitting to git first"
- os.chdir(self.oldWorkingDirectory)
- write_pipe("git commit -a -F -", submitTemplate)
- os.chdir(self.clientPath)
-
- write_pipe("p4 submit -i", submitTemplate)
- elif response == "s":
- for f in editedFiles:
- system("p4 revert \"%s\"" % f);
- for f in filesToAdd:
- system("p4 revert \"%s\"" % f);
- system("rm %s" %f)
- for f in filesToDelete:
- system("p4 delete \"%s\"" % f);
- return
- else:
- print "Not submitting!"
- self.interactive = False
+ [handle, fileName] = tempfile.mkstemp()
+ tmpFile = os.fdopen(handle, "w+")
+ tmpFile.write(submitTemplate + separatorLine + diff)
+ tmpFile.close()
+ defaultEditor = "vi"
+ if platform.system() == "Windows":
+ defaultEditor = "notepad"
+ editor = os.environ.get("EDITOR", defaultEditor);
+ system(editor + " " + fileName)
+ tmpFile = open(fileName, "rb")
+ message = tmpFile.read()
+ tmpFile.close()
+ os.remove(fileName)
+ submitTemplate = message[:message.index(separatorLine)]
+ if self.isWindows:
+ submitTemplate = submitTemplate.replace("\r\n", "\n")
+
+ if self.directSubmit:
+ print "Submitting to git first"
+ os.chdir(self.oldWorkingDirectory)
+ write_pipe("git commit -a -F -", submitTemplate)
+ os.chdir(self.clientPath)
+
+ write_pipe("p4 submit -i", submitTemplate)
else:
fileName = "submit.txt"
file = open(fileName, "w+")
@@ -828,10 +797,8 @@ class P4Submit(Command):
sync = P4Sync()
sync.run([])
- response = raw_input("Do you want to rebase current HEAD from Perforce now using git-p4 rebase? [y]es/[n]o ")
- if response == "y" or response == "yes":
- rebase = P4Rebase()
- rebase.rebase()
+ rebase = P4Rebase()
+ rebase.rebase()
os.remove(self.configFile)
return True
@@ -964,9 +931,13 @@ class P4Sync(Command):
stat = filedata[j]
j += 1
text = ''
- while j < len(filedata) and filedata[j]['code'] in ('text',
- 'binary'):
- text += filedata[j]['data']
+ while j < len(filedata) and filedata[j]['code'] in ('text', 'unicode', 'binary'):
+ tmp = filedata[j]['data']
+ if stat['type'] in ('text+ko', 'unicode+ko', 'binary+ko'):
+ tmp = re.sub(r'(?i)\$(Id|Header):[^$]*\$',r'$\1$', tmp)
+ elif stat['type'] in ('text+k', 'ktext', 'kxtext', 'unicode+k', 'binary+k'):
+ tmp = re.sub(r'(?i)\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$]*\$',r'$\1$', tmp)
+ text += tmp
j += 1
@@ -1640,6 +1611,11 @@ class P4Rebase(Command):
return self.rebase()
def rebase(self):
+ if os.system("git update-index --refresh") != 0:
+ die("Some files in your working directory are modified and different than what is in your index. You can use git update-index <filename> to bring the index up-to-date or stash away all your changes with git stash.");
+ if len(read_pipe("git diff-index HEAD --")) > 0:
+ die("You have uncommited changes. Please commit them before rebasing or stash them away with git stash.");
+
[upstream, settings] = findUpstreamBranchPoint()
if len(upstream) == 0:
die("Cannot find upstream branchpoint for rebase")
@@ -1670,7 +1646,7 @@ class P4Clone(P4Sync):
depotPath = args[0]
depotDir = re.sub("(@[^@]*)$", "", depotPath)
depotDir = re.sub("(#[^#]*)$", "", depotDir)
- depotDir = re.sub(r"\.\.\.$,", "", depotDir)
+ depotDir = re.sub(r"\.\.\.$", "", depotDir)
depotDir = re.sub(r"/$", "", depotDir)
return os.path.split(depotDir)[1]
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 9befb92c4..c35b15860 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -1,6 +1,6 @@
#! /usr/bin/python
-""" hg-to-svn.py - A Mercurial to GIT converter
+""" hg-to-git.py - A Mercurial to GIT converter
Copyright (C)2007 Stelian Pop <stelian@popies.net>
@@ -27,6 +27,8 @@ import re
hgvers = {}
# List of children for each hg revision
hgchildren = {}
+# List of parents for each hg revision
+hgparents = {}
# Current branch for each hg revision
hgbranch = {}
# Number of new changesets converted from hg
@@ -99,17 +101,19 @@ if state:
else:
print 'State does not exist, first run'
-tip = os.popen('hg tip | head -1 | cut -f 2 -d :').read().strip()
+tip = os.popen('hg tip --template "{rev}"').read()
print 'tip is', tip
# Calculate the branches
print 'analysing the branches...'
hgchildren["0"] = ()
+hgparents["0"] = (None, None)
hgbranch["0"] = "master"
for cset in range(1, int(tip) + 1):
hgchildren[str(cset)] = ()
- prnts = os.popen('hg log -r %d | grep ^parent: | cut -f 2 -d :' % cset).readlines()
- if len(prnts) > 0:
+ prnts = os.popen('hg log -r %d --template "{parents}"' % cset).read().split(' ')
+ prnts = map(lambda x: x[:x.find(':')], prnts)
+ if prnts[0] != '':
parent = prnts[0].strip()
else:
parent = str(cset - 1)
@@ -120,6 +124,8 @@ for cset in range(1, int(tip) + 1):
else:
mparent = None
+ hgparents[str(cset)] = (parent, mparent)
+
if mparent:
# For merge changesets, take either one, preferably the 'master' branch
if hgbranch[mparent] == 'master':
@@ -147,34 +153,27 @@ for cset in range(int(tip) + 1):
hgnewcsets += 1
# get info
- prnts = os.popen('hg log -r %d | grep ^parent: | cut -f 2 -d :' % cset).readlines()
- if len(prnts) > 0:
- parent = prnts[0].strip()
- else:
- parent = str(cset - 1)
- if len(prnts) > 1:
- mparent = prnts[1].strip()
- else:
- mparent = None
-
+ log_data = os.popen('hg log -r %d --template "{tags}\n{date|date}\n{author}\n"' % cset).readlines()
+ tag = log_data[0].strip()
+ date = log_data[1].strip()
+ user = log_data[2].strip()
+ parent = hgparents[str(cset)][0]
+ mparent = hgparents[str(cset)][1]
+
+ #get comment
(fdcomment, filecomment) = tempfile.mkstemp()
- csetcomment = os.popen('hg log -r %d -v | grep -v ^changeset: | grep -v ^parent: | grep -v ^user: | grep -v ^date | grep -v ^files: | grep -v ^description: | grep -v ^tag:' % cset).read().strip()
+ csetcomment = os.popen('hg log -r %d --template "{desc}"' % cset).read().strip()
os.write(fdcomment, csetcomment)
os.close(fdcomment)
- date = os.popen('hg log -r %d | grep ^date: | cut -f 2- -d :' % cset).read().strip()
-
- tag = os.popen('hg log -r %d | grep ^tag: | cut -f 2- -d :' % cset).read().strip()
-
- user = os.popen('hg log -r %d | grep ^user: | cut -f 2- -d :' % cset).read().strip()
-
print '-----------------------------------------'
print 'cset:', cset
print 'branch:', hgbranch[str(cset)]
print 'user:', user
print 'date:', date
print 'comment:', csetcomment
- print 'parent:', parent
+ if parent:
+ print 'parent:', parent
if mparent:
print 'mparent:', mparent
if tag:
@@ -224,8 +223,7 @@ for cset in range(int(tip) + 1):
os.system('git-branch -d %s' % otherbranch)
# retrieve and record the version
- vvv = os.popen('git-show | head -1').read()
- vvv = vvv[vvv.index(' ') + 1 : ].strip()
+ vvv = os.popen('git-show --quiet --pretty=format:%H').read()
print 'record', cset, '->', vvv
hgvers[str(cset)] = vvv
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 7511ea079..77c88ebf1 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -248,24 +248,24 @@ generate_update_branch_email()
# In this case we want to issue an email containing only revisions
# 3, 4, and N. Given (almost) by
#
- # git-rev-list N ^O --not --all
+ # git rev-list N ^O --not --all
#
# The reason for the "almost", is that the "--not --all" will take
# precedence over the "N", and effectively will translate to
#
- # git-rev-list N ^O ^X ^N
+ # git rev-list N ^O ^X ^N
#
- # So, we need to build up the list more carefully. git-rev-parse
- # will generate a list of revs that may be fed into git-rev-list.
+ # So, we need to build up the list more carefully. git rev-parse
+ # will generate a list of revs that may be fed into git rev-list.
# We can get it to make the "--not --all" part and then filter out
# the "^N" with:
#
- # git-rev-parse --not --all | grep -v N
+ # git rev-parse --not --all | grep -v N
#
- # Then, using the --stdin switch to git-rev-list we have effectively
+ # Then, using the --stdin switch to git rev-list we have effectively
# manufactured
#
- # git-rev-list N ^O ^X
+ # git rev-list N ^O ^X
#
# This leaves a problem when someone else updates the repository
# while this script is running. Their new value of the ref we're
@@ -274,10 +274,10 @@ generate_update_branch_email()
# all of our commits. What we really want is to exclude the current
# value of $refname from the --not list, rather than N itself. So:
#
- # git-rev-parse --not --all | grep -v $(git-rev-parse $refname)
+ # git rev-parse --not --all | grep -v $(git rev-parse $refname)
#
# Get's us to something pretty safe (apart from the small time
- # between refname being read, and git-rev-parse running - for that,
+ # between refname being read, and git rev-parse running - for that,
# I give up)
#
#
@@ -295,7 +295,7 @@ generate_update_branch_email()
# As above, we need to take into account the presence of X; if
# another branch is already in the repository and points at some of
# the revisions that we are about to output - we don't want them.
- # The solution is as before: git-rev-parse output filtered.
+ # The solution is as before: git rev-parse output filtered.
#
# Finally, tags: 1 --- 2 --- O --- T --- 3 --- 4 --- N
#
@@ -305,7 +305,7 @@ generate_update_branch_email()
# for a branch update. Therefore we still want to output revisions
# that have been output on a tag email.
#
- # Luckily, git-rev-parse includes just the tool. Instead of using
+ # Luckily, git rev-parse includes just the tool. Instead of using
# "--all" we use "--branches"; this has the added benefit that
# "remotes/" will be ignored as well.
@@ -454,7 +454,7 @@ generate_update_atag_email()
#
generate_atag_email()
{
- # Use git-for-each-ref to pull out the individual fields from the
+ # Use git for-each-ref to pull out the individual fields from the
# tag
eval $(git for-each-ref --shell --format='
tagobject=%(*objectname)
@@ -572,7 +572,7 @@ generate_general_email()
else
# What can we do here? The tag marks an object that is not
# a commit, so there is no log for us to display. It's
- # probably not wise to output git-cat-file as it could be a
+ # probably not wise to output git cat-file as it could be a
# binary blob. We'll just say how big it is
echo "$newrev is a $newrev_type, and is $(git cat-file -s $newrev) bytes long."
fi
@@ -622,10 +622,10 @@ then
projectdesc="UNNAMED PROJECT"
fi
-recipients=$(git repo-config hooks.mailinglist)
-announcerecipients=$(git repo-config hooks.announcelist)
-envelopesender=$(git-repo-config hooks.envelopesender)
-emailprefix=$(git-repo-config hooks.emailprefix || echo '[SCM] ')
+recipients=$(git config hooks.mailinglist)
+announcerecipients=$(git config hooks.announcelist)
+envelopesender=$(git config hooks.envelopesender)
+emailprefix=$(git config hooks.emailprefix || echo '[SCM] ')
# --- Main loop
# Allow dual mode: run from the command line just like the update hook, or
diff --git a/convert.c b/convert.c
index 4df75595b..552707e8e 100644
--- a/convert.c
+++ b/convert.c
@@ -17,8 +17,8 @@
#define CRLF_INPUT 2
struct text_stat {
- /* CR, LF and CRLF counts */
- unsigned cr, lf, crlf;
+ /* NUL, CR, LF and CRLF counts */
+ unsigned nul, cr, lf, crlf;
/* These are just approximations! */
unsigned printable, nonprintable;
@@ -51,6 +51,9 @@ static void gather_stats(const char *buf, unsigned long size, struct text_stat *
case '\b': case '\t': case '\033': case '\014':
stats->printable++;
break;
+ case 0:
+ stats->nul++;
+ /* fall through */
default:
stats->nonprintable++;
}
@@ -66,6 +69,8 @@ static void gather_stats(const char *buf, unsigned long size, struct text_stat *
static int is_binary(unsigned long size, struct text_stat *stats)
{
+ if (stats->nul)
+ return 1;
if ((stats->printable >> 7) < stats->nonprintable)
return 1;
/*
@@ -321,14 +326,14 @@ static int read_convert_config(const char *var, const char *value)
if (!strcmp("smudge", ep)) {
if (!value)
- return error("%s: lacks value", var);
+ return config_error_nonbool(var);
drv->smudge = strdup(value);
return 0;
}
if (!strcmp("clean", ep)) {
if (!value)
- return error("%s: lacks value", var);
+ return config_error_nonbool(var);
drv->clean = strdup(value);
return 0;
}
diff --git a/diff.c b/diff.c
index 61fd49236..4d2e23ae1 100644
--- a/diff.c
+++ b/diff.c
@@ -10,6 +10,7 @@
#include "color.h"
#include "attr.h"
#include "run-command.h"
+#include "utf8.h"
#ifdef NO_FAST_WORKING_DIRECTORY
#define FAST_WORKING_DIRECTORY 0
@@ -59,14 +60,6 @@ static struct ll_diff_driver {
char *cmd;
} *user_diff, **user_diff_tail;
-static void read_config_if_needed(void)
-{
- if (!user_diff_tail) {
- user_diff_tail = &user_diff;
- git_config(git_diff_ui_config);
- }
-}
-
/*
* Currently there is only "diff.<drivername>.command" variable;
* because there are "diff.color.<slot>" variables, we are parsing
@@ -165,6 +158,8 @@ int git_diff_ui_config(const char *var, const char *value)
return 0;
}
if (!strcmp(var, "diff.external")) {
+ if (!value)
+ return config_error_nonbool(var);
external_diff_cmd_cfg = xstrdup(value);
return 0;
}
@@ -172,18 +167,38 @@ int git_diff_ui_config(const char *var, const char *value)
const char *ep = strrchr(var, '.');
if (ep != var + 4) {
- if (!strcmp(ep, ".command"))
+ if (!strcmp(ep, ".command")) {
+ if (!value)
+ return config_error_nonbool(var);
return parse_lldiff_command(var, ep, value);
- if (!strcmp(ep, ".funcname"))
- return parse_funcname_pattern(var, ep, value);
+ }
}
}
+
+ return git_diff_basic_config(var, value);
+}
+
+int git_diff_basic_config(const char *var, const char *value)
+{
if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) {
int slot = parse_diff_color_slot(var, 11);
+ if (!value)
+ return config_error_nonbool(var);
color_parse(value, var, diff_colors[slot]);
return 0;
}
+ if (!prefixcmp(var, "diff.")) {
+ const char *ep = strrchr(var, '.');
+ if (ep != var + 4) {
+ if (!strcmp(ep, ".funcname")) {
+ if (!value)
+ return config_error_nonbool(var);
+ return parse_funcname_pattern(var, ep, value);
+ }
+ }
+ }
+
return git_default_config(var, value);
}
@@ -300,19 +315,25 @@ static void emit_rewrite_diff(const char *name_a,
const char *old = diff_get_color(color_diff, DIFF_FILE_OLD);
const char *new = diff_get_color(color_diff, DIFF_FILE_NEW);
const char *reset = diff_get_color(color_diff, DIFF_RESET);
+ static struct strbuf a_name = STRBUF_INIT, b_name = STRBUF_INIT;
name_a += (*name_a == '/');
name_b += (*name_b == '/');
name_a_tab = strchr(name_a, ' ') ? "\t" : "";
name_b_tab = strchr(name_b, ' ') ? "\t" : "";
+ strbuf_reset(&a_name);
+ strbuf_reset(&b_name);
+ quote_two_c_style(&a_name, o->a_prefix, name_a, 0);
+ quote_two_c_style(&b_name, o->b_prefix, name_b, 0);
+
diff_populate_filespec(one, 0);
diff_populate_filespec(two, 0);
lc_a = count_lines(one->data, one->size);
lc_b = count_lines(two->data, two->size);
- printf("%s--- %s%s%s%s\n%s+++ %s%s%s%s\n%s@@ -",
- metainfo, o->a_prefix, name_a, name_a_tab, reset,
- metainfo, o->b_prefix, name_b, name_b_tab, reset, fraginfo);
+ printf("%s--- %s%s%s\n%s+++ %s%s%s\n%s@@ -",
+ metainfo, a_name.buf, name_a_tab, reset,
+ metainfo, b_name.buf, name_b_tab, reset, fraginfo);
print_line_count(lc_a);
printf(" +");
print_line_count(lc_b);
@@ -459,10 +480,13 @@ static void diff_words_show(struct diff_words_data *diff_words)
}
}
+typedef unsigned long (*sane_truncate_fn)(char *line, unsigned long len);
+
struct emit_callback {
struct xdiff_emit_state xm;
int nparents, color_diff;
unsigned ws_rule;
+ sane_truncate_fn truncate;
const char **label_path;
struct diff_words_data *diff_words;
int *found_changesp;
@@ -515,12 +539,31 @@ static void emit_add_line(const char *reset, struct emit_callback *ecbdata, cons
}
}
+static unsigned long sane_truncate_line(struct emit_callback *ecb, char *line, unsigned long len)
+{
+ const char *cp;
+ unsigned long allot;
+ size_t l = len;
+
+ if (ecb->truncate)
+ return ecb->truncate(line, len);
+ cp = line;
+ allot = l;
+ while (0 < l) {
+ (void) utf8_width(&cp, &l);
+ if (!cp)
+ break; /* truncated in the middle? */
+ }
+ return allot - l;
+}
+
static void fn_out_consume(void *priv, char *line, unsigned long len)
{
int i;
int color;
struct emit_callback *ecbdata = priv;
- const char *set = diff_get_color(ecbdata->color_diff, DIFF_METAINFO);
+ const char *meta = diff_get_color(ecbdata->color_diff, DIFF_METAINFO);
+ const char *plain = diff_get_color(ecbdata->color_diff, DIFF_PLAIN);
const char *reset = diff_get_color(ecbdata->color_diff, DIFF_RESET);
*(ecbdata->found_changesp) = 1;
@@ -532,9 +575,9 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
name_b_tab = strchr(ecbdata->label_path[1], ' ') ? "\t" : "";
printf("%s--- %s%s%s\n",
- set, ecbdata->label_path[0], reset, name_a_tab);
+ meta, ecbdata->label_path[0], reset, name_a_tab);
printf("%s+++ %s%s%s\n",
- set, ecbdata->label_path[1], reset, name_b_tab);
+ meta, ecbdata->label_path[1], reset, name_b_tab);
ecbdata->label_path[0] = ecbdata->label_path[1] = NULL;
}
@@ -545,13 +588,15 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
;
if (2 <= i && i < len && line[i] == ' ') {
ecbdata->nparents = i - 1;
+ len = sane_truncate_line(ecbdata, line, len);
emit_line(diff_get_color(ecbdata->color_diff, DIFF_FRAGINFO),
reset, line, len);
+ if (line[len-1] != '\n')
+ putchar('\n');
return;
}
if (len < ecbdata->nparents) {
- set = reset;
emit_line(reset, reset, line, len);
return;
}
@@ -575,7 +620,7 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
diff_words_show(ecbdata->diff_words);
line++;
len--;
- emit_line(set, reset, line, len);
+ emit_line(plain, reset, line, len);
return;
}
for (i = 0; i < ecbdata->nparents && len; i++) {
@@ -1148,7 +1193,6 @@ static const char *funcname_pattern(const char *ident)
{
struct funcname_pattern *pp;
- read_config_if_needed();
for (pp = funcname_pattern_list; pp; pp = pp->next)
if (!strcmp(ident, pp->name))
return pp->pattern;
@@ -1190,7 +1234,7 @@ static const char *diff_funcname_pattern(struct diff_filespec *one)
/*
* And define built-in fallback patterns here. Note that
- * these can be overriden by the user's config settings.
+ * these can be overridden by the user's config settings.
*/
for (i = 0; i < ARRAY_SIZE(builtin_funcname_pattern); i++)
if (!strcmp(ident, builtin_funcname_pattern[i].name))
@@ -1805,7 +1849,6 @@ static const char *external_diff_attr(const char *name)
!ATTR_UNSET(value)) {
struct ll_diff_driver *drv;
- read_config_if_needed();
for (drv = user_diff; drv; drv = drv->next)
if (!strcmp(drv->name, value))
return drv->cmd;
diff --git a/diff.h b/diff.h
index beccf8596..073d5cbf1 100644
--- a/diff.h
+++ b/diff.h
@@ -172,6 +172,7 @@ extern void diff_unmerge(struct diff_options *,
#define DIFF_SETUP_USE_CACHE 2
#define DIFF_SETUP_USE_SIZE_CACHE 4
+extern int git_diff_basic_config(const char *var, const char *value);
extern int git_diff_ui_config(const char *var, const char *value);
extern void diff_setup(struct diff_options *);
extern int diff_opt_parse(struct diff_options *, const char **, int);
diff --git a/fast-import.c b/fast-import.c
index 4646c056f..a523b171e 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -275,6 +275,8 @@ struct recent_command
static unsigned long max_depth = 10;
static off_t max_packsize = (1LL << 32) - 1;
static int force_update;
+static int pack_compression_level = Z_DEFAULT_COMPRESSION;
+static int pack_compression_seen;
/* Stats and misc. counters */
static uintmax_t alloc_count;
@@ -642,8 +644,9 @@ static struct branch *new_branch(const char *name)
if (b)
die("Invalid attempt to create duplicate branch: %s", name);
switch (check_ref_format(name)) {
- case 0: break; /* its valid */
- case -2: break; /* valid, but too few '/', allow anyway */
+ case 0: break; /* its valid */
+ case CHECK_REF_FORMAT_ONELEVEL:
+ break; /* valid, but too few '/', allow anyway */
default:
die("Branch name doesn't conform to GIT standards: %s", name);
}
@@ -877,8 +880,9 @@ static char *keep_pack(char *curr_index_name)
keep_fd = open(name, O_RDWR|O_CREAT|O_EXCL, 0600);
if (keep_fd < 0)
die("cannot create keep file");
- write(keep_fd, keep_msg, strlen(keep_msg));
- close(keep_fd);
+ write_or_die(keep_fd, keep_msg, strlen(keep_msg));
+ if (close(keep_fd))
+ die("failed to write keep file");
snprintf(name, sizeof(name), "%s/pack/pack-%s.pack",
get_object_directory(), sha1_to_hex(pack_data->sha1));
@@ -915,6 +919,7 @@ static void end_packfile(void)
struct branch *b;
struct tag *t;
+ close_pack_windows(pack_data);
fixup_pack_header_footer(pack_data->pack_fd, pack_data->sha1,
pack_data->pack_name, object_count);
close(pack_data->pack_fd);
@@ -924,7 +929,6 @@ static void end_packfile(void)
new_p = add_packed_git(idx_name, strlen(idx_name), 1);
if (!new_p)
die("core git rejected index %s", idx_name);
- new_p->windows = old_p->windows;
all_packs[pack_id] = new_p;
install_packed_git(new_p);
@@ -1036,7 +1040,7 @@ static int store_object(
delta = NULL;
memset(&s, 0, sizeof(s));
- deflateInit(&s, zlib_compression_level);
+ deflateInit(&s, pack_compression_level);
if (delta) {
s.next_in = delta;
s.avail_in = deltalen;
@@ -1064,7 +1068,7 @@ static int store_object(
delta = NULL;
memset(&s, 0, sizeof(s));
- deflateInit(&s, zlib_compression_level);
+ deflateInit(&s, pack_compression_level);
s.next_in = (void *)dat->buf;
s.avail_in = dat->len;
s.avail_out = deflateBound(&s, s.avail_in);
@@ -1121,14 +1125,49 @@ static int store_object(
return 0;
}
+/* All calls must be guarded by find_object() or find_mark() to
+ * ensure the 'struct object_entry' passed was written by this
+ * process instance. We unpack the entry by the offset, avoiding
+ * the need for the corresponding .idx file. This unpacking rule
+ * works because we only use OBJ_REF_DELTA within the packfiles
+ * created by fast-import.
+ *
+ * oe must not be NULL. Such an oe usually comes from giving
+ * an unknown SHA-1 to find_object() or an undefined mark to
+ * find_mark(). Callers must test for this condition and use
+ * the standard read_sha1_file() when it happens.
+ *
+ * oe->pack_id must not be MAX_PACK_ID. Such an oe is usually from
+ * find_mark(), where the mark was reloaded from an existing marks
+ * file and is referencing an object that this fast-import process
+ * instance did not write out to a packfile. Callers must test for
+ * this condition and use read_sha1_file() instead.
+ */
static void *gfi_unpack_entry(
struct object_entry *oe,
unsigned long *sizep)
{
enum object_type type;
struct packed_git *p = all_packs[oe->pack_id];
- if (p == pack_data)
+ if (p == pack_data && p->pack_size < (pack_size + 20)) {
+ /* The object is stored in the packfile we are writing to
+ * and we have modified it since the last time we scanned
+ * back to read a previously written object. If an old
+ * window covered [p->pack_size, p->pack_size + 20) its
+ * data is stale and is not valid. Closing all windows
+ * and updating the packfile length ensures we can read
+ * the newly written data.
+ */
+ close_pack_windows(p);
+
+ /* We have to offer 20 bytes additional on the end of
+ * the packfile as the core unpacker code assumes the
+ * footer is present at the file end and must promise
+ * at least 20 bytes within any window it maps. But
+ * we don't actually create the footer here.
+ */
p->pack_size = pack_size + 20;
+ }
return unpack_entry(p, oe->offset, &type, sizep);
}
@@ -1537,17 +1576,36 @@ static void dump_marks(void)
f = fdopen(mark_fd, "w");
if (!f) {
+ int saved_errno = errno;
rollback_lock_file(&mark_lock);
failure |= error("Unable to write marks file %s: %s",
- mark_file, strerror(errno));
+ mark_file, strerror(saved_errno));
return;
}
+ /*
+ * Since the lock file was fdopen()'ed, it should not be close()'ed.
+ * Assign -1 to the lock file descriptor so that commit_lock_file()
+ * won't try to close() it.
+ */
+ mark_lock.fd = -1;
+
dump_marks_helper(f, 0, marks);
- fclose(f);
- if (commit_lock_file(&mark_lock))
+ if (ferror(f) || fclose(f)) {
+ int saved_errno = errno;
+ rollback_lock_file(&mark_lock);
failure |= error("Unable to write marks file %s: %s",
- mark_file, strerror(errno));
+ mark_file, strerror(saved_errno));
+ return;
+ }
+
+ if (commit_lock_file(&mark_lock)) {
+ int saved_errno = errno;
+ rollback_lock_file(&mark_lock);
+ failure |= error("Unable to commit marks file %s: %s",
+ mark_file, strerror(saved_errno));
+ return;
+ }
}
static int read_next_command(void)
@@ -2259,6 +2317,27 @@ static void import_marks(const char *input_file)
fclose(f);
}
+static int git_pack_config(const char *k, const char *v)
+{
+ if (!strcmp(k, "pack.depth")) {
+ max_depth = git_config_int(k, v);
+ if (max_depth > MAX_DEPTH)
+ max_depth = MAX_DEPTH;
+ return 0;
+ }
+ if (!strcmp(k, "pack.compression")) {
+ int level = git_config_int(k, v);
+ if (level == -1)
+ level = Z_DEFAULT_COMPRESSION;
+ else if (level < 0 || level > Z_BEST_COMPRESSION)
+ die("bad pack compression level %d", level);
+ pack_compression_level = level;
+ pack_compression_seen = 1;
+ return 0;
+ }
+ return git_default_config(k, v);
+}
+
static const char fast_import_usage[] =
"git-fast-import [--date-format=f] [--max-pack-size=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
@@ -2266,7 +2345,10 @@ int main(int argc, const char **argv)
{
unsigned int i, show_stats = 1;
- git_config(git_default_config);
+ git_config(git_pack_config);
+ if (!pack_compression_seen && core_compression_seen)
+ pack_compression_level = core_compression_level;
+
alloc_objects(object_entry_alloc);
strbuf_init(&command_buf, 0);
atom_table = xcalloc(atom_table_sz, sizeof(struct atom_str*));
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 0cdd80073..17ca5b84f 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -3,42 +3,29 @@
use strict;
use Git;
-# Prompt colors:
-my ($prompt_color, $header_color, $help_color, $normal_color);
-# Diff colors:
-my ($new_color, $old_color, $fraginfo_color, $metainfo_color, $whitespace_color);
-
-my ($use_color, $diff_use_color);
my $repo = Git->repository();
-$use_color = $repo->get_colorbool('color.interactive');
-
-if ($use_color) {
- # Set interactive colors:
+my $menu_use_color = $repo->get_colorbool('color.interactive');
+my ($prompt_color, $header_color, $help_color) =
+ $menu_use_color ? (
+ $repo->get_color('color.interactive.prompt', 'bold blue'),
+ $repo->get_color('color.interactive.header', 'bold'),
+ $repo->get_color('color.interactive.help', 'red bold'),
+ ) : ();
- # Grab the 3 main colors in git color string format, with sane
- # (visible) defaults:
- $prompt_color = $repo->get_color("color.interactive.prompt", "bold blue");
- $header_color = $repo->get_color("color.interactive.header", "bold");
- $help_color = $repo->get_color("color.interactive.help", "red bold");
- $normal_color = $repo->get_color("", "reset");
+my $diff_use_color = $repo->get_colorbool('color.diff');
+my ($fraginfo_color) =
+ $diff_use_color ? (
+ $repo->get_color('color.diff.frag', 'cyan'),
+ ) : ();
- # Do we also set diff colors?
- $diff_use_color = $repo->get_colorbool('color.diff');
- if ($diff_use_color) {
- $new_color = $repo->get_color("color.diff.new", "green");
- $old_color = $repo->get_color("color.diff.old", "red");
- $fraginfo_color = $repo->get_color("color.diff.frag", "cyan");
- $metainfo_color = $repo->get_color("color.diff.meta", "bold");
- $whitespace_color = $repo->get_color("color.diff.whitespace", "normal red");
- }
-}
+my $normal_color = $repo->get_color("", "reset");
sub colored {
my $color = shift;
my $string = join("", @_);
- if ($use_color) {
+ if (defined $color) {
# Put a color code at the beginning of each line, a reset at the end
# color after newlines that are not at the end of the string
$string =~ s/(\n+)(.)/$1$color$2/g;
@@ -304,7 +291,7 @@ sub highlight_prefix {
return "$prefix$remainder";
}
- if (!$use_color) {
+ if (!$menu_use_color) {
return "[$prefix]$remainder";
}
diff --git a/git-am.sh b/git-am.sh
index 65c634f77..2ecebc45a 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -14,7 +14,7 @@ b,binary pass --allo-binary-replacement to git-apply
3,3way allow fall back on 3way merging if needed
s,signoff add a Signed-off-by line to the commit message
u,utf8 recode into utf8 (default)
-k,keep pass -k flagg to git-mailinfo
+k,keep pass -k flag to git-mailinfo
whitespace= pass it through git-apply
C= pass it through git-apply
p= pass it through git-apply
@@ -469,9 +469,9 @@ do
"$GIT_DIR"/hooks/post-applypatch
fi
- git gc --auto
-
go_next
done
+git gc --auto
+
rm -fr "$dotest"
diff --git a/git-bisect.sh b/git-bisect.sh
index 538524989..393fa3558 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -26,6 +26,9 @@ OPTIONS_SPEC=
. git-sh-setup
require_work_tree
+_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
+_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
+
sq() {
@@PERL@@ -e '
for (@ARGV) {
@@ -60,7 +63,8 @@ bisect_start() {
# top-of-line master first!
#
head=$(GIT_DIR="$GIT_DIR" git symbolic-ref HEAD) ||
- die "Bad HEAD - I need a symbolic ref"
+ head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
+ die "Bad HEAD - I need a HEAD"
case "$head" in
refs/heads/bisect)
if [ -s "$GIT_DIR/head-name" ]; then
@@ -70,7 +74,7 @@ bisect_start() {
fi
git checkout $branch || exit
;;
- refs/heads/*)
+ refs/heads/*|$_x40)
[ -s "$GIT_DIR/head-name" ] && die "won't bisect on seeked tree"
echo "${head#refs/heads/}" >"$GIT_DIR/head-name"
;;
diff --git a/git-checkout.sh b/git-checkout.sh
index 5621c69d8..bd74d701a 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -71,7 +71,8 @@ while test $# != 0; do
done
arg="$1"
-if rev=$(git rev-parse --verify "$arg^0" 2>/dev/null)
+rev=$(git rev-parse --verify "$arg" 2>/dev/null)
+if rev=$(git rev-parse --verify "$rev^0" 2>/dev/null)
then
[ -z "$rev" ] && die "unknown flag $arg"
new_name="$arg"
@@ -82,11 +83,11 @@ then
fi
new="$rev"
shift
-elif rev=$(git rev-parse --verify "$arg^{tree}" 2>/dev/null)
+elif rev=$(git rev-parse --verify "$rev^{tree}" 2>/dev/null)
then
# checking out selected paths from a tree-ish.
new="$rev"
- new_name="$arg^{tree}"
+ new_name="$rev^{tree}"
shift
fi
[ "$1" = "--" ] && shift
diff --git a/git-compat-util.h b/git-compat-util.h
index 79eb10eac..4df90cb34 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -68,7 +68,9 @@
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
+#ifndef NO_SYS_SELECT_H
#include <sys/select.h>
+#endif
#include <assert.h>
#include <regex.h>
#include <netinet/in.h>
@@ -122,6 +124,8 @@ extern void set_die_routine(void (*routine)(const char *err, va_list params) NOR
extern void set_error_routine(void (*routine)(const char *err, va_list params));
extern void set_warn_routine(void (*routine)(const char *warn, va_list params));
+extern int prefixcmp(const char *str, const char *prefix);
+
#ifdef NO_MMAP
#ifndef PROT_READ
@@ -396,11 +400,6 @@ static inline int sane_case(int x, int high)
return x;
}
-static inline int prefixcmp(const char *str, const char *prefix)
-{
- return strncmp(str, prefix, strlen(prefix));
-}
-
static inline int strtoul_ui(char const *s, int base, unsigned int *result)
{
unsigned long ul;
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1fa9a2237..5694978c4 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -88,7 +88,7 @@ sub write_author_info($) {
close ($f);
}
-# convert getopts specs for use by git-repo-config
+# convert getopts specs for use by git config
sub read_repo_config {
# Split the string between characters, unless there is a ':'
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
@@ -96,7 +96,7 @@ sub read_repo_config {
foreach my $o (@opts) {
my $key = $o;
$key =~ s/://g;
- my $arg = 'git-repo-config';
+ my $arg = 'git config';
$arg .= ' --bool' if ($o !~ /:$/);
chomp(my $tmp = `$arg --get cvsimport.$key`);
@@ -116,7 +116,7 @@ getopts($opts) or usage();
usage if $opt_h;
if (@ARGV == 0) {
- chomp(my $module = `git-repo-config --get cvsimport.module`);
+ chomp(my $module = `git config --get cvsimport.module`);
push(@ARGV, $module) if $? == 0;
}
@ARGV <= 1 or usage("You can't specify more than one CVS module");
@@ -632,6 +632,7 @@ unless ($opt_P) {
print $cvspsfh $_;
}
close CVSPS;
+ $? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
close $cvspsfh;
} else {
$cvspsfile = $opt_P;
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index ecded3b9c..afe3d0b7f 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2543,8 +2543,15 @@ sub update
if ($parent eq $lastpicked) {
next;
}
- my $base = safe_pipe_capture('git-merge-base',
+ my $base = eval {
+ safe_pipe_capture('git-merge-base',
$lastpicked, $parent);
+ };
+ # The two branches may not be related at all,
+ # in which case merge base simply fails to find
+ # any, but that's Ok.
+ next if ($@);
+
chomp $base;
if ($base) {
my @merged;
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index ae29f47e4..ff716cabb 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -114,7 +114,6 @@ orig_namespace=refs/original/
force=
while :
do
- test $# = 0 && usage
case "$1" in
--)
shift
@@ -189,6 +188,9 @@ cd "$tempdir/t" &&
workdir="$(pwd)" ||
die ""
+# Remove tempdir on exit
+trap 'cd ../..; rm -rf "$tempdir"' 0
+
# Make sure refs/original is empty
git for-each-ref > "$tempdir"/backup-refs
while read sha1 type name
@@ -209,25 +211,9 @@ ORIG_GIT_INDEX_FILE="$GIT_INDEX_FILE"
GIT_WORK_TREE=.
export GIT_DIR GIT_WORK_TREE
-# These refs should be updated if their heads were rewritten
-
-git rev-parse --revs-only --symbolic "$@" |
-while read ref
-do
- # normalize ref
- case "$ref" in
- HEAD)
- ref="$(git symbolic-ref "$ref")"
- ;;
- refs/*)
- ;;
- *)
- ref="$(git for-each-ref --format='%(refname)' |
- grep /"$ref")"
- esac
-
- git check-ref-format "$ref" && echo "$ref"
-done > "$tempdir"/heads
+# The refs should be updated if their heads were rewritten
+git rev-parse --no-flags --revs-only --symbolic-full-name --default HEAD "$@" |
+sed -e '/^^/d' >"$tempdir"/heads
test -s "$tempdir"/heads ||
die "Which ref do you want to rewrite?"
@@ -422,6 +408,8 @@ fi
cd ../..
rm -rf "$tempdir"
+trap - 0
+
unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
test -z "$ORIG_GIT_DIR" || GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
test -z "$ORIG_GIT_WORK_TREE" || GIT_WORK_TREE="$ORIG_GIT_WORK_TREE" &&
diff --git a/git-gui/Makefile b/git-gui/Makefile
index 26ac4b6bb..34438cdf5 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -67,7 +67,7 @@ ifndef V
QUIET_GEN = $(QUIET)echo ' ' GEN '$@' &&
QUIET_INDEX = $(QUIET)echo ' ' INDEX $(dir $@) &&
QUIET_MSGFMT0 = $(QUIET)printf ' MSGFMT %12s ' $@ && v=`
- QUIET_MSGFMT1 = 2>&1` && echo "$$v" | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages//g'
+ QUIET_MSGFMT1 = 2>&1` && echo "$$v" | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages*//g'
QUIET_2DEVNULL = 2>/dev/null
INSTALL_D0 = dir=
@@ -110,22 +110,21 @@ TCLTK_PATH_SED = $(subst ','\'',$(subst \,\\,$(TCLTK_PATH)))
gg_libdir ?= $(sharedir)/git-gui/lib
libdir_SQ = $(subst ','\'',$(gg_libdir))
-libdir_SED = $(subst ','\'',$(subst \,\\,$(gg_libdir)))
+libdir_SED = $(subst ','\'',$(subst \,\\,$(gg_libdir_sed_in)))
exedir = $(dir $(gitexecdir))share/git-gui/lib
GITGUI_SCRIPT := $$0
GITGUI_RELATIVE :=
GITGUI_MACOSXAPP :=
-ifeq ($(exedir),$(gg_libdir))
- GITGUI_RELATIVE := 1
-endif
-
ifeq ($(uname_O),Cygwin)
GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
- ifeq ($(GITGUI_RELATIVE),)
- gg_libdir := $(shell cygpath --windows --absolute "$(gg_libdir)")
+ gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
+else
+ ifeq ($(exedir),$(gg_libdir))
+ GITGUI_RELATIVE := 1
endif
+ gg_libdir_sed_in := $(gg_libdir)
endif
ifeq ($(uname_S),Darwin)
ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
@@ -199,6 +198,9 @@ ifdef NO_MSGFMT
MSGFMT ?= $(TCL_PATH) po/po2msg.sh
else
MSGFMT ?= msgfmt
+ ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
+ MSGFMT := $(TCL_PATH) po/po2msg.sh
+ endif
endif
msgsdir = $(gg_libdir)/msgs
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 1fca11f27..f42e461fd 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -438,6 +438,34 @@ proc git_write {args} {
return [open [concat $opt $cmdp $args] w]
}
+proc githook_read {hook_name args} {
+ set pchook [gitdir hooks $hook_name]
+ lappend args 2>@1
+
+ # On Cygwin [file executable] might lie so we need to ask
+ # the shell if the hook is executable. Yes that's annoying.
+ #
+ if {[is_Cygwin]} {
+ upvar #0 _sh interp
+ if {![info exists interp]} {
+ set interp [_which sh]
+ }
+ if {$interp eq {}} {
+ error "hook execution requires sh (not in PATH)"
+ }
+
+ set scr {if test -x "$1";then exec "$@";fi}
+ set sh_c [list | $interp -c $scr $interp $pchook]
+ return [_open_stdout_stderr [concat $sh_c $args]]
+ }
+
+ if {[file executable $pchook]} {
+ return [_open_stdout_stderr [concat [list | $pchook] $args]]
+ }
+
+ return {}
+}
+
proc sq {value} {
regsub -all ' $value "'\\''" value
return "'$value'"
@@ -2542,6 +2570,27 @@ $ui_diff tag raise sel
set ctxm .vpane.lower.diff.body.ctxm
menu $ctxm -tearoff 0
$ctxm add command \
+ -label [mc "Apply/Reverse Hunk"] \
+ -command {apply_hunk $cursorX $cursorY}
+set ui_diff_applyhunk [$ctxm index last]
+lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
+$ctxm add separator
+$ctxm add command \
+ -label [mc "Show Less Context"] \
+ -command {if {$repo_config(gui.diffcontext) >= 1} {
+ incr repo_config(gui.diffcontext) -1
+ reshow_diff
+ }}
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add command \
+ -label [mc "Show More Context"] \
+ -command {if {$repo_config(gui.diffcontext) < 99} {
+ incr repo_config(gui.diffcontext)
+ reshow_diff
+ }}
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add separator
+$ctxm add command \
-label [mc Refresh] \
-command reshow_diff
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
@@ -2563,12 +2612,6 @@ $ctxm add command \
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add separator
$ctxm add command \
- -label [mc "Apply/Reverse Hunk"] \
- -command {apply_hunk $cursorX $cursorY}
-set ui_diff_applyhunk [$ctxm index last]
-lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
-$ctxm add separator
-$ctxm add command \
-label [mc "Decrease Font Size"] \
-command {incr_font_size font_diff -1}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
@@ -2577,21 +2620,6 @@ $ctxm add command \
-command {incr_font_size font_diff 1}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add separator
-$ctxm add command \
- -label [mc "Show Less Context"] \
- -command {if {$repo_config(gui.diffcontext) >= 1} {
- incr repo_config(gui.diffcontext) -1
- reshow_diff
- }}
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add command \
- -label [mc "Show More Context"] \
- -command {if {$repo_config(gui.diffcontext) < 99} {
- incr repo_config(gui.diffcontext)
- reshow_diff
- }}
-lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
-$ctxm add separator
$ctxm add command -label [mc "Options..."] \
-command do_options
proc popup_diff_menu {ctxm x y X Y} {
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index 2bac50e14..86faf24cc 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -290,11 +290,6 @@ method _write_local_path {args} {
}
method _git_init {} {
- if {[file exists $local_path]} {
- error_popup [mc "Location %s already exists." $local_path]
- return 0
- }
-
if {[catch {file mkdir $local_path} err]} {
error_popup [strcat \
[mc "Failed to create repository %s:" $local_path] \
@@ -417,41 +412,35 @@ method _new_local_path {} {
if {$p eq {}} return
set p [file normalize $p]
- if {[file isdirectory $p]} {
- foreach i [glob \
- -directory $p \
- -tails \
- -nocomplain \
- * .*] {
- switch -- $i {
- . continue
- .. continue
- default {
- error_popup [mc "Directory %s already exists." $p]
- return
- }
- }
- }
- if {[catch {file delete $p} err]} {
- error_popup [strcat \
- [mc "Directory %s already exists." $p] \
- "\n\n$err"]
- return
- }
- } elseif {[file exists $p]} {
- error_popup [mc "File %s already exists." $p]
+ if {![_new_ok $p]} {
return
}
set local_path $p
}
method _do_new2 {} {
+ if {![_new_ok $local_path]} {
+ return
+ }
if {![_git_init $this]} {
return
}
set done 1
}
+proc _new_ok {p} {
+ if {[file isdirectory $p]} {
+ if {[_is_git [file join $p .git]]} {
+ error_popup [mc "Directory %s already exists." $p]
+ return 0
+ }
+ } elseif {[file exists $p]} {
+ error_popup [mc "File %s already exists." $p]
+ return 0
+ }
+ return 1
+}
+
######################################################################
##
## Clone Existing Repository
@@ -607,6 +596,11 @@ method _do_clone2 {} {
}
}
+ if {[file exists $local_path]} {
+ error_popup [mc "Location %s already exists." $local_path]
+ return
+ }
+
if {![_git_init $this]} return
set local_path [pwd]
diff --git a/git-gui/lib/choose_rev.tcl b/git-gui/lib/choose_rev.tcl
index a063c5bc4..c8821c146 100644
--- a/git-gui/lib/choose_rev.tcl
+++ b/git-gui/lib/choose_rev.tcl
@@ -451,7 +451,8 @@ method _sb_set {sb orient first last} {
focus $old_focus
}
}
- $sb set $first $last
+
+ catch {$sb set $first $last}
}
method _show_tooltip {pos} {
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index b2d2d5308..947b201c3 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -192,45 +192,52 @@ A good commit message has the following format:
return
}
- # -- Run the pre-commit hook.
+ # -- Build the message file.
#
- set pchook [gitdir hooks pre-commit]
+ set msg_p [gitdir GITGUI_EDITMSG]
+ set msg_wt [open $msg_p w]
+ fconfigure $msg_wt -translation lf
+ if {[catch {set enc $repo_config(i18n.commitencoding)}]} {
+ set enc utf-8
+ }
+ set use_enc [tcl_encoding $enc]
+ if {$use_enc ne {}} {
+ fconfigure $msg_wt -encoding $use_enc
+ } else {
+ puts stderr [mc "warning: Tcl does not support encoding '%s'." $enc]
+ fconfigure $msg_wt -encoding utf-8
+ }
+ puts $msg_wt $msg
+ close $msg_wt
- # On Cygwin [file executable] might lie so we need to ask
- # the shell if the hook is executable. Yes that's annoying.
+ # -- Run the pre-commit hook.
#
- if {[is_Cygwin] && [file isfile $pchook]} {
- set pchook [list sh -c [concat \
- "if test -x \"$pchook\";" \
- "then exec \"$pchook\" 2>&1;" \
- "fi"]]
- } elseif {[file executable $pchook]} {
- set pchook [list $pchook |& cat]
- } else {
- commit_writetree $curHEAD $msg
+ set fd_ph [githook_read pre-commit]
+ if {$fd_ph eq {}} {
+ commit_commitmsg $curHEAD $msg_p
return
}
ui_status {Calling pre-commit hook...}
set pch_error {}
- set fd_ph [open "| $pchook" r]
fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
fileevent $fd_ph readable \
- [list commit_prehook_wait $fd_ph $curHEAD $msg]
+ [list commit_prehook_wait $fd_ph $curHEAD $msg_p]
}
-proc commit_prehook_wait {fd_ph curHEAD msg} {
+proc commit_prehook_wait {fd_ph curHEAD msg_p} {
global pch_error
append pch_error [read $fd_ph]
fconfigure $fd_ph -blocking 1
if {[eof $fd_ph]} {
if {[catch {close $fd_ph}]} {
+ catch {file delete $msg_p}
ui_status {Commit declined by pre-commit hook.}
hook_failed_popup pre-commit $pch_error
unlock_index
} else {
- commit_writetree $curHEAD $msg
+ commit_commitmsg $curHEAD $msg_p
}
set pch_error {}
return
@@ -238,14 +245,52 @@ proc commit_prehook_wait {fd_ph curHEAD msg} {
fconfigure $fd_ph -blocking 0
}
-proc commit_writetree {curHEAD msg} {
+proc commit_commitmsg {curHEAD msg_p} {
+ global pch_error
+
+ # -- Run the commit-msg hook.
+ #
+ set fd_ph [githook_read commit-msg $msg_p]
+ if {$fd_ph eq {}} {
+ commit_writetree $curHEAD $msg_p
+ return
+ }
+
+ ui_status {Calling commit-msg hook...}
+ set pch_error {}
+ fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fileevent $fd_ph readable \
+ [list commit_commitmsg_wait $fd_ph $curHEAD $msg_p]
+}
+
+proc commit_commitmsg_wait {fd_ph curHEAD msg_p} {
+ global pch_error
+
+ append pch_error [read $fd_ph]
+ fconfigure $fd_ph -blocking 1
+ if {[eof $fd_ph]} {
+ if {[catch {close $fd_ph}]} {
+ catch {file delete $msg_p}
+ ui_status {Commit declined by commit-msg hook.}
+ hook_failed_popup commit-msg $pch_error
+ unlock_index
+ } else {
+ commit_writetree $curHEAD $msg_p
+ }
+ set pch_error {}
+ return
+ }
+ fconfigure $fd_ph -blocking 0
+}
+
+proc commit_writetree {curHEAD msg_p} {
ui_status {Committing changes...}
set fd_wt [git_read write-tree]
fileevent $fd_wt readable \
- [list commit_committree $fd_wt $curHEAD $msg]
+ [list commit_committree $fd_wt $curHEAD $msg_p]
}
-proc commit_committree {fd_wt curHEAD msg} {
+proc commit_committree {fd_wt curHEAD msg_p} {
global HEAD PARENT MERGE_HEAD commit_type
global current_branch
global ui_comm selected_commit_type
@@ -254,6 +299,7 @@ proc commit_committree {fd_wt curHEAD msg} {
gets $fd_wt tree_id
if {[catch {close $fd_wt} err]} {
+ catch {file delete $msg_p}
error_popup [strcat [mc "write-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
@@ -276,6 +322,7 @@ proc commit_committree {fd_wt curHEAD msg} {
}
if {$tree_id eq $old_tree} {
+ catch {file delete $msg_p}
info_popup [mc "No changes to commit.
No files were modified by this commit and it was not a merge commit.
@@ -288,24 +335,6 @@ A rescan will be automatically started now.
}
}
- # -- Build the message.
- #
- set msg_p [gitdir COMMIT_EDITMSG]
- set msg_wt [open $msg_p w]
- fconfigure $msg_wt -translation lf
- if {[catch {set enc $repo_config(i18n.commitencoding)}]} {
- set enc utf-8
- }
- set use_enc [tcl_encoding $enc]
- if {$use_enc ne {}} {
- fconfigure $msg_wt -encoding $use_enc
- } else {
- puts stderr [mc "warning: Tcl does not support encoding '%s'." $enc]
- fconfigure $msg_wt -encoding utf-8
- }
- puts -nonewline $msg_wt $msg
- close $msg_wt
-
# -- Create the commit.
#
set cmd [list commit-tree $tree_id]
@@ -314,6 +343,7 @@ A rescan will be automatically started now.
}
lappend cmd <$msg_p
if {[catch {set cmt_id [eval git $cmd]} err]} {
+ catch {file delete $msg_p}
error_popup [strcat [mc "commit-tree failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
@@ -326,16 +356,14 @@ A rescan will be automatically started now.
if {$commit_type ne {normal}} {
append reflogm " ($commit_type)"
}
- set i [string first "\n" $msg]
- if {$i >= 0} {
- set subject [string range $msg 0 [expr {$i - 1}]]
- } else {
- set subject $msg
- }
+ set msg_fd [open $msg_p r]
+ gets $msg_fd subject
+ close $msg_fd
append reflogm {: } $subject
if {[catch {
git update-ref -m $reflogm HEAD $cmt_id $curHEAD
} err]} {
+ catch {file delete $msg_p}
error_popup [strcat [mc "update-ref failed:"] "\n\n$err"]
ui_status {Commit failed.}
unlock_index
@@ -363,17 +391,13 @@ A rescan will be automatically started now.
# -- Run the post-commit hook.
#
- set pchook [gitdir hooks post-commit]
- if {[is_Cygwin] && [file isfile $pchook]} {
- set pchook [list sh -c [concat \
- "if test -x \"$pchook\";" \
- "then exec \"$pchook\";" \
- "fi"]]
- } elseif {![file executable $pchook]} {
- set pchook {}
- }
- if {$pchook ne {}} {
- catch {exec $pchook &}
+ set fd_ph [githook_read post-commit]
+ if {$fd_ph ne {}} {
+ upvar #0 pch_error$cmt_id pc_err
+ set pc_err {}
+ fconfigure $fd_ph -blocking 0 -translation binary -eofchar {}
+ fileevent $fd_ph readable \
+ [list commit_postcommit_wait $fd_ph $cmt_id]
}
$ui_comm delete 0.0 end
@@ -429,3 +453,18 @@ A rescan will be automatically started now.
reshow_diff
ui_status [mc "Created commit %s: %s" [string range $cmt_id 0 7] $subject]
}
+
+proc commit_postcommit_wait {fd_ph cmt_id} {
+ upvar #0 pch_error$cmt_id pch_error
+
+ append pch_error [read $fd_ph]
+ fconfigure $fd_ph -blocking 1
+ if {[eof $fd_ph]} {
+ if {[catch {close $fd_ph}]} {
+ hook_failed_popup post-commit $pch_error 0
+ }
+ unset pch_error
+ return
+ }
+ fconfigure $fd_ph -blocking 0
+}
diff --git a/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index 43565e412..d04f6dbde 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -220,6 +220,7 @@ proc read_diff {fd} {
if {[string match {mode *} $line]
|| [string match {new file *} $line]
+ || [regexp {^(old|new) mode *} $line]
|| [string match {deleted file *} $line]
|| [string match {deleted symlink} $line]
|| [string match {Binary files * and * differ} $line]
@@ -357,5 +358,7 @@ proc apply_hunk {x y} {
display_file $current_diff_path $mi
if {$o eq {_}} {
clear_diff
+ } else {
+ set current_diff_path $current_diff_path
}
}
diff --git a/git-gui/lib/error.tcl b/git-gui/lib/error.tcl
index 13565b7ab..0fdd7531d 100644
--- a/git-gui/lib/error.tcl
+++ b/git-gui/lib/error.tcl
@@ -62,7 +62,7 @@ proc ask_popup {msg} {
eval $cmd
}
-proc hook_failed_popup {hook msg} {
+proc hook_failed_popup {hook msg {is_fatal 1}} {
set w .hookfail
toplevel $w
@@ -77,14 +77,16 @@ proc hook_failed_popup {hook msg} {
-width 80 -height 10 \
-font font_diff \
-yscrollcommand [list $w.m.sby set]
- label $w.m.l2 \
- -text [mc "You must correct the above errors before committing."] \
- -anchor w \
- -justify left \
- -font font_uibold
scrollbar $w.m.sby -command [list $w.m.t yview]
pack $w.m.l1 -side top -fill x
- pack $w.m.l2 -side bottom -fill x
+ if {$is_fatal} {
+ label $w.m.l2 \
+ -text [mc "You must correct the above errors before committing."] \
+ -anchor w \
+ -justify left \
+ -font font_uibold
+ pack $w.m.l2 -side bottom -fill x
+ }
pack $w.m.sby -side right -fill y
pack $w.m.t -side left -fill both -expand 1
pack $w.m -side top -fill both -expand 1 -padx 5 -pady 10
@@ -99,6 +101,6 @@ proc hook_failed_popup {hook msg} {
bind $w <Visibility> "grab $w; focus $w"
bind $w <Key-Return> "destroy $w"
- wm title $w [append "[appname] ([reponame]): " [mc "error"]]
+ wm title $w [strcat "[appname] ([reponame]): " [mc "error"]]
tkwait window $w
}
diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index a0b22f294..30a244cc1 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -386,7 +386,9 @@ proc revert_helper {txt paths} {
set reply [tk_dialog \
.confirm_revert \
"[appname] ([reponame])" \
- [mc "Any unstaged changes will be permanently lost by the revert."] \
+ "$query
+
+[mc "Any unstaged changes will be permanently lost by the revert."]" \
question \
1 \
[mc "Do Nothing"] \
diff --git a/git-gui/po/de.po b/git-gui/po/de.po
index ac8ae0a20..2dfe07e06 100644
--- a/git-gui/po/de.po
+++ b/git-gui/po/de.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-11-24 10:36+0100\n"
-"PO-Revision-Date: 2007-11-24 10:55+0100\n"
+"PO-Revision-Date: 2008-01-15 20:33+0100\n"
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
@@ -272,7 +272,7 @@ msgstr "Neue Version"
#: git-gui.sh:1973 git-gui.sh:2357
msgid "Amend Last Commit"
-msgstr "Letzte Version nachbessern"
+msgstr "Letzte nachbessern"
#: git-gui.sh:1982 git-gui.sh:2317 lib/remote_branch_delete.tcl:99
msgid "Rescan"
@@ -284,7 +284,7 @@ msgstr "Zum Eintragen bereitstellen"
#: git-gui.sh:1994
msgid "Stage Changed Files To Commit"
-msgstr "Geänderte Dateien zum Eintragen bereitstellen"
+msgstr "Geänderte Dateien bereitstellen"
#: git-gui.sh:2000
msgid "Unstage From Commit"
@@ -292,7 +292,7 @@ msgstr "Aus der Bereitstellung herausnehmen"
#: git-gui.sh:2005 lib/index.tcl:393
msgid "Revert Changes"
-msgstr "Änderungen revidieren"
+msgstr "Änderungen verwerfen"
#: git-gui.sh:2012 git-gui.sh:2329 git-gui.sh:2427
msgid "Sign Off"
@@ -351,7 +351,7 @@ msgstr "Aktueller Zweig:"
#: git-gui.sh:2255
msgid "Staged Changes (Will Commit)"
-msgstr "Bereitgestellte Änderungen (zum Eintragen)"
+msgstr "Bereitstellung (zum Eintragen)"
#: git-gui.sh:2274
msgid "Unstaged Changes"
@@ -403,7 +403,7 @@ msgstr "Aktualisieren"
#: git-gui.sh:2566
msgid "Apply/Reverse Hunk"
-msgstr "Änderung anwenden/umkehren"
+msgstr "Kontext anwenden/umkehren"
#: git-gui.sh:2572
msgid "Decrease Font Size"
@@ -415,19 +415,19 @@ msgstr "Schriftgröße vergrößern"
#: git-gui.sh:2581
msgid "Show Less Context"
-msgstr "Weniger Kontext anzeigen"
+msgstr "Weniger Zeilen anzeigen"
#: git-gui.sh:2588
msgid "Show More Context"
-msgstr "Mehr Kontext anzeigen"
+msgstr "Mehr Zeilen anzeigen"
#: git-gui.sh:2602
msgid "Unstage Hunk From Commit"
-msgstr "Aus der Bereitstellung herausnehmen"
+msgstr "Kontext aus Bereitstellung herausnehmen"
#: git-gui.sh:2604
msgid "Stage Hunk For Commit"
-msgstr "In die Bereitstellung hinzufügen"
+msgstr "Kontext zur Bereitstellung hinzufügen"
#: git-gui.sh:2623
msgid "Initializing..."
@@ -914,11 +914,11 @@ msgstr "Neu..."
#: lib/choose_repository.tcl:93 lib/choose_repository.tcl:468
msgid "Clone Existing Repository"
-msgstr "Projektarchiv kopieren"
+msgstr "Projektarchiv klonen"
#: lib/choose_repository.tcl:99
msgid "Clone..."
-msgstr "Kopieren..."
+msgstr "Klonen..."
#: lib/choose_repository.tcl:106 lib/choose_repository.tcl:978
msgid "Open Existing Repository"
@@ -968,7 +968,7 @@ msgstr "Datei »%s« existiert bereits."
#: lib/choose_repository.tcl:463
msgid "Clone"
-msgstr "Kopieren"
+msgstr "Klonen"
#: lib/choose_repository.tcl:476
msgid "URL:"
@@ -976,7 +976,7 @@ msgstr "URL:"
#: lib/choose_repository.tcl:496
msgid "Clone Type:"
-msgstr "Art der Kopie:"
+msgstr "Art des Klonens:"
#: lib/choose_repository.tcl:502
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
@@ -1025,7 +1025,7 @@ msgstr "Kopien von Objekten/Info/Alternates konnten nicht erstellt werden: %s"
#: lib/choose_repository.tcl:690
#, tcl-format
msgid "Nothing to clone from %s."
-msgstr "Von »%s« konnte nichts kopiert werden."
+msgstr "Von »%s« konnte nichts geklont werden."
#: lib/choose_repository.tcl:692 lib/choose_repository.tcl:906
#: lib/choose_repository.tcl:918
@@ -1086,7 +1086,7 @@ msgstr "Verzeichnis »%s« kann nicht aufgeräumt werden."
#: lib/choose_repository.tcl:897
msgid "Clone failed."
-msgstr "Kopieren fehlgeschlagen."
+msgstr "Klonen fehlgeschlagen."
#: lib/choose_repository.tcl:904
msgid "No default branch obtained."
@@ -1440,11 +1440,11 @@ msgstr "Fehler beim Laden des Vergleichs:"
#: lib/diff.tcl:302
msgid "Failed to unstage selected hunk."
-msgstr "Fehler beim Herausnehmen der gewählten Dateien aus der Bereitstellung."
+msgstr "Fehler beim Herausnehmen des gewählten Kontexts aus der Bereitstellung."
#: lib/diff.tcl:309
msgid "Failed to stage selected hunk."
-msgstr "Fehler beim Bereitstellen der gewählten Dateien."
+msgstr "Fehler beim Bereitstellen des gewählten Kontexts."
#: lib/error.tcl:12 lib/error.tcl:102
msgid "error"
@@ -1494,17 +1494,16 @@ msgstr "»%s« hinzufügen..."
#: lib/index.tcl:381
#, tcl-format
msgid "Revert changes in file %s?"
-msgstr "Änderungen in Datei »%s« revidieren?"
+msgstr "Änderungen in Datei »%s« verwerfen?"
#: lib/index.tcl:383
#, tcl-format
msgid "Revert changes in these %i files?"
-msgstr "Änderungen in den gewählten %i Dateien revidieren?"
+msgstr "Änderungen in den gewählten %i Dateien verwerfen?"
#: lib/index.tcl:389
msgid "Any unstaged changes will be permanently lost by the revert."
-msgstr ""
-"Alle nicht bereitgestellten Änderungen werden beim Revidieren verloren gehen."
+msgstr "Alle nicht bereitgestellten Änderungen werden beim Verwerfen verloren gehen."
#: lib/index.tcl:392
msgid "Do Nothing"
@@ -1730,7 +1729,7 @@ msgstr "Optionen konnten nicht gespeichert werden:"
#: lib/remote_branch_delete.tcl:29 lib/remote_branch_delete.tcl:34
msgid "Delete Remote Branch"
-msgstr "Zweig im anderen Projektarchiv löschen"
+msgstr "Zweig aus anderem Projektarchiv löschen"
#: lib/remote_branch_delete.tcl:47
msgid "From Repository"
@@ -1852,7 +1851,7 @@ msgstr "Neue Änderungen von »%s« holen"
#: lib/transport.tcl:18
#, tcl-format
msgid "remote prune %s"
-msgstr "Entfernen von »%s« im anderen Archiv"
+msgstr "Entfernen von »%s« aus anderem Archiv"
#: lib/transport.tcl:19
#, tcl-format
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
new file mode 100644
index 000000000..d389bdaca
--- /dev/null
+++ b/git-gui/po/fr.po
@@ -0,0 +1,1875 @@
+# translation of fr.po to French
+# 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.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-11-24 10:36+0100\n"
+"PO-Revision-Date: 2008-01-14 21:08+0100\n"
+"Last-Translator: Christian Couder <chriscool@tuxfamily.org>\n"
+"Language-Team: French\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:604 git-gui.sh:618 git-gui.sh:631 git-gui.sh:714
+#: git-gui.sh:733
+msgid "git-gui: fatal error"
+msgstr "git-gui: erreur fatale"
+
+#: git-gui.sh:565
+#, tcl-format
+msgid "Invalid font specified in %s:"
+msgstr "Invalide fonte spécifiée dans %s :"
+
+#: git-gui.sh:590
+msgid "Main Font"
+msgstr "Fonte principale"
+
+#: git-gui.sh:591
+msgid "Diff/Console Font"
+msgstr "Fonte diff/console"
+
+#: git-gui.sh:605
+msgid "Cannot find git in PATH."
+msgstr "Impossible de trouver git dans PATH."
+
+#: git-gui.sh:632
+msgid "Cannot parse Git version string:"
+msgstr "Impossible de parser la version de Git :"
+
+#: git-gui.sh:650
+#, tcl-format
+msgid ""
+"Git version cannot be determined.\n"
+"\n"
+"%s claims it is version '%s'.\n"
+"\n"
+"%s requires at least Git 1.5.0 or later.\n"
+"\n"
+"Assume '%s' is version 1.5.0?\n"
+msgstr ""
+"Impossible de déterminer la version de Git.\n"
+"\n"
+"%s affirme qu'il s'agit de la version '%s'.\n"
+"\n"
+"%s nécessite au moins Git 1.5.0.\n"
+"\n"
+"Peut'on considérer que '%s' est en version 1.5.0 ?\n"
+
+#: git-gui.sh:888
+msgid "Git directory not found:"
+msgstr "Impossible de trouver le répertoire de Git :"
+
+#: git-gui.sh:895
+msgid "Cannot move to top of working directory:"
+msgstr "Impossible d'aller à la racine du répertoire de travail :"
+
+#: git-gui.sh:902
+msgid "Cannot use funny .git directory:"
+msgstr "Impossible d'utiliser un drôle de répertoire git :"
+
+#: git-gui.sh:907
+msgid "No working directory"
+msgstr "Pas de répertoire de travail"
+
+#: git-gui.sh:1054
+msgid "Refreshing file status..."
+msgstr "Rafraichissement du status des fichiers..."
+
+#: git-gui.sh:1119
+msgid "Scanning for modified files ..."
+msgstr "Recherche de fichiers modifiés..."
+
+#: git-gui.sh:1294 lib/browser.tcl:245
+msgid "Ready."
+msgstr "Prêt."
+
+#: git-gui.sh:1560
+msgid "Unmodified"
+msgstr "Non modifié"
+
+#: git-gui.sh:1562
+msgid "Modified, not staged"
+msgstr "Modifié, non pré-commité"
+
+#: git-gui.sh:1563 git-gui.sh:1568
+msgid "Staged for commit"
+msgstr "Pré-commité"
+
+#: git-gui.sh:1564 git-gui.sh:1569
+msgid "Portions staged for commit"
+msgstr "En partie pré-commité"
+
+#: git-gui.sh:1565 git-gui.sh:1570
+msgid "Staged for commit, missing"
+msgstr "Pré-commité, manquant"
+
+#: git-gui.sh:1567
+msgid "Untracked, not staged"
+msgstr "Non suivi, non pré-commité"
+
+#: git-gui.sh:1572
+msgid "Missing"
+msgstr "Manquant"
+
+#: git-gui.sh:1573
+msgid "Staged for removal"
+msgstr "Pré-commité pour suppression"
+
+#: git-gui.sh:1574
+msgid "Staged for removal, still present"
+msgstr "Pré-commité pour suppression, toujours présent"
+
+#: git-gui.sh:1576 git-gui.sh:1577 git-gui.sh:1578 git-gui.sh:1579
+msgid "Requires merge resolution"
+msgstr "Nécessite la résolution d'une fusion"
+
+#: git-gui.sh:1614
+msgid "Starting gitk... please wait..."
+msgstr "Lancement de gitk... merci de patienter..."
+
+#: git-gui.sh:1623
+#, 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:1823 lib/choose_repository.tcl:35
+msgid "Repository"
+msgstr "Référentiel"
+
+#: git-gui.sh:1824
+msgid "Edit"
+msgstr "Editer"
+
+#: git-gui.sh:1826 lib/choose_rev.tcl:560
+msgid "Branch"
+msgstr "Branche"
+
+#: git-gui.sh:1829 lib/choose_rev.tcl:547
+msgid "Commit@@noun"
+msgstr "Commit"
+
+#: git-gui.sh:1832 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+msgid "Merge"
+msgstr "Fusionner"
+
+#: git-gui.sh:1833 lib/choose_rev.tcl:556
+msgid "Remote"
+msgstr "Référentiel distant"
+
+#: git-gui.sh:1842
+msgid "Browse Current Branch's Files"
+msgstr "Visionner fichiers dans branche courante"
+
+#: git-gui.sh:1846
+msgid "Browse Branch Files..."
+msgstr "Visionner fichiers de branche"
+
+#: git-gui.sh:1851
+msgid "Visualize Current Branch's History"
+msgstr "Visualiser historique branche courante"
+
+#: git-gui.sh:1855
+msgid "Visualize All Branch History"
+msgstr "Visualiser historique toutes branches"
+
+#: git-gui.sh:1862
+#, tcl-format
+msgid "Browse %s's Files"
+msgstr "Visionner fichiers de %s"
+
+#: git-gui.sh:1864
+#, tcl-format
+msgid "Visualize %s's History"
+msgstr "Visualiser historique de %s"
+
+#: git-gui.sh:1869 lib/database.tcl:27 lib/database.tcl:67
+msgid "Database Statistics"
+msgstr "Statistiques base de donnée"
+
+#: git-gui.sh:1872 lib/database.tcl:34
+msgid "Compress Database"
+msgstr "Comprimer base de donnée"
+
+#: git-gui.sh:1875
+msgid "Verify Database"
+msgstr "Vérifier base de donnée"
+
+#: git-gui.sh:1882 git-gui.sh:1886 git-gui.sh:1890 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:1895 lib/choose_repository.tcl:176 lib/choose_repository.tcl:184
+msgid "Quit"
+msgstr "Quitter"
+
+#: git-gui.sh:1902
+msgid "Undo"
+msgstr "Défaire"
+
+#: git-gui.sh:1905
+msgid "Redo"
+msgstr "Refaire"
+
+#: git-gui.sh:1909 git-gui.sh:2403
+msgid "Cut"
+msgstr "Couper"
+
+#: git-gui.sh:1912 git-gui.sh:2406 git-gui.sh:2477 git-gui.sh:2549
+#: lib/console.tcl:67
+msgid "Copy"
+msgstr "Copier"
+
+#: git-gui.sh:1915 git-gui.sh:2409
+msgid "Paste"
+msgstr "Coller"
+
+#: git-gui.sh:1918 git-gui.sh:2412 lib/branch_delete.tcl:26
+#: lib/remote_branch_delete.tcl:38
+msgid "Delete"
+msgstr "Supprimer"
+
+#: git-gui.sh:1922 git-gui.sh:2416 git-gui.sh:2553 lib/console.tcl:69
+msgid "Select All"
+msgstr "Tout sélectionner"
+
+#: git-gui.sh:1931
+msgid "Create..."
+msgstr "Créer..."
+
+#: git-gui.sh:1937
+msgid "Checkout..."
+msgstr "Emprunter... "
+
+#: git-gui.sh:1943
+msgid "Rename..."
+msgstr "Renommer..."
+
+#: git-gui.sh:1948 git-gui.sh:2048
+msgid "Delete..."
+msgstr "Supprimer..."
+
+#: git-gui.sh:1953
+msgid "Reset..."
+msgstr "Réinitialiser..."
+
+#: git-gui.sh:1965 git-gui.sh:2350
+msgid "New Commit"
+msgstr "Nouveau commit"
+
+#: git-gui.sh:1973 git-gui.sh:2357
+msgid "Amend Last Commit"
+msgstr "Corriger dernier commit"
+
+#: git-gui.sh:1982 git-gui.sh:2317 lib/remote_branch_delete.tcl:99
+msgid "Rescan"
+msgstr "Resynchroniser"
+
+#: git-gui.sh:1988
+msgid "Stage To Commit"
+msgstr "Commiter un pré-commit"
+
+#: git-gui.sh:1994
+msgid "Stage Changed Files To Commit"
+msgstr "Commiter fichiers modifiés dans pré-commit"
+
+#: git-gui.sh:2000
+msgid "Unstage From Commit"
+msgstr "Commit vers pré-commit"
+
+#: git-gui.sh:2005 lib/index.tcl:393
+msgid "Revert Changes"
+msgstr "Inverser modification"
+
+#: git-gui.sh:2012 git-gui.sh:2329 git-gui.sh:2427
+msgid "Sign Off"
+msgstr "Se désinscrire"
+
+#: git-gui.sh:2016 git-gui.sh:2333
+msgid "Commit@@verb"
+msgstr "Commiter"
+
+#: git-gui.sh:2027
+msgid "Local Merge..."
+msgstr "Fusion locale..."
+
+#: git-gui.sh:2032
+msgid "Abort Merge..."
+msgstr "Abandonner fusion..."
+
+#: git-gui.sh:2044
+msgid "Push..."
+msgstr "Pousser..."
+
+#: git-gui.sh:2055 lib/choose_repository.tcl:40
+msgid "Apple"
+msgstr "Pomme"
+
+#: git-gui.sh:2058 git-gui.sh:2080 lib/about.tcl:13
+#: lib/choose_repository.tcl:43 lib/choose_repository.tcl:49
+#, tcl-format
+msgid "About %s"
+msgstr "A propos de %s"
+
+#: git-gui.sh:2062
+msgid "Preferences..."
+msgstr "Préférences..."
+
+#: git-gui.sh:2070 git-gui.sh:2595
+msgid "Options..."
+msgstr "Options..."
+
+#: git-gui.sh:2076 lib/choose_repository.tcl:46
+msgid "Help"
+msgstr "Aide"
+
+#: git-gui.sh:2117
+msgid "Online Documentation"
+msgstr "Documentation en ligne"
+
+#: git-gui.sh:2201
+#, tcl-format
+msgid "fatal: cannot stat path %s: No such file or directory"
+msgstr "fatale : pas d'infos sur le chemin %s : Fichier ou répertoire inexistant"
+
+#: git-gui.sh:2234
+msgid "Current Branch:"
+msgstr "Branche courante :"
+
+#: git-gui.sh:2255
+msgid "Staged Changes (Will Commit)"
+msgstr "Modifications pré-commitées"
+
+#: git-gui.sh:2274
+msgid "Unstaged Changes"
+msgstr "Modifications non pré-commitées"
+
+#: git-gui.sh:2323
+msgid "Stage Changed"
+msgstr "Pré-commit modifié"
+
+#: git-gui.sh:2339 lib/transport.tcl:93 lib/transport.tcl:182
+msgid "Push"
+msgstr "Pousser"
+
+#: git-gui.sh:2369
+msgid "Initial Commit Message:"
+msgstr "Message de commit initial :"
+
+#: git-gui.sh:2370
+msgid "Amended Commit Message:"
+msgstr "Message de commit corrigé :"
+
+#: git-gui.sh:2371
+msgid "Amended Initial Commit Message:"
+msgstr "Message de commit initial corrigé :"
+
+#: git-gui.sh:2372
+msgid "Amended Merge Commit Message:"
+msgstr "Message de commit de fusion corrigé :"
+
+#: git-gui.sh:2373
+msgid "Merge Commit Message:"
+msgstr "Message de commit de fusion :"
+
+#: git-gui.sh:2374
+msgid "Commit Message:"
+msgstr "Message de commit :"
+
+#: git-gui.sh:2419 git-gui.sh:2557 lib/console.tcl:71
+msgid "Copy All"
+msgstr "Copier tout"
+
+#: git-gui.sh:2443 lib/blame.tcl:104
+msgid "File:"
+msgstr "Fichier :"
+
+#: git-gui.sh:2545
+msgid "Refresh"
+msgstr "Rafraichir"
+
+#: git-gui.sh:2566
+msgid "Apply/Reverse Hunk"
+msgstr "Appliquer/Inverser section"
+
+#: git-gui.sh:2572
+msgid "Decrease Font Size"
+msgstr "Réduire fonte"
+
+#: git-gui.sh:2576
+msgid "Increase Font Size"
+msgstr "Agrandir fonte"
+
+#: git-gui.sh:2581
+msgid "Show Less Context"
+msgstr "Montrer moins de contexte"
+
+#: git-gui.sh:2588
+msgid "Show More Context"
+msgstr "Montrer plus de contexte"
+
+#: git-gui.sh:2602
+msgid "Unstage Hunk From Commit"
+msgstr "Enlever section pré-commitée"
+
+#: git-gui.sh:2604
+msgid "Stage Hunk For Commit"
+msgstr "Pré-commiter section"
+
+#: git-gui.sh:2623
+msgid "Initializing..."
+msgstr "Initialisation..."
+
+#: git-gui.sh:2718
+#, tcl-format
+msgid ""
+"Possible environment issues exist.\n"
+"\n"
+"The following environment variables are probably\n"
+"going to be ignored by any Git subprocess run\n"
+"by %s:\n"
+"\n"
+msgstr ""
+"Des problèmes d'environnement sont possibles.\n"
+"\n"
+"Les variables d'environnement suivantes seront\n"
+"probablement ignorées par tous les\n"
+"sous-processus de Git lancés par %s\n"
+"\n"
+
+#: git-gui.sh:2748
+msgid ""
+"\n"
+"This is due to a known issue with the\n"
+"Tcl binary distributed by Cygwin."
+msgstr ""
+"\n"
+"Ceci est du à un problème connu avec\n"
+"le binaire Tcl distribué par Cygwin."
+
+#: git-gui.sh:2753
+#, tcl-format
+msgid ""
+"\n"
+"\n"
+"A good replacement for %s\n"
+"is placing values for the user.name and\n"
+"user.email settings into your personal\n"
+"~/.gitconfig file.\n"
+msgstr ""
+"\n"
+"\n"
+"Un bon remplacement pour %s\n"
+"est de mettre les valeurs pour 'user.name' (nom\n"
+"de l'utilisateur) et 'user.email' (addresse email\n"
+"de l'utilisateur) dans votre fichier '~/.gitconfig'.\n"
+
+#: lib/about.tcl:25
+msgid "git-gui - a graphical user interface for Git."
+msgstr "git-gui - une interface graphique utilisateur pour Git"
+
+#: lib/blame.tcl:77
+msgid "File Viewer"
+msgstr "Visionneur de fichier"
+
+#: lib/blame.tcl:81
+msgid "Commit:"
+msgstr "Commit :"
+
+#: lib/blame.tcl:249
+msgid "Copy Commit"
+msgstr "Copier commit"
+
+#: lib/blame.tcl:369
+#, tcl-format
+msgid "Reading %s..."
+msgstr "Lecture de %s..."
+
+#: lib/blame.tcl:473
+msgid "Loading copy/move tracking annotations..."
+msgstr "Chargement des annotations de suivi des copies/déplacements..."
+
+#: lib/blame.tcl:493
+msgid "lines annotated"
+msgstr "lignes annotées"
+
+#: lib/blame.tcl:674
+msgid "Loading original location annotations..."
+msgstr "Chargement des annotations d'emplacement original"
+
+#: lib/blame.tcl:677
+msgid "Annotation complete."
+msgstr "Annotation terminée."
+
+#: lib/blame.tcl:731
+msgid "Loading annotation..."
+msgstr "Chargement des annotations..."
+
+#: lib/blame.tcl:787
+msgid "Author:"
+msgstr "Auteur :"
+
+#: lib/blame.tcl:791
+msgid "Committer:"
+msgstr "Commiteur :"
+
+#: lib/blame.tcl:796
+msgid "Original File:"
+msgstr "Fichier original :"
+
+#: lib/blame.tcl:910
+msgid "Originally By:"
+msgstr "A l'origine par :"
+
+#: lib/blame.tcl:916
+msgid "In File:"
+msgstr "Dans le fichier :"
+
+#: lib/blame.tcl:921
+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"
+
+#: lib/branch_checkout.tcl:23
+msgid "Checkout"
+msgstr "Emprunter"
+
+#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
+#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:281
+#: lib/checkout_op.tcl:522 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/option.tcl:90 lib/remote_branch_delete.tcl:42 lib/transport.tcl:97
+msgid "Cancel"
+msgstr "Annuler"
+
+#: lib/branch_checkout.tcl:32 lib/browser.tcl:286
+msgid "Revision"
+msgstr "Révision"
+
+#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:202
+msgid "Options"
+msgstr "Options"
+
+#: lib/branch_checkout.tcl:39 lib/branch_create.tcl:92
+msgid "Fetch Tracking Branch"
+msgstr "Branche suivant récupération"
+
+#: lib/branch_checkout.tcl:44
+msgid "Detach From Local Branch"
+msgstr "Détacher de branche locale"
+
+#: lib/branch_create.tcl:22
+msgid "Create Branch"
+msgstr "Créer branche"
+
+#: lib/branch_create.tcl:27
+msgid "Create New Branch"
+msgstr "Créer nouvelle branche"
+
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:375
+msgid "Create"
+msgstr "Créer"
+
+#: lib/branch_create.tcl:40
+msgid "Branch Name"
+msgstr "Nom de branche"
+
+#: lib/branch_create.tcl:43
+msgid "Name:"
+msgstr "Nom :"
+
+#: lib/branch_create.tcl:58
+msgid "Match Tracking Branch Name"
+msgstr "Trouver nom de branche de suivi"
+
+#: lib/branch_create.tcl:66
+msgid "Starting Revision"
+msgstr "Début de révision"
+
+#: lib/branch_create.tcl:72
+msgid "Update Existing Branch:"
+msgstr "Mettre à jour branche existante :"
+
+#: lib/branch_create.tcl:75
+msgid "No"
+msgstr "Non"
+
+#: lib/branch_create.tcl:80
+msgid "Fast Forward Only"
+msgstr "Avance rapide seulement"
+
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:514
+msgid "Reset"
+msgstr "Réinitialiser"
+
+#: lib/branch_create.tcl:97
+msgid "Checkout After Creation"
+msgstr "Emprunt après création"
+
+#: lib/branch_create.tcl:131
+msgid "Please select a tracking branch."
+msgstr "Merci de choisir 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."
+
+#: lib/branch_create.tcl:153 lib/branch_rename.tcl:86
+msgid "Please supply a branch name."
+msgstr "Merci de fournir un nom de branche."
+
+#: lib/branch_create.tcl:164 lib/branch_rename.tcl:106
+#, tcl-format
+msgid "'%s' is not an acceptable branch name."
+msgstr "'%s' n'est pas un nom de branche acceptable."
+
+#: lib/branch_delete.tcl:15
+msgid "Delete Branch"
+msgstr "Supprimer branche"
+
+#: lib/branch_delete.tcl:20
+msgid "Delete Local Branch"
+msgstr "Supprimer branche locale"
+
+#: lib/branch_delete.tcl:37
+msgid "Local Branches"
+msgstr "Branches locales"
+
+#: lib/branch_delete.tcl:52
+msgid "Delete Only If Merged Into"
+msgstr "Supprimer ssi fusion dedans"
+
+#: lib/branch_delete.tcl:54
+msgid "Always (Do not perform merge test.)"
+msgstr "Toujours (Ne pas faire de test de fusion.)"
+
+#: lib/branch_delete.tcl:103
+#, tcl-format
+msgid "The following branches are not completely merged into %s:"
+msgstr "Les branches suivantes ne sont pas complètement fusionnées dans %s :"
+
+#: lib/branch_delete.tcl:115
+msgid ""
+"Recovering deleted branches is difficult. \n"
+"\n"
+" Delete the selected branches?"
+msgstr ""
+"Récupérer des branches supprimées est difficile.\n"
+"\n"
+"Supprimer les branches sélectionnées ?"
+
+#: lib/branch_delete.tcl:141
+#, tcl-format
+msgid ""
+"Failed to delete branches:\n"
+"%s"
+msgstr ""
+"La suppression des branches suivantes a échouée :\n"
+"%s"
+
+#: lib/branch_rename.tcl:14 lib/branch_rename.tcl:22
+msgid "Rename Branch"
+msgstr "Renommer branche"
+
+#: lib/branch_rename.tcl:26
+msgid "Rename"
+msgstr "Renommer"
+
+#: lib/branch_rename.tcl:36
+msgid "Branch:"
+msgstr "Branche :"
+
+#: lib/branch_rename.tcl:39
+msgid "New Name:"
+msgstr "Nouveau nom :"
+
+#: lib/branch_rename.tcl:75
+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
+#, tcl-format
+msgid "Branch '%s' already exists."
+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é."
+
+#: lib/browser.tcl:17
+msgid "Starting..."
+msgstr "Lancement..."
+
+#: lib/browser.tcl:26
+msgid "File Browser"
+msgstr "Visionneur de fichier"
+
+#: lib/browser.tcl:125 lib/browser.tcl:142
+#, tcl-format
+msgid "Loading %s..."
+msgstr "Chargement de %s..."
+
+#: lib/browser.tcl:186
+msgid "[Up To Parent]"
+msgstr "[Jusqu'au parent]"
+
+#: lib/browser.tcl:266 lib/browser.tcl:272
+msgid "Browse Branch Files"
+msgstr "Visionner fichiers de branches"
+
+#: lib/browser.tcl:277 lib/choose_repository.tcl:391
+#: lib/choose_repository.tcl:482 lib/choose_repository.tcl:492
+#: lib/choose_repository.tcl:989
+msgid "Browse"
+msgstr "Visionner"
+
+#: lib/checkout_op.tcl:79
+#, tcl-format
+msgid "Fetching %s from %s"
+msgstr "Récupération de %s à partir de %s"
+
+#: lib/checkout_op.tcl:127
+#, tcl-format
+msgid "fatal: Cannot resolve %s"
+msgstr "Erreur fatale : Impossible de résoudre %s"
+
+#: lib/checkout_op.tcl:140 lib/console.tcl:79 lib/database.tcl:31
+msgid "Close"
+msgstr "Fermer"
+
+#: lib/checkout_op.tcl:169
+#, tcl-format
+msgid "Branch '%s' does not exist."
+msgstr "La branche '%s' n'existe pas."
+
+#: lib/checkout_op.tcl:206
+#, tcl-format
+msgid ""
+"Branch '%s' already exists.\n"
+"\n"
+"It cannot fast-forward to %s.\n"
+"A merge is required."
+msgstr ""
+"La branche '%s' existe déjà.\n"
+"\n"
+"Impossible d'avancer rapidement à %s.\n"
+"Une fusion est nécessaire."
+
+#: lib/checkout_op.tcl:220
+#, 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
+#, tcl-format
+msgid "Failed to update '%s'."
+msgstr "La mise à jour de '%s' a échouée."
+
+#: lib/checkout_op.tcl:251
+msgid "Staging area (index) is already locked."
+msgstr "L'espace de pré-commit ('index' ou 'staging') est déjà vérouillé."
+
+#: lib/checkout_op.tcl:266
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before the current branch can be changed.\n"
+"\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"
+"\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"
+"\n"
+"Cela va être fait tout de suite automatiquement.\n"
+
+#: lib/checkout_op.tcl:322
+#, tcl-format
+msgid "Updating working directory to '%s'..."
+msgstr "Mise à jour du répertoire courant avec '%s'..."
+
+#: lib/checkout_op.tcl:353
+#, 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.)"
+
+#: lib/checkout_op.tcl:354
+msgid "File level merge required."
+msgstr "Il est nécessaire de fusionner des fichiers."
+
+#: lib/checkout_op.tcl:358
+#, tcl-format
+msgid "Staying on branch '%s'."
+msgstr "Le répertoire de travail reste sur la branche '%s'."
+
+#: lib/checkout_op.tcl:429
+msgid ""
+"You are no longer on a local branch.\n"
+"\n"
+"If you wanted to be on a branch, create one now starting from 'This Detached "
+"Checkout'."
+msgstr ""
+"Vous n'êtes plus ur une branche locale.\n"
+"\n"
+"Si vous vouliez être sur une branche, créez en une maintenant en partant de 'Cet emprunt détaché'."
+
+#: lib/checkout_op.tcl:446
+#, tcl-format
+msgid "Checked out '%s'."
+msgstr "'%s' emprunté."
+
+#: lib/checkout_op.tcl:478
+#, 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
+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
+#, tcl-format
+msgid "Reset '%s'?"
+msgstr "Réinitialiser '%s' ?"
+
+#: lib/checkout_op.tcl:510 lib/merge.tcl:164
+msgid "Visualize"
+msgstr "Visualiser"
+
+#: lib/checkout_op.tcl:578
+#, tcl-format
+msgid ""
+"Failed to set current branch.\n"
+"\n"
+"This working directory is only partially switched. We successfully updated "
+"your files, but failed to update an internal Git file.\n"
+"\n"
+"This should not have occurred. %s will now close and give up."
+msgstr ""
+"Le changement de la branche courante a échoué.\n"
+"\n"
+"Le répertoire courant n'est que partiellement modifié. Les fichiers ont été mis à jour avec succès, mais la mise à jour d'un fichier interne à Git a échouée.\n"
+"\n"
+"Cela n'aurait pas du se produire. %s va abandonner et se terminer."
+
+#: lib/choose_font.tcl:39
+msgid "Select"
+msgstr "Sélectionner"
+
+#: lib/choose_font.tcl:53
+msgid "Font Family"
+msgstr "Famille de fonte"
+
+#: lib/choose_font.tcl:73
+msgid "Font Size"
+msgstr "Taille de fonte"
+
+#: lib/choose_font.tcl:90
+msgid "Font Example"
+msgstr "Exemple de fonte"
+
+#: lib/choose_font.tcl:101
+msgid ""
+"This is example text.\n"
+"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."
+
+#: lib/choose_repository.tcl:27
+msgid "Git Gui"
+msgstr "Git Gui"
+
+#: lib/choose_repository.tcl:80 lib/choose_repository.tcl:380
+msgid "Create New Repository"
+msgstr "Créer nouveau référentiel"
+
+#: lib/choose_repository.tcl:86
+msgid "New..."
+msgstr "Nouveau..."
+
+#: lib/choose_repository.tcl:93 lib/choose_repository.tcl:468
+msgid "Clone Existing Repository"
+msgstr "Cloner référentiel existant"
+
+#: lib/choose_repository.tcl:99
+msgid "Clone..."
+msgstr "Cloner..."
+
+#: lib/choose_repository.tcl:106 lib/choose_repository.tcl:978
+msgid "Open Existing Repository"
+msgstr "Ouvrir référentiel existant"
+
+#: lib/choose_repository.tcl:112
+msgid "Open..."
+msgstr "Ouvrir..."
+
+#: lib/choose_repository.tcl:125
+msgid "Recent Repositories"
+msgstr "Référentiels récents"
+
+#: lib/choose_repository.tcl:131
+msgid "Open Recent Repository:"
+msgstr "Ouvrir référentiel récent :"
+
+#: lib/choose_repository.tcl:294
+#, tcl-format
+msgid "Location %s already exists."
+msgstr "L'emplacement %s existe déjà."
+
+#: lib/choose_repository.tcl:300 lib/choose_repository.tcl:307
+#: lib/choose_repository.tcl:314
+#, tcl-format
+msgid "Failed to create repository %s:"
+msgstr "La création du référentiel %s a échouée :"
+
+#: lib/choose_repository.tcl:385 lib/choose_repository.tcl:486
+msgid "Directory:"
+msgstr "Répertoire :"
+
+#: lib/choose_repository.tcl:415 lib/choose_repository.tcl:544
+#: lib/choose_repository.tcl:1013
+msgid "Git Repository"
+msgstr "Référentiel Git"
+
+#: lib/choose_repository.tcl:430 lib/choose_repository.tcl:437
+#, tcl-format
+msgid "Directory %s already exists."
+msgstr "Le répertoire %s existe déjà."
+
+#: lib/choose_repository.tcl:442
+#, tcl-format
+msgid "File %s already exists."
+msgstr "Le fichier %s existe déjà."
+
+#: lib/choose_repository.tcl:463
+msgid "Clone"
+msgstr "Cloner"
+
+#: lib/choose_repository.tcl:476
+msgid "URL:"
+msgstr "URL :"
+
+#: lib/choose_repository.tcl:496
+msgid "Clone Type:"
+msgstr "Type de clonage :"
+
+#: lib/choose_repository.tcl:502
+msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
+msgstr "Standard (rapide, semi-redondant, liens durs)"
+
+#: lib/choose_repository.tcl:508
+msgid "Full Copy (Slower, Redundant Backup)"
+msgstr "Copy complète (plus lent, sauvegarde redondante)"
+
+#: lib/choose_repository.tcl:514
+msgid "Shared (Fastest, Not Recommended, No Backup)"
+msgstr "Partagé (le plus rapide, non recommandé, pas de sauvegarde)"
+
+#: lib/choose_repository.tcl:550 lib/choose_repository.tcl:597
+#: lib/choose_repository.tcl:738 lib/choose_repository.tcl:808
+#: lib/choose_repository.tcl:1019 lib/choose_repository.tcl:1027
+#, tcl-format
+msgid "Not a Git repository: %s"
+msgstr "'%s' n'est pas un référentiel Git."
+
+#: lib/choose_repository.tcl:586
+msgid "Standard only available for local repository."
+msgstr "Standard n'est disponible que pour un référentiel local."
+
+#: lib/choose_repository.tcl:590
+msgid "Shared only available for local repository."
+msgstr "Partagé n'est disponible que pour un référentiel local."
+
+#: lib/choose_repository.tcl:617
+msgid "Failed to configure origin"
+msgstr "La configuration de l'origine a échouée."
+
+#: lib/choose_repository.tcl:629
+msgid "Counting objects"
+msgstr "Comptage des objets"
+
+#: lib/choose_repository.tcl:630
+msgid "buckets"
+msgstr "paniers"
+
+#: lib/choose_repository.tcl:654
+#, tcl-format
+msgid "Unable to copy objects/info/alternates: %s"
+msgstr "Impossible de copier 'objects/info/alternates' : %s"
+
+#: lib/choose_repository.tcl:690
+#, tcl-format
+msgid "Nothing to clone from %s."
+msgstr "Il n'y a rien à cloner depuis %s."
+
+#: lib/choose_repository.tcl:692 lib/choose_repository.tcl:906
+#: lib/choose_repository.tcl:918
+msgid "The 'master' branch has not been initialized."
+msgstr "Cette branche 'master' n'a pas été initialisée."
+
+#: lib/choose_repository.tcl:705
+msgid "Hardlinks are unavailable. Falling back to copying."
+msgstr "Les liens durs ne sont pas disponibles. On se résoud à copier."
+
+#: lib/choose_repository.tcl:717
+#, tcl-format
+msgid "Cloning from %s"
+msgstr "Clonage depuis %s"
+
+#: lib/choose_repository.tcl:748
+msgid "Copying objects"
+msgstr "Copie des objets"
+
+#: lib/choose_repository.tcl:749
+msgid "KiB"
+msgstr "KiB"
+
+#: lib/choose_repository.tcl:773
+#, tcl-format
+msgid "Unable to copy object: %s"
+msgstr "Impossible de copier l'objet : %s"
+
+#: lib/choose_repository.tcl:783
+msgid "Linking objects"
+msgstr "Liaison des objets"
+
+#: lib/choose_repository.tcl:784
+msgid "objects"
+msgstr "objets"
+
+#: lib/choose_repository.tcl:792
+#, tcl-format
+msgid "Unable to hardlink object: %s"
+msgstr "Impossible créer un lien dur pour l'objet : %s"
+
+#: lib/choose_repository.tcl:847
+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:858
+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."
+
+#: lib/choose_repository.tcl:882
+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:891
+#, tcl-format
+msgid "Unable to cleanup %s"
+msgstr "Impossible de nettoyer %s"
+
+#: lib/choose_repository.tcl:897
+msgid "Clone failed."
+msgstr "Le clonage a échoué."
+
+#: lib/choose_repository.tcl:904
+msgid "No default branch obtained."
+msgstr "Aucune branche par défaut n'a été obtenue."
+
+#: lib/choose_repository.tcl:915
+#, tcl-format
+msgid "Cannot resolve %s as a commit."
+msgstr "Impossible de résoudre %s comme commit."
+
+#: lib/choose_repository.tcl:927
+msgid "Creating working directory"
+msgstr "Création du répertoire de travail"
+
+#: lib/choose_repository.tcl:928 lib/index.tcl:65 lib/index.tcl:127
+#: lib/index.tcl:193
+msgid "files"
+msgstr "fichiers"
+
+#: lib/choose_repository.tcl:957
+msgid "Initial file checkout failed."
+msgstr "L'emprunt initial de fichier a échoué."
+
+#: lib/choose_repository.tcl:973
+msgid "Open"
+msgstr "Ouvrir"
+
+#: lib/choose_repository.tcl:983
+msgid "Repository:"
+msgstr "Référentiel :"
+
+#: lib/choose_repository.tcl:1033
+#, tcl-format
+msgid "Failed to open repository %s:"
+msgstr "Impossible d'ouvrir le référentiel %s :"
+
+#: lib/choose_rev.tcl:53
+msgid "This Detached Checkout"
+msgstr "Cet emprunt détaché"
+
+#: lib/choose_rev.tcl:60
+msgid "Revision Expression:"
+msgstr "Expression de révision :"
+
+#: lib/choose_rev.tcl:74
+msgid "Local Branch"
+msgstr "Branche locale"
+
+#: lib/choose_rev.tcl:79
+msgid "Tracking Branch"
+msgstr "Suivi de branche"
+
+#: lib/choose_rev.tcl:84 lib/choose_rev.tcl:537
+msgid "Tag"
+msgstr "Marque"
+
+#: lib/choose_rev.tcl:317
+#, tcl-format
+msgid "Invalid revision: %s"
+msgstr "Révision invalide : %s"
+
+#: lib/choose_rev.tcl:338
+msgid "No revision selected."
+msgstr "Pas de révision selectionnée."
+
+#: lib/choose_rev.tcl:346
+msgid "Revision expression is empty."
+msgstr "L'expression de révision est vide."
+
+#: lib/choose_rev.tcl:530
+msgid "Updated"
+msgstr "Misa à jour"
+
+#: lib/choose_rev.tcl:558
+msgid "URL"
+msgstr "URL"
+
+#: lib/commit.tcl:9
+msgid ""
+"There is nothing to amend.\n"
+"\n"
+"You are about to create the initial commit. There is no commit before this "
+"to amend.\n"
+msgstr ""
+"Il n'y a rien à corriger.\n"
+"\n"
+"Vous allez créer le commit initial. Il n'y a pas de commit avant celui-ci à corriger.\n"
+
+#: lib/commit.tcl:18
+msgid ""
+"Cannot amend while merging.\n"
+"\n"
+"You are currently in the middle of a merge that has not been fully "
+"completed. You cannot amend the prior commit unless you first abort the "
+"current merge activity.\n"
+msgstr ""
+"Impossible de corriger pendant une fusion.\n"
+"\n"
+"Vous êtes actuellement au milieu d'une fusion qui n'a pas été completement terminée. Vous ne pouvez pas corriger le commit précédant sauf si vous abandonnez la fusion courante.\n"
+
+#: lib/commit.tcl:49
+msgid "Error loading commit data for amend:"
+msgstr "Erreur lors du chargement des données de commit pour correction :"
+
+#: lib/commit.tcl:76
+msgid "Unable to obtain your identity:"
+msgstr "Impossible d'obtenir votre identité :"
+
+#: lib/commit.tcl:81
+msgid "Invalid GIT_COMMITTER_IDENT:"
+msgstr "GIT_COMMITTER_IDENT invalide :"
+
+#: lib/commit.tcl:133
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before another commit can be created.\n"
+"\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"
+"\n"
+"Un autre programme Git a modifié ce référentiel depuis la dernière synchronisation. Une resynshronisation doit être effectuée avant de pouvoir créer un nouveau commit.\n"
+"\n"
+"Cela va être fait tout de suite automatiquement.\n"
+
+#: lib/commit.tcl:154
+#, tcl-format
+msgid ""
+"Unmerged files cannot be committed.\n"
+"\n"
+"File %s has merge conflicts. You must resolve them and stage the file "
+"before committing.\n"
+msgstr ""
+"Des fichiers non fusionnés ne peuvent être commités.\n"
+"\n"
+"Le fichier %s a des conflicts de fusion. Vous devez les résoudre et pré-commiter le fichier avant de pouvoir commiter.\n"
+
+#: lib/commit.tcl:162
+#, tcl-format
+msgid ""
+"Unknown file state %s detected.\n"
+"\n"
+"File %s cannot be committed by this program.\n"
+msgstr ""
+"Un état de fichier inconnu %s a été détecté.\n"
+"\n"
+"Le fichier %s ne peut pas être commité par ce programme.\n"
+
+#: lib/commit.tcl:170
+msgid ""
+"No changes to commit.\n"
+"\n"
+"You must stage at least 1 file before you can commit.\n"
+msgstr ""
+"Pas de modification à commiter.\n"
+"\n"
+"Vous devez pré-commiter au moins 1 fichier avant de pouvoir commiter.\n"
+
+#: lib/commit.tcl:183
+msgid ""
+"Please supply a commit message.\n"
+"\n"
+"A good commit message has the following format:\n"
+"\n"
+"- First line: Describe in one sentence what you did.\n"
+"- Second line: Blank\n"
+"- Remaining lines: Describe why this change is good.\n"
+msgstr ""
+"Merci de fournir un message de commit.\n"
+"\n"
+"Un bon message de commit a le format suivant :\n"
+"\n"
+"- Première ligne : décrire en une phrase ce que vous avez fait.\n"
+"- Deuxième ligne : rien.\n"
+"- Lignes suivantes : Décrire pourquoi ces modifications sont bonnes.\n"
+
+#: lib/commit.tcl:257
+msgid "write-tree failed:"
+msgstr "write-tree a échoué :"
+
+#: lib/commit.tcl:275
+#, tcl-format
+msgid "Commit %s appears to be corrupt"
+msgstr "Le commit %s semble être corrompu"
+
+#: lib/commit.tcl:279
+msgid ""
+"No changes to commit.\n"
+"\n"
+"No files were modified by this commit and it was not a merge commit.\n"
+"\n"
+"A rescan will be automatically started now.\n"
+msgstr ""
+"Pas de modification à commiter.\n"
+"\n"
+"Aucun fichier n'a été modifié par ce commit et il ne s'agit pas d'un commit de fusion.\n"
+"\n"
+"Une resynchronisation va être lancée tout de suite automatiquement.\n"
+
+#: lib/commit.tcl:286
+msgid "No changes to commit."
+msgstr "Pas de modifications à commiter."
+
+#: lib/commit.tcl:303
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "attention : Tcl ne supporte pas l'encodage '%s'."
+
+#: lib/commit.tcl:317
+msgid "commit-tree failed:"
+msgstr "commit-tree a échoué :"
+
+#: lib/commit.tcl:339
+msgid "update-ref failed:"
+msgstr "update-ref a échoué"
+
+#: lib/commit.tcl:430
+#, tcl-format
+msgid "Created commit %s: %s"
+msgstr "Commit créé %s : %s"
+
+#: lib/console.tcl:57
+msgid "Working... please wait..."
+msgstr "Travail en cours... merci de patienter..."
+
+#: lib/console.tcl:183
+msgid "Success"
+msgstr "Succès"
+
+#: lib/console.tcl:196
+msgid "Error: Command Failed"
+msgstr "Erreur : échec de la commande"
+
+#: lib/database.tcl:43
+msgid "Number of loose objects"
+msgstr "Nombre d'objets en fichier particulier"
+
+#: lib/database.tcl:44
+msgid "Disk space used by loose objects"
+msgstr "Espace disque utilisé par les fichiers particuliers"
+
+#: lib/database.tcl:45
+msgid "Number of packed objects"
+msgstr "Nombre d'objets empaquetés"
+
+#: lib/database.tcl:46
+msgid "Number of packs"
+msgstr "Nombre de paquets d'objets"
+
+#: lib/database.tcl:47
+msgid "Disk space used by packed objects"
+msgstr "Espace disque utilisé par les objets empaquetés"
+
+#: lib/database.tcl:48
+msgid "Packed objects waiting for pruning"
+msgstr "Objets empaquetés attendant d'être supprimés"
+
+#: lib/database.tcl:49
+msgid "Garbage files"
+msgstr "Fichiers poubelle"
+
+#: lib/database.tcl:72ets
+msgid "Compressing the object database"
+msgstr "Compression de la base des objets"
+
+#: lib/database.tcl:83
+msgid "Verifying the object database with fsck-objects"
+msgstr "Vérification de la base des objets avec fsck-objects"
+
+#: lib/database.tcl:108
+#, tcl-format
+msgid ""
+"This repository currently has approximately %i loose objects.\n"
+"\n"
+"To maintain optimal performance it is strongly recommended that you compress "
+"the database when more than %i loose objects exist.\n"
+"\n"
+"Compress the database now?"
+msgstr ""
+"Ce référentiel comprend actuellement environ %i objets ayant leur fichier particulier.\n"
+"\n"
+"Pour conserver une performance optimale, il est fortement recommandé de comprimer la base quand plus de %i objets ayant leur fichier particulier existent.\n"
+"\n"
+"Comprimer la base maintenant ?"
+
+#: lib/date.tcl:25
+#, tcl-format
+msgid "Invalid date from Git: %s"
+msgstr "Date invalide de Git : %s"
+
+#: lib/diff.tcl:42
+#, tcl-format
+msgid ""
+"No differences detected.\n"
+"\n"
+"%s has no changes.\n"
+"\n"
+"The modification date of this file was updated by another application, but "
+"the content within the file was not changed.\n"
+"\n"
+"A rescan will be automatically started to find other files which may have "
+"the same state."
+msgstr ""
+"Aucune différence détectée.\n"
+"\n"
+"%s ne comporte aucune modification.\n"
+"\n"
+"La date de modification de ce fichier a été mise à jour par une autre application, mais le contenu du fichier n'a pas changé.\n"
+"\n"
+"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
+#, tcl-format
+msgid "Loading diff of %s..."
+msgstr "Chargement des différences de %s..."
+
+#: lib/diff.tcl:114 lib/diff.tcl:184
+#, tcl-format
+msgid "Unable to display %s"
+msgstr "Impossible d'afficher %s"
+
+#: lib/diff.tcl:115
+msgid "Error loading file:"
+msgstr "Erreur lors du chargement du fichier :"
+
+#: lib/diff.tcl:122
+msgid "Git Repository (subproject)"
+msgstr "Référentiel Git (sous projet)"
+
+#: lib/diff.tcl:134
+msgid "* Binary file (not showing content)."
+msgstr "* Fichier binaire (pas d'apperçu du contenu)."
+
+#: lib/diff.tcl:185
+msgid "Error loading diff:"
+msgstr "Erreur lors du chargement des différences :"
+
+#: lib/diff.tcl:302
+msgid "Failed to unstage selected hunk."
+msgstr "La suppression dans le pré-commit de la section sélectionnée a échouée."
+
+#: lib/diff.tcl:309
+msgid "Failed to stage selected hunk."
+msgstr "Le pré-commit de la section sélectionnée a échoué."
+
+#: lib/error.tcl:12 lib/error.tcl:102
+msgid "error"
+msgstr "erreur"
+
+#: lib/error.tcl:28
+msgid "warning"
+msgstr "attention"
+
+#: lib/error.tcl:81
+msgid "You must correct the above errors before committing."
+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."
+
+#: lib/index.tcl:15
+msgid "Index Error"
+msgstr "Erreur de pré-commit"
+
+#: 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."
+
+#: lib/index.tcl:27
+msgid "Continue"
+msgstr "Continuer"
+
+#: lib/index.tcl:31
+msgid "Unlock Index"
+msgstr "Dévérouiller le pré-commit"
+
+#: lib/index.tcl:282
+#, tcl-format
+msgid "Unstaging %s from commit"
+msgstr "Supprimer %s du commit"
+
+#: lib/index.tcl:326
+#, tcl-format
+msgid "Adding %s"
+msgstr "Ajouter %s"
+
+#: lib/index.tcl:381
+#, tcl-format
+msgid "Revert changes in file %s?"
+msgstr "Inverser 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 ?"
+
+#: lib/index.tcl:389
+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."
+
+#: lib/index.tcl:392
+msgid "Do Nothing"
+msgstr "Ne rien faire"
+
+#: lib/merge.tcl:13
+msgid ""
+"Cannot merge while amending.\n"
+"\n"
+"You must finish amending this commit before starting any type of merge.\n"
+msgstr ""
+"Impossible de fucionner pendant une correction.\n"
+"\n"
+"Vous devez finir de corriger ce commit avant de lancer une quelconque fusion.\n"
+
+#: lib/merge.tcl:27
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before a merge can be performed.\n"
+"\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"
+"\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 fusionner de nouveau.\n"
+"\n"
+"Cela va être fait tout de suite automatiquement\n"
+
+#: lib/merge.tcl:44
+#, tcl-format
+msgid ""
+"You are in the middle of a conflicted merge.\n"
+"\n"
+"File %s has merge conflicts.\n"
+"\n"
+"You must resolve them, stage the file, and commit to complete the current "
+"merge. Only then can you begin another merge.\n"
+msgstr ""
+"Vous êtes au milieu d'une fusion conflictuelle.\n"
+"\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 d'effectuer une nouvelle fusion.\n"
+
+#: lib/merge.tcl:54
+#, tcl-format
+msgid ""
+"You are in the middle of a change.\n"
+"\n"
+"File %s is modified.\n"
+"\n"
+"You should complete the current commit before starting a merge. Doing so "
+"will help you abort a failed merge, should the need arise.\n"
+msgstr ""
+"Vous êtes au milieu d'une modification.\n"
+"\n"
+"Le fichier %s est modifié.\n"
+"\n"
+"Vous devriez terminer le commit courant avant de lancer une fusion. En faisait comme cela, vous éviterez de devoir éventuellement abandonner une fusion ayant échouée.\n"
+
+#: lib/merge.tcl:106
+#, tcl-format
+msgid "%s of %s"
+msgstr "%s de %s"
+
+#: lib/merge.tcl:119
+#, tcl-format
+msgid "Merging %s and %s"
+msgstr "Fusion de %s et %s"
+
+#: lib/merge.tcl:131
+msgid "Merge completed successfully."
+msgstr "La fusion s'est faite avec succès."
+
+#: lib/merge.tcl:133
+msgid "Merge failed. Conflict resolution is required."
+msgstr "La fusion a echouée. Il est nécessaire de résoudre les conflicts."
+
+#: lib/merge.tcl:158
+#, tcl-format
+msgid "Merge Into %s"
+msgstr "Fusion dans %s"
+
+#: lib/merge.tcl:177
+msgid "Revision To Merge"
+msgstr "Révision à fusionner"
+
+#: lib/merge.tcl:212
+msgid ""
+"Cannot abort while amending.\n"
+"\n"
+"You must finish amending this commit.\n"
+msgstr ""
+"Impossible d'abandonner en cours de correction.\n"
+"\n"
+"Vous devez finir de corriger ce commit.\n"
+
+#: lib/merge.tcl:222
+msgid ""
+"Abort merge?\n"
+"\n"
+"Aborting the current merge will cause *ALL* uncommitted changes to be lost.\n"
+"\n"
+"Continue with aborting the current merge?"
+msgstr ""
+"Abandonner la fusion ?\n"
+"\n"
+"Abandonner la fusion courante entrainera la perte de TOUTES les modifications non commitées.\n"
+"\n"
+"Abandonner quand même la fusion courante ?"
+
+#: lib/merge.tcl:228
+msgid ""
+"Reset changes?\n"
+"\n"
+"Resetting the changes will cause *ALL* uncommitted changes to be lost.\n"
+"\n"
+"Continue with resetting the current changes?"
+msgstr ""
+"Réinitialiser les modifications ?\n"
+"\n"
+"Réinitialiser les modifications va faire perdre TOUTES les modifications non commitées.\n"
+"\n"
+"Réinitialiser quand même les modifications courantes ?"
+
+#: lib/merge.tcl:239
+msgid "Aborting"
+msgstr "Abandon"
+
+#: lib/merge.tcl:266
+msgid "Abort failed."
+msgstr "L'abandon a échoué."
+
+#: lib/merge.tcl:268
+msgid "Abort completed. Ready."
+msgstr "Abandon teminé. Prêt."
+
+#: lib/option.tcl:82
+msgid "Restore Defaults"
+msgstr "Remettre les valeurs par défaut"
+
+#: lib/option.tcl:86
+msgid "Save"
+msgstr "Sauvegarder"
+
+#: lib/option.tcl:96
+#, tcl-format
+msgid "%s Repository"
+msgstr "Référentiel de %s"
+
+#: lib/option.tcl:97
+msgid "Global (All Repositories)"
+msgstr "Globales (tous les référentiels)"
+
+#: lib/option.tcl:103
+msgid "User Name"
+msgstr "Nom d'utilisateur"
+
+#: lib/option.tcl:104
+msgid "Email Address"
+msgstr "Adresse email"
+
+#: lib/option.tcl:106
+msgid "Summarize Merge Commits"
+msgstr "Résumer les commits de fusion"
+
+#: lib/option.tcl:107
+msgid "Merge Verbosity"
+msgstr "Fusion bavarde"
+
+#: lib/option.tcl:108
+msgid "Show Diffstat After Merge"
+msgstr "Montrer statistiques de diff après fusion"
+
+#: lib/option.tcl:110
+msgid "Trust File Modification Timestamps"
+msgstr "Faire confiance aux dates de modification de fichiers "
+
+#: lib/option.tcl:111
+msgid "Prune Tracking Branches During Fetch"
+msgstr "Nettoyer les branches de suivi pendant la récupération"
+
+#: lib/option.tcl:112
+msgid "Match Tracking Branches"
+msgstr "Faire correspondre les branches de suivi"
+
+#: lib/option.tcl:113
+msgid "Number of Diff Context Lines"
+msgstr "Nombre de lignes de contexte dans les diffs"
+
+#: lib/option.tcl:114
+msgid "New Branch Name Template"
+msgstr "Nouveau modèle de nom de branche"
+
+#: lib/option.tcl:176
+msgid "Change Font"
+msgstr "Modifier les fontes"
+
+#: lib/option.tcl:180
+#, tcl-format
+msgid "Choose %s"
+msgstr "Choisir %s"
+
+#: lib/option.tcl:186
+msgid "pt."
+msgstr "pt."
+
+#: lib/option.tcl:200
+msgid "Preferences"
+msgstr "Préférences"
+
+#: lib/option.tcl:235
+msgid "Failed to completely save options:"
+msgstr "La sauvegarde complète des options a échouée :"
+
+#: 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"
+
+#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
+msgid "Remote:"
+msgstr "Branche distante :"
+
+#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:138
+msgid "Arbitrary URL:"
+msgstr "URL arbitraire :"
+
+#: lib/remote_branch_delete.tcl:84
+msgid "Branches"
+msgstr "Branches"
+
+#: lib/remote_branch_delete.tcl:109
+msgid "Delete Only If"
+msgstr "Supprimer seulement si"
+
+#: lib/remote_branch_delete.tcl:111
+msgid "Merged Into:"
+msgstr "Fusionné dans :"
+
+#: lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "Toujours (ne pas vérifier les fusions)"
+
+#: lib/remote_branch_delete.tcl:152
+msgid "A branch is required for 'Merged Into'."
+msgstr "Une branche est nécessaire pour 'Fusionné dans'."
+
+#: lib/remote_branch_delete.tcl:184
+#, tcl-format
+msgid ""
+"The following branches are not completely merged into %s:\n"
+"\n"
+" - %s"
+msgstr ""
+"Les branches suivantes ne sont pas complètement fusionnées dans %s :\n"
+"\n"
+" - %s"
+
+#: lib/remote_branch_delete.tcl:189
+#, tcl-format
+msgid ""
+"One or more of the merge tests failed because you have not fetched the "
+"necessary commits. Try fetching from %s first."
+msgstr "Une ou plusieurs des tests de fusion ont échoués parce que vous n'avez pas récupéré les commits nécessaires. Essayez de récupéré à partir de %s d'abord."
+
+#: lib/remote_branch_delete.tcl:207
+msgid "Please select one or more branches to delete."
+msgstr "Merci de sélectionner une ou plusieurs branches à supprimer."
+
+#: lib/remote_branch_delete.tcl:216
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Récupérer des branches supprimées est difficile.\n"
+"\n"
+"Souhaitez vous supprimer les branches sélectionnées ?"
+
+#: lib/remote_branch_delete.tcl:226
+#, tcl-format
+msgid "Deleting branches from %s"
+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é."
+
+#: 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 :"
+
+#: lib/shortcut.tcl:136
+msgid "Cannot write icon:"
+msgstr "Impossible d'écrire l'icône :"
+
+#: lib/status_bar.tcl:83
+#, tcl-format
+msgid "%s ... %*i of %*i %s (%3i%%)"
+msgstr "%s ... %*i de %*i %s (%3i%%)"
+
+#: lib/transport.tcl:6
+#, tcl-format
+msgid "fetch %s"
+msgstr "récupérer %s"
+
+#: lib/transport.tcl:7
+#, tcl-format
+msgid "Fetching new changes from %s"
+msgstr "Récupération des dernières modifications de %s"
+
+#: lib/transport.tcl:18
+#, tcl-format
+msgid "remote prune %s"
+msgstr "nettoyer à distance %s"
+
+#: lib/transport.tcl:19
+#, tcl-format
+msgid "Pruning tracking branches deleted from %s"
+msgstr "Nettoyer les branches de suivi supprimées de %s"
+
+#: lib/transport.tcl:25 lib/transport.tcl:71
+#, tcl-format
+msgid "push %s"
+msgstr "pousser %s"
+
+#: lib/transport.tcl:26
+#, tcl-format
+msgid "Pushing changes to %s"
+msgstr "Les modifications sont poussées vers %s"
+
+#: lib/transport.tcl:72
+#, tcl-format
+msgid "Pushing %s %s to %s"
+msgstr "Pousse %s %s vers %s"
+
+#: lib/transport.tcl:89
+msgid "Push Branches"
+msgstr "Pousser branches"
+
+#: lib/transport.tcl:103
+msgid "Source Branches"
+msgstr "Branches source"
+
+#: lib/transport.tcl:120
+msgid "Destination Repository"
+msgstr "Référentiel de destination"
+
+#: lib/transport.tcl:158
+msgid "Transfer Options"
+msgstr "Transférer options"
+
+#: lib/transport.tcl:160
+msgid "Force overwrite existing branch (may discard changes)"
+msgstr "Forcer l'écrasement d'une branche existante (peut supprimer des modifications)"
+
+#: lib/transport.tcl:164
+msgid "Use thin pack (for slow network connections)"
+msgstr "Utiliser des petits paquets (pour les connexions lentes)"
+
+#: lib/transport.tcl:168
+msgid "Include tags"
+msgstr "Inclure les marques"
+
diff --git a/git-gui/po/glossary/de.po b/git-gui/po/glossary/de.po
index c94786c6a..0b33c572b 100644
--- a/git-gui/po/glossary/de.po
+++ b/git-gui/po/glossary/de.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: git-gui glossary\n"
-"POT-Creation-Date: 2007-10-19 21:43+0200\n"
-"PO-Revision-Date: 2007-10-20 15:24+0200\n"
+"POT-Creation-Date: 2008-01-07 21:20+0100\n"
+"PO-Revision-Date: 2008-01-15 20:32+0100\n"
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
"Language-Team: German \n"
"MIME-Version: 1.0\n"
@@ -62,7 +62,7 @@ msgstr ""
#. ""
msgid "clone [verb]"
-msgstr "kopieren"
+msgstr "klonen"
#. "A single point in the git history."
msgid "commit [noun]"
@@ -92,6 +92,10 @@ msgstr "Schnellzusammenführung"
msgid "fetch"
msgstr "anfordern (holen?)"
+#. "One context of consecutive lines in a whole patch, which consists of many such hunks"
+msgid "hunk"
+msgstr "Kontext"
+
#. "A collection of files. The index is a stored version of your working tree."
msgid "index (in git-gui: staging area)"
msgstr "Bereitstellung"
@@ -138,7 +142,7 @@ msgstr "zurücksetzen (zurückkehren?)"
#. ""
msgid "revert"
-msgstr "revidieren"
+msgstr "verwerfen (bei git-reset), revidieren (bei git-revert, also mit neuem commit)"
#. "A particular state of files and directories which was stored in the object database."
msgid "revision"
diff --git a/git-gui/po/glossary/fr.po b/git-gui/po/glossary/fr.po
new file mode 100644
index 000000000..27c006abb
--- /dev/null
+++ b/git-gui/po/glossary/fr.po
@@ -0,0 +1,166 @@
+# translation of fr.po to French
+# Translation of git-gui glossary to French
+# Copyright (C) 2008 Shawn Pearce, et al.
+#
+# Christian Couder <chriscool@tuxfamily.org>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"POT-Creation-Date: 2008-01-15 21:04+0100\n"
+"PO-Revision-Date: 2008-01-15 21:17+0100\n"
+"Last-Translator: Christian Couder <chriscool@tuxfamily.org>\n"
+"Language-Team: French\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"
+
+#. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)"
+msgid "English Term (Dear translator: This file will never be visible to the user!)"
+msgstr ""
+
+#. ""
+msgid "amend"
+msgstr "corriger"
+
+#. ""
+msgid "annotate"
+msgstr "annoter"
+
+#. "A 'branch' is an active line of development."
+msgid "branch [noun]"
+msgstr "branche"
+
+#. ""
+msgid "branch [verb]"
+msgstr "créer une branche"
+
+#. ""
+msgid "checkout [noun]"
+msgstr "emprunt"
+
+#. "The action of updating the working tree to a revision which was stored in the object database."
+msgid "checkout [verb]"
+msgstr "emprunter"
+
+#. ""
+msgid "clone [verb]"
+msgstr "cloner"
+
+#. "A single point in the git history."
+msgid "commit [noun]"
+msgstr "commit"
+
+#. "The action of storing a new snapshot of the project's state in the git history."
+msgid "commit [verb]"
+msgstr "commiter"
+
+#. ""
+msgid "diff [noun]"
+msgstr "différence"
+
+#. ""
+msgid "diff [verb]"
+msgstr "comparer"
+
+#. "A fast-forward is a special type of merge where you have a revision and you are merging another branch's changes that happen to be a descendant of what you have."
+msgid "fast forward merge"
+msgstr "fusion par avance rapide"
+
+#. "Fetching a branch means to get the branch's head from a remote repository, to find out which objects are missing from the local object database, and to get them, too."
+msgid "fetch"
+msgstr "récupérer"
+
+#. "A collection of files. The index is a stored version of your working tree."
+msgid "index (in git-gui: staging area)"
+msgstr "pré-commit"
+
+#. "A successful merge results in the creation of a new commit representing the result of the merge."
+msgid "merge [noun]"
+msgstr "fusion"
+
+#. "To bring the contents of another branch into the current branch."
+msgid "merge [verb]"
+msgstr "fusionner"
+
+#. ""
+msgid "message"
+msgstr "message"
+
+#. "Deletes all stale tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in 'remotes/<name>'."
+msgid "prune"
+msgstr "nettoyer"
+
+#. "Pulling a branch means to fetch it and merge it."
+msgid "pull"
+msgstr "tirer"
+
+#. "Pushing a branch means to get the branch's head ref from a remote repository, and ... (well, can someone please explain it for mere mortals?)"
+msgid "push"
+msgstr "pousser"
+
+#. ""
+msgid "redo"
+msgstr "refaire"
+
+#. "An other repository ('remote'). One might have a set of remotes whose branches one tracks."
+msgid "remote"
+msgstr "référentiel distant"
+
+#. "A collection of refs (?) together with an object database containing all objects which are reachable from the refs... (oops, you've lost me here. Again, please an explanation for mere mortals?)"
+msgid "repository"
+msgstr "référentiel"
+
+#. ""
+msgid "reset"
+msgstr "réinitialiser"
+
+#. ""
+msgid "revert"
+msgstr "inverser"
+
+#. "A particular state of files and directories which was stored in the object database."
+msgid "revision"
+msgstr "révision"
+
+#. ""
+msgid "sign off"
+msgstr "signer"
+
+#. ""
+msgid "staging area"
+msgstr "pré-commit"
+
+#. ""
+msgid "status"
+msgstr "état"
+
+#. "A ref pointing to a tag or commit object"
+msgid "tag [noun]"
+msgstr "marque"
+
+#. ""
+msgid "tag [verb]"
+msgstr "marquer"
+
+#. "A regular git branch that is used to follow changes from another repository."
+msgid "tracking branch"
+msgstr "branche de suivi"
+
+#. ""
+msgid "undo"
+msgstr "défaire"
+
+#. ""
+msgid "update"
+msgstr "mise à jour"
+
+#. ""
+msgid "verify"
+msgstr "vérifier"
+
+#. "The tree of actual checked out files."
+msgid "working copy, working tree"
+msgstr "copie de travail, arborescence de travail"
+
diff --git a/git-gui/po/glossary/git-gui-glossary.pot b/git-gui/po/glossary/git-gui-glossary.pot
index 48af80331..40eb3e9c0 100644
--- a/git-gui/po/glossary/git-gui-glossary.pot
+++ b/git-gui/po/glossary/git-gui-glossary.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2007-10-19 21:43+0200\n"
+"POT-Creation-Date: 2008-01-07 21:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -70,6 +70,10 @@ msgstr ""
msgid "fetch"
msgstr ""
+#. "One context of consecutive lines in a whole patch, which consists of many such hunks"
+msgid "hunk"
+msgstr ""
+
#. "A collection of files. The index is a stored version of your working tree."
msgid "index (in git-gui: staging area)"
msgstr ""
diff --git a/git-gui/po/glossary/git-gui-glossary.txt b/git-gui/po/glossary/git-gui-glossary.txt
index 500d0a0ea..9b31f6915 100644
--- a/git-gui/po/glossary/git-gui-glossary.txt
+++ b/git-gui/po/glossary/git-gui-glossary.txt
@@ -12,6 +12,7 @@
"diff [verb]" ""
"fast forward merge" "A fast-forward is a special type of merge where you have a revision and you are merging another branch's changes that happen to be a descendant of what you have."
"fetch" "Fetching a branch means to get the branch's head from a remote repository, to find out which objects are missing from the local object database, and to get them, too."
+"hunk" "One context of consecutive lines in a whole patch, which consists of many such hunks"
"index (in git-gui: staging area)" "A collection of files. The index is a stored version of your working tree."
"merge [noun]" "A successful merge results in the creation of a new commit representing the result of the merge."
"merge [verb]" "To bring the contents of another branch into the current branch."
diff --git a/git-gui/po/po2msg.sh b/git-gui/po/po2msg.sh
index c63248e37..b7c4bf3fd 100644
--- a/git-gui/po/po2msg.sh
+++ b/git-gui/po/po2msg.sh
@@ -127,7 +127,26 @@ foreach file $files {
}
if {$show_statistics} {
- puts [concat "$translated_count translated messages, " \
- "$fuzzy_count fuzzy ones, " \
- "$not_translated_count untranslated ones."]
+ set str ""
+
+ append str "$translated_count translated message"
+ if {$translated_count != 1} {
+ append str s
+ }
+
+ if {$fuzzy_count > 1} {
+ append str ", $fuzzy_count fuzzy translation"
+ if {$fuzzy_count != 1} {
+ append str s
+ }
+ }
+ if {$not_translated_count > 0} {
+ append str ", $not_translated_count untranslated message"
+ if {$not_translated_count != 1} {
+ append str s
+ }
+ }
+
+ append str .
+ puts $str
}
diff --git a/git-gui/po/sv.po b/git-gui/po/sv.po
new file mode 100644
index 000000000..cd3f40b4a
--- /dev/null
+++ b/git-gui/po/sv.po
@@ -0,0 +1,1895 @@
+# Swedish translation of git-gui.
+# Copyright (C) 2007 Shawn Pearce, et al.
+# This file is distributed under the same license as the git-gui package.
+#
+# Peter Karlsson <peter@softwolves.pp.se>, 2007-2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: sv\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-11-24 10:36+0100\n"
+"PO-Revision-Date: 2008-01-12 09:27+0100\n"
+"Last-Translator: Peter Karlsson <peter@softwolves.pp.se>\n"
+"Language-Team: Swedish <sv@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"
+
+#: git-gui.sh:41 git-gui.sh:604 git-gui.sh:618 git-gui.sh:631 git-gui.sh:714
+#: git-gui.sh:733
+msgid "git-gui: fatal error"
+msgstr "git-gui: ödesdigert fel"
+
+#: git-gui.sh:565
+#, tcl-format
+msgid "Invalid font specified in %s:"
+msgstr "Ogiltigt teckensnitt angivet i %s:"
+
+#: git-gui.sh:590
+msgid "Main Font"
+msgstr "Huvudteckensnitt"
+
+#: git-gui.sh:591
+msgid "Diff/Console Font"
+msgstr "Diff/konsolteckensnitt"
+
+#: git-gui.sh:605
+msgid "Cannot find git in PATH."
+msgstr "Hittar inte git i PATH."
+
+#: git-gui.sh:632
+msgid "Cannot parse Git version string:"
+msgstr "Kan inte tolka versionssträng från Git:"
+
+#: git-gui.sh:650
+#, tcl-format
+msgid ""
+"Git version cannot be determined.\n"
+"\n"
+"%s claims it is version '%s'.\n"
+"\n"
+"%s requires at least Git 1.5.0 or later.\n"
+"\n"
+"Assume '%s' is version 1.5.0?\n"
+msgstr ""
+"Kan inte avgöra Gits version.\n"
+"\n"
+"%s säger att dess version är \"%s\".\n"
+"\n"
+"%s kräver minst Git 1.5.0 eller senare.\n"
+"\n"
+"Anta att \"%s\" är version 1.5.0?\n"
+
+#: git-gui.sh:888
+msgid "Git directory not found:"
+msgstr "Git-katalogen hittades inte:"
+
+#: git-gui.sh:895
+msgid "Cannot move to top of working directory:"
+msgstr "Kan inte gå till början på arbetskatalogen:"
+
+#: git-gui.sh:902
+msgid "Cannot use funny .git directory:"
+msgstr "Kan inte använda underlig .git-katalog:"
+
+#: git-gui.sh:907
+msgid "No working directory"
+msgstr "Ingen arbetskatalog"
+
+#: git-gui.sh:1054
+msgid "Refreshing file status..."
+msgstr "Uppdaterar filstatus..."
+
+#: git-gui.sh:1119
+msgid "Scanning for modified files ..."
+msgstr "Söker efter ändrade filer..."
+
+#: git-gui.sh:1294 lib/browser.tcl:245
+msgid "Ready."
+msgstr "Klar."
+
+#: git-gui.sh:1560
+msgid "Unmodified"
+msgstr "Oförändrade"
+
+#: git-gui.sh:1562
+msgid "Modified, not staged"
+msgstr "Förändrade, ej köade"
+
+#: git-gui.sh:1563 git-gui.sh:1568
+msgid "Staged for commit"
+msgstr "Köade för incheckning"
+
+#: git-gui.sh:1564 git-gui.sh:1569
+msgid "Portions staged for commit"
+msgstr "Delar köade för incheckning"
+
+#: git-gui.sh:1565 git-gui.sh:1570
+msgid "Staged for commit, missing"
+msgstr "Köade för incheckning, saknade"
+
+#: git-gui.sh:1567
+msgid "Untracked, not staged"
+msgstr "Ej spårade, ej köade"
+
+#: git-gui.sh:1572
+msgid "Missing"
+msgstr "Saknade"
+
+#: git-gui.sh:1573
+msgid "Staged for removal"
+msgstr "Köade för borttagning"
+
+#: git-gui.sh:1574
+msgid "Staged for removal, still present"
+msgstr "Köade för borttagning, fortfarande närvarande"
+
+#: git-gui.sh:1576 git-gui.sh:1577 git-gui.sh:1578 git-gui.sh:1579
+msgid "Requires merge resolution"
+msgstr "Kräver konflikthantering efter sammanslagning"
+
+#: git-gui.sh:1614
+msgid "Starting gitk... please wait..."
+msgstr "Startar gitk... vänta..."
+
+#: git-gui.sh:1623
+#, tcl-format
+msgid ""
+"Unable to start gitk:\n"
+"\n"
+"%s does not exist"
+msgstr ""
+"Kan inte starta gitk:\n"
+"\n"
+"%s finns inte"
+
+#: git-gui.sh:1823 lib/choose_repository.tcl:35
+msgid "Repository"
+msgstr "Arkiv"
+
+#: git-gui.sh:1824
+msgid "Edit"
+msgstr "Redigera"
+
+#: git-gui.sh:1826 lib/choose_rev.tcl:560
+msgid "Branch"
+msgstr "Gren"
+
+#: git-gui.sh:1829 lib/choose_rev.tcl:547
+msgid "Commit@@noun"
+msgstr "Incheckning"
+
+#: git-gui.sh:1832 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+msgid "Merge"
+msgstr "Slå ihop"
+
+#: git-gui.sh:1833 lib/choose_rev.tcl:556
+msgid "Remote"
+msgstr "Fjärr"
+
+#: git-gui.sh:1842
+msgid "Browse Current Branch's Files"
+msgstr "Bläddra i grenens filer"
+
+#: git-gui.sh:1846
+msgid "Browse Branch Files..."
+msgstr "Bläddra filer på gren..."
+
+#: git-gui.sh:1851
+msgid "Visualize Current Branch's History"
+msgstr "Visualisera grenens historik"
+
+#: git-gui.sh:1855
+msgid "Visualize All Branch History"
+msgstr "Visualisera alla grenars historik"
+
+#: git-gui.sh:1862
+#, tcl-format
+msgid "Browse %s's Files"
+msgstr "Bläddra i filer för %s"
+
+#: git-gui.sh:1864
+#, tcl-format
+msgid "Visualize %s's History"
+msgstr "Visualisera historik för %s"
+
+#: git-gui.sh:1869 lib/database.tcl:27 lib/database.tcl:67
+msgid "Database Statistics"
+msgstr "Databasstatistik"
+
+#: git-gui.sh:1872 lib/database.tcl:34
+msgid "Compress Database"
+msgstr "Komprimera databas"
+
+#: git-gui.sh:1875
+msgid "Verify Database"
+msgstr "Verifiera databas"
+
+#: git-gui.sh:1882 git-gui.sh:1886 git-gui.sh:1890 lib/shortcut.tcl:7
+#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+msgid "Create Desktop Icon"
+msgstr "Skapa skrivbordsikon"
+
+#: git-gui.sh:1895 lib/choose_repository.tcl:176 lib/choose_repository.tcl:184
+msgid "Quit"
+msgstr "Avsluta"
+
+#: git-gui.sh:1902
+msgid "Undo"
+msgstr "Ã…ngra"
+
+#: git-gui.sh:1905
+msgid "Redo"
+msgstr "Gör om"
+
+#: git-gui.sh:1909 git-gui.sh:2403
+msgid "Cut"
+msgstr "Klipp ut"
+
+#: git-gui.sh:1912 git-gui.sh:2406 git-gui.sh:2477 git-gui.sh:2549
+#: lib/console.tcl:67
+msgid "Copy"
+msgstr "Kopiera"
+
+#: git-gui.sh:1915 git-gui.sh:2409
+msgid "Paste"
+msgstr "Klistra in"
+
+#: git-gui.sh:1918 git-gui.sh:2412 lib/branch_delete.tcl:26
+#: lib/remote_branch_delete.tcl:38
+msgid "Delete"
+msgstr "Ta bort"
+
+#: git-gui.sh:1922 git-gui.sh:2416 git-gui.sh:2553 lib/console.tcl:69
+msgid "Select All"
+msgstr "Markera alla"
+
+#: git-gui.sh:1931
+msgid "Create..."
+msgstr "Skapa..."
+
+#: git-gui.sh:1937
+msgid "Checkout..."
+msgstr "Checka ut..."
+
+#: git-gui.sh:1943
+msgid "Rename..."
+msgstr "Byt namn..."
+
+#: git-gui.sh:1948 git-gui.sh:2048
+msgid "Delete..."
+msgstr "Ta bort..."
+
+#: git-gui.sh:1953
+msgid "Reset..."
+msgstr "Återställ..."
+
+#: git-gui.sh:1965 git-gui.sh:2350
+msgid "New Commit"
+msgstr "Ny incheckning"
+
+#: git-gui.sh:1973 git-gui.sh:2357
+msgid "Amend Last Commit"
+msgstr "Lägg till föregående incheckning"
+
+#: git-gui.sh:1982 git-gui.sh:2317 lib/remote_branch_delete.tcl:99
+msgid "Rescan"
+msgstr "Sök på nytt"
+
+#: git-gui.sh:1988
+msgid "Stage To Commit"
+msgstr "Köa för incheckning"
+
+#: git-gui.sh:1994
+msgid "Stage Changed Files To Commit"
+msgstr "Köa ändrade filer för incheckning"
+
+#: git-gui.sh:2000
+msgid "Unstage From Commit"
+msgstr "Ta bort från incheckningskö"
+
+#: git-gui.sh:2005 lib/index.tcl:393
+msgid "Revert Changes"
+msgstr "Återställ ändringar"
+
+#: git-gui.sh:2012 git-gui.sh:2329 git-gui.sh:2427
+msgid "Sign Off"
+msgstr "Skriv under"
+
+#: git-gui.sh:2016 git-gui.sh:2333
+msgid "Commit@@verb"
+msgstr "Checka in"
+
+#: git-gui.sh:2027
+msgid "Local Merge..."
+msgstr "Lokal sammanslagning..."
+
+#: git-gui.sh:2032
+msgid "Abort Merge..."
+msgstr "Avbryt sammanslagning..."
+
+#: git-gui.sh:2044
+msgid "Push..."
+msgstr "Sänd..."
+
+#: git-gui.sh:2055 lib/choose_repository.tcl:40
+msgid "Apple"
+msgstr "Äpple"
+
+#: git-gui.sh:2058 git-gui.sh:2080 lib/about.tcl:13
+#: lib/choose_repository.tcl:43 lib/choose_repository.tcl:49
+#, tcl-format
+msgid "About %s"
+msgstr "Om %s"
+
+#: git-gui.sh:2062
+msgid "Preferences..."
+msgstr "Inställningar..."
+
+#: git-gui.sh:2070 git-gui.sh:2595
+msgid "Options..."
+msgstr "Alternativ..."
+
+#: git-gui.sh:2076 lib/choose_repository.tcl:46
+msgid "Help"
+msgstr "Hjälp"
+
+#: git-gui.sh:2117
+msgid "Online Documentation"
+msgstr "Webbdokumentation"
+
+#: git-gui.sh:2201
+#, tcl-format
+msgid "fatal: cannot stat path %s: No such file or directory"
+msgstr "ödesdigert: kunde inte ta status på sökvägen %s: Fil eller katalog saknas"
+
+#: git-gui.sh:2234
+msgid "Current Branch:"
+msgstr "Aktuell gren:"
+
+#: git-gui.sh:2255
+msgid "Staged Changes (Will Commit)"
+msgstr "Köade ändringar (kommer att checkas in)"
+
+#: git-gui.sh:2274
+msgid "Unstaged Changes"
+msgstr "Oköade ändringar"
+
+#: git-gui.sh:2323
+msgid "Stage Changed"
+msgstr "Köa ändrade"
+
+#: git-gui.sh:2339 lib/transport.tcl:93 lib/transport.tcl:182
+msgid "Push"
+msgstr "Sänd"
+
+#: git-gui.sh:2369
+msgid "Initial Commit Message:"
+msgstr "Inledande incheckningsmeddelande:"
+
+#: git-gui.sh:2370
+msgid "Amended Commit Message:"
+msgstr "Utökat incheckningsmeddelande:"
+
+#: git-gui.sh:2371
+msgid "Amended Initial Commit Message:"
+msgstr "Utökat inledande incheckningsmeddelande:"
+
+#: git-gui.sh:2372
+msgid "Amended Merge Commit Message:"
+msgstr "Utökat incheckningsmeddelande för sammanslagning:"
+
+#: git-gui.sh:2373
+msgid "Merge Commit Message:"
+msgstr "Incheckningsmeddelande för sammanslagning:"
+
+#: git-gui.sh:2374
+msgid "Commit Message:"
+msgstr "Incheckningsmeddelande:"
+
+#: git-gui.sh:2419 git-gui.sh:2557 lib/console.tcl:71
+msgid "Copy All"
+msgstr "Kopiera alla"
+
+#: git-gui.sh:2443 lib/blame.tcl:104
+msgid "File:"
+msgstr "Fil:"
+
+#: git-gui.sh:2545
+msgid "Refresh"
+msgstr "Uppdatera"
+
+#: git-gui.sh:2566
+msgid "Apply/Reverse Hunk"
+msgstr "Använd/återställ del"
+
+#: git-gui.sh:2572
+msgid "Decrease Font Size"
+msgstr "Minska teckensnittsstorlek"
+
+#: git-gui.sh:2576
+msgid "Increase Font Size"
+msgstr "Öka teckensnittsstorlek"
+
+#: git-gui.sh:2581
+msgid "Show Less Context"
+msgstr "Visa mindre sammanhang"
+
+#: git-gui.sh:2588
+msgid "Show More Context"
+msgstr "Visa mer sammanhang"
+
+#: git-gui.sh:2602
+msgid "Unstage Hunk From Commit"
+msgstr "Ta bort del ur incheckningskö"
+
+#: git-gui.sh:2604
+msgid "Stage Hunk For Commit"
+msgstr "Ställ del i incheckningskö"
+
+#: git-gui.sh:2623
+msgid "Initializing..."
+msgstr "Initierar..."
+
+#: git-gui.sh:2718
+#, tcl-format
+msgid ""
+"Possible environment issues exist.\n"
+"\n"
+"The following environment variables are probably\n"
+"going to be ignored by any Git subprocess run\n"
+"by %s:\n"
+"\n"
+msgstr ""
+"Det finns möjliga problem med miljövariabler.\n"
+"\n"
+"Följande miljövariabler kommer troligen att\n"
+"ignoreras av alla Git-underprocesser som körs\n"
+"av %s:\n"
+"\n"
+
+#: git-gui.sh:2748
+msgid ""
+"\n"
+"This is due to a known issue with the\n"
+"Tcl binary distributed by Cygwin."
+msgstr ""
+"\n"
+"Detta beror på ett känt problem med\n"
+"Tcl-binären som följer med Cygwin."
+
+#: git-gui.sh:2753
+#, tcl-format
+msgid ""
+"\n"
+"\n"
+"A good replacement for %s\n"
+"is placing values for the user.name and\n"
+"user.email settings into your personal\n"
+"~/.gitconfig file.\n"
+msgstr ""
+"\n"
+"\n"
+"Du kan ersätta %s\n"
+"med att lägga in värden för inställningarna\n"
+"user.name och user.email i din personliga\n"
+"~/.gitconfig-fil.\n"
+
+#: lib/about.tcl:25
+msgid "git-gui - a graphical user interface for Git."
+msgstr "git-gui - ett grafiskt användargränssnitt för Git."
+
+#: lib/blame.tcl:77
+msgid "File Viewer"
+msgstr "Filvisare"
+
+#: lib/blame.tcl:81
+msgid "Commit:"
+msgstr "Incheckning:"
+
+#: lib/blame.tcl:249
+msgid "Copy Commit"
+msgstr "Kopiera incheckning"
+
+#: lib/blame.tcl:369
+#, tcl-format
+msgid "Reading %s..."
+msgstr "Läser %s..."
+
+#: lib/blame.tcl:473
+msgid "Loading copy/move tracking annotations..."
+msgstr "Läser annoteringar för kopiering/flyttning..."
+
+#: lib/blame.tcl:493
+msgid "lines annotated"
+msgstr "rader annoterade"
+
+#: lib/blame.tcl:674
+msgid "Loading original location annotations..."
+msgstr "Läser in annotering av originalplacering..."
+
+#: lib/blame.tcl:677
+msgid "Annotation complete."
+msgstr "Annotering fullbordad."
+
+#: lib/blame.tcl:731
+msgid "Loading annotation..."
+msgstr "Läser in annotering..."
+
+#: lib/blame.tcl:787
+msgid "Author:"
+msgstr "Författare:"
+
+#: lib/blame.tcl:791
+msgid "Committer:"
+msgstr "Incheckare:"
+
+#: lib/blame.tcl:796
+msgid "Original File:"
+msgstr "Ursprunglig fil:"
+
+#: lib/blame.tcl:910
+msgid "Originally By:"
+msgstr "Ursprungligen av:"
+
+#: lib/blame.tcl:916
+msgid "In File:"
+msgstr "I filen:"
+
+#: lib/blame.tcl:921
+msgid "Copied Or Moved Here By:"
+msgstr "Kopierad eller flyttad hit av:"
+
+#: lib/branch_checkout.tcl:14 lib/branch_checkout.tcl:19
+msgid "Checkout Branch"
+msgstr "Checka ut gren"
+
+#: lib/branch_checkout.tcl:23
+msgid "Checkout"
+msgstr "Checka ut"
+
+#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
+#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:281
+#: lib/checkout_op.tcl:522 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/option.tcl:90 lib/remote_branch_delete.tcl:42 lib/transport.tcl:97
+msgid "Cancel"
+msgstr "Avbryt"
+
+#: lib/branch_checkout.tcl:32 lib/browser.tcl:286
+msgid "Revision"
+msgstr "Revision"
+
+#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:202
+msgid "Options"
+msgstr "Alternativ"
+
+#: lib/branch_checkout.tcl:39 lib/branch_create.tcl:92
+msgid "Fetch Tracking Branch"
+msgstr "Hämta spårande gren"
+
+#: lib/branch_checkout.tcl:44
+msgid "Detach From Local Branch"
+msgstr "Koppla bort från lokal gren"
+
+#: lib/branch_create.tcl:22
+msgid "Create Branch"
+msgstr "Skapa gren"
+
+#: lib/branch_create.tcl:27
+msgid "Create New Branch"
+msgstr "Skapa ny gren"
+
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:375
+msgid "Create"
+msgstr "Skapa"
+
+#: lib/branch_create.tcl:40
+msgid "Branch Name"
+msgstr "Namn på gren"
+
+#: lib/branch_create.tcl:43
+msgid "Name:"
+msgstr "Namn:"
+
+#: lib/branch_create.tcl:58
+msgid "Match Tracking Branch Name"
+msgstr "Använd namn på spårad gren"
+
+#: lib/branch_create.tcl:66
+msgid "Starting Revision"
+msgstr "Inledande revision"
+
+#: lib/branch_create.tcl:72
+msgid "Update Existing Branch:"
+msgstr "Uppdatera befintlig gren:"
+
+#: lib/branch_create.tcl:75
+msgid "No"
+msgstr "Nej"
+
+#: lib/branch_create.tcl:80
+msgid "Fast Forward Only"
+msgstr "Endast snabbspolning"
+
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:514
+msgid "Reset"
+msgstr "Återställ"
+
+#: lib/branch_create.tcl:97
+msgid "Checkout After Creation"
+msgstr "Checka ut när skapad"
+
+#: lib/branch_create.tcl:131
+msgid "Please select a tracking branch."
+msgstr "Välj en gren att spåra."
+
+#: lib/branch_create.tcl:140
+#, tcl-format
+msgid "Tracking branch %s is not a branch in the remote repository."
+msgstr "Den spårade grenen %s är inte en gren i fjärrarkivet."
+
+#: lib/branch_create.tcl:153 lib/branch_rename.tcl:86
+msgid "Please supply a branch name."
+msgstr "Ange ett namn för grenen."
+
+#: lib/branch_create.tcl:164 lib/branch_rename.tcl:106
+#, tcl-format
+msgid "'%s' is not an acceptable branch name."
+msgstr "\"%s\" kan inte användas som namn på grenen."
+
+#: lib/branch_delete.tcl:15
+msgid "Delete Branch"
+msgstr "Ta bort gren"
+
+#: lib/branch_delete.tcl:20
+msgid "Delete Local Branch"
+msgstr "Ta bort lokal gren"
+
+#: lib/branch_delete.tcl:37
+msgid "Local Branches"
+msgstr "Lokala grenar"
+
+#: lib/branch_delete.tcl:52
+msgid "Delete Only If Merged Into"
+msgstr "Ta bara bort om sammanslagen med"
+
+#: lib/branch_delete.tcl:54
+msgid "Always (Do not perform merge test.)"
+msgstr "Alltid (utför inte sammanslagningstest)."
+
+#: lib/branch_delete.tcl:103
+#, tcl-format
+msgid "The following branches are not completely merged into %s:"
+msgstr "Följande grenar är inte till fullo sammanslagna med %s:"
+
+#: lib/branch_delete.tcl:115
+msgid ""
+"Recovering deleted branches is difficult. \n"
+"\n"
+" Delete the selected branches?"
+msgstr ""
+"Det är svårt att återställa borttagna grenar.\n"
+"\n"
+" Ta bort valda grenar?"
+
+#: lib/branch_delete.tcl:141
+#, tcl-format
+msgid ""
+"Failed to delete branches:\n"
+"%s"
+msgstr ""
+"Kunde inte ta bort grenar:\n"
+"%s"
+
+#: lib/branch_rename.tcl:14 lib/branch_rename.tcl:22
+msgid "Rename Branch"
+msgstr "Byt namn på gren"
+
+#: lib/branch_rename.tcl:26
+msgid "Rename"
+msgstr "Byt namn"
+
+#: lib/branch_rename.tcl:36
+msgid "Branch:"
+msgstr "Gren:"
+
+#: lib/branch_rename.tcl:39
+msgid "New Name:"
+msgstr "Nytt namn:"
+
+#: lib/branch_rename.tcl:75
+msgid "Please select a branch to rename."
+msgstr "Välj en gren att byta namn på."
+
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:179
+#, tcl-format
+msgid "Branch '%s' already exists."
+msgstr "Grenen \"%s\" finns redan."
+
+#: lib/branch_rename.tcl:117
+#, tcl-format
+msgid "Failed to rename '%s'."
+msgstr "Kunde inte byta namn på \"%s\"."
+
+#: lib/browser.tcl:17
+msgid "Starting..."
+msgstr "Startar..."
+
+#: lib/browser.tcl:26
+msgid "File Browser"
+msgstr "Filbläddrare"
+
+#: lib/browser.tcl:125 lib/browser.tcl:142
+#, tcl-format
+msgid "Loading %s..."
+msgstr "Läser %s..."
+
+#: lib/browser.tcl:186
+msgid "[Up To Parent]"
+msgstr "[Upp till förälder]"
+
+#: lib/browser.tcl:266 lib/browser.tcl:272
+msgid "Browse Branch Files"
+msgstr "Bläddra filer på grenen"
+
+#: lib/browser.tcl:277 lib/choose_repository.tcl:391
+#: lib/choose_repository.tcl:482 lib/choose_repository.tcl:492
+#: lib/choose_repository.tcl:989
+msgid "Browse"
+msgstr "Bläddra"
+
+#: lib/checkout_op.tcl:79
+#, tcl-format
+msgid "Fetching %s from %s"
+msgstr "Hämtar %s från %s"
+
+#: lib/checkout_op.tcl:127
+#, tcl-format
+msgid "fatal: Cannot resolve %s"
+msgstr "ödesdigert: Kunde inte slå upp %s"
+
+#: lib/checkout_op.tcl:140 lib/console.tcl:79 lib/database.tcl:31
+msgid "Close"
+msgstr "Stäng"
+
+#: lib/checkout_op.tcl:169
+#, tcl-format
+msgid "Branch '%s' does not exist."
+msgstr "Grenen \"%s\" finns inte."
+
+#: lib/checkout_op.tcl:206
+#, tcl-format
+msgid ""
+"Branch '%s' already exists.\n"
+"\n"
+"It cannot fast-forward to %s.\n"
+"A merge is required."
+msgstr ""
+"Grenen \"%s\" finns redan.\n"
+"\n"
+"Den kan inte snabbspolas till %s.\n"
+"En sammanslagning krävs."
+
+#: lib/checkout_op.tcl:220
+#, tcl-format
+msgid "Merge strategy '%s' not supported."
+msgstr "Sammanslagningsstrategin \"%s\" stöds inte."
+
+#: lib/checkout_op.tcl:239
+#, tcl-format
+msgid "Failed to update '%s'."
+msgstr "Misslyckades med att uppdatera \"%s\"."
+
+#: lib/checkout_op.tcl:251
+msgid "Staging area (index) is already locked."
+msgstr "Köområdet (index) är redan låst."
+
+#: lib/checkout_op.tcl:266
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before the current branch can be changed.\n"
+"\n"
+"The rescan will be automatically started now.\n"
+msgstr ""
+"Det senaste inlästa tillståndet motsvarar inte tillståndet i arkivet.\n"
+"\n"
+"Ett annat Git-program har ändrat arkivet sedan senaste avsökningen. Du "
+"måste utföra en ny sökning innan den aktuella grenen kan ändras.\n"
+"\n"
+"Sökningen kommer att startas automatiskt nu.\n"
+
+#: lib/checkout_op.tcl:322
+#, tcl-format
+msgid "Updating working directory to '%s'..."
+msgstr "Uppdaterar arbetskatalogen till \"%s\"..."
+
+#: lib/checkout_op.tcl:353
+#, tcl-format
+msgid "Aborted checkout of '%s' (file level merging is required)."
+msgstr "Avbryter utcheckning av \"%s\" (sammanslagning på filnivå krävs)."
+
+#: lib/checkout_op.tcl:354
+msgid "File level merge required."
+msgstr "Sammanslagning på filnivå krävs."
+
+#: lib/checkout_op.tcl:358
+#, tcl-format
+msgid "Staying on branch '%s'."
+msgstr "Stannar på grenen \"%s\"."
+
+#: lib/checkout_op.tcl:429
+msgid ""
+"You are no longer on a local branch.\n"
+"\n"
+"If you wanted to be on a branch, create one now starting from 'This Detached "
+"Checkout'."
+msgstr ""
+"Du är inte längre på en lokal gren.\n"
+"\n"
+"Om du ville vara på en gren skapar du en nu, baserad på \"Denna "
+"frånkopplade utcheckning\"."
+
+#: lib/checkout_op.tcl:446
+#, tcl-format
+msgid "Checked out '%s'."
+msgstr "Checkade ut \"%s\"."
+
+#: lib/checkout_op.tcl:478
+#, tcl-format
+msgid "Resetting '%s' to '%s' will lose the following commits:"
+msgstr "Om du återställer \"%s\" till \"%s\" får följande incheckningar förlorade:"
+
+#: lib/checkout_op.tcl:500
+msgid "Recovering lost commits may not be easy."
+msgstr "Det kanske inte är så enkelt att återskapa förlorade incheckningar."
+
+#: lib/checkout_op.tcl:505
+#, tcl-format
+msgid "Reset '%s'?"
+msgstr "Återställa \"%s\"?"
+
+#: lib/checkout_op.tcl:510 lib/merge.tcl:164
+msgid "Visualize"
+msgstr "Visualisera"
+
+#: lib/checkout_op.tcl:578
+#, tcl-format
+msgid ""
+"Failed to set current branch.\n"
+"\n"
+"This working directory is only partially switched. We successfully updated "
+"your files, but failed to update an internal Git file.\n"
+"\n"
+"This should not have occurred. %s will now close and give up."
+msgstr ""
+"Kunde inte ställa in aktuell gren.\n"
+"\n"
+"Arbetskatalogen har bara växlats delvis. Vi uppdaterade filerna "
+"utan problem, men kunde inte uppdatera en intern fil i Git.\n"
+"\n"
+"Detta skulle inte ha hänt. %s kommer nu stängas och ge upp."
+
+#: lib/choose_font.tcl:39
+msgid "Select"
+msgstr "Välj"
+
+#: lib/choose_font.tcl:53
+msgid "Font Family"
+msgstr "Teckensnittsfamilj"
+
+#: lib/choose_font.tcl:73
+msgid "Font Size"
+msgstr "Storlek"
+
+#: lib/choose_font.tcl:90
+msgid "Font Example"
+msgstr "Exempel"
+
+#: lib/choose_font.tcl:101
+msgid ""
+"This is example text.\n"
+"If you like this text, it can be your font."
+msgstr ""
+"Detta är en exempeltext.\n"
+"Om du tycker om den här texten kan den vara ditt teckensnitt."
+
+#: lib/choose_repository.tcl:27
+msgid "Git Gui"
+msgstr "Git Gui"
+
+#: lib/choose_repository.tcl:80 lib/choose_repository.tcl:380
+msgid "Create New Repository"
+msgstr "Skapa nytt arkiv"
+
+#: lib/choose_repository.tcl:86
+msgid "New..."
+msgstr "Nytt..."
+
+#: lib/choose_repository.tcl:93 lib/choose_repository.tcl:468
+msgid "Clone Existing Repository"
+msgstr "Klona befintligt arkiv"
+
+#: lib/choose_repository.tcl:99
+msgid "Clone..."
+msgstr "Klona..."
+
+#: lib/choose_repository.tcl:106 lib/choose_repository.tcl:978
+msgid "Open Existing Repository"
+msgstr "Öppna befintligt arkiv"
+
+#: lib/choose_repository.tcl:112
+msgid "Open..."
+msgstr "Öppna..."
+
+#: lib/choose_repository.tcl:125
+msgid "Recent Repositories"
+msgstr "Senaste arkiven"
+
+#: lib/choose_repository.tcl:131
+msgid "Open Recent Repository:"
+msgstr "Öppna tidigare arkiv:"
+
+#: lib/choose_repository.tcl:294
+#, tcl-format
+msgid "Location %s already exists."
+msgstr "Platsen %s finns redan."
+
+#: lib/choose_repository.tcl:300 lib/choose_repository.tcl:307
+#: lib/choose_repository.tcl:314
+#, tcl-format
+msgid "Failed to create repository %s:"
+msgstr "Kunde inte skapa arkivet %s:"
+
+#: lib/choose_repository.tcl:385 lib/choose_repository.tcl:486
+msgid "Directory:"
+msgstr "Katalog:"
+
+#: lib/choose_repository.tcl:415 lib/choose_repository.tcl:544
+#: lib/choose_repository.tcl:1013
+msgid "Git Repository"
+msgstr "Gitarkiv"
+
+#: lib/choose_repository.tcl:430 lib/choose_repository.tcl:437
+#, tcl-format
+msgid "Directory %s already exists."
+msgstr "Katalogen %s finns redan."
+
+#: lib/choose_repository.tcl:442
+#, tcl-format
+msgid "File %s already exists."
+msgstr "Filen %s finns redan."
+
+#: lib/choose_repository.tcl:463
+msgid "Clone"
+msgstr "Klona"
+
+#: lib/choose_repository.tcl:476
+msgid "URL:"
+msgstr "Webbadress:"
+
+#: lib/choose_repository.tcl:496
+msgid "Clone Type:"
+msgstr "Typ av klon:"
+
+#: lib/choose_repository.tcl:502
+msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
+msgstr "Standard (snabb, semiredundant, hårda länkar)"
+
+#: lib/choose_repository.tcl:508
+msgid "Full Copy (Slower, Redundant Backup)"
+msgstr "Full kopia (långsammare, redundant säkerhetskopia)"
+
+#: lib/choose_repository.tcl:514
+msgid "Shared (Fastest, Not Recommended, No Backup)"
+msgstr "Delad (snabbast, rekommenderas ej, ingen säkerhetskopia)"
+
+#: lib/choose_repository.tcl:550 lib/choose_repository.tcl:597
+#: lib/choose_repository.tcl:738 lib/choose_repository.tcl:808
+#: lib/choose_repository.tcl:1019 lib/choose_repository.tcl:1027
+#, tcl-format
+msgid "Not a Git repository: %s"
+msgstr "Inte ett Gitarkiv: %s"
+
+#: lib/choose_repository.tcl:586
+msgid "Standard only available for local repository."
+msgstr "Standard är endast tillgängligt för lokala arkiv."
+
+#: lib/choose_repository.tcl:590
+msgid "Shared only available for local repository."
+msgstr "Delat är endast tillgängligt för lokala arkiv."
+
+#: lib/choose_repository.tcl:617
+msgid "Failed to configure origin"
+msgstr "Kunde inte konfigurera ursprung"
+
+#: lib/choose_repository.tcl:629
+msgid "Counting objects"
+msgstr "Räknar objekt"
+
+#: lib/choose_repository.tcl:630
+msgid "buckets"
+msgstr "hinkar"
+
+#: lib/choose_repository.tcl:654
+#, tcl-format
+msgid "Unable to copy objects/info/alternates: %s"
+msgstr "Kunde inte kopiera objekt/info/alternativ: %s"
+
+#: lib/choose_repository.tcl:690
+#, tcl-format
+msgid "Nothing to clone from %s."
+msgstr "Ingenting att klona från %s."
+
+#: lib/choose_repository.tcl:692 lib/choose_repository.tcl:906
+#: lib/choose_repository.tcl:918
+msgid "The 'master' branch has not been initialized."
+msgstr "Grenen \"master\" har inte initierats."
+
+#: lib/choose_repository.tcl:705
+msgid "Hardlinks are unavailable. Falling back to copying."
+msgstr "Hårda länkar är inte tillgängliga. Faller tillbaka på kopiering."
+
+#: lib/choose_repository.tcl:717
+#, tcl-format
+msgid "Cloning from %s"
+msgstr "Klonar från %s"
+
+#: lib/choose_repository.tcl:748
+msgid "Copying objects"
+msgstr "Kopierar objekt"
+
+#: lib/choose_repository.tcl:749
+msgid "KiB"
+msgstr "KiB"
+
+#: lib/choose_repository.tcl:773
+#, tcl-format
+msgid "Unable to copy object: %s"
+msgstr "Kunde inte kopiera objekt: %s"
+
+#: lib/choose_repository.tcl:783
+msgid "Linking objects"
+msgstr "Länkar objekt"
+
+#: lib/choose_repository.tcl:784
+msgid "objects"
+msgstr "objekt"
+
+#: lib/choose_repository.tcl:792
+#, tcl-format
+msgid "Unable to hardlink object: %s"
+msgstr "Kunde inte hårdlänka objekt: %s"
+
+#: lib/choose_repository.tcl:847
+msgid "Cannot fetch branches and objects. See console output for details."
+msgstr "Kunde inte hämta grenar och objekt. Se konsolutdata för detaljer."
+
+#: lib/choose_repository.tcl:858
+msgid "Cannot fetch tags. See console output for details."
+msgstr "Kunde inte hämta taggar. Se konsolutdata för detaljer."
+
+#: lib/choose_repository.tcl:882
+msgid "Cannot determine HEAD. See console output for details."
+msgstr "Kunde inte avgöra HEAD. Se konsolutdata för detaljer."
+
+#: lib/choose_repository.tcl:891
+#, tcl-format
+msgid "Unable to cleanup %s"
+msgstr "Kunde inte städa upp %s"
+
+#: lib/choose_repository.tcl:897
+msgid "Clone failed."
+msgstr "Kloning misslyckades."
+
+#: lib/choose_repository.tcl:904
+msgid "No default branch obtained."
+msgstr "Hämtade ingen standardgren."
+
+#: lib/choose_repository.tcl:915
+#, tcl-format
+msgid "Cannot resolve %s as a commit."
+msgstr "Kunde inte slå upp %s till någon incheckning."
+
+#: lib/choose_repository.tcl:927
+msgid "Creating working directory"
+msgstr "Skapar arbetskatalog"
+
+#: lib/choose_repository.tcl:928 lib/index.tcl:65 lib/index.tcl:127
+#: lib/index.tcl:193
+msgid "files"
+msgstr "filer"
+
+#: lib/choose_repository.tcl:957
+msgid "Initial file checkout failed."
+msgstr "Inledande filutcheckning misslyckades."
+
+#: lib/choose_repository.tcl:973
+msgid "Open"
+msgstr "Öppna"
+
+#: lib/choose_repository.tcl:983
+msgid "Repository:"
+msgstr "Arkiv:"
+
+#: lib/choose_repository.tcl:1033
+#, tcl-format
+msgid "Failed to open repository %s:"
+msgstr "Kunde inte öppna arkivet %s:"
+
+#: lib/choose_rev.tcl:53
+msgid "This Detached Checkout"
+msgstr "Denna frånkopplade utcheckning"
+
+#: lib/choose_rev.tcl:60
+msgid "Revision Expression:"
+msgstr "Revisionsuttryck:"
+
+#: lib/choose_rev.tcl:74
+msgid "Local Branch"
+msgstr "Lokal gren"
+
+#: lib/choose_rev.tcl:79
+msgid "Tracking Branch"
+msgstr "Spårande gren"
+
+#: lib/choose_rev.tcl:84 lib/choose_rev.tcl:537
+msgid "Tag"
+msgstr "Tagg"
+
+#: lib/choose_rev.tcl:317
+#, tcl-format
+msgid "Invalid revision: %s"
+msgstr "Ogiltig revision: %s"
+
+#: lib/choose_rev.tcl:338
+msgid "No revision selected."
+msgstr "Ingen revision vald."
+
+#: lib/choose_rev.tcl:346
+msgid "Revision expression is empty."
+msgstr "Revisionsuttrycket är tomt."
+
+#: lib/choose_rev.tcl:530
+msgid "Updated"
+msgstr "Uppdaterad"
+
+#: lib/choose_rev.tcl:558
+msgid "URL"
+msgstr "Webbadress"
+
+#: lib/commit.tcl:9
+msgid ""
+"There is nothing to amend.\n"
+"\n"
+"You are about to create the initial commit. There is no commit before this "
+"to amend.\n"
+msgstr ""
+"Det finns ingenting att utöka.\n"
+"\n"
+"Du håller på att skapa den inledande incheckningen. Det finns ingen tidigare "
+"incheckning att utöka.\n"
+
+#: lib/commit.tcl:18
+msgid ""
+"Cannot amend while merging.\n"
+"\n"
+"You are currently in the middle of a merge that has not been fully "
+"completed. You cannot amend the prior commit unless you first abort the "
+"current merge activity.\n"
+msgstr ""
+"Kan inte utöka vid sammanslagning.\n"
+"\n"
+"Du är i mitten av en sammanslagning som inte är fullbordad. Du kan "
+"inte utöka tidigare incheckningar om du inte först avbryter den "
+"pågående sammanslagningen.\n"
+
+#: lib/commit.tcl:49
+msgid "Error loading commit data for amend:"
+msgstr "Fel vid inläsning av incheckningsdata för utökning:"
+
+#: lib/commit.tcl:76
+msgid "Unable to obtain your identity:"
+msgstr "Kunde inte hämta din identitet:"
+
+#: lib/commit.tcl:81
+msgid "Invalid GIT_COMMITTER_IDENT:"
+msgstr "Felaktig GIT_COMMITTER_IDENT:"
+
+#: lib/commit.tcl:133
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before another commit can be created.\n"
+"\n"
+"The rescan will be automatically started now.\n"
+msgstr ""
+"Det senaste inlästa tillståndet motsvarar inte tillståndet i arkivet.\n"
+"\n"
+"Ett annat Git-program har ändrat arkivet sedan senaste avsökningen. Du "
+"måste utföra en ny sökning innan du kan göra en ny incheckning.\n"
+"\n"
+"Sökningen kommer att startas automatiskt nu.\n"
+
+#: lib/commit.tcl:154
+#, tcl-format
+msgid ""
+"Unmerged files cannot be committed.\n"
+"\n"
+"File %s has merge conflicts. You must resolve them and stage the file "
+"before committing.\n"
+msgstr ""
+"Osammanslagna filer kan inte checkas in.\n"
+"\n"
+"Filen %s har sammanslagningskonflikter. Du måste lösa dem och köa filen "
+"innan du checkar in den.\n"
+
+#: lib/commit.tcl:162
+#, tcl-format
+msgid ""
+"Unknown file state %s detected.\n"
+"\n"
+"File %s cannot be committed by this program.\n"
+msgstr ""
+"Okänd filstatus %s upptäckt.\n"
+"\n"
+"Filen %s kan inte checkas in av programmet.\n"
+
+#: lib/commit.tcl:170
+msgid ""
+"No changes to commit.\n"
+"\n"
+"You must stage at least 1 file before you can commit.\n"
+msgstr ""
+"Inga ändringar att checka in.\n"
+"\n"
+"Du måste köa åtminstone en fil innan du kan checka in.\n"
+
+#: lib/commit.tcl:183
+msgid ""
+"Please supply a commit message.\n"
+"\n"
+"A good commit message has the following format:\n"
+"\n"
+"- First line: Describe in one sentence what you did.\n"
+"- Second line: Blank\n"
+"- Remaining lines: Describe why this change is good.\n"
+msgstr ""
+"Ange ett incheckningsmeddelande.\n"
+"\n"
+"Ett bra incheckningsmeddelande har följande format:\n"
+"\n"
+"- Första raden: Beskriv i en mening vad du gjorde.\n"
+"- Andra raden: Tom\n"
+"- Följande rader: Beskriv varför det här är en bra ändring.\n"
+
+#: lib/commit.tcl:257
+msgid "write-tree failed:"
+msgstr "write-tree misslyckades:"
+
+#: lib/commit.tcl:275
+#, tcl-format
+msgid "Commit %s appears to be corrupt"
+msgstr "Incheckningen %s verkar vara trasig"
+
+#: lib/commit.tcl:279
+msgid ""
+"No changes to commit.\n"
+"\n"
+"No files were modified by this commit and it was not a merge commit.\n"
+"\n"
+"A rescan will be automatically started now.\n"
+msgstr ""
+"Inga ändringar att checka in.\n"
+"\n"
+"Inga filer ändrades av incheckningen och det var inte en sammanslagning.\n"
+"\n"
+"En sökning kommer att startas automatiskt nu.\n"
+
+#: lib/commit.tcl:286
+msgid "No changes to commit."
+msgstr "Inga ändringar att checka in."
+
+#: lib/commit.tcl:303
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "varning: Tcl stöder inte teckenkodningen \"%s\"."
+
+#: lib/commit.tcl:317
+msgid "commit-tree failed:"
+msgstr "commit-tree misslyckades:"
+
+#: lib/commit.tcl:339
+msgid "update-ref failed:"
+msgstr "update-ref misslyckades:"
+
+#: lib/commit.tcl:430
+#, tcl-format
+msgid "Created commit %s: %s"
+msgstr "Skapade incheckningen %s: %s"
+
+#: lib/console.tcl:57
+msgid "Working... please wait..."
+msgstr "Arbetar... vänta..."
+
+#: lib/console.tcl:183
+msgid "Success"
+msgstr "Lyckades"
+
+#: lib/console.tcl:196
+msgid "Error: Command Failed"
+msgstr "Fel: Kommando misslyckades"
+
+#: lib/database.tcl:43
+msgid "Number of loose objects"
+msgstr "Antal lösa objekt"
+
+#: lib/database.tcl:44
+msgid "Disk space used by loose objects"
+msgstr "Diskutrymme använt av lösa objekt"
+
+#: lib/database.tcl:45
+msgid "Number of packed objects"
+msgstr "Antal packade objekt"
+
+#: lib/database.tcl:46
+msgid "Number of packs"
+msgstr "Antal paket"
+
+#: lib/database.tcl:47
+msgid "Disk space used by packed objects"
+msgstr "Diskutrymme använt av packade objekt"
+
+#: lib/database.tcl:48
+msgid "Packed objects waiting for pruning"
+msgstr "Packade objekt som väntar på städning"
+
+#: lib/database.tcl:49
+msgid "Garbage files"
+msgstr "Skräpfiler"
+
+#: lib/database.tcl:72
+msgid "Compressing the object database"
+msgstr "Komprimerar objektdatabasen"
+
+#: lib/database.tcl:83
+msgid "Verifying the object database with fsck-objects"
+msgstr "Verifierar objektdatabasen med fsck-objects"
+
+#: lib/database.tcl:108
+#, tcl-format
+msgid ""
+"This repository currently has approximately %i loose objects.\n"
+"\n"
+"To maintain optimal performance it is strongly recommended that you compress "
+"the database when more than %i loose objects exist.\n"
+"\n"
+"Compress the database now?"
+msgstr ""
+"Arkivet har för närvarande omkring %i lösa objekt.\n"
+"\n"
+"För att bibehålla optimal prestanda rekommenderas det å det bestämdaste att "
+"du komprimerar databasen när den innehåller mer än %i lösa objekt.\n"
+"\n"
+"Komprimera databasen nu?"
+
+#: lib/date.tcl:25
+#, tcl-format
+msgid "Invalid date from Git: %s"
+msgstr "Ogiltigt datum från Git: %s"
+
+#: lib/diff.tcl:42
+#, tcl-format
+msgid ""
+"No differences detected.\n"
+"\n"
+"%s has no changes.\n"
+"\n"
+"The modification date of this file was updated by another application, but "
+"the content within the file was not changed.\n"
+"\n"
+"A rescan will be automatically started to find other files which may have "
+"the same state."
+msgstr ""
+"Hittade inga skillnader.\n"
+"\n"
+"%s innehåller inga ändringar.\n"
+"\n"
+"Modifieringsdatum för filen uppdaterades av ett annat program, men innehållet "
+"i filen har inte ändrats.\n"
+"\n"
+"En sökning kommer automatiskt att startas för att hitta andra filer som kan "
+"vara i samma tillstånd."
+
+#: lib/diff.tcl:81
+#, tcl-format
+msgid "Loading diff of %s..."
+msgstr "Läser differens för %s..."
+
+#: lib/diff.tcl:114 lib/diff.tcl:184
+#, tcl-format
+msgid "Unable to display %s"
+msgstr "Kan inte visa %s"
+
+#: lib/diff.tcl:115
+msgid "Error loading file:"
+msgstr "Fel vid läsning av fil:"
+
+#: lib/diff.tcl:122
+msgid "Git Repository (subproject)"
+msgstr "Gitarkiv (underprojekt)"
+
+#: lib/diff.tcl:134
+msgid "* Binary file (not showing content)."
+msgstr "* Binärfil (visar inte innehållet)."
+
+#: lib/diff.tcl:185
+msgid "Error loading diff:"
+msgstr "Fel vid inläsning av differens:"
+
+#: lib/diff.tcl:302
+msgid "Failed to unstage selected hunk."
+msgstr "Kunde inte ta bort den valda delen från kön."
+
+#: lib/diff.tcl:309
+msgid "Failed to stage selected hunk."
+msgstr "Kunde inte lägga till den valda delen till kön."
+
+#: lib/error.tcl:12 lib/error.tcl:102
+msgid "error"
+msgstr "fel"
+
+#: lib/error.tcl:28
+msgid "warning"
+msgstr "varning"
+
+#: lib/error.tcl:81
+msgid "You must correct the above errors before committing."
+msgstr "Du måste rätta till felen ovan innan du checkar in."
+
+#: lib/index.tcl:6
+msgid "Unable to unlock the index."
+msgstr "Kunde inte låsa upp indexet."
+
+#: lib/index.tcl:15
+msgid "Index Error"
+msgstr "Indexfel"
+
+#: lib/index.tcl:21
+msgid ""
+"Updating the Git index failed. A rescan will be automatically started to "
+"resynchronize git-gui."
+msgstr ""
+"Misslyckades med att uppdatera Gitindexet. En omsökning kommer att startas "
+"automatiskt för att synkronisera om git-gui."
+
+#: lib/index.tcl:27
+msgid "Continue"
+msgstr "Forstätt"
+
+#: lib/index.tcl:31
+msgid "Unlock Index"
+msgstr "LÃ¥s upp index"
+
+#: lib/index.tcl:282
+#, tcl-format
+msgid "Unstaging %s from commit"
+msgstr "Tar bort %s för incheckningskön"
+
+#: lib/index.tcl:326
+#, tcl-format
+msgid "Adding %s"
+msgstr "Lägger till %s"
+
+#: lib/index.tcl:381
+#, tcl-format
+msgid "Revert changes in file %s?"
+msgstr "Återställ ändringarna i filen %s?"
+
+#: lib/index.tcl:383
+#, tcl-format
+msgid "Revert changes in these %i files?"
+msgstr "Återställ ändringarna i dessa %i filer?"
+
+#: lib/index.tcl:389
+msgid "Any unstaged changes will be permanently lost by the revert."
+msgstr "Alla oköade ändringar kommer permanent gå förlorade vid återställningen."
+
+#: lib/index.tcl:392
+msgid "Do Nothing"
+msgstr "Gör ingenting"
+
+#: lib/merge.tcl:13
+msgid ""
+"Cannot merge while amending.\n"
+"\n"
+"You must finish amending this commit before starting any type of merge.\n"
+msgstr ""
+"Kan inte slå ihop vid utökning.\n"
+"\n"
+"Du måste föra färdig utökningen av incheckningen innan du påbörjar någon "
+"slags sammanslagning.\n"
+
+#: lib/merge.tcl:27
+msgid ""
+"Last scanned state does not match repository state.\n"
+"\n"
+"Another Git program has modified this repository since the last scan. A "
+"rescan must be performed before a merge can be performed.\n"
+"\n"
+"The rescan will be automatically started now.\n"
+msgstr ""
+"Det senaste inlästa tillståndet motsvarar inte tillståndet i arkivet.\n"
+"\n"
+"Ett annat Git-program har ändrat arkivet sedan senaste avsökningen. Du "
+"måste utföra en ny sökning innan du kan utföra en sammanslagning.\n"
+"\n"
+"Sökningen kommer att startas automatiskt nu.\n"
+
+#: lib/merge.tcl:44
+#, tcl-format
+msgid ""
+"You are in the middle of a conflicted merge.\n"
+"\n"
+"File %s has merge conflicts.\n"
+"\n"
+"You must resolve them, stage the file, and commit to complete the current "
+"merge. Only then can you begin another merge.\n"
+msgstr ""
+"Du är mitt i en sammanslagning med konflikter.\n"
+"\n"
+"Filen %s har sammanslagningskonflikter.\n"
+"\n"
+"Du måste lösa dem, köa filen och checka in för att fullborda den aktuella "
+"sammanslagningen. När du gjort det kan du påbörja en ny sammanslagning.\n"
+
+#: lib/merge.tcl:54
+#, tcl-format
+msgid ""
+"You are in the middle of a change.\n"
+"\n"
+"File %s is modified.\n"
+"\n"
+"You should complete the current commit before starting a merge. Doing so "
+"will help you abort a failed merge, should the need arise.\n"
+msgstr ""
+"Du är mitt i en ändring.\n"
+"\n"
+"Filen %s har ändringar.\n"
+"\n"
+"Du bör fullborda den aktuella incheckningen innan du påbörjar en "
+"sammanslagning. Om du gör det blir det enklare att avbryta en misslyckad "
+"sammanslagning, om det skulle vara nödvändigt.\n"
+
+#: lib/merge.tcl:106
+#, tcl-format
+msgid "%s of %s"
+msgstr "%s av %s"
+
+#: lib/merge.tcl:119
+#, tcl-format
+msgid "Merging %s and %s"
+msgstr "Slår ihop %s och %s"
+
+#: lib/merge.tcl:131
+msgid "Merge completed successfully."
+msgstr "Sammanslagningen avslutades framgångsrikt."
+
+#: lib/merge.tcl:133
+msgid "Merge failed. Conflict resolution is required."
+msgstr "Sammanslagningen misslyckades. Du måste lösa konflikterna."
+
+#: lib/merge.tcl:158
+#, tcl-format
+msgid "Merge Into %s"
+msgstr "Slå ihop i %s"
+
+#: lib/merge.tcl:177
+msgid "Revision To Merge"
+msgstr "Revisioner att slå ihop"
+
+#: lib/merge.tcl:212
+msgid ""
+"Cannot abort while amending.\n"
+"\n"
+"You must finish amending this commit.\n"
+msgstr ""
+"Kan inte avbryta vid utökning.\n"
+"\n"
+"Du måste göra dig färdig med att utöka incheckningen.\n"
+
+#: lib/merge.tcl:222
+msgid ""
+"Abort merge?\n"
+"\n"
+"Aborting the current merge will cause *ALL* uncommitted changes to be lost.\n"
+"\n"
+"Continue with aborting the current merge?"
+msgstr ""
+"Avbryt sammanslagning?\n"
+"\n"
+"Om du avbryter sammanslagningen kommer *ALLA* ej incheckade ändringar att "
+"gå förlorade.\n"
+"\n"
+"GÃ¥ vidare med att avbryta den aktuella sammanslagningen?"
+
+#: lib/merge.tcl:228
+msgid ""
+"Reset changes?\n"
+"\n"
+"Resetting the changes will cause *ALL* uncommitted changes to be lost.\n"
+"\n"
+"Continue with resetting the current changes?"
+msgstr ""
+"Återställ ändringar?\n"
+"\n"
+"Om du återställer ändringarna kommer *ALLA* ej incheckade ändringar att "
+"gå förlorade.\n"
+"\n"
+"Gå vidare med att återställa de aktuella ändringarna?"
+
+#: lib/merge.tcl:239
+msgid "Aborting"
+msgstr "Avbryter"
+
+#: lib/merge.tcl:266
+msgid "Abort failed."
+msgstr "Misslyckades avbryta."
+
+#: lib/merge.tcl:268
+msgid "Abort completed. Ready."
+msgstr "Avbrytning fullbordad. Redo."
+
+#: lib/option.tcl:82
+msgid "Restore Defaults"
+msgstr "Återställ standardvärden"
+
+#: lib/option.tcl:86
+msgid "Save"
+msgstr "Spara"
+
+#: lib/option.tcl:96
+#, tcl-format
+msgid "%s Repository"
+msgstr "Arkivet %s"
+
+#: lib/option.tcl:97
+msgid "Global (All Repositories)"
+msgstr "Globalt (alla arkiv)"
+
+#: lib/option.tcl:103
+msgid "User Name"
+msgstr "Användarnamn"
+
+#: lib/option.tcl:104
+msgid "Email Address"
+msgstr "E-postadress"
+
+#: lib/option.tcl:106
+msgid "Summarize Merge Commits"
+msgstr "Summera sammanslagningsincheckningar"
+
+#: lib/option.tcl:107
+msgid "Merge Verbosity"
+msgstr "Pratsamhet för sammanslagningar"
+
+#: lib/option.tcl:108
+msgid "Show Diffstat After Merge"
+msgstr "Visa diffstatistik efter sammanslagning"
+
+#: lib/option.tcl:110
+msgid "Trust File Modification Timestamps"
+msgstr "Lita på filändringstidsstämplar"
+
+#: lib/option.tcl:111
+msgid "Prune Tracking Branches During Fetch"
+msgstr "Städa spårade grenar vid hämtning"
+
+#: lib/option.tcl:112
+msgid "Match Tracking Branches"
+msgstr "Matcha spårade grenar"
+
+#: lib/option.tcl:113
+msgid "Number of Diff Context Lines"
+msgstr "Antal rader sammanhang i differenser"
+
+#: lib/option.tcl:114
+msgid "New Branch Name Template"
+msgstr "Mall för namn på nya grenar"
+
+#: lib/option.tcl:176
+msgid "Change Font"
+msgstr "Byt teckensnitt"
+
+#: lib/option.tcl:180
+#, tcl-format
+msgid "Choose %s"
+msgstr "Välj %s"
+
+#: lib/option.tcl:186
+msgid "pt."
+msgstr "p."
+
+#: lib/option.tcl:200
+msgid "Preferences"
+msgstr "Inställningar"
+
+#: lib/option.tcl:235
+msgid "Failed to completely save options:"
+msgstr "Misslyckades med att helt spara alternativ:"
+
+#: lib/remote_branch_delete.tcl:29 lib/remote_branch_delete.tcl:34
+msgid "Delete Remote Branch"
+msgstr "Ta bort fjärrgren"
+
+#: lib/remote_branch_delete.tcl:47
+msgid "From Repository"
+msgstr "Från arkiv"
+
+#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
+msgid "Remote:"
+msgstr "Fjärr:"
+
+#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:138
+msgid "Arbitrary URL:"
+msgstr "Godtycklig webbadress:"
+
+#: lib/remote_branch_delete.tcl:84
+msgid "Branches"
+msgstr "Grenar"
+
+#: lib/remote_branch_delete.tcl:109
+msgid "Delete Only If"
+msgstr "Ta endast bort om"
+
+#: lib/remote_branch_delete.tcl:111
+msgid "Merged Into:"
+msgstr "Sammanslagen i:"
+
+#: lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "Alltid (utför inte sammanslagningstest)"
+
+#: lib/remote_branch_delete.tcl:152
+msgid "A branch is required for 'Merged Into'."
+msgstr "En gren krävs för \"Sammanslagen i\"."
+
+#: lib/remote_branch_delete.tcl:184
+#, tcl-format
+msgid ""
+"The following branches are not completely merged into %s:\n"
+"\n"
+" - %s"
+msgstr ""
+"Följande grenar har inte helt slagits samman i %s:\n"
+"\n"
+" - %s"
+
+#: lib/remote_branch_delete.tcl:189
+#, tcl-format
+msgid ""
+"One or more of the merge tests failed because you have not fetched the "
+"necessary commits. Try fetching from %s first."
+msgstr ""
+"En eller flera av sammanslagningstesterna misslyckades eftersom du inte "
+"har hämtat de nödvändiga incheckningarna. Försök hämta från %s först."
+
+#: lib/remote_branch_delete.tcl:207
+msgid "Please select one or more branches to delete."
+msgstr "Välj en eller flera grenar att ta bort."
+
+#: lib/remote_branch_delete.tcl:216
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Det kan vara svårt att återställa grenar.\n"
+"\n"
+"Ta bort de valda grenarna?"
+
+#: lib/remote_branch_delete.tcl:226
+#, tcl-format
+msgid "Deleting branches from %s"
+msgstr "Tar bort grenar från %s"
+
+#: lib/remote_branch_delete.tcl:286
+msgid "No repository selected."
+msgstr "Inget arkiv markerat."
+
+#: lib/remote_branch_delete.tcl:291
+#, tcl-format
+msgid "Scanning %s..."
+msgstr "Söker %s..."
+
+#: lib/remote.tcl:165
+msgid "Prune from"
+msgstr "Ta bort från"
+
+#: lib/remote.tcl:170
+msgid "Fetch from"
+msgstr "Hämta från"
+
+#: lib/remote.tcl:213
+msgid "Push to"
+msgstr "Sänd till"
+
+#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+msgid "Cannot write shortcut:"
+msgstr "Kan inte skriva genväg:"
+
+#: lib/shortcut.tcl:136
+msgid "Cannot write icon:"
+msgstr "Kan inte skriva ikon:"
+
+#: lib/status_bar.tcl:83
+#, tcl-format
+msgid "%s ... %*i of %*i %s (%3i%%)"
+msgstr "%s... %*i av %*i %s (%3i%%)"
+
+#: lib/transport.tcl:6
+#, tcl-format
+msgid "fetch %s"
+msgstr "hämta %s"
+
+#: lib/transport.tcl:7
+#, tcl-format
+msgid "Fetching new changes from %s"
+msgstr "Hämtar nya ändringar från %s"
+
+#: lib/transport.tcl:18
+#, tcl-format
+msgid "remote prune %s"
+msgstr "fjärrborttagning %s"
+
+#: lib/transport.tcl:19
+#, tcl-format
+msgid "Pruning tracking branches deleted from %s"
+msgstr "Tar bort spårande grenar som tagits bort från %s"
+
+#: lib/transport.tcl:25 lib/transport.tcl:71
+#, tcl-format
+msgid "push %s"
+msgstr "sänd %s"
+
+#: lib/transport.tcl:26
+#, tcl-format
+msgid "Pushing changes to %s"
+msgstr "Sänder ändringar till %s"
+
+#: lib/transport.tcl:72
+#, tcl-format
+msgid "Pushing %s %s to %s"
+msgstr "Sänder %s %s till %s"
+
+#: lib/transport.tcl:89
+msgid "Push Branches"
+msgstr "Sänder grenar"
+
+#: lib/transport.tcl:103
+msgid "Source Branches"
+msgstr "Källgrenar"
+
+#: lib/transport.tcl:120
+msgid "Destination Repository"
+msgstr "Destinationsarkiv"
+
+#: lib/transport.tcl:158
+msgid "Transfer Options"
+msgstr "Överföringsalternativ"
+
+#: lib/transport.tcl:160
+msgid "Force overwrite existing branch (may discard changes)"
+msgstr "Tvinga överskrivning av befintlig gren (kan kasta bort ändringar)"
+
+#: lib/transport.tcl:164
+msgid "Use thin pack (for slow network connections)"
+msgstr "Använd tunt paket (för långsamma nätverksanslutningar)"
+
+#: lib/transport.tcl:168
+msgid "Include tags"
+msgstr "Ta med taggar"
+
diff --git a/git-instaweb.sh b/git-instaweb.sh
index ad0723ccc..3e4452bc4 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -274,6 +274,14 @@ webrick)
;;
esac
+init_browser_path() {
+ browser_path="`git config browser.$1.path`"
+ test -z "$browser_path" && browser_path="$1"
+}
+
start_httpd
url=http://127.0.0.1:$port
-test -n "$browser" && "$browser" $url || echo $url
+test -n "$browser" && {
+ init_browser_path "$browser"
+ "$browser_path" $url
+} || echo $url
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 2f31fa241..cbbb70795 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -393,8 +393,11 @@ if test $# -eq 0 ; then
echo "No files need merging"
exit 0
fi
- echo Merging the files: $files
- git ls-files -u | sed -e 's/^[^ ]* //' | sort -u | while read i
+ echo Merging the files: "$files"
+ git ls-files -u |
+ sed -e 's/^[^ ]* //' |
+ sort -u |
+ while IFS= read i
do
printf "\n"
merge_file "$i" < /dev/tty > /dev/tty
diff --git a/git-pull.sh b/git-pull.sh
index 698e82b11..46da0f4ca 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -72,6 +72,49 @@ do
shift
done
+error_on_no_merge_candidates () {
+ exec >&2
+ for opt
+ do
+ case "$opt" in
+ -t|--t|--ta|--tag|--tags)
+ echo "Fetching tags only, you probably meant:"
+ echo " git fetch --tags"
+ exit 1
+ esac
+ done
+
+ curr_branch=${curr_branch#refs/heads/}
+
+ echo "You asked me to pull without telling me which branch you"
+ echo "want to merge with, and 'branch.${curr_branch}.merge' in"
+ echo "your configuration file does not tell me either. Please"
+ echo "name which branch you want to merge on the command line and"
+ echo "try again (e.g. 'git pull <repository> <refspec>')."
+ echo "See git-pull(1) for details on the refspec."
+ echo
+ echo "If you often merge with the same branch, you may want to"
+ echo "configure the following variables in your configuration"
+ echo "file:"
+ echo
+ echo " branch.${curr_branch}.remote = <nickname>"
+ echo " branch.${curr_branch}.merge = <remote-ref>"
+ echo " remote.<nickname>.url = <url>"
+ echo " remote.<nickname>.fetch = <refspec>"
+ echo
+ echo "See git-config(1) for details."
+ exit 1
+}
+
+test true = "$rebase" && {
+ . git-parse-remote &&
+ origin="$1"
+ test -z "$origin" && origin=$(get_default_remote)
+ reflist="$(get_remote_refs_for_fetch "$@" 2>/dev/null |
+ sed "s|refs/heads/\(.*\):|\1|")" &&
+ oldremoteref="$(git rev-parse --verify \
+ "refs/remotes/$origin/$reflist" 2>/dev/null)"
+}
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
git-fetch --update-head-ok "$@" || exit 1
@@ -105,33 +148,13 @@ merge_head=$(sed -e '/ not-for-merge /d' \
case "$merge_head" in
'')
case $? in
- 0) ;;
- 1) echo >&2 "You are not currently on a branch; you must explicitly"
- echo >&2 "specify which branch you wish to merge:"
- echo >&2 " git pull <remote> <branch>"
- exit 1;;
- *) exit $?;;
+ 0) error_on_no_merge_candidates "$@";;
+ 1) echo >&2 "You are not currently on a branch; you must explicitly"
+ echo >&2 "specify which branch you wish to merge:"
+ echo >&2 " git pull <remote> <branch>"
+ exit 1;;
+ *) exit $?;;
esac
- curr_branch=${curr_branch#refs/heads/}
-
- echo >&2 "You asked me to pull without telling me which branch you"
- echo >&2 "want to merge with, and 'branch.${curr_branch}.merge' in"
- echo >&2 "your configuration file does not tell me either. Please"
- echo >&2 "name which branch you want to merge on the command line and"
- echo >&2 "try again (e.g. 'git pull <repository> <refspec>')."
- echo >&2 "See git-pull(1) for details on the refspec."
- echo >&2
- echo >&2 "If you often merge with the same branch, you may want to"
- echo >&2 "configure the following variables in your configuration"
- echo >&2 "file:"
- echo >&2
- echo >&2 " branch.${curr_branch}.remote = <nickname>"
- echo >&2 " branch.${curr_branch}.merge = <remote-ref>"
- echo >&2 " remote.<nickname>.url = <url>"
- echo >&2 " remote.<nickname>.fetch = <refspec>"
- echo >&2
- echo >&2 "See git-config(1) for details."
- exit 1
;;
?*' '?*)
if test -z "$orig_head"
@@ -150,6 +173,7 @@ then
fi
merge_name=$(git fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
-test true = "$rebase" && exec git-rebase $merge_head
+test true = "$rebase" &&
+ exec git-rebase --onto $merge_head ${oldremoteref:-$merge_head}
exec git-merge $no_summary $no_commit $squash $no_ff $strategy_args \
"$merge_name" HEAD $merge_head
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 090c3e514..fb12b03b2 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -73,14 +73,19 @@ comment_for_reflog () {
esac
}
+last_count=
mark_action_done () {
sed -e 1q < "$TODO" >> "$DONE"
sed -e 1d < "$TODO" >> "$TODO".new
mv -f "$TODO".new "$TODO"
count=$(($(grep -ve '^$' -e '^#' < "$DONE" | wc -l)))
total=$(($count+$(grep -ve '^$' -e '^#' < "$TODO" | wc -l)))
- printf "Rebasing (%d/%d)\r" $count $total
- test -z "$VERBOSE" || echo
+ if test "$last_count" != "$count"
+ then
+ last_count=$count
+ printf "Rebasing (%d/%d)\r" $count $total
+ test -z "$VERBOSE" || echo
+ fi
}
make_patch () {
@@ -215,15 +220,17 @@ make_squash_message () {
COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \
< "$SQUASH_MSG" | tail -n 1)+1))
echo "# This is a combination of $COUNT commits."
- sed -n "2,\$p" < "$SQUASH_MSG"
+ sed -e 1d -e '2,/^./{
+ /^$/d
+ }' <"$SQUASH_MSG"
else
COUNT=2
echo "# This is a combination of two commits."
echo "# The first commit's message is:"
echo
git cat-file commit HEAD | sed -e '1,/^$/d'
- echo
fi
+ echo
echo "# This is the $(nth_string $COUNT) commit message:"
echo
git cat-file commit $1 | sed -e '1,/^$/d'
@@ -363,17 +370,26 @@ do
test -d "$DOTEST" || die "No interactive rebase running"
- # commit if necessary
- git rev-parse --verify HEAD > /dev/null &&
- git update-index --refresh &&
- git diff-files --quiet &&
- ! git diff-index --cached --quiet HEAD -- &&
- . "$DOTEST"/author-script && {
- test ! -f "$DOTEST"/amend || git reset --soft HEAD^
- } &&
- export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
- if ! git commit --no-verify -F "$DOTEST"/message -e
+ # Sanity check
+ git rev-parse --verify HEAD >/dev/null ||
+ die "Cannot read HEAD"
+ git update-index --refresh && git diff-files --quiet ||
+ die "Working tree is dirty"
+
+ # do we have anything to commit?
+ if git diff-index --cached --quiet HEAD --
then
+ : Nothing to commit -- skip this
+ else
+ . "$DOTEST"/author-script ||
+ die "Cannot find the author identity"
+ if test -f "$DOTEST"/amend
+ then
+ git reset --soft HEAD^ ||
+ die "Cannot rewind the HEAD"
+ fi
+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
+ git commit --no-verify -F "$DOTEST"/message -e ||
die "Could not commit staged changes."
fi
@@ -416,7 +432,7 @@ do
shift ;;
esac
;;
- --merge)
+ -m|--merge)
# we use merge anyway
;;
-C*)
diff --git a/git-relink.perl b/git-relink.perl
index f6b4f6a2f..15fb93202 100755
--- a/git-relink.perl
+++ b/git-relink.perl
@@ -40,7 +40,7 @@ my $master_dir = pop @dirs;
opendir(D,$master_dir . "objects/")
or die "Failed to open $master_dir/objects/ : $!";
-my @hashdirs = grep !/^\.{1,2}$/, readdir(D);
+my @hashdirs = grep { ($_ eq 'pack') || /^[0-9a-f]{2}$/ } readdir(D);
foreach my $repo (@dirs) {
$linked = 0;
diff --git a/git-remote.perl b/git-remote.perl
index d13e4c1fe..5cd69513c 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -1,5 +1,6 @@
#!/usr/bin/perl -w
+use strict;
use Git;
my $git = Git->repository();
@@ -296,12 +297,13 @@ sub add_remote {
sub update_remote {
my ($name) = @_;
+ my @remotes;
my $conf = $git->config("remotes." . $name);
if (defined($conf)) {
@remotes = split(' ', $conf);
} elsif ($name eq 'default') {
- undef @remotes;
+ @remotes = ();
for (sort keys %$remote) {
my $do_fetch = $git->config_bool("remote." . $_ .
".skipDefaultUpdate");
@@ -341,7 +343,7 @@ sub rm_remote {
my @refs = $git->command('for-each-ref',
'--format=%(refname) %(objectname)', "refs/remotes/$name");
for (@refs) {
- ($ref, $object) = split;
+ my ($ref, $object) = split;
$git->command(qw(update-ref -d), $ref, $object);
}
return 0;
@@ -352,7 +354,7 @@ sub add_usage {
exit(1);
}
-local $VERBOSE = 0;
+my $VERBOSE = 0;
@ARGV = grep {
if ($_ eq '-v' or $_ eq '--verbose') {
$VERBOSE=1;
@@ -395,7 +397,7 @@ elsif ($ARGV[0] eq 'update') {
update_remote("default");
exit(1);
}
- for ($i = 1; $i < @ARGV; $i++) {
+ for (my $i = 1; $i < @ARGV; $i++) {
update_remote($ARGV[$i]);
}
}
diff --git a/git-send-email.perl b/git-send-email.perl
index e47994afc..a1a9d14b0 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -100,6 +100,8 @@ Options:
--envelope-sender Specify the envelope sender used to send the emails.
+ --no-validate Don't perform any sanity checks on patches.
+
EOT
exit(1);
}
@@ -177,6 +179,7 @@ my ($quiet, $dry_run) = (0, 0);
my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_authpass, $smtp_ssl);
my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts);
+my ($no_validate);
my %config_bool_settings = (
"thread" => [\$thread, 1],
@@ -222,6 +225,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
"dry-run" => \$dry_run,
"envelope-sender=s" => \$envelope_sender,
"thread!" => \$thread,
+ "no-validate" => \$no_validate,
);
unless ($rc) {
@@ -314,6 +318,40 @@ if (@alias_files and $aliasfiletype and defined $parse_alias{$aliasfiletype}) {
($sender) = expand_aliases($sender) if defined $sender;
+# Now that all the defaults are set, process the rest of the command line
+# arguments and collect up the files that need to be processed.
+for my $f (@ARGV) {
+ if (-d $f) {
+ opendir(DH,$f)
+ or die "Failed to opendir $f: $!";
+
+ push @files, grep { -f $_ } map { +$f . "/" . $_ }
+ sort readdir(DH);
+
+ } elsif (-f $f) {
+ push @files, $f;
+
+ } else {
+ print STDERR "Skipping $f - not found.\n";
+ }
+}
+
+if (!$no_validate) {
+ foreach my $f (@files) {
+ my $error = validate_patch($f);
+ $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
+ }
+}
+
+if (@files) {
+ unless ($quiet) {
+ print $_,"\n" for (@files);
+ }
+} else {
+ print STDERR "\nNo patch files specified!\n\n";
+ usage();
+}
+
my $prompting = 0;
if (!defined $sender) {
$sender = $repoauthor || $repocommitter;
@@ -424,35 +462,7 @@ EOT
exit(0);
}
- @files = ($compose_filename . ".final");
-}
-
-
-# Now that all the defaults are set, process the rest of the command line
-# arguments and collect up the files that need to be processed.
-for my $f (@ARGV) {
- if (-d $f) {
- opendir(DH,$f)
- or die "Failed to opendir $f: $!";
-
- push @files, grep { -f $_ } map { +$f . "/" . $_ }
- sort readdir(DH);
-
- } elsif (-f $f) {
- push @files, $f;
-
- } else {
- print STDERR "Skipping $f - not found.\n";
- }
-}
-
-if (@files) {
- unless ($quiet) {
- print $_,"\n" for (@files);
- }
-} else {
- print STDERR "\nNo patch files specified!\n\n";
- usage();
+ @files = ($compose_filename . ".final", @files);
}
# Variables we set as part of the loop over files
@@ -838,3 +848,15 @@ sub unique_email_list(@) {
}
return @emails;
}
+
+sub validate_patch {
+ my $fn = shift;
+ open(my $fh, '<', $fn)
+ or die "unable to open $fn: $!\n";
+ while (my $line = <$fh>) {
+ if (length($line) > 998) {
+ return "$.: patch contains a line longer than 998 characters";
+ }
+ }
+ return undef;
+}
diff --git a/git-stash.sh b/git-stash.sh
index 06cb177ec..b00f88816 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -20,6 +20,10 @@ no_changes () {
}
clear_stash () {
+ if test $# != 0
+ then
+ die "git stash clear with parameters is unimplemented"
+ fi
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
git update-ref -d $ref_stash $current
@@ -86,7 +90,7 @@ save_stash () {
if no_changes
then
- echo >&2 'No local changes to save'
+ echo 'No local changes to save'
exit 0
fi
test -f "$GIT_DIR/logs/$ref_stash" ||
@@ -99,7 +103,7 @@ save_stash () {
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
die "Cannot save the current status"
- printf >&2 'Saved working directory and index state "%s"\n' "$stash_msg"
+ printf 'Saved working directory and index state "%s"\n' "$stash_msg"
}
have_stash () {
@@ -216,7 +220,8 @@ apply)
apply_stash "$@"
;;
clear)
- clear_stash
+ shift
+ clear_stash "$@"
;;
create)
if test $# -gt 0 && test "$1" = create
@@ -229,7 +234,7 @@ create)
if test $# -eq 0
then
save_stash &&
- echo >&2 '(To restore them type "git stash apply")' &&
+ echo '(To restore them type "git stash apply")' &&
git-reset --hard
else
usage
diff --git a/git-submodule.sh b/git-submodule.sh
index ad9fe628f..a6aaf40b0 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -9,11 +9,8 @@ OPTIONS_SPEC=
. git-sh-setup
require_work_tree
-add=
+command=
branch=
-init=
-update=
-status=
quiet=
cached=
@@ -86,9 +83,9 @@ module_name()
#
# Clone a submodule
#
-# Prior to calling, modules_update checks that a possibly existing
+# Prior to calling, cmd_update checks that a possibly existing
# path is not a git repository.
-# Likewise, module_add checks that path does not exist at all,
+# Likewise, cmd_add checks that path does not exist at all,
# since it is the location of a new submodule.
#
module_clone()
@@ -121,8 +118,34 @@ module_clone()
#
# optional branch is stored in global branch variable
#
-module_add()
+cmd_add()
{
+ # parse $args after "submodule ... add".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -b | --branch)
+ case "$2" in '') usage ;; esac
+ branch=$2
+ shift
+ ;;
+ -q|--quiet)
+ quiet=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
repo=$1
path=$2
@@ -174,8 +197,29 @@ module_add()
#
# $@ = requested paths (default to all)
#
-modules_init()
+cmd_init()
{
+ # parse $args after "submodule ... init".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -q|--quiet)
+ quiet=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
git ls-files --stage -- "$@" | grep -e '^160000 ' |
while read mode sha1 stage path
do
@@ -207,8 +251,29 @@ modules_init()
#
# $@ = requested paths (default to all)
#
-modules_update()
+cmd_update()
{
+ # parse $args after "submodule ... update".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -q|--quiet)
+ quiet=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
git ls-files --stage -- "$@" | grep -e '^160000 ' |
while read mode sha1 stage path
do
@@ -266,8 +331,32 @@ set_name_rev () {
#
# $@ = requested paths (default to all)
#
-modules_list()
+cmd_status()
{
+ # parse $args after "submodule ... status".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -q|--quiet)
+ quiet=1
+ ;;
+ --cached)
+ cached=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
git ls-files --stage -- "$@" | grep -e '^160000 ' |
while read mode sha1 stage path
do
@@ -293,20 +382,17 @@ modules_list()
done
}
-while test $# != 0
+# This loop parses the command line arguments to find the
+# subcommand name to dispatch. Parsing of the subcommand specific
+# options are primarily done by the subcommand implementations.
+# Subcommand specific options such as --branch and --cached are
+# parsed here as well, for backward compatibility.
+
+while test $# != 0 && test -z "$command"
do
case "$1" in
- add)
- add=1
- ;;
- init)
- init=1
- ;;
- update)
- update=1
- ;;
- status)
- status=1
+ add | init | update | status)
+ command=$1
;;
-q|--quiet)
quiet=1
@@ -335,30 +421,19 @@ do
shift
done
-case "$add,$branch" in
-1,*)
- ;;
-,)
- ;;
-,*)
+# No command word defaults to "status"
+test -n "$command" || command=status
+
+# "-b branch" is accepted only by "add"
+if test -n "$branch" && test "$command" != add
+then
usage
- ;;
-esac
-
-case "$add,$init,$update,$status,$cached" in
-1,,,,)
- module_add "$@"
- ;;
-,1,,,)
- modules_init "$@"
- ;;
-,,1,,)
- modules_update "$@"
- ;;
-,,,*,*)
- modules_list "$@"
- ;;
-*)
+fi
+
+# "--cached" is accepted only by "status"
+if test -n "$cached" && test "$command" != status
+then
usage
- ;;
-esac
+fi
+
+"cmd_$command" "$@"
diff --git a/git-svn.perl b/git-svn.perl
index c51f1e739..05fb3582d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -186,6 +186,9 @@ my %cmd = (
"Show info about the latest SVN revision
on the current branch",
{ 'url' => \$_url, } ],
+ 'blame' => [ \&Git::SVN::Log::cmd_blame,
+ "Show what revision and author last modified each line of a file",
+ {} ],
);
my $cmd;
@@ -418,7 +421,7 @@ sub cmd_dcommit {
warn "Attempting to commit more than one change while ",
"--no-rebase is enabled.\n",
"If these changes depend on each other, re-running ",
- "without --no-rebase will be required."
+ "without --no-rebase may be required."
}
while (1) {
my $d = shift @$linear_refs or last;
@@ -453,6 +456,7 @@ sub cmd_dcommit {
$parents->{$d};
}
$_fetch_all ? $gs->fetch_all : $gs->fetch;
+ $last_rev = $cmt_rev;
next if $_no_rebase;
# we always want to rebase against the current HEAD,
@@ -512,7 +516,6 @@ sub cmd_dcommit {
$parents = \%p;
$linear_refs = \@l;
}
- $last_rev = $cmt_rev;
}
}
unlink $gs->{index};
@@ -1247,7 +1250,8 @@ use File::Path qw/mkpath/;
use File::Copy qw/copy/;
use IPC::Open3;
-my $_repack_nr;
+my ($_gc_nr, $_gc_period);
+
# properties that we do not log:
my %SKIP_PROP;
BEGIN {
@@ -1283,8 +1287,11 @@ BEGIN {
}
}
-my %LOCKFILES;
-END { unlink keys %LOCKFILES if %LOCKFILES }
+my (%LOCKFILES, %INDEX_FILES);
+END {
+ unlink keys %LOCKFILES if %LOCKFILES;
+ unlink keys %INDEX_FILES if %INDEX_FILES;
+}
sub resolve_local_globs {
my ($url, $fetch, $glob_spec) = @_;
@@ -1376,7 +1383,6 @@ sub fetch_all {
($base, $head) = parse_revision_argument($base, $head);
$ra->gs_fetch_loop_common($base, $head, \@gs, \@globs);
- unlink $_->{index} foreach @gs;
}
sub read_all_remotes {
@@ -1406,10 +1412,9 @@ sub read_all_remotes {
}
sub init_vars {
- if (defined $_repack) {
- $_repack = 1000 if ($_repack <= 0);
- $_repack_nr = $_repack;
- $_repack_flags ||= '-d';
+ $_gc_nr = $_gc_period = 1000;
+ if (defined $_repack || defined $_repack_flags) {
+ warn "Repack options are obsolete; they have no effect.\n";
}
}
@@ -1756,10 +1761,16 @@ sub svnsync {
# see if we have it in our config, first:
eval {
my $section = "svn-remote.$self->{repo_id}";
- $svnsync = {
- url => tmp_config('--get', "$section.svnsync-url"),
- uuid => tmp_config('--get', "$section.svnsync-uuid"),
- }
+
+ my $url = tmp_config('--get', "$section.svnsync-url");
+ ($url) = ($url =~ m{^([a-z\+]+://\S+)$}) or
+ die "doesn't look right - svn:sync-from-url is '$url'\n";
+
+ my $uuid = tmp_config('--get', "$section.svnsync-uuid");
+ ($uuid) = ($uuid =~ m{^([0-9a-f\-]{30,})$}) or
+ die "doesn't look right - svn:sync-from-uuid is '$uuid'\n";
+
+ $svnsync = { url => $url, uuid => $uuid }
};
if ($svnsync && $svnsync->{url} && $svnsync->{uuid}) {
return $self->{svnsync} = $svnsync;
@@ -1770,11 +1781,11 @@ sub svnsync {
my $rp = $self->ra->rev_proplist(0);
my $url = $rp->{'svn:sync-from-url'} or die $err . "url\n";
- $url =~ m{^[a-z\+]+://} or
+ ($url) = ($url =~ m{^([a-z\+]+://\S+)$}) or
die "doesn't look right - svn:sync-from-url is '$url'\n";
my $uuid = $rp->{'svn:sync-from-uuid'} or die $err . "uuid\n";
- $uuid =~ m{^[0-9a-f\-]{30,}$} or
+ ($uuid) = ($uuid =~ m{^([0-9a-f\-]{30,})$}) or
die "doesn't look right - svn:sync-from-uuid is '$uuid'\n";
my $section = "svn-remote.$self->{repo_id}";
@@ -1856,6 +1867,7 @@ sub rel_path {
sub prop_walk {
my ($self, $path, $rev, $sub) = @_;
+ $path =~ s#^/##;
my ($dirent, undef, $props) = $self->ra->get_dir($path, $rev);
$path =~ s#^/*#/#g;
my $p = $path;
@@ -2089,6 +2101,10 @@ sub restore_commit_header_env {
}
}
+sub gc {
+ command_noisy('gc', '--auto');
+};
+
sub do_git_commit {
my ($self, $log_entry) = @_;
my $lr = $self->last_rev;
@@ -2142,12 +2158,9 @@ sub do_git_commit {
0, $self->svm_uuid);
}
print " = $commit ($self->{ref_id})\n";
- if (defined $_repack && (--$_repack_nr == 0)) {
- $_repack_nr = $_repack;
- # repack doesn't use any arguments with spaces in them, does it?
- print "Running git repack $_repack_flags ...\n";
- command_noisy('repack', split(/\s+/, $_repack_flags));
- print "Done repacking\n";
+ if (--$_gc_nr == 0) {
+ $_gc_nr = $_gc_period;
+ gc();
}
return $commit;
}
@@ -2219,7 +2232,12 @@ sub find_parent_branch {
# just grow a tail if we're not unique enough :x
$ref_id .= '-' while find_ref($ref_id);
print STDERR "Initializing parent: $ref_id\n";
- $gs = Git::SVN->init($new_url, '', $ref_id, $ref_id, 1);
+ my ($u, $p) = ($new_url, '');
+ if ($u =~ s#^\Q$url\E(/|$)##) {
+ $p = $u;
+ $u = $url;
+ }
+ $gs = Git::SVN->init($u, $p, $self->{repo_id}, $ref_id, 1);
}
my ($r0, $parent) = $gs->find_rev_before($r, 1);
if (!defined $r0 || !defined $parent) {
@@ -3945,6 +3963,7 @@ sub gs_fetch_loop_common {
if ($log_entry) {
$gs->do_git_commit($log_entry);
}
+ $INDEX_FILES{$gs->{index}} = 1;
}
foreach my $g (@$globs) {
my $k = "svn-remote.$g->{remote}." .
@@ -3975,6 +3994,7 @@ sub gs_fetch_loop_common {
$max += $inc;
$max = $head if ($max > $head);
}
+ Git::SVN::gc();
}
sub match_globs {
@@ -4082,6 +4102,10 @@ sub skip_unknown_revs {
warn "W: Ignoring error from SVN, path probably ",
"does not exist: ($errno): ",
$err->expanded_message,"\n";
+ warn "W: Do not be alarmed at the above message ",
+ "git-svn is just searching aggressively for ",
+ "old history.\n",
+ "This may take a while on large repositories\n";
$ignored_err{$err_key} = 1;
}
return;
@@ -4427,6 +4451,24 @@ out:
print commit_log_separator unless $incremental || $oneline;
}
+sub cmd_blame {
+ my $path = shift;
+
+ config_pager();
+ run_pager();
+
+ my ($fh, $ctx) = command_output_pipe('blame', @_, $path);
+ while (my $line = <$fh>) {
+ if ($line =~ /^\^?([[:xdigit:]]+)\s/) {
+ my (undef, $rev, undef) = ::cmt_metadata($1);
+ $rev = sprintf('%-10s', $rev);
+ $line =~ s/^\^?[[:xdigit:]]+(\s)/$rev$1/;
+ }
+ print $line;
+ }
+ command_close_pipe($fh, $ctx);
+}
+
package Git::SVN::Migration;
# these version numbers do NOT correspond to actual version numbers
# of git nor git-svn. They are just relative.
diff --git a/git.c b/git.c
index 15fec8974..0cb86884d 100644
--- a/git.c
+++ b/git.c
@@ -93,6 +93,8 @@ static char *alias_string;
static int git_alias_config(const char *var, const char *value)
{
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
+ if (!value)
+ return config_error_nonbool(var);
alias_string = xstrdup(value);
}
return 0;
diff --git a/git.spec.in b/git.spec.in
index 3e5bebba0..3f9f88815 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -8,9 +8,17 @@ License: GPL
Group: Development/Tools
URL: http://kernel.org/pub/software/scm/git/
Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
-BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
+BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel, gettext %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: git-core, git-svn, git-cvs, git-arch, git-email, gitk, git-gui, perl-Git
+
+Requires: git-core = %{version}-%{release}
+Requires: git-svn = %{version}-%{release}
+Requires: git-cvs = %{version}-%{release}
+Requires: git-arch = %{version}-%{release}
+Requires: git-email = %{version}-%{release}
+Requires: gitk = %{version}-%{release}
+Requires: git-gui = %{version}-%{release}
+Requires: perl-Git = %{version}-%{release}
%description
Git is a fast, scalable, distributed revision control system with an
@@ -158,6 +166,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%doc Documentation/*gitk*.txt
%{_bindir}/*gitk*
+%{_datadir}/gitk/
%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
%{!?_without_docs: %doc Documentation/*gitk*.html }
@@ -172,6 +181,15 @@ rm -rf $RPM_BUILD_ROOT
%{!?_without_docs: %doc Documentation/technical}
%changelog
+* Sun Feb 03 2008 James Bowes <jbowes@dangerouslyinc.com>
+- Add a BuildRequires for gettext
+
+* Fri Jan 11 2008 Junio C Hamano <gitster@pobox.com>
+- Include gitk message files
+
+* Sun Jan 06 2008 James Bowes <jbowes@dangerouslyinc.com>
+- Make the metapackage require the same version of the subpackages.
+
* Wed Dec 12 2007 Junio C Hamano <gitster@pobox.com>
- Adjust htmldir to point at /usr/share/doc/git-core-$version/
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index 9bc1e2408..ae2b80b10 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -3,6 +3,11 @@ all::
prefix ?= $(HOME)
bindir ?= $(prefix)/bin
+sharedir ?= $(prefix)/share
+gitk_libdir ?= $(sharedir)/gitk/lib
+msgsdir ?= $(gitk_libdir)/msgs
+msgsdir_SQ = $(subst ','\'',$(msgsdir))
+
TCLTK_PATH ?= wish
INSTALL ?= install
RM ?= rm -f
@@ -11,19 +16,48 @@ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
bindir_SQ = $(subst ','\'',$(bindir))
TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
+## po-file creation rules
+XGETTEXT ?= xgettext
+ifdef NO_MSGFMT
+ MSGFMT ?= $(TCL_PATH) po/po2msg.sh
+else
+ MSGFMT ?= msgfmt
+endif
+
+PO_TEMPLATE = po/gitk.pot
+ALL_POFILES = $(wildcard po/*.po)
+ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
+
ifndef V
QUIET = @
QUIET_GEN = $(QUIET)echo ' ' GEN $@ &&
endif
-all:: gitk-wish
+all:: gitk-wish $(ALL_MSGFILES)
+
install:: all
$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+ $(INSTALL) -d '$(DESTDIR_SQ)$(msgsdir_SQ)'
+ $(foreach p,$(ALL_MSGFILES), $(INSTALL) $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
+
+uninstall::
+ $(foreach p,$(ALL_MSGFILES), $(RM) '$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) &&) true
+ $(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+
clean::
- $(RM) gitk-wish
+ $(RM) gitk-wish po/*.msg
gitk-wish: gitk
$(QUIET_GEN)$(RM) $@ $@+ && \
sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
chmod +x $@+ && \
mv -f $@+ $@
+
+$(PO_TEMPLATE): gitk
+ $(XGETTEXT) -kmc -LTcl -o $@ gitk
+update-po:: $(PO_TEMPLATE)
+ $(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
+$(ALL_MSGFILES): %.msg : %.po
+ @echo Generating catalog $@
+ $(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
+
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1da0b0af1..5560e4dc5 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -98,7 +98,7 @@ proc start_rev_list {view} {
set fd [open [concat | git log --no-color -z --pretty=raw $order --parents \
--boundary $viewargs($view) "--" $viewfiles($view)] r]
} err]} {
- error_popup "Error executing git rev-list: $err"
+ error_popup "[mc "Error executing git rev-list:"] $err"
exit 1
}
set commfd($view) $fd
@@ -111,7 +111,7 @@ proc start_rev_list {view} {
fconfigure $fd -encoding $tclencoding
}
filerun $fd [list getcommitlines $fd $view]
- nowbusy $view "Reading"
+ nowbusy $view [mc "Reading"]
if {$view == $curview} {
set progressdirn 1
set progresscoords {0 0}
@@ -138,7 +138,7 @@ proc getcommits {} {
set phase getcommits
initlayout
start_rev_list $curview
- show_status "Reading commits..."
+ show_status [mc "Reading commits..."]
}
# This makes a string representation of a positive integer which
@@ -261,7 +261,7 @@ proc getcommitlines {fd view} {
if {[string length $shortcmit] > 80} {
set shortcmit "[string range $shortcmit 0 80]..."
}
- error_popup "Can't parse git log output: {$shortcmit}"
+ error_popup "[mc "Can't parse git log output:"] {$shortcmit}"
exit 1
}
set id [lindex $ids 0]
@@ -372,7 +372,7 @@ proc chewcommits {view} {
#set ms [expr {[clock clicks -milliseconds] - $startmsecs}]
#puts "overall $ms ms for $numcommits commits"
} else {
- show_status "No commits selected"
+ show_status [mc "No commits selected"]
}
notbusy layout
set phase {}
@@ -483,7 +483,7 @@ proc getcommit {id} {
} else {
readcommit $id
if {![info exists commitinfo($id)]} {
- set commitinfo($id) {"No commit information available"}
+ set commitinfo($id) [list [mc "No commit information available"]]
}
}
return 1
@@ -582,7 +582,7 @@ proc removehead {id name} {
proc show_error {w top msg} {
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- button $w.ok -text OK -command "destroy $top"
+ button $w.ok -text [mc OK] -command "destroy $top"
pack $w.ok -side bottom -fill x
bind $top <Visibility> "grab $top; focus $top"
bind $top <Key-Return> "destroy $top"
@@ -604,15 +604,28 @@ proc confirm_popup msg {
wm transient $w .
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- button $w.ok -text OK -command "set confirm_ok 1; destroy $w"
+ button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
pack $w.ok -side left -fill x
- button $w.cancel -text Cancel -command "destroy $w"
+ button $w.cancel -text [mc Cancel] -command "destroy $w"
pack $w.cancel -side right -fill x
bind $w <Visibility> "grab $w; focus $w"
tkwait window $w
return $confirm_ok
}
+proc setoptions {} {
+ option add *Panedwindow.showHandle 1 startupFile
+ option add *Panedwindow.sashRelief raised startupFile
+ option add *Button.font uifont startupFile
+ option add *Checkbutton.font uifont startupFile
+ option add *Radiobutton.font uifont startupFile
+ option add *Menu.font uifont startupFile
+ option add *Menubutton.font uifont startupFile
+ option add *Label.font uifont startupFile
+ option add *Message.font uifont startupFile
+ option add *Entry.font uifont startupFile
+}
+
proc makewindow {} {
global canv canv2 canv3 linespc charspc ctext cflist
global tabstop
@@ -630,34 +643,31 @@ proc makewindow {} {
global have_tk85
menu .bar
- .bar add cascade -label "File" -menu .bar.file
- .bar configure -font uifont
+ .bar add cascade -label [mc "File"] -menu .bar.file
menu .bar.file
- .bar.file add command -label "Update" -command updatecommits
- .bar.file add command -label "Reread references" -command rereadrefs
- .bar.file add command -label "List references" -command showrefs
- .bar.file add command -label "Quit" -command doquit
- .bar.file configure -font uifont
+ .bar.file add command -label [mc "Update"] -command updatecommits
+ .bar.file add command -label [mc "Reread references"] -command rereadrefs
+ .bar.file add command -label [mc "List references"] -command showrefs
+ .bar.file add command -label [mc "Quit"] -command doquit
menu .bar.edit
- .bar add cascade -label "Edit" -menu .bar.edit
- .bar.edit add command -label "Preferences" -command doprefs
- .bar.edit configure -font uifont
-
- menu .bar.view -font uifont
- .bar add cascade -label "View" -menu .bar.view
- .bar.view add command -label "New view..." -command {newview 0}
- .bar.view add command -label "Edit view..." -command editview \
+ .bar add cascade -label [mc "Edit"] -menu .bar.edit
+ .bar.edit add command -label [mc "Preferences"] -command doprefs
+
+ menu .bar.view
+ .bar add cascade -label [mc "View"] -menu .bar.view
+ .bar.view add command -label [mc "New view..."] -command {newview 0}
+ .bar.view add command -label [mc "Edit view..."] -command editview \
-state disabled
- .bar.view add command -label "Delete view" -command delview -state disabled
+ .bar.view add command -label [mc "Delete view"] -command delview -state disabled
.bar.view add separator
- .bar.view add radiobutton -label "All files" -command {showview 0} \
+ .bar.view add radiobutton -label [mc "All files"] -command {showview 0} \
-variable selectedview -value 0
menu .bar.help
- .bar add cascade -label "Help" -menu .bar.help
- .bar.help add command -label "About gitk" -command about
- .bar.help add command -label "Key bindings" -command keys
- .bar.help configure -font uifont
+ .bar add cascade -label [mc "Help"] -menu .bar.help
+ .bar.help add command -label [mc "About gitk"] -command about
+ .bar.help add command -label [mc "Key bindings"] -command keys
+ .bar.help configure
. configure -menu .bar
# the gui has upper and lower half, parts of a paned window.
@@ -713,8 +723,8 @@ proc makewindow {} {
set sha1entry .tf.bar.sha1
set entries $sha1entry
set sha1but .tf.bar.sha1label
- button $sha1but -text "SHA1 ID: " -state disabled -relief flat \
- -command gotocommit -width 8 -font uifont
+ button $sha1but -text [mc "SHA1 ID: "] -state disabled -relief flat \
+ -command gotocommit -width 8
$sha1but conf -disabledforeground [$sha1but cget -foreground]
pack .tf.bar.sha1label -side left
entry $sha1entry -width 40 -font textfont -textvariable sha1string
@@ -746,7 +756,7 @@ proc makewindow {} {
# Status label and progress bar
set statusw .tf.bar.status
- label $statusw -width 15 -relief sunken -font uifont
+ label $statusw -width 15 -relief sunken
pack $statusw -side left -padx 5
set h [expr {[font metrics uifont -linespace] + 2}]
set progresscanv .tf.bar.progress
@@ -763,20 +773,18 @@ proc makewindow {} {
set progupdatepending 0
# build up the bottom bar of upper window
- label .tf.lbar.flabel -text "Find " -font uifont
- button .tf.lbar.fnext -text "next" -command {dofind 1 1} -font uifont
- button .tf.lbar.fprev -text "prev" -command {dofind -1 1} -font uifont
- label .tf.lbar.flab2 -text " commit " -font uifont
+ label .tf.lbar.flabel -text "[mc "Find"] "
+ button .tf.lbar.fnext -text [mc "next"] -command {dofind 1 1}
+ button .tf.lbar.fprev -text [mc "prev"] -command {dofind -1 1}
+ label .tf.lbar.flab2 -text " [mc "commit"] "
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
-side left -fill y
- set gdttype "containing:"
+ set gdttype [mc "containing:"]
set gm [tk_optionMenu .tf.lbar.gdttype gdttype \
- "containing:" \
- "touching paths:" \
- "adding/removing string:"]
+ [mc "containing:"] \
+ [mc "touching paths:"] \
+ [mc "adding/removing string:"]]
trace add variable gdttype write gdttype_change
- $gm conf -font uifont
- .tf.lbar.gdttype conf -font uifont
pack .tf.lbar.gdttype -side left -fill y
set findstring {}
@@ -784,18 +792,14 @@ proc makewindow {} {
lappend entries $fstring
entry $fstring -width 30 -font textfont -textvariable findstring
trace add variable findstring write find_change
- set findtype Exact
+ set findtype [mc "Exact"]
set findtypemenu [tk_optionMenu .tf.lbar.findtype \
- findtype Exact IgnCase Regexp]
+ findtype [mc "Exact"] [mc "IgnCase"] [mc "Regexp"]]
trace add variable findtype write findcom_change
- .tf.lbar.findtype configure -font uifont
- .tf.lbar.findtype.menu configure -font uifont
- set findloc "All fields"
- tk_optionMenu .tf.lbar.findloc findloc "All fields" Headline \
- Comments Author Committer
+ set findloc [mc "All fields"]
+ tk_optionMenu .tf.lbar.findloc findloc [mc "All fields"] [mc "Headline"] \
+ [mc "Comments"] [mc "Author"] [mc "Committer"]
trace add variable findloc write find_change
- .tf.lbar.findloc configure -font uifont
- .tf.lbar.findloc.menu configure -font uifont
pack .tf.lbar.findloc -side right
pack .tf.lbar.findtype -side right
pack $fstring -side left -expand 1 -fill x
@@ -822,22 +826,20 @@ proc makewindow {} {
frame .bleft.top
frame .bleft.mid
- button .bleft.top.search -text "Search" -command dosearch \
- -font uifont
+ button .bleft.top.search -text [mc "Search"] -command dosearch
pack .bleft.top.search -side left -padx 5
set sstring .bleft.top.sstring
entry $sstring -width 20 -font textfont -textvariable searchstring
lappend entries $sstring
trace add variable searchstring write incrsearch
pack $sstring -side left -expand 1 -fill x
- radiobutton .bleft.mid.diff -text "Diff" -font uifont \
+ radiobutton .bleft.mid.diff -text [mc "Diff"] \
-command changediffdisp -variable diffelide -value {0 0}
- radiobutton .bleft.mid.old -text "Old version" -font uifont \
+ radiobutton .bleft.mid.old -text [mc "Old version"] \
-command changediffdisp -variable diffelide -value {0 1}
- radiobutton .bleft.mid.new -text "New version" -font uifont \
+ radiobutton .bleft.mid.new -text [mc "New version"] \
-command changediffdisp -variable diffelide -value {1 0}
- label .bleft.mid.labeldiffcontext -text " Lines of context: " \
- -font uifont
+ label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left
spinbox .bleft.mid.diffcontext -width 5 -font textfont \
-from 1 -increment 1 -to 10000000 \
@@ -895,12 +897,10 @@ proc makewindow {} {
# lower right
frame .bright
frame .bright.mode
- radiobutton .bright.mode.patch -text "Patch" \
+ radiobutton .bright.mode.patch -text [mc "Patch"] \
-command reselectline -variable cmitmode -value "patch"
- .bright.mode.patch configure -font uifont
- radiobutton .bright.mode.tree -text "Tree" \
+ radiobutton .bright.mode.tree -text [mc "Tree"] \
-command reselectline -variable cmitmode -value "tree"
- .bright.mode.tree configure -font uifont
grid .bright.mode.patch .bright.mode.tree -sticky ew
pack .bright.mode -side top -fill x
set cflist .bright.cfiles
@@ -996,6 +996,7 @@ proc makewindow {} {
bind . <$M1B-r> dosearchback
bind . <$M1B-s> dosearch
bind . <$M1B-equal> {incrfont 1}
+ bind . <$M1B-plus> {incrfont 1}
bind . <$M1B-KP_Add> {incrfont 1}
bind . <$M1B-minus> {incrfont -1}
bind . <$M1B-KP_Subtract> {incrfont -1}
@@ -1015,43 +1016,43 @@ proc makewindow {} {
set rowctxmenu .rowctxmenu
menu $rowctxmenu -tearoff 0
- $rowctxmenu add command -label "Diff this -> selected" \
+ $rowctxmenu add command -label [mc "Diff this -> selected"] \
-command {diffvssel 0}
- $rowctxmenu add command -label "Diff selected -> this" \
+ $rowctxmenu add command -label [mc "Diff selected -> this"] \
-command {diffvssel 1}
- $rowctxmenu add command -label "Make patch" -command mkpatch
- $rowctxmenu add command -label "Create tag" -command mktag
- $rowctxmenu add command -label "Write commit to file" -command writecommit
- $rowctxmenu add command -label "Create new branch" -command mkbranch
- $rowctxmenu add command -label "Cherry-pick this commit" \
+ $rowctxmenu add command -label [mc "Make patch"] -command mkpatch
+ $rowctxmenu add command -label [mc "Create tag"] -command mktag
+ $rowctxmenu add command -label [mc "Write commit to file"] -command writecommit
+ $rowctxmenu add command -label [mc "Create new branch"] -command mkbranch
+ $rowctxmenu add command -label [mc "Cherry-pick this commit"] \
-command cherrypick
- $rowctxmenu add command -label "Reset HEAD branch to here" \
+ $rowctxmenu add command -label [mc "Reset HEAD branch to here"] \
-command resethead
set fakerowmenu .fakerowmenu
menu $fakerowmenu -tearoff 0
- $fakerowmenu add command -label "Diff this -> selected" \
+ $fakerowmenu add command -label [mc "Diff this -> selected"] \
-command {diffvssel 0}
- $fakerowmenu add command -label "Diff selected -> this" \
+ $fakerowmenu add command -label [mc "Diff selected -> this"] \
-command {diffvssel 1}
- $fakerowmenu add command -label "Make patch" -command mkpatch
-# $fakerowmenu add command -label "Commit" -command {mkcommit 0}
-# $fakerowmenu add command -label "Commit all" -command {mkcommit 1}
-# $fakerowmenu add command -label "Revert local changes" -command revertlocal
+ $fakerowmenu add command -label [mc "Make patch"] -command mkpatch
+# $fakerowmenu add command -label [mc "Commit"] -command {mkcommit 0}
+# $fakerowmenu add command -label [mc "Commit all"] -command {mkcommit 1}
+# $fakerowmenu add command -label [mc "Revert local changes"] -command revertlocal
set headctxmenu .headctxmenu
menu $headctxmenu -tearoff 0
- $headctxmenu add command -label "Check out this branch" \
+ $headctxmenu add command -label [mc "Check out this branch"] \
-command cobranch
- $headctxmenu add command -label "Remove this branch" \
+ $headctxmenu add command -label [mc "Remove this branch"] \
-command rmbranch
global flist_menu
set flist_menu .flistctxmenu
menu $flist_menu -tearoff 0
- $flist_menu add command -label "Highlight this too" \
+ $flist_menu add command -label [mc "Highlight this too"] \
-command {flist_hl 0}
- $flist_menu add command -label "Highlight this only" \
+ $flist_menu add command -label [mc "Highlight this only"] \
-command {flist_hl 1}
}
@@ -1277,26 +1278,23 @@ proc about {} {
return
}
toplevel $w
- wm title $w "About gitk"
- message $w.m -text {
+ wm title $w [mc "About gitk"]
+ message $w.m -text [mc "
Gitk - a commit viewer for git
-Copyright © 2005-2006 Paul Mackerras
+Copyright © 2005-2006 Paul Mackerras
-Use and redistribute under the terms of the GNU General Public License} \
+Use and redistribute under the terms of the GNU General Public License"] \
-justify center -aspect 400 -border 2 -bg white -relief groove
pack $w.m -side top -fill x -padx 2 -pady 2
- $w.m configure -font uifont
- button $w.ok -text Close -command "destroy $w" -default active
+ button $w.ok -text [mc "Close"] -command "destroy $w" -default active
pack $w.ok -side bottom
- $w.ok configure -font uifont
bind $w <Visibility> "focus $w.ok"
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> "destroy $w"
}
proc keys {} {
- global uifont
set w .keys
if {[winfo exists $w]} {
raise $w
@@ -1308,8 +1306,8 @@ proc keys {} {
set M1T Ctrl
}
toplevel $w
- wm title $w "Gitk key bindings"
- message $w.m -text "
+ wm title $w [mc "Gitk key bindings"]
+ message $w.m -text [mc "
Gitk key bindings:
<$M1T-Q> Quit
@@ -1347,13 +1345,11 @@ f Scroll diff view to next file
<$M1T-KP-> Decrease font size
<$M1T-minus> Decrease font size
<F5> Update
-" \
+"] \
-justify left -bg white -border 2 -relief groove
pack $w.m -side top -fill both -padx 2 -pady 2
- $w.m configure -font uifont
- button $w.ok -text Close -command "destroy $w" -default active
+ button $w.ok -text [mc "Close"] -command "destroy $w" -default active
pack $w.ok -side bottom
- $w.ok configure -font uifont
bind $w <Visibility> "focus $w.ok"
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> "destroy $w"
@@ -1743,12 +1739,12 @@ proc flist_hl {only} {
global flist_menu_file findstring gdttype
set x [shellquote $flist_menu_file]
- if {$only || $findstring eq {} || $gdttype ne "touching paths:"} {
+ if {$only || $findstring eq {} || $gdttype ne [mc "touching paths:"]} {
set findstring $x
} else {
append findstring " " $x
}
- set gdttype "touching paths:"
+ set gdttype [mc "touching paths:"]
}
# Functions for adding and removing shell-type quoting
@@ -1848,7 +1844,7 @@ proc shellsplit {str} {
# Code to implement multiple views
proc newview {ishighlight} {
- global nextviewnum newviewname newviewperm uifont newishighlight
+ global nextviewnum newviewname newviewperm newishighlight
global newviewargs revtreeargs
set newishighlight $ishighlight
@@ -1860,7 +1856,7 @@ proc newview {ishighlight} {
set newviewname($nextviewnum) "View $nextviewnum"
set newviewperm($nextviewnum) 0
set newviewargs($nextviewnum) [shellarglist $revtreeargs]
- vieweditor $top $nextviewnum "Gitk view definition"
+ vieweditor $top $nextviewnum [mc "Gitk view definition"]
}
proc editview {} {
@@ -1880,27 +1876,26 @@ proc editview {} {
}
proc vieweditor {top n title} {
- global newviewname newviewperm viewfiles
- global uifont
+ global newviewname newviewperm viewfiles bgcolor
toplevel $top
wm title $top $title
- label $top.nl -text "Name" -font uifont
- entry $top.name -width 20 -textvariable newviewname($n) -font uifont
+ label $top.nl -text [mc "Name"]
+ entry $top.name -width 20 -textvariable newviewname($n)
grid $top.nl $top.name -sticky w -pady 5
- checkbutton $top.perm -text "Remember this view" -variable newviewperm($n) \
- -font uifont
+ checkbutton $top.perm -text [mc "Remember this view"] \
+ -variable newviewperm($n)
grid $top.perm - -pady 5 -sticky w
- message $top.al -aspect 1000 -font uifont \
- -text "Commits to include (arguments to git rev-list):"
+ message $top.al -aspect 1000 \
+ -text [mc "Commits to include (arguments to git rev-list):"]
grid $top.al - -sticky w -pady 5
entry $top.args -width 50 -textvariable newviewargs($n) \
- -background white -font uifont
+ -background $bgcolor
grid $top.args - -sticky ew -padx 5
- message $top.l -aspect 1000 -font uifont \
- -text "Enter files and directories to include, one per line:"
+ message $top.l -aspect 1000 \
+ -text [mc "Enter files and directories to include, one per line:"]
grid $top.l - -sticky w
- text $top.t -width 40 -height 10 -background white -font uifont
+ text $top.t -width 40 -height 10 -background $bgcolor -font uifont
if {[info exists viewfiles($n)]} {
foreach f $viewfiles($n) {
$top.t insert end $f
@@ -1911,10 +1906,8 @@ proc vieweditor {top n title} {
}
grid $top.t - -sticky ew -padx 5
frame $top.buts
- button $top.buts.ok -text "OK" -command [list newviewok $top $n] \
- -font uifont
- button $top.buts.can -text "Cancel" -command [list destroy $top] \
- -font uifont
+ button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
+ button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
grid $top.buts.ok $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -1947,7 +1940,7 @@ proc newviewok {top n} {
if {[catch {
set newargs [shellsplit $newviewargs($n)]
} err]} {
- error_popup "Error in commit selection arguments: $err"
+ error_popup "[mc "Error in commit selection arguments:"] $err"
wm raise $top
focus $top
return
@@ -1998,7 +1991,7 @@ proc delview {} {
if {$curview == 0} return
if {[info exists hlview] && $hlview == $curview} {
- set selectedhlview None
+ set selectedhlview [mc "None"]
unset hlview
}
allviewmenus $curview delete
@@ -2084,14 +2077,14 @@ proc showview {n} {
clear_display
if {[info exists hlview] && $hlview == $n} {
unset hlview
- set selectedhlview None
+ set selectedhlview [mc "None"]
}
catch {unset commitinterest}
set curview $n
set selectedview $n
- .bar.view entryconf Edit* -state [expr {$n == 0? "disabled": "normal"}]
- .bar.view entryconf Delete* -state [expr {$n == 0? "disabled": "normal"}]
+ .bar.view entryconf [mc "Edit view..."] -state [expr {$n == 0? "disabled": "normal"}]
+ .bar.view entryconf [mc "Delete view"] -state [expr {$n == 0? "disabled": "normal"}]
run refill_reflist
if {![info exists viewdata($n)]} {
@@ -2148,11 +2141,11 @@ proc showview {n} {
}
if {$phase ne {}} {
if {$phase eq "getcommits"} {
- show_status "Reading commits..."
+ show_status [mc "Reading commits..."]
}
run chewcommits $n
} elseif {$numcommits == 0} {
- show_status "No commits selected"
+ show_status [mc "No commits selected"]
}
}
@@ -2313,7 +2306,7 @@ proc gdttype_change {name ix op} {
stopfinding
if {$findstring ne {}} {
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
if {$highlight_files ne {}} {
set highlight_files {}
hfiles_change
@@ -2336,7 +2329,7 @@ proc find_change {name ix op} {
global gdttype findstring highlight_files
stopfinding
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
findcom_change
} else {
if {$highlight_files ne $findstring} {
@@ -2360,9 +2353,9 @@ proc findcom_change args {
catch {unset nhighlights}
unbolden
unmarkmatches
- if {$gdttype ne "containing:" || $findstring eq {}} {
+ if {$gdttype ne [mc "containing:"] || $findstring eq {}} {
set findpattern {}
- } elseif {$findtype eq "Regexp"} {
+ } elseif {$findtype eq [mc "Regexp"]} {
set findpattern $findstring
} else {
set e [string map {"*" "\\*" "?" "\\?" "\[" "\\\[" "\\" "\\\\"} \
@@ -2388,12 +2381,12 @@ proc makepatterns {l} {
proc do_file_hl {serial} {
global highlight_files filehighlight highlight_paths gdttype fhl_list
- if {$gdttype eq "touching paths:"} {
+ if {$gdttype eq [mc "touching paths:"]} {
if {[catch {set paths [shellsplit $highlight_files]}]} return
set highlight_paths [makepatterns $paths]
highlight_filelist
set gdtargs [concat -- $paths]
- } elseif {$gdttype eq "adding/removing string:"} {
+ } elseif {$gdttype eq [mc "adding/removing string:"]} {
set gdtargs [list "-S$highlight_files"]
} else {
# must be "containing:", i.e. we're searching commit info
@@ -2469,9 +2462,9 @@ proc readfhighlight {} {
proc doesmatch {f} {
global findtype findpattern
- if {$findtype eq "Regexp"} {
+ if {$findtype eq [mc "Regexp"]} {
return [regexp $findpattern $f]
- } elseif {$findtype eq "IgnCase"} {
+ } elseif {$findtype eq [mc "IgnCase"]} {
return [string match -nocase $findpattern $f]
} else {
return [string match $findpattern $f]
@@ -2488,11 +2481,11 @@ proc askfindhighlight {row id} {
}
set info $commitinfo($id)
set isbold 0
- set fldtypes {Headline Author Date Committer CDate Comments}
+ set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
foreach f $info ty $fldtypes {
- if {($findloc eq "All fields" || $findloc eq $ty) &&
+ if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
[doesmatch $f]} {
- if {$ty eq "Author"} {
+ if {$ty eq [mc "Author"]} {
set isbold 2
break
}
@@ -2520,14 +2513,14 @@ proc markrowmatches {row id} {
set author [lindex $commitinfo($id) 1]
$canv delete match$row
$canv2 delete match$row
- if {$findloc eq "All fields" || $findloc eq "Headline"} {
+ if {$findloc eq [mc "All fields"] || $findloc eq [mc "Headline"]} {
set m [findmatches $headline]
if {$m ne {}} {
markmatches $canv $row $headline $linehtag($row) $m \
[$canv itemcget $linehtag($row) -font] $row
}
}
- if {$findloc eq "All fields" || $findloc eq "Author"} {
+ if {$findloc eq [mc "All fields"] || $findloc eq [mc "Author"]} {
set m [findmatches $author]
if {$m ne {}} {
markmatches $canv2 $row $author $linentag($row) $m \
@@ -2540,7 +2533,7 @@ proc vrel_change {name ix op} {
global highlight_related
rhighlight_none
- if {$highlight_related ne "None"} {
+ if {$highlight_related ne [mc "None"]} {
run drawvisible
}
}
@@ -2554,7 +2547,7 @@ proc rhighlight_sel {a} {
set desc_todo [list $a]
catch {unset ancestor}
set anc_todo [list $a]
- if {$highlight_related ne "None"} {
+ if {$highlight_related ne [mc "None"]} {
rhighlight_none
run drawvisible
}
@@ -2637,20 +2630,20 @@ proc askrelhighlight {row id} {
if {![info exists selectedline]} return
set isbold 0
- if {$highlight_related eq "Descendent" ||
- $highlight_related eq "Not descendent"} {
+ if {$highlight_related eq [mc "Descendant"] ||
+ $highlight_related eq [mc "Not descendant"]} {
if {![info exists descendent($id)]} {
is_descendent $id
}
- if {$descendent($id) == ($highlight_related eq "Descendent")} {
+ if {$descendent($id) == ($highlight_related eq [mc "Descendant"])} {
set isbold 1
}
- } elseif {$highlight_related eq "Ancestor" ||
- $highlight_related eq "Not ancestor"} {
+ } elseif {$highlight_related eq [mc "Ancestor"] ||
+ $highlight_related eq [mc "Not ancestor"]} {
if {![info exists ancestor($id)]} {
is_ancestor $id
}
- if {$ancestor($id) == ($highlight_related eq "Ancestor")} {
+ if {$ancestor($id) == ($highlight_related eq [mc "Ancestor"])} {
set isbold 1
}
}
@@ -2880,7 +2873,7 @@ proc readdiffindex {fd serial} {
if {$isdiff && $serial == $lserial && $localirow == -1} {
# add the line for the changes in the index to the graph
set localirow $commitrow($curview,$mainheadid)
- set hl "Local changes checked in to index but not committed"
+ set hl [mc "Local changes checked in to index but not committed"]
set commitinfo($nullid2) [list $hl {} {} {} {} " $hl\n"]
set commitdata($nullid2) "\n $hl\n"
insertrow $localirow $nullid2
@@ -2910,7 +2903,7 @@ proc readdifffiles {fd serial} {
} else {
set localfrow $commitrow($curview,$mainheadid)
}
- set hl "Local uncommitted changes, not checked in to index"
+ set hl [mc "Local uncommitted changes, not checked in to index"]
set commitinfo($nullid) [list $hl {} {} {} {} " $hl\n"]
set commitdata($nullid) "\n $hl\n"
insertrow $localfrow $nullid
@@ -3737,7 +3730,7 @@ proc drawcmitrow {row} {
if {$findpattern ne {} && ![info exists nhighlights($row)]} {
askfindhighlight $row $id
}
- if {$highlight_related ne "None" && ![info exists rhighlights($row)]} {
+ if {$highlight_related ne [mc "None"] && ![info exists rhighlights($row)]} {
askrelhighlight $row $id
}
if {![info exists iddrawn($id)]} {
@@ -4226,11 +4219,11 @@ proc notbusy {what} {
proc findmatches {f} {
global findtype findstring
- if {$findtype == "Regexp"} {
+ if {$findtype == [mc "Regexp"]} {
set matches [regexp -indices -all -inline $findstring $f]
} else {
set fs $findstring
- if {$findtype == "IgnCase"} {
+ if {$findtype == [mc "IgnCase"]} {
set f [string tolower $f]
set fs [string tolower $fs]
}
@@ -4261,8 +4254,8 @@ proc dofind {{dirn 1} {wrap 1}} {
set findstartline $selectedline
}
set findcurline $findstartline
- nowbusy finding "Searching"
- if {$gdttype ne "containing:" && ![info exists filehighlight]} {
+ nowbusy finding [mc "Searching"]
+ if {$gdttype ne [mc "containing:"] && ![info exists filehighlight]} {
after cancel do_file_hl $fh_serial
do_file_hl $fh_serial
}
@@ -4292,7 +4285,7 @@ proc findmore {} {
if {![info exists find_dirn]} {
return 0
}
- set fldtypes {Headline Author Date Committer CDate Comments}
+ set fldtypes [list [mc "Headline"] [mc "Author"] [mc "Date"] [mc "Committer"] [mc "CDate"] [mc "Comments"]]
set l $findcurline
set moretodo 0
if {$find_dirn > 0} {
@@ -4325,7 +4318,7 @@ proc findmore {} {
}
set found 0
set domore 1
- if {$gdttype eq "containing:"} {
+ if {$gdttype eq [mc "containing:"]} {
for {} {$n > 0} {incr n -1; incr l $find_dirn} {
set id [lindex $displayorder $l]
# shouldn't happen unless git log doesn't give all the commits...
@@ -4336,7 +4329,7 @@ proc findmore {} {
}
set info $commitinfo($id)
foreach f $info ty $fldtypes {
- if {($findloc eq "All fields" || $findloc eq $ty) &&
+ if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
[doesmatch $f]} {
set found 1
break
@@ -4392,7 +4385,7 @@ proc findselectline {l} {
set markingmatches 1
set findcurline $l
selectline $l 1
- if {$findloc == "All fields" || $findloc == "Comments"} {
+ if {$findloc == [mc "All fields"] || $findloc == [mc "Comments"]} {
# highlight the matches in the comments
set f [$ctext get 1.0 $commentend]
set matches [findmatches $f]
@@ -4716,11 +4709,11 @@ proc selectline {l isnew} {
set linknum 0
set info $commitinfo($id)
set date [formatdate [lindex $info 2]]
- $ctext insert end "Author: [lindex $info 1] $date\n"
+ $ctext insert end "[mc "Author"]: [lindex $info 1] $date\n"
set date [formatdate [lindex $info 4]]
- $ctext insert end "Committer: [lindex $info 3] $date\n"
+ $ctext insert end "[mc "Committer"]: [lindex $info 3] $date\n"
if {[info exists idtags($id)]} {
- $ctext insert end "Tags:"
+ $ctext insert end [mc "Tags:"]
foreach tag $idtags($id) {
$ctext insert end " $tag"
}
@@ -4737,18 +4730,18 @@ proc selectline {l isnew} {
} else {
set tag m$np
}
- $ctext insert end "Parent: " $tag
+ $ctext insert end "[mc "Parent"]: " $tag
appendwithlinks [commit_descriptor $p] {}
incr np
}
} else {
foreach p $olds {
- append headers "Parent: [commit_descriptor $p]"
+ append headers "[mc "Parent"]: [commit_descriptor $p]"
}
}
foreach c $children($curview,$id) {
- append headers "Child: [commit_descriptor $c]"
+ append headers "[mc "Child"]: [commit_descriptor $c]"
}
# make anything that looks like a SHA1 ID be a clickable link
@@ -4757,13 +4750,13 @@ proc selectline {l isnew} {
if {![info exists allcommits]} {
getallcommits
}
- $ctext insert end "Branch: "
+ $ctext insert end "[mc "Branch"]: "
$ctext mark set branch "end -1c"
$ctext mark gravity branch left
- $ctext insert end "\nFollows: "
+ $ctext insert end "\n[mc "Follows"]: "
$ctext mark set follows "end -1c"
$ctext mark gravity follows left
- $ctext insert end "\nPrecedes: "
+ $ctext insert end "\n[mc "Precedes"]: "
$ctext mark set precedes "end -1c"
$ctext mark gravity precedes left
$ctext insert end "\n"
@@ -4780,7 +4773,7 @@ proc selectline {l isnew} {
$ctext conf -state disabled
set commentend [$ctext index "end - 1c"]
- init_flist "Comments"
+ init_flist [mc "Comments"]
if {$cmitmode eq "tree"} {
gettree $id
} elseif {[llength $olds] <= 1} {
@@ -5045,7 +5038,7 @@ proc mergediff {id l} {
set cmd [concat $cmd -- $viewfiles($curview)]
}
if {[catch {set mdf [open $cmd r]} err]} {
- error_popup "Error getting merge diffs: $err"
+ error_popup "[mc "Error getting merge diffs:"] $err"
return
}
fconfigure $mdf -blocking 0
@@ -5722,9 +5715,9 @@ proc sha1change {n1 n2 op} {
}
if {[$sha1but cget -state] == $state} return
if {$state == "normal"} {
- $sha1but conf -state normal -relief raised -text "Goto: "
+ $sha1but conf -state normal -relief raised -text "[mc "Goto:"] "
} else {
- $sha1but conf -state disabled -relief flat -text "SHA1 ID: "
+ $sha1but conf -state disabled -relief flat -text "[mc "SHA1 ID:"] "
}
}
@@ -5749,7 +5742,7 @@ proc gotocommit {} {
}
if {$matches ne {}} {
if {[llength $matches] > 1} {
- error_popup "Short SHA1 id $id is ambiguous"
+ error_popup [mc "Short SHA1 id %s is ambiguous" $id]
return
}
set id [lindex $matches 0]
@@ -5761,11 +5754,11 @@ proc gotocommit {} {
return
}
if {[regexp {^[0-9a-fA-F]{4,}$} $sha1string]} {
- set type "SHA1 id"
+ set msg [mc "SHA1 id %s is not known" $sha1string]
} else {
- set type "Tag/Head"
+ set msg [mc "Tag/Head %s is not known" $sha1string]
}
- error_popup "$type $sha1string is not known"
+ error_popup $msg
}
proc lineenter {x y id} {
@@ -5895,17 +5888,17 @@ proc lineclick {x y id isnew} {
$ctext conf -state normal
clear_ctext
settabs 0
- $ctext insert end "Parent:\t"
+ $ctext insert end "[mc "Parent"]:\t"
$ctext insert end $id link0
setlink $id link0
set info $commitinfo($id)
$ctext insert end "\n\t[lindex $info 0]\n"
- $ctext insert end "\tAuthor:\t[lindex $info 1]\n"
+ $ctext insert end "\t[mc "Author"]:\t[lindex $info 1]\n"
set date [formatdate [lindex $info 2]]
- $ctext insert end "\tDate:\t$date\n"
+ $ctext insert end "\t[mc "Date"]:\t$date\n"
set kids $children($curview,$id)
if {$kids ne {}} {
- $ctext insert end "\nChildren:"
+ $ctext insert end "\n[mc "Children"]:"
set i 0
foreach child $kids {
incr i
@@ -5915,9 +5908,9 @@ proc lineclick {x y id isnew} {
$ctext insert end $child link$i
setlink $child link$i
$ctext insert end "\n\t[lindex $info 0]"
- $ctext insert end "\n\tAuthor:\t[lindex $info 1]"
+ $ctext insert end "\n\t[mc "Author"]:\t[lindex $info 1]"
set date [formatdate [lindex $info 2]]
- $ctext insert end "\n\tDate:\t$date\n"
+ $ctext insert end "\n\t[mc "Date"]:\t$date\n"
}
}
$ctext conf -state disabled
@@ -5962,13 +5955,13 @@ proc rowmenu {x y id} {
}
if {$id ne $nullid && $id ne $nullid2} {
set menu $rowctxmenu
- $menu entryconfigure 7 -label "Reset $mainhead branch to here"
+ $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead]
} else {
set menu $fakerowmenu
}
- $menu entryconfigure "Diff this*" -state $state
- $menu entryconfigure "Diff selected*" -state $state
- $menu entryconfigure "Make patch" -state $state
+ $menu entryconfigure [mc "Diff this -> selected"] -state $state
+ $menu entryconfigure [mc "Diff selected -> this"] -state $state
+ $menu entryconfigure [mc "Make patch"] -state $state
tk_popup $menu $x $y
}
@@ -5993,13 +5986,13 @@ proc doseldiff {oldid newid} {
$ctext conf -state normal
clear_ctext
- init_flist "Top"
- $ctext insert end "From "
+ init_flist [mc "Top"]
+ $ctext insert end "[mc "From"] "
$ctext insert end $oldid link0
setlink $oldid link0
$ctext insert end "\n "
$ctext insert end [lindex $commitinfo($oldid) 0]
- $ctext insert end "\n\nTo "
+ $ctext insert end "\n\n[mc "To"] "
$ctext insert end $newid link1
setlink $newid link1
$ctext insert end "\n "
@@ -6022,9 +6015,9 @@ proc mkpatch {} {
set patchtop $top
catch {destroy $top}
toplevel $top
- label $top.title -text "Generate patch"
+ label $top.title -text [mc "Generate patch"]
grid $top.title - -pady 10
- label $top.from -text "From:"
+ label $top.from -text [mc "From:"]
entry $top.fromsha1 -width 40 -relief flat
$top.fromsha1 insert 0 $oldid
$top.fromsha1 conf -state readonly
@@ -6033,7 +6026,7 @@ proc mkpatch {} {
$top.fromhead insert 0 $oldhead
$top.fromhead conf -state readonly
grid x $top.fromhead -sticky w
- label $top.to -text "To:"
+ label $top.to -text [mc "To:"]
entry $top.tosha1 -width 40 -relief flat
$top.tosha1 insert 0 $newid
$top.tosha1 conf -state readonly
@@ -6042,16 +6035,16 @@ proc mkpatch {} {
$top.tohead insert 0 $newhead
$top.tohead conf -state readonly
grid x $top.tohead -sticky w
- button $top.rev -text "Reverse" -command mkpatchrev -padx 5
+ button $top.rev -text [mc "Reverse"] -command mkpatchrev -padx 5
grid $top.rev x -pady 10
- label $top.flab -text "Output file:"
+ label $top.flab -text [mc "Output file:"]
entry $top.fname -width 60
$top.fname insert 0 [file normalize "patch$patchnum.patch"]
incr patchnum
grid $top.flab $top.fname -sticky w
frame $top.buts
- button $top.buts.gen -text "Generate" -command mkpatchgo
- button $top.buts.can -text "Cancel" -command mkpatchcan
+ button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
+ button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
grid $top.buts.gen $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -6086,7 +6079,7 @@ proc mkpatchgo {} {
set cmd [lrange $cmd 1 end]
lappend cmd >$fname &
if {[catch {eval exec $cmd} err]} {
- error_popup "Error creating patch: $err"
+ error_popup "[mc "Error creating patch:"] $err"
}
catch {destroy $patchtop}
unset patchtop
@@ -6106,9 +6099,9 @@ proc mktag {} {
set mktagtop $top
catch {destroy $top}
toplevel $top
- label $top.title -text "Create tag"
+ label $top.title -text [mc "Create tag"]
grid $top.title - -pady 10
- label $top.id -text "ID:"
+ label $top.id -text [mc "ID:"]
entry $top.sha1 -width 40 -relief flat
$top.sha1 insert 0 $rowmenuid
$top.sha1 conf -state readonly
@@ -6117,12 +6110,12 @@ proc mktag {} {
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
$top.head conf -state readonly
grid x $top.head -sticky w
- label $top.tlab -text "Tag name:"
+ label $top.tlab -text [mc "Tag name:"]
entry $top.tag -width 60
grid $top.tlab $top.tag -sticky w
frame $top.buts
- button $top.buts.gen -text "Create" -command mktaggo
- button $top.buts.can -text "Cancel" -command mktagcan
+ button $top.buts.gen -text [mc "Create"] -command mktaggo
+ button $top.buts.can -text [mc "Cancel"] -command mktagcan
grid $top.buts.gen $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -6136,11 +6129,11 @@ proc domktag {} {
set id [$mktagtop.sha1 get]
set tag [$mktagtop.tag get]
if {$tag == {}} {
- error_popup "No tag name specified"
+ error_popup [mc "No tag name specified"]
return
}
if {[info exists tagids($tag)]} {
- error_popup "Tag \"$tag\" already exists"
+ error_popup [mc "Tag \"%s\" already exists" $tag]
return
}
if {[catch {
@@ -6150,7 +6143,7 @@ proc domktag {} {
puts $f $id
close $f
} err]} {
- error_popup "Error creating tag: $err"
+ error_popup "[mc "Error creating tag:"] $err"
return
}
@@ -6203,9 +6196,9 @@ proc writecommit {} {
set wrcomtop $top
catch {destroy $top}
toplevel $top
- label $top.title -text "Write commit to file"
+ label $top.title -text [mc "Write commit to file"]
grid $top.title - -pady 10
- label $top.id -text "ID:"
+ label $top.id -text [mc "ID:"]
entry $top.sha1 -width 40 -relief flat
$top.sha1 insert 0 $rowmenuid
$top.sha1 conf -state readonly
@@ -6214,16 +6207,16 @@ proc writecommit {} {
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
$top.head conf -state readonly
grid x $top.head -sticky w
- label $top.clab -text "Command:"
+ label $top.clab -text [mc "Command:"]
entry $top.cmd -width 60 -textvariable wrcomcmd
grid $top.clab $top.cmd -sticky w -pady 10
- label $top.flab -text "Output file:"
+ label $top.flab -text [mc "Output file:"]
entry $top.fname -width 60
$top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"]
grid $top.flab $top.fname -sticky w
frame $top.buts
- button $top.buts.gen -text "Write" -command wrcomgo
- button $top.buts.can -text "Cancel" -command wrcomcan
+ button $top.buts.gen -text [mc "Write"] -command wrcomgo
+ button $top.buts.can -text [mc "Cancel"] -command wrcomcan
grid $top.buts.gen $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -6238,7 +6231,7 @@ proc wrcomgo {} {
set cmd "echo $id | [$wrcomtop.cmd get]"
set fname [$wrcomtop.fname get]
if {[catch {exec sh -c $cmd >$fname &} err]} {
- error_popup "Error writing commit: $err"
+ error_popup "[mc "Error writing commit:"] $err"
}
catch {destroy $wrcomtop}
unset wrcomtop
@@ -6257,19 +6250,19 @@ proc mkbranch {} {
set top .makebranch
catch {destroy $top}
toplevel $top
- label $top.title -text "Create new branch"
+ label $top.title -text [mc "Create new branch"]
grid $top.title - -pady 10
- label $top.id -text "ID:"
+ label $top.id -text [mc "ID:"]
entry $top.sha1 -width 40 -relief flat
$top.sha1 insert 0 $rowmenuid
$top.sha1 conf -state readonly
grid $top.id $top.sha1 -sticky w
- label $top.nlab -text "Name:"
+ label $top.nlab -text [mc "Name:"]
entry $top.name -width 40
grid $top.nlab $top.name -sticky w
frame $top.buts
- button $top.buts.go -text "Create" -command [list mkbrgo $top]
- button $top.buts.can -text "Cancel" -command "catch {destroy $top}"
+ button $top.buts.go -text [mc "Create"] -command [list mkbrgo $top]
+ button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
grid $top.buts.go $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -6283,7 +6276,7 @@ proc mkbrgo {top} {
set name [$top.name get]
set id [$top.sha1 get]
if {$name eq {}} {
- error_popup "Please specify a name for the new branch"
+ error_popup [mc "Please specify a name for the new branch"]
return
}
catch {destroy $top}
@@ -6312,11 +6305,12 @@ proc cherrypick {} {
set oldhead [exec git rev-parse HEAD]
set dheads [descheads $rowmenuid]
if {$dheads ne {} && [lsearch -exact $dheads $oldhead] >= 0} {
- set ok [confirm_popup "Commit [string range $rowmenuid 0 7] is already\
- included in branch $mainhead -- really re-apply it?"]
+ set ok [confirm_popup [mc "Commit %s is already\
+ included in branch %s -- really re-apply it?" \
+ [string range $rowmenuid 0 7] $mainhead]]
if {!$ok} return
}
- nowbusy cherrypick "Cherry-picking"
+ nowbusy cherrypick [mc "Cherry-picking"]
update
# Unfortunately git-cherry-pick writes stuff to stderr even when
# no error occurs, and exec takes that as an indication of error...
@@ -6328,7 +6322,7 @@ proc cherrypick {} {
set newhead [exec git rev-parse HEAD]
if {$newhead eq $oldhead} {
notbusy cherrypick
- error_popup "No changes committed"
+ error_popup [mc "No changes committed"]
return
}
addnewchild $newhead $oldhead
@@ -6351,28 +6345,28 @@ proc resethead {} {
set w ".confirmreset"
toplevel $w
wm transient $w .
- wm title $w "Confirm reset"
+ wm title $w [mc "Confirm reset"]
message $w.m -text \
- "Reset branch $mainhead to [string range $rowmenuid 0 7]?" \
+ [mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]] \
-justify center -aspect 1000
pack $w.m -side top -fill x -padx 20 -pady 20
frame $w.f -relief sunken -border 2
- message $w.f.rt -text "Reset type:" -aspect 1000
+ message $w.f.rt -text [mc "Reset type:"] -aspect 1000
grid $w.f.rt -sticky w
set resettype mixed
radiobutton $w.f.soft -value soft -variable resettype -justify left \
- -text "Soft: Leave working tree and index untouched"
+ -text [mc "Soft: Leave working tree and index untouched"]
grid $w.f.soft -sticky w
radiobutton $w.f.mixed -value mixed -variable resettype -justify left \
- -text "Mixed: Leave working tree untouched, reset index"
+ -text [mc "Mixed: Leave working tree untouched, reset index"]
grid $w.f.mixed -sticky w
radiobutton $w.f.hard -value hard -variable resettype -justify left \
- -text "Hard: Reset working tree and index\n(discard ALL local changes)"
+ -text [mc "Hard: Reset working tree and index\n(discard ALL local changes)"]
grid $w.f.hard -sticky w
pack $w.f -side top -fill x
- button $w.ok -text OK -command "set confirm_ok 1; destroy $w"
+ button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
pack $w.ok -side left -fill x -padx 20 -pady 20
- button $w.cancel -text Cancel -command "destroy $w"
+ button $w.cancel -text [mc Cancel] -command "destroy $w"
pack $w.cancel -side right -fill x -padx 20 -pady 20
bind $w <Visibility> "grab $w; focus $w"
tkwait window $w
@@ -6383,7 +6377,7 @@ proc resethead {} {
} else {
dohidelocalchanges
filerun $fd [list readresetstat $fd]
- nowbusy reset "Resetting"
+ nowbusy reset [mc "Resetting"]
}
}
@@ -6440,7 +6434,7 @@ proc cobranch {} {
# check the tree is clean first??
set oldmainhead $mainhead
- nowbusy checkout "Checking out"
+ nowbusy checkout [mc "Checking out"]
update
dohidelocalchanges
if {[catch {
@@ -6470,14 +6464,14 @@ proc rmbranch {} {
set id $headmenuid
# this check shouldn't be needed any more...
if {$head eq $mainhead} {
- error_popup "Cannot delete the currently checked-out branch"
+ error_popup [mc "Cannot delete the currently checked-out branch"]
return
}
set dheads [descheads $id]
if {[llength $dheads] == 1 && $idheads($dheads) eq $head} {
# the stuff on this branch isn't on any other branch
- if {![confirm_popup "The commits on branch $head aren't on any other\
- branch.\nReally delete branch $head?"]} return
+ if {![confirm_popup [mc "The commits on branch %s aren't on any other\
+ branch.\nReally delete branch %s?" $head $head]]} return
}
nowbusy rmbranch
update
@@ -6507,7 +6501,7 @@ proc showrefs {} {
return
}
toplevel $top
- wm title $top "Tags and heads: [file tail [pwd]]"
+ wm title $top [mc "Tags and heads: %s" [file tail [pwd]]]
text $top.list -background $bgcolor -foreground $fgcolor \
-selectbackground $selectbgcolor -font mainfont \
-xscrollcommand "$top.xsb set" -yscrollcommand "$top.ysb set" \
@@ -6521,15 +6515,14 @@ proc showrefs {} {
grid $top.list $top.ysb -sticky nsew
grid $top.xsb x -sticky ew
frame $top.f
- label $top.f.l -text "Filter: " -font uifont
- entry $top.f.e -width 20 -textvariable reflistfilter -font uifont
+ label $top.f.l -text "[mc "Filter"]: "
+ entry $top.f.e -width 20 -textvariable reflistfilter
set reflistfilter "*"
trace add variable reflistfilter write reflistfilter_change
pack $top.f.e -side right -fill x -expand 1
pack $top.f.l -side left
grid $top.f - -sticky ew -pady 2
- button $top.close -command [list destroy $top] -text "Close" \
- -font uifont
+ button $top.close -command [list destroy $top] -text [mc "Close"]
grid $top.close -
grid columnconfigure $top 0 -weight 1
grid rowconfigure $top 0 -weight 1
@@ -6816,9 +6809,9 @@ proc getallclines {fd} {
dropcache $err
return
}
- error_popup "Error reading commit topology information;\
+ error_popup "[mc "Error reading commit topology information;\
branch and preceding/following tag information\
- will be incomplete.\n($err)"
+ will be incomplete."]\n($err)"
set cacheok 0
}
if {[incr allcommits -1] == 0} {
@@ -7800,7 +7793,7 @@ proc showtag {tag isnew} {
if {[info exists tagcontents($tag)]} {
set text $tagcontents($tag)
} else {
- set text "Tag: $tag\nId: $tagids($tag)"
+ set text "[mc "Tag"]: $tag\n[mc "Id"]: $tagids($tag)"
}
appendwithlinks $text {}
$ctext conf -state disabled
@@ -7840,8 +7833,8 @@ proc choosefont {font which} {
font create sample
eval font config sample [font actual $font]
toplevel $top
- wm title $top "Gitk font chooser"
- label $top.l -textvariable fontparam(which) -font uifont
+ wm title $top [mc "Gitk font chooser"]
+ label $top.l -textvariable fontparam(which)
pack $top.l -side top
set fontlist [lsort [font families]]
frame $top.f
@@ -7857,10 +7850,10 @@ proc choosefont {font which} {
-textvariable fontparam(size) \
-validatecommand {string is integer -strict %s}
checkbutton $top.g.bold -padx 5 \
- -font {{Times New Roman} 12 bold} -text "B" -indicatoron 0 \
+ -font {{Times New Roman} 12 bold} -text [mc "B"] -indicatoron 0 \
-variable fontparam(weight) -onvalue bold -offvalue normal
checkbutton $top.g.ital -padx 5 \
- -font {{Times New Roman} 12 italic} -text "I" -indicatoron 0 \
+ -font {{Times New Roman} 12 italic} -text [mc "I"] -indicatoron 0 \
-variable fontparam(slant) -onvalue italic -offvalue roman
pack $top.g.size $top.g.bold $top.g.ital -side left
pack $top.g -side top
@@ -7871,10 +7864,8 @@ proc choosefont {font which} {
bind $top.c <Configure> [list centertext $top.c]
pack $top.c -side top -fill x
frame $top.buts
- button $top.buts.ok -text "OK" -command fontok -default active \
- -font uifont
- button $top.buts.can -text "Cancel" -command fontcan -default normal \
- -font uifont
+ button $top.buts.ok -text [mc "OK"] -command fontok -default active
+ button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal
grid $top.buts.ok $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -7942,7 +7933,7 @@ proc doprefs {} {
global maxwidth maxgraphpct
global oldprefs prefstop showneartags showlocalchanges
global bgcolor fgcolor ctext diffcolors selectbgcolor
- global uifont tabstop limitdiffs
+ global tabstop limitdiffs
set top .gitkprefs
set prefstop $top
@@ -7955,86 +7946,80 @@ proc doprefs {} {
set oldprefs($v) [set $v]
}
toplevel $top
- wm title $top "Gitk preferences"
- label $top.ldisp -text "Commit list display options"
- $top.ldisp configure -font uifont
+ wm title $top [mc "Gitk preferences"]
+ label $top.ldisp -text [mc "Commit list display options"]
grid $top.ldisp - -sticky w -pady 10
label $top.spacer -text " "
- label $top.maxwidthl -text "Maximum graph width (lines)" \
+ label $top.maxwidthl -text [mc "Maximum graph width (lines)"] \
-font optionfont
spinbox $top.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
grid $top.spacer $top.maxwidthl $top.maxwidth -sticky w
- label $top.maxpctl -text "Maximum graph width (% of pane)" \
+ label $top.maxpctl -text [mc "Maximum graph width (% of pane)"] \
-font optionfont
spinbox $top.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
grid x $top.maxpctl $top.maxpct -sticky w
frame $top.showlocal
- label $top.showlocal.l -text "Show local changes" -font optionfont
+ label $top.showlocal.l -text [mc "Show local changes"] -font optionfont
checkbutton $top.showlocal.b -variable showlocalchanges
pack $top.showlocal.b $top.showlocal.l -side left
grid x $top.showlocal -sticky w
- label $top.ddisp -text "Diff display options"
- $top.ddisp configure -font uifont
+ label $top.ddisp -text [mc "Diff display options"]
grid $top.ddisp - -sticky w -pady 10
- label $top.tabstopl -text "Tab spacing" -font optionfont
+ label $top.tabstopl -text [mc "Tab spacing"] -font optionfont
spinbox $top.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
grid x $top.tabstopl $top.tabstop -sticky w
frame $top.ntag
- label $top.ntag.l -text "Display nearby tags" -font optionfont
+ label $top.ntag.l -text [mc "Display nearby tags"] -font optionfont
checkbutton $top.ntag.b -variable showneartags
pack $top.ntag.b $top.ntag.l -side left
grid x $top.ntag -sticky w
frame $top.ldiff
- label $top.ldiff.l -text "Limit diffs to listed paths" -font optionfont
+ label $top.ldiff.l -text [mc "Limit diffs to listed paths"] -font optionfont
checkbutton $top.ldiff.b -variable limitdiffs
pack $top.ldiff.b $top.ldiff.l -side left
grid x $top.ldiff -sticky w
- label $top.cdisp -text "Colors: press to choose"
- $top.cdisp configure -font uifont
+ label $top.cdisp -text [mc "Colors: press to choose"]
grid $top.cdisp - -sticky w -pady 10
label $top.bg -padx 40 -relief sunk -background $bgcolor
- button $top.bgbut -text "Background" -font optionfont \
+ button $top.bgbut -text [mc "Background"] -font optionfont \
-command [list choosecolor bgcolor 0 $top.bg background setbg]
grid x $top.bgbut $top.bg -sticky w
label $top.fg -padx 40 -relief sunk -background $fgcolor
- button $top.fgbut -text "Foreground" -font optionfont \
+ button $top.fgbut -text [mc "Foreground"] -font optionfont \
-command [list choosecolor fgcolor 0 $top.fg foreground setfg]
grid x $top.fgbut $top.fg -sticky w
label $top.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]
- button $top.diffoldbut -text "Diff: old lines" -font optionfont \
+ button $top.diffoldbut -text [mc "Diff: old lines"] -font optionfont \
-command [list choosecolor diffcolors 0 $top.diffold "diff old lines" \
[list $ctext tag conf d0 -foreground]]
grid x $top.diffoldbut $top.diffold -sticky w
label $top.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]
- button $top.diffnewbut -text "Diff: new lines" -font optionfont \
+ button $top.diffnewbut -text [mc "Diff: new lines"] -font optionfont \
-command [list choosecolor diffcolors 1 $top.diffnew "diff new lines" \
[list $ctext tag conf d1 -foreground]]
grid x $top.diffnewbut $top.diffnew -sticky w
label $top.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]
- button $top.hunksepbut -text "Diff: hunk header" -font optionfont \
+ button $top.hunksepbut -text [mc "Diff: hunk header"] -font optionfont \
-command [list choosecolor diffcolors 2 $top.hunksep \
"diff hunk header" \
[list $ctext tag conf hunksep -foreground]]
grid x $top.hunksepbut $top.hunksep -sticky w
label $top.selbgsep -padx 40 -relief sunk -background $selectbgcolor
- button $top.selbgbut -text "Select bg" -font optionfont \
+ button $top.selbgbut -text [mc "Select bg"] -font optionfont \
-command [list choosecolor selectbgcolor 0 $top.selbgsep background setselbg]
grid x $top.selbgbut $top.selbgsep -sticky w
- label $top.cfont -text "Fonts: press to choose"
- $top.cfont configure -font uifont
+ label $top.cfont -text [mc "Fonts: press to choose"]
grid $top.cfont - -sticky w -pady 10
- mkfontdisp mainfont $top "Main font"
- mkfontdisp textfont $top "Diff display font"
- mkfontdisp uifont $top "User interface font"
+ mkfontdisp mainfont $top [mc "Main font"]
+ mkfontdisp textfont $top [mc "Diff display font"]
+ mkfontdisp uifont $top [mc "User interface font"]
frame $top.buts
- button $top.buts.ok -text "OK" -command prefsok -default active
- $top.buts.ok configure -font uifont
- button $top.buts.can -text "Cancel" -command prefscan -default normal
- $top.buts.can configure -font uifont
+ button $top.buts.ok -text [mc "OK"] -command prefsok -default active
+ button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
grid $top.buts.ok $top.buts.can
grid columnconfigure $top.buts 0 -weight 1 -uniform a
grid columnconfigure $top.buts 1 -weight 1 -uniform a
@@ -8046,7 +8031,7 @@ proc choosecolor {v vi w x cmd} {
global $v
set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \
- -title "Gitk: choose color for $x"]
+ -title [mc "Gitk: choose color for %s" $x]]
if {$c eq {}} return
$w conf -background $c
lset $v $vi $c
@@ -8427,8 +8412,8 @@ proc tcl_encoding {enc} {
# First check that Tcl/Tk is recent enough
if {[catch {package require Tk 8.4} err]} {
- show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
- Gitk requires at least Tcl/Tk 8.4."
+ show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
+ Gitk requires at least Tcl/Tk 8.4."]
exit 1
}
@@ -8476,6 +8461,25 @@ set diffcolors {red "#00a000" blue}
set diffcontext 3
set selectbgcolor gray85
+## For msgcat loading, first locate the installation location.
+if { [info exists ::env(GITK_MSGSDIR)] } {
+ ## Msgsdir was manually set in the environment.
+ set gitk_msgsdir $::env(GITK_MSGSDIR)
+} else {
+ ## Let's guess the prefix from argv0.
+ set gitk_prefix [file dirname [file dirname [file normalize $argv0]]]
+ set gitk_libdir [file join $gitk_prefix share gitk lib]
+ set gitk_msgsdir [file join $gitk_libdir msgs]
+ unset gitk_prefix
+}
+
+## Internationalization (i18n) through msgcat and gettext. See
+## http://www.gnu.org/software/gettext/manual/html_node/Tcl.html
+package require msgcat
+namespace import ::msgcat::mc
+## And eventually load the actual message catalog
+::msgcat::mcload $gitk_msgsdir
+
catch {source ~/.gitk}
font create optionfont -family sans-serif -size -12
@@ -8491,13 +8495,15 @@ eval font create textfontbold [fontflags textfont 1]
parsefont uifont $uifont
eval font create uifont [fontflags uifont]
+setoptions
+
# check that we can find a .git directory somewhere...
if {[catch {set gitdir [gitdir]}]} {
- show_error {} . "Cannot find a git repository here."
+ show_error {} . [mc "Cannot find a git repository here."]
exit 1
}
if {![file isdirectory $gitdir]} {
- show_error {} . "Cannot find the git directory \"$gitdir\"."
+ show_error {} . [mc "Cannot find the git directory \"%s\"." $gitdir]
exit 1
}
@@ -8536,8 +8542,8 @@ if {$i >= [llength $argv] && $revtreeargs ne {}} {
# with git log and git rev-list, check revtreeargs for filenames.
foreach arg $revtreeargs {
if {[file exists $arg]} {
- show_error {} . "Ambiguous argument '$arg': both revision\
- and filename"
+ show_error {} . [mc "Ambiguous argument '%s': both revision\
+ and filename" $arg]
exit 1
}
}
@@ -8548,7 +8554,7 @@ if {$i >= [llength $argv] && $revtreeargs ne {}} {
if {$i > 0} {
set err [string range $err [expr {$i + 6}] end]
}
- show_error {} . "Bad arguments to gitk:\n$err"
+ show_error {} . "[mc "Bad arguments to gitk:"]\n$err"
exit 1
}
}
@@ -8560,7 +8566,7 @@ if {$mergeonly} {
if {[catch {
set fd [open "| git ls-files -u" r]
} err]} {
- show_error {} . "Couldn't get list of unmerged files: $err"
+ show_error {} . "[mc "Couldn't get list of unmerged files:"] $err"
exit 1
}
while {[gets $fd line] >= 0} {
@@ -8576,11 +8582,11 @@ if {$mergeonly} {
catch {close $fd}
if {$mlist eq {}} {
if {$nr_unmerged == 0} {
- show_error {} . "No files selected: --merge specified but\
- no files are unmerged."
+ show_error {} . [mc "No files selected: --merge specified but\
+ no files are unmerged."]
} else {
- show_error {} . "No files selected: --merge specified but\
- no unmerged files are within file limit."
+ show_error {} . [mc "No files selected: --merge specified but\
+ no unmerged files are within file limit."]
}
exit 1
}
@@ -8612,8 +8618,8 @@ set firsttabstop 0
set nextviewnum 1
set curview 0
set selectedview 0
-set selectedhlview None
-set highlight_related None
+set selectedhlview [mc "None"]
+set highlight_related [mc "None"]
set highlight_files {}
set viewfiles(0) {}
set viewperm(0) 0
@@ -8638,13 +8644,13 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} {
set curview 1
set selectedview 1
set nextviewnum 2
- set viewname(1) "Command line"
+ set viewname(1) [mc "Command line"]
set viewfiles(1) $cmdline_files
set viewargs(1) $revtreeargs
set viewperm(1) 0
addviewmenu 1
- .bar.view entryconf Edit* -state normal
- .bar.view entryconf Delete* -state normal
+ .bar.view entryconf [mc "Edit view..."] -state normal
+ .bar.view entryconf [mc "Delete view"] -state normal
}
if {[info exists permviews]} {
diff --git a/gitk-git/po/.gitignore b/gitk-git/po/.gitignore
new file mode 100644
index 000000000..e358dd190
--- /dev/null
+++ b/gitk-git/po/.gitignore
@@ -0,0 +1 @@
+*.msg
diff --git a/gitk-git/po/de.po b/gitk-git/po/de.po
new file mode 100644
index 000000000..5ee2fca8b
--- /dev/null
+++ b/gitk-git/po/de.po
@@ -0,0 +1,725 @@
+# Translation of gitk to German.
+# Copyright (C) 2007 Paul Mackerras.
+# This file is distributed under the same license as the gitk package.
+# Christian Stimming <stimming@tuhh.de>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: git-gui\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-01-09 22:20+0100\n"
+"PO-Revision-Date: 2008-01-09 22:21+0100\n"
+"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gitk:101
+msgid "Error executing git rev-list:"
+msgstr "Fehler beim Ausführen von git-rev-list:"
+
+#: gitk:114
+msgid "Reading"
+msgstr "Lesen"
+
+#: gitk:141 gitk:2143
+msgid "Reading commits..."
+msgstr "Versionen lesen..."
+
+#: gitk:264
+msgid "Can't parse git log output:"
+msgstr "Git log Ausgabe kann nicht erkannt werden:"
+
+#: gitk:375 gitk:2147
+msgid "No commits selected"
+msgstr "Keine Versionen ausgewählt."
+
+#: gitk:486
+msgid "No commit information available"
+msgstr "Keine Versionsinformation verfügbar"
+
+#: gitk:585 gitk:607 gitk:1908 gitk:6366 gitk:7866 gitk:8020
+msgid "OK"
+msgstr "Ok"
+
+#: gitk:609 gitk:1909 gitk:6046 gitk:6117 gitk:6218 gitk:6264 gitk:6368
+#: gitk:7867 gitk:8021
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: gitk:646
+msgid "File"
+msgstr "Datei"
+
+#: gitk:648
+msgid "Update"
+msgstr "Aktualisieren"
+
+#: gitk:649
+msgid "Reread references"
+msgstr "Zweige neu laden"
+
+#: gitk:650
+msgid "List references"
+msgstr "Zweige auflisten"
+
+#: gitk:651
+msgid "Quit"
+msgstr "Beenden"
+
+#: gitk:653
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: gitk:654
+msgid "Preferences"
+msgstr "Einstellungen"
+
+#: gitk:657
+msgid "View"
+msgstr "Ansicht"
+
+#: gitk:658
+msgid "New view..."
+msgstr "Neue Ansicht..."
+
+#: gitk:659 gitk:2085 gitk:8651
+msgid "Edit view..."
+msgstr "Ansicht bearbeiten..."
+
+#: gitk:661 gitk:2086 gitk:8652
+msgid "Delete view"
+msgstr "Ansicht löschen"
+
+#: gitk:663
+msgid "All files"
+msgstr "Alle Dateien"
+
+#: gitk:667
+msgid "Help"
+msgstr "Hilfe"
+
+#: gitk:668 gitk:1280
+msgid "About gitk"
+msgstr "Ãœber gitk"
+
+#: gitk:669
+msgid "Key bindings"
+msgstr "Tastenkürzel"
+
+#: gitk:726
+msgid "SHA1 ID: "
+msgstr "SHA1:"
+
+#: gitk:776
+msgid "Find"
+msgstr "Suche"
+
+#: gitk:777
+msgid "next"
+msgstr "nächste"
+
+#: gitk:778
+msgid "prev"
+msgstr "vorige"
+
+#: gitk:779
+msgid "commit"
+msgstr "Version"
+
+#: gitk:782 gitk:784 gitk:2308 gitk:2331 gitk:2355 gitk:4257 gitk:4320
+msgid "containing:"
+msgstr "enthaltend:"
+
+#: gitk:785 gitk:1741 gitk:1746 gitk:2383
+msgid "touching paths:"
+msgstr "Pfad betreffend:"
+
+#: gitk:786 gitk:2388
+msgid "adding/removing string:"
+msgstr "String dazu/löschen:"
+
+#: gitk:795 gitk:797
+msgid "Exact"
+msgstr "Exakt"
+
+#: gitk:797 gitk:2466 gitk:4225
+msgid "IgnCase"
+msgstr "Kein Groß/Klein"
+
+#: gitk:797 gitk:2357 gitk:2464 gitk:4221
+msgid "Regexp"
+msgstr "Regexp"
+
+#: gitk:799 gitk:800 gitk:2485 gitk:2515 gitk:2522 gitk:4331 gitk:4387
+msgid "All fields"
+msgstr "Alle Felder"
+
+#: gitk:800 gitk:2483 gitk:2515 gitk:4287
+msgid "Headline"
+msgstr "Ãœberschrift"
+
+#: gitk:801 gitk:2483 gitk:4287 gitk:4387 gitk:4775
+msgid "Comments"
+msgstr "Beschreibung"
+
+#: gitk:801 gitk:2483 gitk:2487 gitk:2522 gitk:4287 gitk:4711 gitk:5895
+#: gitk:5910
+msgid "Author"
+msgstr "Autor"
+
+#: gitk:801 gitk:2483 gitk:4287 gitk:4713
+msgid "Committer"
+msgstr "Eintragender"
+
+#: gitk:829
+msgid "Search"
+msgstr "Suche"
+
+#: gitk:836
+msgid "Diff"
+msgstr "Vergleich"
+
+#: gitk:838
+msgid "Old version"
+msgstr "Alte Version"
+
+#: gitk:840
+msgid "New version"
+msgstr "Neue Version"
+
+#: gitk:842
+msgid "Lines of context"
+msgstr "Kontextzeilen"
+
+#: gitk:900
+msgid "Patch"
+msgstr "Patch"
+
+#: gitk:902
+msgid "Tree"
+msgstr "Baum"
+
+#: gitk:1018 gitk:1033 gitk:5961
+msgid "Diff this -> selected"
+msgstr "Vergleich diese -> gewählte"
+
+#: gitk:1020 gitk:1035 gitk:5962
+msgid "Diff selected -> this"
+msgstr "Vergleich gewählte -> diese"
+
+#: gitk:1022 gitk:1037 gitk:5963
+msgid "Make patch"
+msgstr "Patch erstellen"
+
+#: gitk:1023 gitk:6101
+msgid "Create tag"
+msgstr "Markierung erstellen"
+
+#: gitk:1024 gitk:6198
+msgid "Write commit to file"
+msgstr "Version in Datei schreiben"
+
+#: gitk:1025 gitk:6252
+msgid "Create new branch"
+msgstr "Neuen Zweig erstellen"
+
+#: gitk:1026
+msgid "Cherry-pick this commit"
+msgstr "Diese Version pflücken"
+
+#: gitk:1028
+msgid "Reset HEAD branch to here"
+msgstr "HEAD-Zweig auf diese Version zurücksetzen"
+
+#: gitk:1044
+msgid "Check out this branch"
+msgstr "Auf diesen Zweig umstellen"
+
+#: gitk:1046
+msgid "Remove this branch"
+msgstr "Zweig löschen"
+
+#: gitk:1052
+msgid "Highlight this too"
+msgstr "Diesen auch hervorheben"
+
+#: gitk:1054
+msgid "Highlight this only"
+msgstr "Nur diesen hervorheben"
+
+#: gitk:1281
+msgid ""
+"\n"
+"Gitk - a commit viewer for git\n"
+"\n"
+"Copyright © 2005-2006 Paul Mackerras\n"
+"\n"
+"Use and redistribute under the terms of the GNU General Public License"
+msgstr ""
+"\n"
+"Gitk - eine Visualisierung der Git Historie\n"
+"\n"
+"Copyright © 2005-2006 Paul Mackerras\n"
+"\n"
+"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public "
+"License\n"
+" "
+
+#: gitk:1289 gitk:1350 gitk:6524
+msgid "Close"
+msgstr "Schließen"
+
+#: gitk:1308
+msgid "Gitk key bindings"
+msgstr "Gitk Tastaturbelegung"
+
+#: gitk:1858
+msgid "Gitk view definition"
+msgstr "Gitk Ansichten"
+
+#: gitk:1882
+msgid "Name"
+msgstr "Name"
+
+#: gitk:1885
+msgid "Remember this view"
+msgstr "Diese Ansicht speichern"
+
+#: gitk:1889
+msgid "Commits to include (arguments to git rev-list):"
+msgstr "Versionen anzeigen (Argumente von git-rev-list):"
+
+#: gitk:1895
+msgid "Enter files and directories to include, one per line:"
+msgstr "Folgende Dateien und Verzeichnisse anzeigen (eine pro Zeile):"
+
+#: gitk:1942
+msgid "Error in commit selection arguments:"
+msgstr "Fehler in den ausgewählten Versionen:"
+
+#: gitk:1993 gitk:2079 gitk:2535 gitk:2549 gitk:3732 gitk:8620 gitk:8621
+msgid "None"
+msgstr "Keine"
+
+#: gitk:2483 gitk:4287 gitk:5897 gitk:5912
+msgid "Date"
+msgstr "Datum"
+
+#: gitk:2483 gitk:4287
+msgid "CDate"
+msgstr "Eintragedatum"
+
+#: gitk:2632 gitk:2637
+msgid "Descendant"
+msgstr "Abkömmling"
+
+#: gitk:2633
+msgid "Not descendant"
+msgstr "Nicht Abkömmling"
+
+#: gitk:2640 gitk:2645
+msgid "Ancestor"
+msgstr "Vorgänger"
+
+#: gitk:2641
+msgid "Not ancestor"
+msgstr "Nicht Vorgänger"
+
+#: gitk:2875
+msgid "Local changes checked in to index but not committed"
+msgstr "Lokale Änderungen bereitgestellt, aber nicht eingetragen"
+
+#: gitk:2905
+msgid "Local uncommitted changes, not checked in to index"
+msgstr "Lokale Änderungen, nicht bereitgestellt"
+
+#: gitk:4256
+msgid "Searching"
+msgstr "Suchen"
+
+#: gitk:4715
+msgid "Tags:"
+msgstr "Markierungen:"
+
+#: gitk:4732 gitk:4738 gitk:5890
+msgid "Parent"
+msgstr "Eltern"
+
+#: gitk:4743
+msgid "Child"
+msgstr "Kind"
+
+#: gitk:4752
+msgid "Branch"
+msgstr "Zweig"
+
+#: gitk:4755
+msgid "Follows"
+msgstr "Folgt auf"
+
+#: gitk:4758
+msgid "Precedes"
+msgstr "Vorgänger von"
+
+#: gitk:5040
+msgid "Error getting merge diffs:"
+msgstr "Fehler beim Laden des Vergleichs:"
+
+#: gitk:5717
+msgid "Goto:"
+msgstr "Gehe zu:"
+
+#: gitk:5719
+msgid "SHA1 ID:"
+msgstr "SHA1 Kennung:"
+
+#: gitk:5744
+#, tcl-format
+msgid "Short SHA1 id %s is ambiguous"
+msgstr "Kurze SHA1-Kennung »%s« ist mehrdeutig"
+
+#: gitk:5756
+#, tcl-format
+msgid "SHA1 id %s is not known"
+msgstr "SHA1-Kennung »%s« unbekannt"
+
+#: gitk:5758
+#, tcl-format
+msgid "Tag/Head %s is not known"
+msgstr "Markierung/Zweig »%s« ist unbekannt"
+
+#: gitk:5900
+msgid "Children"
+msgstr "Kinder"
+
+#: gitk:5957
+#, tcl-format
+msgid "Reset %s branch to here"
+msgstr "Zweig »%s« hierher zurücksetzen"
+
+#: gitk:5988
+msgid "Top"
+msgstr "Oben"
+
+#: gitk:5989
+msgid "From"
+msgstr "Von"
+
+#: gitk:5994
+msgid "To"
+msgstr "bis"
+
+#: gitk:6017
+msgid "Generate patch"
+msgstr "Patch erstellen"
+
+#: gitk:6019
+msgid "From:"
+msgstr "Von:"
+
+#: gitk:6028
+msgid "To:"
+msgstr "bis:"
+
+#: gitk:6037
+msgid "Reverse"
+msgstr "Umgekehrt"
+
+#: gitk:6039 gitk:6212
+msgid "Output file:"
+msgstr "Ausgabedatei:"
+
+#: gitk:6045
+msgid "Generate"
+msgstr "Erzeugen"
+
+#: gitk:6081
+msgid "Error creating patch:"
+msgstr "Fehler beim Patch erzeugen:"
+
+#: gitk:6103 gitk:6200 gitk:6254
+msgid "ID:"
+msgstr "ID:"
+
+#: gitk:6112
+msgid "Tag name:"
+msgstr "Markierungsname:"
+
+#: gitk:6116 gitk:6263
+msgid "Create"
+msgstr "Erstellen"
+
+#: gitk:6131
+msgid "No tag name specified"
+msgstr "Kein Markierungsname angegeben"
+
+#: gitk:6135
+#, tcl-format
+msgid "Tag \"%s\" already exists"
+msgstr "Markierung »%s« existiert bereits."
+
+#: gitk:6145
+msgid "Error creating tag:"
+msgstr "Fehler bei Markierung erstellen:"
+
+#: gitk:6209
+msgid "Command:"
+msgstr "Kommando:"
+
+#: gitk:6217
+msgid "Write"
+msgstr "Schreiben"
+
+#: gitk:6233
+msgid "Error writing commit:"
+msgstr "Fehler beim Version eintragen:"
+
+#: gitk:6259
+msgid "Name:"
+msgstr "Name:"
+
+#: gitk:6278
+msgid "Please specify a name for the new branch"
+msgstr "Bitte geben Sie einen Namen für den neuen Zweig an."
+
+#: gitk:6307
+#, tcl-format
+msgid "Commit %s is already included in branch %s -- really re-apply it?"
+msgstr ""
+"Version »%s« ist bereits im Zweig »%s« enthalten -- trotzdem erneut "
+"eintragen?"
+
+#: gitk:6312
+msgid "Cherry-picking"
+msgstr "Version pflücken"
+
+#: gitk:6324
+msgid "No changes committed"
+msgstr "Keine Änderungen eingetragen"
+
+#: gitk:6347
+msgid "Confirm reset"
+msgstr "Zurücksetzen bestätigen"
+
+#: gitk:6349
+#, tcl-format
+msgid "Reset branch %s to %s?"
+msgstr "Zweig »%s« auf »%s« zurücksetzen?"
+
+#: gitk:6353
+msgid "Reset type:"
+msgstr "Art des Zurücksetzens:"
+
+#: gitk:6357
+msgid "Soft: Leave working tree and index untouched"
+msgstr "Harmlos: Arbeitskopie und Bereitstellung unverändert"
+
+#: gitk:6360
+msgid "Mixed: Leave working tree untouched, reset index"
+msgstr ""
+"Gemischt: Arbeitskopie unverändert,\n"
+"Bereitstellung zurückgesetzt"
+
+#: gitk:6363
+msgid ""
+"Hard: Reset working tree and index\n"
+"(discard ALL local changes)"
+msgstr ""
+"Hart: Arbeitskopie und Bereitstellung\n"
+"(Alle lokalen Änderungen werden gelöscht)"
+
+#: gitk:6379
+msgid "Resetting"
+msgstr "Zurücksetzen"
+
+#: gitk:6436
+msgid "Checking out"
+msgstr "Umstellen"
+
+#: gitk:6466
+msgid "Cannot delete the currently checked-out branch"
+msgstr ""
+"Der Zweig, auf den die Arbeitskopie momentan umgestellt ist, kann nicht "
+"gelöscht werden."
+
+#: gitk:6472
+#, tcl-format
+msgid ""
+"The commits on branch %s aren't on any other branch.\n"
+"Really delete branch %s?"
+msgstr ""
+"Die Versionen auf Zweig »%s« existieren auf keinem anderen Zweig.\n"
+"Zweig »%s« trotzdem löschen?"
+
+#: gitk:6503
+#, tcl-format
+msgid "Tags and heads: %s"
+msgstr "Markierungen und Zweige: %s"
+
+#: gitk:6517
+msgid "Filter"
+msgstr "Filtern"
+
+#: gitk:6811
+msgid ""
+"Error reading commit topology information; branch and preceding/following "
+"tag information will be incomplete."
+msgstr ""
+"Fehler beim Lesen der Strukturinformationen; Zweige und Vorgänger/Nachfolger "
+"Informationen werden unvollständig sein."
+
+#: gitk:7795
+msgid "Tag"
+msgstr "Markierung"
+
+#: gitk:7795
+msgid "Id"
+msgstr "Id"
+
+#: gitk:7835
+msgid "Gitk font chooser"
+msgstr "Gitk Schriften wählen"
+
+#: gitk:7852
+msgid "B"
+msgstr "F"
+
+#: gitk:7855
+msgid "I"
+msgstr "K"
+
+#: gitk:7948
+msgid "Gitk preferences"
+msgstr "Gitk Einstellungen"
+
+#: gitk:7949
+msgid "Commit list display options"
+msgstr "Anzeige Versionsliste"
+
+#: gitk:7952
+msgid "Maximum graph width (lines)"
+msgstr "Maximale Graphenbreite (Zeilen)"
+
+#: gitk:7956
+#, tcl-format
+msgid "Maximum graph width (% of pane)"
+msgstr "Maximale Graphenbreite (% des Fensters)"
+
+#: gitk:7961
+msgid "Show local changes"
+msgstr "Lokale Änderungen anzeigen"
+
+#: gitk:7966
+msgid "Diff display options"
+msgstr "Anzeige Vergleich"
+
+#: gitk:7968
+msgid "Tab spacing"
+msgstr "Tabulatorbreite"
+
+#: gitk:7972
+msgid "Display nearby tags"
+msgstr "Naheliegende Ãœberschriften anzeigen"
+
+#: gitk:7977
+msgid "Limit diffs to listed paths"
+msgstr "Vergleich nur für angezeigte Pfade"
+
+#: gitk:7982
+msgid "Colors: press to choose"
+msgstr "Farben: Klicken zum Wählen"
+
+#: gitk:7985
+msgid "Background"
+msgstr "Vordergrund"
+
+#: gitk:7989
+msgid "Foreground"
+msgstr "Hintergrund"
+
+#: gitk:7993
+msgid "Diff: old lines"
+msgstr "Vergleich: Alte Zeilen"
+
+#: gitk:7998
+msgid "Diff: new lines"
+msgstr "Vergleich: Neue Zeilen"
+
+#: gitk:8003
+msgid "Diff: hunk header"
+msgstr "Vergleich: Änderungstitel"
+
+#: gitk:8009
+msgid "Select bg"
+msgstr "Hintergrundfarbe Auswählen"
+
+#: gitk:8013
+msgid "Fonts: press to choose"
+msgstr "Schriftart: Klicken zum Wählen"
+
+#: gitk:8015
+msgid "Main font"
+msgstr "Programmschriftart"
+
+#: gitk:8016
+msgid "Diff display font"
+msgstr "Vergleich"
+
+#: gitk:8017
+msgid "User interface font"
+msgstr "Beschriftungen"
+
+#: gitk:8033
+#, tcl-format
+msgid "Gitk: choose color for %s"
+msgstr "Gitk: Farbe wählen für %s"
+
+#: gitk:8414
+msgid ""
+"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+" Gitk requires at least Tcl/Tk 8.4."
+msgstr ""
+"Gitk läuft nicht mit dieser Version von Tcl/Tk.\n"
+"Gitk benötigt mindestens Tcl/Tk 8.4."
+
+#: gitk:8501
+msgid "Cannot find a git repository here."
+msgstr "Kein Git-Projektarchiv gefunden."
+
+#: gitk:8505
+#, tcl-format
+msgid "Cannot find the git directory \"%s\"."
+msgstr "Git-Verzeichnis »%s« wurde nicht gefunden."
+
+#: gitk:8544
+#, tcl-format
+msgid "Ambiguous argument '%s': both revision and filename"
+msgstr "Mehrdeutige Angabe »%s«: Sowohl Version als auch Dateiname existiert."
+
+#: gitk:8556
+msgid "Bad arguments to gitk:"
+msgstr "Falsche Kommandozeilen-Parameter für gitk:"
+
+#: gitk:8568
+msgid "Couldn't get list of unmerged files:"
+msgstr "Liste der nicht-zusammengeführten Dateien nicht gefunden:"
+
+#: gitk:8584
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr ""
+"Keine Dateien ausgewähle: --merge angegeben, es existieren aber keine nicht-"
+"zusammengeführten Dateien."
+
+#: gitk:8587
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr ""
+"Keine Dateien ausgewähle: --merge angegeben, aber keine nicht-"
+"zusammengeführten Dateien sind in der Dateiauswahl."
+
+#: gitk:8646
+msgid "Command line"
+msgstr "Kommandozeile"
diff --git a/gitk-git/po/po2msg.sh b/gitk-git/po/po2msg.sh
new file mode 100644
index 000000000..c63248e37
--- /dev/null
+++ b/gitk-git/po/po2msg.sh
@@ -0,0 +1,133 @@
+#!/bin/sh
+# Tcl ignores the next line -*- tcl -*- \
+exec tclsh "$0" -- "$@"
+
+# This is a really stupid program, which serves as an alternative to
+# msgfmt. It _only_ translates to Tcl mode, does _not_ validate the
+# input, and does _not_ output any statistics.
+
+proc u2a {s} {
+ set res ""
+ foreach i [split $s ""] {
+ scan $i %c c
+ if {$c<128} {
+ # escape '[', '\' and ']'
+ if {$c == 0x5b || $c == 0x5d} {
+ append res "\\"
+ }
+ append res $i
+ } else {
+ append res \\u[format %04.4x $c]
+ }
+ }
+ return $res
+}
+
+set output_directory "."
+set lang "dummy"
+set files [list]
+set show_statistics 0
+
+# parse options
+for {set i 0} {$i < $argc} {incr i} {
+ set arg [lindex $argv $i]
+ if {$arg == "--statistics"} {
+ incr show_statistics
+ continue
+ }
+ if {$arg == "--tcl"} {
+ # we know
+ continue
+ }
+ if {$arg == "-l"} {
+ incr i
+ set lang [lindex $argv $i]
+ continue
+ }
+ if {$arg == "-d"} {
+ incr i
+ set tmp [lindex $argv $i]
+ regsub "\[^/\]$" $tmp "&/" output_directory
+ continue
+ }
+ lappend files $arg
+}
+
+proc flush_msg {} {
+ global msgid msgstr mode lang out fuzzy
+ global translated_count fuzzy_count not_translated_count
+
+ if {![info exists msgid] || $mode == ""} {
+ return
+ }
+ set mode ""
+ if {$fuzzy == 1} {
+ incr fuzzy_count
+ set fuzzy 0
+ return
+ }
+
+ if {$msgid == ""} {
+ set prefix "set ::msgcat::header"
+ } else {
+ if {$msgstr == ""} {
+ incr not_translated_count
+ return
+ }
+ set prefix "::msgcat::mcset $lang \"[u2a $msgid]\""
+ incr translated_count
+ }
+
+ puts $out "$prefix \"[u2a $msgstr]\""
+}
+
+set fuzzy 0
+set translated_count 0
+set fuzzy_count 0
+set not_translated_count 0
+foreach file $files {
+ regsub "^.*/\(\[^/\]*\)\.po$" $file "$output_directory\\1.msg" outfile
+ set in [open $file "r"]
+ fconfigure $in -encoding utf-8
+ set out [open $outfile "w"]
+
+ set mode ""
+ while {[gets $in line] >= 0} {
+ if {[regexp "^#" $line]} {
+ if {[regexp ", fuzzy" $line]} {
+ set fuzzy 1
+ } else {
+ flush_msg
+ }
+ continue
+ } elseif {[regexp "^msgid \"(.*)\"$" $line dummy match]} {
+ flush_msg
+ set msgid $match
+ set mode "msgid"
+ } elseif {[regexp "^msgstr \"(.*)\"$" $line dummy match]} {
+ set msgstr $match
+ set mode "msgstr"
+ } elseif {$line == ""} {
+ flush_msg
+ } elseif {[regexp "^\"(.*)\"$" $line dummy match]} {
+ if {$mode == "msgid"} {
+ append msgid $match
+ } elseif {$mode == "msgstr"} {
+ append msgstr $match
+ } else {
+ puts stderr "I do not know what to do: $match"
+ }
+ } else {
+ puts stderr "Cannot handle $line"
+ }
+ }
+ flush_msg
+ close $in
+ close $out
+}
+
+if {$show_statistics} {
+ puts [concat "$translated_count translated messages, " \
+ "$fuzzy_count fuzzy ones, " \
+ "$not_translated_count untranslated ones."]
+}
diff --git a/gitweb/README b/gitweb/README
index b28f59f57..4c8bedf74 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -129,17 +129,30 @@ descriptions.
Gitweb config file variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You can set, among others, the following variables in gitweb config files:
+You can set, among others, the following variables in gitweb config files
+(with the exception of $projectroot and $projects_list this list does
+not include variables usually directly set during build):
* $GIT
Cure git executable to use. By default set to "$GIT_BINDIR/git", which
in turn is by default set to "$(bindir)/git". If you use git from binary
package, set this to "/usr/bin/git". This can just be "git" if your
webserver has a sensible PATH. If you have multiple git versions
- installed it is / can be used to choose which one to use.
+ installed it can be used to choose which one to use.
* $version
Gitweb version, set automatically when creating gitweb.cgi from
gitweb.perl. You might want to modify it if you are running modified
gitweb.
+ * $projectroot
+ Absolute filesystem path which will be prepended to project path;
+ the path to repository is $projectroot/$project. Set to
+ $GITWEB_PROJECTROOT during installation. This variable have to be
+ set correctly for gitweb to find repositories.
+ * $projects_list
+ Source of projects list, either directory to scan, or text file
+ with list of repositories (in the "<URI-encoded repository path> SPC
+ <URI-encoded repository owner>" format). Set to $GITWEB_LIST
+ during installation. If empty, $projectroot is used to scan for
+ repositories.
* $my_url, $my_uri
URL and absolute URL of gitweb script; you might need to set those
variables if you are using 'pathinfo' feature: see also below.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 6256641ac..5e88637b5 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1606,7 +1606,7 @@ sub git_get_project_description {
my $path = shift;
$git_dir = "$projectroot/$path";
- open my $fd, "$projectroot/$path/description"
+ open my $fd, "$git_dir/description"
or return git_get_project_config('description');
my $descr = <$fd>;
close $fd;
@@ -1620,7 +1620,7 @@ sub git_get_project_url_list {
my $path = shift;
$git_dir = "$projectroot/$path";
- open my $fd, "$projectroot/$path/cloneurl"
+ open my $fd, "$git_dir/cloneurl"
or return wantarray ?
@{ config_to_multi(git_get_project_config('url')) } :
config_to_multi(git_get_project_config('url'));
@@ -5048,16 +5048,15 @@ sub git_commitdiff {
-expires => $expires,
-content_disposition => 'inline; filename="' . "$filename" . '"');
my %ad = parse_date($co{'author_epoch'}, $co{'author_tz'});
- print <<TEXT;
-From: $co{'author'}
-Date: $ad{'rfc2822'} ($ad{'tz_local'})
-Subject: $co{'title'}
-TEXT
+ print "From: " . to_utf8($co{'author'}) . "\n";
+ print "Date: $ad{'rfc2822'} ($ad{'tz_local'})\n";
+ print "Subject: " . to_utf8($co{'title'}) . "\n";
+
print "X-Git-Tag: $tagname\n" if $tagname;
print "X-Git-Url: " . $cgi->self_url() . "\n\n";
foreach my $line (@{$co{'comment'}}) {
- print "$line\n";
+ print to_utf8($line) . "\n";
}
print "---\n\n";
}
@@ -5566,7 +5565,7 @@ XML
or next;
# print element (entry, item)
- my $co_url = href(-full=>1, action=>"commit", hash=>$commit);
+ my $co_url = href(-full=>1, action=>"commitdiff", hash=>$commit);
if ($format eq 'rss') {
print "<item>\n" .
"<title>" . esc_html($co{'title'}) . "</title>\n" .
diff --git a/help.c b/help.c
index 1302a61c8..95e7640fe 100644
--- a/help.c
+++ b/help.c
@@ -40,6 +40,8 @@ static void parse_help_format(const char *format)
static int git_help_config(const char *var, const char *value)
{
if (!strcmp(var, "help.format")) {
+ if (!value)
+ return config_error_nonbool(var);
help_default_format = xstrdup(value);
return 0;
}
diff --git a/http-push.c b/http-push.c
index 64be90492..b2b410df9 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1563,9 +1563,17 @@ static int locking_available(void)
lock_flags = 0;
}
XML_ParserFree(parser);
+ if (!lock_flags)
+ error("Error: no DAV locking support on %s",
+ remote->url);
+
+ } else {
+ error("Cannot access URL %s, return code %d",
+ remote->url, results.curl_result);
+ lock_flags = 0;
}
} else {
- fprintf(stderr, "Unable to start PROPFIND request\n");
+ error("Unable to start PROPFIND request on %s", remote->url);
}
strbuf_release(&out_buffer.buf);
@@ -1979,7 +1987,6 @@ static int remote_exists(const char *path)
if (start_active_slot(slot)) {
run_active_slot(slot);
- free(url);
if (results.http_code == 404)
ret = 0;
else if (results.curl_result == CURLE_OK)
@@ -1987,7 +1994,6 @@ static int remote_exists(const char *path)
else
fprintf(stderr, "HEAD HTTP error %ld\n", results.http_code);
} else {
- free(url);
fprintf(stderr, "Unable to start HEAD request\n");
}
@@ -2163,6 +2169,7 @@ int main(int argc, char **argv)
int i;
int new_refs;
struct ref *ref;
+ char *rewritten_url = NULL;
setup_git_directory();
@@ -2214,6 +2221,10 @@ int main(int argc, char **argv)
break;
}
+#ifndef USE_CURL_MULTI
+ die("git-push is not available for http/https repository when not compiled with USE_CURL_MULTI");
+#endif
+
if (!remote->url)
usage(http_push_usage);
@@ -2226,9 +2237,16 @@ int main(int argc, char **argv)
no_pragma_header = curl_slist_append(no_pragma_header, "Pragma:");
+ if (remote->url && remote->url[strlen(remote->url)-1] != '/') {
+ rewritten_url = malloc(strlen(remote->url)+2);
+ strcpy(rewritten_url, remote->url);
+ strcat(rewritten_url, "/");
+ remote->url = rewritten_url;
+ ++remote->path_len;
+ }
+
/* Verify DAV compliance/lock support */
if (!locking_available()) {
- fprintf(stderr, "Error: no DAV locking support on remote repo %s\n", remote->url);
rc = 1;
goto cleanup;
}
@@ -2241,6 +2259,11 @@ int main(int argc, char **argv)
info_ref_lock = lock_remote("info/refs", LOCK_TIME);
if (info_ref_lock)
remote->can_update_info_refs = 1;
+ else {
+ fprintf(stderr, "Error: cannot lock existing info/refs\n");
+ rc = 1;
+ goto cleanup;
+ }
}
if (remote->has_info_packs)
fetch_indices();
@@ -2262,11 +2285,14 @@ int main(int argc, char **argv)
if (!remote_tail)
remote_tail = &remote_refs;
if (match_refs(local_refs, remote_refs, &remote_tail,
- nr_refspec, (const char **) refspec, push_all))
- return -1;
+ nr_refspec, (const char **) refspec, push_all)) {
+ rc = -1;
+ goto cleanup;
+ }
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n");
- return 0;
+ rc = 0;
+ goto cleanup;
}
new_refs = 0;
@@ -2397,10 +2423,12 @@ int main(int argc, char **argv)
fprintf(stderr, "Unable to update server info\n");
}
}
- if (info_ref_lock)
- unlock_remote(info_ref_lock);
cleanup:
+ if (rewritten_url)
+ free(rewritten_url);
+ if (info_ref_lock)
+ unlock_remote(info_ref_lock);
free(remote);
curl_slist_free_all(no_pragma_header);
diff --git a/http.c b/http.c
index d2c11aee9..5925d0747 100644
--- a/http.c
+++ b/http.c
@@ -101,16 +101,18 @@ static int http_options(const char *var, const char *value)
if (!strcmp("http.sslcert", var)) {
if (ssl_cert == NULL) {
- ssl_cert = xmalloc(strlen(value)+1);
- strcpy(ssl_cert, value);
+ if (!value)
+ return config_error_nonbool(var);
+ ssl_cert = xstrdup(value);
}
return 0;
}
#if LIBCURL_VERSION_NUM >= 0x070902
if (!strcmp("http.sslkey", var)) {
if (ssl_key == NULL) {
- ssl_key = xmalloc(strlen(value)+1);
- strcpy(ssl_key, value);
+ if (!value)
+ return config_error_nonbool(var);
+ ssl_key = xstrdup(value);
}
return 0;
}
@@ -118,16 +120,18 @@ static int http_options(const char *var, const char *value)
#if LIBCURL_VERSION_NUM >= 0x070908
if (!strcmp("http.sslcapath", var)) {
if (ssl_capath == NULL) {
- ssl_capath = xmalloc(strlen(value)+1);
- strcpy(ssl_capath, value);
+ if (!value)
+ return config_error_nonbool(var);
+ ssl_capath = xstrdup(value);
}
return 0;
}
#endif
if (!strcmp("http.sslcainfo", var)) {
if (ssl_cainfo == NULL) {
- ssl_cainfo = xmalloc(strlen(value)+1);
- strcpy(ssl_cainfo, value);
+ if (!value)
+ return config_error_nonbool(var);
+ ssl_cainfo = xstrdup(value);
}
return 0;
}
@@ -157,8 +161,9 @@ static int http_options(const char *var, const char *value)
}
if (!strcmp("http.proxy", var)) {
if (curl_http_proxy == NULL) {
- curl_http_proxy = xmalloc(strlen(value)+1);
- strcpy(curl_http_proxy, value);
+ if (!value)
+ return config_error_nonbool(var);
+ curl_http_proxy = xstrdup(value);
}
return 0;
}
diff --git a/http.h b/http.h
index aeba9301f..9bab2c882 100644
--- a/http.h
+++ b/http.h
@@ -8,6 +8,14 @@
#include "strbuf.h"
+/*
+ * We detect based on the cURL version if multi-transfer is
+ * usable in this implementation and define this symbol accordingly.
+ * This is not something Makefile should set nor users should pass
+ * via CFLAGS.
+ */
+#undef USE_CURL_MULTI
+
#if LIBCURL_VERSION_NUM >= 0x071000
#define USE_CURL_MULTI
#define DEFAULT_MAX_REQUESTS 5
diff --git a/ident.c b/ident.c
index 892d77ac9..b839dcf5f 100644
--- a/ident.c
+++ b/ident.c
@@ -152,7 +152,7 @@ static int copy(char *buf, size_t size, int offset, const char *src)
/*
* Copy the rest to the buffer, but avoid the special
* characters '\n' '<' and '>' that act as delimiters on
- * a identification line
+ * an identification line
*/
for (i = 0; i < len; i++) {
c = *src++;
diff --git a/imap-send.c b/imap-send.c
index a429a76a6..9025d9aa3 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1254,6 +1254,10 @@ git_imap_config(const char *key, const char *val)
if (strncmp( key, imap_key, sizeof imap_key - 1 ))
return 0;
+
+ if (!val)
+ return config_error_nonbool(key);
+
key += sizeof imap_key - 1;
if (!strcmp( "folder", key )) {
diff --git a/lockfile.c b/lockfile.c
index f45d3ed54..663f18f9c 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -13,7 +13,8 @@ static void remove_lock_file(void)
while (lock_file_list) {
if (lock_file_list->owner == me &&
lock_file_list->filename[0]) {
- close(lock_file_list->fd);
+ if (lock_file_list->fd >= 0)
+ close(lock_file_list->fd);
unlink(lock_file_list->filename);
}
lock_file_list = lock_file_list->next;
@@ -159,17 +160,26 @@ int hold_lock_file_for_update(struct lock_file *lk, const char *path, int die_on
return fd;
}
+int close_lock_file(struct lock_file *lk)
+{
+ int fd = lk->fd;
+ lk->fd = -1;
+ return close(fd);
+}
+
int commit_lock_file(struct lock_file *lk)
{
char result_file[PATH_MAX];
- int i;
- close(lk->fd);
+ size_t i;
+ if (lk->fd >= 0 && close_lock_file(lk))
+ return -1;
strcpy(result_file, lk->filename);
i = strlen(result_file) - 5; /* .lock */
result_file[i] = 0;
- i = rename(lk->filename, result_file);
+ if (rename(lk->filename, result_file))
+ return -1;
lk->filename[0] = 0;
- return i;
+ return 0;
}
int hold_locked_index(struct lock_file *lk, int die_on_error)
@@ -185,9 +195,12 @@ void set_alternate_index_output(const char *name)
int commit_locked_index(struct lock_file *lk)
{
if (alternate_index_output) {
- int result = rename(lk->filename, alternate_index_output);
+ if (lk->fd >= 0 && close_lock_file(lk))
+ return -1;
+ if (rename(lk->filename, alternate_index_output))
+ return -1;
lk->filename[0] = 0;
- return result;
+ return 0;
}
else
return commit_lock_file(lk);
@@ -196,7 +209,8 @@ int commit_locked_index(struct lock_file *lk)
void rollback_lock_file(struct lock_file *lk)
{
if (lk->filename[0]) {
- close(lk->fd);
+ if (lk->fd >= 0)
+ close(lk->fd);
unlink(lk->filename);
}
lk->filename[0] = 0;
diff --git a/merge-recursive.c b/merge-recursive.c
index 33ccc40ec..34e3167ca 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -289,7 +289,7 @@ static int get_files_dirs(struct tree *tree)
}
/*
- * Returns a index_entry instance which doesn't have to correspond to
+ * Returns an index_entry instance which doesn't have to correspond to
* a real cache entry in Git's index.
*/
static struct stage_data *insert_stage_data(const char *path,
@@ -844,8 +844,9 @@ static int read_merge_config(const char *var, const char *value)
int namelen;
if (!strcmp(var, "merge.default")) {
- if (value)
- default_ll_merge = strdup(value);
+ if (!value)
+ return config_error_nonbool(var);
+ default_ll_merge = strdup(value);
return 0;
}
@@ -878,14 +879,14 @@ static int read_merge_config(const char *var, const char *value)
if (!strcmp("name", ep)) {
if (!value)
- return error("%s: lacks value", var);
+ return config_error_nonbool(var);
fn->description = strdup(value);
return 0;
}
if (!strcmp("driver", ep)) {
if (!value)
- return error("%s: lacks value", var);
+ return config_error_nonbool(var);
/*
* merge.<name>.driver specifies the command line:
*
@@ -908,7 +909,7 @@ static int read_merge_config(const char *var, const char *value)
if (!strcmp("recursive", ep)) {
if (!value)
- return error("%s: lacks value", var);
+ return config_error_nonbool(var);
fn->recursive = strdup(value);
return 0;
}
@@ -1753,7 +1754,7 @@ int main(int argc, char *argv[])
if (active_cache_changed &&
(write_cache(index_fd, active_cache, active_nr) ||
- close(index_fd) || commit_locked_index(lock)))
+ commit_locked_index(lock)))
die ("unable to write %s", get_index_file());
return clean ? 0: 1;
diff --git a/object.c b/object.c
index 5a5ebe27b..50b652800 100644
--- a/object.c
+++ b/object.c
@@ -140,7 +140,8 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
if (type == OBJ_BLOB) {
struct blob *blob = lookup_blob(sha1);
if (blob) {
- parse_blob_buffer(blob, buffer, size);
+ if (parse_blob_buffer(blob, buffer, size))
+ return NULL;
obj = &blob->object;
}
} else if (type == OBJ_TREE) {
@@ -148,14 +149,16 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
if (tree) {
obj = &tree->object;
if (!tree->object.parsed) {
- parse_tree_buffer(tree, buffer, size);
+ if (parse_tree_buffer(tree, buffer, size))
+ return NULL;
eaten = 1;
}
}
} else if (type == OBJ_COMMIT) {
struct commit *commit = lookup_commit(sha1);
if (commit) {
- parse_commit_buffer(commit, buffer, size);
+ if (parse_commit_buffer(commit, buffer, size))
+ return NULL;
if (!commit->buffer) {
commit->buffer = buffer;
eaten = 1;
@@ -165,7 +168,8 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
} else if (type == OBJ_TAG) {
struct tag *tag = lookup_tag(sha1);
if (tag) {
- parse_tag_buffer(tag, buffer, size);
+ if (parse_tag_buffer(tag, buffer, size))
+ return NULL;
obj = &tag->object;
}
} else {
diff --git a/parse-options.c b/parse-options.c
index 7a08a0c64..d9562ba50 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -216,6 +216,26 @@ is_abbreviated:
return error("unknown option `%s'", arg);
}
+void check_typos(const char *arg, const struct option *options)
+{
+ if (strlen(arg) < 3)
+ return;
+
+ if (!prefixcmp(arg, "no-")) {
+ error ("did you mean `--%s` (with two dashes ?)", arg);
+ exit(129);
+ }
+
+ for (; options->type != OPTION_END; options++) {
+ if (!options->long_name)
+ continue;
+ if (!prefixcmp(options->long_name, arg)) {
+ error ("did you mean `--%s` (with two dashes ?)", arg);
+ exit(129);
+ }
+ }
+}
+
static NORETURN void usage_with_options_internal(const char * const *,
const struct option *, int);
@@ -235,12 +255,18 @@ int parse_options(int argc, const char **argv, const struct option *options,
if (arg[1] != '-') {
args.opt = arg + 1;
- do {
+ if (*args.opt == 'h')
+ usage_with_options(usagestr, options);
+ if (parse_short_opt(&args, options) < 0)
+ usage_with_options(usagestr, options);
+ if (args.opt)
+ check_typos(arg + 1, options);
+ while (args.opt) {
if (*args.opt == 'h')
usage_with_options(usagestr, options);
if (parse_short_opt(&args, options) < 0)
usage_with_options(usagestr, options);
- } while (args.opt);
+ }
continue;
}
diff --git a/pretty.c b/pretty.c
index 9db75b4e4..b987ff245 100644
--- a/pretty.c
+++ b/pretty.c
@@ -292,7 +292,18 @@ static void format_person_part(struct strbuf *sb, char part,
/* parse name */
for (end = 0; end < len && msg[end] != '<'; end++)
; /* do nothing */
+ /*
+ * If it does not even have a '<' and '>', that is
+ * quite a bogus commit author and we discard it;
+ * this is in line with add_user_info() that is used
+ * in the normal codepath. When end points at the '<'
+ * that we found, it should have matching '>' later,
+ * which means start (beginning of email address) must
+ * be strictly below len.
+ */
start = end + 1;
+ if (start >= len - 1)
+ return;
while (end > 0 && isspace(msg[end - 1]))
end--;
if (part == 'n') { /* name */
@@ -300,11 +311,8 @@ static void format_person_part(struct strbuf *sb, char part,
return;
}
- if (start >= len)
- return;
-
/* parse email */
- for (end = start + 1; end < len && msg[end] != '>'; end++)
+ for (end = start; end < len && msg[end] != '>'; end++)
; /* do nothing */
if (end >= len)
@@ -412,7 +420,7 @@ static void parse_commit_header(struct format_commit_context *context)
if (i == eol) {
state++;
/* strip empty lines */
- while (msg[eol + 1] == '\n')
+ while (msg[eol] == '\n' && msg[eol + 1] == '\n')
eol++;
} else if (!prefixcmp(msg + i, "author ")) {
context->author.off = i + 7;
@@ -425,6 +433,8 @@ static void parse_commit_header(struct format_commit_context *context)
context->encoding.len = eol - i - 9;
}
i = eol;
+ if (!msg[i])
+ break;
}
context->body_off = i;
context->commit_header_parsed = 1;
diff --git a/quote.c b/quote.c
index 6986b4420..d061626c3 100644
--- a/quote.c
+++ b/quote.c
@@ -213,6 +213,22 @@ size_t quote_c_style(const char *name, struct strbuf *sb, FILE *fp, int nodq)
return quote_c_style_counted(name, -1, sb, fp, nodq);
}
+void quote_two_c_style(struct strbuf *sb, const char *prefix, const char *path, int nodq)
+{
+ if (quote_c_style(prefix, NULL, NULL, 0) ||
+ quote_c_style(path, NULL, NULL, 0)) {
+ if (!nodq)
+ strbuf_addch(sb, '"');
+ quote_c_style(prefix, sb, NULL, 1);
+ quote_c_style(path, sb, NULL, 1);
+ if (!nodq)
+ strbuf_addch(sb, '"');
+ } else {
+ strbuf_addstr(sb, prefix);
+ strbuf_addstr(sb, path);
+ }
+}
+
void write_name_quoted(const char *name, FILE *fp, int terminator)
{
if (terminator) {
diff --git a/quote.h b/quote.h
index ab7596f57..4da110ec0 100644
--- a/quote.h
+++ b/quote.h
@@ -41,6 +41,7 @@ extern char *sq_dequote(char *);
extern int unquote_c_style(struct strbuf *, const char *quoted, const char **endp);
extern size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq);
+extern void quote_two_c_style(struct strbuf *, const char *, const char *, int);
extern void write_name_quoted(const char *name, FILE *, int terminator);
extern void write_name_quotedpfx(const char *pfx, size_t pfxlen,
diff --git a/receive-pack.c b/receive-pack.c
index fba4cf823..326749583 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -165,7 +165,8 @@ static const char *update(struct command *cmd)
unsigned char *new_sha1 = cmd->new_sha1;
struct ref_lock *lock;
- if (!prefixcmp(name, "refs/") && check_ref_format(name + 5)) {
+ /* only refs/... are allowed */
+ if (prefixcmp(name, "refs/") || check_ref_format(name + 5)) {
error("refusing to create funny ref '%s' remotely", name);
return "funny refname";
}
@@ -178,11 +179,21 @@ static const char *update(struct command *cmd)
if (deny_non_fast_forwards && !is_null_sha1(new_sha1) &&
!is_null_sha1(old_sha1) &&
!prefixcmp(name, "refs/heads/")) {
+ struct object *old_object, *new_object;
struct commit *old_commit, *new_commit;
struct commit_list *bases, *ent;
- old_commit = (struct commit *)parse_object(old_sha1);
- new_commit = (struct commit *)parse_object(new_sha1);
+ old_object = parse_object(old_sha1);
+ new_object = parse_object(new_sha1);
+
+ if (!old_object || !new_object ||
+ old_object->type != OBJ_COMMIT ||
+ new_object->type != OBJ_COMMIT) {
+ error("bad sha1 objects for %s", name);
+ return "bad ref";
+ }
+ old_commit = (struct commit *)old_object;
+ new_commit = (struct commit *)new_object;
bases = get_merge_bases(old_commit, new_commit, 1);
for (ent = bases; ent; ent = ent->next)
if (!hashcmp(old_sha1, ent->item->object.sha1))
diff --git a/refs.c b/refs.c
index 759924d0c..67d2a502a 100644
--- a/refs.c
+++ b/refs.c
@@ -613,32 +613,37 @@ int check_ref_format(const char *ref)
while ((ch = *cp++) == '/')
; /* tolerate duplicated slashes */
if (!ch)
- return -1; /* should not end with slashes */
+ /* should not end with slashes */
+ return CHECK_REF_FORMAT_ERROR;
/* we are at the beginning of the path component */
if (ch == '.')
- return -1;
+ return CHECK_REF_FORMAT_ERROR;
bad_type = bad_ref_char(ch);
if (bad_type) {
- return (bad_type == 2 && !*cp) ? -3 : -1;
+ return (bad_type == 2 && !*cp)
+ ? CHECK_REF_FORMAT_WILDCARD
+ : CHECK_REF_FORMAT_ERROR;
}
/* scan the rest of the path component */
while ((ch = *cp++) != 0) {
bad_type = bad_ref_char(ch);
if (bad_type) {
- return (bad_type == 2 && !*cp) ? -3 : -1;
+ return (bad_type == 2 && !*cp)
+ ? CHECK_REF_FORMAT_WILDCARD
+ : CHECK_REF_FORMAT_ERROR;
}
if (ch == '/')
break;
if (ch == '.' && *cp == '.')
- return -1;
+ return CHECK_REF_FORMAT_ERROR;
}
level++;
if (!ch) {
if (level < 2)
- return -2; /* at least of form "heads/blah" */
- return 0;
+ return CHECK_REF_FORMAT_ONELEVEL;
+ return CHECK_REF_FORMAT_OK;
}
}
}
@@ -816,9 +821,13 @@ struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1)
struct ref_lock *lock_any_ref_for_update(const char *ref, const unsigned char *old_sha1, int flags)
{
- if (check_ref_format(ref) == -1)
+ switch (check_ref_format(ref)) {
+ default:
return NULL;
- return lock_ref_sha1_basic(ref, old_sha1, flags, NULL);
+ case 0:
+ case CHECK_REF_FORMAT_ONELEVEL:
+ return lock_ref_sha1_basic(ref, old_sha1, flags, NULL);
+ }
}
static struct lock_file packlock;
@@ -855,7 +864,6 @@ static int repack_without_ref(const char *refname)
die("too long a refname '%s'", list->name);
write_or_die(fd, line, len);
}
- close(fd);
return commit_lock_file(&packlock);
}
@@ -1010,14 +1018,27 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
return 1;
}
+static int close_ref(struct ref_lock *lock)
+{
+ if (close_lock_file(lock->lk))
+ return -1;
+ lock->lock_fd = -1;
+ return 0;
+}
+
+static int commit_ref(struct ref_lock *lock)
+{
+ if (commit_lock_file(lock->lk))
+ return -1;
+ lock->lock_fd = -1;
+ return 0;
+}
+
void unlock_ref(struct ref_lock *lock)
{
- if (lock->lock_fd >= 0) {
- close(lock->lock_fd);
- /* Do not free lock->lk -- atexit() still looks at them */
- if (lock->lk)
- rollback_lock_file(lock->lk);
- }
+ /* Do not free lock->lk -- atexit() still looks at them */
+ if (lock->lk)
+ rollback_lock_file(lock->lk);
free(lock->ref_name);
free(lock->orig_ref_name);
free(lock);
@@ -1110,10 +1131,16 @@ static int log_ref_write(const char *ref_name, const unsigned char *old_sha1,
return 0;
}
+static int is_branch(const char *refname)
+{
+ return !strcmp(refname, "HEAD") || !prefixcmp(refname, "refs/heads/");
+}
+
int write_ref_sha1(struct ref_lock *lock,
const unsigned char *sha1, const char *logmsg)
{
static char term = '\n';
+ struct object *o;
if (!lock)
return -1;
@@ -1121,9 +1148,22 @@ int write_ref_sha1(struct ref_lock *lock,
unlock_ref(lock);
return 0;
}
+ o = parse_object(sha1);
+ if (!o) {
+ error("Trying to write ref %s with nonexistant object %s",
+ lock->ref_name, sha1_to_hex(sha1));
+ unlock_ref(lock);
+ return -1;
+ }
+ if (o->type != OBJ_COMMIT && is_branch(lock->ref_name)) {
+ error("Trying to write non-commit object %s to branch %s",
+ sha1_to_hex(sha1), lock->ref_name);
+ unlock_ref(lock);
+ return -1;
+ }
if (write_in_full(lock->lock_fd, sha1_to_hex(sha1), 40) != 40 ||
write_in_full(lock->lock_fd, &term, 1) != 1
- || close(lock->lock_fd) < 0) {
+ || close_ref(lock) < 0) {
error("Couldn't write %s", lock->lk->filename);
unlock_ref(lock);
return -1;
@@ -1156,12 +1196,11 @@ int write_ref_sha1(struct ref_lock *lock,
!strcmp(head_ref, lock->ref_name))
log_ref_write("HEAD", lock->old_sha1, sha1, logmsg);
}
- if (commit_lock_file(lock->lk)) {
+ if (commit_ref(lock)) {
error("Couldn't set %s", lock->ref_name);
unlock_ref(lock);
return -1;
}
- lock->lock_fd = -1;
unlock_ref(lock);
return 0;
}
diff --git a/refs.h b/refs.h
index 9dc8aa01d..9cd16f829 100644
--- a/refs.h
+++ b/refs.h
@@ -52,7 +52,10 @@ int for_each_reflog_ent(const char *ref, each_reflog_ent_fn fn, void *cb_data);
*/
extern int for_each_reflog(each_ref_fn, void *);
-/** Returns 0 if target has the right format for a ref. **/
+#define CHECK_REF_FORMAT_OK 0
+#define CHECK_REF_FORMAT_ERROR (-1)
+#define CHECK_REF_FORMAT_ONELEVEL (-2)
+#define CHECK_REF_FORMAT_WILDCARD (-3)
extern int check_ref_format(const char *target);
/** rename ref, return 0 on success **/
diff --git a/remote.c b/remote.c
index 0e006804e..20abbc07a 100644
--- a/remote.c
+++ b/remote.c
@@ -222,15 +222,18 @@ static int handle_config(const char *key, const char *value)
subkey = strrchr(name, '.');
if (!subkey)
return 0;
- if (!value)
- return 0;
branch = make_branch(name, subkey - name);
if (!strcmp(subkey, ".remote")) {
+ if (!value)
+ return config_error_nonbool(key);
branch->remote_name = xstrdup(value);
if (branch == current_branch)
default_remote_name = branch->remote_name;
- } else if (!strcmp(subkey, ".merge"))
+ } else if (!strcmp(subkey, ".merge")) {
+ if (!value)
+ return config_error_nonbool(key);
add_merge(branch, xstrdup(value));
+ }
return 0;
}
if (prefixcmp(key, "remote."))
diff --git a/revision.c b/revision.c
index 7e2f4f1eb..6e85aaa3f 100644
--- a/revision.c
+++ b/revision.c
@@ -1290,8 +1290,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (revs->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT)
revs->diff = 1;
- /* Pickaxe and rename following needs diffs */
- if (revs->diffopt.pickaxe || DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
+ /* Pickaxe, diff-filter and rename following need diffs */
+ if (revs->diffopt.pickaxe ||
+ revs->diffopt.filter ||
+ DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
revs->diff = 1;
if (revs->topo_order)
diff --git a/server-info.c b/server-info.c
index a051e49a9..c1c073b2f 100644
--- a/server-info.c
+++ b/server-info.c
@@ -101,7 +101,7 @@ static int read_pack_info_file(const char *infofile)
while (fgets(line, sizeof(line), fp)) {
int len = strlen(line);
- if (line[len-1] == '\n')
+ if (len && line[len-1] == '\n')
line[--len] = 0;
if (!len)
diff --git a/setup.c b/setup.c
index b59dbe7f5..4509598d5 100644
--- a/setup.c
+++ b/setup.c
@@ -140,7 +140,7 @@ const char **get_pathspec(const char *prefix, const char **pathspec)
* Test if it looks like we're at a git directory.
* We want to see:
*
- * - either a objects/ directory _or_ the proper
+ * - either an objects/ directory _or_ the proper
* GIT_OBJECT_DIRECTORY environment variable
* - a refs/ directory
* - either a HEAD symlink or a HEAD file that is formatted as
@@ -372,6 +372,8 @@ int check_repository_format_version(const char *var, const char *value)
if (is_bare_repository_cfg == 1)
inside_work_tree = -1;
} else if (strcmp(var, "core.worktree") == 0) {
+ if (!value)
+ return config_error_nonbool(var);
if (git_work_tree_cfg)
free(git_work_tree_cfg);
git_work_tree_cfg = xstrdup(value);
diff --git a/sha1_file.c b/sha1_file.c
index b0c24356a..66a4e00fa 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -148,7 +148,7 @@ static void fill_sha1_path(char *pathbuf, const unsigned char *sha1)
/*
* NOTE! This returns a statically allocated buffer, so you have to be
- * careful about using it. Do a "xstrdup()" if you need to save the
+ * careful about using it. Do an "xstrdup()" if you need to save the
* filename.
*
* Also note that this returns the location for creating. Reading
@@ -611,6 +611,22 @@ void release_pack_memory(size_t need, int fd)
; /* nothing */
}
+void close_pack_windows(struct packed_git *p)
+{
+ while (p->windows) {
+ struct pack_window *w = p->windows;
+
+ if (w->inuse_cnt)
+ die("pack '%s' still has open windows to it",
+ p->pack_name);
+ munmap(w->base, w->len);
+ pack_mapped -= w->len;
+ pack_open_windows--;
+ p->windows = w->next;
+ free(w);
+ }
+}
+
void unuse_pack(struct pack_window **w_cursor)
{
struct pack_window *w = *w_cursor;
diff --git a/sideband.c b/sideband.c
index 756bbc28d..b6777812c 100644
--- a/sideband.c
+++ b/sideband.c
@@ -13,14 +13,27 @@
*/
#define PREFIX "remote:"
-#define SUFFIX "\033[K" /* change to " " if ANSI sequences don't work */
+
+#define ANSI_SUFFIX "\033[K"
+#define DUMB_SUFFIX " "
+
+#define FIX_SIZE 10 /* large enough for any of the above */
int recv_sideband(const char *me, int in_stream, int out, int err)
{
unsigned pf = strlen(PREFIX);
- unsigned sf = strlen(SUFFIX);
- char buf[pf + LARGE_PACKET_MAX + sf + 1];
+ unsigned sf;
+ char buf[LARGE_PACKET_MAX + 2*FIX_SIZE];
+ char *suffix, *term;
+
memcpy(buf, PREFIX, pf);
+ term = getenv("TERM");
+ if (term && strcmp(term, "dumb"))
+ suffix = ANSI_SUFFIX;
+ else
+ suffix = DUMB_SUFFIX;
+ sf = strlen(suffix);
+
while (1) {
int band, len;
len = packet_read_line(in_stream, buf + pf, LARGE_PACKET_MAX);
@@ -59,10 +72,10 @@ int recv_sideband(const char *me, int in_stream, int out, int err)
* line data actually contains something.
*/
if (brk > pf+1 + 1) {
- char save[sf];
+ char save[FIX_SIZE];
memcpy(save, buf + brk, sf);
buf[brk + sf - 1] = buf[brk - 1];
- memcpy(buf + brk - 1, SUFFIX, sf);
+ memcpy(buf + brk - 1, suffix, sf);
safe_write(err, buf, brk + sf);
memcpy(buf + brk, save, sf);
} else
diff --git a/strbuf.c b/strbuf.c
index b9b194b32..5efcfc886 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,5 +1,14 @@
#include "cache.h"
+int prefixcmp(const char *str, const char *prefix)
+{
+ for (; ; str++, prefix++)
+ if (!*prefix)
+ return 0;
+ else if (*str != *prefix)
+ return (unsigned char)*prefix - (unsigned char)*str;
+}
+
/*
* Used as the default ->buf value, so that people can always assume
* buf is non NULL and ->buf is NUL terminated even for a freshly
diff --git a/t/.gitattributes b/t/.gitattributes
new file mode 100644
index 000000000..562b12e16
--- /dev/null
+++ b/t/.gitattributes
@@ -0,0 +1 @@
+* -whitespace
diff --git a/t/README b/t/README
index 36f251761..73ed11bfe 100644
--- a/t/README
+++ b/t/README
@@ -160,14 +160,12 @@ library for your script to use.
- test_expect_failure <message> <script>
- This is the opposite of test_expect_success. If <script>
- yields success, test is considered a failure.
-
- Example:
-
- test_expect_failure \
- 'git-update-index without --add should fail adding.' \
- 'git-update-index should-be-empty'
+ This is NOT the opposite of test_expect_success, but is used
+ to mark a test that demonstrates a known breakage. Unlike
+ the usual test_expect_success tests, which say "ok" on
+ success and "FAIL" on failure, this will say "FIXED" on
+ success and "still broken" on failure. Failures from these
+ tests won't cause -i (immediate) to stop.
- test_debug <script>
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 4e49d5906..cd0de506d 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -47,12 +47,24 @@ test_expect_success \
'test $(wc -l < full-of-directories) = 3'
################################################################
+# Test harness
+test_expect_success 'success is reported like this' '
+ :
+'
+test_expect_failure 'pretend we have a known breakage' '
+ false
+'
+test_expect_failure 'pretend we have fixed a known breakage' '
+ :
+'
+
+################################################################
# Basics of the basics
# updating a new file without --add should fail.
-test_expect_failure \
- 'git update-index without --add should fail adding.' \
- 'git update-index should-be-empty'
+test_expect_success 'git update-index without --add should fail adding.' '
+ ! git update-index should-be-empty
+'
# and with --add it should succeed, even if it is empty (it used to fail).
test_expect_success \
@@ -70,9 +82,9 @@ test_expect_success \
# Removing paths.
rm -f should-be-empty full-of-directories
-test_expect_failure \
- 'git update-index without --remove should fail removing.' \
- 'git update-index should-be-empty'
+test_expect_success 'git update-index without --remove should fail removing.' '
+ ! git update-index should-be-empty
+'
test_expect_success \
'git update-index with --remove should be able to remove.' \
@@ -204,9 +216,9 @@ test_expect_success \
'put invalid objects into the index.' \
'git update-index --index-info < badobjects'
-test_expect_failure \
- 'writing this tree without --missing-ok.' \
- 'git write-tree'
+test_expect_success 'writing this tree without --missing-ok.' '
+ ! git write-tree
+'
test_expect_success \
'writing this tree with --missing-ok.' \
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
new file mode 100755
index 000000000..47f08a46c
--- /dev/null
+++ b/t/t0003-attributes.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+test_description=gitattributes
+
+. ./test-lib.sh
+
+attr_check () {
+
+ path="$1"
+ expect="$2"
+
+ git check-attr test -- "$path" >actual &&
+ echo "$path: test: $2" >expect &&
+ diff -u expect actual
+
+}
+
+
+test_expect_success 'setup' '
+
+ mkdir -p a/b/d a/c &&
+ (
+ echo "f test=f"
+ ) >.gitattributes &&
+ (
+ echo "g test=a/g" &&
+ echo "b/g test=a/b/g"
+ ) >a/.gitattributes &&
+ (
+ echo "h test=a/b/h" &&
+ echo "d/* test=a/b/d/*"
+ ) >a/b/.gitattributes
+
+'
+
+test_expect_success 'attribute test' '
+
+ attr_check f f &&
+ attr_check a/f f &&
+ attr_check a/c/f f &&
+ attr_check a/g a/g &&
+ attr_check a/b/g a/b/g &&
+ attr_check b/g unspecified &&
+ attr_check a/b/h a/b/h &&
+ attr_check a/b/d/g "a/b/d/*"
+
+'
+
+test_done
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 89baebdfa..8b27aa892 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -19,7 +19,7 @@ remove_cr () {
test_expect_success setup '
- git repo-config core.autocrlf false &&
+ git config core.autocrlf false &&
for w in Hello world how are you; do echo $w; done >one &&
mkdir dir &&
@@ -46,7 +46,7 @@ test_expect_success 'update with autocrlf=input' '
rm -f tmp one dir/two three &&
git read-tree --reset -u HEAD &&
- git repo-config core.autocrlf input &&
+ git config core.autocrlf input &&
for f in one dir/two
do
@@ -70,7 +70,7 @@ test_expect_success 'update with autocrlf=true' '
rm -f tmp one dir/two three &&
git read-tree --reset -u HEAD &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
for f in one dir/two
do
@@ -93,7 +93,7 @@ test_expect_success 'update with autocrlf=true' '
test_expect_success 'checkout with autocrlf=true' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
for f in one dir/two
@@ -117,7 +117,7 @@ test_expect_success 'checkout with autocrlf=true' '
test_expect_success 'checkout with autocrlf=input' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf input &&
+ git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
for f in one dir/two
@@ -143,7 +143,7 @@ test_expect_success 'checkout with autocrlf=input' '
test_expect_success 'apply patch (autocrlf=input)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf input &&
+ git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply patch.file &&
@@ -156,7 +156,7 @@ test_expect_success 'apply patch (autocrlf=input)' '
test_expect_success 'apply patch --cached (autocrlf=input)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf input &&
+ git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply --cached patch.file &&
@@ -169,7 +169,7 @@ test_expect_success 'apply patch --cached (autocrlf=input)' '
test_expect_success 'apply patch --index (autocrlf=input)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf input &&
+ git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply --index patch.file &&
@@ -183,7 +183,7 @@ test_expect_success 'apply patch --index (autocrlf=input)' '
test_expect_success 'apply patch (autocrlf=true)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply patch.file &&
@@ -196,7 +196,7 @@ test_expect_success 'apply patch (autocrlf=true)' '
test_expect_success 'apply patch --cached (autocrlf=true)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply --cached patch.file &&
@@ -209,7 +209,7 @@ test_expect_success 'apply patch --cached (autocrlf=true)' '
test_expect_success 'apply patch --index (autocrlf=true)' '
rm -f tmp one dir/two three &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply --index patch.file &&
@@ -224,7 +224,7 @@ test_expect_success '.gitattributes says two is binary' '
rm -f tmp one dir/two three &&
echo "two -crlf" >.gitattributes &&
- git repo-config core.autocrlf true &&
+ git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
if remove_cr dir/two >/dev/null
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
index cad95f35a..818c8621f 100755
--- a/t/t0030-stripspace.sh
+++ b/t/t0030-stripspace.sh
@@ -243,14 +243,14 @@ test_expect_success \
test `printf "$ttt$sss$sss$sss" | git stripspace | wc -l` -gt 0
'
-test_expect_failure \
+test_expect_success \
'text plus spaces without newline at end should not show spaces' '
- printf "$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
- printf "$ttt$sss$sss" | git stripspace | grep -q " " ||
- printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
- printf "$ttt$sss$sss$sss" | git stripspace | grep -q " "
+ ! (printf "$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$ttt$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
@@ -280,14 +280,14 @@ test_expect_success \
git diff expect actual
'
-test_expect_failure \
+test_expect_success \
'text plus spaces at end should not show spaces' '
- echo "$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
- echo "$ttt$sss$sss" | git stripspace | grep -q " " ||
- echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
- echo "$ttt$sss$sss$sss" | git stripspace | grep -q " "
+ ! (echo "$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") &&
+ ! (echo "$ttt$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
@@ -339,13 +339,13 @@ test_expect_success \
git diff expect actual
'
-test_expect_failure \
+test_expect_success \
'spaces without newline at end should not show spaces' '
- printf "" | git stripspace | grep -q " " ||
- printf "$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss$sss" | git stripspace | grep -q " " ||
- printf "$sss$sss$sss$sss" | git stripspace | grep -q " "
+ ! (printf "" | git stripspace | grep -q " ") &&
+ ! (printf "$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss$sss" | git stripspace | grep -q " ") &&
+ ! (printf "$sss$sss$sss$sss" | git stripspace | grep -q " ")
'
test_expect_success \
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 462fdf262..0e2933a98 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -19,6 +19,7 @@ string options
get a string
--string2 <str> get another string
--st <st> get another string (pervert ordering)
+ -o <str> get another string
EOF
@@ -86,9 +87,9 @@ test_expect_success 'unambiguously abbreviated option with "="' '
git diff expect output
'
-test_expect_failure 'ambiguously abbreviated option' '
+test_expect_success 'ambiguously abbreviated option' '
test-parse-options --strin 123;
- test $? != 129
+ test $? = 129
'
cat > expect << EOF
@@ -103,4 +104,14 @@ test_expect_success 'non ambiguous option (after two options it abbreviates)' '
git diff expect output
'
+cat > expect.err << EOF
+error: did you mean \`--boolean\` (with two dashes ?)
+EOF
+
+test_expect_success 'detect possible typos' '
+ ! test-parse-options -boolean > output 2> output.err &&
+ test ! -s output &&
+ git diff expect.err output.err
+'
+
test_done
diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index 37add1b50..6c065bfa2 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -210,12 +210,12 @@ DF (file) when tree B require DF to be a directory by having DF/DF
END_OF_CASE_TABLE
-test_expect_failure \
- '1 - must not have an entry not in A.' \
- "rm -f .git/index XX &&
+test_expect_success '1 - must not have an entry not in A.' "
+ rm -f .git/index XX &&
echo XX >XX &&
git update-index --add XX &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'2 - must match B in !O && !A && B case.' \
@@ -248,13 +248,14 @@ test_expect_success \
echo extra >>AN &&
git read-tree -m $tree_O $tree_A $tree_B"
-test_expect_failure \
- '3 (fail) - must match A in !O && A && !B case.' \
- "rm -f .git/index AN &&
+test_expect_success \
+ '3 (fail) - must match A in !O && A && !B case.' "
+ rm -f .git/index AN &&
cp .orig-A/AN AN &&
echo extra >>AN &&
git update-index --add AN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'4 - must match and be up-to-date in !O && A && B && A!=B case.' \
@@ -264,21 +265,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
- "rm -f .git/index AA &&
+test_expect_success \
+ '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' "
+ rm -f .git/index AA &&
cp .orig-A/AA AA &&
git update-index --add AA &&
echo extra >>AA &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
- "rm -f .git/index AA &&
+test_expect_success \
+ '4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' "
+ rm -f .git/index AA &&
cp .orig-A/AA AA &&
echo extra >>AA &&
git update-index --add AA &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'5 - must match in !O && A && B && A==B case.' \
@@ -297,34 +300,38 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '5 (fail) - must match A in !O && A && B && A==B case.' \
- "rm -f .git/index LL &&
+test_expect_success \
+ '5 (fail) - must match A in !O && A && B && A==B case.' "
+ rm -f .git/index LL &&
cp .orig-A/LL LL &&
echo extra >>LL &&
git update-index --add LL &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '6 - must not exist in O && !A && !B case' \
- "rm -f .git/index DD &&
+test_expect_success \
+ '6 - must not exist in O && !A && !B case' "
+ rm -f .git/index DD &&
echo DD >DD
git update-index --add DD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '7 - must not exist in O && !A && B && O!=B case' \
- "rm -f .git/index DM &&
+test_expect_success \
+ '7 - must not exist in O && !A && B && O!=B case' "
+ rm -f .git/index DM &&
cp .orig-B/DM DM &&
git update-index --add DM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '8 - must not exist in O && !A && B && O==B case' \
- "rm -f .git/index DN &&
+test_expect_success \
+ '8 - must not exist in O && !A && B && O==B case' "
+ rm -f .git/index DN &&
cp .orig-B/DN DN &&
git update-index --add DN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'9 - must match and be up-to-date in O && A && !B && O!=A case' \
@@ -334,21 +341,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
- "rm -f .git/index MD &&
+test_expect_success \
+ '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' "
+ rm -f .git/index MD &&
cp .orig-A/MD MD &&
git update-index --add MD &&
echo extra >>MD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
- "rm -f .git/index MD &&
+test_expect_success \
+ '9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' "
+ rm -f .git/index MD &&
cp .orig-A/MD MD &&
echo extra >>MD &&
git update-index --add MD &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'10 - must match and be up-to-date in O && A && !B && O==A case' \
@@ -358,21 +367,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
- "rm -f .git/index ND &&
+test_expect_success \
+ '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' "
+ rm -f .git/index ND &&
cp .orig-A/ND ND &&
git update-index --add ND &&
echo extra >>ND &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
- "rm -f .git/index ND &&
+test_expect_success \
+ '10 (fail) - must match and be up-to-date in O && A && !B && O==A case' "
+ rm -f .git/index ND &&
cp .orig-A/ND ND &&
echo extra >>ND &&
git update-index --add ND &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
@@ -382,21 +393,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
- "rm -f .git/index MM &&
+test_expect_success \
+ '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' "
+ rm -f .git/index MM &&
cp .orig-A/MM MM &&
git update-index --add MM &&
echo extra >>MM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
- "rm -f .git/index MM &&
+test_expect_success \
+ '11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' "
+ rm -f .git/index MM &&
cp .orig-A/MM MM &&
echo extra >>MM &&
git update-index --add MM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'12 - must match A in O && A && B && O!=A && A==B case' \
@@ -415,13 +428,14 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '12 (fail) - must match A in O && A && B && O!=A && A==B case' \
- "rm -f .git/index SS &&
+test_expect_success \
+ '12 (fail) - must match A in O && A && B && O!=A && A==B case' "
+ rm -f .git/index SS &&
cp .orig-A/SS SS &&
echo extra >>SS &&
git update-index --add SS &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'13 - must match A in O && A && B && O!=A && O==B case' \
@@ -457,21 +471,23 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
- "rm -f .git/index NM &&
+test_expect_success \
+ '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' "
+ rm -f .git/index NM &&
cp .orig-A/NM NM &&
git update-index --add NM &&
echo extra >>NM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
-test_expect_failure \
- '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
- "rm -f .git/index NM &&
+test_expect_success \
+ '14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' "
+ rm -f .git/index NM &&
cp .orig-A/NM NM &&
echo extra >>NM &&
git update-index --add NM &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
test_expect_success \
'15 - must match A in O && A && B && O==A && O==B case' \
@@ -490,13 +506,14 @@ test_expect_success \
git read-tree -m $tree_O $tree_A $tree_B &&
check_result"
-test_expect_failure \
- '15 (fail) - must match A in O && A && B && O==A && O==B case' \
- "rm -f .git/index NN &&
+test_expect_success \
+ '15 (fail) - must match A in O && A && B && O==A && O==B case' "
+ rm -f .git/index NN &&
cp .orig-A/NN NN &&
echo extra >>NN &&
git update-index --add NN &&
- git read-tree -m $tree_O $tree_A $tree_B"
+ ! git read-tree -m $tree_O $tree_A $tree_B
+"
# #16
test_expect_success \
diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh
index 991d3c5e9..dcb3108c2 100755
--- a/t/t1200-tutorial.sh
+++ b/t/t1200-tutorial.sh
@@ -101,8 +101,8 @@ echo "Play, play, play" >>hello
echo "Lots of fun" >>example
git commit -m 'Some fun.' -i hello example
-test_expect_failure 'git resolve now fails' '
- git merge -m "Merge work in mybranch" mybranch
+test_expect_success 'git resolve now fails' '
+ ! git merge -m "Merge work in mybranch" mybranch
'
cat > hello << EOF
@@ -156,6 +156,8 @@ test_expect_success 'git show-branch' 'cmp show-branch2.expect show-branch2.outp
test_expect_success 'git repack' 'git repack'
test_expect_success 'git prune-packed' 'git prune-packed'
-test_expect_failure '-> only packed objects' 'find -type f .git/objects/[0-9a-f][0-9a-f]'
+test_expect_success '-> only packed objects' '
+ ! find -type f .git/objects/[0-9a-f][0-9a-f]
+'
test_done
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index e894629e7..4928a5711 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -71,6 +71,25 @@ EOF
test_expect_success 'non-match result' 'cmp .git/config expect'
+cat > .git/config <<\EOF
+[alpha]
+bar = foo
+[beta]
+baz = multiple \
+lines
+EOF
+
+test_expect_success 'unset with cont. lines' \
+ 'git config --unset beta.baz'
+
+cat > expect <<\EOF
+[alpha]
+bar = foo
+[beta]
+EOF
+
+test_expect_success 'unset with cont. lines is correct' 'cmp .git/config expect'
+
cat > .git/config << EOF
[beta] ; silly comment # another comment
noIndent= sillyValue ; 'nother silly comment
@@ -181,8 +200,9 @@ test_expect_success 'non-match' \
test_expect_success 'non-match value' \
'test wow = $(git config --get nextsection.nonewline !for)'
-test_expect_failure 'ambiguous get' \
- 'git config --get nextsection.nonewline'
+test_expect_success 'ambiguous get' '
+ ! git config --get nextsection.nonewline
+'
test_expect_success 'get multivar' \
'git config --get-all nextsection.nonewline'
@@ -202,13 +222,17 @@ EOF
test_expect_success 'multivar replace' 'cmp .git/config expect'
-test_expect_failure 'ambiguous value' 'git config nextsection.nonewline'
+test_expect_success 'ambiguous value' '
+ ! git config nextsection.nonewline
+'
-test_expect_failure 'ambiguous unset' \
- 'git config --unset nextsection.nonewline'
+test_expect_success 'ambiguous unset' '
+ ! git config --unset nextsection.nonewline
+'
-test_expect_failure 'invalid unset' \
- 'git config --unset somesection.nonewline'
+test_expect_success 'invalid unset' '
+ ! git config --unset somesection.nonewline
+'
git config --unset nextsection.nonewline "wow3$"
@@ -224,7 +248,7 @@ EOF
test_expect_success 'multivar unset' 'cmp .git/config expect'
-test_expect_failure 'invalid key' 'git config inval.2key blabla'
+test_expect_success 'invalid key' '! git config inval.2key blabla'
test_expect_success 'correct key' 'git config 123456.a123 987'
@@ -278,17 +302,40 @@ test_expect_success '--add' \
cat > .git/config << EOF
[novalue]
variable
+[emptyvalue]
+ variable =
EOF
test_expect_success 'get variable with no value' \
'git config --get novalue.variable ^$'
+test_expect_success 'get variable with empty value' \
+ 'git config --get emptyvalue.variable ^$'
+
echo novalue.variable > expect
test_expect_success 'get-regexp variable with no value' \
'git config --get-regexp novalue > output &&
cmp output expect'
+echo 'emptyvalue.variable ' > expect
+
+test_expect_success 'get-regexp variable with empty value' \
+ 'git config --get-regexp emptyvalue > output &&
+ cmp output expect'
+
+echo true > expect
+
+test_expect_success 'get bool variable with no value' \
+ 'git config --bool novalue.variable > output &&
+ cmp output expect'
+
+echo false > expect
+
+test_expect_success 'get bool variable with empty value' \
+ 'git config --bool emptyvalue.variable > output &&
+ cmp output expect'
+
git config > output 2>&1
test_expect_success 'no arguments, but no crash' \
@@ -382,8 +429,9 @@ EOF
test_expect_success "rename succeeded" "git diff expect .git/config"
-test_expect_failure "rename non-existing section" \
- 'git config --rename-section branch."world domination" branch.drei'
+test_expect_success "rename non-existing section" '
+ ! git config --rename-section branch."world domination" branch.drei
+'
test_expect_success "rename succeeded" "git diff expect .git/config"
@@ -448,6 +496,23 @@ test_expect_success numbers '
test z1048576 = "z$m"
'
+cat > expect <<EOF
+fatal: bad config value for 'aninvalid.unit' in .git/config
+EOF
+
+test_expect_success 'invalid unit' '
+
+ git config aninvalid.unit "1auto" &&
+ s=$(git config aninvalid.unit) &&
+ test "z1auto" = "z$s" &&
+ if git config --int --get aninvalid.unit 2>actual
+ then
+ echo config should have failed
+ false
+ fi &&
+ cmp actual expect
+'
+
cat > expect << EOF
true
false
@@ -477,14 +542,14 @@ test_expect_success bool '
done &&
cmp expect result'
-test_expect_failure 'invalid bool (--get)' '
+test_expect_success 'invalid bool (--get)' '
git config bool.nobool foobar &&
- git config --bool --get bool.nobool'
+ ! git config --bool --get bool.nobool'
-test_expect_failure 'invalid bool (set)' '
+test_expect_success 'invalid bool (set)' '
- git config --bool bool.nobool foobar'
+ ! git config --bool bool.nobool foobar'
rm .git/config
@@ -545,8 +610,9 @@ EOF
test_expect_success 'quoting' 'cmp .git/config expect'
-test_expect_failure 'key with newline' 'git config key.with\\\
-newline 123'
+test_expect_success 'key with newline' '
+ ! git config "key.with
+newline" 123'
test_expect_success 'value with newline' 'git config key.sub value.with\\\
newline'
diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh
index 37fc1c8d3..9be0770e7 100755
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
@@ -40,7 +40,8 @@ test_expect_success 'gitdir required mode on normal repos' '
(git apply --check --index test.patch &&
cd test && git apply --check --index ../test.patch)'
-test_expect_failure 'gitdir required mode on unsupported repo' '
- (cd test2 && git apply --check --index ../test.patch)'
+test_expect_success 'gitdir required mode on unsupported repo' '
+ (cd test2 && ! git apply --check --index ../test.patch)
+'
test_done
diff --git a/t/t1303-wacky-config.sh b/t/t1303-wacky-config.sh
new file mode 100755
index 000000000..99985dcd7
--- /dev/null
+++ b/t/t1303-wacky-config.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+test_description='Test wacky input to git config'
+. ./test-lib.sh
+
+setup() {
+ (printf "[section]\n" &&
+ printf " key = foo") >.git/config
+}
+
+check() {
+ echo "$2" >expected
+ git config --get "$1" >actual
+ git diff actual expected
+}
+
+test_expect_success 'modify same key' '
+ setup &&
+ git config section.key bar &&
+ check section.key bar
+'
+
+test_expect_success 'add key in same section' '
+ setup &&
+ git config section.other bar &&
+ check section.key foo &&
+ check section.other bar
+'
+
+test_expect_success 'add key in different section' '
+ setup &&
+ git config section2.key bar &&
+ check section.key foo &&
+ check section2.key bar
+'
+
+test_done
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index a90824ba8..78cd41245 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -7,12 +7,19 @@ test_description='Test git update-ref and basic ref logging'
. ./test-lib.sh
Z=0000000000000000000000000000000000000000
-A=1111111111111111111111111111111111111111
-B=2222222222222222222222222222222222222222
-C=3333333333333333333333333333333333333333
-D=4444444444444444444444444444444444444444
-E=5555555555555555555555555555555555555555
-F=6666666666666666666666666666666666666666
+
+test_expect_success setup '
+
+ for name in A B C D E F
+ do
+ test_tick &&
+ T=$(git write-tree) &&
+ sha1=$(echo $name | git commit-tree $T) &&
+ eval $name=$sha1
+ done
+
+'
+
m=refs/heads/master
n_dir=refs/heads/gu
n=$n_dir/fixes
@@ -44,23 +51,23 @@ test_expect_success \
test $B"' = $(cat .git/'"$m"')'
rm -f .git/$m
-test_expect_failure \
- '(not) create HEAD with old sha1' \
- "git update-ref HEAD $A $B"
-test_expect_failure \
- "(not) prior created .git/$m" \
- "test -f .git/$m"
+test_expect_success '(not) create HEAD with old sha1' "
+ ! git update-ref HEAD $A $B
+"
+test_expect_success "(not) prior created .git/$m" "
+ ! test -f .git/$m
+"
rm -f .git/$m
test_expect_success \
"create HEAD" \
"git update-ref HEAD $A"
-test_expect_failure \
- '(not) change HEAD with wrong SHA1' \
- "git update-ref HEAD $B $Z"
-test_expect_failure \
- "(not) changed .git/$m" \
- "test $B"' = $(cat .git/'"$m"')'
+test_expect_success '(not) change HEAD with wrong SHA1' "
+ ! git update-ref HEAD $B $Z
+"
+test_expect_success "(not) changed .git/$m" "
+ ! test $B"' = $(cat .git/'"$m"')
+'
rm -f .git/$m
: a repository with working tree always has reflog these days...
diff --git a/t/t2000-checkout-cache-clash.sh b/t/t2000-checkout-cache-clash.sh
index ac84335b0..5141fab7c 100755
--- a/t/t2000-checkout-cache-clash.sh
+++ b/t/t2000-checkout-cache-clash.sh
@@ -36,9 +36,9 @@ mkdir path0
date >path0/file0
date >path1
-test_expect_failure \
+test_expect_success \
'git checkout-index without -f should fail on conflicting work tree.' \
- 'git checkout-index -a'
+ '! git checkout-index -a'
test_expect_success \
'git checkout-index with -f should succeed.' \
diff --git a/t/t2002-checkout-cache-u.sh b/t/t2002-checkout-cache-u.sh
index f7a005592..0f441bcef 100755
--- a/t/t2002-checkout-cache-u.sh
+++ b/t/t2002-checkout-cache-u.sh
@@ -16,12 +16,12 @@ echo frotz >path0 &&
git update-index --add path0 &&
t=$(git write-tree)'
-test_expect_failure \
+test_expect_success \
'without -u, git checkout-index smudges stat information.' '
rm -f path0 &&
git read-tree $t &&
git checkout-index -f -a &&
-git diff-files | diff - /dev/null'
+! git diff-files | diff - /dev/null'
test_expect_success \
'with -u, git checkout-index picks up stat information from new files.' '
diff --git a/t/t2008-checkout-subdir.sh b/t/t2008-checkout-subdir.sh
index f78945ed8..4a723dc0e 100755
--- a/t/t2008-checkout-subdir.sh
+++ b/t/t2008-checkout-subdir.sh
@@ -67,16 +67,16 @@ test_expect_success 'checkout with simple prefix' '
'
-test_expect_failure 'relative path outside tree should fail' \
- 'git checkout HEAD -- ../../Makefile'
+test_expect_success 'relative path outside tree should fail' \
+ '! git checkout HEAD -- ../../Makefile'
-test_expect_failure 'incorrect relative path to file should fail (1)' \
- 'git checkout HEAD -- ../file0'
+test_expect_success 'incorrect relative path to file should fail (1)' \
+ '! git checkout HEAD -- ../file0'
-test_expect_failure 'incorrect relative path should fail (2)' \
- '( cd dir1 && git checkout HEAD -- ./file0 )'
+test_expect_success 'incorrect relative path should fail (2)' \
+ '( cd dir1 && ! git checkout HEAD -- ./file0 )'
-test_expect_failure 'incorrect relative path should fail (3)' \
- '( cd dir1 && git checkout HEAD -- ../../file0 )'
+test_expect_success 'incorrect relative path should fail (3)' \
+ '( cd dir1 && ! git checkout HEAD -- ../../file0 )'
test_done
diff --git a/t/t2100-update-cache-badpath.sh b/t/t2100-update-cache-badpath.sh
index 04a1ed1a6..9beaecd18 100755
--- a/t/t2100-update-cache-badpath.sh
+++ b/t/t2100-update-cache-badpath.sh
@@ -44,8 +44,8 @@ date >path1/file1
for p in path0/file0 path1/file1 path2 path3
do
- test_expect_failure \
+ test_expect_success \
"git update-index to add conflicting path $p should fail." \
- "git update-index --add -- $p"
+ "! git update-index --add -- $p"
done
test_done
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
index c83f820ad..f4da86993 100755
--- a/t/t3020-ls-files-error-unmatch.sh
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -15,9 +15,9 @@ touch foo bar
git update-index --add foo bar
git-commit -m "add foo bar"
-test_expect_failure \
+test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \
- 'git ls-files --error-unmatch foo bar-does-not-match'
+ '! git ls-files --error-unmatch foo bar-does-not-match'
test_expect_success \
'git ls-files --error-unmatch should succeed eith matched paths.' \
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index ef1eeb7d8..d21081d0f 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -17,10 +17,11 @@ test_expect_success \
git-commit -m "Initial commit." &&
HEAD=$(git rev-parse --verify HEAD)'
-test_expect_failure \
- 'git branch --help should not have created a bogus branch' \
- 'git branch --help </dev/null >/dev/null 2>/dev/null || :
- test -f .git/refs/heads/--help'
+test_expect_success \
+ 'git branch --help should not have created a bogus branch' '
+ git branch --help </dev/null >/dev/null 2>/dev/null;
+ ! test -f .git/refs/heads/--help
+'
test_expect_success \
'git branch abc should create a branch' \
@@ -71,17 +72,17 @@ test_expect_success \
git branch -m n/n n
test -f .git/logs/refs/heads/n'
-test_expect_failure \
- 'git branch -m o/o o should fail when o/p exists' \
- 'git branch o/o &&
+test_expect_success 'git branch -m o/o o should fail when o/p exists' '
+ git branch o/o &&
git branch o/p &&
- git branch -m o/o o'
+ ! git branch -m o/o o
+'
-test_expect_failure \
- 'git branch -m q r/q should fail when r exists' \
- 'git branch q &&
- git branch r &&
- git branch -m q r/q'
+test_expect_success 'git branch -m q r/q should fail when r exists' '
+ git branch q &&
+ git branch r &&
+ ! git branch -m q r/q
+'
mv .git/config .git/config-saved
@@ -108,12 +109,13 @@ test_expect_success 'config information was renamed, too' \
"test $(git config branch.s.dummy) = Hello &&
! git config branch.s/s/dummy"
-test_expect_failure \
- 'git branch -m u v should fail when the reflog for u is a symlink' \
- 'git branch -l u &&
+test_expect_success \
+ 'git branch -m u v should fail when the reflog for u is a symlink' '
+ git branch -l u &&
mv .git/logs/refs/heads/u real-u &&
ln -s real-u .git/logs/refs/heads/u &&
- git branch -m u v'
+ ! git branch -m u v
+'
test_expect_success 'test tracking setup via --track' \
'git config remote.local.url . &&
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index 4ddc6342a..b64ccfbc5 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -39,12 +39,12 @@ test_expect_success \
git show-ref b >result &&
diff expect result'
-test_expect_failure \
- 'git branch c/d should barf if branch c exists' \
- 'git branch c &&
+test_expect_success 'git branch c/d should barf if branch c exists' '
+ git branch c &&
git pack-refs --all &&
- rm .git/refs/heads/c &&
- git branch c/d'
+ rm -f .git/refs/heads/c &&
+ ! git branch c/d
+'
test_expect_success \
'see if a branch still exists after git pack-refs --prune' \
@@ -54,11 +54,11 @@ test_expect_success \
git show-ref e >result &&
diff expect result'
-test_expect_failure \
- 'see if git pack-refs --prune remove ref files' \
- 'git branch f &&
+test_expect_success 'see if git pack-refs --prune remove ref files' '
+ git branch f &&
git pack-refs --all --prune &&
- ls .git/refs/heads/f'
+ ! test -f .git/refs/heads/f
+'
test_expect_success \
'git branch g should work when git branch g/h has been deleted' \
@@ -69,11 +69,11 @@ test_expect_success \
git pack-refs --all &&
git branch -d g'
-test_expect_failure \
- 'git branch i/j/k should barf if branch i exists' \
- 'git branch i &&
+test_expect_success 'git branch i/j/k should barf if branch i exists' '
+ git branch i &&
git pack-refs --all --prune &&
- git branch i/j/k'
+ ! git branch i/j/k
+'
test_expect_success \
'test git branch k after branch k/l/m and k/lm have been deleted' \
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 95e33b521..496f4ec17 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -42,9 +42,9 @@ test_expect_success \
test_expect_success 'rebase against master' '
git rebase master'
-test_expect_failure \
+test_expect_success \
'the rebase operation should not have destroyed author information' \
- 'git log | grep "Author:" | grep "<>"'
+ '! git log | grep "Author:" | grep "<>"'
test_expect_success 'rebase after merge master' '
git reset --hard topic &&
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 657f68104..0a2609965 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -31,8 +31,8 @@ test_expect_success setup '
git branch skip-merge skip-reference
'
-test_expect_failure 'rebase with git am -3 (default)' '
- git rebase master
+test_expect_success 'rebase with git am -3 (default)' '
+ ! git rebase master
'
test_expect_success 'rebase --skip with am -3' '
@@ -53,7 +53,7 @@ test_expect_success 'rebase moves back to skip-reference' '
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
-test_expect_failure 'rebase with --merge' 'git rebase --merge master'
+test_expect_success 'rebase with --merge' '! git rebase --merge master'
test_expect_success 'rebase --skip with --merge' '
git rebase --skip
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 74a7eb30f..e33ea4e9f 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -324,4 +324,20 @@ test_expect_success 'rebase a detached HEAD' '
test $grandparent = $(git rev-parse HEAD~2)
'
+test_expect_success 'rebase a commit violating pre-commit' '
+
+ mkdir -p .git/hooks &&
+ PRE_COMMIT=.git/hooks/pre-commit &&
+ echo "#!/bin/sh" > $PRE_COMMIT &&
+ echo "test -z \"\$(git diff --cached --check)\"" >> $PRE_COMMIT &&
+ chmod a+x $PRE_COMMIT &&
+ echo "monde! " >> file1 &&
+ test_tick &&
+ ! git commit -m doesnt-verify file1 &&
+ git commit -m doesnt-verify --no-verify file1 &&
+ test_tick &&
+ FAKE_LINES=2 git rebase -i HEAD~2
+
+'
+
test_done
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 5c001aa48..f542f0af4 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -59,15 +59,16 @@ test_expect_success \
echo "other content" > foo
git rm --cached foo'
-test_expect_failure \
- 'Test that git rm --cached foo fails if the index matches neither the file nor HEAD' \
- 'echo content > foo
+test_expect_success \
+ 'Test that git rm --cached foo fails if the index matches neither the file nor HEAD' '
+ echo content > foo
git add foo
git commit -m foo
echo "other content" > foo
git add foo
echo "yet another content" > foo
- git rm --cached foo'
+ ! git rm --cached foo
+'
test_expect_success \
'Test that git rm --cached -f foo works in case where --cached only did not' \
@@ -106,9 +107,9 @@ embedded'"
if test "$test_failed_remove" = y; then
chmod a-w .
-test_expect_failure \
+test_expect_success \
'Test that "git rm -f" fails if its rm fails' \
- 'git rm -f baz'
+ '! git rm -f baz'
chmod 775 .
else
test_expect_success 'skipping removal failure (perhaps running as root?)' :
@@ -127,7 +128,7 @@ test_expect_success '"rm" command printed' '
git add test-file &&
git commit -m "add file for rm test" &&
git rm test-file > rm-output &&
- test `egrep "^rm " rm-output | wc -l` = 1 &&
+ test `grep "^rm " rm-output | wc -l` = 1 &&
rm -f test-file rm-output &&
git commit -m "remove file from rm test"
'
@@ -212,8 +213,8 @@ test_expect_success 'Recursive with -r -f' '
! test -d frotz
'
-test_expect_failure 'Remove nonexistent file returns nonzero exit status' '
- git rm nonexistent
+test_expect_success 'Remove nonexistent file returns nonzero exit status' '
+ ! git rm nonexistent
'
test_done
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index 261f199a0..f2803206f 100755
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
@@ -12,10 +12,11 @@ test_description='git-mktag: tag object verify test'
# given in the expect.pat file.
check_verify_failure () {
- test_expect_success \
- "$1" \
- 'git-mktag <tag.sig 2>message ||
- egrep -q -f expect.pat message'
+ expect="$2"
+ test_expect_success "$1" '
+ ( ! git-mktag <tag.sig 2>message ) &&
+ grep -q "$expect" message
+ '
}
###########################################################
@@ -33,11 +34,8 @@ cat >tag.sig <<EOF
too short for a tag
EOF
-cat >expect.pat <<EOF
-^error: .*size wrong.*$
-EOF
-
-check_verify_failure 'Tag object length check'
+check_verify_failure 'Tag object length check' \
+ '^error: .*size wrong.*$'
############################################################
# 2. object line label check
@@ -48,11 +46,7 @@ type tag
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char0: .*"object "$
-EOF
-
-check_verify_failure '"object" line label check'
+check_verify_failure '"object" line label check' '^error: char0: .*"object "$'
############################################################
# 3. object line SHA1 check
@@ -63,11 +57,7 @@ type tag
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char7: .*SHA1 hash$
-EOF
-
-check_verify_failure '"object" line SHA1 check'
+check_verify_failure '"object" line SHA1 check' '^error: char7: .*SHA1 hash$'
############################################################
# 4. type line label check
@@ -78,11 +68,7 @@ xxxx tag
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char47: .*"[\]ntype "$
-EOF
-
-check_verify_failure '"type" line label check'
+check_verify_failure '"type" line label check' '^error: char47: .*"\\ntype "$'
############################################################
# 5. type line eol check
@@ -90,11 +76,7 @@ check_verify_failure '"type" line label check'
echo "object 779e9b33986b1c2670fff52c5067603117b3e895" >tag.sig
printf "type tagsssssssssssssssssssssssssssssss" >>tag.sig
-cat >expect.pat <<EOF
-^error: char48: .*"[\]n"$
-EOF
-
-check_verify_failure '"type" line eol check'
+check_verify_failure '"type" line eol check' '^error: char48: .*"\\n"$'
############################################################
# 6. tag line label check #1
@@ -105,11 +87,8 @@ type tag
xxx mytag
EOF
-cat >expect.pat <<EOF
-^error: char57: no "tag " found$
-EOF
-
-check_verify_failure '"tag" line label check #1'
+check_verify_failure '"tag" line label check #1' \
+ '^error: char57: no "tag " found$'
############################################################
# 7. tag line label check #2
@@ -120,11 +99,8 @@ type taggggggggggggggggggggggggggggggg
tag
EOF
-cat >expect.pat <<EOF
-^error: char87: no "tag " found$
-EOF
-
-check_verify_failure '"tag" line label check #2'
+check_verify_failure '"tag" line label check #2' \
+ '^error: char87: no "tag " found$'
############################################################
# 8. type line type-name length check
@@ -135,11 +111,8 @@ type taggggggggggggggggggggggggggggggg
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char53: type too long$
-EOF
-
-check_verify_failure '"type" line type-name length check'
+check_verify_failure '"type" line type-name length check' \
+ '^error: char53: type too long$'
############################################################
# 9. verify object (SHA1/type) check
@@ -150,11 +123,8 @@ type tagggg
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char7: could not verify object.*$
-EOF
-
-check_verify_failure 'verify object (SHA1/type) check'
+check_verify_failure 'verify object (SHA1/type) check' \
+ '^error: char7: could not verify object.*$'
############################################################
# 10. verify tag-name check
@@ -165,11 +135,8 @@ type commit
tag my tag
EOF
-cat >expect.pat <<EOF
-^error: char67: could not verify tag name$
-EOF
-
-check_verify_failure 'verify tag-name check'
+check_verify_failure 'verify tag-name check' \
+ '^error: char67: could not verify tag name$'
############################################################
# 11. tagger line label check #1
@@ -180,11 +147,8 @@ type commit
tag mytag
EOF
-cat >expect.pat <<EOF
-^error: char70: could not find "tagger"$
-EOF
-
-check_verify_failure '"tagger" line label check #1'
+check_verify_failure '"tagger" line label check #1' \
+ '^error: char70: could not find "tagger"$'
############################################################
# 12. tagger line label check #2
@@ -196,11 +160,8 @@ tag mytag
tagger
EOF
-cat >expect.pat <<EOF
-^error: char70: could not find "tagger"$
-EOF
-
-check_verify_failure '"tagger" line label check #2'
+check_verify_failure '"tagger" line label check #2' \
+ '^error: char70: could not find "tagger"$'
############################################################
# 13. create valid tag
diff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh
new file mode 100755
index 000000000..9ba06b74c
--- /dev/null
+++ b/t/t4025-hunk-header.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+test_description='diff hunk header truncation'
+
+. ./test-lib.sh
+
+N='日本語'
+N1='æ—¥'
+N2='日本'
+NS="$N$N$N$N$N$N$N$N$N$N$N$N$N"
+
+test_expect_success setup '
+
+ (
+ echo "A $NS"
+ for c in B C D E F G H I J K
+ do
+ echo " $c"
+ done
+ echo "L $NS"
+ for c in M N O P Q R S T U V
+ do
+ echo " $c"
+ done
+ ) >file &&
+ git add file &&
+
+ sed -e "/^ [EP]/s/$/ modified/" <file >file+ &&
+ mv file+ file
+
+'
+
+test_expect_success 'hunk header truncation with an overly long line' '
+
+ git diff | sed -n -e "s/^.*@@//p" >actual &&
+ (
+ echo " A $N$N$N$N$N$N$N$N$N2"
+ echo " L $N$N$N$N$N$N$N$N$N1"
+ ) >expected &&
+ diff -u actual expected
+
+'
+
+test_done
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
new file mode 100755
index 000000000..b61e5169f
--- /dev/null
+++ b/t/t4026-color.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Timo Hirvonen
+#
+
+test_description='Test diff/status color escape codes'
+. ./test-lib.sh
+
+color()
+{
+ git config diff.color.new "$1" &&
+ test "`git config --get-color diff.color.new`" = "$2"
+}
+
+invalid_color()
+{
+ git config diff.color.new "$1" &&
+ test -z "`git config --get-color diff.color.new 2>/dev/null`"
+}
+
+test_expect_success 'reset' '
+ color "reset" "[m"
+'
+
+test_expect_success 'attribute before color name' '
+ color "bold red" "[1;31m"
+'
+
+test_expect_success 'color name before attribute' '
+ color "red bold" "[1;31m"
+'
+
+test_expect_success 'attr fg bg' '
+ color "ul blue red" "[4;34;41m"
+'
+
+test_expect_success 'fg attr bg' '
+ color "blue ul red" "[4;34;41m"
+'
+
+test_expect_success 'fg bg attr' '
+ color "blue red ul" "[4;34;41m"
+'
+
+test_expect_success '256 colors' '
+ color "254 bold 255" "[1;38;5;254;48;5;255m"
+'
+
+test_expect_success 'color too small' '
+ invalid_color "-2"
+'
+
+test_expect_success 'color too big' '
+ invalid_color "256"
+'
+
+test_expect_success 'extra character after color number' '
+ invalid_color "3X"
+'
+
+test_expect_success 'extra character after color name' '
+ invalid_color "redX"
+'
+
+test_expect_success 'extra character after attribute' '
+ invalid_color "dimX"
+'
+
+test_done
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 74f06ec73..7c25634fc 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -46,21 +46,25 @@ test_expect_success 'stat binary diff (copy) -- should not fail.' \
'git-checkout master
git apply --stat --summary C.diff'
-test_expect_failure 'check binary diff -- should fail.' \
- 'git-checkout master
- git apply --check B.diff'
-
-test_expect_failure 'check binary diff (copy) -- should fail.' \
- 'git-checkout master
- git apply --check C.diff'
-
-test_expect_failure 'check incomplete binary diff with replacement -- should fail.' \
- 'git-checkout master
- git apply --check --allow-binary-replacement B.diff'
+test_expect_success 'check binary diff -- should fail.' \
+ 'git-checkout master &&
+ ! git apply --check B.diff'
+
+test_expect_success 'check binary diff (copy) -- should fail.' \
+ 'git-checkout master &&
+ ! git apply --check C.diff'
+
+test_expect_success \
+ 'check incomplete binary diff with replacement -- should fail.' '
+ git-checkout master &&
+ ! git apply --check --allow-binary-replacement B.diff
+'
-test_expect_failure 'check incomplete binary diff with replacement (copy) -- should fail.' \
- 'git-checkout master
- git apply --check --allow-binary-replacement C.diff'
+test_expect_success \
+ 'check incomplete binary diff with replacement (copy) -- should fail.' '
+ git-checkout master &&
+ ! git apply --check --allow-binary-replacement C.diff
+'
test_expect_success 'check binary diff with replacement.' \
'git-checkout master
@@ -73,42 +77,42 @@ test_expect_success 'check binary diff with replacement (copy).' \
# Now we start applying them.
do_reset () {
- rm -f file?
- git-reset --hard
+ rm -f file? &&
+ git-reset --hard &&
git-checkout -f master
}
-test_expect_failure 'apply binary diff -- should fail.' \
- 'do_reset
- git apply B.diff'
+test_expect_success 'apply binary diff -- should fail.' \
+ 'do_reset &&
+ ! git apply B.diff'
-test_expect_failure 'apply binary diff -- should fail.' \
- 'do_reset
- git apply --index B.diff'
+test_expect_success 'apply binary diff -- should fail.' \
+ 'do_reset &&
+ ! git apply --index B.diff'
-test_expect_failure 'apply binary diff (copy) -- should fail.' \
- 'do_reset
- git apply C.diff'
+test_expect_success 'apply binary diff (copy) -- should fail.' \
+ 'do_reset &&
+ ! git apply C.diff'
-test_expect_failure 'apply binary diff (copy) -- should fail.' \
- 'do_reset
- git apply --index C.diff'
+test_expect_success 'apply binary diff (copy) -- should fail.' \
+ 'do_reset &&
+ ! git apply --index C.diff'
test_expect_success 'apply binary diff without replacement.' \
- 'do_reset
+ 'do_reset &&
git apply BF.diff'
test_expect_success 'apply binary diff without replacement (copy).' \
- 'do_reset
+ 'do_reset &&
git apply CF.diff'
test_expect_success 'apply binary diff.' \
- 'do_reset
+ 'do_reset &&
git apply --allow-binary-replacement --index BF.diff &&
test -z "$(git diff --name-status binary)"'
test_expect_success 'apply binary diff (copy).' \
- 'do_reset
+ 'do_reset &&
git apply --allow-binary-replacement --index CF.diff &&
test -z "$(git diff --name-status binary)"'
diff --git a/t/t4113-apply-ending.sh b/t/t4113-apply-ending.sh
index 1c6bec044..d74103988 100755
--- a/t/t4113-apply-ending.sh
+++ b/t/t4113-apply-ending.sh
@@ -29,8 +29,8 @@ test_expect_success setup \
# test
-test_expect_failure 'apply at the end' \
- 'git apply --index test-patch'
+test_expect_success 'apply at the end' \
+ '! git apply --index test-patch'
cat >test-patch <<\EOF
diff a/file b/file
@@ -47,7 +47,7 @@ b
c'
git update-index file
-test_expect_failure 'apply at the beginning' \
- 'git apply --index test-patch'
+test_expect_success 'apply at the beginning' \
+ '! git apply --index test-patch'
test_done
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index 10a5fa9a3..6d12efb74 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -22,7 +22,7 @@ echo 3 > a1
git commit --quiet -m "$(echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" | sed "s/i/1234/g" | tr 1234 '\360\235\204\236')" a1
# now fsck up the utf8
-git repo-config i18n.commitencoding non-utf-8
+git config i18n.commitencoding non-utf-8
echo 4 > a1
git commit --quiet -m "$(echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" | sed "s/i/1234/g" | tr 1234 '\370\235\204\236')" a1
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
new file mode 100755
index 000000000..b53645417
--- /dev/null
+++ b/t/t4202-log.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+test_description='git log'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ echo one >one &&
+ git add one &&
+ test_tick &&
+ git commit -m initial &&
+
+ echo ichi >one &&
+ git add one &&
+ test_tick &&
+ git commit -m second &&
+
+ mkdir a &&
+ echo ni >a/two &&
+ git add a/two &&
+ test_tick &&
+ git commit -m third &&
+
+ echo san >a/three &&
+ git add a/three &&
+ test_tick &&
+ git commit -m fourth &&
+
+ git rm a/three &&
+ test_tick &&
+ git commit -m fifth
+
+'
+
+test_expect_success 'diff-filter=A' '
+
+ actual=$(git log --pretty="format:%s" --diff-filter=A HEAD) &&
+ expect=$(echo fourth ; echo third ; echo initial) &&
+ test "$actual" = "$expect" || {
+ echo Oops
+ echo "Actual: $actual"
+ false
+ }
+
+'
+
+test_expect_success 'diff-filter=M' '
+
+ actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
+ expect=$(echo second) &&
+ test "$actual" = "$expect" || {
+ echo Oops
+ echo "Actual: $actual"
+ false
+ }
+
+'
+
+test_expect_success 'diff-filter=D' '
+
+ actual=$(git log --pretty="format:%s" --diff-filter=D HEAD) &&
+ expect=$(echo fifth) &&
+ test "$actual" = "$expect" || {
+ echo Oops
+ echo "Actual: $actual"
+ false
+ }
+
+'
+
+
+
+test_done \ No newline at end of file
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index 6e594bf1e..cd3c14980 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -264,8 +264,14 @@ test_expect_success \
cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
.git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67'
-test_expect_failure \
+test_expect_success \
'make sure index-pack detects the SHA1 collision' \
- 'git-index-pack -o bad.idx test-3.pack'
+ '! git-index-pack -o bad.idx test-3.pack'
+
+test_expect_success \
+ 'honor pack.packSizeLimit' \
+ 'git config pack.packSizeLimit 200 &&
+ packname_4=$(git pack-objects test-4 <obj-list) &&
+ test 3 = $(ls test-4-*.pack | wc -l)'
test_done
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 2a2878b57..67b9a7b84 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -42,9 +42,9 @@ test_expect_success \
'both packs should be identical' \
'cmp "test-1-${pack1}.pack" "test-2-${pack2}.pack"'
-test_expect_failure \
+test_expect_success \
'index v1 and index v2 should be different' \
- 'cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"'
+ '! cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"'
test_expect_success \
'index-pack with index version 1' \
@@ -78,9 +78,9 @@ test_expect_success \
'git verify-pack -v "test-3-${pack3}.pack"'
test "$have_64bits" &&
-test_expect_failure \
+test_expect_success \
'64-bit offsets: should be different from previous index v2 results' \
- 'cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
+ '! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
test "$have_64bits" &&
test_expect_success \
@@ -112,22 +112,22 @@ test_expect_success \
bs=1 count=20 conv=notrunc &&
git cat-file blob "$delta_sha1" > blob_2 )'
-test_expect_failure \
+test_expect_success \
'[index v1] 3) corrupted delta happily returned wrong data' \
- 'cmp blob_1 blob_2'
+ '! cmp blob_1 blob_2'
-test_expect_failure \
+test_expect_success \
'[index v1] 4) confirm that the pack is actually corrupted' \
- 'git fsck --full $commit'
+ '! git fsck --full $commit'
test_expect_success \
'[index v1] 5) pack-objects happily reuses corrupted data' \
'pack4=$(git pack-objects test-4 <obj-list) &&
test -f "test-4-${pack1}.pack"'
-test_expect_failure \
+test_expect_success \
'[index v1] 6) newly created pack is BAD !' \
- 'git verify-pack -v "test-4-${pack1}.pack"'
+ '! git verify-pack -v "test-4-${pack1}.pack"'
test_expect_success \
'[index v2] 1) stream pack to repository' \
@@ -150,16 +150,16 @@ test_expect_success \
bs=1 count=20 conv=notrunc &&
git cat-file blob "$delta_sha1" > blob_4 )'
-test_expect_failure \
+test_expect_success \
'[index v2] 3) corrupted delta happily returned wrong data' \
- 'cmp blob_3 blob_4'
+ '! cmp blob_3 blob_4'
-test_expect_failure \
+test_expect_success \
'[index v2] 4) confirm that the pack is actually corrupted' \
- 'git fsck --full $commit'
+ '! git fsck --full $commit'
-test_expect_failure \
+test_expect_success \
'[index v2] 5) pack-objects refuses to reuse corrupted data' \
- 'git pack-objects test-5 <obj-list'
+ '! git pack-objects test-5 <obj-list'
test_done
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
new file mode 100644
index 000000000..6560af756
--- /dev/null
+++ b/t/t5304-prune.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Johannes E. Schindelin
+#
+
+test_description='prune'
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ : > file &&
+ git add file &&
+ test_tick &&
+ git commit -m initial &&
+ git gc
+
+'
+
+test_expect_success 'prune stale packs' '
+
+ orig_pack=$(echo .git/objects/pack/*.pack) &&
+ : > .git/objects/tmp_1.pack &&
+ : > .git/objects/tmp_2.pack &&
+ test-chmtime -86501 .git/objects/tmp_1.pack &&
+ git prune --expire 1.day &&
+ test -f $orig_pack &&
+ test -f .git/objects/tmp_2.pack &&
+ ! test -f .git/objects/tmp_1.pack
+
+'
+
+test_done
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index c5dd30d0a..9a1202424 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -25,7 +25,7 @@ test_expect_success setup '
cat >victim/.git/hooks/pre-receive <<'EOF'
#!/bin/sh
-printf "$@" >>$GIT_DIR/pre-receive.args
+printf %s "$@" >>$GIT_DIR/pre-receive.args
cat - >$GIT_DIR/pre-receive.stdin
echo STDOUT pre-receive
echo STDERR pre-receive >&2
@@ -35,7 +35,7 @@ chmod u+x victim/.git/hooks/pre-receive
cat >victim/.git/hooks/update <<'EOF'
#!/bin/sh
echo "$@" >>$GIT_DIR/update.args
-read x; printf "$x" >$GIT_DIR/update.stdin
+read x; printf %s "$x" >$GIT_DIR/update.stdin
echo STDOUT update $1
echo STDERR update $1 >&2
test "$1" = refs/heads/master || exit
@@ -44,7 +44,7 @@ chmod u+x victim/.git/hooks/update
cat >victim/.git/hooks/post-receive <<'EOF'
#!/bin/sh
-printf "$@" >>$GIT_DIR/post-receive.args
+printf %s "$@" >>$GIT_DIR/post-receive.args
cat - >$GIT_DIR/post-receive.stdin
echo STDOUT post-receive
echo STDERR post-receive >&2
@@ -54,14 +54,14 @@ chmod u+x victim/.git/hooks/post-receive
cat >victim/.git/hooks/post-update <<'EOF'
#!/bin/sh
echo "$@" >>$GIT_DIR/post-update.args
-read x; printf "$x" >$GIT_DIR/post-update.stdin
+read x; printf %s "$x" >$GIT_DIR/post-update.stdin
echo STDOUT post-update
echo STDERR post-update >&2
EOF
chmod u+x victim/.git/hooks/post-update
-test_expect_failure push '
- git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
+test_expect_success push '
+ ! git-send-pack --force ./victim/.git master tofail >send.out 2>send.err
'
test_expect_success 'updated as expected' '
@@ -112,8 +112,8 @@ test_expect_success 'all *-receive hook args are empty' '
! test -s victim/.git/post-receive.args
'
-test_expect_failure 'send-pack produced no output' '
- test -s send.out
+test_expect_success 'send-pack produced no output' '
+ ! test -s send.out
'
cat <<EOF >expect
@@ -129,7 +129,7 @@ STDOUT post-update
STDERR post-update
EOF
test_expect_success 'send-pack stderr contains hook messages' '
- egrep ^STD send.err >actual &&
+ grep ^STD send.err >actual &&
git diff - actual <expect
'
diff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh
index 1c4b0b32a..1394047a8 100755
--- a/t/t5402-post-merge-hook.sh
+++ b/t/t5402-post-merge-hook.sh
@@ -30,9 +30,9 @@ EOF
chmod u+x clone${clone}/.git/hooks/post-merge
done
-test_expect_failure 'post-merge does not run for up-to-date ' '
+test_expect_success 'post-merge does not run for up-to-date ' '
GIT_DIR=clone1/.git git merge $commit0 &&
- test -e clone1/.git/post-merge.args
+ ! test -f clone1/.git/post-merge.args
'
test_expect_success 'post-merge runs as expected ' '
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 7b6798d8b..788b4a5aa 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -176,7 +176,7 @@ test_expect_success "deepening fetch in shallow repo" \
test_expect_success "clone shallow object count" \
"test \"count: 18\" = \"$(grep count count.shallow)\""
-test_expect_failure "pull in shallow repo with missing merge base" \
- "(cd shallow; git pull --depth 4 .. A)"
+test_expect_success "pull in shallow repo with missing merge base" \
+ "(cd shallow && ! git pull --depth 4 .. A)"
test_done
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 02882c1e4..9b948c14e 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -95,7 +95,7 @@ test_expect_success 'fetch following tags' '
'
-test_expect_failure 'fetch must not resolve short tag name' '
+test_expect_success 'fetch must not resolve short tag name' '
cd "$D" &&
@@ -103,11 +103,11 @@ test_expect_failure 'fetch must not resolve short tag name' '
cd five &&
git init &&
- git fetch .. anno:five
+ ! git fetch .. anno:five
'
-test_expect_failure 'fetch must not resolve short remote name' '
+test_expect_success 'fetch must not resolve short remote name' '
cd "$D" &&
git-update-ref refs/remotes/six/HEAD HEAD
@@ -116,7 +116,7 @@ test_expect_failure 'fetch must not resolve short remote name' '
cd six &&
git init &&
- git fetch .. six:six
+ ! git fetch .. six:six
'
@@ -139,10 +139,10 @@ test_expect_success 'create bundle 2' '
git bundle create bundle2 master~2..master
'
-test_expect_failure 'unbundle 1' '
+test_expect_success 'unbundle 1' '
cd "$D/bundle" &&
git checkout -b some-branch &&
- git fetch "$D/bundle1" master:master
+ ! git fetch "$D/bundle1" master:master
'
test_expect_success 'bundle 1 has only 3 files ' '
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 52b3a0c6d..9484129ca 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -71,8 +71,25 @@ test_expect_success 'branch.to-rebase.rebase' '
git reset --hard before-rebase &&
git config branch.to-rebase.rebase 1 &&
git pull . copy &&
+ git config branch.to-rebase.rebase 0 &&
test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
test new = $(git show HEAD:file2)
'
+test_expect_success '--rebase with rebased upstream' '
+
+ git remote add -f me . &&
+ git checkout copy &&
+ git reset --hard HEAD^ &&
+ echo conflicting modification > file &&
+ git commit -m conflict file &&
+ git checkout to-rebase &&
+ echo file > file2 &&
+ git commit -m to-rebase file2 &&
+ git pull --rebase me copy &&
+ test "conflicting modification" = "$(cat file)" &&
+ test file = $(cat file2)
+
+'
+
test_done
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh
index cc8949e3e..8b0509106 100755
--- a/t/t5530-upload-pack-error.sh
+++ b/t/t5530-upload-pack-error.sh
@@ -26,9 +26,8 @@ test_expect_success 'setup and corrupt repository' '
'
-test_expect_failure 'fsck fails' '
-
- git fsck
+test_expect_success 'fsck fails' '
+ ! git fsck
'
test_expect_success 'upload-pack fails due to error in pack-objects' '
@@ -46,9 +45,8 @@ test_expect_success 'corrupt repo differently' '
'
-test_expect_failure 'fsck fails' '
-
- git fsck
+test_expect_success 'fsck fails' '
+ ! git fsck
'
test_expect_success 'upload-pack fails due to error in rev-list' '
@@ -66,9 +64,9 @@ test_expect_success 'create empty repository' '
'
-test_expect_failure 'fetch fails' '
+test_expect_success 'fetch fails' '
- git fetch .. master
+ ! git fetch .. master
'
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 1776b377f..acf34cec8 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -11,13 +11,13 @@ remove the directory before attempting a clone again.'
. ./test-lib.sh
-test_expect_failure \
+test_expect_success \
'clone of non-existent source should fail' \
- 'git-clone foo bar'
+ '! git-clone foo bar'
-test_expect_failure \
+test_expect_success \
'failed clone should not leave a directory' \
- 'cd bar'
+ '! test -d bar'
# Need a repo to clone
test_create_repo foo
@@ -27,9 +27,9 @@ test_create_repo foo
# source repository given to git-clone should be relative to the
# current path not to the target dir
-test_expect_failure \
+test_expect_success \
'clone of non-existent (relative to $PWD) source should fail' \
- 'git-clone ../foo baz'
+ '! git-clone ../foo baz'
test_expect_success \
'clone should work now that source exists' \
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index 699df6ebd..910ccb4ff 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -53,14 +53,18 @@ git prune'
cd "$base_dir"
-test_expect_failure 'creating too deep nesting' \
+test_expect_success 'creating too deep nesting' \
'git clone -l -s C D &&
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
-git clone -l -s G H &&
-cd H &&
-test_valid_repo'
+git clone -l -s G H'
+
+test_expect_success 'invalidity of deepest repository' \
+'cd H && {
+ test_valid_repo
+ test $? -ne 0
+}'
cd "$base_dir"
@@ -83,10 +87,10 @@ test_valid_repo"
cd "$base_dir"
-test_expect_failure 'that info/alternates is necessary' \
+test_expect_success 'that info/alternates is necessary' \
'cd C &&
-rm .git/objects/info/alternates &&
-test_valid_repo'
+rm -f .git/objects/info/alternates &&
+! (test_valid_repo)'
cd "$base_dir"
@@ -97,9 +101,11 @@ test_valid_repo'
cd "$base_dir"
-test_expect_failure 'that relative alternate is only possible for current dir' \
-'cd D &&
-test_valid_repo'
+test_expect_success \
+ 'that relative alternate is only possible for current dir' '
+ cd D &&
+ ! (test_valid_repo)
+'
cd "$base_dir"
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 1e4541afe..0dc915ea6 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -139,4 +139,14 @@ commit 131a310eb913d107dd3c09a65d1651175898735d
commit 86c75cfd708a0e5868dc876ed5b8bb66c80b4873
EOF
+test_expect_success 'empty email' '
+ test_tick &&
+ C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
+ A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
+ test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700" || {
+ echo "Eh? $A" >failure
+ false
+ }
+'
+
test_done
diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh
new file mode 100755
index 000000000..be3d238d9
--- /dev/null
+++ b/t/t6009-rev-list-parent.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+test_description='properly cull all ancestors'
+
+. ./test-lib.sh
+
+commit () {
+ test_tick &&
+ echo $1 >file &&
+ git commit -a -m $1 &&
+ git tag $1
+}
+
+test_expect_success setup '
+
+ touch file &&
+ git add file &&
+
+ commit one &&
+
+ test_tick=$(($test_tick - 2400))
+
+ commit two &&
+ commit three &&
+ commit four &&
+
+ git log --pretty=oneline --abbrev-commit
+'
+
+test_expect_failure 'one is ancestor of others and should not be shown' '
+
+ git rev-list one --not four >result &&
+ >expect &&
+ diff -u expect result
+
+'
+
+test_done
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index ae3b6f283..86419964b 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -66,8 +66,8 @@ test_expect_success "merge result added missing LF" \
"git diff test.txt test2.txt"
cp test.txt backup.txt
-test_expect_failure "merge with conflicts" \
- "git merge-file test.txt orig.txt new3.txt"
+test_expect_success "merge with conflicts" \
+ "! git merge-file test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< test.txt
@@ -89,8 +89,8 @@ EOF
test_expect_success "expected conflict markers" "git diff test.txt expect.txt"
cp backup.txt test.txt
-test_expect_failure "merge with conflicts, using -L" \
- "git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
+test_expect_success "merge with conflicts, using -L" \
+ "! git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
cat > expect.txt << EOF
<<<<<<< 1
@@ -113,8 +113,8 @@ test_expect_success "expected conflict markers, with -L" \
"git diff test.txt expect.txt"
sed "s/ tu / TU /" < new1.txt > new5.txt
-test_expect_failure "conflict in removed tail" \
- "git merge-file -p orig.txt new1.txt new5.txt > out"
+test_expect_success "conflict in removed tail" \
+ "! git merge-file -p orig.txt new1.txt new5.txt > out"
cat > expect << EOF
Dominus regit me,
diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh
index c154f03cf..149ea8543 100755
--- a/t/t6024-recursive-merge.sh
+++ b/t/t6024-recursive-merge.sh
@@ -60,7 +60,7 @@ git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
'
-test_expect_failure "combined merge conflicts" "git merge -m final G"
+test_expect_success "combined merge conflicts" "! git merge -m final G"
cat > expect << EOF
<<<<<<< HEAD:a1
diff --git a/t/t6025-merge-symlinks.sh b/t/t6025-merge-symlinks.sh
index 950c2e9b6..6004deb43 100755
--- a/t/t6025-merge-symlinks.sh
+++ b/t/t6025-merge-symlinks.sh
@@ -30,30 +30,29 @@ echo plain-file > symlink &&
git add symlink &&
git-commit -m b-file'
-test_expect_failure \
+test_expect_success \
'merge master into b-symlink, which has a different symbolic link' '
-! git-checkout b-symlink ||
-git-merge master'
+git-checkout b-symlink &&
+! git-merge master'
test_expect_success \
'the merge result must be a file' '
test -f symlink'
-test_expect_failure \
+test_expect_success \
'merge master into b-file, which has a file instead of a symbolic link' '
-! (git-reset --hard &&
-git-checkout b-file) ||
-git-merge master'
+git-reset --hard && git-checkout b-file &&
+! git-merge master'
test_expect_success \
'the merge result must be a file' '
test -f symlink'
-test_expect_failure \
+test_expect_success \
'merge b-file, which has a file instead of a symbolic link, into master' '
-! (git-reset --hard &&
-git-checkout master) ||
-git-merge b-file'
+git-reset --hard &&
+git-checkout master &&
+! git-merge b-file'
test_expect_success \
'the merge result must be a file' '
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 2ba4b00e5..ec71123f4 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -254,6 +254,18 @@ test_expect_success 'bisect run & skip: find first bad' '
grep "$HASH6 is first bad commit" my_bisect_log.txt
'
+test_expect_success 'bisect starting with a detached HEAD' '
+
+ git bisect reset &&
+ git checkout master^ &&
+ HEAD=$(git rev-parse --verify HEAD) &&
+ git bisect start &&
+ test $HEAD = $(cat .git/head-name) &&
+ git bisect reset &&
+ test $HEAD = $(git rev-parse --verify HEAD)
+
+'
+
#
#
test_done
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 0724864e5..2328b6994 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -26,7 +26,7 @@ test_expect_success 'final^1^1^1 = final^^^' "test $(git rev-parse final^1^1^1)
test_expect_success 'final^1^2' "test $(git rev-parse start2) = $(git rev-parse final^1^2)"
test_expect_success 'final^1^2 != final^1^1' "test $(git rev-parse final^1^2) != $(git rev-parse final^1^1)"
test_expect_success 'final^1^3 not valid' "if git rev-parse --verify final^1^3; then false; else :; fi"
-test_expect_failure '--verify start2^1' 'git rev-parse --verify start2^1'
+test_expect_success '--verify start2^1' '! git rev-parse --verify start2^1'
test_expect_success '--verify start2^0' 'git rev-parse --verify start2^0'
test_expect_success 'repack for next test' 'git repack -a -d'
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 8a23aaf21..f46ec93c8 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -43,8 +43,8 @@ test_expect_success 'Check atom names are valid' '
test -z "$bad"
'
-test_expect_failure 'Check invalid atoms names are errors' '
- git-for-each-ref --format="%(INVALID)" refs/heads
+test_expect_success 'Check invalid atoms names are errors' '
+ ! git-for-each-ref --format="%(INVALID)" refs/heads
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
@@ -63,8 +63,8 @@ test_expect_success 'Check valid format specifiers for date fields' '
git-for-each-ref --format="%(authordate:rfc2822)" refs/heads
'
-test_expect_failure 'Check invalid format specifiers are errors' '
- git-for-each-ref --format="%(authordate:INVALID)" refs/heads
+test_expect_success 'Check invalid format specifiers are errors' '
+ ! git-for-each-ref --format="%(authordate:INVALID)" refs/heads
'
cat >expected <<\EOF
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 8b43fb5a2..b1243b416 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -22,7 +22,7 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/COPYING.+path1/COPYING"'
+ grep "^R100..*path0/COPYING..*path1/COPYING"'
test_expect_success \
'moving the file back into subdirectory' \
@@ -36,7 +36,7 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+ grep "^R100..*path1/COPYING..*path0/COPYING"'
test_expect_success \
'adding another file' \
@@ -55,9 +55,9 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+ grep "^R100..*path0/COPYING..*path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/README.+path2/README"'
+ grep "^R100..*path0/README..*path2/README"'
test_expect_success \
'succeed when source is a prefix of destination' \
@@ -74,13 +74,13 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
+ grep "^R100..*path2/COPYING..*path1/path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path2/README.+path1/path2/README"'
+ grep "^R100..*path2/README..*path1/path2/README"'
-test_expect_failure \
+test_expect_success \
'do not move directory over existing directory' \
- 'mkdir path0 && mkdir path0/path2 && git mv path2 path0'
+ 'mkdir path0 && mkdir path0/path2 && ! git mv path2 path0'
test_expect_success \
'move into "."' \
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 68b2b9287..c8b4f65f3 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -107,8 +107,8 @@ do
diff expected actual
'
- test_expect_failure "grep -c $L (no /dev/null)" '
- git grep -c test $H | grep -q "/dev/null"
+ test_expect_success "grep -c $L (no /dev/null)" '
+ ! git grep -c test $H | grep -q /dev/null
'
done
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index df496a95f..75cd33bde 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -26,8 +26,8 @@ test_expect_success 'listing all tags in an empty tree should output nothing' '
test `git-tag | wc -l` -eq 0
'
-test_expect_failure 'looking for a tag in an empty tree should fail' \
- 'tag_exists mytag'
+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' '
! git-tag mynotag &&
@@ -83,9 +83,9 @@ test_expect_success \
# special cases for creating tags:
-test_expect_failure \
+test_expect_success \
'trying to create a tag with the name of one existing should fail' \
- 'git tag mytag'
+ '! git tag mytag'
test_expect_success \
'trying to create a tag with a non-valid name should fail' '
@@ -146,8 +146,8 @@ test_expect_success \
! tag_exists myhead
'
-test_expect_failure 'trying to delete an already deleted tag should fail' \
- 'git-tag -d mytag'
+test_expect_success 'trying to delete an already deleted tag should fail' \
+ '! git-tag -d mytag'
# listing various tags with pattern matching:
@@ -265,16 +265,16 @@ test_expect_success \
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
'
-test_expect_failure 'trying to verify an unknown tag should fail' \
- 'git-tag -v unknown-tag'
+test_expect_success 'trying to verify an unknown tag should fail' \
+ '! git-tag -v unknown-tag'
-test_expect_failure \
+test_expect_success \
'trying to verify a non-annotated and non-signed tag should fail' \
- 'git-tag -v non-annotated-tag'
+ '! git-tag -v non-annotated-tag'
-test_expect_failure \
+test_expect_success \
'trying to verify many non-annotated or unknown tags, should fail' \
- 'git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
+ '! git-tag -v unknown-tag1 non-annotated-tag unknown-tag2'
# creating annotated tags:
@@ -1027,21 +1027,21 @@ test_expect_success \
# try to sign with bad user.signingkey
git config user.signingkey BobTheMouse
-test_expect_failure \
+test_expect_success \
'git-tag -s fails if gpg is misconfigured' \
- 'git tag -s -m tail tag-gpg-failure'
+ '! git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey
# try to verify without gpg:
rm -rf gpghome
-test_expect_failure \
+test_expect_success \
'verify signed tag fails when public key is not present' \
- 'git-tag -v signed-tag'
+ '! git-tag -v signed-tag'
-test_expect_failure \
+test_expect_success \
'git-tag -a fails if tag annotation is empty' '
- GIT_EDITOR=cat git tag -a initial-comment
+ ! (GIT_EDITOR=cat git tag -a initial-comment)
'
test_expect_success \
diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 44228b5ac..c1cec5530 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -37,7 +37,7 @@ test_expect_success 'dumb should error out when falling back on vi' '
if git commit --amend
then
echo "Oops?"
- exit 1
+ false
else
: happy
fi
diff --git a/t/t7101-reset.sh b/t/t7101-reset.sh
index 66d40430b..0d9874bfd 100755
--- a/t/t7101-reset.sh
+++ b/t/t7101-reset.sh
@@ -36,28 +36,28 @@ test_expect_success \
'test -d path0 &&
test -f path0/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/path2/COPYING' \
- 'test -f path1/path2/COPYING'
+ '! test -f path1/path2/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/COPYING' \
- 'test -f path1/COPYING'
+ '! test -f path1/COPYING'
-test_expect_failure \
+test_expect_success \
'checking lack of COPYING' \
- 'test -f COPYING'
+ '! test -f COPYING'
-test_expect_failure \
+test_expect_success \
'checking checking lack of path1/COPYING-TOO' \
- 'test -f path0/COPYING-TOO'
+ '! test -f path0/COPYING-TOO'
-test_expect_failure \
+test_expect_success \
'checking lack of path1/path2' \
- 'test -d path1/path2'
+ '! test -d path1/path2'
-test_expect_failure \
+test_expect_success \
'checking lack of path1' \
- 'test -d path1'
+ '! test -d path1'
test_done
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
new file mode 100755
index 000000000..b25a77f91
--- /dev/null
+++ b/t/t7103-reset-bare.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+test_description='git-reset in a bare repository'
+. ./test-lib.sh
+
+test_expect_success 'setup non-bare' '
+ echo one >file &&
+ git add file &&
+ git commit -m one &&
+ echo two >file &&
+ git commit -a -m two
+'
+
+test_expect_success 'setup bare' '
+ git clone --bare . bare.git &&
+ cd bare.git
+'
+
+test_expect_success 'hard reset is not allowed' '
+ ! git reset --hard HEAD^
+'
+
+test_expect_success 'soft reset is allowed' '
+ git reset --soft HEAD^ &&
+ test "`git show --pretty=format:%s | head -n 1`" = "one"
+'
+
+test_done
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 73d8a00e2..dbf1ace29 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -214,6 +214,22 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
fi
'
+test_expect_success 'checkout to detach HEAD with :/message' '
+
+ git checkout -f master && git clean -f &&
+ git checkout ":/Initial" &&
+ H=$(git rev-parse --verify HEAD) &&
+ M=$(git show-ref -s --verify refs/heads/master) &&
+ test "z$H" = "z$M" &&
+ if git symbolic-ref HEAD >/dev/null 2>&1
+ then
+ echo "OOPS, HEAD is still symbolic???"
+ false
+ else
+ : happy
+ fi
+'
+
test_expect_success 'checkout to detach HEAD with HEAD^0' '
git checkout -f master && git clean -f &&
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 4fe3a41f0..2ef85a869 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -13,11 +13,11 @@ subcommands of git-submodule.
#
# Test setup:
-# -create a repository in directory lib
+# -create a repository in directory init
# -add a couple of files
-# -add directory lib to 'superproject', this creates a DIRLINK entry
+# -add directory init to 'superproject', this creates a DIRLINK entry
# -add a couple of regular files to enable testing of submodule filtering
-# -mv lib subrepo
+# -mv init subrepo
# -add an entry to .gitmodules for submodule 'example'
#
test_expect_success 'Prepare submodule testing' '
@@ -25,8 +25,8 @@ test_expect_success 'Prepare submodule testing' '
git-add t &&
git-commit -m "initial commit" &&
git branch initial HEAD &&
- mkdir lib &&
- cd lib &&
+ mkdir init &&
+ cd init &&
git init &&
echo a >a &&
git add a &&
@@ -41,10 +41,10 @@ test_expect_success 'Prepare submodule testing' '
cd .. &&
echo a >a &&
echo z >z &&
- git add a lib z &&
+ git add a init z &&
git-commit -m "super commit 1" &&
- mv lib .subrepo &&
- GIT_CONFIG=.gitmodules git config submodule.example.url git://example.com/lib.git
+ 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' '
@@ -52,7 +52,7 @@ test_expect_success 'status should fail for unmapped paths' '
then
echo "[OOPS] submodule status succeeded"
false
- elif ! GIT_CONFIG=.gitmodules git config submodule.example.path lib
+ elif ! GIT_CONFIG=.gitmodules git config submodule.example.path init
then
echo "[OOPS] git config failed to update .gitmodules"
false
@@ -71,7 +71,7 @@ test_expect_success 'status should initially be "missing"' '
test_expect_success 'init should register submodule url in .git/config' '
git-submodule init &&
url=$(git config submodule.example.url) &&
- if test "$url" != "git://example.com/lib.git"
+ if test "$url" != "git://example.com/init.git"
then
echo "[OOPS] init succeeded but submodule url is wrong"
false
@@ -83,41 +83,41 @@ 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" >lib &&
+ echo "hello" >init &&
if git-submodule update
then
echo "[OOPS] update should have failed"
false
- elif test "$(cat lib)" != "hello"
+ elif test "$(cat init)" != "hello"
then
- echo "[OOPS] update failed but lib file was molested"
+ echo "[OOPS] update failed but init file was molested"
false
else
- rm lib
+ rm init
fi
'
test_expect_success 'update should fail when path is used by a nonempty directory' '
- mkdir lib &&
- echo "hello" >lib/a &&
+ mkdir init &&
+ echo "hello" >init/a &&
if git-submodule update
then
echo "[OOPS] update should have failed"
false
- elif test "$(cat lib/a)" != "hello"
+ elif test "$(cat init/a)" != "hello"
then
- echo "[OOPS] update failed but lib/a was molested"
+ echo "[OOPS] update failed but init/a was molested"
false
else
- rm lib/a
+ rm init/a
fi
'
test_expect_success 'update should work when path is an empty dir' '
- rm -rf lib &&
- mkdir lib &&
+ rm -rf init &&
+ mkdir init &&
git-submodule update &&
- head=$(cd lib && git rev-parse HEAD) &&
+ head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
echo "[OOPS] Failed to obtain submodule head"
@@ -134,7 +134,7 @@ test_expect_success 'status should be "up-to-date" after update' '
'
test_expect_success 'status should be "modified" after submodule commit' '
- cd lib &&
+ cd init &&
echo b >b &&
git add b &&
git-commit -m "submodule commit 2" &&
@@ -157,8 +157,8 @@ test_expect_success 'git diff should report the SHA1 of the new submodule commit
'
test_expect_success 'update should checkout rev1' '
- git-submodule update &&
- head=$(cd lib && git rev-parse HEAD) &&
+ git-submodule update init &&
+ head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
echo "[OOPS] submodule git rev-parse returned nothing"
@@ -182,13 +182,13 @@ test_expect_success 'checkout superproject with subproject already present' '
test_expect_success 'apply submodule diff' '
git branch second &&
(
- cd lib &&
+ cd init &&
echo s >s &&
git add s &&
git commit -m "change subproject"
) &&
- git update-index --add lib &&
- git-commit -m "change lib" &&
+ git update-index --add init &&
+ git-commit -m "change init" &&
git-format-patch -1 --stdout >P.diff &&
git checkout second &&
git apply --index P.diff &&
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index d1a415a12..361886c3d 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -17,49 +17,49 @@ test_expect_success \
git-add file && \
git-status | grep 'Initial commit'"
-test_expect_failure \
+test_expect_success \
"fail initial amend" \
- "git-commit --amend"
+ "! git-commit --amend"
test_expect_success \
"initial commit" \
"git-commit -m initial"
-test_expect_failure \
+test_expect_success \
"invalid options 1" \
- "git-commit -m foo -m bar -F file"
+ "! git-commit -m foo -m bar -F file"
-test_expect_failure \
+test_expect_success \
"invalid options 2" \
- "git-commit -C HEAD -m illegal"
+ "! git-commit -C HEAD -m illegal"
-test_expect_failure \
+test_expect_success \
"using paths with -a" \
"echo King of the bongo >file &&
- git-commit -m foo -a file"
+ ! git-commit -m foo -a file"
-test_expect_failure \
+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_failure \
+test_expect_success \
"using invalid commit with -C" \
- "git-commit -C bogus"
+ "! git-commit -C bogus"
-test_expect_failure \
+test_expect_success \
"testing nothing to commit" \
- "git-commit -m initial"
+ "! git-commit -m initial"
test_expect_success \
"next commit" \
"echo 'bongo bongo bongo' >file \
git-commit -m next -a"
-test_expect_failure \
+test_expect_success \
"commit message from non-existing file" \
"echo 'more bongo: bongo bongo bongo bongo' >file && \
- git-commit -F gah -a"
+ ! git-commit -F gah -a"
# Empty except stray tabs and spaces on a few lines.
sed -e 's/@$//' >msg <<EOF
@@ -68,9 +68,9 @@ sed -e 's/@$//' >msg <<EOF
@
Signed-off-by: hula
EOF
-test_expect_failure \
+test_expect_success \
"empty commit message" \
- "git-commit -F msg -a"
+ "! git-commit -F msg -a"
test_expect_success \
"commit message from file" \
@@ -88,10 +88,10 @@ test_expect_success \
"amend commit" \
"VISUAL=./editor git-commit --amend"
-test_expect_failure \
+test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \
- git-commit -F msg -m amending ."
+ ! git-commit -F msg -m amending ."
test_expect_success \
"using message from other commit" \
@@ -327,4 +327,22 @@ test_expect_success 'amend using the message from another commit' '
'
+test_expect_success 'amend using the message from a commit named with tag' '
+
+ git reset --hard &&
+ test_tick &&
+ git commit --allow-empty -m "old commit" &&
+ old=$(git rev-parse --verify HEAD) &&
+ git tag -a -m "tag on old" tagged-old HEAD &&
+ test_tick &&
+ git commit --allow-empty -m "new commit" &&
+ new=$(git rev-parse --verify HEAD) &&
+ test_tick &&
+ git commit --allow-empty --amend -C tagged-old &&
+ git show --pretty="format:%ad %s" "$old" >expected &&
+ git show --pretty="format:%ad %s" HEAD >actual &&
+ diff -u expected actual
+
+'
+
test_done
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 21ac785e3..aaf497e6a 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -89,4 +89,69 @@ test_expect_success 'verbose' '
'
+test_expect_success 'cleanup commit messages (verbatim,-t)' '
+
+ echo >>negative &&
+ { echo;echo "# text";echo; } >expect &&
+ git commit --cleanup=verbatim -t expect -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual &&
+ diff -u expect actual
+
+'
+
+test_expect_success 'cleanup commit messages (verbatim,-F)' '
+
+ echo >>negative &&
+ git commit --cleanup=verbatim -F expect -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
+ diff -u expect actual
+
+'
+
+test_expect_success 'cleanup commit messages (verbatim,-m)' '
+
+ echo >>negative &&
+ git commit --cleanup=verbatim -m "$(cat expect)" -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
+ diff -u expect actual
+
+'
+
+test_expect_success 'cleanup commit messages (whitespace,-F)' '
+
+ echo >>negative &&
+ { echo;echo "# text";echo; } >text &&
+ echo "# text" >expect &&
+ git commit --cleanup=whitespace -F text -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
+ diff -u expect actual
+
+'
+
+test_expect_success 'cleanup commit messages (strip,-F)' '
+
+ echo >>negative &&
+ { echo;echo "# text";echo sample;echo; } >text &&
+ echo sample >expect &&
+ git commit --cleanup=strip -F text -a &&
+ git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
+ diff -u expect actual
+
+'
+
+echo "sample
+
+# Please enter the commit message for your changes.
+# (Comment lines starting with '#' will not be included)" >expect
+
+test_expect_success 'cleanup commit messages (strip,-F,-e)' '
+
+ echo >>negative &&
+ { echo;echo sample;echo; } >text &&
+ git commit -e -F text -a &&
+ head -n 4 .git/COMMIT_EDITMSG >actual &&
+ diff -u expect actual
+
+'
+
test_done
diff --git a/t/t7503-pre-commit-hook.sh b/t/t7503-pre-commit-hook.sh
index d787cac2f..2dd5a5e30 100755
--- a/t/t7503-pre-commit-hook.sh
+++ b/t/t7503-pre-commit-hook.sh
@@ -52,11 +52,11 @@ cat > "$HOOK" <<EOF
exit 1
EOF
-test_expect_failure 'with failing hook' '
+test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- git commit -m "another"
+ ! git commit -m "another"
'
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 751b11300..eff36aaee 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -98,20 +98,20 @@ cat > "$HOOK" <<EOF
exit 1
EOF
-test_expect_failure 'with failing hook' '
+test_expect_success 'with failing hook' '
echo "another" >> file &&
git add file &&
- git commit -m "another"
+ ! git commit -m "another"
'
-test_expect_failure 'with failing hook (editor)' '
+test_expect_success 'with failing hook (editor)' '
echo "more another" >> file &&
git add file &&
echo "more another" > FAKE_MSG &&
- GIT_EDITOR="$FAKE_EDITOR" git commit
+ ! (GIT_EDITOR="$FAKE_EDITOR" git commit)
'
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 6424c6e2c..50c51c82f 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -371,7 +371,7 @@ test_expect_success 'override config option -n' '
git merge --summary c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2 &&
- if ! grep -e "^ file | \+2 +-$" diffstat.txt
+ if ! grep -e "^ file | *2 +-$" diffstat.txt
then
echo "[OOPS] diffstat was not generated"
fi
@@ -386,7 +386,7 @@ test_expect_success 'override config option --summary' '
git merge -n c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2 &&
- if grep -e "^ file | \+2 +-$" diffstat.txt
+ if grep -e "^ file | *2 +-$" diffstat.txt
then
echo "[OOPS] diffstat was generated"
false
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 659f9c758..08f7c3d8d 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -8,7 +8,7 @@ test_expect_success \
'prepare reference tree' \
'echo "1A quick brown fox jumps over the" >file &&
echo "lazy dog" >>file &&
- git add file
+ git add file &&
GIT_AUTHOR_NAME="A" git commit -a -m "Initial."'
test_expect_success \
@@ -20,9 +20,9 @@ test_expect_success \
echo " echo \"!\$a!\""
echo "done >commandline"
echo "cat > msgtxt"
- ) >fake.sendmail
- chmod +x ./fake.sendmail
- git add fake.sendmail
+ ) >fake.sendmail &&
+ chmod +x ./fake.sendmail &&
+ git add fake.sendmail &&
GIT_AUTHOR_NAME="A" git commit -a -m "Second."'
test_expect_success 'Extract patches' '
@@ -78,4 +78,34 @@ test_expect_success 'Show all headers' '
diff -u expected-show-all-headers actual-show-all-headers
'
+z8=zzzzzzzz
+z64=$z8$z8$z8$z8$z8$z8$z8$z8
+z512=$z64$z64$z64$z64$z64$z64$z64$z64
+test_expect_success 'reject long lines' '
+ rm -f commandline &&
+ cp $patches longline.patch &&
+ echo $z512$z512 >>longline.patch &&
+ ! git send-email \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ $patches longline.patch \
+ 2>errors &&
+ grep longline.patch errors
+'
+
+test_expect_success 'no patch was sent' '
+ ! test -e commandline
+'
+
+test_expect_success 'allow long lines with --no-validate' '
+ git send-email \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ --no-validate \
+ $patches longline.patch \
+ 2>errors
+'
+
test_done
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 614cf50d1..4e24ab3a7 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -56,19 +56,19 @@ test_expect_success "$name" "
name='detect node change from file to directory #1'
-test_expect_failure "$name" "
+test_expect_success "$name" "
mkdir dir/new_file &&
mv dir/file dir/new_file/file &&
mv dir/new_file dir/file &&
git update-index --remove dir/file &&
git update-index --add dir/file/file &&
- git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ git commit -m '$name' &&
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch" || true
name='detect node change from directory to file #1'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -rf dir '$GIT_DIR'/index &&
git checkout -f -b mybranch2 remotes/git-svn &&
mv bar/zzz zzz &&
@@ -77,12 +77,12 @@ test_expect_failure "$name" "
git update-index --remove -- bar/zzz &&
git update-index --add -- bar &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch2" || true
name='detect node change from file to directory #2'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -f '$GIT_DIR'/index &&
git checkout -f -b mybranch3 remotes/git-svn &&
rm bar/zzz &&
@@ -91,12 +91,12 @@ test_expect_failure "$name" "
echo yyy > bar/zzz/yyy &&
git update-index --add bar/zzz/yyy &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch3" || true
name='detect node change from directory to file #2'
-test_expect_failure "$name" "
+test_expect_success "$name" "
rm -f '$GIT_DIR'/index &&
git checkout -f -b mybranch4 remotes/git-svn &&
rm -rf dir &&
@@ -105,7 +105,7 @@ test_expect_failure "$name" "
echo asdf > dir &&
git update-index --add -- dir &&
git commit -m '$name' &&
- git-svn set-tree --find-copies-harder --rmdir \
+ ! git-svn set-tree --find-copies-harder --rmdir \
remotes/git-svn..mybranch4" || true
@@ -213,18 +213,18 @@ EOF
test_expect_success "$name" "git diff a expected"
-test_expect_failure 'exit if remote refs are ambigious' "
+test_expect_success 'exit if remote refs are ambigious' "
git config --add svn-remote.svn.fetch \
bar:refs/remotes/git-svn &&
- git-svn migrate
- "
+ ! git-svn migrate
+"
-test_expect_failure 'exit if init-ing a would clobber a URL' "
+test_expect_success 'exit if init-ing a would clobber a URL' "
svnadmin create ${PWD}/svnrepo2 &&
svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&
git config --unset svn-remote.svn.fetch \
'^bar:refs/remotes/git-svn$' &&
- git-svn init ${svnrepo}2/bar
+ ! git-svn init ${svnrepo}2/bar
"
test_expect_success \
diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh
index 79b7968ea..f74ab1269 100755
--- a/t/t9106-git-svn-commit-diff-clobber.sh
+++ b/t/t9106-git-svn-commit-diff-clobber.sh
@@ -24,11 +24,11 @@ test_expect_success 'commit change from svn side' "
rm -rf t.svn
"
-test_expect_failure 'commit conflicting change from git' "
+test_expect_success 'commit conflicting change from git' "
echo second line from git >> file &&
git commit -a -m 'second line from git' &&
- git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo
- " || true
+ ! git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo
+"
test_expect_success 'commit complementing change from git' "
git reset --hard HEAD~1 &&
@@ -39,7 +39,7 @@ test_expect_success 'commit complementing change from git' "
git-svn commit-diff -r2 HEAD~1 HEAD $svnrepo
"
-test_expect_failure 'dcommit fails to commit because of conflict' "
+test_expect_success 'dcommit fails to commit because of conflict' "
git-svn init $svnrepo &&
git-svn fetch &&
git reset --hard refs/remotes/git-svn &&
@@ -52,8 +52,8 @@ test_expect_failure 'dcommit fails to commit because of conflict' "
rm -rf t.svn &&
echo 'fourth line from git' >> file &&
git commit -a -m 'fourth line from git' &&
- git-svn dcommit
- " || true
+ ! git-svn dcommit
+ "
test_expect_success 'dcommit does the svn equivalent of an index merge' "
git reset --hard refs/remotes/git-svn &&
@@ -76,15 +76,15 @@ test_expect_success 'commit another change from svn side' "
rm -rf t.svn
"
-test_expect_failure 'multiple dcommit from git-svn will not clobber svn' "
+test_expect_success 'multiple dcommit from git-svn will not clobber svn' "
git reset --hard refs/remotes/git-svn &&
echo new file >> new-file &&
git update-index --add new-file &&
git commit -a -m 'new file' &&
echo clobber > file &&
git commit -a -m 'clobber' &&
- git svn dcommit
- " || true
+ ! git svn dcommit
+ "
test_expect_success 'check that rebase really failed' 'test -d .dotest'
diff --git a/t/t9106-git-svn-dcommit-clobber-series.sh b/t/t9106-git-svn-dcommit-clobber-series.sh
index 745254665..ca8a00ed0 100755
--- a/t/t9106-git-svn-dcommit-clobber-series.sh
+++ b/t/t9106-git-svn-dcommit-clobber-series.sh
@@ -54,10 +54,10 @@ test_expect_success 'change file but in unrelated area' "
test x\"\`sed -n -e 61p < file\`\" = x6611
"
-test_expect_failure 'attempt to dcommit with a dirty index' '
+test_expect_success 'attempt to dcommit with a dirty index' '
echo foo >>file &&
git add file &&
- git svn dcommit
+ ! git svn dcommit
'
test_done
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 910c584f2..a15222ced 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -225,7 +225,7 @@ test_expect_success \
! git-cvsexportcommit -c $id
)'
-case "$(git repo-config --bool core.filemode)" in
+case "$(git config --bool core.filemode)" in
false)
;;
*)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 0595041af..cceedbb2b 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -165,9 +165,9 @@ from refs/heads/master
M 755 0000000000000000000000000000000000000001 zero1
INPUT_END
-test_expect_failure \
- 'B: fail on invalid blob sha1' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid blob sha1' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -180,9 +180,9 @@ COMMIT
from refs/heads/master
INPUT_END
-test_expect_failure \
- 'B: fail on invalid branch name ".badbranchname"' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid branch name ".badbranchname"' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -195,9 +195,9 @@ COMMIT
from refs/heads/master
INPUT_END
-test_expect_failure \
- 'B: fail on invalid branch name "bad[branch]name"' \
- 'git-fast-import <input'
+test_expect_success 'B: fail on invalid branch name "bad[branch]name"' '
+ ! git-fast-import <input
+'
rm -f .git/objects/pack_* .git/objects/index_*
cat >input <<INPUT_END
@@ -339,9 +339,9 @@ COMMIT
from refs/heads/branch^0
INPUT_END
-test_expect_failure \
- 'E: rfc2822 date, --date-format=raw' \
- 'git-fast-import --date-format=raw <input'
+test_expect_success 'E: rfc2822 date, --date-format=raw' '
+ ! git-fast-import --date-format=raw <input
+'
test_expect_success \
'E: rfc2822 date, --date-format=rfc2822' \
'git-fast-import --date-format=rfc2822 <input'
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 641303e0a..0a20971eb 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -33,19 +33,28 @@ CVS_SERVER=git-cvsserver
export CVSROOT CVS_SERVER
rm -rf "$CVSWORK" "$SERVERDIR"
-echo >empty &&
+test_expect_success 'setup' '
+ echo >empty &&
git add empty &&
git commit -q -m "First Commit" &&
+ mkdir secondroot &&
+ ( cd secondroot &&
+ git init &&
+ touch secondrootfile &&
+ git add secondrootfile &&
+ git commit -m "second root") &&
+ git pull secondroot master &&
git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
- GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" ||
- exit 1
+ GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log"
+'
# note that cvs doesn't accept absolute pathnames
# as argument to co -d
test_expect_success 'basic checkout' \
'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master &&
- test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"'
+ test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/"
+ test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | tail -n 1))" = "secondrootfile/1.1/"'
#------------------------
# PSERVER AUTHENTICATION
@@ -147,15 +156,19 @@ test_expect_success 'req_Root (strict paths)' \
'cat request-anonymous | git-cvsserver --strict-paths pserver $SERVERDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (strict-paths)' \
- 'cat request-anonymous | git-cvsserver --strict-paths pserver $WORKDIR >log 2>&1'
+test_expect_success 'req_Root failure (strict-paths)' '
+ ! cat request-anonymous |
+ git-cvsserver --strict-paths pserver $WORKDIR >log 2>&1
+'
test_expect_success 'req_Root (w/o strict-paths)' \
'cat request-anonymous | git-cvsserver pserver $WORKDIR/ >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (w/o strict-paths)' \
- 'cat request-anonymous | git-cvsserver pserver $WORKDIR/gitcvs >log 2>&1'
+test_expect_success 'req_Root failure (w/o strict-paths)' '
+ ! cat request-anonymous |
+ git-cvsserver pserver $WORKDIR/gitcvs >log 2>&1
+'
cat >request-base <<EOF
BEGIN AUTH REQUEST
@@ -170,8 +183,10 @@ test_expect_success 'req_Root (base-path)' \
'cat request-base | git-cvsserver --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (base-path)' \
- 'cat request-anonymous | git-cvsserver --strict-paths --base-path $WORKDIR pserver $SERVERDIR >log 2>&1'
+test_expect_success 'req_Root failure (base-path)' '
+ ! cat request-anonymous |
+ git-cvsserver --strict-paths --base-path $WORKDIR pserver $SERVERDIR >log 2>&1
+'
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1
@@ -179,9 +194,8 @@ test_expect_success 'req_Root (export-all)' \
'cat request-anonymous | git-cvsserver --export-all pserver $WORKDIR >log 2>&1 &&
tail -n1 log | grep -q "^I LOVE YOU$"'
-test_expect_failure 'req_Root failure (export-all w/o whitelist)' \
- 'cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 ||
- false'
+test_expect_success 'req_Root failure (export-all w/o whitelist)' \
+ '! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)'
test_expect_success 'req_Root (everything together)' \
'cat request-base | git-cvsserver --export-all --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 &&
@@ -281,15 +295,16 @@ test_expect_success 'cvs update (update existing file)' \
cd "$WORKDIR"
#TODO: cvsserver doesn't support update w/o -d
-test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" \
- 'mkdir test &&
+test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" '
+ mkdir test &&
echo >test/empty &&
git add test &&
git commit -q -m "Single Subdirectory" &&
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
- test ! -d test'
+ test ! -d test
+'
cd "$WORKDIR"
test_expect_success 'cvs update (subdirectories)' \
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 90b6844d0..da47bd7c9 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -139,6 +139,8 @@ fi
test_failure=0
test_count=0
+test_fixed=0
+test_broken=0
trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
@@ -171,6 +173,17 @@ test_failure_ () {
test "$immediate" = "" || { trap - exit; exit 1; }
}
+test_known_broken_ok_ () {
+ test_count=$(expr "$test_count" + 1)
+ test_fixed=$(($test_fixed+1))
+ say_color "" " FIXED $test_count: $@"
+}
+
+test_known_broken_failure_ () {
+ test_count=$(expr "$test_count" + 1)
+ test_broken=$(($test_broken+1))
+ say_color skip " still broken $test_count: $@"
+}
test_debug () {
test "$debug" = "" || eval "$1"
@@ -211,13 +224,13 @@ test_expect_failure () {
error "bug in the test script: not 2 parameters to test-expect-failure"
if ! test_skip "$@"
then
- say >&3 "expecting failure: $2"
+ say >&3 "checking known breakage: $2"
test_run_ "$2"
- if [ "$?" = 0 -a "$eval_ret" != 0 -a "$eval_ret" -lt 129 ]
+ if [ "$?" = 0 -a "$eval_ret" = 0 ]
then
- test_ok_ "$1"
+ test_known_broken_ok_ "$1"
else
- test_failure_ "$@"
+ test_known_broken_failure_ "$1"
fi
fi
echo >&3 ""
@@ -257,7 +270,7 @@ test_expect_code () {
echo >&3 ""
}
-# Most tests can use the created repository, but some amy need to create more.
+# Most tests can use the created repository, but some may need to create more.
# Usage: test_create_repo <directory>
test_create_repo () {
test "$#" = 1 ||
@@ -274,6 +287,18 @@ test_create_repo () {
test_done () {
trap - exit
+
+ if test "$test_fixed" != 0
+ then
+ say_color pass "fixed $test_fixed known breakage(s)"
+ fi
+ if test "$test_broken" != 0
+ then
+ say_color error "still have $test_broken known breakage(s)"
+ msg="remaining $(($test_count-$test_broken)) test(s)"
+ else
+ msg="$test_count test(s)"
+ fi
case "$test_failure" in
0)
# We could:
@@ -284,11 +309,11 @@ test_done () {
# The Makefile provided will clean this test area so
# we will leave things as they are.
- say_color pass "passed all $test_count test(s)"
+ say_color pass "passed all $msg"
exit 0 ;;
*)
- say_color error "failed $test_failure among $test_count test(s)"
+ say_color error "failed $test_failure among $msg"
exit 1 ;;
esac
diff --git a/tag.c b/tag.c
index f62bcdd99..38bf9134f 100644
--- a/tag.c
+++ b/tag.c
@@ -39,6 +39,7 @@ int parse_tag_buffer(struct tag *item, void *data, unsigned long size)
unsigned char sha1[20];
const char *type_line, *tag_line, *sig_line;
char type[20];
+ const char *start = data;
if (item->object.parsed)
return 0;
@@ -53,11 +54,11 @@ int parse_tag_buffer(struct tag *item, void *data, unsigned long size)
if (memcmp("\ntype ", type_line-1, 6))
return -1;
- tag_line = strchr(type_line, '\n');
+ tag_line = memchr(type_line, '\n', size - (type_line - start));
if (!tag_line || memcmp("tag ", ++tag_line, 4))
return -1;
- sig_line = strchr(tag_line, '\n');
+ sig_line = memchr(tag_line, '\n', size - (tag_line - start));
if (!sig_line)
return -1;
sig_line++;
diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit
index 7092bae26..b25dce6bb 100644
--- a/templates/hooks--pre-commit
+++ b/templates/hooks--pre-commit
@@ -61,7 +61,7 @@ perl -e '
if (/^\s* \t/) {
bad_line("indent SP followed by a TAB", $_);
}
- if (/^(?:[<>=]){7}/) {
+ if (/^([<>])\1{6} |^={7}$/) {
bad_line("unresolved merge conflict", $_);
}
}
diff --git a/templates/hooks--update b/templates/hooks--update
index bd93dd197..4b69268fd 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -37,9 +37,9 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
fi
# --- Config
-allowunannotated=$(git-repo-config --bool hooks.allowunannotated)
-allowdeletebranch=$(git-repo-config --bool hooks.allowdeletebranch)
-allowdeletetag=$(git-repo-config --bool hooks.allowdeletetag)
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
diff --git a/test-parse-options.c b/test-parse-options.c
index 4d3e2ec39..eed8a02c6 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -19,6 +19,7 @@ int main(int argc, const char **argv)
OPT_STRING('s', "string", &string, "string", "get a string"),
OPT_STRING(0, "string2", &string, "str", "get another string"),
OPT_STRING(0, "st", &string, "st", "get another string (pervert ordering)"),
+ OPT_STRING('o', NULL, &string, "str", "get another string"),
OPT_END(),
};
int i;
diff --git a/transport.c b/transport.c
index 4e151a9e8..497f85372 100644
--- a/transport.c
+++ b/transport.c
@@ -118,7 +118,7 @@ static void insert_packed_refs(const char *packed_refs, struct ref **list)
if (hexval(buffer[0]) > 0xf)
continue;
len = strlen(buffer);
- if (buffer[len - 1] == '\n')
+ if (len && buffer[len - 1] == '\n')
buffer[--len] = '\0';
if (len < 41)
continue;
@@ -441,11 +441,12 @@ static struct ref *get_refs_via_curl(struct transport *transport)
struct ref *ref = NULL;
struct ref *last_ref = NULL;
+ if (!transport->data)
+ transport->data = get_http_walker(transport->url);
+
refs_url = xmalloc(strlen(transport->url) + 11);
sprintf(refs_url, "%s/info/refs", transport->url);
- http_init();
-
slot = get_active_slot();
slot->results = &results;
curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer);
@@ -473,8 +474,6 @@ static struct ref *get_refs_via_curl(struct transport *transport)
return NULL;
}
- http_cleanup();
-
data = buffer.buf;
start = NULL;
mid = data;
diff --git a/tree-walk.c b/tree-walk.c
index 8d4b67317..142205ddc 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -7,6 +7,9 @@ static const char *get_mode(const char *str, unsigned int *modep)
unsigned char c;
unsigned int mode = 0;
+ if (*str == ' ')
+ return NULL;
+
while ((c = *str++) != ' ') {
if (c < '0' || c > '7')
return NULL;
@@ -16,13 +19,16 @@ static const char *get_mode(const char *str, unsigned int *modep)
return str;
}
-static void decode_tree_entry(struct tree_desc *desc, const void *buf, unsigned long size)
+static void decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned long size)
{
const char *path;
unsigned int mode, len;
+ if (size < 24 || buf[size - 21])
+ die("corrupt tree file");
+
path = get_mode(buf, &mode);
- if (!path)
+ if (!path || !*path)
die("corrupt tree file");
len = strlen(path) + 1;
diff --git a/utf8.c b/utf8.c
index 9efcdb9c0..dc3735364 100644
--- a/utf8.c
+++ b/utf8.c
@@ -3,8 +3,6 @@
/* This code is originally from http://www.cl.cam.ac.uk/~mgk25/ucs/ */
-typedef unsigned int ucs_char_t; /* assuming 32bit int */
-
struct interval {
int first;
int last;
@@ -153,61 +151,98 @@ static int git_wcwidth(ucs_char_t ch)
}
/*
- * This function returns the number of columns occupied by the character
- * pointed to by the variable start. The pointer is updated to point at
- * the next character. If it was not valid UTF-8, the pointer is set to NULL.
+ * Pick one ucs character starting from the location *start points at,
+ * and return it, while updating the *start pointer to point at the
+ * end of that character. When remainder_p is not NULL, the location
+ * holds the number of bytes remaining in the string that we are allowed
+ * to pick from. Otherwise we are allowed to pick up to the NUL that
+ * would eventually appear in the string. *remainder_p is also reduced
+ * by the number of bytes we have consumed.
+ *
+ * If the string was not a valid UTF-8, *start pointer is set to NULL
+ * and the return value is undefined.
*/
-int utf8_width(const char **start)
+ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p)
{
unsigned char *s = (unsigned char *)*start;
ucs_char_t ch;
+ size_t remainder, incr;
- if (*s < 0x80) {
+ /*
+ * A caller that assumes NUL terminated text can choose
+ * not to bother with the remainder length. We will
+ * stop at the first NUL.
+ */
+ remainder = (remainder_p ? *remainder_p : 999);
+
+ if (remainder < 1) {
+ goto invalid;
+ } else if (*s < 0x80) {
/* 0xxxxxxx */
ch = *s;
- *start += 1;
+ incr = 1;
} else if ((s[0] & 0xe0) == 0xc0) {
/* 110XXXXx 10xxxxxx */
- if ((s[1] & 0xc0) != 0x80 ||
- /* overlong? */
- (s[0] & 0xfe) == 0xc0)
+ if (remainder < 2 ||
+ (s[1] & 0xc0) != 0x80 ||
+ (s[0] & 0xfe) == 0xc0)
goto invalid;
ch = ((s[0] & 0x1f) << 6) | (s[1] & 0x3f);
- *start += 2;
+ incr = 2;
} else if ((s[0] & 0xf0) == 0xe0) {
/* 1110XXXX 10Xxxxxx 10xxxxxx */
- if ((s[1] & 0xc0) != 0x80 ||
- (s[2] & 0xc0) != 0x80 ||
- /* overlong? */
- (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) ||
- /* surrogate? */
- (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) ||
- /* U+FFFE or U+FFFF? */
- (s[0] == 0xef && s[1] == 0xbf &&
- (s[2] & 0xfe) == 0xbe))
+ if (remainder < 3 ||
+ (s[1] & 0xc0) != 0x80 ||
+ (s[2] & 0xc0) != 0x80 ||
+ /* overlong? */
+ (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) ||
+ /* surrogate? */
+ (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) ||
+ /* U+FFFE or U+FFFF? */
+ (s[0] == 0xef && s[1] == 0xbf &&
+ (s[2] & 0xfe) == 0xbe))
goto invalid;
ch = ((s[0] & 0x0f) << 12) |
((s[1] & 0x3f) << 6) | (s[2] & 0x3f);
- *start += 3;
+ incr = 3;
} else if ((s[0] & 0xf8) == 0xf0) {
/* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */
- if ((s[1] & 0xc0) != 0x80 ||
- (s[2] & 0xc0) != 0x80 ||
- (s[3] & 0xc0) != 0x80 ||
- /* overlong? */
- (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) ||
- /* > U+10FFFF? */
- (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4)
+ if (remainder < 4 ||
+ (s[1] & 0xc0) != 0x80 ||
+ (s[2] & 0xc0) != 0x80 ||
+ (s[3] & 0xc0) != 0x80 ||
+ /* overlong? */
+ (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) ||
+ /* > U+10FFFF? */
+ (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4)
goto invalid;
ch = ((s[0] & 0x07) << 18) | ((s[1] & 0x3f) << 12) |
((s[2] & 0x3f) << 6) | (s[3] & 0x3f);
- *start += 4;
+ incr = 4;
} else {
invalid:
*start = NULL;
return 0;
}
+ *start += incr;
+ if (remainder_p)
+ *remainder_p = remainder - incr;
+ return ch;
+}
+
+/*
+ * This function returns the number of columns occupied by the character
+ * pointed to by the variable start. The pointer is updated to point at
+ * the next character. When remainder_p is not NULL, it points at the
+ * location that stores the number of remaining bytes we can use to pick
+ * a character (see pick_one_utf8_char() above).
+ */
+int utf8_width(const char **start, size_t *remainder_p)
+{
+ ucs_char_t ch = pick_one_utf8_char(start, remainder_p);
+ if (!*start)
+ return 0;
return git_wcwidth(ch);
}
@@ -218,7 +253,7 @@ int is_utf8(const char *text)
text++;
continue;
}
- utf8_width(&text);
+ utf8_width(&text, NULL);
if (!text)
return 0;
}
@@ -278,7 +313,7 @@ int print_wrapped_text(const char *text, int indent, int indent2, int width)
continue;
}
if (assume_utf8)
- w += utf8_width(&text);
+ w += utf8_width(&text, NULL);
else {
w++;
text++;
diff --git a/utf8.h b/utf8.h
index 15db6f1f2..98cce1b03 100644
--- a/utf8.h
+++ b/utf8.h
@@ -1,7 +1,10 @@
#ifndef GIT_UTF8_H
#define GIT_UTF8_H
-int utf8_width(const char **start);
+typedef unsigned int ucs_char_t; /* assuming 32bit int */
+
+ucs_char_t pick_one_utf8_char(const char **start, size_t *remainder_p);
+int utf8_width(const char **start, size_t *remainder_p);
int is_utf8(const char *text);
int is_encoding_utf8(const char *name);
diff --git a/wt-status.c b/wt-status.c
index c0c247243..bfd1b0fcc 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -402,6 +402,8 @@ int git_status_config(const char *k, const char *v)
}
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
int slot = parse_status_slot(k, 13);
+ if (!v)
+ return config_error_nonbool(k);
color_parse(v, k, wt_status_colors[slot]);
return 0;
}