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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--.mailmap1
-rw-r--r--Documentation/RelNotes-1.6.6.2.txt46
-rw-r--r--Documentation/RelNotes-1.7.0.1.txt35
-rw-r--r--Documentation/RelNotes-1.7.0.2.txt40
-rw-r--r--Documentation/RelNotes-1.7.0.3.txt34
-rw-r--r--Documentation/RelNotes-1.7.0.4.txt19
-rw-r--r--Documentation/RelNotes-1.7.0.txt76
-rw-r--r--Documentation/RelNotes-1.7.1.txt70
-rw-r--r--Documentation/config.txt73
-rw-r--r--Documentation/diff-format.txt2
-rw-r--r--Documentation/diff-generate-patch.txt3
-rw-r--r--Documentation/diff-options.txt4
-rw-r--r--Documentation/fetch-options.txt9
-rw-r--r--Documentation/git-add.txt2
-rw-r--r--Documentation/git-am.txt14
-rw-r--r--Documentation/git-archive.txt8
-rw-r--r--Documentation/git-bisect-lk2009.txt2
-rw-r--r--Documentation/git-branch.txt14
-rw-r--r--Documentation/git-check-ref-format.txt7
-rw-r--r--Documentation/git-clean.txt4
-rw-r--r--Documentation/git-clone.txt18
-rw-r--r--Documentation/git-commit.txt6
-rw-r--r--Documentation/git-cvsimport.txt18
-rw-r--r--Documentation/git-describe.txt3
-rw-r--r--Documentation/git-fast-export.txt2
-rw-r--r--Documentation/git-fast-import.txt21
-rw-r--r--Documentation/git-fetch-pack.txt6
-rw-r--r--Documentation/git-filter-branch.txt2
-rw-r--r--Documentation/git-format-patch.txt11
-rw-r--r--Documentation/git-grep.txt60
-rw-r--r--Documentation/git-hash-object.txt2
-rw-r--r--Documentation/git-http-backend.txt2
-rw-r--r--Documentation/git-imap-send.txt4
-rw-r--r--Documentation/git-index-pack.txt12
-rw-r--r--Documentation/git-init.txt29
-rw-r--r--Documentation/git-log.txt9
-rw-r--r--Documentation/git-ls-files.txt2
-rw-r--r--Documentation/git-mailsplit.txt5
-rw-r--r--Documentation/git-merge-file.txt12
-rw-r--r--Documentation/git-merge.txt178
-rw-r--r--Documentation/git-notes.txt4
-rw-r--r--Documentation/git-pack-objects.txt59
-rw-r--r--Documentation/git-prune.txt2
-rw-r--r--Documentation/git-pull.txt10
-rw-r--r--Documentation/git-push.txt57
-rw-r--r--Documentation/git-read-tree.txt46
-rw-r--r--Documentation/git-reflog.txt2
-rw-r--r--Documentation/git-remote-helpers.txt2
-rw-r--r--Documentation/git-remote.txt17
-rw-r--r--Documentation/git-repack.txt26
-rw-r--r--Documentation/git-reset.txt53
-rw-r--r--Documentation/git-rev-list.txt4
-rw-r--r--Documentation/git-rev-parse.txt34
-rw-r--r--Documentation/git-send-pack.txt4
-rw-r--r--Documentation/git-shortlog.txt2
-rw-r--r--Documentation/git-show-branch.txt16
-rw-r--r--Documentation/git-stash.txt2
-rw-r--r--Documentation/git-submodule.txt2
-rw-r--r--Documentation/git-svn.txt44
-rw-r--r--Documentation/git-var.txt2
-rw-r--r--Documentation/git.txt19
-rw-r--r--Documentation/gitattributes.txt3
-rw-r--r--Documentation/gitdiffcore.txt2
-rw-r--r--Documentation/merge-options.txt2
-rw-r--r--Documentation/rev-list-options.txt43
-rw-r--r--Documentation/technical/api-parse-options.txt12
-rw-r--r--Documentation/technical/api-run-command.txt54
-rw-r--r--Documentation/technical/pack-protocol.txt10
-rw-r--r--Documentation/technical/protocol-capabilities.txt4
-rw-r--r--Documentation/urls.txt6
-rw-r--r--Documentation/user-manual.txt22
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile581
l---------RelNotes2
-rw-r--r--abspath.c5
-rw-r--r--advice.c2
-rw-r--r--advice.h1
-rw-r--r--bisect.c6
-rw-r--r--branch.c45
-rw-r--r--builtin/add.c (renamed from builtin-add.c)38
-rw-r--r--builtin/annotate.c (renamed from builtin-annotate.c)0
-rw-r--r--builtin/apply.c (renamed from builtin-apply.c)187
-rw-r--r--builtin/archive.c (renamed from builtin-archive.c)34
-rw-r--r--builtin/bisect--helper.c (renamed from builtin-bisect--helper.c)0
-rw-r--r--builtin/blame.c (renamed from builtin-blame.c)4
-rw-r--r--builtin/branch.c (renamed from builtin-branch.c)68
-rw-r--r--builtin/bundle.c (renamed from builtin-bundle.c)0
-rw-r--r--builtin/cat-file.c (renamed from builtin-cat-file.c)5
-rw-r--r--builtin/check-attr.c (renamed from builtin-check-attr.c)0
-rw-r--r--builtin/check-ref-format.c (renamed from builtin-check-ref-format.c)0
-rw-r--r--builtin/checkout-index.c (renamed from builtin-checkout-index.c)0
-rw-r--r--builtin/checkout.c (renamed from builtin-checkout.c)42
-rw-r--r--builtin/clean.c (renamed from builtin-clean.c)4
-rw-r--r--builtin/clone.c (renamed from builtin-clone.c)19
-rw-r--r--builtin/commit-tree.c (renamed from builtin-commit-tree.c)2
-rw-r--r--builtin/commit.c (renamed from builtin-commit.c)4
-rw-r--r--builtin/config.c (renamed from builtin-config.c)2
-rw-r--r--builtin/count-objects.c (renamed from builtin-count-objects.c)0
-rw-r--r--builtin/describe.c (renamed from builtin-describe.c)0
-rw-r--r--builtin/diff-files.c (renamed from builtin-diff-files.c)0
-rw-r--r--builtin/diff-index.c (renamed from builtin-diff-index.c)0
-rw-r--r--builtin/diff-tree.c (renamed from builtin-diff-tree.c)18
-rw-r--r--builtin/diff.c (renamed from builtin-diff.c)0
-rw-r--r--builtin/fast-export.c (renamed from builtin-fast-export.c)2
-rw-r--r--builtin/fetch-pack.c (renamed from builtin-fetch-pack.c)7
-rw-r--r--builtin/fetch.c (renamed from builtin-fetch.c)74
-rw-r--r--builtin/fmt-merge-msg.c (renamed from builtin-fmt-merge-msg.c)0
-rw-r--r--builtin/for-each-ref.c (renamed from builtin-for-each-ref.c)77
-rw-r--r--builtin/fsck.c (renamed from builtin-fsck.c)2
-rw-r--r--builtin/gc.c (renamed from builtin-gc.c)0
-rw-r--r--builtin/grep.c (renamed from builtin-grep.c)481
-rw-r--r--builtin/hash-object.c (renamed from builtin-hash-object.c)8
-rw-r--r--builtin/help.c (renamed from builtin-help.c)0
-rw-r--r--builtin/index-pack.c (renamed from builtin-index-pack.c)0
-rw-r--r--builtin/init-db.c (renamed from builtin-init-db.c)23
-rw-r--r--builtin/log.c (renamed from builtin-log.c)151
-rw-r--r--builtin/ls-files.c (renamed from builtin-ls-files.c)0
-rw-r--r--builtin/ls-remote.c (renamed from builtin-ls-remote.c)0
-rw-r--r--builtin/ls-tree.c (renamed from builtin-ls-tree.c)0
-rw-r--r--builtin/mailinfo.c (renamed from builtin-mailinfo.c)3
-rw-r--r--builtin/mailsplit.c (renamed from builtin-mailsplit.c)2
-rw-r--r--builtin/merge-base.c (renamed from builtin-merge-base.c)0
-rw-r--r--builtin/merge-file.c (renamed from builtin-merge-file.c)23
-rw-r--r--builtin/merge-index.c (renamed from builtin-merge-index.c)0
-rw-r--r--builtin/merge-ours.c (renamed from builtin-merge-ours.c)0
-rw-r--r--builtin/merge-recursive.c (renamed from builtin-merge-recursive.c)0
-rw-r--r--builtin/merge-tree.c (renamed from builtin-merge-tree.c)0
-rw-r--r--builtin/merge.c (renamed from builtin-merge.c)0
-rw-r--r--builtin/mktag.c (renamed from builtin-mktag.c)0
-rw-r--r--builtin/mktree.c (renamed from builtin-mktree.c)0
-rw-r--r--builtin/mv.c (renamed from builtin-mv.c)0
-rw-r--r--builtin/name-rev.c (renamed from builtin-name-rev.c)0
-rw-r--r--builtin/notes.c (renamed from builtin-notes.c)15
-rw-r--r--builtin/pack-objects.c (renamed from builtin-pack-objects.c)89
-rw-r--r--builtin/pack-redundant.c (renamed from builtin-pack-redundant.c)0
-rw-r--r--builtin/pack-refs.c (renamed from builtin-pack-refs.c)0
-rw-r--r--builtin/patch-id.c (renamed from builtin-patch-id.c)0
-rw-r--r--builtin/prune-packed.c (renamed from builtin-prune-packed.c)0
-rw-r--r--builtin/prune.c (renamed from builtin-prune.c)27
-rw-r--r--builtin/push.c (renamed from builtin-push.c)21
-rw-r--r--builtin/read-tree.c (renamed from builtin-read-tree.c)36
-rw-r--r--builtin/receive-pack.c (renamed from builtin-receive-pack.c)175
-rw-r--r--builtin/reflog.c (renamed from builtin-reflog.c)6
-rw-r--r--builtin/remote.c (renamed from builtin-remote.c)98
-rw-r--r--builtin/replace.c (renamed from builtin-replace.c)0
-rw-r--r--builtin/rerere.c (renamed from builtin-rerere.c)0
-rw-r--r--builtin/reset.c (renamed from builtin-reset.c)47
-rw-r--r--builtin/rev-list.c (renamed from builtin-rev-list.c)5
-rw-r--r--builtin/rev-parse.c (renamed from builtin-rev-parse.c)11
-rw-r--r--builtin/revert.c (renamed from builtin-revert.c)42
-rw-r--r--builtin/rm.c (renamed from builtin-rm.c)0
-rw-r--r--builtin/send-pack.c (renamed from builtin-send-pack.c)261
-rw-r--r--builtin/shortlog.c (renamed from builtin-shortlog.c)19
-rw-r--r--builtin/show-branch.c (renamed from builtin-show-branch.c)6
-rw-r--r--builtin/show-ref.c (renamed from builtin-show-ref.c)0
-rw-r--r--builtin/stripspace.c (renamed from builtin-stripspace.c)0
-rw-r--r--builtin/symbolic-ref.c (renamed from builtin-symbolic-ref.c)0
-rw-r--r--builtin/tag.c (renamed from builtin-tag.c)0
-rw-r--r--builtin/tar-tree.c (renamed from builtin-tar-tree.c)0
-rw-r--r--builtin/unpack-file.c (renamed from builtin-unpack-file.c)0
-rw-r--r--builtin/unpack-objects.c (renamed from builtin-unpack-objects.c)0
-rw-r--r--builtin/update-index.c (renamed from builtin-update-index.c)0
-rw-r--r--builtin/update-ref.c (renamed from builtin-update-ref.c)0
-rw-r--r--builtin/update-server-info.c (renamed from builtin-update-server-info.c)0
-rw-r--r--builtin/upload-archive.c (renamed from builtin-upload-archive.c)0
-rw-r--r--builtin/var.c (renamed from builtin-var.c)4
-rw-r--r--builtin/verify-pack.c (renamed from builtin-verify-pack.c)0
-rw-r--r--builtin/verify-tag.c (renamed from builtin-verify-tag.c)0
-rw-r--r--builtin/write-tree.c (renamed from builtin-write-tree.c)0
-rw-r--r--cache.h23
-rw-r--r--color.c27
-rw-r--r--color.h27
-rw-r--r--commit.c2
-rw-r--r--compat/mingw.c16
-rw-r--r--compat/mingw.h6
-rw-r--r--compat/mkdtemp.c2
-rw-r--r--compat/mkstemps.c70
-rw-r--r--compat/regex/regex.c2
-rw-r--r--compat/vcbuild/scripts/clink.pl1
-rw-r--r--compat/win32/pthread.c102
-rw-r--r--compat/win32/pthread.h9
-rw-r--r--config.mak.in1
-rw-r--r--configure.ac26
-rw-r--r--connect.c147
-rw-r--r--contrib/buildsystems/engine.pl1
-rwxr-xr-xcontrib/completion/git-completion.bash27
-rwxr-xr-xcontrib/fast-import/git-p49
-rwxr-xr-xcontrib/fast-import/import-directories.perl2
-rw-r--r--convert.c5
-rw-r--r--daemon.c34
-rw-r--r--date.c43
-rw-r--r--diff-lib.c85
-rw-r--r--diff.c88
-rw-r--r--diff.h13
-rw-r--r--diffcore.h3
-rw-r--r--dir.c22
-rw-r--r--environment.c17
-rw-r--r--exec_cmd.c2
-rw-r--r--fast-import.c377
-rwxr-xr-xgit-add--interactive.perl24
-rwxr-xr-xgit-am.sh48
-rw-r--r--git-compat-util.h4
-rwxr-xr-xgit-cvsimport.perl21
-rwxr-xr-xgit-cvsserver.perl2
-rwxr-xr-xgit-difftool.perl12
-rwxr-xr-xgit-filter-branch.sh8
-rw-r--r--git-gui/Makefile7
-rwxr-xr-xgit-gui/git-gui.sh422
-rw-r--r--git-gui/lib/about.tcl37
-rw-r--r--git-gui/lib/blame.tcl22
-rw-r--r--git-gui/lib/branch_checkout.tcl20
-rw-r--r--git-gui/lib/branch_create.tcl45
-rw-r--r--git-gui/lib/branch_delete.tcl24
-rw-r--r--git-gui/lib/branch_rename.tcl32
-rw-r--r--git-gui/lib/browser.tcl41
-rw-r--r--git-gui/lib/choose_font.tcl31
-rw-r--r--git-gui/lib/choose_repository.tcl98
-rw-r--r--git-gui/lib/choose_rev.tcl51
-rw-r--r--git-gui/lib/class.tcl7
-rw-r--r--git-gui/lib/console.tcl17
-rw-r--r--git-gui/lib/database.tcl20
-rw-r--r--git-gui/lib/diff.tcl258
-rw-r--r--git-gui/lib/error.tcl15
-rw-r--r--git-gui/lib/index.tcl39
-rw-r--r--git-gui/lib/merge.tcl14
-rw-r--r--git-gui/lib/option.tcl67
-rw-r--r--git-gui/lib/remote_add.tcl37
-rw-r--r--git-gui/lib/remote_branch_delete.tcl51
-rw-r--r--git-gui/lib/search.tcl11
-rw-r--r--git-gui/lib/shortcut.tcl7
-rw-r--r--git-gui/lib/sshkey.tcl20
-rw-r--r--git-gui/lib/status_bar.tcl14
-rw-r--r--git-gui/lib/themed.tcl174
-rw-r--r--git-gui/lib/tools_dlg.tcl87
-rw-r--r--git-gui/lib/transport.tcl48
-rw-r--r--git-gui/po/de.po824
-rw-r--r--git-gui/po/fr.po686
-rw-r--r--git-gui/po/git-gui.pot584
-rw-r--r--git-gui/po/it.po622
-rw-r--r--git-gui/po/ja.po653
-rw-r--r--git-gui/po/sv.po614
-rwxr-xr-xgit-instaweb.sh2
-rw-r--r--git-mergetool--lib.sh1
-rw-r--r--[-rwxr-xr-x]git-parse-remote.sh0
-rwxr-xr-xgit-pull.sh10
-rwxr-xr-xgit-rebase--interactive.sh21
-rwxr-xr-xgit-rebase.sh6
-rwxr-xr-xgit-request-pull.sh8
-rwxr-xr-xgit-send-email.perl14
-rw-r--r--[-rwxr-xr-x]git-sh-setup.sh22
-rwxr-xr-xgit-stash.sh8
-rwxr-xr-xgit-submodule.sh37
-rwxr-xr-xgit-svn.perl260
-rw-r--r--git.c5
-rw-r--r--git.spec.in8
-rw-r--r--gitk-git/gitk25
-rw-r--r--gitk-git/po/de.po741
-rw-r--r--gitk-git/po/fr.po1254
-rw-r--r--gitk-git/po/hu.po1295
-rw-r--r--gitk-git/po/it.po892
-rw-r--r--gitk-git/po/sv.po673
-rw-r--r--gitweb/Makefile129
-rw-r--r--gitweb/README74
-rw-r--r--gitweb/gitweb.js7
-rwxr-xr-xgitweb/gitweb.perl125
-rw-r--r--graph.c12
-rw-r--r--grep.c197
-rw-r--r--grep.h14
-rw-r--r--help.c2
-rw-r--r--http-fetch.c5
-rw-r--r--http-push.c2
-rw-r--r--http-walker.c21
-rw-r--r--http.c4
-rw-r--r--imap-send.c209
-rw-r--r--levenshtein.h2
-rw-r--r--ll-merge.c55
-rw-r--r--log-tree.c10
-rw-r--r--merge-recursive.c23
-rw-r--r--notes.c6
-rw-r--r--pack-write.c27
-rw-r--r--pack.h1
-rw-r--r--pager.c6
-rw-r--r--parse-options.c16
-rw-r--r--parse-options.h7
-rw-r--r--patch-delta.c3
-rw-r--r--path.c129
-rw-r--r--perl/Git.pm6
-rw-r--r--preload-index.c2
-rw-r--r--quote.c4
-rw-r--r--read-cache.c8
-rw-r--r--refs.c33
-rw-r--r--remote-curl.c28
-rw-r--r--rerere.c11
-rw-r--r--resolve-undo.c4
-rw-r--r--resolve-undo.h2
-rw-r--r--revision.c46
-rw-r--r--revision.h7
-rw-r--r--run-command.c100
-rw-r--r--run-command.h11
-rw-r--r--send-pack.h1
-rw-r--r--setup.c19
-rw-r--r--sha1_file.c62
-rw-r--r--sha1_name.c155
-rw-r--r--submodule.c104
-rw-r--r--submodule.h2
-rw-r--r--t/Makefile2
-rw-r--r--t/diff-lib.sh2
-rw-r--r--t/gitweb-lib.sh1
-rw-r--r--t/lib-httpd.sh29
-rw-r--r--[-rwxr-xr-x]t/lib-patch-mode.sh2
-rwxr-xr-xt/t0001-init.sh19
-rwxr-xr-xt/t0020-crlf.sh55
-rwxr-xr-xt/t0022-crlf-rename.sh2
-rwxr-xr-xt/t0050-filesystem.sh8
-rwxr-xr-xt/t0101-at-syntax.sh45
-rwxr-xr-xt/t1000-read-tree-m-3way.sh3
-rwxr-xr-xt/t1001-read-tree-m-2way.sh2
-rwxr-xr-xt/t1002-read-tree-m-u-2way.sh2
-rwxr-xr-xt/t1007-hash-object.sh18
-rwxr-xr-xt/t1012-read-tree-df.sh102
-rwxr-xr-xt/t1300-repo-config.sh11
-rwxr-xr-xt/t1304-default-acl.sh67
-rwxr-xr-xt/t1410-reflog.sh41
-rwxr-xr-xt/t1411-reflog-show.sh9
-rwxr-xr-xt/t1450-fsck.sh16
-rwxr-xr-xt/t1501-worktree.sh6
-rwxr-xr-xt/t1507-rev-parse-upstream.sh139
-rwxr-xr-xt/t1508-at-combinations.sh51
-rwxr-xr-xt/t1509-root-worktree.sh249
-rw-r--r--t/t1509/excludes14
-rwxr-xr-xt/t1509/prepare-chroot.sh38
-rwxr-xr-xt/t2016-checkout-patch.sh8
-rwxr-xr-xt/t2200-add-update.sh5
-rwxr-xr-xt/t2204-add-ignored.sh79
-rwxr-xr-xt/t3020-ls-files-error-unmatch.sh8
-rwxr-xr-xt/t3100-ls-tree-restrict.sh2
-rwxr-xr-xt/t3101-ls-tree-dirname.sh2
-rwxr-xr-xt/t3200-branch.sh26
-rwxr-xr-xt/t3301-notes.sh1
-rwxr-xr-xt/t3400-rebase.sh4
-rwxr-xr-xt/t3408-rebase-multi-line.sh4
-rwxr-xr-xt/t3417-rebase-whitespace-fix.sh126
-rwxr-xr-xt/t3600-rm.sh8
-rwxr-xr-xt/t3700-add.sh5
-rwxr-xr-xt/t3800-mktag.sh10
-rwxr-xr-xt/t3902-quoted.sh19
-rwxr-xr-xt/t3903-stash.sh9
-rwxr-xr-xt/t4006-diff-mode.sh2
-rwxr-xr-xt/t4012-diff-binary.sh4
-rwxr-xr-xt/t4013-diff-various.sh6
-rw-r--r--t/t4013/diff.log_-m_-p_--first-parent_master100
-rw-r--r--t/t4013/diff.log_-m_-p_master200
-rw-r--r--t/t4013/diff.log_-p_--first-parent_master78
-rw-r--r--t/t4013/diff.show_--first-parent_master30
-rw-r--r--t/t4013/diff.show_-c_master36
-rw-r--r--t/t4013/diff.show_-m_master93
-rwxr-xr-xt/t4014-format-patch.sh96
-rwxr-xr-xt/t4017-diff-retval.sh15
-rwxr-xr-xt/t4026-color.sh15
-rwxr-xr-xt/t4027-diff-submodule.sh84
-rwxr-xr-xt/t4038-diff-combined.sh2
-rwxr-xr-xt/t4041-diff-submodule.sh72
-rwxr-xr-xt/t4103-apply-binary.sh36
-rwxr-xr-xt/t4104-apply-boundary.sh9
-rwxr-xr-xt/t4124-apply-ws-rule.sh170
-rwxr-xr-xt/t4125-apply-ws-fuzz.sh4
-rwxr-xr-xt/t4150-am.sh21
-rwxr-xr-xt/t4200-rerere.sh70
-rwxr-xr-xt/t4202-log.sh6
-rwxr-xr-xt/t4253-am-keep-cr-dos.sh96
-rwxr-xr-xt/t5000-tar-tree.sh10
-rw-r--r--t/t5100/msg00152
-rwxr-xr-xt/t5300-pack-object.sh62
-rwxr-xr-xt/t5304-prune.sh32
-rwxr-xr-xt/t5401-update-hooks.sh84
-rwxr-xr-xt/t5407-post-rewrite-hook.sh16
-rwxr-xr-xt/t5505-remote.sh222
-rwxr-xr-xt/t5510-fetch.sh7
-rwxr-xr-xt/t5516-fetch-push.sh50
-rwxr-xr-xt/t5521-pull-options.sh85
-rwxr-xr-xt/t5524-pull-msg.sh35
-rwxr-xr-xt/t5540-http-push.sh3
-rwxr-xr-xt/t5541-http-push.sh30
-rwxr-xr-xt/t5705-clone-2gb.sh2
-rw-r--r--[-rwxr-xr-x]t/t6000lib.sh2
-rwxr-xr-xt/t6012-rev-list-simplify.sh3
-rwxr-xr-xt/t6023-merge-file.sh45
-rwxr-xr-xt/t6030-bisect-porcelain.sh5
-rwxr-xr-xt/t6033-merge-crlf.sh8
-rwxr-xr-xt/t6035-merge-dir-to-symlink.sh2
-rwxr-xr-xt/t6040-tracking-info.sh21
-rwxr-xr-xt/t7002-grep.sh51
-rwxr-xr-xt/t7003-filter-branch.sh39
-rwxr-xr-xt/t7006-pager.sh176
-rwxr-xr-xt/t7006/test-terminal.perl58
-rwxr-xr-xt/t7103-reset-bare.sh25
-rwxr-xr-xt/t7110-reset-merge.sh116
-rwxr-xr-xt/t7111-reset-table.sh8
-rwxr-xr-xt/t7201-co.sh32
-rwxr-xr-xt/t7401-submodule-summary.sh9
-rwxr-xr-xt/t7406-submodule-update.sh24
-rwxr-xr-xt/t7500-commit.sh2
-rwxr-xr-xt/t7506-status-submodule.sh166
-rwxr-xr-xt/t7508-status.sh4
-rwxr-xr-xt/t7800-difftool.sh21
-rwxr-xr-xt/t8003-blame.sh30
-rwxr-xr-xt/t9001-send-email.sh74
-rwxr-xr-xt/t9119-git-svn-info.sh3
-rwxr-xr-xt/t9150-svk-mergetickets.sh1
-rwxr-xr-xt/t9151-svn-mergeinfo.sh18
-rw-r--r--t/t9151/make-svnmerge-dump148
-rw-r--r--t/t9151/svn-mergeinfo.dump1011
-rwxr-xr-xt/t9153-git-svn-rewrite-uuid.sh25
-rw-r--r--t/t9153/svn.dump75
-rwxr-xr-xt/t9154-git-svn-fancy-glob.sh42
-rw-r--r--t/t9154/svn.dump222
-rwxr-xr-xt/t9300-fast-import.sh46
-rwxr-xr-xt/t9350-fast-export.sh71
-rwxr-xr-xt/t9400-git-cvsserver-server.sh42
-rwxr-xr-xt/t9401-git-cvsserver-crlf.sh8
-rwxr-xr-xt/t9500-gitweb-standalone-no-errors.sh18
-rwxr-xr-xt/t9501-gitweb-standalone-http-status.sh37
-rwxr-xr-xt/t9600-cvsimport.sh36
-rw-r--r--t/test-lib.sh24
-rw-r--r--test-chmtime.c2
-rw-r--r--transport-helper.c6
-rw-r--r--transport.c103
-rw-r--r--transport.h33
-rw-r--r--tree-diff.c8
-rw-r--r--tree-walk.c278
-rw-r--r--unpack-trees.c389
-rw-r--r--unpack-trees.h3
-rw-r--r--upload-pack.c7
-rw-r--r--utf8.c61
-rw-r--r--utf8.h1
-rw-r--r--walker.h2
-rw-r--r--wrap-for-bin.sh10
-rw-r--r--wrapper.c35
-rw-r--r--wt-status.c72
-rw-r--r--wt-status.h2
-rw-r--r--xdiff-interface.c17
-rw-r--r--xdiff-interface.h1
-rw-r--r--xdiff/xdiff.h12
-rw-r--r--xdiff/xmerge.c32
445 files changed, 18773 insertions, 6381 deletions
diff --git a/.gitignore b/.gitignore
index 83cf1b7532..7b3acb7664 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,6 +166,7 @@
/test-match-trees
/test-parse-options
/test-path-utils
+/test-run-command
/test-sha1
/test-sigchain
/common-cmds.h
@@ -176,6 +177,7 @@
*.exe
*.[aos]
*.py[co]
+*.o.d
*+
/config.mak
/autom4te.cache
diff --git a/.mailmap b/.mailmap
index 975e6758ef..88bd01e16d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -36,6 +36,7 @@ Li Hong <leehong@pku.edu.cn>
Lukas Sandström <lukass@etek.chalmers.se>
Martin Langhoff <martin@catalyst.net.nz>
Michael Coleman <tutufan@gmail.com>
+Michael J Gruber <git@drmicha.warpmail.net> <michaeljgruber+gmane@fastmail.fm>
Michael W. Olson <mwolson@gnu.org>
Michele Ballabio <barra_cuda@katamail.com>
Nanako Shiraishi <nanako3@bluebottle.com>
diff --git a/Documentation/RelNotes-1.6.6.2.txt b/Documentation/RelNotes-1.6.6.2.txt
new file mode 100644
index 0000000000..4eaddc0106
--- /dev/null
+++ b/Documentation/RelNotes-1.6.6.2.txt
@@ -0,0 +1,46 @@
+Git v1.6.6.2 Release Notes
+==========================
+
+Fixes since v1.6.6.1
+--------------------
+
+ * recursive merge didn't correctly diagnose its own programming errors,
+ and instead caused the caller to segfault.
+
+ * The new "smart http" aware clients probed the web servers to see if
+ they support smart http, but did not fall back to dumb http transport
+ correctly with some servers.
+
+ * Time based reflog syntax e.g. "@{yesterday}" didn't diagnose a misspelled
+ time specification and instead assumed "@{now}".
+
+ * "git archive HEAD -- no-such-directory" produced an empty archive
+ without complaining.
+
+ * "git blame -L start,end -- file" misbehaved when given a start that is
+ larger than the number of lines in the file.
+
+ * "git checkout -m" didn't correctly call custom merge backend supplied
+ by the end user.
+
+ * "git config -f <file>" misbehaved when run from a subdirectory.
+
+ * "git cvsserver" didn't like having regex metacharacters (e.g. '+') in
+ CVSROOT environment.
+
+ * "git fast-import" did not correctly handle large blobs that may
+ bust the pack size limit.
+
+ * "git gui" is supposed to work even when launched from inside a .git
+ directory.
+
+ * "git gui" misbehaved when applying a hunk that ends with deletion.
+
+ * "git imap-send" did not honor imap.preformattedHTML as documented.
+
+ * "git log" family incorrectly showed the commit notes unconditionally by
+ mistake, which was especially irritating when running "git log --oneline".
+
+ * "git status" shouldn't require an write access to the repository.
+
+Other minor documentation updates are included.
diff --git a/Documentation/RelNotes-1.7.0.1.txt b/Documentation/RelNotes-1.7.0.1.txt
new file mode 100644
index 0000000000..8ff5bcada8
--- /dev/null
+++ b/Documentation/RelNotes-1.7.0.1.txt
@@ -0,0 +1,35 @@
+Git v1.7.0.1 Release Notes
+==========================
+
+Fixes since v1.7.0
+------------------
+
+ * In a freshly created repository "rev-parse HEAD^0" complained that
+ it is dangling symref, even though "rev-parse HEAD" didn't.
+
+ * "git show :no-such-name" tried to access the index without bounds
+ check, leading to a potential segfault.
+
+ * Message from "git cherry-pick" was harder to read and use than necessary
+ when it stopped due to conflicting changes.
+
+ * We referred to ".git/refs/" throughout the documentation when we
+ meant to talk about abstract notion of "ref namespace". Because
+ people's repositories often have packed refs these days, this was
+ confusing.
+
+ * "git diff --output=/path/that/cannot/be/written" did not correctly
+ error out.
+
+ * "git grep -e -pattern-that-begin-with-dash paths..." could not be
+ spelled as "git grep -- -pattern-that-begin-with-dash paths..." which
+ would be a GNU way to use "--" as "end of options".
+
+ * "git grep" compiled with threading support tried to access an
+ uninitialized mutex on boxes with a single CPU.
+
+ * "git stash pop -q --index" failed because the unnecessary --index
+ option was propagated to "git stash drop" that is internally run at the
+ end.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes-1.7.0.2.txt b/Documentation/RelNotes-1.7.0.2.txt
new file mode 100644
index 0000000000..fcb46ca6a4
--- /dev/null
+++ b/Documentation/RelNotes-1.7.0.2.txt
@@ -0,0 +1,40 @@
+Git v1.7.0.2 Release Notes
+==========================
+
+Fixes since v1.7.0.1
+--------------------
+
+ * GIT_PAGER was not honored consistently by some scripted Porcelains, most
+ notably "git am".
+
+ * updating working tree files after telling git to add them to the
+ index and while it is still working created garbage object files in
+ the repository without diagnosing it as an error.
+
+ * "git bisect -- pathspec..." did not diagnose an error condition properly when
+ the simplification with given pathspec made the history empty.
+
+ * "git rev-list --cherry-pick A...B" now has an obvious optimization when the
+ histories haven't diverged (i.e. when one end is an ancestor of the other).
+
+ * "git diff --quiet -w" did not work as expected.
+
+ * "git fast-import" didn't work with a large input, as it lacked support
+ for producing the pack index in v2 format.
+
+ * "git imap-send" didn't use CRLF line endings over the imap protocol
+ when storing its payload to the draft box, violating RFC 3501.
+
+ * "git log --format='%w(x,y,z)%b'" and friends that rewrap message
+ has been optimized for utf-8 payload.
+
+ * Error messages generated on the receiving end did not come back to "git
+ push".
+
+ * "git status" in 1.7.0 lacked the optimization we used to have in 1.6.X series
+ to speed up scanning of large working tree.
+
+ * "gitweb" did not diagnose parsing errors properly while reading tis configuration
+ file.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes-1.7.0.3.txt b/Documentation/RelNotes-1.7.0.3.txt
new file mode 100644
index 0000000000..3b355737c0
--- /dev/null
+++ b/Documentation/RelNotes-1.7.0.3.txt
@@ -0,0 +1,34 @@
+Git v1.7.0.3 Release Notes
+==========================
+
+Fixes since v1.7.0.2
+--------------------
+
+ * Object files are created in a more ACL friendly way in repositories
+ where group permission is ACL controlled.
+
+ * "git add -i" didn't handle a deleted path very well.
+
+ * "git blame" padded line numbers with one extra SP when the total number
+ of lines was one less than multiple of ten due to an off-by-one error.
+
+ * "git fetch --all/--multi" used to discard information for remotes that
+ are fetched earlier.
+
+ * "git log --author=me --grep=it" tried to find commits that have "it"
+ or are written by "me", instead of the ones that have "it" _and_ are
+ written by "me".
+
+ * "git log -g branch" misbehaved when there was no entries in the reflog
+ for the named branch.
+
+ * "git mailinfo" (hence "git am") incorrectly removed initial indent from
+ paragraphs.
+
+ * "git prune" and "git reflog" (hence "git gc" as well) didn't honor
+ an instruction never to expire by setting gc.reflogexpire to never.
+
+ * "git push" misbehaved when branch.<name>.merge was configured without
+ matching branch.<name>.remote.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes-1.7.0.4.txt b/Documentation/RelNotes-1.7.0.4.txt
new file mode 100644
index 0000000000..cbc94a2f08
--- /dev/null
+++ b/Documentation/RelNotes-1.7.0.4.txt
@@ -0,0 +1,19 @@
+Git v1.7.0.4 Release Notes (draft)
+==================================
+
+Fixes since v1.7.0.3
+--------------------
+
+ * Color values given to "color.<cmd>.<slot>" configuration can now have
+ more than one attributes (e.g. "bold ul").
+
+ * "git add -u nonexistent-path" did not complain.
+
+ * "git apply --whitespace=fix" didn't work well when an early patch in
+ a patch series adds trailing blank lines and a later one depended on
+ such a block of blank lines at the end.
+
+ * "git fast-export" didn't check error status and stop when marks file
+ cannot be opened.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes-1.7.0.txt b/Documentation/RelNotes-1.7.0.txt
index a3d0395f54..43e3f33615 100644
--- a/Documentation/RelNotes-1.7.0.txt
+++ b/Documentation/RelNotes-1.7.0.txt
@@ -4,7 +4,7 @@ Git v1.7.0 Release Notes
Notes on behaviour change
-------------------------
- * "git push" into a branch that is currently checked out (i.e. pointed by
+ * "git push" into a branch that is currently checked out (i.e. pointed at by
HEAD in a repository that is not bare) is refused by default.
Similarly, "git push $there :$killed" to delete the branch $killed
@@ -19,18 +19,18 @@ Notes on behaviour change
patch series with more than two messages. All messages will be sent
as a reply to the first message, i.e. cover letter.
- It has been possible to configure send-email to send "shallow thread"
+ It has been possible already to configure send-email to send "shallow thread"
by setting sendemail.chainreplyto configuration variable to false. The
only thing this release does is to change the default when you haven't
configured that variable.
* "git status" is not "git commit --dry-run" anymore. This change does
- not affect you if you run the command without pathspec.
+ not affect you if you run the command without argument.
* "git diff" traditionally treated various "ignore whitespace" options
only as a way to filter the patch output. "git diff --exit-code -b"
exited with non-zero status even if all changes were about changing the
- ammount of whitespace and nothing else. and "git diff -b" showed the
+ amount of whitespace and nothing else; and "git diff -b" showed the
"diff --git" header line for such a change without patch text.
In this release, the "ignore whitespaces" options affect the semantics
@@ -38,6 +38,19 @@ Notes on behaviour change
whitespaces is reported with zero exit status when run with
--exit-code, and there is no "diff --git" header for such a change.
+ * External diff and textconv helpers are now executed using the shell.
+ This makes them consistent with other programs executed by git, and
+ allows you to pass command-line parameters to the helpers. Any helper
+ paths containing spaces or other metacharacters now need to be
+ shell-quoted. The affected helpers are GIT_EXTERNAL_DIFF in the
+ environment, and diff.*.command and diff.*.textconv in the config
+ file.
+
+ * The --max-pack-size argument to 'git repack', 'git pack-objects', and
+ 'git fast-import' was assuming the provided size to be expressed in MiB,
+ unlike the corresponding config variable and other similar options accepting
+ a size value. It is now expecting a size expressed in bytes, with a possible
+ unit suffix of 'k', 'm', or 'g'.
Updates since v1.6.6
--------------------
@@ -48,6 +61,12 @@ Updates since v1.6.6
mismatch between fast-import and the frontends that produce the input
stream.
+ * "git svn" support of subversion "merge tickets" and miscellaneous fixes.
+
+ * "gitk" and "git gui" translation updates.
+
+ * "gitweb" updates (code clean-up, load checking etc.)
+
(portability)
* Some more MSVC portability patches for msysgit port.
@@ -82,6 +101,16 @@ Updates since v1.6.6
contents (e.g. git-merge documentation) have strings that resemble the
conflict markers.
+ * A new syntax "<branch>@{upstream}" can be used on the command line to
+ substitute the name of the "upstream" of the branch. Missing branch
+ defaults to the current branch, so "git fetch && git merge @{upstream}"
+ will be equivalent to "git pull".
+
+ * "git am --resolved" has a synonym "git am --continue".
+
+ * "git branch --set-upstream" can be used to update the (surprise!) upstream,
+ i.e. where the branch is supposed to pull and merge from (or rebase onto).
+
* "git checkout A...B" is a way to detach HEAD at the merge base between
A and B.
@@ -105,10 +134,13 @@ Updates since v1.6.6
* "git fetch --all" can now be used in place of "git remote update".
- * "git grep" does not rely on external grep anymore.
+ * "git grep" does not rely on external grep anymore. It can use more than
+ one thread to accelerate the operation.
+
+ * "git grep" learned "--quiet" option.
- * "git grep" learned "--no-index" option, to search inside contents that
- are not managed by git.
+ * "git log" and friends learned "--glob=heads/*" syntax that is a more
+ flexible way to complement "--branches/--tags/--remotes".
* "git merge" learned to pass options specific to strategy-backends. E.g.
@@ -129,12 +161,15 @@ Updates since v1.6.6
* "git rebase --onto A...B" means the history is replayed on top of the
merge base between A and B.
- * "git rebase -i" learned new action "fixup", that squashes the change
+ * "git rebase -i" learned new action "fixup" that squashes the change
but does not affect existing log message.
- * "git rebase -i" also learned --autosquash option, that is useful
+ * "git rebase -i" also learned --autosquash option that is useful
together with the new "fixup" action.
+ * "git remote" learned set-url subcommand that updates (surprise!) url
+ for an existing remote nickname.
+
* "git rerere" learned "forget path" subcommand. Together with "git
checkout -m path" it will be useful when you recorded a wrong
resolution.
@@ -152,6 +187,10 @@ Updates since v1.6.6
* The infrastructure to build foreign SCM interface has been updated.
+ * Many more commands are now built-in.
+
+ * THREADED_DELTA_SEARCH is no more. If you build with threads, delta
+ compression will always take advantage of it.
Fixes since v1.6.6
------------------
@@ -159,8 +198,17 @@ Fixes since v1.6.6
All of the fixes in v1.6.6.X maintenance series are included in this
release, unless otherwise noted.
---
-exec >/var/tmp/1
-O=v1.6.6.1-379-gd4556c4
-echo O=$(git describe master)
-git shortlog --no-merges $O..master ^maint
+ * "git branch -d branch" used to refuse deleting the branch even when
+ the branch is fully merged to its upstream branch if it is not merged
+ to the current branch. It now deletes it in such a case.
+
+ * "fiter-branch" command incorrectly said --prune-empty and --filter-commit
+ were incompatible; the latter should be read as --commit-filter.
+
+ * When using "git status" or asking "git diff" to compare the work tree
+ with something, they used to consider that a checked-out submodule with
+ uncommitted changes is not modified; this could cause people to forget
+ committing these changes in the submodule before committing in the
+ superproject. They now consider such a change as a modification and
+ "git diff" will append a "-dirty" to the work tree side when generating
+ patch output or when used with the --submodule option.
diff --git a/Documentation/RelNotes-1.7.1.txt b/Documentation/RelNotes-1.7.1.txt
new file mode 100644
index 0000000000..750d40f34a
--- /dev/null
+++ b/Documentation/RelNotes-1.7.1.txt
@@ -0,0 +1,70 @@
+Git v1.7.1 Release Notes (draft)
+================================
+
+Updates since v1.7.0
+--------------------
+
+ * Some commands (e.g. svn and http interfaces) that interactively ask
+ password can be told to use an external program given via GIT_ASKPASS.
+
+ * Color values given to "color.<cmd>.<slot>" configuration can now have
+ more than one attributes (e.g. "bold ul").
+
+ * "git apply --whitespace=fix" didn't work well when an early patch in
+ a patch series adds trailing blank lines and a later one depended on
+ such a block of blank lines at the end.
+
+ * "git am" learned "--keep-cr" option to handle inputs that are
+ mixture of changes to files with and without CRLF line endings.
+
+ * "git cvsimport" learned -R option to leave revision mapping between
+ CVS revisions and resulting git commits.
+
+ * "git for-each-ref" learned %(symref), %(symref:short) and %(flag)
+ tokens.
+
+ * "git hash-object --stdin-paths" can take "--no-filters" option now.
+
+ * "git init" can be told to look at init.templatedir configuration
+ variable (obviously that has to come from either /etc/gitconfig or
+ $HOME/.gitconfig).
+
+ * "git grep" learned "--no-index" option, to search inside contents that
+ are not managed by git.
+
+ * "git grep" learned --color=auto/always/never.
+
+ * "git grep" learned to paint filename and line-number in colors.
+
+ * "git merge-file" learned to use custom conflict marker size and also use
+ the "union merge" behaviour.
+
+ * "git notes" command has been rewritten in C and learned quite a
+ many commands.
+
+ * "git request-pull" identifies the commit the request is relative to in
+ a more readable way.
+
+ * "git reset" learned "--keep" option that lets you discard commits
+ near the tip while preserving your local changes in a way similar
+ to how "git checkout branch" does.
+
+ * "git svn" should work better when interacting with repositories
+ with CRLF line endings.
+
+ * "git imap-send" learned to support CRAM-MD5 authentication.
+
+Fixes since v1.7.0
+------------------
+
+All of the fixes in v1.7.0.X maintenance series are included in this
+release, unless otherwise noted.
+
+ * "git add frotz/nitfol" did not complain when the entire frotz/ directory
+ was ignored.
+
+---
+exec >/var/tmp/1
+echo O=$(git describe)
+O=v1.7.0.2-323-g0d0925c
+git shortlog --no-merges ^maint $O..
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2e02f1b075..06b2f827b4 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -138,6 +138,11 @@ advice.*::
Advice on how to set your identity configuration when
your information is guessed from the system username and
domain name. Default: true.
+
+ detachedHead::
+ Advice shown when you used linkgit::git-checkout[1] to
+ move to the detach HEAD state, to instruct how to create
+ a local branch after the fact. Default: true.
--
core.fileMode::
@@ -417,6 +422,20 @@ You probably do not need to adjust this value.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.
+core.bigFileThreshold::
+ Files larger than this size are stored deflated, without
+ attempting delta compression. Storing large files without
+ delta compression avoids excessive memory usage, at the
+ slight expense of increased disk usage.
++
+Default is 512 MiB on all platforms. This should be reasonable
+for most projects as source code and other text files can still
+be delta compressed, but larger binary media files won't be.
++
+Common unit suffixes of 'k', 'm', or 'g' are supported.
++
+Currently only linkgit:git-fast-import[1] honors this setting.
+
core.excludesfile::
In addition to '.gitignore' (per-directory) and
'.git/info/exclude', git looks into this file for patterns
@@ -538,6 +557,13 @@ it will be treated as a shell command. For example, defining
executed from the top-level directory of a repository, which may
not necessarily be the current directory.
+am.keepcr::
+ If true, git-am will call git-mailsplit for patches in mbox format
+ with parameter '--keep-cr'. In this case git-mailsplit will
+ not remove `\r` from lines ending with `\r\n`. Can be overrriden
+ by giving '--no-keep-cr' from the command line.
+ See linkgit:git-am[1], linkgit:git-mailsplit[1].
+
apply.ignorewhitespace::
When set to 'change', tells 'git apply' to ignore changes in
whitespace, in the same way as the '--ignore-space-change'
@@ -666,11 +692,29 @@ color.grep::
`never`), never. When set to `true` or `auto`, use color only
when the output is written to the terminal. Defaults to `false`.
-color.grep.match::
- Use customized color for matches. The value of this variable
- may be specified as in color.branch.<slot>. It is passed using
- the environment variables 'GREP_COLOR' and 'GREP_COLORS' when
- calling an external 'grep'.
+color.grep.<slot>::
+ Use customized color for grep colorization. `<slot>` specifies which
+ part of the line to use the specified color, and is one of
++
+--
+`context`;;
+ non-matching text in context lines (when using `-A`, `-B`, or `-C`)
+`filename`;;
+ filename prefix (when not using `-h`)
+`function`;;
+ function name lines (when using `-p`)
+`linenumber`;;
+ line number prefix (when using `-n`)
+`match`;;
+ matching text
+`selected`;;
+ non-matching text in selected lines
+`separator`;;
+ separators between fields on a line (`:`, `-`, and `=`)
+ and between hunks (`--`)
+--
++
+The values of these variables may be specified as in color.branch.<slot>.
color.interactive::
When set to `always`, always use colors for interactive prompts
@@ -718,7 +762,7 @@ color.ui::
terminal. When more specific variables of color.* are set, they always
take precedence over this setting. Defaults to false.
-commit.status
+commit.status::
A boolean to enable/disable inclusion of status information in the
commit message template when using an editor to prepare the commit
message. Defaults to true.
@@ -1188,6 +1232,10 @@ imap::
The configuration variables in the 'imap' section are described
in linkgit:git-imap-send[1].
+init.templatedir::
+ Specify the directory from which templates will be copied.
+ (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
+
instaweb.browser::
Specify the program that will be used to browse your working
repository in gitweb. See linkgit:git-instaweb[1].
@@ -1403,10 +1451,13 @@ you can use linkgit:git-index-pack[1] on the *.pack file to regenerate
the `{asterisk}.idx` file.
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].
+ The maximum size of a pack. This setting only affects
+ packing to a file when repacking, i.e. the git:// protocol
+ is unaffected. It can be overridden by the `\--max-pack-size`
+ option of linkgit:git-repack[1]. The minimum size allowed is
+ limited to 1 MiB. The default is unlimited.
+ Common unit suffixes of 'k', 'm', or 'g' are
+ supported.
pager.<cmd>::
Allows turning on or off pagination of the output of a
@@ -1471,7 +1522,7 @@ receive.denyCurrentBranch::
out of sync with the index and working tree. If set to "warn",
print a warning of such a push to stderr, but allow the push to
proceed. If set to false or "ignore", allow such pushes with no
- message. Defaults to "warn".
+ message. Defaults to "refuse".
receive.denyNonFastForwards::
If set to true, git-receive-pack will deny a ref update which is
diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index b71712473e..15c7e794f4 100644
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -19,7 +19,7 @@ git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>...]::
git-diff-files [<pattern>...]::
compares the index and the files on the filesystem.
-The "git-diff-tree" command begins its ouput by printing the hash of
+The "git-diff-tree" command begins its output by printing the hash of
what is being compared. After that, all the commands print one output
line per changed file.
diff --git a/Documentation/diff-generate-patch.txt b/Documentation/diff-generate-patch.txt
index 0f25ba7e38..8f9a2412fd 100644
--- a/Documentation/diff-generate-patch.txt
+++ b/Documentation/diff-generate-patch.txt
@@ -56,7 +56,8 @@ combined diff format
"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
'--cc' option to produce 'combined diff'. For showing a merge commit
-with "git log -p", this is the default format.
+with "git log -p", this is the default format; you can force showing
+full diff with the '-m' option.
A 'combined diff' format looks like this:
------------
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 8707d0e740..60e922e6ef 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -117,12 +117,14 @@ any of those replacements occurred.
option and lists the commits in that commit range like the 'summary'
option of linkgit:git-submodule[1] does.
---color::
+--color[=<when>]::
Show colored diff.
+ The value must be always (the default), never, or auto.
--no-color::
Turn off colored diff, even when the configuration file
gives the default to color output.
+ Same as `--color=never`.
--color-words[=<regex>]::
Show colored word diff, i.e., color words which have changed.
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index fe716b2e42..044ec882cc 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -78,9 +78,16 @@ ifndef::git-pull[]
-q::
--quiet::
Pass --quiet to git-fetch-pack and silence any other internally
- used git commands.
+ used git commands. Progress is not reported to the standard error
+ stream.
-v::
--verbose::
Be verbose.
endif::git-pull[]
+
+--progress::
+ Progress status is reported on the standard error stream
+ by default when it is attached to a terminal, unless -q
+ is specified. This flag forces progress status even if the
+ standard error stream is not directed to a terminal.
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index f74fcf3737..51cbeb7032 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -153,7 +153,7 @@ EXAMPLES
and its subdirectories:
+
------------
-$ git add Documentation/\\*.txt
+$ git add Documentation/\*.txt
------------
+
Note that the asterisk `\*` is quoted from the shell in this
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index c3e4f12c44..9e62f8778f 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -9,13 +9,13 @@ git-am - Apply a series of patches from a mailbox
SYNOPSIS
--------
[verse]
-'git am' [--signoff] [--keep] [--utf8 | --no-utf8]
+'git am' [--signoff] [--keep] [--keep-cr | --no-keep-cr] [--utf8 | --no-utf8]
[--3way] [--interactive] [--committer-date-is-author-date]
[--ignore-date] [--ignore-space-change | --ignore-whitespace]
[--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
[--reject] [-q | --quiet] [--scissors | --no-scissors]
[<mbox> | <Maildir>...]
-'git am' (--skip | --resolved | --abort)
+'git am' (--continue | --skip | --abort)
DESCRIPTION
-----------
@@ -39,12 +39,19 @@ OPTIONS
--keep::
Pass `-k` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
+--keep-cr::
+--no-keep-cr::
+ With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])
+ with the same option, to prevent it from stripping CR at the end of
+ lines. `am.keepcr` configuration variable can be used to specify the
+ default behaviour. `--no-keep-cr` is useful to override `am.keepcr`.
+
-c::
--scissors::
Remove everything in body before a scissors line (see
linkgit:git-mailinfo[1]).
----no-scissors::
+--no-scissors::
Ignore scissors lines (see linkgit:git-mailinfo[1]).
-q::
@@ -107,6 +114,7 @@ default. You can use `--no-utf8` to override this.
Skip the current patch. This is only meaningful when
restarting an aborted patch.
+--continue::
-r::
--resolved::
After a patch failure (e.g. attempting to apply
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 799c8b64bd..8d3e66626f 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -112,6 +112,14 @@ export-subst::
expand several placeholders when adding this file to an archive.
See linkgit:gitattributes[5] for details.
+Note that attributes are by default taken from the `.gitattributes` files
+in the tree that is being archived. If you want to tweak the way the
+output is generated after the fact (e.g. you committed without adding an
+appropriate export-ignore in its `.gitattributes`), adjust the checked out
+`.gitattributes` file as necessary and use `--work-tree-attributes`
+option. Alternatively you can keep necessary attributes that should apply
+while archiving any tree in your `$GIT_DIR/info/attributes` file.
+
EXAMPLES
--------
git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)::
diff --git a/Documentation/git-bisect-lk2009.txt b/Documentation/git-bisect-lk2009.txt
index 6b7b2e5497..86b3015c13 100644
--- a/Documentation/git-bisect-lk2009.txt
+++ b/Documentation/git-bisect-lk2009.txt
@@ -799,7 +799,7 @@ fixed in the "main" branch by commit "F"?
The result of such a bisection would be that we would find that H is
the first bad commit, when in fact it's B. So that would be wrong!
-And yes it's can happen in practice that people working on one branch
+And yes it can happen in practice that people working on one branch
are not aware that people working on another branch fixed a bug! It
could also happen that F fixed more than one bug or that it is a
revert of some big development effort that was not ready to be
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 44144d5a0d..903a690f10 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -8,10 +8,10 @@ git-branch - List, create, or delete branches
SYNOPSIS
--------
[verse]
-'git branch' [--color | --no-color] [-r | -a]
+'git branch' [--color[=<when>] | --no-color] [-r | -a]
[-v [--abbrev=<length> | --no-abbrev]]
[(--merged | --no-merged | --contains) [<commit>]]
-'git branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>]
+'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (-m | -M) [<oldbranch>] <newbranch>
'git branch' (-d | -D) [-r] <branchname>...
@@ -84,12 +84,14 @@ OPTIONS
-M::
Move/rename a branch even if the new branch name already exists.
---color::
+--color[=<when>]::
Color branches to highlight current, local, and remote branches.
+ The value must be always (the default), never, or auto.
--no-color::
Turn off branch colors, even when the configuration file gives the
default to color output.
+ Same as `--color=never`.
-r::
List or delete (if used with -d) the remote-tracking branches.
@@ -129,6 +131,12 @@ start-point is either a local or remote branch.
Do not set up "upstream" configuration, even if the
branch.autosetupmerge configuration variable is true.
+--set-upstream::
+ If specified branch does not exist yet or if '--force' has been
+ given, acts exactly like '--track'. Otherwise sets up configuration
+ like '--track' would when creating the branch, except that where
+ branch points to is not changed.
+
--contains <commit>::
Only list branches which contain the specified commit.
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index d9a3326f58..379eee6734 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -19,8 +19,9 @@ status if it is not.
A reference is used in git to specify branches and tags. A
branch head is stored under the `$GIT_DIR/refs/heads` directory, and
-a tag is stored under the `$GIT_DIR/refs/tags` directory. git
-imposes the following rules on how references are named:
+a tag is stored under the `$GIT_DIR/refs/tags` directory (or, if refs
+are packed by `git gc`, as entries in the `$GIT_DIR/packed-refs` file).
+git imposes the following rules on how references are named:
. They can include slash `/` for hierarchical (directory)
grouping, but no slash-separated component can begin with a
@@ -43,7 +44,7 @@ imposes the following rules on how references are named:
. They cannot contain a sequence `@{`.
-- They cannot contain a `\\`.
+. They cannot contain a `\`.
These rules make it easy for shell script based tools to parse
reference names, pathname expansion by the shell when a reference name is used
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 335c885bb7..a81cb6c280 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -33,8 +33,8 @@ OPTIONS
-f::
--force::
- If the git configuration specifies clean.requireForce as true,
- 'git clean' will refuse to run unless given -f or -n.
+ If the git configuration variable clean.requireForce is not set
+ to false, 'git clean' will refuse to run unless given -f or -n.
-n::
--dry-run::
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index f43c8b2c08..dc7d3d17b1 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -29,7 +29,7 @@ arguments will in addition merge the remote master branch into the
current master branch, if any.
This default configuration is achieved by creating references to
-the remote branch heads under `$GIT_DIR/refs/remotes/origin` and
+the remote branch heads under `refs/remotes/origin` and
by initializing `remote.origin.url` and `remote.origin.fetch`
configuration variables.
@@ -102,7 +102,8 @@ objects from the source repository into a pack in the cloned repository.
--verbose::
-v::
- Run verbosely.
+ Run verbosely. Does not affect the reporting of progress status
+ to the standard error stream.
--progress::
Progress status is reported on the standard error stream
@@ -149,8 +150,7 @@ objects from the source repository into a pack in the cloned repository.
--template=<template_directory>::
Specify the directory from which templates will be used;
- if unset the templates are taken from the installation
- defined default, typically `/usr/share/git-core/templates`.
+ (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
--depth <depth>::
Create a 'shallow' clone with a history truncated to the
@@ -187,7 +187,7 @@ include::urls.txt[]
Examples
--------
-Clone from upstream::
+* Clone from upstream:
+
------------
$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
@@ -196,7 +196,7 @@ $ make
------------
-Make a local clone that borrows from the current directory, without checking things out::
+* Make a local clone that borrows from the current directory, without checking things out:
+
------------
$ git clone -l -s -n . ../copy
@@ -205,7 +205,7 @@ $ git show-branch
------------
-Clone from upstream while borrowing from an existing local directory::
+* Clone from upstream while borrowing from an existing local directory:
+
------------
$ git clone --reference my2.6 \
@@ -215,14 +215,14 @@ $ cd my2.7
------------
-Create a bare repository to publish your changes to the public::
+* Create a bare repository to publish your changes to the public:
+
------------
$ git clone --bare -l /home/proj/.git /pub/scm/proj.git
------------
-Create a repository on the kernel.org machine that borrows from Linus::
+* Create a repository on the kernel.org machine that borrows from Linus:
+
------------
$ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index e99bb14754..64fb458b45 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -197,13 +197,13 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
Show untracked files (Default: 'all').
+
The mode parameter is optional, and is used to specify
-the handling of untracked files. The possible options are:
+the handling of untracked files.
++
+The possible options are:
+
---
- 'no' - Show no untracked files
- 'normal' - Shows untracked files and directories
- 'all' - Also shows individual files in untracked directories.
---
+
See linkgit:git-config[1] for configuration variable
used to change the default for when the option is not
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index ddfcb3d143..8bcd875a67 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -13,7 +13,7 @@ SYNOPSIS
[-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>]
[-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>]
[-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>]
- [-r <remote>] [<CVS_module>]
+ [-r <remote>] [-R] [<CVS_module>]
DESCRIPTION
@@ -157,6 +157,22 @@ It is not recommended to use this feature if you intend to
export changes back to CVS again later with
'git cvsexportcommit'.
+-R::
+ Generate a `$GIT_DIR/cvs-revisions` file containing a mapping from CVS
+ revision numbers to newly-created Git commit IDs. The generated file
+ will contain one line for each (filename, revision) pair imported;
+ each line will look like
++
+---------
+src/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
+---------
++
+The revision data is appended to the file if it already exists, for use when
+doing incremental imports.
++
+This option may be useful if you have CVS revision numbers stored in commit
+messages, bug-tracking systems, email archives, and the like.
+
-h::
Print a short usage message and exit.
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 6fc5323ee6..7ef9d51577 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -105,6 +105,9 @@ The number of additional commits is the number
of commits which would be displayed by "git log v1.0.4..parent".
The hash suffix is "-g" + 7-char abbreviation for the tip commit
of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).
+The "g" prefix stands for "git" and is used to allow describing the version of
+a software depending on the SCM the software is managed with. This is useful
+in an environment where people may use different SCMs.
Doing a 'git describe' on a tag-name will just show the tag name:
diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
index c24e14b870..98ec6b5871 100644
--- a/Documentation/git-fast-export.txt
+++ b/Documentation/git-fast-export.txt
@@ -37,7 +37,7 @@ unsigned, with 'verbatim', they will be silently exported
and with 'warn', they will be exported, but you will see a warning.
--tag-of-filtered-object=(abort|drop|rewrite)::
- Specify how to handle tags whose tagged objectis filtered out.
+ Specify how to handle tags whose tagged object is filtered out.
Since revisions and files to export can be limited by path,
tagged objects may be filtered completely.
+
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index ff4022c15f..19082b04eb 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -44,11 +44,14 @@ OPTIONS
not contain the old commit).
--max-pack-size=<n>::
- Maximum size of each output packfile, expressed in MiB.
- The default is 4096 (4 GiB) as that is the maximum allowed
- packfile size (due to file format limitations). Some
- importers may wish to lower this, such as to ensure the
- resulting packfiles fit on CDs.
+ Maximum size of each output packfile.
+ The default is unlimited.
+
+--big-file-threshold=<n>::
+ Maximum size of a blob that fast-import will attempt to
+ create a delta for, expressed in bytes. The default is 512m
+ (512 MiB). Some importers may wish to lower this on systems
+ with constrained memory.
--depth=<n>::
Maximum delta depth, for blob and tree deltification.
@@ -152,7 +155,7 @@ fast-forward update, fast-import will skip updating that ref and instead
prints a warning message. fast-import will always attempt to update all
branch refs, and does not stop on the first failure.
-Branch updates can be forced with \--force, but its recommended that
+Branch updates can be forced with \--force, but it's recommended that
this only be used on an otherwise quiet repository. Using \--force
is not necessary for an initial import into an empty repository.
@@ -267,7 +270,7 @@ is always copied into the identity string at the time it is being
created by fast-import. There is no way to specify a different time or
timezone.
+
-This particular format is supplied as its short to implement and
+This particular format is supplied as it's 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
'git update-index'.
@@ -420,7 +423,7 @@ quoting or escaping syntax is supported within `<committish>`.
Here `<committish>` is any of the following:
* The name of an existing branch already in fast-import's internal branch
- table. If fast-import doesn't know the name, its treated as a SHA-1
+ table. If fast-import doesn't know the name, it's treated as a SHA-1
expression.
* A mark reference, `:<idnum>`, where `<idnum>` is the mark number.
@@ -759,7 +762,7 @@ assigned mark.
The mark command is optional here as some frontends have chosen
to generate the Git SHA-1 for the blob on their own, and feed that
-directly to `commit`. This is typically more work than its worth
+directly to `commit`. This is typically more work than it's worth
however, as marks are inexpensive to store and easy to use.
`data`
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
index e9952e8210..4a8487c154 100644
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -18,7 +18,7 @@ higher level wrapper of this command, instead.
Invokes 'git-upload-pack' on a possibly remote repository
and asks it to send objects missing from this repository, to
update the named heads. The list of commits available locally
-is found out by scanning local $GIT_DIR/refs/ and sent to
+is found out by scanning the local refs/ hierarchy and sent to
'git-upload-pack' running on the other end.
This command degenerates to download everything to complete the
@@ -44,8 +44,8 @@ OPTIONS
locked against repacking.
--thin::
- Spend extra cycles to minimize the number of objects to be sent.
- Use it on slower connection.
+ Fetch a "thin" pack, which records objects in deltified form based
+ on objects not included in the pack to reduce network traffic.
--include-tag::
If the remote side supports it, annotated tags objects will
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index cfaba2a305..020028cf9a 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -358,7 +358,7 @@ To move the whole tree into a subdirectory, or remove it from there:
---------------------------------------------------------------
git filter-branch --index-filter \
- 'git ls-files -s | sed "s-\t-&newsubdir/-" |
+ 'git ls-files -s | sed "s-\t\"*-&newsubdir/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 9674f9de67..835fb7135b 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -18,7 +18,7 @@ SYNOPSIS
[--in-reply-to=Message-Id] [--suffix=.<sfx>]
[--ignore-if-in-upstream]
[--subject-prefix=Subject-Prefix]
- [--cc=<email>]
+ [--to=<email>] [--cc=<email>]
[--cover-letter]
[<common diff options>]
[ <since> | <revision range> ]
@@ -162,6 +162,10 @@ will want to ensure that threading is disabled for `git send-email`.
allows for useful naming of a patch series, and can be
combined with the `--numbered` option.
+--to=<email>::
+ Add a `To:` header to the email headers. This is in addition
+ to any configured headers, and may be used multiple times.
+
--cc=<email>::
Add a `Cc:` header to the email headers. This is in addition
to any configured headers, and may be used multiple times.
@@ -202,8 +206,8 @@ CONFIGURATION
-------------
You can specify extra mail header lines to be added to each message,
defaults for the subject prefix and file suffix, number patches when
-outputting more than one patch, add "Cc:" headers, configure attachments,
-and sign off patches with configuration variables.
+outputting more than one patch, add "To" or "Cc:" headers, configure
+attachments, and sign off patches with configuration variables.
------------
[format]
@@ -211,6 +215,7 @@ and sign off patches with configuration variables.
subjectprefix = CHANGE
suffix = .txt
numbered = auto
+ to = <email>
cc = <email>
attach [ = mime-boundary-string ]
signoff = true
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index abb6735a40..4b32322a67 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -9,32 +9,35 @@ git-grep - Print lines matching a pattern
SYNOPSIS
--------
[verse]
-'git grep' [--cached]
- [-a | --text] [-I] [-i | --ignore-case] [-w | --word-regexp]
+'git grep' [-a | --text] [-I] [-i | --ignore-case] [-w | --word-regexp]
[-v | --invert-match] [-h|-H] [--full-name]
[-E | --extended-regexp] [-G | --basic-regexp]
[-F | --fixed-strings] [-n]
[-l | --files-with-matches] [-L | --files-without-match]
[-z | --null]
- [-c | --count] [--all-match]
+ [-c | --count] [--all-match] [-q | --quiet]
[--max-depth <depth>]
- [--color | --no-color]
+ [--color[=<when>] | --no-color]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-f <file>] [-e] <pattern>
- [--and|--or|--not|(|)|-e <pattern>...] [<tree>...]
- [--] [<path>...]
+ [--and|--or|--not|(|)|-e <pattern>...]
+ [--cached | --no-index | <tree>...]
+ [--] [<pathspec>...]
DESCRIPTION
-----------
-Look for specified patterns in the working tree files, blobs
-registered in the index file, or given tree objects.
+Look for specified patterns in the tracked files in the work tree, blobs
+registered in the index file, or blobs in given tree objects.
OPTIONS
-------
--cached::
- Instead of searching in the working tree files, check
- the blobs registered in the index file.
+ Instead of searching tracked files in the working tree, search
+ blobs registered in the index file.
+
+--no-index::
+ Search files in the current directory, not just those tracked by git.
-a::
--text::
@@ -49,7 +52,7 @@ OPTIONS
Don't match the pattern in binary files.
--max-depth <depth>::
- For each pathspec given on command line, descend at most <depth>
+ For each <pathspec> given on command line, descend at most <depth>
levels of directories. A negative value means no limit.
-w::
@@ -98,8 +101,8 @@ OPTIONS
--files-without-match::
Instead of showing every matched line, show only the
names of files that contain (or do not contain) matches.
- For better compatibility with 'git diff', --name-only is a
- synonym for --files-with-matches.
+ For better compatibility with 'git diff', `--name-only` is a
+ synonym for `--files-with-matches`.
-z::
--null::
@@ -111,12 +114,14 @@ OPTIONS
Instead of showing every matched line, show the number of
lines that match.
---color::
+--color[=<when>]::
Show colored matches.
+ The value must be always (the default), never, or auto.
--no-color::
Turn off match highlighting, even when the configuration file
gives the default to color output.
+ Same as `--color=never`.
-[ABC] <context>::
Show `context` trailing (`A` -- after), or leading (`B`
@@ -125,7 +130,7 @@ OPTIONS
matches.
-<num>::
- A shortcut for specifying -C<num>.
+ A shortcut for specifying `-C<num>`.
-p::
--show-function::
@@ -140,7 +145,7 @@ OPTIONS
-e::
The next parameter is the pattern. This option has to be
- used for patterns starting with - and should be used in
+ used for patterns starting with `-` and should be used in
scripts passing user input to grep. Multiple patterns are
combined by 'or'.
@@ -158,16 +163,29 @@ OPTIONS
this flag is specified to limit the match to files that
have lines to match all of them.
-`<tree>...`::
- Search blobs in the trees for specified patterns.
+-q::
+--quiet::
+ Do not output matched lines; instead, exit with status 0 when
+ there is a match and with non-zero status when there isn't.
+
+<tree>...::
+ Instead of searching tracked files in the working tree, search
+ blobs in the given trees.
\--::
Signals the end of options; the rest of the parameters
- are <path> limiters.
+ are <pathspec> limiters.
+<pathspec>...::
+ If given, limit the search to paths matching at least one pattern.
+ Both leading paths match and glob(7) patterns are supported.
-Example
--------
+Examples
+--------
+
+git grep 'time_t' -- '*.[ch]'::
+ Looks for `time_t` in all tracked .c and .h files in the working
+ directory and its subdirectories.
git grep -e \'#define\' --and \( -e MAX_PATH -e PATH_MAX \)::
Looks for a line that has `#define` and either `MAX_PATH` or
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
index 479fce4693..6904739a48 100644
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
-'git hash-object' [-t <type>] [-w] --stdin-paths < <list-of-paths>
+'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>
DESCRIPTION
-----------
diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 07931c6874..5238820657 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -14,7 +14,7 @@ DESCRIPTION
-----------
A simple CGI program to serve the contents of a Git repository to Git
clients accessing the repository over http:// and https:// protocols.
-The program supports clients fetching using both the smart HTTP protcol
+The program supports clients fetching using both the smart HTTP protocol
and the backwards-compatible dumb HTTP protocol, as well as clients
pushing using the smart HTTP protocol.
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index 57db955bd4..6cafbe2ec1 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -71,6 +71,10 @@ imap.preformattedHTML::
option causes Thunderbird to send the patch as a plain/text,
format=fixed email. Default is `false`.
+imap.authMethod::
+ Specify authenticate method for authentication with IMAP server.
+ Current supported method is 'CRAM-MD5' only.
+
Examples
~~~~~~~~
diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt
index 65a301bece..f3ccc72f0d 100644
--- a/Documentation/git-index-pack.txt
+++ b/Documentation/git-index-pack.txt
@@ -46,14 +46,10 @@ OPTIONS
'git repack'.
--fix-thin::
- It is possible for 'git pack-objects' 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
- and they must be included in the pack for that pack to be self
- contained and indexable. Without this option any attempt to
- index a thin pack will fail. This option only makes sense in
- conjunction with --stdin.
+ Fix a "thin" pack produced by `git pack-objects --thin` (see
+ linkgit:git-pack-objects[1] for details) by adding the
+ excluded objects the deltified objects are based on to the
+ pack. This option only makes sense in conjunction with --stdin.
--keep::
Before moving the index into its final destination
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index 7ee102da48..246b07ebf9 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -28,14 +28,8 @@ current working directory.
--template=<template_directory>::
-Provide the directory from which templates will be used. The default template
-directory is `/usr/share/git-core/templates`.
-
-When specified, `<template_directory>` is used as the source of the template
-files rather than the default. The template files include some directory
-structure, some suggested "exclude patterns", and copies of non-executing
-"hook" files. The suggested patterns and hook files are all modifiable and
-extensible.
+Specify the directory from which templates will be used. (See the "TEMPLATE
+DIRECTORY" section below.)
--shared[={false|true|umask|group|all|world|everybody|0xxx}]::
@@ -106,6 +100,25 @@ of the repository, such as installing the default hooks and
setting the configuration variables. The old name is retained
for backward compatibility reasons.
+TEMPLATE DIRECTORY
+------------------
+
+The template directory contains files and directories that will be copied to
+the `$GIT_DIR` after it is created.
+
+The template directory used will (in order):
+
+ - The argument given with the `--template` option.
+
+ - The contents of the `$GIT_TEMPLATE_DIR` environment variable.
+
+ - The `init.templatedir` configuration variable.
+
+ - The default template directory: `/usr/share/git-core/templates`.
+
+The default template directory includes some directory structure, some
+suggested "exclude patterns", and copies of sample "hook" files.
+The suggested patterns and hook files are all modifiable and extensible.
EXAMPLES
--------
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 0e39bb61ee..fb184ba186 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -118,6 +118,15 @@ git log master --not --remotes=*/master::
Shows all commits that are in local master but not in any remote
repository master branches.
+git log -p -m --first-parent::
+
+ Shows the history including change diffs, but only from the
+ "main branch" perspective, skipping commits that come from merged
+ branches, and showing full diffs of changes introduced by the merges.
+ This makes sense only when following a strict policy of merging all
+ topic branches when staying on a single integration branch.
+
+
Discussion
----------
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index af409bf3b2..3521637b58 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -141,7 +141,7 @@ OPTIONS
Output
------
-show files just outputs the filename unless '--stage' is specified in
+'git ls-files' just outputs the filenames unless '--stage' is specified in
which case it outputs:
[<tag> ]<mode> <object> <stage> <file>
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index 5cc94ec53d..a634485281 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -7,7 +7,7 @@ git-mailsplit - Simple UNIX mbox splitter program
SYNOPSIS
--------
-'git mailsplit' [-b] [-f<nn>] [-d<prec>] -o<directory> [--] [<mbox>|<Maildir>...]
+'git mailsplit' [-b] [-f<nn>] [-d<prec>] [--keep-cr] -o<directory> [--] [<mbox>|<Maildir>...]
DESCRIPTION
-----------
@@ -43,6 +43,9 @@ OPTIONS
Skip the first <nn> numbers, for example if -f3 is specified,
start the numbering with 0004.
+--keep-cr::
+ Do not remove `\r` from lines ending with `\r\n`.
+
Author
------
Written by Linus Torvalds <torvalds@osdl.org>
diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt
index 234269ae59..f334d694e0 100644
--- a/Documentation/git-merge-file.txt
+++ b/Documentation/git-merge-file.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git merge-file' [-L <current-name> [-L <base-name> [-L <other-name>]]]
- [--ours|--theirs] [-p|--stdout] [-q|--quiet]
+ [--ours|--theirs|--union] [-p|--stdout] [-q|--quiet] [--marker-size=<n>]
<current-file> <base-file> <other-file>
@@ -35,9 +35,10 @@ normally outputs a warning and brackets the conflict with lines containing
>>>>>>> B
If there are conflicts, the user should edit the result and delete one of
-the alternatives. When `--ours` or `--theirs` option is in effect, however,
-these conflicts are resolved favouring lines from `<current-file>` or
-lines from `<other-file>` respectively.
+the alternatives. When `--ours`, `--theirs`, or `--union` option is in effect,
+however, these conflicts are resolved favouring lines from `<current-file>`,
+lines from `<other-file>`, or lines from both respectively. The length of the
+conflict markers can be given with the `--marker-size` option.
The exit value of this program is negative on error, and the number of
conflicts otherwise. If the merge was clean, the exit value is 0.
@@ -67,8 +68,9 @@ OPTIONS
--ours::
--theirs::
+--union::
Instead of leaving conflicts in the file, resolve conflicts
- favouring our (or their) side of the lines.
+ favouring our (or their or both) side of the lines.
EXAMPLES
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index d4ef0d0ce2..9c9618cead 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -15,8 +15,32 @@ SYNOPSIS
DESCRIPTION
-----------
-Merges the history specified by <commit> into HEAD, optionally using a
-specific merge strategy.
+Incorporates changes from the named commits (since the time their
+histories diverged from the current branch) into the current
+branch. This command is used by 'git pull' to incorporate changes
+from another repository and can be used by hand to merge changes
+from one branch into another.
+
+Assume the following history exists and the current branch is
+"`master`":
+
+------------
+ A---B---C topic
+ /
+ D---E---F---G master
+------------
+
+Then "`git merge topic`" will replay the changes made on the
+`topic` branch since it diverged from `master` (i.e., `E`) until
+its current commit (`C`) on top of `master`, and record the result
+in a new commit along with the names of the two parent commits and
+a log message from the user describing the changes.
+
+------------
+ A---B---C topic
+ / \
+ D---E---F---G---H master
+------------
The second syntax (<msg> `HEAD` <commit>...) is supported for
historical reasons. Do not use it from the command line or in
@@ -47,88 +71,73 @@ include::merge-options.txt[]
You need at least one <commit>. Specifying more than one
<commit> obviously means you are trying an Octopus.
-include::merge-strategies.txt[]
+PRE-MERGE CHECKS
+----------------
-If you tried a merge which resulted in complex conflicts and
-want to start over, you can recover with 'git reset'.
+Before applying outside changes, you should get your own work in
+good shape and committed locally, so it will not be clobbered if
+there are conflicts. See also linkgit:git-stash[1].
+'git pull' and 'git merge' will stop without doing anything when
+local uncommitted changes overlap with files that 'git pull'/'git
+merge' may need to update.
-CONFIGURATION
--------------
-include::merge-config.txt[]
+To avoid recording unrelated changes in the merge commit,
+'git pull' and 'git merge' will also abort if there are any changes
+registered in the index relative to the `HEAD` commit. (One
+exception is when the changed index entries are in the state that
+would result from the merge already.)
-branch.<name>.mergeoptions::
- Sets default options for merging into branch <name>. The syntax and
- supported options are the same as those of 'git merge', but option
- values containing whitespace characters are currently not supported.
+If all named commits are already ancestors of `HEAD`, 'git merge'
+will exit early with the message "Already up-to-date."
-HOW MERGE WORKS
----------------
-
-A merge is always between the current `HEAD` and one or more
-commits (usually, branch head or tag), and the index file must
-match the tree of `HEAD` commit (i.e. the contents of the last commit)
-when it starts out. In other words, `git diff --cached HEAD` must
-report no changes. (One exception is when the changed index
-entries are already in the same state that would result from
-the merge anyway.)
-
-Three kinds of merge can happen:
-
-* The merged commit is already contained in `HEAD`. This is the
- simplest case, called "Already up-to-date."
-
-* `HEAD` is already contained in the merged commit. This is the
- most common case especially when invoked from 'git pull':
- you are tracking an upstream repository, have committed no local
- changes and now you want to update to a newer upstream revision.
- Your `HEAD` (and the index) is updated to point at the merged
- commit, without creating an extra merge commit. This is
- called "Fast-forward".
-
-* Both the merged commit and `HEAD` are independent and must be
- tied together by a merge commit that has both of them as its parents.
- The rest of this section describes this "True merge" case.
-
-The chosen merge strategy merges the two commits into a single
-new source tree.
-When things merge cleanly, this is what happens:
-
-1. The results are updated both in the index file and in your
- working tree;
-2. Index file is written out as a tree;
-3. The tree gets committed; and
-4. The `HEAD` pointer gets advanced.
-
-Because of 2., we require that the original state of the index
-file matches exactly the current `HEAD` commit; otherwise we
-will write out your local changes already registered in your
-index file along with the merge result, which is not good.
-Because 1. involves only those paths differing between your
-branch and the branch you are merging
-(which is typically a fraction of the whole tree), you can
-have local modifications in your working tree as long as they do
-not overlap with what the merge updates.
-
-When there are conflicts, the following happens:
-
-1. `HEAD` stays the same.
-
-2. Cleanly merged paths are updated both in the index file and
- in your working tree.
+FAST-FORWARD MERGE
+------------------
+
+Often the current branch head is an ancestor of the named commit.
+This is the most common case especially when invoked from 'git
+pull': you are tracking an upstream repository, you have committed
+no local changes, and now you want to update to a newer upstream
+revision. In this case, a new commit is not needed to store the
+combined history; instead, the `HEAD` (along with the index) is
+updated to point at the named commit, without creating an extra
+merge commit.
+
+This behavior can be suppressed with the `--no-ff` option.
-3. For conflicting paths, the index file records up to three
- versions; stage1 stores the version from the common ancestor,
- stage2 from `HEAD`, and stage3 from the other branch (you
+TRUE MERGE
+----------
+
+Except in a fast-forward merge (see above), the branches to be
+merged must be tied together by a merge commit that has both of them
+as its parents.
+
+A merged version reconciling the changes from all branches to be
+merged is committed, and your `HEAD`, index, and working tree are
+updated to it. It is possible to have modifications in the working
+tree as long as they do not overlap; the update will preserve them.
+
+When it is not obvious how to reconcile the changes, the following
+happens:
+
+1. The `HEAD` pointer stays the same.
+2. The `MERGE_HEAD` ref is set to point to the other branch head.
+3. Paths that merged cleanly are updated both in the index file and
+ in your working tree.
+4. For conflicting paths, the index file records up to three
+ versions: stage 1 stores the version from the common ancestor,
+ stage 2 from `HEAD`, and stage 3 from `MERGE_HEAD` (you
can inspect the stages with `git ls-files -u`). The working
tree files contain the result of the "merge" program; i.e. 3-way
- merge results with familiar conflict markers `<<< === >>>`.
-
-4. No other changes are done. In particular, the local
+ merge results with familiar conflict markers `<<<` `===` `>>>`.
+5. No other changes are made. In particular, the local
modifications you had before you started merge will stay the
same and the index entries for them stay as they were,
i.e. matching `HEAD`.
+If you tried a merge which resulted in complex conflicts and
+want to start over, you can recover with `git reset --merge`.
+
HOW CONFLICTS ARE PRESENTED
---------------------------
@@ -211,15 +220,17 @@ You can work through the conflict with a number of tools:
mergetool which will work you through the merge.
* Look at the diffs. `git diff` will show a three-way diff,
- highlighting changes from both the HEAD and their versions.
+ highlighting changes from both the `HEAD` and `MERGE_HEAD`
+ versions.
- * Look at the diffs on their own. `git log --merge -p <path>`
- will show diffs first for the HEAD version and then
- their version.
+ * Look at the diffs from each branch. `git log --merge -p <path>`
+ will show diffs first for the `HEAD` version and then the
+ `MERGE_HEAD` version.
* Look at the originals. `git show :1:filename` shows the
- common ancestor, `git show :2:filename` shows the HEAD
- version and `git show :3:filename` shows their version.
+ common ancestor, `git show :2:filename` shows the `HEAD`
+ version, and `git show :3:filename` shows the `MERGE_HEAD`
+ version.
EXAMPLES
@@ -254,6 +265,17 @@ changes into a merge commit. Small fixups like bumping
release/version name would be acceptable.
+include::merge-strategies.txt[]
+
+CONFIGURATION
+-------------
+include::merge-config.txt[]
+
+branch.<name>.mergeoptions::
+ Sets default options for merging into branch <name>. The syntax and
+ supported options are the same as those of 'git merge', but option
+ values containing whitespace characters are currently not supported.
+
SEE ALSO
--------
linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index e2701cff1a..4e5113b837 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -51,13 +51,13 @@ list::
add::
Add notes for a given object (defaults to HEAD). Abort if the
- object already has notes, abort. (use `-f` to overwrite an
+ object already has notes (use `-f` to overwrite an
existing note).
copy::
Copy the notes for the first object onto the second object.
Abort if the second object already has notes, or if the first
- objects has none. (use -f to overwrite existing notes to the
+ object has none (use -f to overwrite existing notes to the
second object). This subcommand is equivalent to:
`git notes add [-f] -C $(git notes list <from-object>) <to-object>`
+
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 097a14773b..8ed09c0b3c 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -21,16 +21,21 @@ DESCRIPTION
Reads list of objects from the standard input, and writes a packed
archive with specified base-name, or to the standard output.
-A packed archive is an efficient way to transfer set of objects
-between two repositories, and also is an archival format which
-is efficient to access. The packed archive format (.pack) is
-designed to be self contained so that it can be unpacked without
-any further information, but for fast, random access to the objects
-in the pack, a pack index file (.idx) will be generated.
-
-Placing both in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
+A packed archive is an efficient way to transfer a set of objects
+between two repositories as well as an access efficient archival
+format. In a packed archive, an object is either stored as a
+compressed whole or as a difference from some other object.
+The latter is often called a delta.
+
+The packed archive format (.pack) is designed to be self-contained
+so that it can be unpacked without any further information. Therefore,
+each object that a delta depends upon must be present within the pack.
+
+A pack index file (.idx) is generated for fast, random access to the
+objects in the pack. Placing both the index file (.idx) and the packed
+archive (.pack) in the pack/ subdirectory of $GIT_OBJECT_DIRECTORY (or
any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES)
-enables git to read from such an archive.
+enables git to read from the pack archive.
The 'git unpack-objects' command can read the packed archive and
expand the objects contained in the pack into "one-file
@@ -38,10 +43,6 @@ one-object" format; this is typically done by the smart-pull
commands when a pack is created on-the-fly for efficient network
transport by their peers.
-In a packed archive, an object is either stored as a compressed
-whole, or as a difference from some other object. The latter is
-often called a delta.
-
OPTIONS
-------
@@ -73,7 +74,7 @@ base-name::
--all::
This implies `--revs`. In addition to the list of
revision arguments read from the standard input, pretend
- as if all refs under `$GIT_DIR/refs` are specified to be
+ as if all refs under `refs/` are specified to be
included.
--include-tag::
@@ -105,26 +106,26 @@ base-name::
`--window-memory=0` makes memory usage unlimited, which is the
default.
---max-pack-size=<n>::
- Maximum size of each output packfile, expressed in MiB.
+--max-pack-size=[N]::
+ Maximum size of each output pack file. The size can be suffixed with
+ "k", "m", or "g". The minimum size allowed is limited to 1 MiB.
If specified, multiple packfiles may be created.
The default is unlimited, unless the config variable
`pack.packSizeLimit` is set.
--honor-pack-keep::
This flag causes an object already in a local pack that
- has a .keep file to be ignored, even if it appears in the
- standard input.
+ has a .keep file to be ignored, even if it it would have
+ otherwise been packed.
--incremental::
- This flag causes an object already in a pack ignored
- even if it appears in the standard input.
+ This flag causes an object already in a pack to be ignored
+ even if it would have otherwise been packed.
--local::
- This flag is similar to `--incremental`; instead of
- ignoring all packed objects, it only ignores objects
- that are packed and/or not in the local object store
- (i.e. borrowed from an alternate).
+ This flag causes an object that is borrowed from an alternate
+ object store to be ignored even if it would have otherwise been
+ packed.
--non-empty::
Only create a packed archive if it would contain at
@@ -178,6 +179,16 @@ base-name::
Add --no-reuse-object if you want to force a uniform compression
level on all data no matter the source.
+--thin::
+ Create a "thin" pack by omitting the common objects between a
+ sender and a receiver in order to reduce network transfer. This
+ option only makes sense in conjunction with --stdout.
++
+Note: A thin pack violates the packed archive format by omitting
+required objects and is thus unusable by git without making it
+self-contained. Use `git index-pack --fix-thin`
+(see linkgit:git-index-pack[1]) to restore the self-contained property.
+
--delta-base-offset::
A packed archive can express base object of a delta as
either 20-byte object name or as an offset in the
diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt
index 3bb7304517..15cfb7a8dc 100644
--- a/Documentation/git-prune.txt
+++ b/Documentation/git-prune.txt
@@ -17,7 +17,7 @@ NOTE: In most cases, users should run 'git gc', which calls
'git prune'. See the section "NOTES", below.
This runs 'git fsck --unreachable' using all the refs
-available in `$GIT_DIR/refs`, optionally with additional set of
+available in `refs/`, optionally with additional set of
objects specified on the command line, and prunes all unpacked
objects unreachable from any of these head objects from the object database.
In addition, it
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 31f42ea21a..ab4de10358 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -31,6 +31,16 @@ in a state that is hard to back out of in the case of a conflict.
OPTIONS
-------
+-q::
+--quiet::
+ This is passed to both underlying git-fetch to squelch reporting of
+ during transfer, and underlying git-merge to squelch output during
+ merging.
+
+-v::
+--verbose::
+ Pass --verbose to git-fetch and git-merge.
+
Options related to merging
~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index c63932b16c..59dc8b197e 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -69,11 +69,11 @@ nor in any Push line of the corresponding remotes file---see below).
--all::
Instead of naming each ref to push, specifies that all
- refs under `$GIT_DIR/refs/heads/` be pushed.
+ refs under `refs/heads/` be pushed.
--mirror::
Instead of naming each ref to push, specifies that all
- refs under `$GIT_DIR/refs/` (which includes but is not
+ refs under `refs/` (which includes but is not
limited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)
be mirrored to the remote repository. Newly created local
refs will be pushed to the remote end, locally updated refs
@@ -96,7 +96,7 @@ nor in any Push line of the corresponding remotes file---see below).
the same as prefixing all refs with a colon.
--tags::
- All refs under `$GIT_DIR/refs/tags` are pushed, in
+ All refs under `refs/tags` are pushed, in
addition to refspecs explicitly listed on the command
line.
@@ -122,13 +122,6 @@ nor in any Push line of the corresponding remotes file---see below).
the name "origin" is used. For this latter case, this option
can be used to override the name "origin". In other words,
the difference between these two commands
-
--u::
---set-upstream::
- For every branch that is up to date or successfully pushed, add
- upstream (tracking) reference, used by argument-less
- linkgit:git-pull[1] and other commands. For more information,
- see 'branch.<name>.merge' in linkgit:git-config[1].
+
--------------------------
git push public #1
@@ -139,20 +132,35 @@ is that #1 always pushes to "public" whereas #2 pushes to "public"
only if the current branch does not track a remote branch. This is
useful if you write an alias or script around 'git push'.
+-u::
+--set-upstream::
+ For every branch that is up to date or successfully pushed, add
+ upstream (tracking) reference, used by argument-less
+ linkgit:git-pull[1] and other commands. For more information,
+ see 'branch.<name>.merge' in linkgit:git-config[1].
+
--thin::
--no-thin::
- These options are passed to 'git send-pack'. Thin
- transfer spends extra cycles to minimize the number of
- objects to be sent and meant to be used on slower connection.
+ These options are passed to linkgit:git-send-pack[1]. A thin transfer
+ significantly reduces the amount of sent data when the sender and
+ receiver share many of the same objects in common. The default is
+ \--thin.
+
+-q::
+--quiet::
+ Suppress all output, including the listing of updated refs,
+ unless an error occurs. Progress is not reported to the standard
+ error stream.
-v::
--verbose::
Run verbosely.
--q::
---quiet::
- Suppress all output, including the listing of updated refs,
- unless an error occurs.
+--progress::
+ Progress status is reported on the standard error stream
+ by default when it is attached to a terminal, unless -q
+ is specified. This flag forces progress status even if the
+ standard error stream is not directed to a terminal.
include::urls-remotes.txt[]
@@ -176,12 +184,17 @@ If --porcelain is used, then each line of the output is of the form:
<flag> \t <from>:<to> \t <summary> (<reason>)
-------------------------------
+The status of up-to-date refs is shown only if --porcelain or --verbose
+option is used.
+
flag::
- A single character indicating the status of the ref. This is
- blank for a successfully pushed ref, `!` for a ref that was
- rejected or failed to push, and '=' for a ref that was up to
- date and did not need pushing (note that the status of up to
- date refs is shown only when `git push` is running verbosely).
+ A single character indicating the status of the ref:
+(space);; for a successfully pushed fast-forward;
+`{plus}`;; for a successful forced update;
+`-`;; for a successfully deleted ref;
+`*`;; for a successfully pushed new ref;
+`!`;; for a ref that was rejected or failed to push; and
+`=`;; for a ref that was up to date and did not need pushing.
summary::
For a successfully pushed ref, the summary shows the old and new
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 567671c013..f6037c4f6a 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -130,7 +130,7 @@ Single Tree Merge
~~~~~~~~~~~~~~~~~
If only 1 tree is specified, 'git read-tree' operates as if the user did not
specify `-m`, except that if the original index has an entry for a
-given pathname, and the contents of the path matches with the tree
+given pathname, and the contents of the path match with the tree
being read, the stat info from the index is used. (In other words, the
index's stat()s take precedence over the merged tree's).
@@ -154,40 +154,42 @@ When two trees are specified, the user is telling 'git read-tree'
the following:
1. The current index and work tree is derived from $H, but
- the user may have local changes in them since $H;
+ the user may have local changes in them since $H.
2. The user wants to fast-forward to $M.
In this case, the `git read-tree -m $H $M` command makes sure
that no local change is lost as the result of this "merge".
-Here are the "carry forward" rules:
+Here are the "carry forward" rules, where "I" denotes the index,
+"clean" means that index and work tree coincide, and "exists"/"nothing"
+refer to the presence of a path in the specified commit:
- I (index) H M Result
+ I H M Result
-------------------------------------------------------
- 0 nothing nothing nothing (does not happen)
- 1 nothing nothing exists use M
- 2 nothing exists nothing remove path from index
- 3 nothing exists exists, use M if "initial checkout"
+ 0 nothing nothing nothing (does not happen)
+ 1 nothing nothing exists use M
+ 2 nothing exists nothing remove path from index
+ 3 nothing exists exists, use M if "initial checkout",
H == M keep index otherwise
- exists fail
+ exists, fail
H != M
clean I==H I==M
------------------
- 4 yes N/A N/A nothing nothing keep index
- 5 no N/A N/A nothing nothing keep index
+ 4 yes N/A N/A nothing nothing keep index
+ 5 no N/A N/A nothing nothing keep index
- 6 yes N/A yes nothing exists keep index
- 7 no N/A yes nothing exists keep index
- 8 yes N/A no nothing exists fail
- 9 no N/A no nothing exists fail
+ 6 yes N/A yes nothing exists keep index
+ 7 no N/A yes nothing exists keep index
+ 8 yes N/A no nothing exists fail
+ 9 no N/A no nothing exists fail
10 yes yes N/A exists nothing remove path from index
11 no yes N/A exists nothing fail
12 yes no N/A exists nothing fail
13 no no N/A exists nothing fail
- clean (H=M)
+ clean (H==M)
------
14 yes exists exists keep index
15 no exists exists keep index
@@ -202,26 +204,26 @@ Here are the "carry forward" rules:
21 no yes no exists exists fail
In all "keep index" cases, the index entry stays as in the
-original index file. If the entry were not up to date,
+original index file. If the entry is not up to date,
'git read-tree' keeps the copy in the work tree intact when
operating under the -u flag.
When this form of 'git read-tree' returns successfully, you can
-see what "local changes" you made are carried forward by running
+see which of the "local changes" that you made were carried forward by running
`git diff-index --cached $M`. Note that this does not
-necessarily match `git diff-index --cached $H` would have
+necessarily match what `git diff-index --cached $H` would have
produced before such a two tree merge. This is because of cases
18 and 19 --- if you already had the changes in $M (e.g. maybe
you picked it up via e-mail in a patch form), `git diff-index
--cached $H` would have told you about the change before this
merge, but it would not show in `git diff-index --cached $M`
-output after two-tree merge.
+output after the two-tree merge.
-Case #3 is slightly tricky and needs explanation. The result from this
+Case 3 is slightly tricky and needs explanation. The result from this
rule logically should be to remove the path if the user staged the removal
of the path and then switching to a new branch. That however will prevent
the initial checkout from happening, so the rule is modified to use M (new
-tree) only when the contents of the index is empty. Otherwise the removal
+tree) only when the content of the index is empty. Otherwise the removal
of the path is kept as long as $H and $M are the same.
3-Way Merge
diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 802bd5791c..4eaa62b691 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -18,9 +18,7 @@ depending on the subcommand:
[verse]
'git reflog expire' [--dry-run] [--stale-fix] [--verbose]
[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
-+
'git reflog delete' ref@\{specifier\}...
-+
'git reflog' ['show'] [log-options] [<ref>]
Reflog is a mechanism to record when the tip of branches are
diff --git a/Documentation/git-remote-helpers.txt b/Documentation/git-remote-helpers.txt
index 4685a898f1..1b5f61aa0b 100644
--- a/Documentation/git-remote-helpers.txt
+++ b/Documentation/git-remote-helpers.txt
@@ -25,7 +25,7 @@ Commands are given by the caller on the helper's standard input, one per line.
'capabilities'::
Lists the capabilities of the helper, one per line, ending
- with a blank line. Each capability may be preceeded with '*'.
+ with a blank line. Each capability may be preceded with '*'.
This marks them mandatory for git version using the remote
helper to understand (unknown mandatory capability is fatal
error).
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index b03ccaac3d..3fc599c0c7 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -14,6 +14,9 @@ SYNOPSIS
'git remote rename' <old> <new>
'git remote rm' <name>
'git remote set-head' <name> (-a | -d | <branch>)
+'git remote set-url' [--push] <name> <newurl> [<oldurl>]
+'git remote set-url --add' [--push] <name> <newurl>
+'git remote set-url --delete' [--push] <name> <url>
'git remote' [-v | --verbose] 'show' [-n] <name>
'git remote prune' [-n | --dry-run] <name>
'git remote' [-v | --verbose] 'update' [-p | --prune] [group | remote]...
@@ -101,6 +104,20 @@ remote set-head origin master" will set `$GIT_DIR/refs/remotes/origin/HEAD` to
`refs/remotes/origin/master` already exists; if not it must be fetched first.
+
+'set-url'::
+
+Changes URL remote points to. Sets first URL remote points to matching
+regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If
+<oldurl> doesn't match any URL, error occurs and nothing is changed.
++
+With '--push', push URLs are manipulated instead of fetch URLs.
++
+With '--add', instead of changing some URL, new URL is added.
++
+With '--delete', instead of changing some URL, all URLs matching
+regex <url> are deleted. Trying to delete all non-push URLs is an
+error.
+
'show'::
Gives some information about the remote <name>.
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 538895c50c..8c67d1724f 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -98,24 +98,26 @@ other objects in that pack they already have locally.
`--window-memory=0` makes memory usage unlimited, which is the
default.
---max-pack-size=<n>::
- Maximum size of each output packfile, expressed in MiB.
+--max-pack-size=[N]::
+ Maximum size of each output pack file. The size can be suffixed with
+ "k", "m", or "g". The minimum size allowed is limited to 1 MiB.
If specified, multiple packfiles may be created.
- The default is unlimited.
+ The default is unlimited, unless the config variable
+ `pack.packSizeLimit` is set.
Configuration
-------------
-When configuration variable `repack.UseDeltaBaseOffset` is set
-for the repository, the command passes `--delta-base-offset`
-option to 'git pack-objects'; this typically results in slightly
-smaller packs, but the generated packs are incompatible with
-versions of git older than (and including) v1.4.3; do not set
-the variable in a repository that older version of git needs to
-be able to read (this includes repositories from which packs can
-be copied out over http or rsync, and people who obtained packs
-that way can try to use older git with it).
+By default, the command passes `--delta-base-offset` option to
+'git pack-objects'; this typically results in slightly smaller packs,
+but the generated packs are incompatible with versions of Git older than
+version 1.4.4. If you need to share your repository with such ancient Git
+versions, either directly or via the dumb http or rsync protocol, then you
+need to set the configuration variable `repack.UseDeltaBaseOffset` to
+"false" and repack. Access from old Git versions over the native protocol
+is unaffected by this option as the conversion is performed on the fly
+as needed in that case.
Author
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 168db08627..645f0c1748 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -8,7 +8,7 @@ git-reset - Reset current HEAD to the specified state
SYNOPSIS
--------
[verse]
-'git reset' [--mixed | --soft | --hard | --merge] [-q] [<commit>]
+'git reset' [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
'git reset' [-q] [<commit>] [--] <paths>...
'git reset' --patch [<commit>] [--] [<paths>...]
@@ -52,6 +52,14 @@ OPTIONS
and updates the files that are different between the named commit
and the current commit in the working tree.
+--keep::
+ Reset the index to the given commit, keeping local changes in
+ the working tree since the current commit, while updating
+ working tree files without local changes to what appears in
+ the given commit. If a file that is different between the
+ current commit and the given commit has local changes, reset
+ is aborted.
+
-p::
--patch::
Interactively select hunks in the difference between the index
@@ -93,6 +101,7 @@ in the index and in state D in HEAD.
--mixed A D D
--hard D D D
--merge (disallowed)
+ --keep (disallowed)
working index HEAD target working index HEAD
----------------------------------------------------
@@ -100,6 +109,7 @@ in the index and in state D in HEAD.
--mixed A C C
--hard C C C
--merge (disallowed)
+ --keep A C C
working index HEAD target working index HEAD
----------------------------------------------------
@@ -107,6 +117,7 @@ in the index and in state D in HEAD.
--mixed B D D
--hard D D D
--merge D D D
+ --keep (disallowed)
working index HEAD target working index HEAD
----------------------------------------------------
@@ -114,6 +125,7 @@ in the index and in state D in HEAD.
--mixed B C C
--hard C C C
--merge C C C
+ --keep B C C
working index HEAD target working index HEAD
----------------------------------------------------
@@ -121,6 +133,7 @@ in the index and in state D in HEAD.
--mixed B D D
--hard D D D
--merge (disallowed)
+ --keep (disallowed)
working index HEAD target working index HEAD
----------------------------------------------------
@@ -128,6 +141,7 @@ in the index and in state D in HEAD.
--mixed B C C
--hard C C C
--merge B C C
+ --keep B C C
"reset --merge" is meant to be used when resetting out of a conflicted
merge. Any mergy operation guarantees that the work tree file that is
@@ -138,6 +152,15 @@ between the index and the work tree, then it means that we are not
resetting out from a state that a mergy operation left after failing
with a conflict. That is why we disallow --merge option in this case.
+"reset --keep" is meant to be used when removing some of the last
+commits in the current branch while keeping changes in the working
+tree. If there could be conflicts between the changes in the commit we
+want to remove and the changes in the working tree we want to keep,
+the reset is disallowed. That's why it is disallowed if there are both
+changes between the working tree and HEAD, and between HEAD and the
+target. To be safe, it is also disallowed when there are unmerged
+entries.
+
The following tables show what happens when there are unmerged
entries:
@@ -147,6 +170,7 @@ entries:
--mixed X B B
--hard B B B
--merge B B B
+ --keep (disallowed)
working index HEAD target working index HEAD
----------------------------------------------------
@@ -154,6 +178,7 @@ entries:
--mixed X A A
--hard A A A
--merge A A A
+ --keep (disallowed)
X means any state and U means an unmerged index.
@@ -325,6 +350,32 @@ $ git add frotz.c <3>
<2> This commits all other changes in the index.
<3> Adds the file to the index again.
+Keep changes in working tree while discarding some previous commits::
++
+Suppose you are working on something and you commit it, and then you
+continue working a bit more, but now you think that what you have in
+your working tree should be in another branch that has nothing to do
+with what you commited previously. You can start a new branch and
+reset it while keeping the changes in your work tree.
++
+------------
+$ git tag start
+$ git checkout -b branch1
+$ edit
+$ git commit ... <1>
+$ edit
+$ git checkout -b branch2 <2>
+$ git reset --keep start <3>
+------------
++
+<1> This commits your first edits in branch1.
+<2> In the ideal world, you could have realized that the earlier
+ commit did not belong to the new topic when you created and switched
+ to branch2 (i.e. "git checkout -b branch2 start"), but nobody is
+ perfect.
+<3> But you can use "reset --keep" to remove the unwanted commit after
+ you switched to "branch2".
+
Author
------
Written by Junio C Hamano <gitster@pobox.com> and Linus Torvalds <torvalds@osdl.org>
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index ae17c8a6fb..173f3fc785 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -22,8 +22,8 @@ SYNOPSIS
[ \--not ]
[ \--all ]
[ \--branches[=pattern] ]
- [ \--tags=[pattern] ]
- [ \--remotes=[pattern] ]
+ [ \--tags[=pattern] ]
+ [ \--remotes[=pattern] ]
[ \--glob=glob-pattern ]
[ \--stdin ]
[ \--quiet ]
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index c9184fcc76..8db600f6ba 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -33,7 +33,7 @@ OPTIONS
--stop-at-non-option::
Only meaningful in `--parseopt` mode. Lets the option parser stop at
the first non-option argument. This can be used to parse sub-commands
- that take options themself.
+ that take options themselves.
--sq-quote::
Use 'git rev-parse' in shell quoting mode (see SQ-QUOTE
@@ -101,15 +101,14 @@ OPTIONS
abbreviation mode.
--all::
- Show all refs found in `$GIT_DIR/refs`.
+ Show all refs found in `refs/`.
--branches[=pattern]::
--tags[=pattern]::
--remotes[=pattern]::
Show all branches, tags, or remote-tracking branches,
- respectively (i.e., refs found in `$GIT_DIR/refs/heads`,
- `$GIT_DIR/refs/tags`, or `$GIT_DIR/refs/remotes`,
- respectively).
+ respectively (i.e., refs found in `refs/heads`,
+ `refs/tags`, or `refs/remotes`, respectively).
+
If a `pattern` is given, only refs matching the given shell glob are
shown. If the pattern does not contain a globbing character (`?`,
@@ -149,6 +148,12 @@ shown. If the pattern does not contain a globbing character (`?`,
--is-bare-repository::
When the repository is bare print "true", otherwise "false".
+--local-env-vars::
+ List the GIT_* environment variables that are local to the
+ repository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR).
+ Only the names of the variables are listed, not their value,
+ even if they are set.
+
--short::
--short=number::
Instead of outputting the full SHA1 values of object names try to
@@ -189,7 +194,7 @@ blobs contained in a commit.
`g`, and an abbreviated object name.
* A symbolic ref name. E.g. 'master' typically means the commit
- object referenced by $GIT_DIR/refs/heads/master. If you
+ object referenced by refs/heads/master. If you
happen to have both heads/master and tags/master, you can
explicitly say 'heads/master' to tell git which one you mean.
When ambiguous, a `<name>` is disambiguated by taking the
@@ -198,15 +203,15 @@ blobs contained in a commit.
. if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
- . otherwise, `$GIT_DIR/refs/<name>` if exists;
+ . otherwise, `refs/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/tags/<name>` if exists;
+ . otherwise, `refs/tags/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/heads/<name>` if exists;
+ . otherwise, `refs/heads/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/remotes/<name>` if exists;
+ . otherwise, `refs/remotes/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/remotes/<name>/HEAD` if exists.
+ . otherwise, `refs/remotes/<name>/HEAD` if exists.
+
HEAD names the commit your changes in the working tree is based on.
FETCH_HEAD records the branch you fetched from a remote repository
@@ -217,6 +222,9 @@ you can change the tip of the branch back to the state before you ran
them easily.
MERGE_HEAD records the commit(s) you are merging into your branch
when you run 'git merge'.
++
+Note that any of the `refs/*` cases above may come either from
+the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
* A ref followed by the suffix '@' with a date specification
enclosed in a brace
@@ -244,6 +252,10 @@ when you run 'git merge'.
* The special construct '@\{-<n>\}' means the <n>th branch checked out
before the current one.
+* The suffix '@\{upstream\}' to a ref (short form 'ref@\{u\}') refers to
+ the branch the ref is set to build on top of. Missing ref defaults
+ to the current branch.
+
* A suffix '{caret}' to a revision parameter means the first parent of
that commit object. '{caret}<n>' means the <n>th parent (i.e.
'rev{caret}'
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index 8178d92642..deaa7d9654 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -48,8 +48,8 @@ OPTIONS
Run verbosely.
--thin::
- Spend extra cycles to minimize the number of objects to be sent.
- Use it on slower connection.
+ Send a "thin" pack, which records objects in deltified form based
+ on objects not included in the pack to reduce network traffic.
<host>::
A remote host to house the repository. When this
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
index ecf9e2718c..dfd4d0c223 100644
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
git log --pretty=short | 'git shortlog' [-h] [-n] [-s] [-e] [-w]
-git shortlog [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] [<committish>...]
+'git shortlog' [-n|--numbered] [-s|--summary] [-e|--email] [-w[<width>[,<indent1>[,<indent2>]]]] [<committish>...]
DESCRIPTION
-----------
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
index 734336119c..f1499bba88 100644
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git show-branch' [-a|--all] [-r|--remotes] [--topo-order | --date-order]
- [--current] [--color | --no-color] [--sparse]
+ [--current] [--color[=<when>] | --no-color] [--sparse]
[--more=<n> | --list | --independent | --merge-base]
[--no-name | --sha1-name] [--topics]
[<rev> | <glob>]...
@@ -20,8 +20,8 @@ DESCRIPTION
-----------
Shows the commit ancestry graph starting from the commits named
-with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads
-and/or $GIT_DIR/refs/tags) semi-visually.
+with <rev>s or <globs>s (or all refs under refs/heads
+and/or refs/tags) semi-visually.
It cannot show more than 29 branches and commits at a time.
@@ -37,8 +37,8 @@ OPTIONS
<glob>::
A glob pattern that matches branch or tag names under
- $GIT_DIR/refs. For example, if you have many topic
- branches under $GIT_DIR/refs/heads/topic, giving
+ refs/. For example, if you have many topic
+ branches under refs/heads/topic, giving
`topic/*` would show all of them.
-r::
@@ -117,13 +117,15 @@ OPTIONS
When no explicit <ref> parameter is given, it defaults to the
current branch (or `HEAD` if it is detached).
---color::
+--color[=<when>]::
Color the status sign (one of these: `*` `!` `+` `-`) of each commit
corresponding to the branch it's in.
+ The value must be always (the default), never, or auto.
--no-color::
Turn off colored output, even when the configuration file gives the
default to color output.
+ Same as `--color=never`.
Note that --more, --list, --independent and --merge-base options
are mutually exclusive.
@@ -176,7 +178,7 @@ EXAMPLE
-------
If you keep your primary branches immediately under
-`$GIT_DIR/refs/heads`, and topic branches in subdirectories of
+`refs/heads`, and topic branches in subdirectories of
it, having the following in the configuration file may help:
------------
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 84e555d81d..473889a660 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -33,7 +33,7 @@ A stash is by default listed as "WIP on 'branchname' ...", but
you can give a more descriptive message on the command line when
you create one.
-The latest stash you created is stored in `$GIT_DIR/refs/stash`; older
+The latest stash you created is stored in `refs/stash`; older
stashes are found in the reflog of this reference and can be named using
the usual reflog syntax (e.g. `stash@\{0}` is the most recently
created stash, `stash@\{1}` is the one before it, `stash@\{2.hours.ago}`
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 63aa694968..2502531a3d 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -218,7 +218,7 @@ OPTIONS
This option is only valid for the update command.
Rebase the current branch onto the commit recorded in the
superproject. If this option is given, the submodule's HEAD will not
- be detached. If a a merge failure prevents this process, you will have
+ be detached. If a merge failure prevents this process, you will have
to resolve these failures with linkgit:git-rebase[1].
If the key `submodule.$name.update` is set to `rebase`, this option is
implicit.
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 4cdca0d874..99f3c1ea6c 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -62,6 +62,8 @@ COMMANDS
Set the 'useSvnsyncProps' option in the [svn-remote] config.
--rewrite-root=<URL>;;
Set the 'rewriteRoot' option in the [svn-remote] config.
+--rewrite-uuid=<UUID>;;
+ Set the 'rewriteUUID' option in the [svn-remote] config.
--username=<USER>;;
For transports that SVN handles authentication for (http,
https, and plain svn), specify the username. For other
@@ -239,6 +241,19 @@ discouraged.
where <name> is the name of the SVN repository as specified by the -R option to
'init' (or "svn" by default).
+--username;;
+ Specify the SVN username to perform the commit as. This option overrides
+ configuration property 'username'.
+
+--commit-url;;
+ Use the specified URL to connect to the destination Subversion
+ repository. This is useful in cases where the source SVN
+ repository is read-only. This option overrides configuration
+ property 'commiturl'.
++
+ git config --get-all svn-remote.<name>.commiturl
++
+
'tag'::
Create a tag in the SVN repository. This is a shorthand for
'branch -t'.
@@ -616,6 +631,12 @@ svn-remote.<name>.rewriteRoot::
the repository with a public http:// or svn:// URL in the
metadata so users of it will see the public URL.
+svn-remote.<name>.rewriteUUID::
+ Similar to the useSvmProps option; this is for users who need
+ to remap the UUID manually. This may be useful in situations
+ where the original UUID is not available via either useSvmProps
+ or useSvnsyncProps.
+
svn.brokenSymlinkWorkaround::
This disables potentially expensive checks to workaround
broken symlinks checked into SVN by broken clients. Set this
@@ -625,13 +646,14 @@ svn.brokenSymlinkWorkaround::
revision fetched. If unset, 'git svn' assumes this option to
be "true".
-Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
+Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps
options all affect the metadata generated and used by 'git svn'; they
*must* be set in the configuration file before any history is imported
and these settings should never be changed once they are set.
-Additionally, only one of these four options can be used per-svn-remote
-section because they affect the 'git-svn-id:' metadata line.
+Additionally, only one of these options can be used per svn-remote
+section because they affect the 'git-svn-id:' metadata line, except
+for rewriteRoot and rewriteUUID which can be used together.
BASIC EXAMPLES
@@ -816,6 +838,22 @@ 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 'git config'.
+It is also possible to fetch a subset of branches or tags by using a
+comma-separated list of names within braces. For example:
+
+------------------------------------------------------------------------
+[svn-remote "huge-project"]
+ url = http://server.org/svn
+ fetch = trunk/src:refs/remotes/trunk
+ branches = branches/{red,green}/src:refs/remotes/branches/*
+ tags = tags/{1.0,2.0}/src:refs/remotes/tags/*
+------------------------------------------------------------------------
+
+Note that git-svn keeps track of the highest revision in which a branch
+or tag has appeared. If the subset of branches or tags is changed after
+fetching, then .git/svn/.metadata must be manually edited to remove (or
+reset) branches-maxRev and/or tags-maxRev as appropriate.
+
SEE ALSO
--------
linkgit:git-rebase[1]
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
index bb981822a4..458f3e2755 100644
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -8,7 +8,7 @@ git-var - Show a git logical variable
SYNOPSIS
--------
-'git var' [ -l | <variable> ]
+'git var' ( -l | <variable> )
DESCRIPTION
-----------
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 8c5f5b05cb..4e00b315ff 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,18 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v1.6.6.1/git.html[documentation for release 1.6.6.1]
+* link:v1.7.0.3/git.html[documentation for release 1.7.0.3]
* release notes for
+ link:RelNotes-1.7.0.3.txt[1.7.0.3],
+ link:RelNotes-1.7.0.2.txt[1.7.0.2],
+ link:RelNotes-1.7.0.1.txt[1.7.0.1],
+ link:RelNotes-1.7.0.txt[1.7.0].
+
+* link:v1.6.6.2/git.html[documentation for release 1.6.6.2]
+
+* release notes for
+ link:RelNotes-1.6.6.2.txt[1.6.6.2],
link:RelNotes-1.6.6.1.txt[1.6.6.1],
link:RelNotes-1.6.6.txt[1.6.6].
@@ -223,7 +232,10 @@ help ...`.
-p::
--paginate::
- Pipe all output into 'less' (or if set, $PAGER).
+ Pipe all output into 'less' (or if set, $PAGER) if standard
+ output is a terminal. This overrides the `pager.<cmd>`
+ configuration options (see the "Configuration Mechanism" section
+ below).
--no-pager::
Do not pipe git output into a pager.
@@ -395,7 +407,8 @@ people. Here is an example:
------------
Various commands read from the configuration file and adjust
-their operation accordingly.
+their operation accordingly. See linkgit:git-config[1] for a
+list.
Identifier Terminology
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index b396a871b3..d892e642ed 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -511,7 +511,8 @@ command to run to merge ancestor's version (`%O`), current
version (`%A`) and the other branches' version (`%B`). These
three tokens are replaced with the names of temporary files that
hold the contents of these versions when the command line is
-built.
+built. Additionally, %L will be replaced with the conflict marker
+size (see below).
The merge driver is expected to leave the result of the merge in
the file named with `%A` by overwriting it, and exit with zero
diff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt
index dcdea54df3..9de8caf5d1 100644
--- a/Documentation/gitdiffcore.txt
+++ b/Documentation/gitdiffcore.txt
@@ -3,7 +3,7 @@ gitdiffcore(7)
NAME
----
-gitdiffcore - Tweaking diff output (June 2005)
+gitdiffcore - Tweaking diff output
SYNOPSIS
--------
diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt
index 3b83dba1a0..37ce9a17fc 100644
--- a/Documentation/merge-options.txt
+++ b/Documentation/merge-options.txt
@@ -67,6 +67,7 @@ option can be used to override --squash.
Synonyms to --stat and --no-stat; these are deprecated and will be
removed in the future.
+ifndef::git-pull[]
-q::
--quiet::
Operate quietly.
@@ -74,6 +75,7 @@ option can be used to override --squash.
-v::
--verbose::
Be verbose.
+endif::git-pull[]
-X <option>::
--strategy-option=<option>::
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 3ef71179d9..b9fb7a86bd 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -108,8 +108,8 @@ 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
+ With this option, diff output for a merge commit
+ 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.
@@ -121,6 +121,15 @@ options may be given. See linkgit:git-diff-files[1] for more options.
the parents have only two variants and the merge result picks
one of them without modification.
+-m::
+
+ This flag makes the merge commits show the full diff like
+ regular commits; for each merge parent, a separate log entry
+ and diff is generated. An exception is that only diff against
+ the first parent is shown when '--first-parent' option is given;
+ in that case, the output represents the changes the merge
+ brought _into_ the then-current branch.
+
-r::
Show recursive diffs.
@@ -225,43 +234,43 @@ endif::git-rev-list[]
--all::
- Pretend as if all the refs in `$GIT_DIR/refs/` are listed on the
+ Pretend as if all the refs in `refs/` are listed on the
command line as '<commit>'.
--branches[=pattern]::
- Pretend as if all the refs in `$GIT_DIR/refs/heads` are listed
+ Pretend as if all the refs in `refs/heads` are listed
on the command line as '<commit>'. If `pattern` is given, limit
branches to ones matching given shell glob. If pattern lacks '?',
- '*', or '[', '/*' at the end is impiled.
+ '*', or '[', '/*' at the end is implied.
--tags[=pattern]::
- Pretend as if all the refs in `$GIT_DIR/refs/tags` are listed
+ Pretend as if all the refs in `refs/tags` are listed
on the command line as '<commit>'. If `pattern` is given, limit
tags to ones matching given shell glob. If pattern lacks '?', '*',
- or '[', '/*' at the end is impiled.
+ or '[', '/*' at the end is implied.
--remotes[=pattern]::
- Pretend as if all the refs in `$GIT_DIR/refs/remotes` are listed
+ Pretend as if all the refs in `refs/remotes` are listed
on the command line as '<commit>'. If `pattern`is given, limit
remote tracking branches to ones matching given shell glob.
- If pattern lacks '?', '*', or '[', '/*' at the end is impiled.
+ If pattern lacks '?', '*', or '[', '/*' at the end is implied.
--glob=glob-pattern::
Pretend as if all the refs matching shell glob `glob-pattern`
are listed on the command line as '<commit>'. Leading 'refs/',
is automatically prepended if missing. If pattern lacks '?', '*',
- or '[', '/*' at the end is impiled.
+ or '[', '/*' at the end is implied.
ifndef::git-rev-list[]
--bisect::
- Pretend as if the bad bisection ref `$GIT_DIR/refs/bisect/bad`
+ Pretend as if the bad bisection ref `refs/bisect/bad`
was listed and as if it was followed by `--not` and the good
- bisection refs `$GIT_DIR/refs/bisect/good-*` on the command
+ bisection refs `refs/bisect/good-*` on the command
line.
endif::git-rev-list[]
@@ -561,10 +570,10 @@ Bisection Helpers
Limit output to the one commit object which is roughly halfway between
included and excluded commits. Note that the bad bisection ref
-`$GIT_DIR/refs/bisect/bad` is added to the included commits (if it
-exists) and the good bisection refs `$GIT_DIR/refs/bisect/good-*` are
+`refs/bisect/bad` is added to the included commits (if it
+exists) and the good bisection refs `refs/bisect/good-*` are
added to the excluded commits (if they exist). Thus, supposing there
-are no refs in `$GIT_DIR/refs/bisect/`, if
+are no refs in `refs/bisect/`, if
-----------------------------------------------------------------------
$ git rev-list --bisect foo ^bar ^baz
@@ -585,7 +594,7 @@ one.
--bisect-vars::
This calculates the same as `--bisect`, except that refs in
-`$GIT_DIR/refs/bisect/` are not used, and except that this outputs
+`refs/bisect/` are not used, and except that this 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
@@ -599,7 +608,7 @@ number of commits to be tested if `bisect_rev` turns out to be bad to
This outputs all the commit objects between the included and excluded
commits, ordered by their distance to the included and excluded
-commits. Refs in `$GIT_DIR/refs/bisect/` are not used. The farthest
+commits. Refs in `refs/bisect/` are not used. The farthest
from them is displayed first. (This is the only one displayed by
`--bisect`.)
+
diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt
index 50f9e9ac17..312e3b2e2b 100644
--- a/Documentation/technical/api-parse-options.txt
+++ b/Documentation/technical/api-parse-options.txt
@@ -115,6 +115,9 @@ There are some macros to easily define options:
`OPT__ABBREV(&int_var)`::
Add `\--abbrev[=<n>]`.
+`OPT__COLOR(&int_var, description)`::
+ Add `\--color[=<when>]` and `--no-color`.
+
`OPT__DRY_RUN(&int_var)`::
Add `-n, \--dry-run`.
@@ -183,6 +186,15 @@ There are some macros to easily define options:
arguments. Short options that happen to be digits take
precedence over it.
+`OPT_COLOR_FLAG(short, long, &int_var, description)`::
+ Introduce an option that takes an optional argument that can
+ have one of three values: "always", "never", or "auto". If the
+ argument is not given, it defaults to "always". The `--no-` form
+ works like `--long=never`; it cannot take an argument. If
+ "always", set `int_var` to 1; if "never", set `int_var` to 0; if
+ "auto", set `int_var` to 1 if stdout is a tty or a pager,
+ 0 otherwise.
+
The last element of the array must be `OPT_END()`.
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt
index b26c28133c..44876fa703 100644
--- a/Documentation/technical/api-run-command.txt
+++ b/Documentation/technical/api-run-command.txt
@@ -51,7 +51,7 @@ The functions above do the following:
ENOENT; a diagnostic is printed only if .silent_exec_failure is 0.
. Otherwise, the program is run. If it terminates regularly, its exit
- code is returned. No diagnistic is printed, even if the exit code is
+ code is returned. No diagnostic is printed, even if the exit code is
non-zero.
. If the program terminated due to a signal, then the return value is the
@@ -64,8 +64,8 @@ The functions above do the following:
`start_async`::
Run a function asynchronously. Takes a pointer to a `struct
- async` that specifies the details and returns a pipe FD
- from which the caller reads. See below for details.
+ async` that specifies the details and returns a set of pipe FDs
+ for communication with the function. See below for details.
`finish_async`::
@@ -135,7 +135,7 @@ stderr as follows:
.in: The FD must be readable; it becomes child's stdin.
.out: The FD must be writable; it becomes child's stdout.
- .err > 0 is not supported.
+ .err: The FD must be writable; it becomes child's stderr.
The specified FD is closed by start_command(), even if it fails to
run the sub-process!
@@ -180,17 +180,47 @@ The caller:
struct async variable;
2. initializes .proc and .data;
3. calls start_async();
-4. processes the data by reading from the fd in .out;
-5. closes .out;
+4. processes communicates with proc through .in and .out;
+5. closes .in and .out;
6. calls finish_async().
+The members .in, .out are used to provide a set of fd's for
+communication between the caller and the callee as follows:
+
+. Specify 0 to have no file descriptor passed. The callee will
+ receive -1 in the corresponding argument.
+
+. Specify < 0 to have a pipe allocated; start_async() replaces
+ with the pipe FD in the following way:
+
+ .in: Returns the writable pipe end into which the caller
+ writes; the readable end of the pipe becomes the function's
+ in argument.
+
+ .out: Returns the readable pipe end from which the caller
+ reads; the writable end of the pipe becomes the function's
+ out argument.
+
+ The caller of start_async() must close the returned FDs after it
+ has completed reading from/writing from them.
+
+. Specify a file descriptor > 0 to be used by the function:
+
+ .in: The FD must be readable; it becomes the function's in.
+ .out: The FD must be writable; it becomes the function's out.
+
+ The specified FD is closed by start_async(), even if it fails to
+ run the function.
+
The function pointer in .proc has the following signature:
- int proc(int fd, void *data);
+ int proc(int in, int out, void *data);
-. fd specifies a writable file descriptor to which the function must
- write the data that it produces. The function *must* close this
- descriptor before it returns.
+. in, out specifies a set of file descriptors to which the function
+ must read/write the data that it needs/produces. The function
+ *must* close these descriptors before it returns. A descriptor
+ may be -1 if the caller did not configure a descriptor for that
+ direction.
. data is the value that the caller has specified in the .data member
of struct async.
@@ -205,8 +235,8 @@ because this facility is implemented by a pipe to a forked process on
UNIX, but by a thread in the same address space on Windows:
. It cannot change the program's state (global variables, environment,
- etc.) in a way that the caller notices; in other words, .out is the
- only communication channel to the caller.
+ etc.) in a way that the caller notices; in other words, .in and .out
+ are the only communication channels to the caller.
. It must not change the program's state that the caller of the
facility also uses.
diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt
index 7950eeeda4..9a5cdafa9c 100644
--- a/Documentation/technical/pack-protocol.txt
+++ b/Documentation/technical/pack-protocol.txt
@@ -149,7 +149,7 @@ advertisement list at all, but other refs may still appear.
The stream MUST include capability declarations behind a NUL on the
first ref. The peeled value of a ref (that is "ref^{}") MUST be
immediately after the ref itself, if presented. A conforming server
-MUST peel the ref if its an annotated tag.
+MUST peel the ref if it's an annotated tag.
----
advertised-refs = (no-refs / list-of-refs)
@@ -261,7 +261,7 @@ Without either multi_ack or multi_ack_detailed:
* upload-pack sends "NAK" on a flush-pkt if no common object
has been found yet. If one has been found, and thus an ACK
- was already sent, its silent on the flush-pkt.
+ was already sent, it's silent on the flush-pkt.
After the client has gotten enough ACK responses that it can determine
that the server has enough information to send an efficient packfile
@@ -271,9 +271,9 @@ as common with the server, or the --date-order queue is empty), or the
client determines that it wants to give up (in the canonical implementation,
this is determined when the client sends 256 'have' lines without getting
any of them ACKed by the server - meaning there is nothing in common and
-the server should just send all it's objects), then the client will send
+the server should just send all of its objects), then the client will send
a 'done' command. The 'done' command signals to the server that the client
-is ready to receive it's packfile data.
+is ready to receive its packfile data.
However, the 256 limit *only* turns on in the canonical client
implementation if we have received at least one "ACK %s continue"
@@ -286,7 +286,7 @@ ACK after 'done' if there is at least one common base and multi_ack or
multi_ack_detailed is enabled. The server always sends NAK after 'done'
if there is no common base found.
-Then the server will start sending it's packfile data.
+Then the server will start sending its packfile data.
----
server-response = *ack_multi ack / nak
diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
index 1892d3eeac..fd1a593149 100644
--- a/Documentation/technical/protocol-capabilities.txt
+++ b/Documentation/technical/protocol-capabilities.txt
@@ -60,7 +60,7 @@ doesn't, as in the following diagram:
If the client wants x,y and starts out by saying have F,S, the server
doesn't know what F,S is. Eventually the client says "have d" and
the server sends "ACK d continue" to let the client know to stop
-walking down that line (so don't send c-b-a), but its not done yet,
+walking down that line (so don't send c-b-a), but it's not done yet,
it needs a base for x. The client keeps going with S-R-Q, until a
gets reached, at which point the server has a clear base and it all
ends.
@@ -181,7 +181,7 @@ delete-refs
-----------
If the server sends back the 'delete-refs' capability, it means that
-it is capable of accepting an zero-id value as the target
+it is capable of accepting a zero-id value as the target
value of a reference update. It is not sent back by the client, it
simply informs the client that it can be sent zero-id values
to delete references.
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index d813ceb723..459a394dc0 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -4,7 +4,6 @@ GIT URLS[[URLS]]
One of the following notations can be used
to name the remote repository:
-===============================================================
- rsync://host.xz/path/to/repo.git/
- http://host.xz{startsb}:port{endsb}/path/to/repo.git/
- https://host.xz{startsb}:port{endsb}/path/to/repo.git/
@@ -14,7 +13,6 @@ to name the remote repository:
- ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
- ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
- ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git
-===============================================================
SSH is the default transport protocol over the network. You can
optionally specify which user to log-in as, and an alternate,
@@ -23,18 +21,14 @@ username expansion, as does the native git protocol, but
only the former supports port specification. The following
three are identical to the last three above, respectively:
-===============================================================
- {startsb}user@{endsb}host.xz:/path/to/repo.git/
- {startsb}user@{endsb}host.xz:~user/path/to/repo.git/
- {startsb}user@{endsb}host.xz:path/to/repo.git
-===============================================================
To sync with a local directory, you can use:
-===============================================================
- /path/to/repo.git/
- file:///path/to/repo.git/
-===============================================================
ifndef::git-clone[]
They are mostly equivalent, except when cloning. See
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index b169836684..fe6fb722da 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1196,7 +1196,7 @@ the time, you will want to commit your changes before you can merge,
and if you don't, then linkgit:git-stash[1] can take these changes
away while you're doing the merge, and reapply them afterwards.
-If the changes are independant enough, Git will automatically complete
+If the changes are independent enough, Git will automatically complete
the merge and commit the result (or reuse an existing commit in case
of <<fast-forwards,fast-forward>>, see below). On the other hand,
if there are conflicts--for example, if the same file is
@@ -3640,6 +3640,26 @@ Did you forget to 'git add'?
Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path 'a'
-------------------------------------------------
+In older git versions it could be easily forgotten to commit new or modified
+files in a submodule, which silently leads to similar problems as not pushing
+the submodule changes. Starting with git 1.7.0 both "git status" and "git diff"
+in the superproject show submodules as modified when they contain new or
+modified files to protect against accidentally committing such a state. "git
+diff" will also add a "-dirty" to the work tree side when generating patch
+output or used with the --submodule option:
+
+-------------------------------------------------
+$ git diff
+diff --git a/sub b/sub
+--- a/sub
++++ b/sub
+@@ -1 +1 @@
+-Subproject commit 3f356705649b5d566d97ff843cf193359229a453
++Subproject commit 3f356705649b5d566d97ff843cf193359229a453-dirty
+$ git diff --submodule
+Submodule sub 3f35670..3f35670-dirty:
+-------------------------------------------------
+
You also should not rewind branches in a submodule beyond commits that were
ever recorded in any superproject.
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index a7d8c63427..076c18ecc3 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v1.6.6.GIT
+DEF_VER=v1.7.0.3
LF='
'
diff --git a/Makefile b/Makefile
index 1f95f93f76..3a6c6ea525 100644
--- a/Makefile
+++ b/Makefile
@@ -180,9 +180,6 @@ all::
# If not set it defaults to the bare 'wish'. If it is set to the empty
# string then NO_TCLTK will be forced (this is used by configure script).
#
-# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit
-# parallel delta searching when packing objects.
-#
# Define INTERNAL_QSORT to use Git's implementation of qsort(), which
# is a simplified version of the merge sort used in glibc. This is
# recommended if Git triggers O(n^2) behavior in your platform's qsort().
@@ -217,6 +214,13 @@ all::
# DEFAULT_EDITOR='~/bin/vi',
# DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
# DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
+#
+# Define COMPUTE_HEADER_DEPENDENCIES if your compiler supports the -MMD option
+# and you want to avoid rebuilding objects when an unrelated header file
+# changes.
+#
+# Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded
+# dependency rules.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -278,29 +282,6 @@ pathsep = :
# JavaScript minifier invocation that can function as filter
JSMIN =
-# default configuration for gitweb
-GITWEB_CONFIG = gitweb_config.perl
-GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf
-GITWEB_HOME_LINK_STR = projects
-GITWEB_SITENAME =
-GITWEB_PROJECTROOT = /pub/git
-GITWEB_PROJECT_MAXDEPTH = 2007
-GITWEB_EXPORT_OK =
-GITWEB_STRICT_EXPORT =
-GITWEB_BASE_URL =
-GITWEB_LIST =
-GITWEB_HOMETEXT = indextext.html
-GITWEB_CSS = gitweb.css
-GITWEB_LOGO = git-logo.png
-GITWEB_FAVICON = git-favicon.png
-ifdef JSMIN
-GITWEB_JS = gitweb.min.js
-else
-GITWEB_JS = gitweb.js
-endif
-GITWEB_SITE_HEADER =
-GITWEB_SITE_FOOTER =
-
export prefix bindir sharedir sysconfdir
CC = gcc
@@ -327,7 +308,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
# Those must not be GNU-specific; they are shared with perl/ which may
# be built by a different compiler. (Note that this is an artifact now
# but it still might be nice to keep that distinction.)
-BASIC_CFLAGS =
+BASIC_CFLAGS = -I.
BASIC_LDFLAGS =
# Guard against environment variables
@@ -335,13 +316,22 @@ BUILTIN_OBJS =
BUILT_INS =
COMPAT_CFLAGS =
COMPAT_OBJS =
+EXTRA_CPPFLAGS =
LIB_H =
LIB_OBJS =
+PROGRAM_OBJS =
PROGRAMS =
SCRIPT_PERL =
SCRIPT_PYTHON =
SCRIPT_SH =
-TEST_PROGRAMS =
+SCRIPT_LIB =
+TEST_PROGRAMS_NEED_X =
+
+# Having this variable in your environment would break pipelines because
+# you cause "cd" to echo its destination to stdout. It can also take
+# scripts to unexpected places. If you like CDPATH, define it for your
+# interactive shell sessions without exporting it.
+unexport CDPATH
SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh
@@ -352,19 +342,20 @@ SCRIPT_SH += git-merge-octopus.sh
SCRIPT_SH += git-merge-one-file.sh
SCRIPT_SH += git-merge-resolve.sh
SCRIPT_SH += git-mergetool.sh
-SCRIPT_SH += git-mergetool--lib.sh
-SCRIPT_SH += git-parse-remote.sh
SCRIPT_SH += git-pull.sh
SCRIPT_SH += git-quiltimport.sh
SCRIPT_SH += git-rebase--interactive.sh
SCRIPT_SH += git-rebase.sh
SCRIPT_SH += git-repack.sh
SCRIPT_SH += git-request-pull.sh
-SCRIPT_SH += git-sh-setup.sh
SCRIPT_SH += git-stash.sh
SCRIPT_SH += git-submodule.sh
SCRIPT_SH += git-web--browse.sh
+SCRIPT_LIB += git-mergetool--lib
+SCRIPT_LIB += git-parse-remote
+SCRIPT_LIB += git-sh-setup
+
SCRIPT_PERL += git-add--interactive.perl
SCRIPT_PERL += git-difftool.perl
SCRIPT_PERL += git-archimport.perl
@@ -385,16 +376,35 @@ EXTRA_PROGRAMS =
# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS += $(EXTRA_PROGRAMS)
-PROGRAMS += git-fast-import$X
-PROGRAMS += git-imap-send$X
-PROGRAMS += git-shell$X
-PROGRAMS += git-show-index$X
-PROGRAMS += git-upload-pack$X
-PROGRAMS += git-http-backend$X
+
+PROGRAM_OBJS += fast-import.o
+PROGRAM_OBJS += imap-send.o
+PROGRAM_OBJS += shell.o
+PROGRAM_OBJS += show-index.o
+PROGRAM_OBJS += upload-pack.o
+PROGRAM_OBJS += http-backend.o
+
+PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
+
+TEST_PROGRAMS_NEED_X += test-chmtime
+TEST_PROGRAMS_NEED_X += test-ctype
+TEST_PROGRAMS_NEED_X += test-date
+TEST_PROGRAMS_NEED_X += test-delta
+TEST_PROGRAMS_NEED_X += test-dump-cache-tree
+TEST_PROGRAMS_NEED_X += test-genrandom
+TEST_PROGRAMS_NEED_X += test-match-trees
+TEST_PROGRAMS_NEED_X += test-parse-options
+TEST_PROGRAMS_NEED_X += test-path-utils
+TEST_PROGRAMS_NEED_X += test-run-command
+TEST_PROGRAMS_NEED_X += test-sha1
+TEST_PROGRAMS_NEED_X += test-sigchain
+TEST_PROGRAMS_NEED_X += test-index-version
+
+TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
# List built-in command $C whose implementation cmd_$C() is not in
-# builtin-$C.o but is linked in as part of some other command.
-BUILT_INS += $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
+# builtin/$C.o but is linked in as part of some other command.
+BUILT_INS += $(patsubst builtin/%.o,git-%$X,$(BUILTIN_OBJS))
BUILT_INS += git-cherry$X
BUILT_INS += git-cherry-pick$X
@@ -450,6 +460,7 @@ LIB_H += blob.h
LIB_H += builtin.h
LIB_H += cache.h
LIB_H += cache-tree.h
+LIB_H += color.h
LIB_H += commit.h
LIB_H += compat/bswap.h
LIB_H += compat/cygwin.h
@@ -461,6 +472,7 @@ LIB_H += delta.h
LIB_H += diffcore.h
LIB_H += diff.h
LIB_H += dir.h
+LIB_H += exec_cmd.h
LIB_H += fsck.h
LIB_H += git-compat-util.h
LIB_H += graph.h
@@ -503,7 +515,8 @@ LIB_H += tree-walk.h
LIB_H += unpack-trees.h
LIB_H += userdiff.h
LIB_H += utf8.h
-LIB_H += wt-status.h
+LIB_H += xdiff-interface.h
+LIB_H += xdiff/xdiff.h
LIB_OBJS += abspath.o
LIB_OBJS += advice.o
@@ -617,96 +630,96 @@ LIB_OBJS += ws.o
LIB_OBJS += wt-status.o
LIB_OBJS += xdiff-interface.o
-BUILTIN_OBJS += builtin-add.o
-BUILTIN_OBJS += builtin-annotate.o
-BUILTIN_OBJS += builtin-apply.o
-BUILTIN_OBJS += builtin-archive.o
-BUILTIN_OBJS += builtin-bisect--helper.o
-BUILTIN_OBJS += builtin-blame.o
-BUILTIN_OBJS += builtin-branch.o
-BUILTIN_OBJS += builtin-bundle.o
-BUILTIN_OBJS += builtin-cat-file.o
-BUILTIN_OBJS += builtin-check-attr.o
-BUILTIN_OBJS += builtin-check-ref-format.o
-BUILTIN_OBJS += builtin-checkout-index.o
-BUILTIN_OBJS += builtin-checkout.o
-BUILTIN_OBJS += builtin-clean.o
-BUILTIN_OBJS += builtin-clone.o
-BUILTIN_OBJS += builtin-commit-tree.o
-BUILTIN_OBJS += builtin-commit.o
-BUILTIN_OBJS += builtin-config.o
-BUILTIN_OBJS += builtin-count-objects.o
-BUILTIN_OBJS += builtin-describe.o
-BUILTIN_OBJS += builtin-diff-files.o
-BUILTIN_OBJS += builtin-diff-index.o
-BUILTIN_OBJS += builtin-diff-tree.o
-BUILTIN_OBJS += builtin-diff.o
-BUILTIN_OBJS += builtin-fast-export.o
-BUILTIN_OBJS += builtin-fetch-pack.o
-BUILTIN_OBJS += builtin-fetch.o
-BUILTIN_OBJS += builtin-fmt-merge-msg.o
-BUILTIN_OBJS += builtin-for-each-ref.o
-BUILTIN_OBJS += builtin-fsck.o
-BUILTIN_OBJS += builtin-gc.o
-BUILTIN_OBJS += builtin-grep.o
-BUILTIN_OBJS += builtin-hash-object.o
-BUILTIN_OBJS += builtin-help.o
-BUILTIN_OBJS += builtin-index-pack.o
-BUILTIN_OBJS += builtin-init-db.o
-BUILTIN_OBJS += builtin-log.o
-BUILTIN_OBJS += builtin-ls-files.o
-BUILTIN_OBJS += builtin-ls-remote.o
-BUILTIN_OBJS += builtin-ls-tree.o
-BUILTIN_OBJS += builtin-mailinfo.o
-BUILTIN_OBJS += builtin-mailsplit.o
-BUILTIN_OBJS += builtin-merge.o
-BUILTIN_OBJS += builtin-merge-base.o
-BUILTIN_OBJS += builtin-merge-file.o
-BUILTIN_OBJS += builtin-merge-index.o
-BUILTIN_OBJS += builtin-merge-ours.o
-BUILTIN_OBJS += builtin-merge-recursive.o
-BUILTIN_OBJS += builtin-merge-tree.o
-BUILTIN_OBJS += builtin-mktag.o
-BUILTIN_OBJS += builtin-mktree.o
-BUILTIN_OBJS += builtin-mv.o
-BUILTIN_OBJS += builtin-name-rev.o
-BUILTIN_OBJS += builtin-notes.o
-BUILTIN_OBJS += builtin-pack-objects.o
-BUILTIN_OBJS += builtin-pack-redundant.o
-BUILTIN_OBJS += builtin-pack-refs.o
-BUILTIN_OBJS += builtin-patch-id.o
-BUILTIN_OBJS += builtin-prune-packed.o
-BUILTIN_OBJS += builtin-prune.o
-BUILTIN_OBJS += builtin-push.o
-BUILTIN_OBJS += builtin-read-tree.o
-BUILTIN_OBJS += builtin-receive-pack.o
-BUILTIN_OBJS += builtin-reflog.o
-BUILTIN_OBJS += builtin-remote.o
-BUILTIN_OBJS += builtin-replace.o
-BUILTIN_OBJS += builtin-rerere.o
-BUILTIN_OBJS += builtin-reset.o
-BUILTIN_OBJS += builtin-rev-list.o
-BUILTIN_OBJS += builtin-rev-parse.o
-BUILTIN_OBJS += builtin-revert.o
-BUILTIN_OBJS += builtin-rm.o
-BUILTIN_OBJS += builtin-send-pack.o
-BUILTIN_OBJS += builtin-shortlog.o
-BUILTIN_OBJS += builtin-show-branch.o
-BUILTIN_OBJS += builtin-show-ref.o
-BUILTIN_OBJS += builtin-stripspace.o
-BUILTIN_OBJS += builtin-symbolic-ref.o
-BUILTIN_OBJS += builtin-tag.o
-BUILTIN_OBJS += builtin-tar-tree.o
-BUILTIN_OBJS += builtin-unpack-file.o
-BUILTIN_OBJS += builtin-unpack-objects.o
-BUILTIN_OBJS += builtin-update-index.o
-BUILTIN_OBJS += builtin-update-ref.o
-BUILTIN_OBJS += builtin-update-server-info.o
-BUILTIN_OBJS += builtin-upload-archive.o
-BUILTIN_OBJS += builtin-var.o
-BUILTIN_OBJS += builtin-verify-pack.o
-BUILTIN_OBJS += builtin-verify-tag.o
-BUILTIN_OBJS += builtin-write-tree.o
+BUILTIN_OBJS += builtin/add.o
+BUILTIN_OBJS += builtin/annotate.o
+BUILTIN_OBJS += builtin/apply.o
+BUILTIN_OBJS += builtin/archive.o
+BUILTIN_OBJS += builtin/bisect--helper.o
+BUILTIN_OBJS += builtin/blame.o
+BUILTIN_OBJS += builtin/branch.o
+BUILTIN_OBJS += builtin/bundle.o
+BUILTIN_OBJS += builtin/cat-file.o
+BUILTIN_OBJS += builtin/check-attr.o
+BUILTIN_OBJS += builtin/check-ref-format.o
+BUILTIN_OBJS += builtin/checkout-index.o
+BUILTIN_OBJS += builtin/checkout.o
+BUILTIN_OBJS += builtin/clean.o
+BUILTIN_OBJS += builtin/clone.o
+BUILTIN_OBJS += builtin/commit-tree.o
+BUILTIN_OBJS += builtin/commit.o
+BUILTIN_OBJS += builtin/config.o
+BUILTIN_OBJS += builtin/count-objects.o
+BUILTIN_OBJS += builtin/describe.o
+BUILTIN_OBJS += builtin/diff-files.o
+BUILTIN_OBJS += builtin/diff-index.o
+BUILTIN_OBJS += builtin/diff-tree.o
+BUILTIN_OBJS += builtin/diff.o
+BUILTIN_OBJS += builtin/fast-export.o
+BUILTIN_OBJS += builtin/fetch-pack.o
+BUILTIN_OBJS += builtin/fetch.o
+BUILTIN_OBJS += builtin/fmt-merge-msg.o
+BUILTIN_OBJS += builtin/for-each-ref.o
+BUILTIN_OBJS += builtin/fsck.o
+BUILTIN_OBJS += builtin/gc.o
+BUILTIN_OBJS += builtin/grep.o
+BUILTIN_OBJS += builtin/hash-object.o
+BUILTIN_OBJS += builtin/help.o
+BUILTIN_OBJS += builtin/index-pack.o
+BUILTIN_OBJS += builtin/init-db.o
+BUILTIN_OBJS += builtin/log.o
+BUILTIN_OBJS += builtin/ls-files.o
+BUILTIN_OBJS += builtin/ls-remote.o
+BUILTIN_OBJS += builtin/ls-tree.o
+BUILTIN_OBJS += builtin/mailinfo.o
+BUILTIN_OBJS += builtin/mailsplit.o
+BUILTIN_OBJS += builtin/merge.o
+BUILTIN_OBJS += builtin/merge-base.o
+BUILTIN_OBJS += builtin/merge-file.o
+BUILTIN_OBJS += builtin/merge-index.o
+BUILTIN_OBJS += builtin/merge-ours.o
+BUILTIN_OBJS += builtin/merge-recursive.o
+BUILTIN_OBJS += builtin/merge-tree.o
+BUILTIN_OBJS += builtin/mktag.o
+BUILTIN_OBJS += builtin/mktree.o
+BUILTIN_OBJS += builtin/mv.o
+BUILTIN_OBJS += builtin/name-rev.o
+BUILTIN_OBJS += builtin/notes.o
+BUILTIN_OBJS += builtin/pack-objects.o
+BUILTIN_OBJS += builtin/pack-redundant.o
+BUILTIN_OBJS += builtin/pack-refs.o
+BUILTIN_OBJS += builtin/patch-id.o
+BUILTIN_OBJS += builtin/prune-packed.o
+BUILTIN_OBJS += builtin/prune.o
+BUILTIN_OBJS += builtin/push.o
+BUILTIN_OBJS += builtin/read-tree.o
+BUILTIN_OBJS += builtin/receive-pack.o
+BUILTIN_OBJS += builtin/reflog.o
+BUILTIN_OBJS += builtin/remote.o
+BUILTIN_OBJS += builtin/replace.o
+BUILTIN_OBJS += builtin/rerere.o
+BUILTIN_OBJS += builtin/reset.o
+BUILTIN_OBJS += builtin/rev-list.o
+BUILTIN_OBJS += builtin/rev-parse.o
+BUILTIN_OBJS += builtin/revert.o
+BUILTIN_OBJS += builtin/rm.o
+BUILTIN_OBJS += builtin/send-pack.o
+BUILTIN_OBJS += builtin/shortlog.o
+BUILTIN_OBJS += builtin/show-branch.o
+BUILTIN_OBJS += builtin/show-ref.o
+BUILTIN_OBJS += builtin/stripspace.o
+BUILTIN_OBJS += builtin/symbolic-ref.o
+BUILTIN_OBJS += builtin/tag.o
+BUILTIN_OBJS += builtin/tar-tree.o
+BUILTIN_OBJS += builtin/unpack-file.o
+BUILTIN_OBJS += builtin/unpack-objects.o
+BUILTIN_OBJS += builtin/update-index.o
+BUILTIN_OBJS += builtin/update-ref.o
+BUILTIN_OBJS += builtin/update-server-info.o
+BUILTIN_OBJS += builtin/upload-archive.o
+BUILTIN_OBJS += builtin/var.o
+BUILTIN_OBJS += builtin/verify-pack.o
+BUILTIN_OBJS += builtin/verify-tag.o
+BUILTIN_OBJS += builtin/write-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
@@ -722,12 +735,10 @@ EXTLIBS =
ifeq ($(uname_S),Linux)
NO_STRLCPY = YesPlease
NO_MKSTEMPS = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),GNU/kFreeBSD)
NO_STRLCPY = YesPlease
NO_MKSTEMPS = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),UnixWare)
CC = cc
@@ -781,7 +792,6 @@ ifeq ($(uname_S),Darwin)
NO_STRLCPY = YesPlease
endif
NO_MEMMEM = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
USE_ST_TIMESPEC = YesPlease
endif
ifeq ($(uname_S),SunOS)
@@ -794,7 +804,6 @@ ifeq ($(uname_S),SunOS)
NO_MKDTEMP = YesPlease
NO_MKSTEMPS = YesPlease
NO_REGEX = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
ifeq ($(uname_R),5.7)
NEEDS_RESOLV = YesPlease
NO_IPV6 = YesPlease
@@ -850,7 +859,6 @@ ifeq ($(uname_S),FreeBSD)
BASIC_LDFLAGS += -L/usr/local/lib
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
USE_ST_TIMESPEC = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
PTHREAD_LIBS = -pthread
NO_UINTMAX_T = YesPlease
@@ -864,7 +872,6 @@ ifeq ($(uname_S),OpenBSD)
NEEDS_LIBICONV = YesPlease
BASIC_CFLAGS += -I/usr/local/include
BASIC_LDFLAGS += -L/usr/local/lib
- THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),NetBSD)
ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
@@ -872,7 +879,6 @@ ifeq ($(uname_S),NetBSD)
endif
BASIC_CFLAGS += -I/usr/pkg/include
BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
- THREADED_DELTA_SEARCH = YesPlease
USE_ST_TIMESPEC = YesPlease
NO_MKSTEMPS = YesPlease
endif
@@ -887,9 +893,7 @@ ifeq ($(uname_S),AIX)
INTERNAL_QSORT = UnfortunatelyYes
NEEDS_LIBICONV=YesPlease
BASIC_CFLAGS += -D_LARGE_FILES
- ifneq ($(shell expr "$(uname_V)" : '[1234]'),1)
- THREADED_DELTA_SEARCH = YesPlease
- else
+ ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
NO_PTHREADS = YesPlease
endif
endif
@@ -915,7 +919,6 @@ ifeq ($(uname_S),IRIX)
SNPRINTF_RETURNS_BOGUS = YesPlease
SHELL_PATH = /usr/gnu/bin/bash
NEEDS_LIBGEN = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),IRIX64)
NO_SETENV=YesPlease
@@ -934,7 +937,6 @@ ifeq ($(uname_S),IRIX64)
SNPRINTF_RETURNS_BOGUS = YesPlease
SHELL_PATH=/usr/gnu/bin/bash
NEEDS_LIBGEN = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
endif
ifeq ($(uname_S),HP-UX)
NO_IPV6=YesPlease
@@ -984,7 +986,6 @@ ifeq ($(uname_S),Windows)
NO_CURL = YesPlease
NO_PYTHON = YesPlease
BLK_SHA1 = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
CC = compat/vcbuild/scripts/clink.pl
AR = compat/vcbuild/scripts/lib.pl
@@ -994,6 +995,7 @@ ifeq ($(uname_S),Windows)
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
EXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib
+ PTHREAD_LIBS =
lib =
ifndef DEBUG
BASIC_CFLAGS += -GL -Os -MT
@@ -1035,12 +1037,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_REGEX = YesPlease
NO_PYTHON = YesPlease
BLK_SHA1 = YesPlease
- THREADED_DELTA_SEARCH = YesPlease
- COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \
compat/win32/pthread.o
EXTLIBS += -lws2_32
+ PTHREAD_LIBS =
X = .exe
ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
htmldir=doc/git/html/
@@ -1057,6 +1059,14 @@ endif
-include config.mak.autogen
-include config.mak
+ifdef CHECK_HEADER_DEPENDENCIES
+USE_COMPUTED_HEADER_DEPENDENCIES =
+endif
+
+ifdef COMPUTE_HEADER_DEPENDENCIES
+USE_COMPUTED_HEADER_DEPENDENCIES = YesPlease
+endif
+
ifdef SANE_TOOL_PATH
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
@@ -1112,11 +1122,12 @@ else
REMOTE_CURL_PRIMARY = git-remote-http$X
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
- PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X
+ PROGRAM_OBJS += http-fetch.o
+ PROGRAMS += $(REMOTE_CURL_NAMES)
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "070908"
ifndef NO_EXPAT
- PROGRAMS += git-http-push$X
+ PROGRAM_OBJS += http-push.o
endif
endif
ifndef NO_EXPAT
@@ -1136,7 +1147,7 @@ endif
EXTLIBS += -lz
ifndef NO_POSIX_ONLY_PROGRAMS
- PROGRAMS += git-daemon$X
+ PROGRAM_OBJS += daemon.o
endif
ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
@@ -1237,7 +1248,6 @@ ifdef NO_MKDTEMP
endif
ifdef NO_MKSTEMPS
COMPAT_CFLAGS += -DNO_MKSTEMPS
- COMPAT_OBJS += compat/mkstemps.o
endif
ifdef NO_UNSETENV
COMPAT_CFLAGS += -DNO_UNSETENV
@@ -1303,10 +1313,12 @@ endif
ifdef BLK_SHA1
SHA1_HEADER = "block-sha1/sha1.h"
LIB_OBJS += block-sha1/sha1.o
+ LIB_H += block-sha1/sha1.h
else
ifdef PPC_SHA1
SHA1_HEADER = "ppc/sha1.h"
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
+ LIB_H += ppc/sha1.h
else
SHA1_HEADER = <openssl/sha.h>
EXTLIBS += $(LIB_4_CRYPTO)
@@ -1332,16 +1344,12 @@ ifdef RUNTIME_PREFIX
endif
ifdef NO_PTHREADS
- THREADED_DELTA_SEARCH =
BASIC_CFLAGS += -DNO_PTHREADS
else
EXTLIBS += $(PTHREAD_LIBS)
-endif
-
-ifdef THREADED_DELTA_SEARCH
- BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH
LIB_OBJS += thread-utils.o
endif
+
ifdef DIR_HAS_BSD_GROUP_SEMANTICS
COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS
endif
@@ -1452,7 +1460,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
SHELL = $(SHELL_PATH)
-all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
+all:: shell_compatibility_test $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
ifneq (,$X)
$(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
endif
@@ -1479,15 +1487,15 @@ strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
-git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
+git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
-builtin-help.o: common-cmds.h
-builtin-help.s builtin-help.o: ALL_CFLAGS += \
+builtin/help.o: common-cmds.h
+builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1503,17 +1511,25 @@ common-cmds.h: ./generate-cmdlist.sh command-list.txt
common-cmds.h: $(wildcard Documentation/git-*.txt)
$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
+define cmd_munge_script
+$(RM) $@ $@+ && \
+sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
+ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+ -e $(BROKEN_PATH_FIX) \
+ $@.sh >$@+
+endef
+
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
- $(QUIET_GEN)$(RM) $@ $@+ && \
- sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
- -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
- -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
- -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
- -e $(BROKEN_PATH_FIX) \
- $@.sh >$@+ && \
+ $(QUIET_GEN)$(cmd_munge_script) && \
chmod +x $@+ && \
mv $@+ $@
+$(SCRIPT_LIB) : % : %.sh
+ $(QUIET_GEN)$(cmd_munge_script) && \
+ mv $@+ $@
+
ifndef NO_PERL
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
@@ -1536,6 +1552,11 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
chmod +x $@+ && \
mv $@+ $@
+
+.PHONY: gitweb
+gitweb:
+ $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
+
ifdef JSMIN
OTHER_PROGRAMS += gitweb/gitweb.cgi gitweb/gitweb.min.js
gitweb/gitweb.cgi: gitweb/gitweb.perl gitweb/gitweb.min.js
@@ -1543,30 +1564,13 @@ else
OTHER_PROGRAMS += gitweb/gitweb.cgi
gitweb/gitweb.cgi: gitweb/gitweb.perl
endif
- $(QUIET_GEN)$(RM) $@ $@+ && \
- sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
- -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
- -e 's|++GIT_BINDIR++|$(bindir)|g' \
- -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
- -e 's|++GITWEB_CONFIG_SYSTEM++|$(GITWEB_CONFIG_SYSTEM)|g' \
- -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \
- -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
- -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
- -e 's|"++GITWEB_PROJECT_MAXDEPTH++"|$(GITWEB_PROJECT_MAXDEPTH)|g' \
- -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
- -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
- -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \
- -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
- -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
- -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
- -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
- -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
- -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
- -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
- -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
- $< >$@+ && \
- chmod +x $@+ && \
- mv $@+ $@
+ $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
+
+ifdef JSMIN
+gitweb/gitweb.min.js: gitweb/gitweb.js
+ $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
+endif # JSMIN
+
git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js
$(QUIET_GEN)$(RM) $@ $@+ && \
@@ -1593,12 +1597,6 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
mv $@+ $@
endif # NO_PERL
-
-ifdef JSMIN
-gitweb/gitweb.min.js: gitweb/gitweb.js
- $(QUIET_GEN)$(JSMIN) <$< >$@
-endif # JSMIN
-
ifndef NO_PYTHON
$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS
$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
@@ -1641,28 +1639,148 @@ git.o git.spec \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE
-%.o: %.c GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
+GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
+ git.o http.o http-walker.o remote-curl.o
+XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
+ xdiff/xmerge.o xdiff/xpatience.o
+OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)
+
+dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
+dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
+
+ifdef COMPUTE_HEADER_DEPENDENCIES
+$(dep_dirs):
+ mkdir -p $@
+
+missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
+dep_file = $(dir $@).depend/$(notdir $@).d
+dep_args = -MF $(dep_file) -MMD -MP
+ifdef CHECK_HEADER_DEPENDENCIES
+$(error cannot compute header dependencies outside a normal build. \
+Please unset CHECK_HEADER_DEPENDENCIES and try again)
+endif
+endif
+
+ifndef COMPUTE_HEADER_DEPENDENCIES
+ifndef CHECK_HEADER_DEPENDENCIES
+dep_dirs =
+missing_dep_dirs =
+dep_args =
+endif
+endif
+
+ifdef CHECK_HEADER_DEPENDENCIES
+ifndef PRINT_HEADER_DEPENDENCIES
+missing_deps = $(filter-out $(notdir $^), \
+ $(notdir $(shell $(MAKE) -s $@ \
+ CHECK_HEADER_DEPENDENCIES=YesPlease \
+ USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \
+ PRINT_HEADER_DEPENDENCIES=YesPlease)))
+endif
+endif
+
+ASM_SRC := $(wildcard $(OBJECTS:o=S))
+ASM_OBJ := $(ASM_SRC:S=o)
+C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS))
+
+.SUFFIXES:
+
+ifdef PRINT_HEADER_DEPENDENCIES
+$(C_OBJ): %.o: %.c FORCE
+ echo $^
+$(ASM_OBJ): %.o: %.S FORCE
+ echo $^
+
+ifndef CHECK_HEADER_DEPENDENCIES
+$(error cannot print header dependencies during a normal build. \
+Please set CHECK_HEADER_DEPENDENCIES and try again)
+endif
+endif
+
+ifndef PRINT_HEADER_DEPENDENCIES
+ifdef CHECK_HEADER_DEPENDENCIES
+$(C_OBJ): %.o: %.c $(dep_files) FORCE
+ @set -e; echo CHECK $@; \
+ missing_deps="$(missing_deps)"; \
+ if test "$$missing_deps"; \
+ then \
+ echo missing dependencies: $$missing_deps; \
+ false; \
+ fi
+$(ASM_OBJ): %.o: %.S $(dep_files) FORCE
+ @set -e; echo CHECK $@; \
+ missing_deps="$(missing_deps)"; \
+ if test "$$missing_deps"; \
+ then \
+ echo missing dependencies: $$missing_deps; \
+ false; \
+ fi
+endif
+endif
+
+ifndef CHECK_HEADER_DEPENDENCIES
+$(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs)
+ $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
+$(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
+ $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
+endif
+
%.s: %.c GIT-CFLAGS FORCE
- $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
-%.o: %.S GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+ $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
-exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
+ifdef USE_COMPUTED_HEADER_DEPENDENCIES
+# Take advantage of gcc's on-the-fly dependency generation
+# See <http://gcc.gnu.org/gcc-3.0/features.html>.
+dep_files_present := $(wildcard $(dep_files))
+ifneq ($(dep_files_present),)
+include $(dep_files_present)
+endif
+else
+# Dependencies on header files, for platforms that do not support
+# the gcc -MMD option.
+#
+# Dependencies on automatically generated headers such as common-cmds.h
+# should _not_ be included here, since they are necessary even when
+# building an object for the first time.
+#
+# XXX. Please check occasionally that these include all dependencies
+# gcc detects!
+
+$(GIT_OBJS): $(LIB_H)
+builtin/branch.o builtin/checkout.o builtin/clone.o builtin/reset.o branch.o transport.o: branch.h
+builtin/bundle.o bundle.o transport.o: bundle.h
+builtin/bisect--helper.o builtin/rev-list.o bisect.o: bisect.h
+builtin/clone.o builtin/fetch-pack.o transport.o: fetch-pack.h
+builtin/grep.o: thread-utils.h
+builtin/send-pack.o transport.o: send-pack.h
+builtin/log.o builtin/shortlog.o: shortlog.h
+builtin/prune.o builtin/reflog.o reachable.o: reachable.h
+builtin/commit.o builtin/revert.o wt-status.o: wt-status.h
+builtin/tar-tree.o archive-tar.o: tar.h
+builtin/pack-objects.o: thread-utils.h
+http-fetch.o http-walker.o remote-curl.o transport.o walker.o: walker.h
+http.o http-walker.o http-push.o remote-curl.o: http.h
+
+xdiff-interface.o $(XDIFF_OBJS): \
+ xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
+ xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
+endif
+
+exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'
-builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
+builtin/init-db.s builtin/init-db.o: EXTRA_CPPFLAGS = \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
-config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
+config.s config.o: EXTRA_CPPFLAGS = -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
-http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
+http.s http.o: EXTRA_CPPFLAGS = -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
-http-walker.o: http.h
-http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT
+http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)
@@ -1672,10 +1790,6 @@ git-imap-send$X: imap-send.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
-http.o http-walker.o http-push.o: http.h
-
-http.o http-walker.o: $(LIB_H)
-
git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL)
@@ -1693,18 +1807,9 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
-$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
-$(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
-builtin-revert.o wt-status.o: wt-status.h
-
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
-XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
- xdiff/xmerge.o xdiff/xpatience.o
-$(XDIFF_OBJS): xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
- xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
-
$(XDIFF_LIB): $(XDIFF_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
@@ -1770,24 +1875,6 @@ GIT-GUI-VARS: FORCE
fi
endif
-### Testing rules
-
-TEST_PROGRAMS_NEED_X += test-chmtime
-TEST_PROGRAMS_NEED_X += test-ctype
-TEST_PROGRAMS_NEED_X += test-date
-TEST_PROGRAMS_NEED_X += test-delta
-TEST_PROGRAMS_NEED_X += test-dump-cache-tree
-TEST_PROGRAMS_NEED_X += test-genrandom
-TEST_PROGRAMS_NEED_X += test-match-trees
-TEST_PROGRAMS_NEED_X += test-parse-options
-TEST_PROGRAMS_NEED_X += test-path-utils
-TEST_PROGRAMS_NEED_X += test-run-command
-TEST_PROGRAMS_NEED_X += test-sha1
-TEST_PROGRAMS_NEED_X += test-sigchain
-TEST_PROGRAMS_NEED_X += test-index-version
-
-TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
-
test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
all:: $(TEST_PROGRAMS) $(test_bindir_programs)
@@ -1805,6 +1892,8 @@ bin-wrappers/%: wrap-for-bin.sh
export NO_SVN_TESTS
+### Testing rules
+
test: all
$(MAKE) -C t/ all
@@ -1816,9 +1905,7 @@ test-delta$X: diff-delta.o patch-delta.o
test-parse-options$X: parse-options.o
-test-parse-options.o: parse-options.h
-
-.PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
+.PRECIOUS: $(TEST_OBJS)
test-%$X: test-%.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
@@ -1864,6 +1951,7 @@ install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
ifndef NO_PERL
@@ -1982,10 +2070,11 @@ distclean: clean
clean:
$(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
- $(LIB_FILE) $(XDIFF_LIB)
- $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
+ builtin/*.o $(LIB_FILE) $(XDIFF_LIB)
+ $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
$(RM) -r bin-wrappers
+ $(RM) -r $(dep_dirs)
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
$(RM) -r autom4te.cache
$(RM) config.log config.mak.autogen config.mak.append config.status config.cache
@@ -2015,12 +2104,13 @@ endif
### Check documentation
#
check-docs::
- @(for v in $(ALL_PROGRAMS) $(BUILT_INS) git gitk; \
+ @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk; \
do \
case "$$v" in \
git-merge-octopus | git-merge-ours | git-merge-recursive | \
git-merge-resolve | git-merge-subtree | \
git-fsck-objects | git-init-db | \
+ git-remote-* | git-stage | \
git-?*--?* ) continue ;; \
esac ; \
test -f "Documentation/$$v.txt" || \
@@ -2058,9 +2148,12 @@ check-docs::
documented,gitrepository-layout | \
documented,gittutorial | \
documented,gittutorial-2 | \
+ documented,git-bisect-lk2009 | \
+ documented,git-remote-helpers | \
+ documented,gitworkflows | \
sentinel,not,matching,is,ok ) continue ;; \
esac; \
- case " $(ALL_PROGRAMS) $(BUILT_INS) git gitk " in \
+ case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk " in \
*" $$cmd "*) ;; \
*) echo "removed but $$how: $$cmd" ;; \
esac; \
diff --git a/RelNotes b/RelNotes
index 7b9bde663b..00e77229dd 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes-1.7.0.txt \ No newline at end of file
+Documentation/RelNotes-1.7.1.txt \ No newline at end of file
diff --git a/abspath.c b/abspath.c
index b88122cbe7..c91a29cb29 100644
--- a/abspath.c
+++ b/abspath.c
@@ -54,8 +54,9 @@ const char *make_absolute_path(const char *path)
if (len + strlen(last_elem) + 2 > PATH_MAX)
die ("Too long path name: '%s/%s'",
buf, last_elem);
- buf[len] = '/';
- strcpy(buf + len + 1, last_elem);
+ if (len && buf[len-1] != '/')
+ buf[len++] = '/';
+ strcpy(buf + len, last_elem);
free(last_elem);
last_elem = NULL;
}
diff --git a/advice.c b/advice.c
index 936d98ba2b..0be4b5f008 100644
--- a/advice.c
+++ b/advice.c
@@ -5,6 +5,7 @@ int advice_status_hints = 1;
int advice_commit_before_merge = 1;
int advice_resolve_conflict = 1;
int advice_implicit_identity = 1;
+int advice_detached_head = 1;
static struct {
const char *name;
@@ -15,6 +16,7 @@ static struct {
{ "commitbeforemerge", &advice_commit_before_merge },
{ "resolveconflict", &advice_resolve_conflict },
{ "implicitidentity", &advice_implicit_identity },
+ { "detachedhead", &advice_detached_head },
};
int git_default_advice_config(const char *var, const char *value)
diff --git a/advice.h b/advice.h
index 9b7a3ad1ca..3244ebb5c1 100644
--- a/advice.h
+++ b/advice.h
@@ -8,6 +8,7 @@ extern int advice_status_hints;
extern int advice_commit_before_merge;
extern int advice_resolve_conflict;
extern int advice_implicit_identity;
+extern int advice_detached_head;
int git_default_advice_config(const char *var, const char *value);
diff --git a/bisect.c b/bisect.c
index 6dc27ee7a6..b556b11610 100644
--- a/bisect.c
+++ b/bisect.c
@@ -986,6 +986,12 @@ int bisect_next_all(const char *prefix)
exit(1);
}
+ if (!all) {
+ fprintf(stderr, "No testable commit found.\n"
+ "Maybe you started with bad path parameters?\n");
+ exit(4);
+ }
+
bisect_rev = revs.commits->item->object.sha1;
memcpy(bisect_rev_hex, sha1_to_hex(bisect_rev), 41);
diff --git a/branch.c b/branch.c
index 05ef3f5c9c..9e1f63ed8d 100644
--- a/branch.c
+++ b/branch.c
@@ -49,9 +49,19 @@ static int should_setup_rebase(const char *origin)
void install_branch_config(int flag, const char *local, const char *origin, const char *remote)
{
+ const char *shortname = remote + 11;
+ int remote_is_branch = !prefixcmp(remote, "refs/heads/");
struct strbuf key = STRBUF_INIT;
int rebasing = should_setup_rebase(origin);
+ if (remote_is_branch
+ && !strcmp(local, shortname)
+ && !origin) {
+ warning("Not setting branch %s as its own upstream.",
+ local);
+ return;
+ }
+
strbuf_addf(&key, "branch.%s.remote", local);
git_config_set(key.buf, origin ? origin : ".");
@@ -71,8 +81,8 @@ void install_branch_config(int flag, const char *local, const char *origin, cons
strbuf_addstr(&key, origin ? "remote" : "local");
/* Are we tracking a proper "branch"? */
- if (!prefixcmp(remote, "refs/heads/")) {
- strbuf_addf(&key, " branch %s", remote + 11);
+ if (remote_is_branch) {
+ strbuf_addf(&key, " branch %s", shortname);
if (origin)
strbuf_addf(&key, " from %s", origin);
}
@@ -108,6 +118,7 @@ static int setup_tracking(const char *new_ref, const char *orig_ref,
switch (track) {
case BRANCH_TRACK_ALWAYS:
case BRANCH_TRACK_EXPLICIT:
+ case BRANCH_TRACK_OVERRIDE:
break;
default:
return 1;
@@ -128,18 +139,25 @@ void create_branch(const char *head,
const char *name, const char *start_name,
int force, int reflog, enum branch_track track)
{
- struct ref_lock *lock;
+ struct ref_lock *lock = NULL;
struct commit *commit;
unsigned char sha1[20];
char *real_ref, msg[PATH_MAX + 20];
struct strbuf ref = STRBUF_INIT;
int forcing = 0;
+ int dont_change_ref = 0;
+ int explicit_tracking = 0;
+
+ if (track == BRANCH_TRACK_EXPLICIT || track == BRANCH_TRACK_OVERRIDE)
+ explicit_tracking = 1;
if (strbuf_check_branch_ref(&ref, name))
die("'%s' is not a valid branch name.", name);
if (resolve_ref(ref.buf, sha1, 1, NULL)) {
- if (!force)
+ if (!force && track == BRANCH_TRACK_OVERRIDE)
+ dont_change_ref = 1;
+ else if (!force)
die("A branch named '%s' already exists.", name);
else if (!is_bare_repository() && !strcmp(head, name))
die("Cannot force update the current branch.");
@@ -153,12 +171,12 @@ void create_branch(const char *head,
switch (dwim_ref(start_name, strlen(start_name), sha1, &real_ref)) {
case 0:
/* Not branching from any existing branch */
- if (track == BRANCH_TRACK_EXPLICIT)
+ if (explicit_tracking)
die("Cannot setup tracking information; starting point is not a branch.");
break;
case 1:
/* Unique completion -- good, only if it is a real ref */
- if (track == BRANCH_TRACK_EXPLICIT && !strcmp(real_ref, "HEAD"))
+ if (explicit_tracking && !strcmp(real_ref, "HEAD"))
die("Cannot setup tracking information; starting point is not a branch.");
break;
default:
@@ -170,9 +188,11 @@ void create_branch(const char *head,
die("Not a valid branch point: '%s'.", start_name);
hashcpy(sha1, commit->object.sha1);
- lock = lock_any_ref_for_update(ref.buf, NULL, 0);
- if (!lock)
- die_errno("Failed to lock ref for update");
+ if (!dont_change_ref) {
+ lock = lock_any_ref_for_update(ref.buf, NULL, 0);
+ if (!lock)
+ die_errno("Failed to lock ref for update");
+ }
if (reflog)
log_all_ref_updates = 1;
@@ -180,15 +200,16 @@ void create_branch(const char *head,
if (forcing)
snprintf(msg, sizeof msg, "branch: Reset from %s",
start_name);
- else
+ else if (!dont_change_ref)
snprintf(msg, sizeof msg, "branch: Created from %s",
start_name);
if (real_ref && track)
setup_tracking(name, real_ref, track);
- if (write_ref_sha1(lock, sha1, msg) < 0)
- die_errno("Failed to write ref");
+ if (!dont_change_ref)
+ if (write_ref_sha1(lock, sha1, msg) < 0)
+ die_errno("Failed to write ref");
strbuf_release(&ref);
free(real_ref);
diff --git a/builtin-add.c b/builtin/add.c
index 2705f8d057..87d2980313 100644
--- a/builtin-add.c
+++ b/builtin/add.c
@@ -117,7 +117,19 @@ static void fill_pathspec_matches(const char **pathspec, char *seen, int specs)
}
}
-static void prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)
+static char *find_used_pathspec(const char **pathspec)
+{
+ char *seen;
+ int i;
+
+ for (i = 0; pathspec[i]; i++)
+ ; /* just counting */
+ seen = xcalloc(i, 1);
+ fill_pathspec_matches(pathspec, seen, i);
+ return seen;
+}
+
+static char *prune_directory(struct dir_struct *dir, const char **pathspec, int prefix)
{
char *seen;
int i, specs;
@@ -137,13 +149,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
}
dir->nr = dst - dir->entries;
fill_pathspec_matches(pathspec, seen, specs);
-
- for (i = 0; i < specs; i++) {
- if (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))
- die("pathspec '%s' did not match any files",
- pathspec[i]);
- }
- free(seen);
+ return seen;
}
static void treat_gitlinks(const char **pathspec)
@@ -359,6 +365,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
int flags;
int add_new_files;
int require_pathspec;
+ char *seen = NULL;
git_config(add_config, NULL);
@@ -418,7 +425,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
/* This picks up the paths that are not tracked */
baselen = fill_directory(&dir, pathspec);
if (pathspec)
- prune_directory(&dir, pathspec, baselen);
+ seen = prune_directory(&dir, pathspec, baselen);
}
if (refresh_only) {
@@ -426,6 +433,19 @@ int cmd_add(int argc, const char **argv, const char *prefix)
goto finish;
}
+ if (pathspec) {
+ int i;
+ if (!seen)
+ seen = find_used_pathspec(pathspec);
+ for (i = 0; pathspec[i]; i++) {
+ if (!seen[i] && pathspec[i][0]
+ && !file_exists(pathspec[i]))
+ die("pathspec '%s' did not match any files",
+ pathspec[i]);
+ }
+ free(seen);
+ }
+
exit_status |= add_files_to_cache(prefix, pathspec, flags);
if (add_new_files)
diff --git a/builtin-annotate.c b/builtin/annotate.c
index fc43eed36b..fc43eed36b 100644
--- a/builtin-annotate.c
+++ b/builtin/annotate.c
diff --git a/builtin-apply.c b/builtin/apply.c
index 2a1004d025..7ca90472c1 100644
--- a/builtin-apply.c
+++ b/builtin/apply.c
@@ -1854,33 +1854,76 @@ static int match_fragment(struct image *img,
{
int i;
char *fixed_buf, *buf, *orig, *target;
+ int preimage_limit;
- if (preimage->nr + try_lno > img->nr)
+ if (preimage->nr + try_lno <= img->nr) {
+ /*
+ * The hunk falls within the boundaries of img.
+ */
+ preimage_limit = preimage->nr;
+ if (match_end && (preimage->nr + try_lno != img->nr))
+ return 0;
+ } else if (ws_error_action == correct_ws_error &&
+ (ws_rule & WS_BLANK_AT_EOF) && match_end) {
+ /*
+ * This hunk that matches at the end extends beyond
+ * the end of img, and we are removing blank lines
+ * at the end of the file. This many lines from the
+ * beginning of the preimage must match with img, and
+ * the remainder of the preimage must be blank.
+ */
+ preimage_limit = img->nr - try_lno;
+ } else {
+ /*
+ * The hunk extends beyond the end of the img and
+ * we are not removing blanks at the end, so we
+ * should reject the hunk at this position.
+ */
return 0;
+ }
if (match_beginning && try_lno)
return 0;
- if (match_end && preimage->nr + try_lno != img->nr)
- return 0;
-
/* Quick hash check */
- for (i = 0; i < preimage->nr; i++)
+ for (i = 0; i < preimage_limit; i++)
if (preimage->line[i].hash != img->line[try_lno + i].hash)
return 0;
- /*
- * Do we have an exact match? If we were told to match
- * at the end, size must be exactly at try+fragsize,
- * otherwise try+fragsize must be still within the preimage,
- * and either case, the old piece should match the preimage
- * exactly.
- */
- if ((match_end
- ? (try + preimage->len == img->len)
- : (try + preimage->len <= img->len)) &&
- !memcmp(img->buf + try, preimage->buf, preimage->len))
- return 1;
+ if (preimage_limit == preimage->nr) {
+ /*
+ * Do we have an exact match? If we were told to match
+ * at the end, size must be exactly at try+fragsize,
+ * otherwise try+fragsize must be still within the preimage,
+ * and either case, the old piece should match the preimage
+ * exactly.
+ */
+ if ((match_end
+ ? (try + preimage->len == img->len)
+ : (try + preimage->len <= img->len)) &&
+ !memcmp(img->buf + try, preimage->buf, preimage->len))
+ return 1;
+ } else {
+ /*
+ * The preimage extends beyond the end of img, so
+ * there cannot be an exact match.
+ *
+ * There must be one non-blank context line that match
+ * a line before the end of img.
+ */
+ char *buf_end;
+
+ buf = preimage->buf;
+ buf_end = buf;
+ for (i = 0; i < preimage_limit; i++)
+ buf_end += preimage->line[i].len;
+
+ for ( ; buf < buf_end; buf++)
+ if (!isspace(*buf))
+ break;
+ if (buf == buf_end)
+ return 0;
+ }
/*
* No exact match. If we are ignoring whitespace, run a line-by-line
@@ -1891,7 +1934,10 @@ static int match_fragment(struct image *img,
size_t imgoff = 0;
size_t preoff = 0;
size_t postlen = postimage->len;
- for (i = 0; i < preimage->nr; i++) {
+ size_t extra_chars;
+ char *preimage_eof;
+ char *preimage_end;
+ for (i = 0; i < preimage_limit; i++) {
size_t prelen = preimage->line[i].len;
size_t imglen = img->line[try_lno+i].len;
@@ -1905,20 +1951,36 @@ static int match_fragment(struct image *img,
}
/*
- * Ok, the preimage matches with whitespace fuzz. Update it and
- * the common postimage lines to use the same whitespace as the
- * target. imgoff now holds the true length of the target that
- * matches the preimage, and we need to update the line lengths
- * of the preimage to match the target ones.
+ * Ok, the preimage matches with whitespace fuzz.
+ *
+ * imgoff now holds the true length of the target that
+ * matches the preimage before the end of the file.
+ *
+ * Count the number of characters in the preimage that fall
+ * beyond the end of the file and make sure that all of them
+ * are whitespace characters. (This can only happen if
+ * we are removing blank lines at the end of the file.)
*/
- fixed_buf = xmalloc(imgoff);
- memcpy(fixed_buf, img->buf + try, imgoff);
- for (i = 0; i < preimage->nr; i++)
- preimage->line[i].len = img->line[try_lno+i].len;
+ buf = preimage_eof = preimage->buf + preoff;
+ for ( ; i < preimage->nr; i++)
+ preoff += preimage->line[i].len;
+ preimage_end = preimage->buf + preoff;
+ for ( ; buf < preimage_end; buf++)
+ if (!isspace(*buf))
+ return 0;
/*
- * Update the preimage buffer and the postimage context lines.
+ * Update the preimage and the common postimage context
+ * lines to use the same whitespace as the target.
+ * If whitespace is missing in the target (i.e.
+ * if the preimage extends beyond the end of the file),
+ * use the whitespace from the preimage.
*/
+ extra_chars = preimage_end - preimage_eof;
+ fixed_buf = xmalloc(imgoff + extra_chars);
+ memcpy(fixed_buf, img->buf + try, imgoff);
+ memcpy(fixed_buf + imgoff, preimage_eof, extra_chars);
+ imgoff += extra_chars;
update_pre_post_images(preimage, postimage,
fixed_buf, imgoff, postlen);
return 1;
@@ -1932,12 +1994,16 @@ static int match_fragment(struct image *img,
* it might with whitespace fuzz. We haven't been asked to
* ignore whitespace, we were asked to correct whitespace
* errors, so let's try matching after whitespace correction.
+ *
+ * The preimage may extend beyond the end of the file,
+ * but in this loop we will only handle the part of the
+ * preimage that falls within the file.
*/
fixed_buf = xmalloc(preimage->len + 1);
buf = fixed_buf;
orig = preimage->buf;
target = img->buf + try;
- for (i = 0; i < preimage->nr; i++) {
+ for (i = 0; i < preimage_limit; i++) {
size_t fixlen; /* length after fixing the preimage */
size_t oldlen = preimage->line[i].len;
size_t tgtlen = img->line[try_lno + i].len;
@@ -1977,6 +2043,29 @@ static int match_fragment(struct image *img,
target += tgtlen;
}
+
+ /*
+ * Now handle the lines in the preimage that falls beyond the
+ * end of the file (if any). They will only match if they are
+ * empty or only contain whitespace (if WS_BLANK_AT_EOL is
+ * false).
+ */
+ for ( ; i < preimage->nr; i++) {
+ size_t fixlen; /* length after fixing the preimage */
+ size_t oldlen = preimage->line[i].len;
+ int j;
+
+ /* Try fixing the line in the preimage */
+ fixlen = ws_fix_copy(buf, orig, oldlen, ws_rule, NULL);
+
+ for (j = 0; j < fixlen; j++)
+ if (!isspace(buf[j]))
+ goto unmatch_exit;
+
+ orig += oldlen;
+ buf += fixlen;
+ }
+
/*
* Yes, the preimage is based on an older version that still
* has whitespace breakages unfixed, and fixing them makes the
@@ -2002,11 +2091,8 @@ static int find_pos(struct image *img,
unsigned long backwards, forwards, try;
int backwards_lno, forwards_lno, try_lno;
- if (preimage->nr > img->nr)
- return -1;
-
/*
- * If match_begining or match_end is specified, there is no
+ * If match_beginning or match_end is specified, there is no
* point starting from a wrong line that will never match and
* wander around and wait for a match at the specified end.
*/
@@ -2015,7 +2101,12 @@ static int find_pos(struct image *img,
else if (match_end)
line = img->nr - preimage->nr;
- if (line > img->nr)
+ /*
+ * Because the comparison is unsigned, the following test
+ * will also take care of a negative line number that can
+ * result when match_end and preimage is larger than the target.
+ */
+ if ((size_t) line > img->nr)
line = img->nr;
try = 0;
@@ -2091,12 +2182,26 @@ static void update_image(struct image *img,
int i, nr;
size_t remove_count, insert_count, applied_at = 0;
char *result;
+ int preimage_limit;
+
+ /*
+ * If we are removing blank lines at the end of img,
+ * the preimage may extend beyond the end.
+ * If that is the case, we must be careful only to
+ * remove the part of the preimage that falls within
+ * the boundaries of img. Initialize preimage_limit
+ * to the number of lines in the preimage that falls
+ * within the boundaries.
+ */
+ preimage_limit = preimage->nr;
+ if (preimage_limit > img->nr - applied_pos)
+ preimage_limit = img->nr - applied_pos;
for (i = 0; i < applied_pos; i++)
applied_at += img->line[i].len;
remove_count = 0;
- for (i = 0; i < preimage->nr; i++)
+ for (i = 0; i < preimage_limit; i++)
remove_count += img->line[applied_pos + i].len;
insert_count = postimage->len;
@@ -2113,8 +2218,8 @@ static void update_image(struct image *img,
result[img->len] = '\0';
/* Adjust the line table */
- nr = img->nr + postimage->nr - preimage->nr;
- if (preimage->nr < postimage->nr) {
+ nr = img->nr + postimage->nr - preimage_limit;
+ if (preimage_limit < postimage->nr) {
/*
* NOTE: this knows that we never call remove_first_line()
* on anything other than pre/post image.
@@ -2122,10 +2227,10 @@ static void update_image(struct image *img,
img->line = xrealloc(img->line, nr * sizeof(*img->line));
img->line_allocated = img->line;
}
- if (preimage->nr != postimage->nr)
+ if (preimage_limit != postimage->nr)
memmove(img->line + applied_pos + postimage->nr,
- img->line + applied_pos + preimage->nr,
- (img->nr - (applied_pos + preimage->nr)) *
+ img->line + applied_pos + preimage_limit,
+ (img->nr - (applied_pos + preimage_limit)) *
sizeof(*img->line));
memcpy(img->line + applied_pos,
postimage->line,
@@ -2321,7 +2426,7 @@ static int apply_one_fragment(struct image *img, struct fragment *frag,
if (applied_pos >= 0) {
if (new_blank_lines_at_end &&
- preimage.nr + applied_pos == img->nr &&
+ preimage.nr + applied_pos >= img->nr &&
(ws_rule & WS_BLANK_AT_EOF) &&
ws_error_action != nowarn_ws_error) {
record_ws_error(WS_BLANK_AT_EOF, "+", 1, frag->linenr);
diff --git a/builtin-archive.c b/builtin/archive.c
index 3fb41364a5..6a887f5a9d 100644
--- a/builtin-archive.c
+++ b/builtin/archive.c
@@ -70,7 +70,7 @@ static const char *format_from_name(const char *filename)
return NULL;
ext++;
if (!strcasecmp(ext, "zip"))
- return "zip";
+ return "--format=zip";
return NULL;
}
@@ -84,7 +84,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
const char *exec = "git-upload-archive";
const char *output = NULL;
const char *remote = NULL;
- const char *format = NULL;
+ const char *format_option = NULL;
struct option local_opts[] = {
OPT_STRING('o', "output", &output, "file",
"write the archive to this file"),
@@ -92,33 +92,31 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
"retrieve the archive from remote repository <repo>"),
OPT_STRING(0, "exec", &exec, "cmd",
"path to the remote git-upload-archive command"),
- OPT_STRING(0, "format", &format, "fmt", "archive format"),
OPT_END()
};
- char fmt_opt[32];
argc = parse_options(argc, argv, prefix, local_opts, NULL,
PARSE_OPT_KEEP_ALL);
if (output) {
create_output_file(output);
- if (!format)
- format = format_from_name(output);
+ format_option = format_from_name(output);
}
- if (format) {
- sprintf(fmt_opt, "--format=%s", format);
- /*
- * We have enough room in argv[] to muck it in place,
- * because either --format and/or --output must have
- * been given on the original command line if we get
- * to this point, and parse_options() must have eaten
- * it, i.e. we can add back one element to the array.
- * But argv[] may contain "--"; we should make it the
- * first option.
- */
+ /*
+ * We have enough room in argv[] to muck it in place, because
+ * --output must have been given on the original command line
+ * if we get to this point, and parse_options() must have eaten
+ * it, i.e. we can add back one element to the array.
+ *
+ * We add a fake --format option at the beginning, with the
+ * format inferred from our output filename. This way explicit
+ * --format options can override it, and the fake option is
+ * inserted before any "--" that might have been given.
+ */
+ if (format_option) {
memmove(argv + 2, argv + 1, sizeof(*argv) * argc);
- argv[1] = fmt_opt;
+ argv[1] = format_option;
argv[++argc] = NULL;
}
diff --git a/builtin-bisect--helper.c b/builtin/bisect--helper.c
index 5b226399e1..5b226399e1 100644
--- a/builtin-bisect--helper.c
+++ b/builtin/bisect--helper.c
diff --git a/builtin-blame.c b/builtin/blame.c
index 6408ec8ee6..fc1586350f 100644
--- a/builtin-blame.c
+++ b/builtin/blame.c
@@ -1772,7 +1772,7 @@ static int lineno_width(int lines)
{
int i, width;
- for (width = 1, i = 10; i <= lines + 1; width++)
+ for (width = 1, i = 10; i <= lines; width++)
i *= 10;
return width;
}
@@ -2433,7 +2433,7 @@ parse_done:
if (top < 1)
top = lno;
bottom--;
- if (lno < top)
+ if (lno < top || lno < bottom)
die("file %s has only %lu lines", path, lno);
ent = xcalloc(1, sizeof(*ent));
diff --git a/builtin-branch.c b/builtin/branch.c
index ddc9f2dab7..6cf7e721e6 100644
--- a/builtin-branch.c
+++ b/builtin/branch.c
@@ -93,9 +93,60 @@ static const char *branch_get_color(enum color_branch ix)
return "";
}
+static int branch_merged(int kind, const char *name,
+ struct commit *rev, struct commit *head_rev)
+{
+ /*
+ * This checks whether the merge bases of branch and HEAD (or
+ * the other branch this branch builds upon) contains the
+ * branch, which means that the branch has already been merged
+ * safely to HEAD (or the other branch).
+ */
+ struct commit *reference_rev = NULL;
+ const char *reference_name = NULL;
+ int merged;
+
+ if (kind == REF_LOCAL_BRANCH) {
+ struct branch *branch = branch_get(name);
+ unsigned char sha1[20];
+
+ if (branch &&
+ branch->merge &&
+ branch->merge[0] &&
+ branch->merge[0]->dst &&
+ (reference_name =
+ resolve_ref(branch->merge[0]->dst, sha1, 1, NULL)) != NULL)
+ reference_rev = lookup_commit_reference(sha1);
+ }
+ if (!reference_rev)
+ reference_rev = head_rev;
+
+ merged = in_merge_bases(rev, &reference_rev, 1);
+
+ /*
+ * After the safety valve is fully redefined to "check with
+ * upstream, if any, otherwise with HEAD", we should just
+ * return the result of the in_merge_bases() above without
+ * any of the following code, but during the transition period,
+ * a gentle reminder is in order.
+ */
+ if ((head_rev != reference_rev) &&
+ in_merge_bases(rev, &head_rev, 1) != merged) {
+ if (merged)
+ warning("deleting branch '%s' that has been merged to\n"
+ " '%s', but it is not yet merged to HEAD.",
+ name, reference_name);
+ else
+ warning("not deleting branch '%s' that is not yet merged to\n"
+ " '%s', even though it is merged to HEAD.",
+ name, reference_name);
+ }
+ return merged;
+}
+
static int delete_branches(int argc, const char **argv, int force, int kinds)
{
- struct commit *rev, *head_rev = head_rev;
+ struct commit *rev, *head_rev = NULL;
unsigned char sha1[20];
char *name = NULL;
const char *fmt, *remote;
@@ -148,15 +199,8 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
continue;
}
- /* This checks whether the merge bases of branch and
- * HEAD contains branch -- which means that the HEAD
- * contains everything in both.
- */
-
- if (!force &&
- !in_merge_bases(rev, &head_rev, 1)) {
- error("The branch '%s' is not an ancestor of "
- "your current HEAD.\n"
+ if (!force && !branch_merged(kinds, bname.buf, rev, head_rev)) {
+ error("The branch '%s' is not fully merged.\n"
"If you are sure you want to delete it, "
"run 'git branch -D %s'.", bname.buf, bname.buf);
ret = 1;
@@ -564,7 +608,9 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
OPT__VERBOSE(&verbose),
OPT_SET_INT('t', "track", &track, "set up tracking mode (see git-pull(1))",
BRANCH_TRACK_EXPLICIT),
- OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"),
+ OPT_SET_INT( 0, "set-upstream", &track, "change upstream info",
+ BRANCH_TRACK_OVERRIDE),
+ OPT__COLOR(&branch_use_color, "use colored output"),
OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches",
REF_REMOTE_BRANCH),
{
diff --git a/builtin-bundle.c b/builtin/bundle.c
index 2006cc5cd5..2006cc5cd5 100644
--- a/builtin-bundle.c
+++ b/builtin/bundle.c
diff --git a/builtin-cat-file.c b/builtin/cat-file.c
index 5906842008..a933eaa043 100644
--- a/builtin-cat-file.c
+++ b/builtin/cat-file.c
@@ -219,9 +219,10 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix)
"exit with zero when there's no error", 'e'),
OPT_SET_INT('p', NULL, &opt, "pretty-print object's content", 'p'),
OPT_SET_INT(0, "batch", &batch,
- "show info and content of objects feeded on stdin", BATCH),
+ "show info and content of objects fed from the standard input",
+ BATCH),
OPT_SET_INT(0, "batch-check", &batch,
- "show info about objects feeded on stdin",
+ "show info about objects fed from the standard input",
BATCH_CHECK),
OPT_END()
};
diff --git a/builtin-check-attr.c b/builtin/check-attr.c
index 3016d29caa..3016d29caa 100644
--- a/builtin-check-attr.c
+++ b/builtin/check-attr.c
diff --git a/builtin-check-ref-format.c b/builtin/check-ref-format.c
index b106c65d80..b106c65d80 100644
--- a/builtin-check-ref-format.c
+++ b/builtin/check-ref-format.c
diff --git a/builtin-checkout-index.c b/builtin/checkout-index.c
index a7a5ee10f3..a7a5ee10f3 100644
--- a/builtin-checkout-index.c
+++ b/builtin/checkout-index.c
diff --git a/builtin-checkout.c b/builtin/checkout.c
index 527781728e..acefaaf41a 100644
--- a/builtin-checkout.c
+++ b/builtin/checkout.c
@@ -128,24 +128,6 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos,
(stage == 2) ? "our" : "their");
}
-/* NEEDSWORK: share with merge-recursive */
-static void fill_mm(const unsigned char *sha1, mmfile_t *mm)
-{
- unsigned long size;
- enum object_type type;
-
- if (!hashcmp(sha1, null_sha1)) {
- mm->ptr = xstrdup("");
- mm->size = 0;
- return;
- }
-
- mm->ptr = read_sha1_file(sha1, &type, &size);
- if (!mm->ptr || type != OBJ_BLOB)
- die("unable to read blob object %s", sha1_to_hex(sha1));
- mm->size = size;
-}
-
static int checkout_merged(int pos, struct checkout *state)
{
struct cache_entry *ce = active_cache[pos];
@@ -163,9 +145,9 @@ static int checkout_merged(int pos, struct checkout *state)
ce_stage(active_cache[pos+2]) != 3)
return error("path '%s' does not have all 3 versions", path);
- fill_mm(active_cache[pos]->sha1, &ancestor);
- fill_mm(active_cache[pos+1]->sha1, &ours);
- fill_mm(active_cache[pos+2]->sha1, &theirs);
+ read_mmblob(&ancestor, active_cache[pos]->sha1);
+ read_mmblob(&ours, active_cache[pos+1]->sha1);
+ read_mmblob(&theirs, active_cache[pos+2]->sha1);
status = ll_merge(&result_buf, path, &ancestor,
&ours, "ours", &theirs, "theirs", 0);
@@ -488,6 +470,20 @@ static void report_tracking(struct branch_info *new)
strbuf_release(&sb);
}
+static void detach_advice(const char *old_path, const char *new_name)
+{
+ const char fmt[] =
+ "Note: checking out '%s'.\n\n"
+ "You are in 'detached HEAD' state. You can look around, make experimental\n"
+ "changes and commit them, and you can discard any commits you make in this\n"
+ "state without impacting any branches by performing another checkout.\n\n"
+ "If you want to create a new branch to retain commits you create, you may\n"
+ "do so (now or later) by using -b with the checkout command again. Example:\n\n"
+ " git checkout -b new_branch_name\n\n";
+
+ fprintf(stderr, fmt, new_name);
+}
+
static void update_refs_for_switch(struct checkout_opts *opts,
struct branch_info *old,
struct branch_info *new)
@@ -522,8 +518,8 @@ static void update_refs_for_switch(struct checkout_opts *opts,
update_ref(msg.buf, "HEAD", new->commit->object.sha1, NULL,
REF_NODEREF, DIE_ON_ERR);
if (!opts->quiet) {
- if (old->path)
- fprintf(stderr, "Note: moving to '%s' which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n git checkout -b <new_branch_name>\n", new->name);
+ if (old->path && advice_detached_head)
+ detach_advice(old->path, new->name);
describe_detached_head("HEAD is now at", new->commit);
}
}
diff --git a/builtin-clean.c b/builtin/clean.c
index 3a70fa81bd..fac64e6cd3 100644
--- a/builtin-clean.c
+++ b/builtin/clean.c
@@ -67,8 +67,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
die("-x and -X cannot be used together");
if (!show_only && !force)
- die("clean.requireForce%s set and -n or -f not given; "
- "refusing to clean", config_set ? "" : " not");
+ die("clean.requireForce %s to true and neither -n nor -f given; "
+ "refusing to clean", config_set ? "set" : "defaults");
if (force > 1)
rm_flags = 0;
diff --git a/builtin-clone.c b/builtin/clone.c
index 58bacbd552..05f8fb4771 100644
--- a/builtin-clone.c
+++ b/builtin/clone.c
@@ -37,18 +37,17 @@ static const char * const builtin_clone_usage[] = {
NULL
};
-static int option_quiet, option_no_checkout, option_bare, option_mirror;
+static int option_no_checkout, option_bare, option_mirror;
static int option_local, option_no_hardlinks, option_shared, option_recursive;
static char *option_template, *option_reference, *option_depth;
static char *option_origin = NULL;
static char *option_branch = NULL;
static char *option_upload_pack = "git-upload-pack";
-static int option_verbose;
+static int option_verbosity;
static int option_progress;
static struct option builtin_clone_options[] = {
- OPT__QUIET(&option_quiet),
- OPT__VERBOSE(&option_verbose),
+ OPT__VERBOSITY(&option_verbosity),
OPT_BOOLEAN(0, "progress", &option_progress,
"force progress reporting"),
OPT_BOOLEAN('n', "no-checkout", &option_no_checkout,
@@ -462,7 +461,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
die("could not create leading directories of '%s'", git_dir);
set_git_dir(make_absolute_path(git_dir));
- init_db(option_template, option_quiet ? INIT_DB_QUIET : 0);
+ init_db(option_template, (option_verbosity < 0) ? INIT_DB_QUIET : 0);
/*
* At this point, the config exists, so we do not need the
@@ -526,13 +525,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
transport_set_option(transport, TRANS_OPT_DEPTH,
option_depth);
- if (option_quiet)
- transport->verbose = -1;
- else if (option_verbose)
- transport->verbose = 1;
-
- if (option_progress)
- transport->progress = 1;
+ transport_set_verbosity(transport, option_verbosity, option_progress);
if (option_upload_pack)
transport_set_option(transport, TRANS_OPT_UPLOADPACK,
@@ -641,7 +634,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
opts.update = 1;
opts.merge = 1;
opts.fn = oneway_merge;
- opts.verbose_update = !option_quiet;
+ opts.verbose_update = (option_verbosity > 0);
opts.src_index = &the_index;
opts.dst_index = &the_index;
diff --git a/builtin-commit-tree.c b/builtin/commit-tree.c
index ddcb7a4bbb..90dac349a3 100644
--- a/builtin-commit-tree.c
+++ b/builtin/commit-tree.c
@@ -9,8 +9,6 @@
#include "builtin.h"
#include "utf8.h"
-#define BLOCKING (1ul << 14)
-
/*
* FIXME! Share the code with "write-tree.c"
*/
diff --git a/builtin-commit.c b/builtin/commit.c
index ccc4f926c0..8dd104ee0b 100644
--- a/builtin-commit.c
+++ b/builtin/commit.c
@@ -41,7 +41,7 @@ static const char implicit_ident_advice[] =
"on your username and hostname. Please check that they are accurate.\n"
"You can suppress this message by setting them explicitly:\n"
"\n"
-" git config --global user.name Your Name\n"
+" git config --global user.name \"Your Name\"\n"
" git config --global user.email you@example.com\n"
"\n"
"If the identity used for this commit is wrong, you can fix it with:\n"
@@ -1048,7 +1048,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (*argv)
s.pathspec = get_pathspec(prefix, argv);
- read_cache();
+ read_cache_preload(s.pathspec);
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
s.in_merge = in_merge;
diff --git a/builtin-config.c b/builtin/config.c
index 2e3ef911d6..4bc46b15fd 100644
--- a/builtin-config.c
+++ b/builtin/config.c
@@ -358,7 +358,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
if (!is_absolute_path(given_config_file) && prefix)
config_exclusive_filename = prefix_filename(prefix,
strlen(prefix),
- argv[2]);
+ given_config_file);
else
config_exclusive_filename = given_config_file;
}
diff --git a/builtin-count-objects.c b/builtin/count-objects.c
index 2bdd8ebde1..2bdd8ebde1 100644
--- a/builtin-count-objects.c
+++ b/builtin/count-objects.c
diff --git a/builtin-describe.c b/builtin/describe.c
index 71be2a9364..71be2a9364 100644
--- a/builtin-describe.c
+++ b/builtin/describe.c
diff --git a/builtin-diff-files.c b/builtin/diff-files.c
index 5b64011de8..5b64011de8 100644
--- a/builtin-diff-files.c
+++ b/builtin/diff-files.c
diff --git a/builtin-diff-index.c b/builtin/diff-index.c
index 04837494fe..04837494fe 100644
--- a/builtin-diff-index.c
+++ b/builtin/diff-index.c
diff --git a/builtin-diff-tree.c b/builtin/diff-tree.c
index 2380c21951..3c78bda566 100644
--- a/builtin-diff-tree.c
+++ b/builtin/diff-tree.c
@@ -92,12 +92,23 @@ static const char diff_tree_usage[] =
" --root include the initial commit as diff against /dev/null\n"
COMMON_DIFF_OPTIONS_HELP;
+static void diff_tree_tweak_rev(struct rev_info *rev, struct setup_revision_opt *opt)
+{
+ if (!rev->diffopt.output_format) {
+ if (rev->dense_combined_merges)
+ rev->diffopt.output_format = DIFF_FORMAT_PATCH;
+ else
+ rev->diffopt.output_format = DIFF_FORMAT_RAW;
+ }
+}
+
int cmd_diff_tree(int argc, const char **argv, const char *prefix)
{
int nr_sha1;
char line[1000];
struct object *tree1, *tree2;
static struct rev_info *opt = &log_tree_opt;
+ struct setup_revision_opt s_r_opt;
int read_stdin = 0;
init_revisions(opt, prefix);
@@ -105,7 +116,9 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
opt->abbrev = 0;
opt->diff = 1;
opt->disable_stdin = 1;
- argc = setup_revisions(argc, argv, opt, NULL);
+ memset(&s_r_opt, 0, sizeof(s_r_opt));
+ s_r_opt.tweak = diff_tree_tweak_rev;
+ argc = setup_revisions(argc, argv, opt, &s_r_opt);
while (--argc > 0) {
const char *arg = *++argv;
@@ -117,9 +130,6 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
usage(diff_tree_usage);
}
- if (!opt->diffopt.output_format)
- opt->diffopt.output_format = DIFF_FORMAT_RAW;
-
/*
* NOTE! We expect "a ^b" to be equal to "a..b", so we
* reverse the order of the objects if the second one
diff --git a/builtin-diff.c b/builtin/diff.c
index ffcdd055ca..ffcdd055ca 100644
--- a/builtin-diff.c
+++ b/builtin/diff.c
diff --git a/builtin-fast-export.c b/builtin/fast-export.c
index b0a4029c94..c6dd71a7bc 100644
--- a/builtin-fast-export.c
+++ b/builtin/fast-export.c
@@ -503,7 +503,7 @@ static void export_marks(char *file)
f = fopen(file, "w");
if (!f)
- error("Unable to open marks file %s for writing.", file);
+ die_errno("Unable to open marks file %s for writing.", file);
for (i = 0; i < idnums.size; i++) {
if (deco->base && deco->base->type == 1) {
diff --git a/builtin-fetch-pack.c b/builtin/fetch-pack.c
index 8ed4a6feaa..dbd8b7bcc8 100644
--- a/builtin-fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -586,12 +586,12 @@ static int everything_local(struct ref **refs, int nr_match, char **match)
return retval;
}
-static int sideband_demux(int fd, void *data)
+static int sideband_demux(int in, int out, void *data)
{
int *xd = data;
- int ret = recv_sideband("fetch-pack", xd[0], fd);
- close(fd);
+ int ret = recv_sideband("fetch-pack", xd[0], out);
+ close(out);
return ret;
}
@@ -613,6 +613,7 @@ static int get_pack(int xd[2], char **pack_lockfile)
*/
demux.proc = sideband_demux;
demux.data = xd;
+ demux.out = -1;
if (start_async(&demux))
die("fetch-pack: unable to fork off sideband"
" demultiplexer");
diff --git a/builtin-fetch.c b/builtin/fetch.c
index 8654fa7a2d..957be9f926 100644
--- a/builtin-fetch.c
+++ b/builtin/fetch.c
@@ -11,6 +11,7 @@
#include "run-command.h"
#include "parse-options.h"
#include "sigchain.h"
+#include "transport.h"
static const char * const builtin_fetch_usage[] = {
"git fetch [options] [<repository> <refspec>...]",
@@ -27,6 +28,7 @@ enum {
};
static int all, append, dry_run, force, keep, multiple, prune, update_head_ok, verbosity;
+static int progress;
static int tags = TAGS_DEFAULT;
static const char *depth;
static const char *upload_pack;
@@ -56,6 +58,7 @@ static struct option builtin_fetch_options[] = {
OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
OPT_BOOLEAN('u', "update-head-ok", &update_head_ok,
"allow updating of HEAD ref"),
+ OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
OPT_STRING(0, "depth", &depth, "DEPTH",
"deepen history of shallow clone"),
OPT_END()
@@ -104,10 +107,8 @@ static void add_merge_config(struct ref **head,
* there is no entry in the resulting FETCH_HEAD marked
* for merging.
*/
+ memset(&refspec, 0, sizeof(refspec));
refspec.src = branch->merge[i]->src;
- refspec.dst = NULL;
- refspec.pattern = 0;
- refspec.force = 0;
get_fetch_map(remote_refs, &refspec, tail, 1);
for (rm = *old_tail; rm; rm = rm->next)
rm->merge = 1;
@@ -205,7 +206,6 @@ static int s_update_ref(const char *action,
return 0;
}
-#define SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
#define REFCOL_WIDTH 10
static int update_local_ref(struct ref *ref,
@@ -224,7 +224,7 @@ static int update_local_ref(struct ref *ref,
if (!hashcmp(ref->old_sha1, ref->new_sha1)) {
if (verbosity > 0)
- sprintf(display, "= %-*s %-*s -> %s", SUMMARY_WIDTH,
+ sprintf(display, "= %-*s %-*s -> %s", TRANSPORT_SUMMARY_WIDTH,
"[up to date]", REFCOL_WIDTH, remote,
pretty_ref);
return 0;
@@ -239,7 +239,7 @@ static int update_local_ref(struct ref *ref,
* the head, and the old value of the head isn't empty...
*/
sprintf(display, "! %-*s %-*s -> %s (can't fetch in current branch)",
- SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
+ TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
pretty_ref);
return 1;
}
@@ -249,7 +249,7 @@ static int update_local_ref(struct ref *ref,
int r;
r = s_update_ref("updating tag", ref, 0);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '-',
- SUMMARY_WIDTH, "[tag update]", REFCOL_WIDTH, remote,
+ TRANSPORT_SUMMARY_WIDTH, "[tag update]", REFCOL_WIDTH, remote,
pretty_ref, r ? " (unable to update local ref)" : "");
return r;
}
@@ -271,7 +271,7 @@ static int update_local_ref(struct ref *ref,
r = s_update_ref(msg, ref, 0);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '*',
- SUMMARY_WIDTH, what, REFCOL_WIDTH, remote, pretty_ref,
+ TRANSPORT_SUMMARY_WIDTH, what, REFCOL_WIDTH, remote, pretty_ref,
r ? " (unable to update local ref)" : "");
return r;
}
@@ -284,7 +284,7 @@ static int update_local_ref(struct ref *ref,
strcat(quickref, find_unique_abbrev(ref->new_sha1, DEFAULT_ABBREV));
r = s_update_ref("fast-forward", ref, 1);
sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : ' ',
- SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
+ TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
pretty_ref, r ? " (unable to update local ref)" : "");
return r;
} else if (force || ref->force) {
@@ -295,13 +295,13 @@ static int update_local_ref(struct ref *ref,
strcat(quickref, find_unique_abbrev(ref->new_sha1, DEFAULT_ABBREV));
r = s_update_ref("forced-update", ref, 1);
sprintf(display, "%c %-*s %-*s -> %s (%s)", r ? '!' : '+',
- SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
+ TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
pretty_ref,
r ? "unable to update local ref" : "forced update");
return r;
} else {
sprintf(display, "! %-*s %-*s -> %s (non-fast-forward)",
- SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
+ TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
pretty_ref);
return 1;
}
@@ -389,11 +389,12 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
fputc(url[i], fp);
fputc('\n', fp);
- if (ref)
+ if (ref) {
rc |= update_local_ref(ref, what, note);
- else
+ free(ref);
+ } else
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
- SUMMARY_WIDTH, *kind ? kind : "branch",
+ TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
REFCOL_WIDTH, *what ? what : "HEAD");
if (*note) {
if (verbosity >= 0 && !shown_url) {
@@ -514,7 +515,7 @@ static int prune_refs(struct transport *transport, struct ref *ref_map)
result |= delete_ref(ref->name, NULL, 0);
if (verbosity >= 0) {
fprintf(stderr, " x %-*s %-*s -> %s\n",
- SUMMARY_WIDTH, "[deleted]",
+ TRANSPORT_SUMMARY_WIDTH, "[deleted]",
REFCOL_WIDTH, "(none)", prettify_refname(ref->name));
warn_dangling_symref(stderr, dangling_msg, ref->name);
}
@@ -588,7 +589,7 @@ static void find_non_local_tags(struct transport *transport,
* to fetch then we can mark the ref entry in the list
* as one to ignore by setting util to NULL.
*/
- if (!strcmp(ref->name + strlen(ref->name) - 3, "^{}")) {
+ if (!suffixcmp(ref->name, "^{}")) {
if (item && !has_sha1_file(ref->old_sha1) &&
!will_fetch(head, ref->old_sha1) &&
!has_sha1_file(item->util) &&
@@ -651,6 +652,17 @@ static void check_not_current_branch(struct ref *ref_map)
"of non-bare repository", current_branch->refname);
}
+static int truncate_fetch_head(void)
+{
+ char *filename = git_path("FETCH_HEAD");
+ FILE *fp = fopen(filename, "w");
+
+ if (!fp)
+ return error("cannot open %s: %s\n", filename, strerror(errno));
+ fclose(fp);
+ return 0;
+}
+
static int do_fetch(struct transport *transport,
struct refspec *refs, int ref_count)
{
@@ -672,11 +684,9 @@ static int do_fetch(struct transport *transport,
/* if not appending, truncate FETCH_HEAD */
if (!append && !dry_run) {
- char *filename = git_path("FETCH_HEAD");
- FILE *fp = fopen(filename, "w");
- if (!fp)
- return error("cannot open %s: %s\n", filename, strerror(errno));
- fclose(fp);
+ int errcode = truncate_fetch_head();
+ if (errcode)
+ return errcode;
}
ref_map = get_ref_map(transport, refs, ref_count, tags, &autotags);
@@ -784,13 +794,19 @@ static int add_remote_or_group(const char *name, struct string_list *list)
static int fetch_multiple(struct string_list *list)
{
int i, result = 0;
- const char *argv[] = { "fetch", NULL, NULL, NULL, NULL, NULL, NULL };
- int argc = 1;
+ const char *argv[11] = { "fetch", "--append" };
+ int argc = 2;
if (dry_run)
argv[argc++] = "--dry-run";
if (prune)
argv[argc++] = "--prune";
+ if (update_head_ok)
+ argv[argc++] = "--update-head-ok";
+ if (force)
+ argv[argc++] = "--force";
+ if (keep)
+ argv[argc++] = "--keep";
if (verbosity >= 2)
argv[argc++] = "-v";
if (verbosity >= 1)
@@ -798,9 +814,16 @@ static int fetch_multiple(struct string_list *list)
else if (verbosity < 0)
argv[argc++] = "-q";
+ if (!append && !dry_run) {
+ int errcode = truncate_fetch_head();
+ if (errcode)
+ return errcode;
+ }
+
for (i = 0; i < list->nr; i++) {
const char *name = list->items[i].string;
argv[argc] = name;
+ argv[argc + 1] = NULL;
if (verbosity >= 0)
printf("Fetching %s\n", name);
if (run_command_v_opt(argv, RUN_GIT_CMD)) {
@@ -823,10 +846,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
die("Where do you want to fetch from today?");
transport = transport_get(remote, NULL);
- if (verbosity >= 2)
- transport->verbose = verbosity <= 3 ? verbosity : 3;
- if (verbosity < 0)
- transport->verbose = -1;
+ transport_set_verbosity(transport, verbosity, progress);
if (upload_pack)
set_option(TRANS_OPT_UPLOADPACK, upload_pack);
if (keep)
diff --git a/builtin-fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 9d524000b5..9d524000b5 100644
--- a/builtin-fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
diff --git a/builtin-for-each-ref.c b/builtin/for-each-ref.c
index a5a83f1469..62be1bbfd6 100644
--- a/builtin-for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -33,6 +33,8 @@ struct ref_sort {
struct refinfo {
char *refname;
unsigned char objectname[20];
+ int flag;
+ const char *symref;
struct atom_value *value;
};
@@ -68,6 +70,8 @@ static struct {
{ "body" },
{ "contents" },
{ "upstream" },
+ { "symref" },
+ { "flag" },
};
/*
@@ -82,7 +86,7 @@ static struct {
*/
static const char **used_atom;
static cmp_type *used_atom_type;
-static int used_atom_cnt, sort_atom_limit, need_tagged;
+static int used_atom_cnt, sort_atom_limit, need_tagged, need_symref;
/*
* Used to parse format string and sort specifiers
@@ -133,6 +137,10 @@ static int parse_atom(const char *atom, const char *ep)
(sizeof(*used_atom_type) * used_atom_cnt));
used_atom[at] = xmemdupz(atom, ep - atom);
used_atom_type[at] = valid_atom[i].cmp_type;
+ if (*atom == '*')
+ need_tagged = 1;
+ if (!strcmp(used_atom[at], "symref"))
+ need_symref = 1;
return at;
}
@@ -143,7 +151,8 @@ static const char *find_next(const char *cp)
{
while (*cp) {
if (*cp == '%') {
- /* %( is the start of an atom;
+ /*
+ * %( is the start of an atom;
* %% is a quoted per-cent.
*/
if (cp[1] == '(')
@@ -420,7 +429,8 @@ static void grab_person(const char *who, struct atom_value *val, int deref, stru
grab_date(wholine, v, name);
}
- /* For a tag or a commit object, if "creator" or "creatordate" is
+ /*
+ * For a tag or a commit object, if "creator" or "creatordate" is
* requested, do something special.
*/
if (strcmp(who, "tagger") && strcmp(who, "committer"))
@@ -502,7 +512,8 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct obj
}
}
-/* We want to have empty print-string for field requests
+/*
+ * We want to have empty print-string for field requests
* that do not apply (e.g. "authordate" for a tag object)
*/
static void fill_missing_values(struct atom_value *val)
@@ -548,6 +559,13 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v
}
}
+static inline char *copy_advance(char *dst, const char *src)
+{
+ while (*src)
+ *dst++ = *src++;
+ return dst;
+}
+
/*
* Parse the object referred by ref, and grab needed value.
*/
@@ -561,6 +579,16 @@ static void populate_value(struct refinfo *ref)
ref->value = xcalloc(sizeof(struct atom_value), used_atom_cnt);
+ if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
+ unsigned char unused1[20];
+ const char *symref;
+ symref = resolve_ref(ref->refname, unused1, 1, NULL);
+ if (symref)
+ ref->symref = xstrdup(symref);
+ else
+ ref->symref = "";
+ }
+
/* Fill in specials first */
for (i = 0; i < used_atom_cnt; i++) {
const char *name = used_atom[i];
@@ -576,6 +604,8 @@ static void populate_value(struct refinfo *ref)
if (!prefixcmp(name, "refname"))
refname = ref->refname;
+ else if (!prefixcmp(name, "symref"))
+ refname = ref->symref ? ref->symref : "";
else if (!prefixcmp(name, "upstream")) {
struct branch *branch;
/* only local branches may have an upstream */
@@ -588,6 +618,20 @@ static void populate_value(struct refinfo *ref)
continue;
refname = branch->merge[0]->dst;
}
+ else if (!strcmp(name, "flag")) {
+ char buf[256], *cp = buf;
+ if (ref->flag & REF_ISSYMREF)
+ cp = copy_advance(cp, ",symref");
+ if (ref->flag & REF_ISPACKED)
+ cp = copy_advance(cp, ",packed");
+ if (cp == buf)
+ v->s = "";
+ else {
+ *cp = '\0';
+ v->s = xstrdup(buf + 1);
+ }
+ continue;
+ }
else
continue;
@@ -633,18 +677,21 @@ static void populate_value(struct refinfo *ref)
if (!eaten)
free(buf);
- /* If there is no atom that wants to know about tagged
+ /*
+ * If there is no atom that wants to know about tagged
* object, we are done.
*/
if (!need_tagged || (obj->type != OBJ_TAG))
return;
- /* If it is a tag object, see if we use a value that derefs
+ /*
+ * If it is a tag object, see if we use a value that derefs
* the object, and if we do grab the object it refers to.
*/
tagged = ((struct tag *)obj)->tagged->sha1;
- /* NEEDSWORK: This derefs tag only once, which
+ /*
+ * NEEDSWORK: This derefs tag only once, which
* is good to deal with chains of trust, but
* is not consistent with what deref_tag() does
* which peels the onion to the core.
@@ -681,9 +728,8 @@ struct grab_ref_cbdata {
};
/*
- * A call-back given to for_each_ref(). It is unfortunate that we
- * need to use global variables to pass extra information to this
- * function.
+ * A call-back given to for_each_ref(). Filter refs and keep them for
+ * later object processing.
*/
static int grab_single_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
{
@@ -711,13 +757,15 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
return 0;
}
- /* We do not open the object yet; sort may only need refname
+ /*
+ * We do not open the object yet; sort may only need refname
* to do its job and the resulting list may yet to be pruned
* by maxcount logic.
*/
ref = xcalloc(1, sizeof(*ref));
ref->refname = xstrdup(refname);
hashcpy(ref->objectname, sha1);
+ ref->flag = flag;
cnt = cb->grab_cnt;
cb->grab_array = xrealloc(cb->grab_array,
@@ -938,13 +986,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
refs = cbdata.grab_array;
num_refs = cbdata.grab_cnt;
- for (i = 0; i < used_atom_cnt; i++) {
- if (used_atom[i][0] == '*') {
- need_tagged = 1;
- break;
- }
- }
-
sort_refs(sort, refs, num_refs);
if (!maxcount || num_refs < maxcount)
diff --git a/builtin-fsck.c b/builtin/fsck.c
index 0e5faae381..0929c7f245 100644
--- a/builtin-fsck.c
+++ b/builtin/fsck.c
@@ -578,7 +578,7 @@ static struct option fsck_opts[] = {
OPT_BOOLEAN(0, "root", &show_root, "report root nodes"),
OPT_BOOLEAN(0, "cache", &keep_cache_objects, "make index objects head nodes"),
OPT_BOOLEAN(0, "reflogs", &include_reflogs, "make reflogs head nodes (default)"),
- OPT_BOOLEAN(0, "full", &check_full, "also consider alternate objects"),
+ OPT_BOOLEAN(0, "full", &check_full, "also consider packs and alternate objects"),
OPT_BOOLEAN(0, "strict", &check_strict, "enable more strict checking"),
OPT_BOOLEAN(0, "lost-found", &write_lost_and_found,
"write dangling objects in .git/lost-found"),
diff --git a/builtin-gc.c b/builtin/gc.c
index c304638b78..c304638b78 100644
--- a/builtin-gc.c
+++ b/builtin/gc.c
diff --git a/builtin-grep.c b/builtin/grep.c
index da854fa94f..9d30ddb28d 100644
--- a/builtin-grep.c
+++ b/builtin/grep.c
@@ -16,14 +16,280 @@
#include "quote.h"
#include "dir.h"
+#ifndef NO_PTHREADS
+#include "thread-utils.h"
+#include <pthread.h>
+#endif
+
static char const * const grep_usage[] = {
"git grep [options] [-e] <pattern> [<rev>...] [[--] path...]",
NULL
};
+static int use_threads = 1;
+
+#ifndef NO_PTHREADS
+#define THREADS 8
+static pthread_t threads[THREADS];
+
+static void *load_sha1(const unsigned char *sha1, unsigned long *size,
+ const char *name);
+static void *load_file(const char *filename, size_t *sz);
+
+enum work_type {WORK_SHA1, WORK_FILE};
+
+/* We use one producer thread and THREADS consumer
+ * threads. The producer adds struct work_items to 'todo' and the
+ * consumers pick work items from the same array.
+ */
+struct work_item
+{
+ enum work_type type;
+ char *name;
+
+ /* if type == WORK_SHA1, then 'identifier' is a SHA1,
+ * otherwise type == WORK_FILE, and 'identifier' is a NUL
+ * terminated filename.
+ */
+ void *identifier;
+ char done;
+ struct strbuf out;
+};
+
+/* In the range [todo_done, todo_start) in 'todo' we have work_items
+ * that have been or are processed by a consumer thread. We haven't
+ * written the result for these to stdout yet.
+ *
+ * The work_items in [todo_start, todo_end) are waiting to be picked
+ * up by a consumer thread.
+ *
+ * The ranges are modulo TODO_SIZE.
+ */
+#define TODO_SIZE 128
+static struct work_item todo[TODO_SIZE];
+static int todo_start;
+static int todo_end;
+static int todo_done;
+
+/* Has all work items been added? */
+static int all_work_added;
+
+/* This lock protects all the variables above. */
+static pthread_mutex_t grep_mutex;
+
+/* Used to serialize calls to read_sha1_file. */
+static pthread_mutex_t read_sha1_mutex;
+
+#define grep_lock() pthread_mutex_lock(&grep_mutex)
+#define grep_unlock() pthread_mutex_unlock(&grep_mutex)
+#define read_sha1_lock() pthread_mutex_lock(&read_sha1_mutex)
+#define read_sha1_unlock() pthread_mutex_unlock(&read_sha1_mutex)
+
+/* Signalled when a new work_item is added to todo. */
+static pthread_cond_t cond_add;
+
+/* Signalled when the result from one work_item is written to
+ * stdout.
+ */
+static pthread_cond_t cond_write;
+
+/* Signalled when we are finished with everything. */
+static pthread_cond_t cond_result;
+
+static void add_work(enum work_type type, char *name, void *id)
+{
+ grep_lock();
+
+ while ((todo_end+1) % ARRAY_SIZE(todo) == todo_done) {
+ pthread_cond_wait(&cond_write, &grep_mutex);
+ }
+
+ todo[todo_end].type = type;
+ todo[todo_end].name = name;
+ todo[todo_end].identifier = id;
+ todo[todo_end].done = 0;
+ strbuf_reset(&todo[todo_end].out);
+ todo_end = (todo_end + 1) % ARRAY_SIZE(todo);
+
+ pthread_cond_signal(&cond_add);
+ grep_unlock();
+}
+
+static struct work_item *get_work(void)
+{
+ struct work_item *ret;
+
+ grep_lock();
+ while (todo_start == todo_end && !all_work_added) {
+ pthread_cond_wait(&cond_add, &grep_mutex);
+ }
+
+ if (todo_start == todo_end && all_work_added) {
+ ret = NULL;
+ } else {
+ ret = &todo[todo_start];
+ todo_start = (todo_start + 1) % ARRAY_SIZE(todo);
+ }
+ grep_unlock();
+ return ret;
+}
+
+static void grep_sha1_async(struct grep_opt *opt, char *name,
+ const unsigned char *sha1)
+{
+ unsigned char *s;
+ s = xmalloc(20);
+ memcpy(s, sha1, 20);
+ add_work(WORK_SHA1, name, s);
+}
+
+static void grep_file_async(struct grep_opt *opt, char *name,
+ const char *filename)
+{
+ add_work(WORK_FILE, name, xstrdup(filename));
+}
+
+static void work_done(struct work_item *w)
+{
+ int old_done;
+
+ grep_lock();
+ w->done = 1;
+ old_done = todo_done;
+ for(; todo[todo_done].done && todo_done != todo_start;
+ todo_done = (todo_done+1) % ARRAY_SIZE(todo)) {
+ w = &todo[todo_done];
+ write_or_die(1, w->out.buf, w->out.len);
+ free(w->name);
+ free(w->identifier);
+ }
+
+ if (old_done != todo_done)
+ pthread_cond_signal(&cond_write);
+
+ if (all_work_added && todo_done == todo_end)
+ pthread_cond_signal(&cond_result);
+
+ grep_unlock();
+}
+
+static void *run(void *arg)
+{
+ int hit = 0;
+ struct grep_opt *opt = arg;
+
+ while (1) {
+ struct work_item *w = get_work();
+ if (!w)
+ break;
+
+ opt->output_priv = w;
+ if (w->type == WORK_SHA1) {
+ unsigned long sz;
+ void* data = load_sha1(w->identifier, &sz, w->name);
+
+ if (data) {
+ hit |= grep_buffer(opt, w->name, data, sz);
+ free(data);
+ }
+ } else if (w->type == WORK_FILE) {
+ size_t sz;
+ void* data = load_file(w->identifier, &sz);
+ if (data) {
+ hit |= grep_buffer(opt, w->name, data, sz);
+ free(data);
+ }
+ } else {
+ assert(0);
+ }
+
+ work_done(w);
+ }
+ free_grep_patterns(arg);
+ free(arg);
+
+ return (void*) (intptr_t) hit;
+}
+
+static void strbuf_out(struct grep_opt *opt, const void *buf, size_t size)
+{
+ struct work_item *w = opt->output_priv;
+ strbuf_add(&w->out, buf, size);
+}
+
+static void start_threads(struct grep_opt *opt)
+{
+ int i;
+
+ pthread_mutex_init(&grep_mutex, NULL);
+ pthread_mutex_init(&read_sha1_mutex, NULL);
+ pthread_cond_init(&cond_add, NULL);
+ pthread_cond_init(&cond_write, NULL);
+ pthread_cond_init(&cond_result, NULL);
+
+ for (i = 0; i < ARRAY_SIZE(todo); i++) {
+ strbuf_init(&todo[i].out, 0);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(threads); i++) {
+ int err;
+ struct grep_opt *o = grep_opt_dup(opt);
+ o->output = strbuf_out;
+ compile_grep_patterns(o);
+ err = pthread_create(&threads[i], NULL, run, o);
+
+ if (err)
+ die("grep: failed to create thread: %s",
+ strerror(err));
+ }
+}
+
+static int wait_all(void)
+{
+ int hit = 0;
+ int i;
+
+ grep_lock();
+ all_work_added = 1;
+
+ /* Wait until all work is done. */
+ while (todo_done != todo_end)
+ pthread_cond_wait(&cond_result, &grep_mutex);
+
+ /* Wake up all the consumer threads so they can see that there
+ * is no more work to do.
+ */
+ pthread_cond_broadcast(&cond_add);
+ grep_unlock();
+
+ for (i = 0; i < ARRAY_SIZE(threads); i++) {
+ void *h;
+ pthread_join(threads[i], &h);
+ hit |= (int) (intptr_t) h;
+ }
+
+ pthread_mutex_destroy(&grep_mutex);
+ pthread_mutex_destroy(&read_sha1_mutex);
+ pthread_cond_destroy(&cond_add);
+ pthread_cond_destroy(&cond_write);
+ pthread_cond_destroy(&cond_result);
+
+ return hit;
+}
+#else /* !NO_PTHREADS */
+#define read_sha1_lock()
+#define read_sha1_unlock()
+
+static int wait_all(void)
+{
+ return 0;
+}
+#endif
+
static int grep_config(const char *var, const char *value, void *cb)
{
struct grep_opt *opt = cb;
+ char *color = NULL;
switch (userdiff_config(var, value)) {
case 0: break;
@@ -31,17 +297,30 @@ static int grep_config(const char *var, const char *value, void *cb)
default: return 0;
}
- if (!strcmp(var, "color.grep")) {
+ if (!strcmp(var, "color.grep"))
opt->color = git_config_colorbool(var, value, -1);
- return 0;
- }
- if (!strcmp(var, "color.grep.match")) {
+ else if (!strcmp(var, "color.grep.context"))
+ color = opt->color_context;
+ else if (!strcmp(var, "color.grep.filename"))
+ color = opt->color_filename;
+ else if (!strcmp(var, "color.grep.function"))
+ color = opt->color_function;
+ else if (!strcmp(var, "color.grep.linenumber"))
+ color = opt->color_lineno;
+ else if (!strcmp(var, "color.grep.match"))
+ color = opt->color_match;
+ else if (!strcmp(var, "color.grep.selected"))
+ color = opt->color_selected;
+ else if (!strcmp(var, "color.grep.separator"))
+ color = opt->color_sep;
+ else
+ return git_color_default_config(var, value, cb);
+ if (color) {
if (!value)
return config_error_nonbool(var);
- color_parse(value, var, opt->color_match);
- return 0;
+ color_parse(value, var, color);
}
- return git_color_default_config(var, value, cb);
+ return 0;
}
/*
@@ -144,37 +423,74 @@ static int pathspec_matches(const char **paths, const char *name, int max_depth)
return 0;
}
-static int grep_sha1(struct grep_opt *opt, const unsigned char *sha1, const char *name, int tree_name_len)
+static void *lock_and_read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size)
+{
+ void *data;
+
+ if (use_threads) {
+ read_sha1_lock();
+ data = read_sha1_file(sha1, type, size);
+ read_sha1_unlock();
+ } else {
+ data = read_sha1_file(sha1, type, size);
+ }
+ return data;
+}
+
+static void *load_sha1(const unsigned char *sha1, unsigned long *size,
+ const char *name)
{
- unsigned long size;
- char *data;
enum object_type type;
- int hit;
- struct strbuf pathbuf = STRBUF_INIT;
+ void *data = lock_and_read_sha1_file(sha1, &type, size);
- data = read_sha1_file(sha1, &type, &size);
- if (!data) {
+ if (!data)
error("'%s': unable to read %s", name, sha1_to_hex(sha1));
- return 0;
- }
+
+ return data;
+}
+
+static int grep_sha1(struct grep_opt *opt, const unsigned char *sha1,
+ const char *filename, int tree_name_len)
+{
+ struct strbuf pathbuf = STRBUF_INIT;
+ char *name;
+
if (opt->relative && opt->prefix_length) {
- quote_path_relative(name + tree_name_len, -1, &pathbuf, opt->prefix);
- strbuf_insert(&pathbuf, 0, name, tree_name_len);
- name = pathbuf.buf;
+ quote_path_relative(filename + tree_name_len, -1, &pathbuf,
+ opt->prefix);
+ strbuf_insert(&pathbuf, 0, filename, tree_name_len);
+ } else {
+ strbuf_addstr(&pathbuf, filename);
+ }
+
+ name = strbuf_detach(&pathbuf, NULL);
+
+#ifndef NO_PTHREADS
+ if (use_threads) {
+ grep_sha1_async(opt, name, sha1);
+ return 0;
+ } else
+#endif
+ {
+ int hit;
+ unsigned long sz;
+ void *data = load_sha1(sha1, &sz, name);
+ if (!data)
+ hit = 0;
+ else
+ hit = grep_buffer(opt, name, data, sz);
+
+ free(data);
+ free(name);
+ return hit;
}
- hit = grep_buffer(opt, name, data, size);
- strbuf_release(&pathbuf);
- free(data);
- return hit;
}
-static int grep_file(struct grep_opt *opt, const char *filename)
+static void *load_file(const char *filename, size_t *sz)
{
struct stat st;
- int i;
char *data;
- size_t sz;
- struct strbuf buf = STRBUF_INIT;
+ int i;
if (lstat(filename, &st) < 0) {
err_ret:
@@ -184,25 +500,52 @@ static int grep_file(struct grep_opt *opt, const char *filename)
}
if (!S_ISREG(st.st_mode))
return 0;
- sz = xsize_t(st.st_size);
+ *sz = xsize_t(st.st_size);
i = open(filename, O_RDONLY);
if (i < 0)
goto err_ret;
- data = xmalloc(sz + 1);
- if (st.st_size != read_in_full(i, data, sz)) {
+ data = xmalloc(*sz + 1);
+ if (st.st_size != read_in_full(i, data, *sz)) {
error("'%s': short read %s", filename, strerror(errno));
close(i);
free(data);
return 0;
}
close(i);
- data[sz] = 0;
+ data[*sz] = 0;
+ return data;
+}
+
+static int grep_file(struct grep_opt *opt, const char *filename)
+{
+ struct strbuf buf = STRBUF_INIT;
+ char *name;
+
if (opt->relative && opt->prefix_length)
- filename = quote_path_relative(filename, -1, &buf, opt->prefix);
- i = grep_buffer(opt, filename, data, sz);
- strbuf_release(&buf);
- free(data);
- return i;
+ quote_path_relative(filename, -1, &buf, opt->prefix);
+ else
+ strbuf_addstr(&buf, filename);
+ name = strbuf_detach(&buf, NULL);
+
+#ifndef NO_PTHREADS
+ if (use_threads) {
+ grep_file_async(opt, name, filename);
+ return 0;
+ } else
+#endif
+ {
+ int hit;
+ size_t sz;
+ void *data = load_file(filename, &sz);
+ if (!data)
+ hit = 0;
+ else
+ hit = grep_buffer(opt, name, data, sz);
+
+ free(data);
+ free(name);
+ return hit;
+ }
}
static int grep_cache(struct grep_opt *opt, const char **paths, int cached)
@@ -236,6 +579,8 @@ static int grep_cache(struct grep_opt *opt, const char **paths, int cached)
!strcmp(ce->name, active_cache[nr]->name));
nr--; /* compensate for loop control */
}
+ if (hit && opt->status_only)
+ break;
}
free_grep_patterns(opt);
return hit;
@@ -285,7 +630,7 @@ static int grep_tree(struct grep_opt *opt, const char **paths,
void *data;
unsigned long size;
- data = read_sha1_file(entry.sha1, &type, &size);
+ data = lock_and_read_sha1_file(entry.sha1, &type, &size);
if (!data)
die("unable to read tree (%s)",
sha1_to_hex(entry.sha1));
@@ -293,6 +638,8 @@ static int grep_tree(struct grep_opt *opt, const char **paths,
hit |= grep_tree(opt, paths, &sub, tree_name, down);
free(data);
}
+ if (hit && opt->status_only)
+ break;
}
strbuf_release(&pathbuf);
return hit;
@@ -329,8 +676,11 @@ static int grep_directory(struct grep_opt *opt, const char **paths)
setup_standard_excludes(&dir);
fill_directory(&dir, paths);
- for (i = 0; i < dir.nr; i++)
+ for (i = 0; i < dir.nr; i++) {
hit |= grep_file(opt, dir.entries[i]->name);
+ if (hit && opt->status_only)
+ break;
+ }
free_grep_patterns(opt);
return hit;
}
@@ -475,7 +825,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
"print NUL after filenames"),
OPT_BOOLEAN('c', "count", &opt.count,
"show the number of matches instead of matching lines"),
- OPT_SET_INT(0, "color", &opt.color, "highlight matches", 1),
+ OPT__COLOR(&opt.color, "highlight matches"),
OPT_GROUP(""),
OPT_CALLBACK('C', NULL, &opt, "n",
"show <n> context lines before and after matches",
@@ -505,6 +855,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
{ OPTION_CALLBACK, ')', NULL, &opt, NULL, "",
PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH,
close_callback },
+ OPT_BOOLEAN('q', "quiet", &opt.status_only,
+ "indicate hit with exit status without output"),
OPT_BOOLEAN(0, "all-match", &opt.all_match,
"show only matches from files that match all patterns"),
OPT_GROUP(""),
@@ -530,10 +882,17 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
opt.relative = 1;
opt.pathname = 1;
opt.pattern_tail = &opt.pattern_list;
+ opt.header_tail = &opt.header_list;
opt.regflags = REG_NEWLINE;
opt.max_depth = -1;
- strcpy(opt.color_match, GIT_COLOR_RED GIT_COLOR_BOLD);
+ strcpy(opt.color_context, "");
+ strcpy(opt.color_filename, "");
+ strcpy(opt.color_function, "");
+ strcpy(opt.color_lineno, "");
+ strcpy(opt.color_match, GIT_COLOR_BOLD_RED);
+ strcpy(opt.color_selected, "");
+ strcpy(opt.color_sep, GIT_COLOR_CYAN);
opt.color = -1;
git_config(grep_config, &opt);
if (opt.color == -1)
@@ -558,6 +917,16 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
/* die the same way as if we did it at the beginning */
setup_git_directory();
+ /*
+ * skip a -- separator; we know it cannot be
+ * separating revisions from pathnames if
+ * we haven't even had any patterns yet
+ */
+ if (argc > 0 && !opt.pattern_list && !strcmp(argv[0], "--")) {
+ argv++;
+ argc--;
+ }
+
/* First unrecognized non-option token */
if (argc > 0 && !opt.pattern_list) {
append_grep_pattern(&opt, argv[0], "command line", 0,
@@ -572,6 +941,17 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
opt.regflags |= REG_ICASE;
if ((opt.regflags != REG_NEWLINE) && opt.fixed)
die("cannot mix --fixed-strings and regexp");
+
+#ifndef NO_PTHREADS
+ if (online_cpus() == 1 || !grep_threads_ok(&opt))
+ use_threads = 0;
+
+ if (use_threads)
+ start_threads(&opt);
+#else
+ use_threads = 0;
+#endif
+
compile_grep_patterns(&opt);
/* Check revs and then paths */
@@ -609,17 +989,26 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
}
if (!use_index) {
+ int hit;
if (cached)
die("--cached cannot be used with --no-index.");
if (list.nr)
die("--no-index cannot be used with revs.");
- return !grep_directory(&opt, paths);
+ hit = grep_directory(&opt, paths);
+ if (use_threads)
+ hit |= wait_all();
+ return !hit;
}
if (!list.nr) {
+ int hit;
if (!cached)
setup_work_tree();
- return !grep_cache(&opt, paths, cached);
+
+ hit = grep_cache(&opt, paths, cached);
+ if (use_threads)
+ hit |= wait_all();
+ return !hit;
}
if (cached)
@@ -628,9 +1017,15 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
for (i = 0; i < list.nr; i++) {
struct object *real_obj;
real_obj = deref_tag(list.objects[i].item, NULL, 0);
- if (grep_object(&opt, paths, real_obj, list.objects[i].name))
+ if (grep_object(&opt, paths, real_obj, list.objects[i].name)) {
hit = 1;
+ if (opt.status_only)
+ break;
+ }
}
+
+ if (use_threads)
+ hit |= wait_all();
free_grep_patterns(&opt);
return !hit;
}
diff --git a/builtin-hash-object.c b/builtin/hash-object.c
index 6a5f5b5f0e..080af1a01b 100644
--- a/builtin-hash-object.c
+++ b/builtin/hash-object.c
@@ -33,6 +33,8 @@ static void hash_object(const char *path, const char *type, int write_object,
hash_fd(fd, type, write_object, vpath);
}
+static int no_filters;
+
static void hash_stdin_paths(const char *type, int write_objects)
{
struct strbuf buf = STRBUF_INIT, nbuf = STRBUF_INIT;
@@ -44,7 +46,8 @@ static void hash_stdin_paths(const char *type, int write_objects)
die("line is badly quoted");
strbuf_swap(&buf, &nbuf);
}
- hash_object(buf.buf, type, write_objects, buf.buf);
+ hash_object(buf.buf, type, write_objects,
+ no_filters ? NULL : buf.buf);
}
strbuf_release(&buf);
strbuf_release(&nbuf);
@@ -60,7 +63,6 @@ static const char *type;
static int write_object;
static int hashstdin;
static int stdin_paths;
-static int no_filters;
static const char *vpath;
static const struct option hash_object_options[] = {
@@ -100,8 +102,6 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
errstr = "Can't specify files with --stdin-paths";
else if (vpath)
errstr = "Can't use --stdin-paths with --path";
- else if (no_filters)
- errstr = "Can't use --stdin-paths with --no-filters";
}
else {
if (hashstdin > 1)
diff --git a/builtin-help.c b/builtin/help.c
index 3182a2bec4..3182a2bec4 100644
--- a/builtin-help.c
+++ b/builtin/help.c
diff --git a/builtin-index-pack.c b/builtin/index-pack.c
index b4cf8c53e0..b4cf8c53e0 100644
--- a/builtin-index-pack.c
+++ b/builtin/index-pack.c
diff --git a/builtin-init-db.c b/builtin/init-db.c
index dd84caecbc..edc40ff574 100644
--- a/builtin-init-db.c
+++ b/builtin/init-db.c
@@ -20,6 +20,7 @@
static int init_is_bare_repository = 0;
static int init_shared_repository = -1;
+static const char *init_db_template_dir;
static void safe_create_dir(const char *dir, int share)
{
@@ -121,6 +122,8 @@ static void copy_templates(const char *template_dir)
if (!template_dir)
template_dir = getenv(TEMPLATE_DIR_ENVIRONMENT);
if (!template_dir)
+ template_dir = init_db_template_dir;
+ if (!template_dir)
template_dir = system_path(DEFAULT_GIT_TEMPLATE_DIR);
if (!template_dir[0])
return;
@@ -165,6 +168,14 @@ static void copy_templates(const char *template_dir)
closedir(dir);
}
+static int git_init_db_config(const char *k, const char *v, void *cb)
+{
+ if (!strcmp(k, "init.templatedir"))
+ return git_config_pathname(&init_db_template_dir, k, v);
+
+ return 0;
+}
+
static int create_default_files(const char *template_path)
{
const char *git_dir = get_git_dir();
@@ -190,6 +201,9 @@ static int create_default_files(const char *template_path)
safe_create_dir(git_path("refs/heads"), 1);
safe_create_dir(git_path("refs/tags"), 1);
+ /* Just look for `init.templatedir` */
+ git_config(git_init_db_config, NULL);
+
/* First copy the templates -- we might have the default
* config file there, in which case we would want to read
* from it after installing.
@@ -331,11 +345,14 @@ int init_db(const char *template_dir, unsigned int flags)
git_config_set("receive.denyNonFastforwards", "true");
}
- if (!(flags & INIT_DB_QUIET))
- printf("%s%s Git repository in %s/\n",
+ if (!(flags & INIT_DB_QUIET)) {
+ const char *git_dir = get_git_dir();
+ int len = strlen(git_dir);
+ printf("%s%s Git repository in %s%s\n",
reinit ? "Reinitialized existing" : "Initialized empty",
shared_repository ? " shared" : "",
- get_git_dir());
+ git_dir, len && git_dir[len-1] != '/' ? "/" : "");
+ }
return 0;
}
diff --git a/builtin-log.c b/builtin/log.c
index dc09253ef1..a8dd8c989c 100644
--- a/builtin-log.c
+++ b/builtin/log.c
@@ -32,7 +32,7 @@ static const char * const builtin_log_usage =
" or: git show [options] <object>...";
static void cmd_log_init(int argc, const char **argv, const char *prefix,
- struct rev_info *rev)
+ struct rev_info *rev, struct setup_revision_opt *opt)
{
int i;
int decoration_style = 0;
@@ -56,7 +56,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
*/
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(builtin_log_usage);
- argc = setup_revisions(argc, argv, rev, "HEAD");
+ argc = setup_revisions(argc, argv, rev, opt);
if (!rev->show_notes_given && !rev->pretty_given)
rev->show_notes = 1;
@@ -264,6 +264,7 @@ static int git_log_config(const char *var, const char *value, void *cb)
int cmd_whatchanged(int argc, const char **argv, const char *prefix)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
git_config(git_log_config, NULL);
@@ -273,7 +274,9 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
init_revisions(&rev, prefix);
rev.diff = 1;
rev.simplify_history = 0;
- cmd_log_init(argc, argv, prefix, &rev);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = "HEAD";
+ cmd_log_init(argc, argv, prefix, &rev, &opt);
if (!rev.diffopt.output_format)
rev.diffopt.output_format = DIFF_FORMAT_RAW;
return cmd_log_walk(&rev);
@@ -326,10 +329,26 @@ static int show_tree_object(const unsigned char *sha1,
return 0;
}
+static void show_rev_tweak_rev(struct rev_info *rev, struct setup_revision_opt *opt)
+{
+ if (rev->ignore_merges) {
+ /* There was no "-m" on the command line */
+ rev->ignore_merges = 0;
+ if (!rev->first_parent_only && !rev->combine_merges) {
+ /* No "--first-parent", "-c", nor "--cc" */
+ rev->combine_merges = 1;
+ rev->dense_combined_merges = 1;
+ }
+ }
+ if (!rev->diffopt.output_format)
+ rev->diffopt.output_format = DIFF_FORMAT_PATCH;
+}
+
int cmd_show(int argc, const char **argv, const char *prefix)
{
struct rev_info rev;
struct object_array_entry *objects;
+ struct setup_revision_opt opt;
int i, count, ret = 0;
git_config(git_log_config, NULL);
@@ -339,12 +358,12 @@ int cmd_show(int argc, const char **argv, const char *prefix)
init_revisions(&rev, prefix);
rev.diff = 1;
- rev.combine_merges = 1;
- rev.dense_combined_merges = 1;
rev.always_show_header = 1;
- rev.ignore_merges = 0;
rev.no_walk = 1;
- cmd_log_init(argc, argv, prefix, &rev);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = "HEAD";
+ opt.tweak = show_rev_tweak_rev;
+ cmd_log_init(argc, argv, prefix, &rev, &opt);
count = rev.pending.nr;
objects = rev.pending.objects;
@@ -407,6 +426,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
int cmd_log_reflog(int argc, const char **argv, const char *prefix)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
git_config(git_log_config, NULL);
@@ -417,7 +437,9 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
init_reflog_walk(&rev.reflog_info);
rev.abbrev_commit = 1;
rev.verbose_header = 1;
- cmd_log_init(argc, argv, prefix, &rev);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = "HEAD";
+ cmd_log_init(argc, argv, prefix, &rev, &opt);
/*
* This means that we override whatever commit format the user gave
@@ -440,6 +462,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
int cmd_log(int argc, const char **argv, const char *prefix)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
git_config(git_log_config, NULL);
@@ -448,7 +471,9 @@ int cmd_log(int argc, const char **argv, const char *prefix)
init_revisions(&rev, prefix);
rev.always_show_header = 1;
- cmd_log_init(argc, argv, prefix, &rev);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = "HEAD";
+ cmd_log_init(argc, argv, prefix, &rev, &opt);
return cmd_log_walk(&rev);
}
@@ -460,35 +485,28 @@ static int auto_number = 1;
static char *default_attach = NULL;
-static char **extra_hdr;
-static int extra_hdr_nr;
-static int extra_hdr_alloc;
-
-static char **extra_to;
-static int extra_to_nr;
-static int extra_to_alloc;
-
-static char **extra_cc;
-static int extra_cc_nr;
-static int extra_cc_alloc;
+static struct string_list extra_hdr;
+static struct string_list extra_to;
+static struct string_list extra_cc;
static void add_header(const char *value)
{
+ struct string_list_item *item;
int len = strlen(value);
while (len && value[len - 1] == '\n')
len--;
+
if (!strncasecmp(value, "to: ", 4)) {
- ALLOC_GROW(extra_to, extra_to_nr + 1, extra_to_alloc);
- extra_to[extra_to_nr++] = xstrndup(value + 4, len - 4);
- return;
- }
- if (!strncasecmp(value, "cc: ", 4)) {
- ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
- extra_cc[extra_cc_nr++] = xstrndup(value + 4, len - 4);
- return;
+ item = string_list_append(value + 4, &extra_to);
+ len -= 4;
+ } else if (!strncasecmp(value, "cc: ", 4)) {
+ item = string_list_append(value + 4, &extra_cc);
+ len -= 4;
+ } else {
+ item = string_list_append(value, &extra_hdr);
}
- ALLOC_GROW(extra_hdr, extra_hdr_nr + 1, extra_hdr_alloc);
- extra_hdr[extra_hdr_nr++] = xstrndup(value, len);
+
+ item->string[len] = '\0';
}
#define THREAD_SHALLOW 1
@@ -506,11 +524,16 @@ static int git_format_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, "format.suffix"))
return git_config_string(&fmt_patch_suffix, var, value);
+ if (!strcmp(var, "format.to")) {
+ if (!value)
+ return config_error_nonbool(var);
+ string_list_append(value, &extra_to);
+ return 0;
+ }
if (!strcmp(var, "format.cc")) {
if (!value)
return config_error_nonbool(var);
- ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
- extra_cc[extra_cc_nr++] = xstrdup(value);
+ string_list_append(value, &extra_cc);
return 0;
}
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
@@ -873,14 +896,31 @@ static int inline_callback(const struct option *opt, const char *arg, int unset)
static int header_callback(const struct option *opt, const char *arg, int unset)
{
- add_header(arg);
+ if (unset) {
+ string_list_clear(&extra_hdr, 0);
+ string_list_clear(&extra_to, 0);
+ string_list_clear(&extra_cc, 0);
+ } else {
+ add_header(arg);
+ }
+ return 0;
+}
+
+static int to_callback(const struct option *opt, const char *arg, int unset)
+{
+ if (unset)
+ string_list_clear(&extra_to, 0);
+ else
+ string_list_append(arg, &extra_to);
return 0;
}
static int cc_callback(const struct option *opt, const char *arg, int unset)
{
- ALLOC_GROW(extra_cc, extra_cc_nr + 1, extra_cc_alloc);
- extra_cc[extra_cc_nr++] = xstrdup(arg);
+ if (unset)
+ string_list_clear(&extra_cc, 0);
+ else
+ string_list_append(arg, &extra_cc);
return 0;
}
@@ -889,6 +929,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
struct commit *commit;
struct commit **list = NULL;
struct rev_info rev;
+ struct setup_revision_opt s_r_opt;
int nr = 0, total, i;
int use_stdout = 0;
int start_number = -1;
@@ -939,10 +980,11 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
PARSE_OPT_NONEG | PARSE_OPT_NOARG },
OPT_GROUP("Messaging"),
{ OPTION_CALLBACK, 0, "add-header", NULL, "header",
- "add email header", PARSE_OPT_NONEG,
- header_callback },
+ "add email header", 0, header_callback },
+ { OPTION_CALLBACK, 0, "to", NULL, "email", "add To: header",
+ 0, to_callback },
{ OPTION_CALLBACK, 0, "cc", NULL, "email", "add Cc: header",
- PARSE_OPT_NONEG, cc_callback },
+ 0, cc_callback },
OPT_STRING(0, "in-reply-to", &in_reply_to, "message-id",
"make first mail a reply to <message-id>"),
{ OPTION_CALLBACK, 0, "attach", &rev, "boundary",
@@ -958,6 +1000,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
OPT_END()
};
+ extra_hdr.strdup_strings = 1;
+ extra_to.strdup_strings = 1;
+ extra_cc.strdup_strings = 1;
git_config(git_format_config, NULL);
init_revisions(&rev, prefix);
rev.commit_format = CMIT_FMT_EMAIL;
@@ -966,8 +1011,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.combine_merges = 0;
rev.ignore_merges = 1;
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
-
rev.subject_prefix = fmt_patch_subject_prefix;
+ memset(&s_r_opt, 0, sizeof(s_r_opt));
+ s_r_opt.def = "HEAD";
if (default_attach) {
rev.mime_boundary = default_attach;
@@ -994,29 +1040,29 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
add_signoff = xmemdupz(committer, endpos - committer + 1);
}
- for (i = 0; i < extra_hdr_nr; i++) {
- strbuf_addstr(&buf, extra_hdr[i]);
+ for (i = 0; i < extra_hdr.nr; i++) {
+ strbuf_addstr(&buf, extra_hdr.items[i].string);
strbuf_addch(&buf, '\n');
}
- if (extra_to_nr)
+ if (extra_to.nr)
strbuf_addstr(&buf, "To: ");
- for (i = 0; i < extra_to_nr; i++) {
+ for (i = 0; i < extra_to.nr; i++) {
if (i)
strbuf_addstr(&buf, " ");
- strbuf_addstr(&buf, extra_to[i]);
- if (i + 1 < extra_to_nr)
+ strbuf_addstr(&buf, extra_to.items[i].string);
+ if (i + 1 < extra_to.nr)
strbuf_addch(&buf, ',');
strbuf_addch(&buf, '\n');
}
- if (extra_cc_nr)
+ if (extra_cc.nr)
strbuf_addstr(&buf, "Cc: ");
- for (i = 0; i < extra_cc_nr; i++) {
+ for (i = 0; i < extra_cc.nr; i++) {
if (i)
strbuf_addstr(&buf, " ");
- strbuf_addstr(&buf, extra_cc[i]);
- if (i + 1 < extra_cc_nr)
+ strbuf_addstr(&buf, extra_cc.items[i].string);
+ if (i + 1 < extra_cc.nr)
strbuf_addch(&buf, ',');
strbuf_addch(&buf, '\n');
}
@@ -1039,7 +1085,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (keep_subject && subject_prefix)
die ("--subject-prefix and -k are mutually exclusive.");
- argc = setup_revisions(argc, argv, &rev, "HEAD");
+ argc = setup_revisions(argc, argv, &rev, &s_r_opt);
if (argc > 1)
die ("unrecognized argument: %s", argv[1]);
@@ -1094,7 +1140,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
/*
* We cannot move this anywhere earlier because we do want to
- * know if --root was given explicitly from the comand line.
+ * know if --root was given explicitly from the command line.
*/
rev.show_root_diff = 1;
@@ -1228,6 +1274,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
fclose(stdout);
}
free(list);
+ string_list_clear(&extra_to, 0);
+ string_list_clear(&extra_cc, 0);
+ string_list_clear(&extra_hdr, 0);
if (ignore_if_in_upstream)
free_patch_ids(&ids);
return 0;
diff --git a/builtin-ls-files.c b/builtin/ls-files.c
index b065061392..b065061392 100644
--- a/builtin-ls-files.c
+++ b/builtin/ls-files.c
diff --git a/builtin-ls-remote.c b/builtin/ls-remote.c
index 70f5622d9d..70f5622d9d 100644
--- a/builtin-ls-remote.c
+++ b/builtin/ls-remote.c
diff --git a/builtin-ls-tree.c b/builtin/ls-tree.c
index 4484185afc..4484185afc 100644
--- a/builtin-ls-tree.c
+++ b/builtin/ls-tree.c
diff --git a/builtin-mailinfo.c b/builtin/mailinfo.c
index a50ac2256c..ce2ef6bede 100644
--- a/builtin-mailinfo.c
+++ b/builtin/mailinfo.c
@@ -779,8 +779,7 @@ static int handle_commit_msg(struct strbuf *line)
return 0;
if (still_looking) {
- strbuf_ltrim(line);
- if (!line->len)
+ if (!line->len || (line->len == 1 && line->buf[0] == '\n'))
return 0;
}
diff --git a/builtin-mailsplit.c b/builtin/mailsplit.c
index 207e358ed1..cdfc1b7042 100644
--- a/builtin-mailsplit.c
+++ b/builtin/mailsplit.c
@@ -10,7 +10,7 @@
#include "strbuf.h"
static const char git_mailsplit_usage[] =
-"git mailsplit [-d<prec>] [-f<n>] [-b] -o<directory> [<mbox>|<Maildir>...]";
+"git mailsplit [-d<prec>] [-f<n>] [-b] [--keep-cr] -o<directory> [<mbox>|<Maildir>...]";
static int is_from_line(const char *line, int len)
{
diff --git a/builtin-merge-base.c b/builtin/merge-base.c
index 54e7ec2237..54e7ec2237 100644
--- a/builtin-merge-base.c
+++ b/builtin/merge-base.c
diff --git a/builtin-merge-file.c b/builtin/merge-file.c
index 1e70073a7e..69cc683332 100644
--- a/builtin-merge-file.c
+++ b/builtin/merge-file.c
@@ -27,30 +27,35 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
mmbuffer_t result = {NULL, 0};
xmparam_t xmp = {{XDF_NEED_MINIMAL}};
int ret = 0, i = 0, to_stdout = 0;
- int level = XDL_MERGE_ZEALOUS_ALNUM;
- int style = 0, quiet = 0;
- int favor = 0;
+ int quiet = 0;
int nongit;
-
struct option options[] = {
OPT_BOOLEAN('p', "stdout", &to_stdout, "send results to standard output"),
- OPT_SET_INT(0, "diff3", &style, "use a diff3 based merge", XDL_MERGE_DIFF3),
- OPT_SET_INT(0, "ours", &favor, "for conflicts, use our version",
+ OPT_SET_INT(0, "diff3", &xmp.style, "use a diff3 based merge", XDL_MERGE_DIFF3),
+ OPT_SET_INT(0, "ours", &xmp.favor, "for conflicts, use our version",
XDL_MERGE_FAVOR_OURS),
- OPT_SET_INT(0, "theirs", &favor, "for conflicts, use their version",
+ OPT_SET_INT(0, "theirs", &xmp.favor, "for conflicts, use their version",
XDL_MERGE_FAVOR_THEIRS),
+ OPT_SET_INT(0, "union", &xmp.favor, "for conflicts, use a union version",
+ XDL_MERGE_FAVOR_UNION),
+ OPT_INTEGER(0, "marker-size", &xmp.marker_size,
+ "for conflicts, use this marker size"),
OPT__QUIET(&quiet),
OPT_CALLBACK('L', NULL, names, "name",
"set labels for file1/orig_file/file2", &label_cb),
OPT_END(),
};
+ xmp.level = XDL_MERGE_ZEALOUS_ALNUM;
+ xmp.style = 0;
+ xmp.favor = 0;
+
prefix = setup_git_directory_gently(&nongit);
if (!nongit) {
/* Read the configuration file */
git_config(git_xmerge_config, NULL);
if (0 <= git_xmerge_style)
- style = git_xmerge_style;
+ xmp.style = git_xmerge_style;
}
argc = parse_options(argc, argv, prefix, options, merge_file_usage, 0);
@@ -73,7 +78,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
}
ret = xdl_merge(mmfs + 1, mmfs + 0, names[0], mmfs + 2, names[2],
- &xmp, XDL_MERGE_FLAGS(level, style, favor), &result);
+ &xmp, &result);
for (i = 0; i < 3; i++)
free(mmfs[i].ptr);
diff --git a/builtin-merge-index.c b/builtin/merge-index.c
index 2c4cf5e559..2c4cf5e559 100644
--- a/builtin-merge-index.c
+++ b/builtin/merge-index.c
diff --git a/builtin-merge-ours.c b/builtin/merge-ours.c
index 684411694f..684411694f 100644
--- a/builtin-merge-ours.c
+++ b/builtin/merge-ours.c
diff --git a/builtin-merge-recursive.c b/builtin/merge-recursive.c
index d8875d5892..d8875d5892 100644
--- a/builtin-merge-recursive.c
+++ b/builtin/merge-recursive.c
diff --git a/builtin-merge-tree.c b/builtin/merge-tree.c
index a4a4f2ce4c..a4a4f2ce4c 100644
--- a/builtin-merge-tree.c
+++ b/builtin/merge-tree.c
diff --git a/builtin-merge.c b/builtin/merge.c
index 3aaec7bed7..3aaec7bed7 100644
--- a/builtin-merge.c
+++ b/builtin/merge.c
diff --git a/builtin-mktag.c b/builtin/mktag.c
index 1cb0f3f2a7..1cb0f3f2a7 100644
--- a/builtin-mktag.c
+++ b/builtin/mktag.c
diff --git a/builtin-mktree.c b/builtin/mktree.c
index 098395fda1..098395fda1 100644
--- a/builtin-mktree.c
+++ b/builtin/mktree.c
diff --git a/builtin-mv.c b/builtin/mv.c
index c07f53b343..c07f53b343 100644
--- a/builtin-mv.c
+++ b/builtin/mv.c
diff --git a/builtin-name-rev.c b/builtin/name-rev.c
index 06a38ac8c1..06a38ac8c1 100644
--- a/builtin-name-rev.c
+++ b/builtin/name-rev.c
diff --git a/builtin-notes.c b/builtin/notes.c
index 2c7351e1e5..52b72fca68 100644
--- a/builtin-notes.c
+++ b/builtin/notes.c
@@ -213,12 +213,9 @@ static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
{
struct msg_arg *msg = opt->value;
- if (!arg)
- return -1;
-
strbuf_grow(&(msg->buf), strlen(arg) + 2);
if (msg->buf.len)
- strbuf_addstr(&(msg->buf), "\n");
+ strbuf_addch(&(msg->buf), '\n');
strbuf_addstr(&(msg->buf), arg);
stripspace(&(msg->buf), 0);
@@ -230,11 +227,8 @@ static int parse_file_arg(const struct option *opt, const char *arg, int unset)
{
struct msg_arg *msg = opt->value;
- if (!arg)
- return -1;
-
if (msg->buf.len)
- strbuf_addstr(&(msg->buf), "\n");
+ strbuf_addch(&(msg->buf), '\n');
if (!strcmp(arg, "-")) {
if (strbuf_read(&(msg->buf), 0, 1024) < 0)
die_errno("cannot read '%s'", arg);
@@ -254,11 +248,8 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
enum object_type type;
unsigned long len;
- if (!arg)
- return -1;
-
if (msg->buf.len)
- strbuf_addstr(&(msg->buf), "\n");
+ strbuf_addch(&(msg->buf), '\n');
if (get_sha1(arg, object))
die("Failed to resolve '%s' as a valid ref.", arg);
diff --git a/builtin-pack-objects.c b/builtin/pack-objects.c
index b0887d759d..97802585ea 100644
--- a/builtin-pack-objects.c
+++ b/builtin/pack-objects.c
@@ -17,7 +17,7 @@
#include "progress.h"
#include "refs.h"
-#ifdef THREADED_DELTA_SEARCH
+#ifndef NO_PTHREADS
#include "thread-utils.h"
#include <pthread.h>
#endif
@@ -77,7 +77,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, pack_size_limit_cfg;
+static unsigned long pack_size_limit, pack_size_limit_cfg;
static int depth = 50;
static int delta_search_threads;
static int pack_to_stdout;
@@ -155,33 +155,6 @@ static unsigned long do_compress(void **pptr, unsigned long size)
}
/*
- * The per-object header is a pretty dense thing, which is
- * - first byte: low four bits are "size", then three bits of "type",
- * and the high bit is "size continues".
- * - each byte afterwards: low seven bits are size continuation,
- * with the high bit being "size continues"
- */
-static int encode_header(enum object_type type, unsigned long size, unsigned char *hdr)
-{
- int n = 1;
- unsigned char c;
-
- if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)
- die("bad type %d", type);
-
- c = (type << 4) | (size & 15);
- size >>= 4;
- while (size) {
- *hdr++ = c | 0x80;
- c = size & 0x7f;
- size >>= 7;
- n++;
- }
- *hdr = c;
- return n;
-}
-
-/*
* we are going to reuse the existing object data as is. make
* sure it is not corrupt.
*/
@@ -246,7 +219,7 @@ static unsigned long write_object(struct sha1file *f,
type = entry->type;
- /* write limit if limited packsize and not first object */
+ /* apply size limit if limited packsize and not first object */
if (!pack_size_limit || !nr_written)
limit = 0;
else if (pack_size_limit <= write_offset)
@@ -321,7 +294,7 @@ static unsigned long write_object(struct sha1file *f,
* The object header is a byte of 'type' followed by zero or
* more bytes of length.
*/
- hdrlen = encode_header(type, size, header);
+ hdrlen = encode_in_pack_object_header(type, size, header);
if (type == OBJ_OFS_DELTA) {
/*
@@ -372,7 +345,7 @@ static unsigned long write_object(struct sha1file *f,
if (entry->delta)
type = (allow_ofs_delta && entry->delta->idx.offset) ?
OBJ_OFS_DELTA : OBJ_REF_DELTA;
- hdrlen = encode_header(type, entry->size, header);
+ hdrlen = encode_in_pack_object_header(type, entry->size, header);
offset = entry->in_pack_offset;
revidx = find_pack_revindex(p, offset);
@@ -443,7 +416,7 @@ static int write_one(struct sha1file *f,
/* offset is non zero if object is written already. */
if (e->idx.offset || e->preferred_base)
- return 1;
+ return -1;
/* if we are deltified, write out base object first. */
if (e->delta && !write_one(f, e->delta, offset))
@@ -464,9 +437,6 @@ static int write_one(struct sha1file *f,
return 1;
}
-/* forward declaration for write_pack_file */
-static int adjust_perm(const char *path, mode_t mode);
-
static void write_pack_file(void)
{
uint32_t i = 0, j;
@@ -523,21 +493,17 @@ static void write_pack_file(void)
}
if (!pack_to_stdout) {
- mode_t mode = umask(0);
struct stat st;
const char *idx_tmp_name;
char tmpname[PATH_MAX];
- umask(mode);
- mode = 0444 & ~mode;
-
idx_tmp_name = write_idx_file(NULL, written_list,
nr_written, sha1);
snprintf(tmpname, sizeof(tmpname), "%s-%s.pack",
base_name, sha1_to_hex(sha1));
free_pack_by_name(tmpname);
- if (adjust_perm(pack_tmp_name, mode))
+ if (adjust_shared_perm(pack_tmp_name))
die_errno("unable to make temporary pack file readable");
if (rename(pack_tmp_name, tmpname))
die_errno("unable to rename temporary pack file");
@@ -565,7 +531,7 @@ static void write_pack_file(void)
snprintf(tmpname, sizeof(tmpname), "%s-%s.idx",
base_name, sha1_to_hex(sha1));
- if (adjust_perm(idx_tmp_name, mode))
+ if (adjust_shared_perm(idx_tmp_name))
die_errno("unable to make temporary index file readable");
if (rename(idx_tmp_name, tmpname))
die_errno("unable to rename temporary index file");
@@ -587,19 +553,6 @@ static void write_pack_file(void)
if (written != nr_result)
die("wrote %"PRIu32" objects while expecting %"PRIu32,
written, nr_result);
- /*
- * We have scanned through [0 ... i). Since we have written
- * the correct number of objects, the remaining [i ... nr_objects)
- * items must be either already written (due to out-of-order delta base)
- * or a preferred base. Count those which are neither and complain if any.
- */
- for (j = 0; i < nr_objects; i++) {
- struct object_entry *e = objects + i;
- j += !e->idx.offset && !e->preferred_base;
- }
- if (j)
- die("wrote %"PRIu32" objects as expected but %"PRIu32
- " unwritten", written, j);
}
static int locate_object_entry_hash(const unsigned char *sha1)
@@ -1255,7 +1208,7 @@ static int delta_cacheable(unsigned long src_size, unsigned long trg_size,
return 0;
}
-#ifdef THREADED_DELTA_SEARCH
+#ifndef NO_PTHREADS
static pthread_mutex_t read_mutex;
#define read_lock() pthread_mutex_lock(&read_mutex)
@@ -1380,7 +1333,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
/*
* Handle memory allocation outside of the cache
* accounting lock. Compiler will optimize the strangeness
- * away when THREADED_DELTA_SEARCH is not defined.
+ * away when NO_PTHREADS is defined.
*/
free(trg_entry->delta_data);
cache_lock();
@@ -1567,7 +1520,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
free(array);
}
-#ifdef THREADED_DELTA_SEARCH
+#ifndef NO_PTHREADS
/*
* The main thread waits on the condition that (at least) one of the workers
@@ -1899,7 +1852,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)
if (delta_search_threads < 0)
die("invalid number of threads specified (%d)",
delta_search_threads);
-#ifndef THREADED_DELTA_SEARCH
+#ifdef NO_PTHREADS
if (delta_search_threads != 1)
warning("no threads support, ignoring %s", k);
#endif
@@ -2138,13 +2091,6 @@ static void get_object_list(int ac, const char **av)
loosen_unused_packed_objects(&revs);
}
-static int adjust_perm(const char *path, mode_t mode)
-{
- if (chmod(path, mode))
- return -1;
- return adjust_shared_perm(path);
-}
-
int cmd_pack_objects(int argc, const char **argv, const char *prefix)
{
int use_internal_rev_list = 0;
@@ -2203,10 +2149,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
continue;
}
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)
+ if (!git_parse_ulong(arg+16, &pack_size_limit))
usage(pack_usage);
continue;
}
@@ -2227,7 +2171,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
delta_search_threads = strtoul(arg+10, &end, 0);
if (!arg[10] || *end || delta_search_threads < 0)
usage(pack_usage);
-#ifndef THREADED_DELTA_SEARCH
+#ifdef NO_PTHREADS
if (delta_search_threads != 1)
warning("no threads support, "
"ignoring %s", arg);
@@ -2346,9 +2290,12 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
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.");
+ if (pack_size_limit && pack_size_limit < 1024*1024) {
+ warning("minimum pack size limit is 1 MiB");
+ pack_size_limit = 1024*1024;
+ }
if (!pack_to_stdout && thin)
die("--thin cannot be used to build an indexable pack.");
diff --git a/builtin-pack-redundant.c b/builtin/pack-redundant.c
index 41e1615a28..41e1615a28 100644
--- a/builtin-pack-redundant.c
+++ b/builtin/pack-redundant.c
diff --git a/builtin-pack-refs.c b/builtin/pack-refs.c
index 091860b2e3..091860b2e3 100644
--- a/builtin-pack-refs.c
+++ b/builtin/pack-refs.c
diff --git a/builtin-patch-id.c b/builtin/patch-id.c
index af0911e4bd..af0911e4bd 100644
--- a/builtin-patch-id.c
+++ b/builtin/patch-id.c
diff --git a/builtin-prune-packed.c b/builtin/prune-packed.c
index f9463deec2..f9463deec2 100644
--- a/builtin-prune-packed.c
+++ b/builtin/prune-packed.c
diff --git a/builtin-prune.c b/builtin/prune.c
index 8459aec8e8..81f915ec31 100644
--- a/builtin-prune.c
+++ b/builtin/prune.c
@@ -18,13 +18,11 @@ static unsigned long expire;
static int prune_tmp_object(const char *path, const char *filename)
{
const char *fullpath = mkpath("%s/%s", path, filename);
- if (expire) {
- struct stat st;
- if (lstat(fullpath, &st))
- return error("Could not stat '%s'", fullpath);
- if (st.st_mtime > expire)
- return 0;
- }
+ struct stat st;
+ if (lstat(fullpath, &st))
+ return error("Could not stat '%s'", fullpath);
+ if (st.st_mtime > expire)
+ return 0;
printf("Removing stale temporary file %s\n", fullpath);
if (!show_only)
unlink_or_warn(fullpath);
@@ -34,13 +32,11 @@ static int prune_tmp_object(const char *path, const char *filename)
static int prune_object(char *path, const char *filename, const unsigned char *sha1)
{
const char *fullpath = mkpath("%s/%s", path, filename);
- if (expire) {
- struct stat st;
- if (lstat(fullpath, &st))
- return error("Could not stat '%s'", fullpath);
- if (st.st_mtime > expire)
- return 0;
- }
+ struct stat st;
+ if (lstat(fullpath, &st))
+ return error("Could not stat '%s'", fullpath);
+ if (st.st_mtime > expire)
+ return 0;
if (show_only || verbose) {
enum object_type type = sha1_object_info(sha1, NULL);
printf("%s %s\n", sha1_to_hex(sha1),
@@ -106,7 +102,7 @@ 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
+ * files beginning with "tmp_") accumulating in the object
* and the pack directories.
*/
static void remove_temporary_files(const char *path)
@@ -139,6 +135,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
};
char *s;
+ expire = ULONG_MAX;
save_commit_buffer = 0;
read_replace_refs = 0;
init_revisions(&revs, prefix);
diff --git a/builtin-push.c b/builtin/push.c
index 5df66081a6..62957ededd 100644
--- a/builtin-push.c
+++ b/builtin/push.c
@@ -17,6 +17,8 @@ static const char * const push_usage[] = {
static int thin;
static int deleterefs;
static const char *receivepack;
+static int verbosity;
+static int progress;
static const char **refspec;
static int refspec_nr;
@@ -52,7 +54,7 @@ static void set_refspecs(const char **refs, int nr)
} else if (deleterefs && !strchr(ref, ':')) {
char *delref;
int len = strlen(ref)+1;
- delref = xmalloc(len);
+ delref = xmalloc(len+1);
strcpy(delref, ":");
strcat(delref, ref);
ref = delref;
@@ -68,7 +70,7 @@ static void setup_push_tracking(void)
struct branch *branch = branch_get(NULL);
if (!branch)
die("You are not currently on a branch.");
- if (!branch->merge_nr)
+ if (!branch->merge_nr || !branch->merge)
die("The current branch %s is not tracking anything.",
branch->name);
if (branch->merge_nr != 1)
@@ -105,13 +107,16 @@ static int push_with_options(struct transport *transport, int flags)
{
int err;
int nonfastforward;
+
+ transport_set_verbosity(transport, verbosity, progress);
+
if (receivepack)
transport_set_option(transport,
TRANS_OPT_RECEIVEPACK, receivepack);
if (thin)
transport_set_option(transport, TRANS_OPT_THIN, "yes");
- if (flags & TRANSPORT_PUSH_VERBOSE)
+ if (verbosity > 0)
fprintf(stderr, "Pushing to %s\n", transport->url);
err = transport_push(transport, refspec_nr, refspec, flags,
&nonfastforward);
@@ -124,9 +129,9 @@ static int push_with_options(struct transport *transport, int flags)
return 0;
if (nonfastforward && advice_push_nonfastforward) {
- printf("To prevent you from losing history, non-fast-forward updates were rejected\n"
- "Merge the remote changes before pushing again. See the 'Note about\n"
- "fast-forwards' section of 'git push --help' for details.\n");
+ fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
+ "Merge the remote changes before pushing again. See the 'Note about\n"
+ "fast-forwards' section of 'git push --help' for details.\n");
}
return 1;
@@ -204,8 +209,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
int rc;
const char *repo = NULL; /* default repository */
struct option options[] = {
- OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
- OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
+ OPT__VERBOSITY(&verbosity),
OPT_STRING( 0 , "repo", &repo, "repository", "repository"),
OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL),
OPT_BIT( 0 , "mirror", &flags, "mirror all refs",
@@ -220,6 +224,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", "receive pack program"),
OPT_BIT('u', "set-upstream", &flags, "set upstream for git pull/status",
TRANSPORT_PUSH_SET_UPSTREAM),
+ OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
OPT_END()
};
diff --git a/builtin-read-tree.c b/builtin/read-tree.c
index 5fda9905fc..8bdcab1138 100644
--- a/builtin-read-tree.c
+++ b/builtin/read-tree.c
@@ -65,6 +65,34 @@ static int exclude_per_directory_cb(const struct option *opt, const char *arg,
return 0;
}
+static void debug_stage(const char *label, struct cache_entry *ce,
+ struct unpack_trees_options *o)
+{
+ printf("%s ", label);
+ if (!ce)
+ printf("(missing)\n");
+ else if (ce == o->df_conflict_entry)
+ printf("(conflict)\n");
+ else
+ printf("%06o #%d %s %.8s\n",
+ ce->ce_mode, ce_stage(ce), ce->name,
+ sha1_to_hex(ce->sha1));
+}
+
+static int debug_merge(struct cache_entry **stages, struct unpack_trees_options *o)
+{
+ int i;
+
+ printf("* %d-way merge\n", o->merge_size);
+ debug_stage("index", stages[0], o);
+ for (i = 1; i <= o->merge_size; i++) {
+ char buf[24];
+ sprintf(buf, "ent#%d", i);
+ debug_stage(buf, stages[i], o);
+ }
+ return 0;
+}
+
static struct lock_file lock_file;
int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
@@ -101,6 +129,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
"don't check the working tree after merging", 1),
OPT_SET_INT(0, "no-sparse-checkout", &opts.skip_sparse_checkout,
"skip applying sparse checkout filter", 1),
+ OPT_SET_INT(0, "debug-unpack", &opts.debug_unpack,
+ "debug unpack-trees", 1),
OPT_END()
};
@@ -169,6 +199,9 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
opts.head_idx = 1;
}
+ if (opts.debug_unpack)
+ opts.fn = debug_merge;
+
cache_tree_free(&active_cache_tree);
for (i = 0; i < nr_trees; i++) {
struct tree *tree = trees[i];
@@ -178,6 +211,9 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
if (unpack_trees(nr_trees, t, &opts))
return 128;
+ if (opts.debug_unpack)
+ return 0; /* do not write the index out */
+
/*
* When reading only one tree (either the most basic form,
* "-m ent" or "--reset ent" form), we can obtain a fully
diff --git a/builtin-receive-pack.c b/builtin/receive-pack.c
index 4320c93e70..0559fcc871 100644
--- a/builtin-receive-pack.c
+++ b/builtin/receive-pack.c
@@ -2,6 +2,7 @@
#include "pack.h"
#include "refs.h"
#include "pkt-line.h"
+#include "sideband.h"
#include "run-command.h"
#include "exec_cmd.h"
#include "commit.h"
@@ -27,11 +28,12 @@ static int receive_unpack_limit = -1;
static int transfer_unpack_limit = -1;
static int unpack_limit = 100;
static int report_status;
+static int use_sideband;
static int prefer_ofs_delta = 1;
static int auto_update_server_info;
static int auto_gc = 1;
static const char *head_name;
-static char *capabilities_to_send;
+static int sent_capabilities;
static enum deny_action parse_deny_action(const char *var, const char *value)
{
@@ -105,19 +107,21 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
static int show_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
{
- if (!capabilities_to_send)
+ if (sent_capabilities)
packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
else
- packet_write(1, "%s %s%c%s\n",
- sha1_to_hex(sha1), path, 0, capabilities_to_send);
- capabilities_to_send = NULL;
+ packet_write(1, "%s %s%c%s%s\n",
+ sha1_to_hex(sha1), path, 0,
+ " report-status delete-refs side-band-64k",
+ prefer_ofs_delta ? " ofs-delta" : "");
+ sent_capabilities = 1;
return 0;
}
static void write_head_info(void)
{
for_each_ref(show_ref, NULL);
- if (capabilities_to_send)
+ if (!sent_capabilities)
show_ref("capabilities^{}", null_sha1, 0, NULL);
}
@@ -135,11 +139,61 @@ static struct command *commands;
static const char pre_receive_hook[] = "hooks/pre-receive";
static const char post_receive_hook[] = "hooks/post-receive";
+static void rp_error(const char *err, ...) __attribute__((format (printf, 1, 2)));
+static void rp_warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
+
+static void report_message(const char *prefix, const char *err, va_list params)
+{
+ int sz = strlen(prefix);
+ char msg[4096];
+
+ strncpy(msg, prefix, sz);
+ sz += vsnprintf(msg + sz, sizeof(msg) - sz, err, params);
+ if (sz > (sizeof(msg) - 1))
+ sz = sizeof(msg) - 1;
+ msg[sz++] = '\n';
+
+ if (use_sideband)
+ send_sideband(1, 2, msg, sz, use_sideband);
+ else
+ xwrite(2, msg, sz);
+}
+
+static void rp_warning(const char *err, ...)
+{
+ va_list params;
+ va_start(params, err);
+ report_message("warning: ", err, params);
+ va_end(params);
+}
+
+static void rp_error(const char *err, ...)
+{
+ va_list params;
+ va_start(params, err);
+ report_message("error: ", err, params);
+ va_end(params);
+}
+
+static int copy_to_sideband(int in, int out, void *arg)
+{
+ char data[128];
+ while (1) {
+ ssize_t sz = xread(in, data, sizeof(data));
+ if (sz <= 0)
+ break;
+ send_sideband(1, 2, data, sz, use_sideband);
+ }
+ close(in);
+ return 0;
+}
+
static int run_receive_hook(const char *hook_name)
{
static char buf[sizeof(commands->old_sha1) * 2 + PATH_MAX + 4];
struct command *cmd;
struct child_process proc;
+ struct async muxer;
const char *argv[2];
int have_input = 0, code;
@@ -159,9 +213,23 @@ static int run_receive_hook(const char *hook_name)
proc.in = -1;
proc.stdout_to_stderr = 1;
+ if (use_sideband) {
+ memset(&muxer, 0, sizeof(muxer));
+ muxer.proc = copy_to_sideband;
+ muxer.in = -1;
+ code = start_async(&muxer);
+ if (code)
+ return code;
+ proc.err = muxer.in;
+ }
+
code = start_command(&proc);
- if (code)
+ if (code) {
+ if (use_sideband)
+ finish_async(&muxer);
return code;
+ }
+
for (cmd = commands; cmd; cmd = cmd->next) {
if (!cmd->error_string) {
size_t n = snprintf(buf, sizeof(buf), "%s %s %s\n",
@@ -173,6 +241,8 @@ static int run_receive_hook(const char *hook_name)
}
}
close(proc.in);
+ if (use_sideband)
+ finish_async(&muxer);
return finish_command(&proc);
}
@@ -180,6 +250,8 @@ static int run_update_hook(struct command *cmd)
{
static const char update_hook[] = "hooks/update";
const char *argv[5];
+ struct child_process proc;
+ int code;
if (access(update_hook, X_OK) < 0)
return 0;
@@ -190,8 +262,18 @@ static int run_update_hook(struct command *cmd)
argv[3] = sha1_to_hex(cmd->new_sha1);
argv[4] = NULL;
- return run_command_v_opt(argv, RUN_COMMAND_NO_STDIN |
- RUN_COMMAND_STDOUT_TO_STDERR);
+ memset(&proc, 0, sizeof(proc));
+ proc.no_stdin = 1;
+ proc.stdout_to_stderr = 1;
+ proc.err = use_sideband ? -1 : 0;
+ proc.argv = argv;
+
+ code = start_command(&proc);
+ if (code)
+ return code;
+ if (use_sideband)
+ copy_to_sideband(proc.err, -1, NULL);
+ return finish_command(&proc);
}
static int is_ref_checked_out(const char *ref)
@@ -224,7 +306,7 @@ static void refuse_unconfigured_deny(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(refuse_unconfigured_deny_msg); i++)
- error("%s", refuse_unconfigured_deny_msg[i]);
+ rp_error("%s", refuse_unconfigured_deny_msg[i]);
}
static char *refuse_unconfigured_deny_delete_current_msg[] = {
@@ -244,7 +326,7 @@ static void refuse_unconfigured_deny_delete_current(void)
for (i = 0;
i < ARRAY_SIZE(refuse_unconfigured_deny_delete_current_msg);
i++)
- error("%s", refuse_unconfigured_deny_delete_current_msg[i]);
+ rp_error("%s", refuse_unconfigured_deny_delete_current_msg[i]);
}
static const char *update(struct command *cmd)
@@ -256,7 +338,7 @@ static const char *update(struct command *cmd)
/* only refs/... are allowed */
if (prefixcmp(name, "refs/") || check_ref_format(name + 5)) {
- error("refusing to create funny ref '%s' remotely", name);
+ rp_error("refusing to create funny ref '%s' remotely", name);
return "funny refname";
}
@@ -265,11 +347,11 @@ static const char *update(struct command *cmd)
case DENY_IGNORE:
break;
case DENY_WARN:
- warning("updating the current branch");
+ rp_warning("updating the current branch");
break;
case DENY_REFUSE:
case DENY_UNCONFIGURED:
- error("refusing to update checked out branch: %s", name);
+ rp_error("refusing to update checked out branch: %s", name);
if (deny_current_branch == DENY_UNCONFIGURED)
refuse_unconfigured_deny();
return "branch is currently checked out";
@@ -284,7 +366,7 @@ static const char *update(struct command *cmd)
if (!is_null_sha1(old_sha1) && is_null_sha1(new_sha1)) {
if (deny_deletes && !prefixcmp(name, "refs/heads/")) {
- error("denying ref deletion for %s", name);
+ rp_error("denying ref deletion for %s", name);
return "deletion prohibited";
}
@@ -293,13 +375,13 @@ static const char *update(struct command *cmd)
case DENY_IGNORE:
break;
case DENY_WARN:
- warning("deleting the current branch");
+ rp_warning("deleting the current branch");
break;
case DENY_REFUSE:
case DENY_UNCONFIGURED:
if (deny_delete_current == DENY_UNCONFIGURED)
refuse_unconfigured_deny_delete_current();
- error("refusing to delete the current branch: %s", name);
+ rp_error("refusing to delete the current branch: %s", name);
return "deletion of the current branch prohibited";
}
}
@@ -329,23 +411,23 @@ static const char *update(struct command *cmd)
break;
free_commit_list(bases);
if (!ent) {
- error("denying non-fast-forward %s"
- " (you should pull first)", name);
+ rp_error("denying non-fast-forward %s"
+ " (you should pull first)", name);
return "non-fast-forward";
}
}
if (run_update_hook(cmd)) {
- error("hook declined to update %s", name);
+ rp_error("hook declined to update %s", name);
return "hook declined";
}
if (is_null_sha1(new_sha1)) {
if (!parse_object(old_sha1)) {
- warning ("Allowing deletion of corrupt ref.");
+ rp_warning("Allowing deletion of corrupt ref.");
old_sha1 = NULL;
}
if (delete_ref(name, old_sha1, 0)) {
- error("failed to delete %s", name);
+ rp_error("failed to delete %s", name);
return "failed to delete";
}
return NULL; /* good */
@@ -353,7 +435,7 @@ static const char *update(struct command *cmd)
else {
lock = lock_any_ref_for_update(name, old_sha1, 0);
if (!lock) {
- error("failed to lock %s", name);
+ rp_error("failed to lock %s", name);
return "failed to lock";
}
if (write_ref_sha1(lock, new_sha1, "push")) {
@@ -368,8 +450,9 @@ static char update_post_hook[] = "hooks/post-update";
static void run_update_post_hook(struct command *cmd)
{
struct command *cmd_p;
- int argc, status;
+ int argc;
const char **argv;
+ struct child_process proc;
for (argc = 0, cmd_p = cmd; cmd_p; cmd_p = cmd_p->next) {
if (cmd_p->error_string)
@@ -391,8 +474,18 @@ static void run_update_post_hook(struct command *cmd)
argc++;
}
argv[argc] = NULL;
- status = run_command_v_opt(argv, RUN_COMMAND_NO_STDIN
- | RUN_COMMAND_STDOUT_TO_STDERR);
+
+ memset(&proc, 0, sizeof(proc));
+ proc.no_stdin = 1;
+ proc.stdout_to_stderr = 1;
+ proc.err = use_sideband ? -1 : 0;
+ proc.argv = argv;
+
+ if (!start_command(&proc)) {
+ if (use_sideband)
+ copy_to_sideband(proc.err, -1, NULL);
+ finish_command(&proc);
+ }
}
static void execute_commands(const char *unpacker_error)
@@ -452,6 +545,8 @@ static void read_head_info(void)
if (reflen + 82 < len) {
if (strstr(refname + reflen + 1, "report-status"))
report_status = 1;
+ if (strstr(refname + reflen + 1, "side-band-64k"))
+ use_sideband = LARGE_PACKET_MAX;
}
cmd = xmalloc(sizeof(struct command) + len - 80);
hashcpy(cmd->old_sha1, old_sha1);
@@ -551,17 +646,25 @@ static const char *unpack(void)
static void report(const char *unpack_status)
{
struct command *cmd;
- packet_write(1, "unpack %s\n",
- unpack_status ? unpack_status : "ok");
+ struct strbuf buf = STRBUF_INIT;
+
+ packet_buf_write(&buf, "unpack %s\n",
+ unpack_status ? unpack_status : "ok");
for (cmd = commands; cmd; cmd = cmd->next) {
if (!cmd->error_string)
- packet_write(1, "ok %s\n",
- cmd->ref_name);
+ packet_buf_write(&buf, "ok %s\n",
+ cmd->ref_name);
else
- packet_write(1, "ng %s %s\n",
- cmd->ref_name, cmd->error_string);
+ packet_buf_write(&buf, "ng %s %s\n",
+ cmd->ref_name, cmd->error_string);
}
- packet_flush(1);
+ packet_buf_flush(&buf);
+
+ if (use_sideband)
+ send_sideband(1, 1, buf.buf, buf.len, use_sideband);
+ else
+ safe_write(1, buf.buf, buf.len);
+ strbuf_release(&buf);
}
static int delete_only(struct command *cmd)
@@ -658,10 +761,6 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
else if (0 <= receive_unpack_limit)
unpack_limit = receive_unpack_limit;
- capabilities_to_send = (prefer_ofs_delta) ?
- " report-status delete-refs ofs-delta " :
- " report-status delete-refs ";
-
if (advertise_refs || !stateless_rpc) {
add_alternate_refs();
write_head_info();
@@ -695,5 +794,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
if (auto_update_server_info)
update_server_info(0);
}
+ if (use_sideband)
+ packet_flush(1);
return 0;
}
diff --git a/builtin-reflog.c b/builtin/reflog.c
index 749821078d..64e45bd813 100644
--- a/builtin-reflog.c
+++ b/builtin/reflog.c
@@ -530,16 +530,14 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
int i, status, do_all;
int explicit_expiry = 0;
+ default_reflog_expire_unreachable = now - 30 * 24 * 3600;
+ default_reflog_expire = now - 90 * 24 * 3600;
git_config(reflog_expire_config, NULL);
save_commit_buffer = 0;
do_all = status = 0;
memset(&cb, 0, sizeof(cb));
- if (!default_reflog_expire_unreachable)
- default_reflog_expire_unreachable = now - 30 * 24 * 3600;
- if (!default_reflog_expire)
- default_reflog_expire = now - 90 * 24 * 3600;
cb.expire_total = default_reflog_expire;
cb.expire_unreachable = default_reflog_expire_unreachable;
diff --git a/builtin-remote.c b/builtin/remote.c
index c4945b8708..277765b864 100644
--- a/builtin-remote.c
+++ b/builtin/remote.c
@@ -16,6 +16,9 @@ static const char * const builtin_remote_usage[] = {
"git remote [-v | --verbose] show [-n] <name>",
"git remote prune [-n | --dry-run] <name>",
"git remote [-v | --verbose] update [-p | --prune] [group | remote]",
+ "git remote set-url <name> <newurl> [<oldurl>]",
+ "git remote set-url --add <name> <newurl>",
+ "git remote set-url --delete <name> <url>",
NULL
};
@@ -54,6 +57,13 @@ static const char * const builtin_remote_update_usage[] = {
NULL
};
+static const char * const builtin_remote_seturl_usage[] = {
+ "git remote set-url [--push] <name> <newurl> [<oldurl>]",
+ "git remote set-url --add <name> <newurl>",
+ "git remote set-url --delete <name> <url>",
+ NULL
+};
+
#define GET_REF_STATES (1<<0)
#define GET_HEAD_NAMES (1<<1)
#define GET_PUSH_REF_STATES (1<<2)
@@ -1255,6 +1265,92 @@ static int update(int argc, const char **argv)
return run_command_v_opt(fetch_argv, RUN_GIT_CMD);
}
+static int set_url(int argc, const char **argv)
+{
+ int i, push_mode = 0, add_mode = 0, delete_mode = 0;
+ int matches = 0, negative_matches = 0;
+ const char *remotename = NULL;
+ const char *newurl = NULL;
+ const char *oldurl = NULL;
+ struct remote *remote;
+ regex_t old_regex;
+ const char **urlset;
+ int urlset_nr;
+ struct strbuf name_buf = STRBUF_INIT;
+ struct option options[] = {
+ OPT_BOOLEAN('\0', "push", &push_mode,
+ "manipulate push URLs"),
+ OPT_BOOLEAN('\0', "add", &add_mode,
+ "add URL"),
+ OPT_BOOLEAN('\0', "delete", &delete_mode,
+ "delete URLs"),
+ OPT_END()
+ };
+ argc = parse_options(argc, argv, NULL, options, builtin_remote_update_usage,
+ PARSE_OPT_KEEP_ARGV0);
+
+ if (add_mode && delete_mode)
+ die("--add --delete doesn't make sense");
+
+ if (argc < 3 || argc > 4 || ((add_mode || delete_mode) && argc != 3))
+ usage_with_options(builtin_remote_seturl_usage, options);
+
+ remotename = argv[1];
+ newurl = argv[2];
+ if (argc > 3)
+ oldurl = argv[3];
+
+ if (delete_mode)
+ oldurl = newurl;
+
+ if (!remote_is_configured(remotename))
+ die("No such remote '%s'", remotename);
+ remote = remote_get(remotename);
+
+ if (push_mode) {
+ strbuf_addf(&name_buf, "remote.%s.pushurl", remotename);
+ urlset = remote->pushurl;
+ urlset_nr = remote->pushurl_nr;
+ } else {
+ strbuf_addf(&name_buf, "remote.%s.url", remotename);
+ urlset = remote->url;
+ urlset_nr = remote->url_nr;
+ }
+
+ /* Special cases that add new entry. */
+ if ((!oldurl && !delete_mode) || add_mode) {
+ if (add_mode)
+ git_config_set_multivar(name_buf.buf, newurl,
+ "^$", 0);
+ else
+ git_config_set(name_buf.buf, newurl);
+ strbuf_release(&name_buf);
+ return 0;
+ }
+
+ /* Old URL specified. Demand that one matches. */
+ if (regcomp(&old_regex, oldurl, REG_EXTENDED))
+ die("Invalid old URL pattern: %s", oldurl);
+
+ for (i = 0; i < urlset_nr; i++)
+ if (!regexec(&old_regex, urlset[i], 0, NULL, 0))
+ matches++;
+ else
+ negative_matches++;
+ if (!delete_mode && !matches)
+ die("No such URL found: %s", oldurl);
+ if (delete_mode && !negative_matches && !push_mode)
+ die("Will not delete all non-push URLs");
+
+ regfree(&old_regex);
+
+ if (!delete_mode)
+ git_config_set_multivar(name_buf.buf, newurl, oldurl, 0);
+ else
+ git_config_set_multivar(name_buf.buf, NULL, oldurl, 1);
+ return 0;
+}
+
static int get_one_entry(struct remote *remote, void *priv)
{
struct string_list *list = priv;
@@ -1334,6 +1430,8 @@ int cmd_remote(int argc, const char **argv, const char *prefix)
result = rm(argc, argv);
else if (!strcmp(argv[0], "set-head"))
result = set_head(argc, argv);
+ else if (!strcmp(argv[0], "set-url"))
+ result = set_url(argc, argv);
else if (!strcmp(argv[0], "show"))
result = show(argc, argv);
else if (!strcmp(argv[0], "prune"))
diff --git a/builtin-replace.c b/builtin/replace.c
index fe3a647a36..fe3a647a36 100644
--- a/builtin-replace.c
+++ b/builtin/replace.c
diff --git a/builtin-rerere.c b/builtin/rerere.c
index 34f9acee91..34f9acee91 100644
--- a/builtin-rerere.c
+++ b/builtin/rerere.c
diff --git a/builtin-reset.c b/builtin/reset.c
index 0f5022eed2..2c3a69adc6 100644
--- a/builtin-reset.c
+++ b/builtin/reset.c
@@ -22,13 +22,15 @@
#include "cache-tree.h"
static const char * const git_reset_usage[] = {
- "git reset [--mixed | --soft | --hard | --merge] [-q] [<commit>]",
+ "git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]",
"git reset [--mixed] <commit> [--] <paths>...",
NULL
};
-enum reset_type { MIXED, SOFT, HARD, MERGE, NONE };
-static const char *reset_type_names[] = { "mixed", "soft", "hard", "merge", NULL };
+enum reset_type { MIXED, SOFT, HARD, MERGE, KEEP, NONE };
+static const char *reset_type_names[] = {
+ "mixed", "soft", "hard", "merge", "keep", NULL
+};
static char *args_to_str(const char **argv)
{
@@ -71,6 +73,7 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
if (!quiet)
opts.verbose_update = 1;
switch (reset_type) {
+ case KEEP:
case MERGE:
opts.update = 1;
break;
@@ -85,6 +88,16 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
read_cache_unmerged();
+ if (reset_type == KEEP) {
+ unsigned char head_sha1[20];
+ if (get_sha1("HEAD", head_sha1))
+ return error("You do not have a valid HEAD.");
+ if (!fill_tree_descriptor(desc, head_sha1))
+ return error("Failed to find tree of HEAD.");
+ nr++;
+ opts.fn = twoway_merge;
+ }
+
if (!fill_tree_descriptor(desc + nr - 1, sha1))
return error("Failed to find tree of %s.", sha1_to_hex(sha1));
if (unpack_trees(nr, desc, &opts))
@@ -211,6 +224,14 @@ static void prepend_reflog_action(const char *action, char *buf, size_t size)
warning("Reflog action message too long: %.*s...", 50, buf);
}
+static void die_if_unmerged_cache(int reset_type)
+{
+ if (is_merge() || read_cache() < 0 || unmerged_cache())
+ die("Cannot do a %s reset in the middle of a merge.",
+ reset_type_names[reset_type]);
+
+}
+
int cmd_reset(int argc, const char **argv, const char *prefix)
{
int i = 0, reset_type = NONE, update_ref_status = 0, quiet = 0;
@@ -229,6 +250,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
"reset HEAD, index and working tree", HARD),
OPT_SET_INT(0, "merge", &reset_type,
"reset HEAD, index and working tree", MERGE),
+ OPT_SET_INT(0, "keep", &reset_type,
+ "reset HEAD but keep local changes", KEEP),
OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
OPT_END()
};
@@ -304,7 +327,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == NONE)
reset_type = MIXED; /* by default */
- if (reset_type == HARD || reset_type == MERGE)
+ if (reset_type != SOFT && reset_type != MIXED)
setup_work_tree();
if (reset_type == MIXED && is_bare_repository())
@@ -314,12 +337,18 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
/* 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. */
- if (reset_type == SOFT) {
- if (is_merge() || read_cache() < 0 || unmerged_cache())
- die("Cannot do a soft reset in the middle of a merge.");
+ if (reset_type == SOFT)
+ die_if_unmerged_cache(reset_type);
+ else {
+ int err;
+ if (reset_type == KEEP)
+ die_if_unmerged_cache(reset_type);
+ err = reset_index_file(sha1, reset_type, quiet);
+ if (reset_type == KEEP)
+ err = err || reset_index_file(sha1, MIXED, quiet);
+ if (err)
+ die("Could not reset index file to revision '%s'.", rev);
}
- else if (reset_index_file(sha1, reset_type, quiet))
- die("Could not reset index file to revision '%s'.", rev);
/* Any resets update HEAD to the head being switched to,
* saving the previous head in ORIG_HEAD before. */
diff --git a/builtin-rev-list.c b/builtin/rev-list.c
index c924b3a2c7..5679170e82 100644
--- a/builtin-rev-list.c
+++ b/builtin/rev-list.c
@@ -371,8 +371,9 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
revs.diff)
usage(rev_list_usage);
- save_commit_buffer = revs.verbose_header ||
- revs.grep_filter.pattern_list;
+ save_commit_buffer = (revs.verbose_header ||
+ revs.grep_filter.pattern_list ||
+ revs.grep_filter.header_list);
if (bisect_list)
revs.limited = 1;
diff --git a/builtin-rev-parse.c b/builtin/rev-parse.c
index a8c5043ded..8fbf9d0db6 100644
--- a/builtin-rev-parse.c
+++ b/builtin/rev-parse.c
@@ -455,6 +455,13 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
if (argc > 1 && !strcmp("--sq-quote", argv[1]))
return cmd_sq_quote(argc - 2, argv + 2);
+ if (argc == 2 && !strcmp("--local-env-vars", argv[1])) {
+ int i;
+ for (i = 0; local_repo_env[i]; i++)
+ printf("%s\n", local_repo_env[i]);
+ return 0;
+ }
+
if (argc > 1 && !strcmp("-h", argv[1]))
usage(builtin_rev_parse_usage);
@@ -637,6 +644,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
if (!strcmp(arg, "--git-dir")) {
const char *gitdir = getenv(GIT_DIR_ENVIRONMENT);
static char cwd[PATH_MAX];
+ int len;
if (gitdir) {
puts(gitdir);
continue;
@@ -647,7 +655,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
}
if (!getcwd(cwd, PATH_MAX))
die_errno("unable to get current working directory");
- printf("%s/.git\n", cwd);
+ len = strlen(cwd);
+ printf("%s%s.git\n", cwd, len && cwd[len-1] != '/' ? "/" : "");
continue;
}
if (!strcmp(arg, "--is-inside-git-dir")) {
diff --git a/builtin-revert.c b/builtin/revert.c
index 8ac86f0943..eff52687a8 100644
--- a/builtin-revert.c
+++ b/builtin/revert.c
@@ -38,6 +38,7 @@ static const char * const cherry_pick_usage[] = {
static int edit, no_replay, no_commit, mainline, signoff;
static enum { REVERT, CHERRY_PICK } action;
static struct commit *commit;
+static const char *commit_name;
static int allow_rerere_auto;
static const char *me;
@@ -49,7 +50,6 @@ static void parse_args(int argc, const char **argv)
const char * const * usage_str =
action == REVERT ? revert_usage : cherry_pick_usage;
unsigned char sha1[20];
- const char *arg;
int noop;
struct option options[] = {
OPT_BOOLEAN('n', "no-commit", &no_commit, "don't automatically commit"),
@@ -64,19 +64,13 @@ static void parse_args(int argc, const char **argv)
if (parse_options(argc, argv, NULL, options, usage_str, 0) != 1)
usage_with_options(usage_str, options);
- arg = argv[0];
- if (get_sha1(arg, sha1))
- die ("Cannot find '%s'", arg);
- commit = (struct commit *)parse_object(sha1);
+ commit_name = argv[0];
+ if (get_sha1(commit_name, sha1))
+ die ("Cannot find '%s'", commit_name);
+ commit = lookup_commit_reference(sha1);
if (!commit)
- die ("Could not find %s", sha1_to_hex(sha1));
- if (commit->object.type == OBJ_TAG) {
- commit = (struct commit *)
- deref_tag((struct object *)commit, arg, strlen(arg));
- }
- if (commit->object.type != OBJ_COMMIT)
- die ("'%s' does not point to a commit", arg);
+ exit(1);
}
static char *get_oneline(const char *message)
@@ -204,25 +198,27 @@ static void set_author_ident_env(const char *message)
sha1_to_hex(commit->object.sha1));
}
-static char *help_msg(const unsigned char *sha1)
+static char *help_msg(const char *name)
{
- static char helpbuf[1024];
+ struct strbuf helpbuf = STRBUF_INIT;
char *msg = getenv("GIT_CHERRY_PICK_HELP");
if (msg)
return msg;
- strcpy(helpbuf, " After resolving the conflicts,\n"
- "mark the corrected paths with 'git add <paths>' "
- "or 'git rm <paths>' and commit the result.");
+ strbuf_addstr(&helpbuf, " After resolving the conflicts,\n"
+ "mark the corrected paths with 'git add <paths>' or 'git rm <paths>'\n"
+ "and commit the result");
if (action == CHERRY_PICK) {
- sprintf(helpbuf + strlen(helpbuf),
- "\nWhen commiting, use the option "
- "'-c %s' to retain authorship and message.",
- find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ strbuf_addf(&helpbuf, " with: \n"
+ "\n"
+ " git commit -c %s\n",
+ name);
}
- return helpbuf;
+ else
+ strbuf_addch(&helpbuf, '.');
+ return strbuf_detach(&helpbuf, NULL);
}
static struct tree *empty_tree(void)
@@ -409,7 +405,7 @@ static int revert_or_cherry_pick(int argc, const char **argv)
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));
+ me, help_msg(commit_name));
rerere(allow_rerere_auto);
exit(1);
}
diff --git a/builtin-rm.c b/builtin/rm.c
index f3772c84de..f3772c84de 100644
--- a/builtin-rm.c
+++ b/builtin/rm.c
diff --git a/builtin-send-pack.c b/builtin/send-pack.c
index 76c72065de..481602d8ae 100644
--- a/builtin-send-pack.c
+++ b/builtin/send-pack.c
@@ -7,6 +7,7 @@
#include "remote.h"
#include "send-pack.h"
#include "quote.h"
+#include "transport.h"
static const char send_pack_usage[] =
"git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
@@ -169,156 +170,6 @@ static int receive_status(int in, struct ref *refs)
return ret;
}
-static void update_tracking_ref(struct remote *remote, struct ref *ref)
-{
- struct refspec rs;
-
- if (ref->status != REF_STATUS_OK && ref->status != REF_STATUS_UPTODATE)
- return;
-
- rs.src = ref->name;
- rs.dst = NULL;
-
- if (!remote_find_tracking(remote, &rs)) {
- if (args.verbose)
- fprintf(stderr, "updating local tracking ref '%s'\n", rs.dst);
- if (ref->deletion) {
- delete_ref(rs.dst, NULL, 0);
- } else
- update_ref("update by push", rs.dst,
- ref->new_sha1, NULL, 0, 0);
- free(rs.dst);
- }
-}
-
-#define SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
-
-static void print_ref_status(char flag, const char *summary, struct ref *to, struct ref *from, const char *msg)
-{
- fprintf(stderr, " %c %-*s ", flag, SUMMARY_WIDTH, summary);
- if (from)
- fprintf(stderr, "%s -> %s", prettify_refname(from->name), prettify_refname(to->name));
- else
- fputs(prettify_refname(to->name), stderr);
- if (msg) {
- fputs(" (", stderr);
- fputs(msg, stderr);
- fputc(')', stderr);
- }
- fputc('\n', stderr);
-}
-
-static const char *status_abbrev(unsigned char sha1[20])
-{
- return find_unique_abbrev(sha1, DEFAULT_ABBREV);
-}
-
-static void print_ok_ref_status(struct ref *ref)
-{
- if (ref->deletion)
- print_ref_status('-', "[deleted]", ref, NULL, NULL);
- else if (is_null_sha1(ref->old_sha1))
- print_ref_status('*',
- (!prefixcmp(ref->name, "refs/tags/") ? "[new tag]" :
- "[new branch]"),
- ref, ref->peer_ref, NULL);
- else {
- char quickref[84];
- char type;
- const char *msg;
-
- strcpy(quickref, status_abbrev(ref->old_sha1));
- if (ref->nonfastforward) {
- strcat(quickref, "...");
- type = '+';
- msg = "forced update";
- } else {
- strcat(quickref, "..");
- type = ' ';
- msg = NULL;
- }
- strcat(quickref, status_abbrev(ref->new_sha1));
-
- print_ref_status(type, quickref, ref, ref->peer_ref, msg);
- }
-}
-
-static int print_one_push_status(struct ref *ref, const char *dest, int count)
-{
- if (!count)
- fprintf(stderr, "To %s\n", dest);
-
- switch(ref->status) {
- case REF_STATUS_NONE:
- print_ref_status('X', "[no match]", ref, NULL, NULL);
- break;
- case REF_STATUS_REJECT_NODELETE:
- print_ref_status('!', "[rejected]", ref, NULL,
- "remote does not support deleting refs");
- break;
- case REF_STATUS_UPTODATE:
- print_ref_status('=', "[up to date]", ref,
- ref->peer_ref, NULL);
- break;
- case REF_STATUS_REJECT_NONFASTFORWARD:
- print_ref_status('!', "[rejected]", ref, ref->peer_ref,
- "non-fast-forward");
- break;
- case REF_STATUS_REMOTE_REJECT:
- print_ref_status('!', "[remote rejected]", ref,
- ref->deletion ? NULL : ref->peer_ref,
- ref->remote_status);
- break;
- case REF_STATUS_EXPECTING_REPORT:
- print_ref_status('!', "[remote failure]", ref,
- ref->deletion ? NULL : ref->peer_ref,
- "remote failed to report status");
- break;
- case REF_STATUS_OK:
- print_ok_ref_status(ref);
- break;
- }
-
- return 1;
-}
-
-static void print_push_status(const char *dest, struct ref *refs)
-{
- struct ref *ref;
- int n = 0;
-
- if (args.verbose) {
- for (ref = refs; ref; ref = ref->next)
- if (ref->status == REF_STATUS_UPTODATE)
- n += print_one_push_status(ref, dest, n);
- }
-
- for (ref = refs; ref; ref = ref->next)
- if (ref->status == REF_STATUS_OK)
- n += print_one_push_status(ref, dest, n);
-
- for (ref = refs; ref; ref = ref->next) {
- if (ref->status != REF_STATUS_NONE &&
- ref->status != REF_STATUS_UPTODATE &&
- ref->status != REF_STATUS_OK)
- n += print_one_push_status(ref, dest, n);
- }
-}
-
-static int refs_pushed(struct ref *ref)
-{
- for (; ref; ref = ref->next) {
- switch(ref->status) {
- case REF_STATUS_NONE:
- case REF_STATUS_UPTODATE:
- break;
- default:
- return 1;
- }
- }
- return 0;
-}
-
static void print_helper_status(struct ref *ref)
{
struct strbuf buf = STRBUF_INIT;
@@ -372,6 +223,14 @@ static void print_helper_status(struct ref *ref)
strbuf_release(&buf);
}
+static int sideband_demux(int in, int out, void *data)
+{
+ int *fd = data;
+ int ret = recv_sideband("send-pack", fd[0], out);
+ close(out);
+ return ret;
+}
+
int send_pack(struct send_pack_args *args,
int fd[], struct child_process *conn,
struct ref *remote_refs,
@@ -382,18 +241,22 @@ int send_pack(struct send_pack_args *args,
struct strbuf req_buf = STRBUF_INIT;
struct ref *ref;
int new_refs;
- int ask_for_status_report = 0;
int allow_deleting_refs = 0;
- int expect_status_report = 0;
+ int status_report = 0;
+ int use_sideband = 0;
+ unsigned cmds_sent = 0;
int ret;
+ struct async demux;
/* Does the other end support the reporting? */
if (server_supports("report-status"))
- ask_for_status_report = 1;
+ status_report = 1;
if (server_supports("delete-refs"))
allow_deleting_refs = 1;
if (server_supports("ofs-delta"))
args->use_ofs_delta = 1;
+ if (server_supports("side-band-64k"))
+ use_sideband = 1;
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
@@ -426,28 +289,30 @@ int send_pack(struct send_pack_args *args,
if (!ref->deletion)
new_refs++;
- if (!args->dry_run) {
+ if (args->dry_run) {
+ ref->status = REF_STATUS_OK;
+ } else {
char *old_hex = sha1_to_hex(ref->old_sha1);
char *new_hex = sha1_to_hex(ref->new_sha1);
- if (ask_for_status_report) {
- packet_buf_write(&req_buf, "%s %s %s%c%s",
+ if (!cmds_sent && (status_report || use_sideband)) {
+ packet_buf_write(&req_buf, "%s %s %s%c%s%s",
old_hex, new_hex, ref->name, 0,
- "report-status");
- ask_for_status_report = 0;
- expect_status_report = 1;
+ status_report ? " report-status" : "",
+ use_sideband ? " side-band-64k" : "");
}
else
packet_buf_write(&req_buf, "%s %s %s",
old_hex, new_hex, ref->name);
+ ref->status = status_report ?
+ REF_STATUS_EXPECTING_REPORT :
+ REF_STATUS_OK;
+ cmds_sent++;
}
- ref->status = expect_status_report ?
- REF_STATUS_EXPECTING_REPORT :
- REF_STATUS_OK;
}
if (args->stateless_rpc) {
- if (!args->dry_run) {
+ if (!args->dry_run && cmds_sent) {
packet_buf_flush(&req_buf);
send_sideband(out, -1, req_buf.buf, req_buf.len, LARGE_PACKET_MAX);
}
@@ -457,25 +322,49 @@ int send_pack(struct send_pack_args *args,
}
strbuf_release(&req_buf);
- if (new_refs && !args->dry_run) {
+ if (use_sideband && cmds_sent) {
+ memset(&demux, 0, sizeof(demux));
+ demux.proc = sideband_demux;
+ demux.data = fd;
+ demux.out = -1;
+ if (start_async(&demux))
+ die("receive-pack: unable to fork off sideband demultiplexer");
+ in = demux.out;
+ }
+
+ if (new_refs && cmds_sent) {
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
for (ref = remote_refs; ref; ref = ref->next)
ref->status = REF_STATUS_NONE;
+ if (use_sideband)
+ finish_async(&demux);
return -1;
}
}
- if (args->stateless_rpc && !args->dry_run)
+ if (args->stateless_rpc && cmds_sent)
packet_flush(out);
- if (expect_status_report)
+ if (status_report && cmds_sent)
ret = receive_status(in, remote_refs);
else
ret = 0;
if (args->stateless_rpc)
packet_flush(out);
+ if (use_sideband && cmds_sent) {
+ if (finish_async(&demux)) {
+ error("error in sideband demultiplexer");
+ ret = -1;
+ }
+ close(demux.out);
+ }
+
if (ret < 0)
return ret;
+
+ if (args->porcelain)
+ return 0;
+
for (ref = remote_refs; ref; ref = ref->next) {
switch (ref->status) {
case REF_STATUS_NONE:
@@ -489,37 +378,6 @@ int send_pack(struct send_pack_args *args,
return 0;
}
-static void verify_remote_names(int nr_heads, const char **heads)
-{
- int i;
-
- for (i = 0; i < nr_heads; i++) {
- const char *local = heads[i];
- const char *remote = strrchr(heads[i], ':');
-
- if (*local == '+')
- local++;
-
- /* A matching refspec is okay. */
- if (remote == local && remote[1] == '\0')
- continue;
-
- remote = remote ? (remote + 1) : local;
- switch (check_ref_format(remote)) {
- case 0: /* ok */
- 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",
- heads[i]);
- }
-}
-
int cmd_send_pack(int argc, const char **argv, const char *prefix)
{
int i, nr_refspecs = 0;
@@ -536,6 +394,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
int send_all = 0;
const char *receivepack = "git-receive-pack";
int flags;
+ int nonfastforward = 0;
argv++;
for (i = 1; i < argc; i++, argv++) {
@@ -628,7 +487,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
get_remote_heads(fd[0], &remote_refs, 0, NULL, REF_NORMAL,
&extra_have);
- verify_remote_names(nr_refspecs, refspecs);
+ transport_verify_remote_names(nr_refspecs, refspecs);
local_refs = get_local_heads();
@@ -657,15 +516,15 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
ret |= finish_connect(conn);
if (!helper_status)
- print_push_status(dest, remote_refs);
+ transport_print_push_status(dest, remote_refs, args.verbose, 0, &nonfastforward);
if (!args.dry_run && remote) {
struct ref *ref;
for (ref = remote_refs; ref; ref = ref->next)
- update_tracking_ref(remote, ref);
+ transport_update_tracking_ref(remote, ref, args.verbose);
}
- if (!ret && !refs_pushed(remote_refs))
+ if (!ret && !transport_refs_pushed(remote_refs))
fprintf(stderr, "Everything up-to-date\n");
return ret;
diff --git a/builtin-shortlog.c b/builtin/shortlog.c
index b3b055f68c..06320f5285 100644
--- a/builtin-shortlog.c
+++ b/builtin/shortlog.c
@@ -295,6 +295,8 @@ parse_done:
if (!nongit && !rev.pending.nr && isatty(0))
add_head_to_pending(&rev);
if (rev.pending.nr == 0) {
+ if (isatty(0))
+ fprintf(stderr, "(reading log message from standard input)\n");
read_from_stdin(&log);
}
else
@@ -304,9 +306,19 @@ parse_done:
return 0;
}
+static void add_wrapped_shortlog_msg(struct strbuf *sb, const char *s,
+ const struct shortlog *log)
+{
+ int col = strbuf_add_wrapped_text(sb, s, log->in1, log->in2, log->wrap);
+ if (col != log->wrap)
+ strbuf_addch(sb, '\n');
+}
+
void shortlog_output(struct shortlog *log)
{
int i, j;
+ struct strbuf sb = STRBUF_INIT;
+
if (log->sort_by_number)
qsort(log->list.items, log->list.nr, sizeof(struct string_list_item),
compare_by_number);
@@ -321,9 +333,9 @@ void shortlog_output(struct shortlog *log)
const char *msg = onelines->items[j].string;
if (log->wrap_lines) {
- int col = print_wrapped_text(msg, log->in1, log->in2, log->wrap);
- if (col != log->wrap)
- putchar('\n');
+ strbuf_reset(&sb);
+ add_wrapped_shortlog_msg(&sb, msg, log);
+ fwrite(sb.buf, sb.len, 1, stdout);
}
else
printf(" %s\n", msg);
@@ -337,6 +349,7 @@ void shortlog_output(struct shortlog *log)
log->list.items[i].util = NULL;
}
+ strbuf_release(&sb);
log->list.strdup_strings = 1;
string_list_clear(&log->list, 1);
clear_mailmap(&log->mailmap);
diff --git a/builtin-show-branch.c b/builtin/show-branch.c
index 9f13caa76d..e20fcf3e93 100644
--- a/builtin-show-branch.c
+++ b/builtin/show-branch.c
@@ -6,7 +6,7 @@
#include "parse-options.h"
static const char* show_branch_usage[] = {
- "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...",
+ "git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [<rev> | <glob>]...",
"git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]",
NULL
};
@@ -567,7 +567,7 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
return config_error_nonbool(var);
/*
* default_arg is now passed to parse_options(), so we need to
- * mimick the real argv a bit better.
+ * mimic the real argv a bit better.
*/
if (!default_num) {
default_alloc = 20;
@@ -661,7 +661,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
"show remote-tracking and local branches"),
OPT_BOOLEAN('r', "remotes", &all_remotes,
"show remote-tracking branches"),
- OPT_BOOLEAN(0, "color", &showbranch_use_color,
+ OPT__COLOR(&showbranch_use_color,
"color '*!+-' corresponding to the branch"),
{ OPTION_INTEGER, 0, "more", &extra, "n",
"show <n> more commits after the common ancestor",
diff --git a/builtin-show-ref.c b/builtin/show-ref.c
index 17ada88dfb..17ada88dfb 100644
--- a/builtin-show-ref.c
+++ b/builtin/show-ref.c
diff --git a/builtin-stripspace.c b/builtin/stripspace.c
index 4d3b93fedb..4d3b93fedb 100644
--- a/builtin-stripspace.c
+++ b/builtin/stripspace.c
diff --git a/builtin-symbolic-ref.c b/builtin/symbolic-ref.c
index ca855a5eb2..ca855a5eb2 100644
--- a/builtin-symbolic-ref.c
+++ b/builtin/symbolic-ref.c
diff --git a/builtin-tag.c b/builtin/tag.c
index 4ef1c4f508..4ef1c4f508 100644
--- a/builtin-tag.c
+++ b/builtin/tag.c
diff --git a/builtin-tar-tree.c b/builtin/tar-tree.c
index 3f1e7012db..3f1e7012db 100644
--- a/builtin-tar-tree.c
+++ b/builtin/tar-tree.c
diff --git a/builtin-unpack-file.c b/builtin/unpack-file.c
index 608590ada8..608590ada8 100644
--- a/builtin-unpack-file.c
+++ b/builtin/unpack-file.c
diff --git a/builtin-unpack-objects.c b/builtin/unpack-objects.c
index 685566e0b5..685566e0b5 100644
--- a/builtin-unpack-objects.c
+++ b/builtin/unpack-objects.c
diff --git a/builtin-update-index.c b/builtin/update-index.c
index 3ab214d24e..3ab214d24e 100644
--- a/builtin-update-index.c
+++ b/builtin/update-index.c
diff --git a/builtin-update-ref.c b/builtin/update-ref.c
index 76ba1d5881..76ba1d5881 100644
--- a/builtin-update-ref.c
+++ b/builtin/update-ref.c
diff --git a/builtin-update-server-info.c b/builtin/update-server-info.c
index 2b3fddcc69..2b3fddcc69 100644
--- a/builtin-update-server-info.c
+++ b/builtin/update-server-info.c
diff --git a/builtin-upload-archive.c b/builtin/upload-archive.c
index 73f788ef24..73f788ef24 100644
--- a/builtin-upload-archive.c
+++ b/builtin/upload-archive.c
diff --git a/builtin-var.c b/builtin/var.c
index 2280518190..70fdb4dec7 100644
--- a/builtin-var.c
+++ b/builtin/var.c
@@ -6,7 +6,7 @@
#include "cache.h"
#include "exec_cmd.h"
-static const char var_usage[] = "git var [-l | <variable>]";
+static const char var_usage[] = "git var (-l | <variable>)";
static const char *editor(int flag)
{
@@ -20,7 +20,7 @@ static const char *editor(int flag)
static const char *pager(int flag)
{
- const char *pgm = git_pager();
+ const char *pgm = git_pager(1);
if (!pgm)
pgm = "cat";
diff --git a/builtin-verify-pack.c b/builtin/verify-pack.c
index b6079ae6cb..b6079ae6cb 100644
--- a/builtin-verify-pack.c
+++ b/builtin/verify-pack.c
diff --git a/builtin-verify-tag.c b/builtin/verify-tag.c
index 9f482c29f5..9f482c29f5 100644
--- a/builtin-verify-tag.c
+++ b/builtin/verify-tag.c
diff --git a/builtin-write-tree.c b/builtin/write-tree.c
index b223af416f..b223af416f 100644
--- a/builtin-write-tree.c
+++ b/builtin/write-tree.c
diff --git a/cache.h b/cache.h
index a04f37f14b..2928107bb1 100644
--- a/cache.h
+++ b/cache.h
@@ -182,6 +182,8 @@ struct cache_entry {
/* Only remove in work directory, not index */
#define CE_WT_REMOVE (0x400000)
+#define CE_UNPACKED (0x1000000)
+
/*
* Extended on-disk flags
*/
@@ -389,6 +391,15 @@ static inline enum object_type object_type(unsigned int mode)
#define GIT_NOTES_REWRITE_REF_ENVIRONMENT "GIT_NOTES_REWRITE_REF"
#define GIT_NOTES_REWRITE_MODE_ENVIRONMENT "GIT_NOTES_REWRITE_MODE"
+/*
+ * Repository-local GIT_* environment variables
+ * The array is NULL-terminated to simplify its usage in contexts such
+ * environment creation or simple walk of the list.
+ * The number of non-NULL entries is available as a macro.
+ */
+#define LOCAL_REPO_ENV_SIZE 8
+extern const char *const local_repo_env[LOCAL_REPO_ENV_SIZE + 1];
+
extern int is_bare_repository_cfg;
extern int is_bare_repository(void);
extern int is_inside_git_dir(void);
@@ -556,6 +567,7 @@ enum branch_track {
BRANCH_TRACK_REMOTE,
BRANCH_TRACK_ALWAYS,
BRANCH_TRACK_EXPLICIT,
+ BRANCH_TRACK_OVERRIDE,
};
enum rebase_setup_type {
@@ -641,6 +653,10 @@ int git_mkstemp(char *path, size_t n, const char *template);
int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);
+/* set default permissions by passing mode arguments to open(2) */
+int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
+int git_mkstemp_mode(char *pattern, int mode);
+
/*
* NOTE NOTE NOTE!!
*
@@ -675,6 +691,7 @@ int normalize_path_copy(char *dst, const char *src);
int longest_ancestor_length(const char *path, const char *prefix_list);
char *strip_path_suffix(const char *path, const char *suffix);
int daemon_avoid_alias(const char *path);
+int offset_1st_component(const char *path);
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
extern int sha1_object_info(const unsigned char *, unsigned long *);
@@ -762,7 +779,8 @@ const char *show_date_relative(unsigned long time, int tz,
size_t timebuf_size);
int parse_date(const char *date, char *buf, int bufsize);
void datestamp(char *buf, int bufsize);
-unsigned long approxidate(const char *);
+#define approxidate(s) approxidate_careful((s), NULL)
+unsigned long approxidate_careful(const char *, int *);
unsigned long approxidate_relative(const char *date, const struct timeval *now);
enum date_mode parse_date_format(const char *format);
@@ -774,7 +792,7 @@ extern const char *git_committer_info(int);
extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int);
extern const char *fmt_name(const char *name, const char *email);
extern const char *git_editor(void);
-extern const char *git_pager(void);
+extern const char *git_pager(int stdout_is_tty);
struct checkout {
const char *base_dir;
@@ -876,6 +894,7 @@ struct ref {
extern struct ref *find_ref_by_name(const struct ref *list, const char *name);
#define CONNECT_VERBOSE (1u << 0)
+extern char *git_getpass(const char *prompt);
extern struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
extern int finish_connect(struct child_process *conn);
extern int path_match(const char *path, int nr, char **match);
diff --git a/color.c b/color.c
index 62977f4808..bcf4e2c192 100644
--- a/color.c
+++ b/color.c
@@ -47,7 +47,7 @@ void color_parse_mem(const char *value, int value_len, const char *var,
{
const char *ptr = value;
int len = value_len;
- int attr = -1;
+ unsigned int attr = 0;
int fg = -2;
int bg = -2;
@@ -56,7 +56,7 @@ void color_parse_mem(const char *value, int value_len, const char *var,
return;
}
- /* [fg [bg]] [attr] */
+ /* [fg [bg]] [attr]... */
while (len > 0) {
const char *word = ptr;
int val, wordlen = 0;
@@ -85,19 +85,27 @@ void color_parse_mem(const char *value, int value_len, const char *var,
goto bad;
}
val = parse_attr(word, wordlen);
- if (val < 0 || attr != -1)
+ if (0 <= val)
+ attr |= (1 << val);
+ else
goto bad;
- attr = val;
}
- if (attr >= 0 || fg >= 0 || bg >= 0) {
+ if (attr || fg >= 0 || bg >= 0) {
int sep = 0;
+ int i;
*dst++ = '\033';
*dst++ = '[';
- if (attr >= 0) {
- *dst++ = '0' + attr;
- sep++;
+
+ for (i = 0; attr; i++) {
+ unsigned bit = (1 << i);
+ if (!(attr & bit))
+ continue;
+ attr &= ~bit;
+ if (sep++)
+ *dst++ = ';';
+ *dst++ = '0' + i;
}
if (fg >= 0) {
if (sep++)
@@ -138,6 +146,9 @@ int git_config_colorbool(const char *var, const char *value, int stdout_is_tty)
goto auto_color;
}
+ if (!var)
+ return -1;
+
/* Missing or explicit false to turn off colorization */
if (!git_config_bool(var, value))
return 0;
diff --git a/color.h b/color.h
index 3cb4b7fc89..5c264b0ce3 100644
--- a/color.h
+++ b/color.h
@@ -1,8 +1,20 @@
#ifndef COLOR_H
#define COLOR_H
-/* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */
-#define COLOR_MAXLEN 24
+/* 2 + (2 * num_attrs) + 8 + 1 + 8 + 'm' + NUL */
+/* "\033[1;2;4;5;7;38;5;2xx;48;5;2xxm\0" */
+/*
+ * The maximum length of ANSI color sequence we would generate:
+ * - leading ESC '[' 2
+ * - attr + ';' 2 * 8 (e.g. "1;")
+ * - fg color + ';' 9 (e.g. "38;5;2xx;")
+ * - fg color + ';' 9 (e.g. "48;5;2xx;")
+ * - terminating 'm' NUL 2
+ *
+ * The above overcounts attr (we only use 5 not 8) and one semicolon
+ * but it is close enough.
+ */
+#define COLOR_MAXLEN 40
/*
* IMPORTANT: Due to the way these color codes are emulated on Windows,
@@ -18,7 +30,18 @@
#define GIT_COLOR_BLUE "\033[34m"
#define GIT_COLOR_MAGENTA "\033[35m"
#define GIT_COLOR_CYAN "\033[36m"
+#define GIT_COLOR_BOLD_RED "\033[1;31m"
+#define GIT_COLOR_BOLD_GREEN "\033[1;32m"
+#define GIT_COLOR_BOLD_YELLOW "\033[1;33m"
+#define GIT_COLOR_BOLD_BLUE "\033[1;34m"
+#define GIT_COLOR_BOLD_MAGENTA "\033[1;35m"
+#define GIT_COLOR_BOLD_CYAN "\033[1;36m"
#define GIT_COLOR_BG_RED "\033[41m"
+#define GIT_COLOR_BG_GREEN "\033[42m"
+#define GIT_COLOR_BG_YELLOW "\033[43m"
+#define GIT_COLOR_BG_BLUE "\033[44m"
+#define GIT_COLOR_BG_MAGENTA "\033[45m"
+#define GIT_COLOR_BG_CYAN "\033[46m"
/*
* This variable stores the value of color.ui
diff --git a/commit.c b/commit.c
index 632061c2c3..731191e63b 100644
--- a/commit.c
+++ b/commit.c
@@ -224,7 +224,7 @@ int unregister_shallow(const unsigned char *sha1)
if (pos < 0)
return -1;
if (pos + 1 < commit_graft_nr)
- memcpy(commit_graft + pos, commit_graft + pos + 1,
+ memmove(commit_graft + pos, commit_graft + pos + 1,
sizeof(struct commit_graft *)
* (commit_graft_nr - pos - 1));
commit_graft_nr--;
diff --git a/compat/mingw.c b/compat/mingw.c
index ab65f77ab9..c5bfb39b39 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -140,6 +140,22 @@ int mingw_open (const char *filename, int oflags, ...)
return fd;
}
+#undef fopen
+FILE *mingw_fopen (const char *filename, const char *otype)
+{
+ if (!strcmp(filename, "/dev/null"))
+ filename = "nul";
+ return fopen(filename, otype);
+}
+
+#undef freopen
+FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream)
+{
+ if (filename && !strcmp(filename, "/dev/null"))
+ filename = "nul";
+ return freopen(filename, otype, stream);
+}
+
/*
* The unit of FILETIME is 100-nanoseconds since January 1, 1601, UTC.
* Returns the 100-nanoseconds ("hekto nanoseconds") since the epoch.
diff --git a/compat/mingw.h b/compat/mingw.h
index e254fb4e06..e81e752ed2 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -170,6 +170,12 @@ int link(const char *oldpath, const char *newpath);
int mingw_open (const char *filename, int oflags, ...);
#define open mingw_open
+FILE *mingw_fopen (const char *filename, const char *otype);
+#define fopen mingw_fopen
+
+FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream);
+#define freopen mingw_freopen
+
char *mingw_getcwd(char *pointer, int len);
#define getcwd mingw_getcwd
diff --git a/compat/mkdtemp.c b/compat/mkdtemp.c
index 34d4b49818..1136119592 100644
--- a/compat/mkdtemp.c
+++ b/compat/mkdtemp.c
@@ -2,7 +2,7 @@
char *gitmkdtemp(char *template)
{
- if (!mktemp(template) || mkdir(template, 0700))
+ if (!*mktemp(template) || mkdir(template, 0700))
return NULL;
return template;
}
diff --git a/compat/mkstemps.c b/compat/mkstemps.c
deleted file mode 100644
index 14179c8e6d..0000000000
--- a/compat/mkstemps.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "../git-compat-util.h"
-
-/* Adapted from libiberty's mkstemp.c. */
-
-#undef TMP_MAX
-#define TMP_MAX 16384
-
-int gitmkstemps(char *pattern, int suffix_len)
-{
- static const char letters[] =
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789";
- static const int num_letters = 62;
- uint64_t value;
- struct timeval tv;
- char *template;
- size_t len;
- int fd, count;
-
- len = strlen(pattern);
-
- if (len < 6 + suffix_len) {
- errno = EINVAL;
- return -1;
- }
-
- if (strncmp(&pattern[len - 6 - suffix_len], "XXXXXX", 6)) {
- errno = EINVAL;
- return -1;
- }
-
- /*
- * Replace pattern's XXXXXX characters with randomness.
- * Try TMP_MAX different filenames.
- */
- gettimeofday(&tv, NULL);
- value = ((size_t)(tv.tv_usec << 16)) ^ tv.tv_sec ^ getpid();
- template = &pattern[len - 6 - suffix_len];
- for (count = 0; count < TMP_MAX; ++count) {
- uint64_t v = value;
- /* Fill in the random bits. */
- template[0] = letters[v % num_letters]; v /= num_letters;
- template[1] = letters[v % num_letters]; v /= num_letters;
- template[2] = letters[v % num_letters]; v /= num_letters;
- template[3] = letters[v % num_letters]; v /= num_letters;
- template[4] = letters[v % num_letters]; v /= num_letters;
- template[5] = letters[v % num_letters]; v /= num_letters;
-
- fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, 0600);
- if (fd > 0)
- return fd;
- /*
- * Fatal error (EPERM, ENOSPC etc).
- * It doesn't make sense to loop.
- */
- if (errno != EEXIST)
- break;
- /*
- * This is a random value. It is only necessary that
- * the next TMP_MAX values generated by adding 7777 to
- * VALUE are different with (module 2^32).
- */
- value += 7777;
- }
- /* We return the null string if we can't find a unique file name. */
- pattern[0] = '\0';
- errno = EINVAL;
- return -1;
-}
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 67d5c370a0..556d8ab11f 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -2808,7 +2808,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
{
bufp->regs_allocated = REGS_UNALLOCATED;
regs->num_regs = 0;
- regs->start = regs->end = (regoff_t) 0;
+ regs->start = regs->end = (regoff_t *) 0;
}
}
diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl
index 8a2112f22f..4374771df2 100644
--- a/compat/vcbuild/scripts/clink.pl
+++ b/compat/vcbuild/scripts/clink.pl
@@ -31,6 +31,7 @@ while (@ARGV) {
push(@args, "iconv.lib");
} elsif ("$arg" eq "-lcrypto") {
push(@args, "libeay32.lib");
+ } elsif ("$arg" eq "-lssl") {
push(@args, "ssleay32.lib");
} elsif ("$arg" =~ /^-L/ && "$arg" ne "-LTCG") {
$arg =~ s/^-L/-LIBPATH:/;
diff --git a/compat/win32/pthread.c b/compat/win32/pthread.c
index 631c0a46ea..0f949fc425 100644
--- a/compat/win32/pthread.c
+++ b/compat/win32/pthread.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2009 Andrzej K. Haczewski <ahaczewski@gmail.com>
*
- * DISCLAMER: The implementation is Git-specific, it is subset of original
+ * DISCLAIMER: The implementation is Git-specific, it is subset of original
* Pthreads API, without lots of other features that Git doesn't use.
* Git also makes sure that the passed arguments are valid, so there's
* no need for double-checking.
@@ -52,24 +52,38 @@ int win32_pthread_join(pthread_t *thread, void **value_ptr)
int pthread_cond_init(pthread_cond_t *cond, const void *unused)
{
cond->waiters = 0;
+ cond->was_broadcast = 0;
+ InitializeCriticalSection(&cond->waiters_lock);
cond->sema = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
if (!cond->sema)
die("CreateSemaphore() failed");
+
+ cond->continue_broadcast = CreateEvent(NULL, /* security */
+ FALSE, /* auto-reset */
+ FALSE, /* not signaled */
+ NULL); /* name */
+ if (!cond->continue_broadcast)
+ die("CreateEvent() failed");
+
return 0;
}
int pthread_cond_destroy(pthread_cond_t *cond)
{
CloseHandle(cond->sema);
- cond->sema = NULL;
-
+ CloseHandle(cond->continue_broadcast);
+ DeleteCriticalSection(&cond->waiters_lock);
return 0;
}
int pthread_cond_wait(pthread_cond_t *cond, CRITICAL_SECTION *mutex)
{
- InterlockedIncrement(&cond->waiters);
+ int last_waiter;
+
+ EnterCriticalSection(&cond->waiters_lock);
+ cond->waiters++;
+ LeaveCriticalSection(&cond->waiters_lock);
/*
* Unlock external mutex and wait for signal.
@@ -82,22 +96,52 @@ int pthread_cond_wait(pthread_cond_t *cond, CRITICAL_SECTION *mutex)
/* let's wait - ignore return value */
WaitForSingleObject(cond->sema, INFINITE);
- /* we're done waiting, so make sure we decrease waiters count */
- InterlockedDecrement(&cond->waiters);
-
+ /*
+ * Decrease waiters count. If we are the last waiter, then we must
+ * notify the broadcasting thread that it can continue.
+ * But if we continued due to cond_signal, we do not have to do that
+ * because the signaling thread knows that only one waiter continued.
+ */
+ EnterCriticalSection(&cond->waiters_lock);
+ cond->waiters--;
+ last_waiter = cond->was_broadcast && cond->waiters == 0;
+ LeaveCriticalSection(&cond->waiters_lock);
+
+ if (last_waiter) {
+ /*
+ * cond_broadcast was issued while mutex was held. This means
+ * that all other waiters have continued, but are contending
+ * for the mutex at the end of this function because the
+ * broadcasting thread did not leave cond_broadcast, yet.
+ * (This is so that it can be sure that each waiter has
+ * consumed exactly one slice of the semaphor.)
+ * The last waiter must tell the broadcasting thread that it
+ * can go on.
+ */
+ SetEvent(cond->continue_broadcast);
+ /*
+ * Now we go on to contend with all other waiters for
+ * the mutex. Auf in den Kampf!
+ */
+ }
/* lock external mutex again */
EnterCriticalSection(mutex);
return 0;
}
+/*
+ * IMPORTANT: This implementation requires that pthread_cond_signal
+ * is called while the mutex is held that is used in the corresponding
+ * pthread_cond_wait calls!
+ */
int pthread_cond_signal(pthread_cond_t *cond)
{
- /*
- * Access to waiters count is atomic; see "Interlocked Variable Access"
- * http://msdn.microsoft.com/en-us/library/ms684122(VS.85).aspx
- */
- int have_waiters = cond->waiters > 0;
+ int have_waiters;
+
+ EnterCriticalSection(&cond->waiters_lock);
+ have_waiters = cond->waiters > 0;
+ LeaveCriticalSection(&cond->waiters_lock);
/*
* Signal only when there are waiters
@@ -108,3 +152,37 @@ int pthread_cond_signal(pthread_cond_t *cond)
else
return 0;
}
+
+/*
+ * DOUBLY IMPORTANT: This implementation requires that pthread_cond_broadcast
+ * is called while the mutex is held that is used in the corresponding
+ * pthread_cond_wait calls!
+ */
+int pthread_cond_broadcast(pthread_cond_t *cond)
+{
+ EnterCriticalSection(&cond->waiters_lock);
+
+ if ((cond->was_broadcast = cond->waiters > 0)) {
+ /* wake up all waiters */
+ ReleaseSemaphore(cond->sema, cond->waiters, NULL);
+ LeaveCriticalSection(&cond->waiters_lock);
+ /*
+ * At this point all waiters continue. Each one takes its
+ * slice of the semaphor. Now it's our turn to wait: Since
+ * the external mutex is held, no thread can leave cond_wait,
+ * yet. For this reason, we can be sure that no thread gets
+ * a chance to eat *more* than one slice. OTOH, it means
+ * that the last waiter must send us a wake-up.
+ */
+ WaitForSingleObject(cond->continue_broadcast, INFINITE);
+ /*
+ * Since the external mutex is held, no thread can enter
+ * cond_wait, and, hence, it is safe to reset this flag
+ * without cond->waiters_lock held.
+ */
+ cond->was_broadcast = 0;
+ } else {
+ LeaveCriticalSection(&cond->waiters_lock);
+ }
+ return 0;
+}
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index b8e1bcb046..c72f100f40 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -32,17 +32,18 @@
* See also: http://www.cse.wustl.edu/~schmidt/win32-cv-1.html
*/
typedef struct {
- volatile LONG waiters;
+ LONG waiters;
+ int was_broadcast;
+ CRITICAL_SECTION waiters_lock;
HANDLE sema;
+ HANDLE continue_broadcast;
} pthread_cond_t;
extern int pthread_cond_init(pthread_cond_t *cond, const void *unused);
-
extern int pthread_cond_destroy(pthread_cond_t *cond);
-
extern int pthread_cond_wait(pthread_cond_t *cond, CRITICAL_SECTION *mutex);
-
extern int pthread_cond_signal(pthread_cond_t *cond);
+extern int pthread_cond_broadcast(pthread_cond_t *cond);
/*
* Simple thread creation implementation using pthread API
diff --git a/config.mak.in b/config.mak.in
index 67b12f73a1..6008ac9f1b 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -56,5 +56,4 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@
SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
NO_PTHREADS=@NO_PTHREADS@
-THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@
PTHREAD_LIBS=@PTHREAD_LIBS@
diff --git a/configure.ac b/configure.ac
index 78345ebb60..914ae5759f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,21 +23,32 @@ AC_DEFUN([GIT_CONF_APPEND_LINE],
# GIT_ARG_SET_PATH(PROGRAM)
# -------------------------
# Provide --with-PROGRAM=PATH option to set PATH to PROGRAM
+# Optional second argument allows setting NO_PROGRAM=YesPlease if
+# --without-PROGRAM version used.
AC_DEFUN([GIT_ARG_SET_PATH],
[AC_ARG_WITH([$1],
[AS_HELP_STRING([--with-$1=PATH],
[provide PATH to $1])],
- [GIT_CONF_APPEND_PATH($1)],[])
+ [GIT_CONF_APPEND_PATH($1,$2)],[])
])# GIT_ARG_SET_PATH
#
# GIT_CONF_APPEND_PATH(PROGRAM)
# ------------------------------
# Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH
# Used by GIT_ARG_SET_PATH(PROGRAM)
+# Optional second argument allows setting NO_PROGRAM=YesPlease if
+# --without-PROGRAM is used.
AC_DEFUN([GIT_CONF_APPEND_PATH],
[PROGRAM=m4_toupper($1); \
if test "$withval" = "no"; then \
- AC_MSG_ERROR([You cannot use git without $1]); \
+ if test -n "$2"; then \
+ m4_toupper($1)_PATH=$withval; \
+ AC_MSG_NOTICE([Disabling use of ${PROGRAM}]); \
+ GIT_CONF_APPEND_LINE(NO_${PROGRAM}=YesPlease); \
+ GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=); \
+ else \
+ AC_MSG_ERROR([You cannot use git without $1]); \
+ fi; \
else \
if test "$withval" = "yes"; then \
AC_MSG_WARN([You should provide path for --with-$1=PATH]); \
@@ -277,7 +288,7 @@ GIT_ARG_SET_PATH(shell)
GIT_ARG_SET_PATH(perl)
#
# Define PYTHON_PATH to provide path to Python.
-GIT_ARG_SET_PATH(python)
+GIT_ARG_SET_PATH(python, allow-without)
#
# Define ZLIB_PATH to provide path to zlib.
GIT_ARG_SET_PATH(zlib)
@@ -762,10 +773,9 @@ AC_SUBST(NO_MKSTEMPS)
# 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.
#
-# Define NO_PTHREADS if we do not have pthreads
+# Define NO_PTHREADS if we do not have pthreads.
#
-# Define PTHREAD_LIBS to the linker flag used for Pthread support and define
-# THREADED_DELTA_SEARCH if Pthreads are available.
+# Define PTHREAD_LIBS to the linker flag used for Pthread support.
AC_DEFUN([PTHREADTEST_SRC], [
#include <pthread.h>
@@ -782,7 +792,6 @@ dnl [[pthread_mutex_t test_mutex;]]
dnl )])
NO_PTHREADS=UnfortunatelyYes
-THREADED_DELTA_SEARCH=
PTHREAD_LIBS=
if test -n "$USER_NOPTHREAD"; then
@@ -798,7 +807,6 @@ elif test -z "$PTHREAD_CFLAGS"; then
[AC_MSG_RESULT([yes])
NO_PTHREADS=
PTHREAD_LIBS="$opt"
- THREADED_DELTA_SEARCH=YesPlease
break
],
[AC_MSG_RESULT([no])])
@@ -812,7 +820,6 @@ else
[AC_MSG_RESULT([yes])
NO_PTHREADS=
PTHREAD_LIBS="$PTHREAD_CFLAGS"
- THREADED_DELTA_SEARCH=YesPlease
],
[AC_MSG_RESULT([no])])
@@ -823,7 +830,6 @@ CFLAGS="$old_CFLAGS"
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(NO_PTHREADS)
-AC_SUBST(THREADED_DELTA_SEARCH)
## Output files
AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
diff --git a/connect.c b/connect.c
index db965c9982..9ae991ac42 100644
--- a/connect.c
+++ b/connect.c
@@ -152,6 +152,28 @@ static enum protocol get_protocol(const char *name)
#define STR_(s) # s
#define STR(s) STR_(s)
+static void get_host_and_port(char **host, const char **port)
+{
+ char *colon, *end;
+
+ if (*host[0] == '[') {
+ end = strchr(*host + 1, ']');
+ if (end) {
+ *end = 0;
+ end++;
+ (*host)++;
+ } else
+ end = *host;
+ } else
+ end = *host;
+ colon = strchr(end, ':');
+
+ if (colon) {
+ *colon = 0;
+ *port = colon + 1;
+ }
+}
+
#ifndef NO_IPV6
static const char *ai_name(const struct addrinfo *ai)
@@ -170,30 +192,14 @@ static const char *ai_name(const struct addrinfo *ai)
static int git_tcp_connect_sock(char *host, int flags)
{
int sockfd = -1, saved_errno = 0;
- char *colon, *end;
const char *port = STR(DEFAULT_GIT_PORT);
struct addrinfo hints, *ai0, *ai;
int gai;
int cnt = 0;
- if (host[0] == '[') {
- end = strchr(host + 1, ']');
- if (end) {
- *end = 0;
- end++;
- host++;
- } else
- end = host;
- } else
- end = host;
- colon = strchr(end, ':');
-
- if (colon) {
- *colon = 0;
- port = colon + 1;
- if (!*port)
- port = "<none>";
- }
+ get_host_and_port(&host, &port);
+ if (!*port)
+ port = "<none>";
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_STREAM;
@@ -251,30 +257,15 @@ static int git_tcp_connect_sock(char *host, int flags)
static int git_tcp_connect_sock(char *host, int flags)
{
int sockfd = -1, saved_errno = 0;
- char *colon, *end;
- char *port = STR(DEFAULT_GIT_PORT), *ep;
+ const char *port = STR(DEFAULT_GIT_PORT);
+ char *ep;
struct hostent *he;
struct sockaddr_in sa;
char **ap;
unsigned int nport;
int cnt;
- if (host[0] == '[') {
- end = strchr(host + 1, ']');
- if (end) {
- *end = 0;
- end++;
- host++;
- } else
- end = host;
- } else
- end = host;
- colon = strchr(end, ':');
-
- if (colon) {
- *colon = 0;
- port = colon + 1;
- }
+ get_host_and_port(&host, &port);
if (flags & CONNECT_VERBOSE)
fprintf(stderr, "Looking up %s ... ", host);
@@ -406,26 +397,10 @@ static int git_use_proxy(const char *host)
static void git_proxy_connect(int fd[2], char *host)
{
const char *port = STR(DEFAULT_GIT_PORT);
- char *colon, *end;
const char *argv[4];
struct child_process proxy;
- if (host[0] == '[') {
- end = strchr(host + 1, ']');
- if (end) {
- *end = 0;
- end++;
- host++;
- } else
- end = host;
- } else
- end = host;
- colon = strchr(end, ':');
-
- if (colon) {
- *colon = 0;
- port = colon + 1;
- }
+ get_host_and_port(&host, &port);
argv[0] = git_proxy_command;
argv[1] = host;
@@ -502,12 +477,18 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
c = ':';
}
+ /*
+ * Don't do destructive transforms with git:// as that
+ * protocol code does '[]' unwrapping of its own.
+ */
if (host[0] == '[') {
end = strchr(host + 1, ']');
if (end) {
- *end = 0;
+ if (protocol != PROTO_GIT) {
+ *end = 0;
+ host++;
+ }
end++;
- host++;
} else
end = host;
} else
@@ -601,20 +582,9 @@ struct child_process *git_connect(int fd[2], const char *url_orig,
*arg++ = host;
}
else {
- /* remove these from the environment */
- const char *env[] = {
- ALTERNATE_DB_ENVIRONMENT,
- DB_ENVIRONMENT,
- GIT_DIR_ENVIRONMENT,
- GIT_WORK_TREE_ENVIRONMENT,
- GRAFT_ENVIRONMENT,
- INDEX_ENVIRONMENT,
- NO_REPLACE_OBJECTS_ENVIRONMENT,
- NULL
- };
- conn->env = env;
- *arg++ = "sh";
- *arg++ = "-c";
+ /* remove repo-local variables from the environment */
+ conn->env = local_repo_env;
+ conn->use_shell = 1;
}
*arg++ = cmd.buf;
*arg = NULL;
@@ -642,3 +612,40 @@ int finish_connect(struct child_process *conn)
free(conn);
return code;
}
+
+char *git_getpass(const char *prompt)
+{
+ char *askpass;
+ struct child_process pass;
+ const char *args[3];
+ static struct strbuf buffer = STRBUF_INIT;
+
+ askpass = getenv("GIT_ASKPASS");
+
+ if (!askpass || !(*askpass))
+ return getpass(prompt);
+
+ args[0] = askpass;
+ args[1] = prompt;
+ args[2] = NULL;
+
+ memset(&pass, 0, sizeof(pass));
+ pass.argv = args;
+ pass.out = -1;
+
+ if (start_command(&pass))
+ exit(1);
+
+ strbuf_reset(&buffer);
+ if (strbuf_read(&buffer, pass.out, 20) < 0)
+ die("failed to read password from %s\n", askpass);
+
+ close(pass.out);
+
+ if (finish_command(&pass))
+ exit(1);
+
+ strbuf_setlen(&buffer, strcspn(buffer.buf, "\r\n"));
+
+ return buffer.buf;
+}
diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl
index 8f890fb5a5..23da787dc5 100644
--- a/contrib/buildsystems/engine.pl
+++ b/contrib/buildsystems/engine.pl
@@ -319,6 +319,7 @@ sub handleLinkLine
push(@libs, "zlib.lib");
} elsif ("$part" eq "-lcrypto") {
push(@libs, "libeay32.lib");
+ } elsif ("$part" eq "-lssl") {
push(@libs, "ssleay32.lib");
} elsif ($part =~ /^-/) {
push(@lflags, $part);
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9651720410..733ac39a32 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -250,7 +250,9 @@ __git_refs ()
refs="${cur%/*}"
;;
*)
- if [ -e "$dir/HEAD" ]; then echo HEAD; fi
+ for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do
+ if [ -e "$dir/$i" ]; then echo $i; fi
+ done
format="refname:short"
refs="refs/tags refs/heads refs/remotes"
;;
@@ -568,6 +570,7 @@ __git_list_porcelain_commands ()
read-tree) : plumbing;;
receive-pack) : plumbing;;
reflog) : plumbing;;
+ remote-*) : transport;;
repo-config) : deprecated;;
rerere) : plumbing;;
rev-list) : plumbing;;
@@ -666,7 +669,7 @@ _git_am ()
{
local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)"
if [ -d "$dir"/rebase-apply ]; then
- __gitcomp "--skip --resolved --abort"
+ __gitcomp "--skip --continue --resolved --abort"
return
fi
case "$cur" in
@@ -1306,6 +1309,24 @@ _git_name_rev ()
__gitcomp "--tags --all --stdin"
}
+_git_notes ()
+{
+ local subcommands="edit show"
+ if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then
+ __gitcomp "$subcommands"
+ return
+ fi
+
+ case "${COMP_WORDS[COMP_CWORD-1]}" in
+ -m|-F)
+ COMPREPLY=()
+ ;;
+ *)
+ __gitcomp "$(__git_refs)"
+ ;;
+ esac
+}
+
_git_pull ()
{
__git_complete_strategy && return
@@ -1367,6 +1388,7 @@ _git_rebase ()
--preserve-merges --stat --no-stat
--committer-date-is-author-date --ignore-date
--ignore-whitespace --whitespace=
+ --autosquash
"
return
@@ -2218,6 +2240,7 @@ _git ()
merge-base) _git_merge_base ;;
mv) _git_mv ;;
name-rev) _git_name_rev ;;
+ notes) _git_notes ;;
pull) _git_pull ;;
push) _git_push ;;
rebase) _git_rebase ;;
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index d1512e0acf..c1ea643ace 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -802,7 +802,7 @@ class P4Submit(Command):
self.oldWorkingDirectory = os.getcwd()
chdir(self.clientPath)
- print "Syncronizing p4 checkout..."
+ print "Synchronizing p4 checkout..."
p4_system("sync ...")
self.check()
@@ -967,9 +967,8 @@ class P4Sync(Command):
elif file["type"] == "symlink":
mode = "120000"
# p4 print on a symlink contains "target\n", so strip it off
- last = contents.pop()
- last = last[:-1]
- contents.append(last)
+ data = ''.join(contents)
+ contents = [data[:-1]]
if self.isWindows and file["type"].endswith("text"):
mangled = []
@@ -1037,7 +1036,7 @@ class P4Sync(Command):
if includeFile:
filesForCommit.append(f)
- if f['action'] not in ('delete', 'purge'):
+ if f['action'] not in ('delete', 'move/delete', 'purge'):
filesToRead.append(f)
else:
filesToDelete.append(f)
diff --git a/contrib/fast-import/import-directories.perl b/contrib/fast-import/import-directories.perl
index 5782d80e26..3a5da4ab00 100755
--- a/contrib/fast-import/import-directories.perl
+++ b/contrib/fast-import/import-directories.perl
@@ -344,7 +344,7 @@ sub parsekeyvaluepair
Key and value strings may be enclosed in quotes, in which case
whitespace inside the quotes is preserved. Additionally, an equal
-sign may be included in the key by preceeding it with a backslash.
+sign may be included in the key by preceding it with a backslash.
For example:
"key1 "=value1
diff --git a/convert.c b/convert.c
index 27acce58bc..4f8fcb7bbb 100644
--- a/convert.c
+++ b/convert.c
@@ -241,7 +241,7 @@ struct filter_params {
const char *cmd;
};
-static int filter_buffer(int fd, void *data)
+static int filter_buffer(int in, int out, void *data)
{
/*
* Spawn cmd and feed the buffer contents through its stdin.
@@ -255,7 +255,7 @@ static int filter_buffer(int fd, void *data)
child_process.argv = argv;
child_process.use_shell = 1;
child_process.in = -1;
- child_process.out = fd;
+ child_process.out = out;
if (start_command(&child_process))
return error("cannot fork to run external filter %s", params->cmd);
@@ -292,6 +292,7 @@ static int apply_filter(const char *path, const char *src, size_t len,
memset(&async, 0, sizeof(async));
async.proc = filter_buffer;
async.data = &params;
+ async.out = -1;
params.src = src;
params.size = len;
params.cmd = cmd;
diff --git a/daemon.c b/daemon.c
index 360635eb1c..7d9e1c03e8 100644
--- a/daemon.c
+++ b/daemon.c
@@ -399,6 +399,33 @@ static char *xstrdup_tolower(const char *str)
return dup;
}
+static void parse_host_and_port(char *hostport, char **host,
+ char **port)
+{
+ if (*hostport == '[') {
+ char *end;
+
+ end = strchr(hostport, ']');
+ if (!end)
+ die("Invalid request ('[' without ']')");
+ *end = '\0';
+ *host = hostport + 1;
+ if (!end[1])
+ *port = NULL;
+ else if (end[1] == ':')
+ *port = end + 2;
+ else
+ die("Garbage after end of host part");
+ } else {
+ *host = hostport;
+ *port = strrchr(hostport, ':');
+ if (*port) {
+ **port = '\0';
+ ++*port;
+ }
+ }
+}
+
/*
* Read the host as supplied by the client connection.
*/
@@ -415,11 +442,10 @@ static void parse_host_arg(char *extra_args, int buflen)
vallen = strlen(val) + 1;
if (*val) {
/* Split <host>:<port> at colon. */
- char *host = val;
- char *port = strrchr(host, ':');
+ char *host;
+ char *port;
+ parse_host_and_port(val, &host, &port);
if (port) {
- *port = 0;
- port++;
free(tcp_port);
tcp_port = xstrdup(port);
}
diff --git a/date.c b/date.c
index 45f3684cee..002aa3c8d6 100644
--- a/date.c
+++ b/date.c
@@ -696,6 +696,11 @@ static unsigned long update_tm(struct tm *tm, struct tm *now, unsigned long sec)
return n;
}
+static void date_now(struct tm *tm, struct tm *now, int *num)
+{
+ update_tm(tm, now, 0);
+}
+
static void date_yesterday(struct tm *tm, struct tm *now, int *num)
{
update_tm(tm, now, 24*60*60);
@@ -770,6 +775,7 @@ static const struct special {
{ "PM", date_pm },
{ "AM", date_am },
{ "never", date_never },
+ { "now", date_now },
{ NULL }
};
@@ -790,7 +796,7 @@ static const struct typelen {
{ NULL }
};
-static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm *now, int *num)
+static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm *now, int *num, int *touched)
{
const struct typelen *tl;
const struct special *s;
@@ -804,6 +810,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
int match = match_string(date, month_names[i]);
if (match >= 3) {
tm->tm_mon = i;
+ *touched = 1;
return end;
}
}
@@ -812,6 +819,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
int len = strlen(s->name);
if (match_string(date, s->name) == len) {
s->fn(tm, now, num);
+ *touched = 1;
return end;
}
}
@@ -821,11 +829,14 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
int len = strlen(number_name[i]);
if (match_string(date, number_name[i]) == len) {
*num = i;
+ *touched = 1;
return end;
}
}
- if (match_string(date, "last") == 4)
+ if (match_string(date, "last") == 4) {
*num = 1;
+ *touched = 1;
+ }
return end;
}
@@ -835,6 +846,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
if (match_string(date, tl->type) >= len-1) {
update_tm(tm, now, tl->length * *num);
*num = 0;
+ *touched = 1;
return end;
}
tl++;
@@ -852,6 +864,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
diff += 7*n;
update_tm(tm, now, diff * 24 * 60 * 60);
+ *touched = 1;
return end;
}
}
@@ -866,6 +879,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
tm->tm_year--;
}
tm->tm_mon = n;
+ *touched = 1;
return end;
}
@@ -873,6 +887,7 @@ static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm
update_tm(tm, now, 0); /* fill in date fields if needed */
tm->tm_year -= *num;
*num = 0;
+ *touched = 1;
return end;
}
@@ -929,9 +944,12 @@ static void pending_number(struct tm *tm, int *num)
}
}
-static unsigned long approxidate_str(const char *date, const struct timeval *tv)
+static unsigned long approxidate_str(const char *date,
+ const struct timeval *tv,
+ int *error_ret)
{
int number = 0;
+ int touched = 0;
struct tm tm, now;
time_t time_sec;
@@ -951,33 +969,42 @@ static unsigned long approxidate_str(const char *date, const struct timeval *tv)
if (isdigit(c)) {
pending_number(&tm, &number);
date = approxidate_digit(date-1, &tm, &number);
+ touched = 1;
continue;
}
if (isalpha(c))
- date = approxidate_alpha(date-1, &tm, &now, &number);
+ date = approxidate_alpha(date-1, &tm, &now, &number, &touched);
}
pending_number(&tm, &number);
+ if (!touched)
+ *error_ret = 1;
return update_tm(&tm, &now, 0);
}
unsigned long approxidate_relative(const char *date, const struct timeval *tv)
{
char buffer[50];
+ int errors = 0;
if (parse_date(date, buffer, sizeof(buffer)) > 0)
return strtoul(buffer, NULL, 0);
- return approxidate_str(date, tv);
+ return approxidate_str(date, tv, &errors);
}
-unsigned long approxidate(const char *date)
+unsigned long approxidate_careful(const char *date, int *error_ret)
{
struct timeval tv;
char buffer[50];
+ int dummy = 0;
+ if (!error_ret)
+ error_ret = &dummy;
- if (parse_date(date, buffer, sizeof(buffer)) > 0)
+ if (parse_date(date, buffer, sizeof(buffer)) > 0) {
+ *error_ret = 0;
return strtoul(buffer, NULL, 0);
+ }
gettimeofday(&tv, NULL);
- return approxidate_str(date, &tv);
+ return approxidate_str(date, &tv, error_ret);
}
diff --git a/diff-lib.c b/diff-lib.c
index 1c7e652a80..c9f6e05bad 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -10,6 +10,7 @@
#include "cache-tree.h"
#include "unpack-trees.h"
#include "refs.h"
+#include "submodule.h"
/*
* diff-files
@@ -54,6 +55,27 @@ static int check_removed(const struct cache_entry *ce, struct stat *st)
return 0;
}
+/*
+ * Has a file changed or has a submodule new commits or a dirty work tree?
+ *
+ * Return 1 when changes are detected, 0 otherwise. If the DIRTY_SUBMODULES
+ * option is set, the caller does not only want to know if a submodule is
+ * modified at all but wants to know all the conditions that are met (new
+ * commits, untracked content and/or modified content).
+ */
+static int match_stat_with_submodule(struct diff_options *diffopt,
+ struct cache_entry *ce, struct stat *st,
+ unsigned ce_option, unsigned *dirty_submodule)
+{
+ int changed = ce_match_stat(ce, st, ce_option);
+ if (S_ISGITLINK(ce->ce_mode)
+ && !DIFF_OPT_TST(diffopt, IGNORE_SUBMODULES)
+ && (!changed || DIFF_OPT_TST(diffopt, DIRTY_SUBMODULES))) {
+ *dirty_submodule = is_submodule_modified(ce->name, DIFF_OPT_TST(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES));
+ }
+ return changed;
+}
+
int run_diff_files(struct rev_info *revs, unsigned int option)
{
int entries, i;
@@ -72,6 +94,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
unsigned int oldmode, newmode;
struct cache_entry *ce = active_cache[i];
int changed;
+ unsigned dirty_submodule = 0;
if (DIFF_OPT_TST(&revs->diffopt, QUICK) &&
DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
@@ -172,11 +195,12 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
if (silent_on_removed)
continue;
diff_addremove(&revs->diffopt, '-', ce->ce_mode,
- ce->sha1, ce->name);
+ ce->sha1, ce->name, 0);
continue;
}
- changed = ce_match_stat(ce, &st, ce_option);
- if (!changed) {
+ changed = match_stat_with_submodule(&revs->diffopt, ce, &st,
+ ce_option, &dirty_submodule);
+ if (!changed && !dirty_submodule) {
ce_mark_uptodate(ce);
if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
continue;
@@ -185,7 +209,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
newmode = ce_mode_from_stat(ce, st.st_mode);
diff_change(&revs->diffopt, oldmode, newmode,
ce->sha1, (changed ? null_sha1 : ce->sha1),
- ce->name);
+ ce->name, 0, dirty_submodule);
}
diffcore_std(&revs->diffopt);
@@ -201,16 +225,18 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
static void diff_index_show_file(struct rev_info *revs,
const char *prefix,
struct cache_entry *ce,
- const unsigned char *sha1, unsigned int mode)
+ const unsigned char *sha1, unsigned int mode,
+ unsigned dirty_submodule)
{
diff_addremove(&revs->diffopt, prefix[0], mode,
- sha1, ce->name);
+ sha1, ce->name, dirty_submodule);
}
static int get_stat_data(struct cache_entry *ce,
const unsigned char **sha1p,
unsigned int *modep,
- int cached, int match_missing)
+ int cached, int match_missing,
+ unsigned *dirty_submodule, struct diff_options *diffopt)
{
const unsigned char *sha1 = ce->sha1;
unsigned int mode = ce->ce_mode;
@@ -229,7 +255,8 @@ static int get_stat_data(struct cache_entry *ce,
}
return -1;
}
- changed = ce_match_stat(ce, &st, 0);
+ changed = match_stat_with_submodule(diffopt, ce, &st,
+ 0, dirty_submodule);
if (changed) {
mode = ce_mode_from_stat(ce, st.st_mode);
sha1 = null_sha1;
@@ -247,15 +274,17 @@ static void show_new_file(struct rev_info *revs,
{
const unsigned char *sha1;
unsigned int mode;
+ unsigned dirty_submodule = 0;
/*
* New file in the index: it might actually be different in
* the working copy.
*/
- if (get_stat_data(new, &sha1, &mode, cached, match_missing) < 0)
+ if (get_stat_data(new, &sha1, &mode, cached, match_missing,
+ &dirty_submodule, &revs->diffopt) < 0)
return;
- diff_index_show_file(revs, "+", new, sha1, mode);
+ diff_index_show_file(revs, "+", new, sha1, mode, dirty_submodule);
}
static int show_modified(struct rev_info *revs,
@@ -266,11 +295,13 @@ static int show_modified(struct rev_info *revs,
{
unsigned int mode, oldmode;
const unsigned char *sha1;
+ unsigned dirty_submodule = 0;
- if (get_stat_data(new, &sha1, &mode, cached, match_missing) < 0) {
+ if (get_stat_data(new, &sha1, &mode, cached, match_missing,
+ &dirty_submodule, &revs->diffopt) < 0) {
if (report_missing)
diff_index_show_file(revs, "-", old,
- old->sha1, old->ce_mode);
+ old->sha1, old->ce_mode, 0);
return -1;
}
@@ -300,12 +331,12 @@ static int show_modified(struct rev_info *revs,
}
oldmode = old->ce_mode;
- if (mode == oldmode && !hashcmp(sha1, old->sha1) &&
+ if (mode == oldmode && !hashcmp(sha1, old->sha1) && !dirty_submodule &&
!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))
return 0;
diff_change(&revs->diffopt, oldmode, mode,
- old->sha1, sha1, old->name);
+ old->sha1, sha1, old->name, 0, dirty_submodule);
return 0;
}
@@ -352,7 +383,7 @@ static void do_oneway_diff(struct unpack_trees_options *o,
* Something removed from the tree?
*/
if (!idx) {
- diff_index_show_file(revs, "-", tree, tree->sha1, tree->ce_mode);
+ diff_index_show_file(revs, "-", tree, tree->sha1, tree->ce_mode, 0);
return;
}
@@ -360,21 +391,6 @@ static void do_oneway_diff(struct unpack_trees_options *o,
show_modified(revs, tree, idx, 1, cached, match_missing);
}
-static inline void skip_same_name(struct cache_entry *ce, struct unpack_trees_options *o)
-{
- int len = ce_namelen(ce);
- const struct index_state *index = o->src_index;
-
- while (o->pos < index->cache_nr) {
- struct cache_entry *next = index->cache[o->pos];
- if (len != ce_namelen(next))
- break;
- if (memcmp(ce->name, next->name, len))
- break;
- o->pos++;
- }
-}
-
/*
* The unpack_trees() interface is designed for merging, so
* the different source entries are designed primarily for
@@ -396,9 +412,6 @@ static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
struct cache_entry *tree = src[1];
struct rev_info *revs = o->unpack_data;
- if (idx && ce_stage(idx))
- skip_same_name(idx, o);
-
/*
* Unpack-trees generates a DF/conflict entry if
* there was a directory in the index and a tree
@@ -444,6 +457,7 @@ int run_diff_index(struct rev_info *revs, int cached)
exit(128);
diff_set_mnemonic_prefix(&revs->diffopt, "c/", cached ? "i/" : "w/");
+ diffcore_fix_diff_index(&revs->diffopt);
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
return 0;
@@ -505,9 +519,12 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt)
int index_differs_from(const char *def, int diff_flags)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
init_revisions(&rev, NULL);
- setup_revisions(0, NULL, &rev, def);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = def;
+ setup_revisions(0, NULL, &rev, &opt);
DIFF_OPT_SET(&rev.diffopt, QUICK);
DIFF_OPT_SET(&rev.diffopt, EXIT_WITH_STATUS);
rev.diffopt.flags |= diff_flags;
diff --git a/diff.c b/diff.c
index 5d71314587..f5d93e9694 100644
--- a/diff.c
+++ b/diff.c
@@ -1615,7 +1615,7 @@ static void builtin_diff(const char *name_a,
const char *del = diff_get_color_opt(o, DIFF_FILE_OLD);
const char *add = diff_get_color_opt(o, DIFF_FILE_NEW);
show_submodule_summary(o->file, one ? one->path : two->path,
- one->sha1, two->sha1,
+ one->sha1, two->sha1, two->dirty_submodule,
del, add, reset);
return;
}
@@ -2029,9 +2029,14 @@ static int populate_from_stdin(struct diff_filespec *s)
static int diff_populate_gitlink(struct diff_filespec *s, int size_only)
{
int len;
- char *data = xmalloc(100);
+ char *data = xmalloc(100), *dirty = "";
+
+ /* Are we looking at the work tree? */
+ if (s->dirty_submodule)
+ dirty = "-dirty";
+
len = snprintf(data, 100,
- "Subproject commit %s\n", sha1_to_hex(s->sha1));
+ "Subproject commit %s%s\n", sha1_to_hex(s->sha1), dirty);
s->data = data;
s->size = len;
s->should_free = 1;
@@ -2623,6 +2628,12 @@ int diff_setup_done(struct diff_options *options)
*/
if (options->pickaxe)
DIFF_OPT_SET(options, RECURSIVE);
+ /*
+ * When patches are generated, submodules diffed against the work tree
+ * must be checked for dirtiness too so it can be shown in the output
+ */
+ if (options->output_format & DIFF_FORMAT_PATCH)
+ DIFF_OPT_SET(options, DIRTY_SUBMODULES);
if (options->detect_rename && options->rename_limit < 0)
options->rename_limit = diff_rename_limit_default;
@@ -2821,6 +2832,15 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_OPT_SET(options, FOLLOW_RENAMES);
else if (!strcmp(arg, "--color"))
DIFF_OPT_SET(options, COLOR_DIFF);
+ else if (!prefixcmp(arg, "--color=")) {
+ int value = git_config_colorbool(NULL, arg+8, -1);
+ if (value == 0)
+ DIFF_OPT_CLR(options, COLOR_DIFF);
+ else if (value > 0)
+ DIFF_OPT_SET(options, COLOR_DIFF);
+ else
+ return error("option `color' expects \"always\", \"auto\", or \"never\"");
+ }
else if (!strcmp(arg, "--no-color"))
DIFF_OPT_CLR(options, COLOR_DIFF);
else if (!strcmp(arg, "--color-words")) {
@@ -2888,6 +2908,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
;
else if (!prefixcmp(arg, "--output=")) {
options->file = fopen(arg + strlen("--output="), "w");
+ if (!options->file)
+ die_errno("Could not open '%s'", arg + strlen("--output="));
options->close_file = 1;
} else
return 0;
@@ -3070,7 +3092,8 @@ int diff_unmodified_pair(struct diff_filepair *p)
* dealing with a change.
*/
if (one->sha1_valid && two->sha1_valid &&
- !hashcmp(one->sha1, two->sha1))
+ !hashcmp(one->sha1, two->sha1) &&
+ !one->dirty_submodule && !two->dirty_submodule)
return 1; /* no change */
if (!one->sha1_valid && !two->sha1_valid)
return 1; /* both look at the same file on the filesystem. */
@@ -3205,6 +3228,8 @@ static void diff_resolve_rename_copy(void)
}
else if (hashcmp(p->one->sha1, p->two->sha1) ||
p->one->mode != p->two->mode ||
+ p->one->dirty_submodule ||
+ p->two->dirty_submodule ||
is_null_sha1(p->one->sha1))
p->status = DIFF_STATUS_MODIFIED;
else {
@@ -3515,6 +3540,29 @@ void diff_flush(struct diff_options *options)
separator++;
}
+ if (output_format & DIFF_FORMAT_NO_OUTPUT &&
+ DIFF_OPT_TST(options, EXIT_WITH_STATUS) &&
+ DIFF_OPT_TST(options, DIFF_FROM_CONTENTS)) {
+ /*
+ * run diff_flush_patch for the exit status. setting
+ * options->file to /dev/null should be safe, becaue we
+ * aren't supposed to produce any output anyway.
+ */
+ if (options->close_file)
+ fclose(options->file);
+ options->file = fopen("/dev/null", "w");
+ if (!options->file)
+ die_errno("Could not open /dev/null");
+ options->close_file = 1;
+ for (i = 0; i < q->nr; i++) {
+ struct diff_filepair *p = q->queue[i];
+ if (check_pair_status(p))
+ diff_flush_patch(p, options);
+ if (options->found_changes)
+ break;
+ }
+ }
+
if (output_format & DIFF_FORMAT_PATCH) {
if (separator) {
putc(options->line_termination, options->file);
@@ -3637,7 +3685,7 @@ static void diffcore_skip_stat_unmatch(struct diff_options *diffopt)
struct diff_filepair *p = q->queue[i];
/*
- * 1. Entries that come from stat info dirtyness
+ * 1. Entries that come from stat info dirtiness
* always have both sides (iow, not create/delete),
* one side of the object name is unknown, with
* the same mode and size. Keep the ones that
@@ -3673,6 +3721,23 @@ static void diffcore_skip_stat_unmatch(struct diff_options *diffopt)
*q = outq;
}
+static int diffnamecmp(const void *a_, const void *b_)
+{
+ const struct diff_filepair *a = *((const struct diff_filepair **)a_);
+ const struct diff_filepair *b = *((const struct diff_filepair **)b_);
+ const char *name_a, *name_b;
+
+ name_a = a->one ? a->one->path : a->two->path;
+ name_b = b->one ? b->one->path : b->two->path;
+ return strcmp(name_a, name_b);
+}
+
+void diffcore_fix_diff_index(struct diff_options *options)
+{
+ struct diff_queue_struct *q = &diff_queued_diff;
+ qsort(q->queue, q->nr, sizeof(q->queue[0]), diffnamecmp);
+}
+
void diffcore_std(struct diff_options *options)
{
if (options->skip_stat_unmatch)
@@ -3714,7 +3779,7 @@ int diff_result_code(struct diff_options *opt, int status)
void diff_addremove(struct diff_options *options,
int addremove, unsigned mode,
const unsigned char *sha1,
- const char *concatpath)
+ const char *concatpath, unsigned dirty_submodule)
{
struct diff_filespec *one, *two;
@@ -3746,8 +3811,10 @@ void diff_addremove(struct diff_options *options,
if (addremove != '+')
fill_filespec(one, sha1, mode);
- if (addremove != '-')
+ if (addremove != '-') {
fill_filespec(two, sha1, mode);
+ two->dirty_submodule = dirty_submodule;
+ }
diff_queue(&diff_queued_diff, one, two);
if (!DIFF_OPT_TST(options, DIFF_FROM_CONTENTS))
@@ -3758,7 +3825,8 @@ void diff_change(struct diff_options *options,
unsigned old_mode, unsigned new_mode,
const unsigned char *old_sha1,
const unsigned char *new_sha1,
- const char *concatpath)
+ const char *concatpath,
+ unsigned old_dirty_submodule, unsigned new_dirty_submodule)
{
struct diff_filespec *one, *two;
@@ -3771,6 +3839,8 @@ void diff_change(struct diff_options *options,
const unsigned char *tmp_c;
tmp = old_mode; old_mode = new_mode; new_mode = tmp;
tmp_c = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_c;
+ tmp = old_dirty_submodule; old_dirty_submodule = new_dirty_submodule;
+ new_dirty_submodule = tmp;
}
if (options->prefix &&
@@ -3781,6 +3851,8 @@ void diff_change(struct diff_options *options,
two = alloc_filespec(concatpath);
fill_filespec(one, old_sha1, old_mode);
fill_filespec(two, new_sha1, new_mode);
+ one->dirty_submodule = old_dirty_submodule;
+ two->dirty_submodule = new_dirty_submodule;
diff_queue(&diff_queued_diff, one, two);
if (!DIFF_OPT_TST(options, DIFF_FROM_CONTENTS))
diff --git a/diff.h b/diff.h
index 6f6d0ed01d..6a71013dc6 100644
--- a/diff.h
+++ b/diff.h
@@ -14,12 +14,13 @@ typedef void (*change_fn_t)(struct diff_options *options,
unsigned old_mode, unsigned new_mode,
const unsigned char *old_sha1,
const unsigned char *new_sha1,
- const char *fullpath);
+ const char *fullpath,
+ unsigned old_dirty_submodule, unsigned new_dirty_submodule);
typedef void (*add_remove_fn_t)(struct diff_options *options,
int addremove, unsigned mode,
const unsigned char *sha1,
- const char *fullpath);
+ const char *fullpath, unsigned dirty_submodule);
typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
struct diff_options *options, void *data);
@@ -68,6 +69,8 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
#define DIFF_OPT_ALLOW_TEXTCONV (1 << 21)
#define DIFF_OPT_DIFF_FROM_CONTENTS (1 << 22)
#define DIFF_OPT_SUBMODULE_LOG (1 << 23)
+#define DIFF_OPT_DIRTY_SUBMODULES (1 << 24)
+#define DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES (1 << 25)
#define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
#define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag)
@@ -177,13 +180,14 @@ extern void diff_addremove(struct diff_options *,
int addremove,
unsigned mode,
const unsigned char *sha1,
- const char *fullpath);
+ const char *fullpath, unsigned dirty_submodule);
extern void diff_change(struct diff_options *,
unsigned mode1, unsigned mode2,
const unsigned char *sha1,
const unsigned char *sha2,
- const char *fullpath);
+ const char *fullpath,
+ unsigned dirty_submodule1, unsigned dirty_submodule2);
extern void diff_unmerge(struct diff_options *,
const char *path,
@@ -208,6 +212,7 @@ extern int diff_setup_done(struct diff_options *);
#define DIFF_PICKAXE_REGEX 2
extern void diffcore_std(struct diff_options *);
+extern void diffcore_fix_diff_index(struct diff_options *);
#define COMMON_DIFF_OPTIONS_HELP \
"\ncommon diff options:\n" \
diff --git a/diffcore.h b/diffcore.h
index 5b634585e8..fcd00bf27a 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -42,6 +42,9 @@ struct diff_filespec {
#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
+ unsigned dirty_submodule : 2; /* For submodules: its work tree is dirty */
+#define DIRTY_SUBMODULE_UNTRACKED 1
+#define DIRTY_SUBMODULE_MODIFIED 2
struct userdiff_driver *driver;
/* data should be considered "binary"; -1 means "don't know yet" */
diff --git a/dir.c b/dir.c
index 67c3af6a1a..cb83332a26 100644
--- a/dir.c
+++ b/dir.c
@@ -594,13 +594,29 @@ static int simplify_away(const char *path, int pathlen, const struct path_simpli
return 0;
}
-static int in_pathspec(const char *path, int len, const struct path_simplify *simplify)
+/*
+ * This function tells us whether an excluded path matches a
+ * list of "interesting" pathspecs. That is, whether a path matched
+ * by any of the pathspecs could possibly be ignored by excluding
+ * the specified path. This can happen if:
+ *
+ * 1. the path is mentioned explicitly in the pathspec
+ *
+ * 2. the path is a directory prefix of some element in the
+ * pathspec
+ */
+static int exclude_matches_pathspec(const char *path, int len,
+ const struct path_simplify *simplify)
{
if (simplify) {
for (; simplify->path; simplify++) {
if (len == simplify->len
&& !memcmp(path, simplify->path, len))
return 1;
+ if (len < simplify->len
+ && simplify->path[len] == '/'
+ && !memcmp(path, simplify->path, len))
+ return 1;
}
}
return 0;
@@ -678,7 +694,7 @@ static enum path_treatment treat_one_path(struct dir_struct *dir,
{
int exclude = excluded(dir, path, &dtype);
if (exclude && (dir->flags & DIR_COLLECT_IGNORED)
- && in_pathspec(path, *len, simplify))
+ && exclude_matches_pathspec(path, *len, simplify))
dir_add_ignored(dir, path, *len);
/*
@@ -1044,7 +1060,7 @@ int remove_path(const char *name)
slash = dirs + (slash - name);
do {
*slash = '\0';
- } while (rmdir(dirs) && (slash = strrchr(dirs, '/')));
+ } while (rmdir(dirs) == 0 && (slash = strrchr(dirs, '/')));
free(dirs);
}
return 0;
diff --git a/environment.c b/environment.c
index 739ec27040..876c5e5341 100644
--- a/environment.c
+++ b/environment.c
@@ -63,6 +63,23 @@ static char *work_tree;
static const char *git_dir;
static char *git_object_dir, *git_index_file, *git_refs_dir, *git_graft_file;
+/*
+ * Repository-local GIT_* environment variables
+ * Remember to update local_repo_env_size in cache.h when
+ * the size of the list changes
+ */
+const char * const local_repo_env[LOCAL_REPO_ENV_SIZE + 1] = {
+ ALTERNATE_DB_ENVIRONMENT,
+ CONFIG_ENVIRONMENT,
+ DB_ENVIRONMENT,
+ GIT_DIR_ENVIRONMENT,
+ GIT_WORK_TREE_ENVIRONMENT,
+ GRAFT_ENVIRONMENT,
+ INDEX_ENVIRONMENT,
+ NO_REPLACE_OBJECTS_ENVIRONMENT,
+ NULL
+};
+
static void setup_git_env(void)
{
git_dir = getenv(GIT_DIR_ENVIRONMENT);
diff --git a/exec_cmd.c b/exec_cmd.c
index 408e4e55e1..b2c07c70ce 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -28,7 +28,7 @@ const char *system_path(const char *path)
!(prefix = strip_path_suffix(argv0_path, BINDIR)) &&
!(prefix = strip_path_suffix(argv0_path, "git"))) {
prefix = PREFIX;
- fprintf(stderr, "RUNTIME_PREFIX requested, "
+ trace_printf("RUNTIME_PREFIX requested, "
"but prefix computation failed. "
"Using static fallback '%s'.\n", prefix);
}
diff --git a/fast-import.c b/fast-import.c
index 901784fe91..309f2c58a2 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -164,12 +164,11 @@ Format of STDIN stream:
struct object_entry
{
+ struct pack_idx_entry idx;
struct object_entry *next;
- uint32_t offset;
uint32_t type : TYPE_BITS,
pack_id : PACK_ID_BITS,
depth : DEPTH_BITS;
- unsigned char sha1[20];
};
struct object_entry_pool
@@ -192,7 +191,7 @@ struct mark_set
struct last_object
{
struct strbuf data;
- uint32_t offset;
+ off_t offset;
unsigned int depth;
unsigned no_swap : 1;
};
@@ -280,7 +279,8 @@ struct recent_command
/* Configured limits on output */
static unsigned long max_depth = 10;
-static off_t max_packsize = (1LL << 32) - 1;
+static off_t max_packsize;
+static uintmax_t big_file_threshold = 512 * 1024 * 1024;
static int force_update;
static int pack_compression_level = Z_DEFAULT_COMPRESSION;
static int pack_compression_seen;
@@ -312,9 +312,10 @@ static struct atom_str **atom_table;
/* The .pack file being generated */
static unsigned int pack_id;
+static struct sha1file *pack_file;
static struct packed_git *pack_data;
static struct packed_git **all_packs;
-static unsigned long pack_size;
+static off_t pack_size;
/* Table of objects we've written. */
static unsigned int object_entry_alloc = 5000;
@@ -520,7 +521,7 @@ static struct object_entry *new_object(unsigned char *sha1)
alloc_objects(object_entry_alloc);
e = blocks->next_free++;
- hashcpy(e->sha1, sha1);
+ hashcpy(e->idx.sha1, sha1);
return e;
}
@@ -529,7 +530,7 @@ static struct object_entry *find_object(unsigned char *sha1)
unsigned int h = sha1[0] << 8 | sha1[1];
struct object_entry *e;
for (e = object_table[h]; e; e = e->next)
- if (!hashcmp(sha1, e->sha1))
+ if (!hashcmp(sha1, e->idx.sha1))
return e;
return NULL;
}
@@ -541,7 +542,7 @@ static struct object_entry *insert_object(unsigned char *sha1)
struct object_entry *p = NULL;
while (e) {
- if (!hashcmp(sha1, e->sha1))
+ if (!hashcmp(sha1, e->idx.sha1))
return e;
p = e;
e = e->next;
@@ -549,7 +550,7 @@ static struct object_entry *insert_object(unsigned char *sha1)
e = new_object(sha1);
e->next = NULL;
- e->offset = 0;
+ e->idx.offset = 0;
if (p)
p->next = e;
else
@@ -838,11 +839,12 @@ static void start_packfile(void)
p = xcalloc(1, sizeof(*p) + strlen(tmpfile) + 2);
strcpy(p->pack_name, tmpfile);
p->pack_fd = pack_fd;
+ pack_file = sha1fd(pack_fd, p->pack_name);
hdr.hdr_signature = htonl(PACK_SIGNATURE);
hdr.hdr_version = htonl(2);
hdr.hdr_entries = 0;
- write_or_die(p->pack_fd, &hdr, sizeof(hdr));
+ sha1write(pack_file, &hdr, sizeof(hdr));
pack_data = p;
pack_size = sizeof(hdr);
@@ -852,67 +854,30 @@ static void start_packfile(void)
all_packs[pack_id] = p;
}
-static int oecmp (const void *a_, const void *b_)
-{
- struct object_entry *a = *((struct object_entry**)a_);
- struct object_entry *b = *((struct object_entry**)b_);
- return hashcmp(a->sha1, b->sha1);
-}
-
-static char *create_index(void)
+static const char *create_index(void)
{
- static char tmpfile[PATH_MAX];
- git_SHA_CTX ctx;
- struct sha1file *f;
- struct object_entry **idx, **c, **last, *e;
+ const char *tmpfile;
+ struct pack_idx_entry **idx, **c, **last;
+ struct object_entry *e;
struct object_entry_pool *o;
- uint32_t array[256];
- int i, idx_fd;
- /* Build the sorted table of object IDs. */
- idx = xmalloc(object_count * sizeof(struct object_entry*));
+ /* Build the table of object IDs. */
+ idx = xmalloc(object_count * sizeof(*idx));
c = idx;
for (o = blocks; o; o = o->next_pool)
for (e = o->next_free; e-- != o->entries;)
if (pack_id == e->pack_id)
- *c++ = e;
+ *c++ = &e->idx;
last = idx + object_count;
if (c != last)
die("internal consistency error creating the index");
- qsort(idx, object_count, sizeof(struct object_entry*), oecmp);
- /* Generate the fan-out array. */
- c = idx;
- for (i = 0; i < 256; i++) {
- struct object_entry **next = c;
- while (next < last) {
- if ((*next)->sha1[0] != i)
- break;
- next++;
- }
- array[i] = htonl(next - idx);
- c = next;
- }
-
- idx_fd = odb_mkstemp(tmpfile, sizeof(tmpfile),
- "pack/tmp_idx_XXXXXX");
- f = sha1fd(idx_fd, tmpfile);
- sha1write(f, array, 256 * sizeof(int));
- git_SHA1_Init(&ctx);
- for (c = idx; c != last; c++) {
- uint32_t offset = htonl((*c)->offset);
- sha1write(f, &offset, 4);
- sha1write(f, (*c)->sha1, sizeof((*c)->sha1));
- git_SHA1_Update(&ctx, (*c)->sha1, 20);
- }
- sha1write(f, pack_data->sha1, sizeof(pack_data->sha1));
- sha1close(f, NULL, CSUM_FSYNC);
+ tmpfile = write_idx_file(NULL, idx, object_count, pack_data->sha1);
free(idx);
- git_SHA1_Final(pack_data->sha1, &ctx);
return tmpfile;
}
-static char *keep_pack(char *curr_index_name)
+static char *keep_pack(const char *curr_index_name)
{
static char name[PATH_MAX];
static const char *keep_msg = "fast-import";
@@ -934,6 +899,7 @@ static char *keep_pack(char *curr_index_name)
get_object_directory(), sha1_to_hex(pack_data->sha1));
if (move_temp_to_file(curr_index_name, name))
die("cannot store index file");
+ free((void *)curr_index_name);
return name;
}
@@ -956,15 +922,17 @@ static void end_packfile(void)
clear_delta_base_cache();
if (object_count) {
+ unsigned char cur_pack_sha1[20];
char *idx_name;
int i;
struct branch *b;
struct tag *t;
close_pack_windows(pack_data);
+ sha1close(pack_file, cur_pack_sha1, 0);
fixup_pack_header_footer(pack_data->pack_fd, pack_data->sha1,
pack_data->pack_name, object_count,
- NULL, 0);
+ cur_pack_sha1, pack_size);
close(pack_data->pack_fd);
idx_name = keep_pack(create_index());
@@ -1012,29 +980,6 @@ static void cycle_packfile(void)
start_packfile();
}
-static size_t encode_header(
- enum object_type type,
- size_t size,
- unsigned char *hdr)
-{
- int n = 1;
- unsigned char c;
-
- if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)
- die("bad type %d", type);
-
- c = (type << 4) | (size & 15);
- size >>= 4;
- while (size) {
- *hdr++ = c | 0x80;
- c = size & 0x7f;
- size >>= 7;
- n++;
- }
- *hdr = c;
- return n;
-}
-
static int store_object(
enum object_type type,
struct strbuf *dat,
@@ -1062,25 +1007,21 @@ static int store_object(
e = insert_object(sha1);
if (mark)
insert_mark(mark, e);
- if (e->offset) {
+ if (e->idx.offset) {
duplicate_count_by_type[type]++;
return 1;
} else if (find_sha1_pack(sha1, packed_git)) {
e->type = type;
e->pack_id = MAX_PACK_ID;
- e->offset = 1; /* just not zero! */
+ e->idx.offset = 1; /* just not zero! */
duplicate_count_by_type[type]++;
return 1;
}
- if (last && last->data.buf && last->depth < max_depth) {
+ if (last && last->data.buf && last->depth < max_depth && dat->len > 20) {
delta = diff_delta(last->data.buf, last->data.len,
dat->buf, dat->len,
- &deltalen, 0);
- if (delta && deltalen >= dat->len) {
- free(delta);
- delta = NULL;
- }
+ &deltalen, dat->len - 20);
} else
delta = NULL;
@@ -1100,7 +1041,7 @@ static int store_object(
deflateEnd(&s);
/* Determine if we should auto-checkpoint. */
- if ((pack_size + 60 + s.total_out) > max_packsize
+ if ((max_packsize && (pack_size + 60 + s.total_out) > max_packsize)
|| (pack_size + 60 + s.total_out) < pack_size) {
/* This new object needs to *not* have the current pack_id. */
@@ -1126,36 +1067,40 @@ static int store_object(
e->type = type;
e->pack_id = pack_id;
- e->offset = pack_size;
+ e->idx.offset = pack_size;
object_count++;
object_count_by_type[type]++;
+ crc32_begin(pack_file);
+
if (delta) {
- unsigned long ofs = e->offset - last->offset;
+ off_t ofs = e->idx.offset - last->offset;
unsigned pos = sizeof(hdr) - 1;
delta_count_by_type[type]++;
e->depth = last->depth + 1;
- hdrlen = encode_header(OBJ_OFS_DELTA, deltalen, hdr);
- write_or_die(pack_data->pack_fd, hdr, hdrlen);
+ hdrlen = encode_in_pack_object_header(OBJ_OFS_DELTA, deltalen, hdr);
+ sha1write(pack_file, hdr, hdrlen);
pack_size += hdrlen;
hdr[pos] = ofs & 127;
while (ofs >>= 7)
hdr[--pos] = 128 | (--ofs & 127);
- write_or_die(pack_data->pack_fd, hdr + pos, sizeof(hdr) - pos);
+ sha1write(pack_file, hdr + pos, sizeof(hdr) - pos);
pack_size += sizeof(hdr) - pos;
} else {
e->depth = 0;
- hdrlen = encode_header(type, dat->len, hdr);
- write_or_die(pack_data->pack_fd, hdr, hdrlen);
+ hdrlen = encode_in_pack_object_header(type, dat->len, hdr);
+ sha1write(pack_file, hdr, hdrlen);
pack_size += hdrlen;
}
- write_or_die(pack_data->pack_fd, out, s.total_out);
+ sha1write(pack_file, out, s.total_out);
pack_size += s.total_out;
+ e->idx.crc32 = crc32_end(pack_file);
+
free(out);
free(delta);
if (last) {
@@ -1164,12 +1109,137 @@ static int store_object(
} else {
strbuf_swap(&last->data, dat);
}
- last->offset = e->offset;
+ last->offset = e->idx.offset;
last->depth = e->depth;
}
return 0;
}
+static void truncate_pack(off_t to, git_SHA_CTX *ctx)
+{
+ if (ftruncate(pack_data->pack_fd, to)
+ || lseek(pack_data->pack_fd, to, SEEK_SET) != to)
+ die_errno("cannot truncate pack to skip duplicate");
+ pack_size = to;
+
+ /* yes this is a layering violation */
+ pack_file->total = to;
+ pack_file->offset = 0;
+ pack_file->ctx = *ctx;
+}
+
+static void stream_blob(uintmax_t len, unsigned char *sha1out, uintmax_t mark)
+{
+ size_t in_sz = 64 * 1024, out_sz = 64 * 1024;
+ unsigned char *in_buf = xmalloc(in_sz);
+ unsigned char *out_buf = xmalloc(out_sz);
+ struct object_entry *e;
+ unsigned char sha1[20];
+ unsigned long hdrlen;
+ off_t offset;
+ git_SHA_CTX c;
+ git_SHA_CTX pack_file_ctx;
+ z_stream s;
+ int status = Z_OK;
+
+ /* Determine if we should auto-checkpoint. */
+ if ((max_packsize && (pack_size + 60 + len) > max_packsize)
+ || (pack_size + 60 + len) < pack_size)
+ cycle_packfile();
+
+ offset = pack_size;
+
+ /* preserve the pack_file SHA1 ctx in case we have to truncate later */
+ sha1flush(pack_file);
+ pack_file_ctx = pack_file->ctx;
+
+ hdrlen = snprintf((char *)out_buf, out_sz, "blob %" PRIuMAX, len) + 1;
+ if (out_sz <= hdrlen)
+ die("impossibly large object header");
+
+ git_SHA1_Init(&c);
+ git_SHA1_Update(&c, out_buf, hdrlen);
+
+ crc32_begin(pack_file);
+
+ memset(&s, 0, sizeof(s));
+ deflateInit(&s, pack_compression_level);
+
+ hdrlen = encode_in_pack_object_header(OBJ_BLOB, len, out_buf);
+ if (out_sz <= hdrlen)
+ die("impossibly large object header");
+
+ s.next_out = out_buf + hdrlen;
+ s.avail_out = out_sz - hdrlen;
+
+ while (status != Z_STREAM_END) {
+ if (0 < len && !s.avail_in) {
+ size_t cnt = in_sz < len ? in_sz : (size_t)len;
+ size_t n = fread(in_buf, 1, cnt, stdin);
+ if (!n && feof(stdin))
+ die("EOF in data (%" PRIuMAX " bytes remaining)", len);
+
+ git_SHA1_Update(&c, in_buf, n);
+ s.next_in = in_buf;
+ s.avail_in = n;
+ len -= n;
+ }
+
+ status = deflate(&s, len ? 0 : Z_FINISH);
+
+ if (!s.avail_out || status == Z_STREAM_END) {
+ size_t n = s.next_out - out_buf;
+ sha1write(pack_file, out_buf, n);
+ pack_size += n;
+ s.next_out = out_buf;
+ s.avail_out = out_sz;
+ }
+
+ switch (status) {
+ case Z_OK:
+ case Z_BUF_ERROR:
+ case Z_STREAM_END:
+ continue;
+ default:
+ die("unexpected deflate failure: %d", status);
+ }
+ }
+ deflateEnd(&s);
+ git_SHA1_Final(sha1, &c);
+
+ if (sha1out)
+ hashcpy(sha1out, sha1);
+
+ e = insert_object(sha1);
+
+ if (mark)
+ insert_mark(mark, e);
+
+ if (e->idx.offset) {
+ duplicate_count_by_type[OBJ_BLOB]++;
+ truncate_pack(offset, &pack_file_ctx);
+
+ } else if (find_sha1_pack(sha1, packed_git)) {
+ e->type = OBJ_BLOB;
+ e->pack_id = MAX_PACK_ID;
+ e->idx.offset = 1; /* just not zero! */
+ duplicate_count_by_type[OBJ_BLOB]++;
+ truncate_pack(offset, &pack_file_ctx);
+
+ } else {
+ e->depth = 0;
+ e->type = OBJ_BLOB;
+ e->pack_id = pack_id;
+ e->idx.offset = offset;
+ e->idx.crc32 = crc32_end(pack_file);
+ object_count++;
+ object_count_by_type[OBJ_BLOB]++;
+ }
+
+ free(in_buf);
+ free(out_buf);
+}
+
/* 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
@@ -1204,6 +1274,7 @@ static void *gfi_unpack_entry(
* the newly written data.
*/
close_pack_windows(p);
+ sha1flush(pack_file);
/* We have to offer 20 bytes additional on the end of
* the packfile as the core unpacker code assumes the
@@ -1213,7 +1284,7 @@ static void *gfi_unpack_entry(
*/
p->pack_size = pack_size + 20;
}
- return unpack_entry(p, oe->offset, &type, sizep);
+ return unpack_entry(p, oe->idx.offset, &type, sizep);
}
static const char *get_mode(const char *str, uint16_t *modep)
@@ -1344,7 +1415,7 @@ static void store_tree(struct tree_entry *root)
if (S_ISDIR(root->versions[0].mode) && le && le->pack_id == pack_id) {
mktree(t, 0, &old_tree);
lo.data = old_tree;
- lo.offset = le->offset;
+ lo.offset = le->idx.offset;
lo.depth = t->delta_depth;
}
@@ -1602,7 +1673,7 @@ static void dump_marks_helper(FILE *f,
for (k = 0; k < 1024; k++) {
if (m->data.marked[k])
fprintf(f, ":%" PRIuMAX " %s\n", base + k,
- sha1_to_hex(m->data.marked[k]->sha1));
+ sha1_to_hex(m->data.marked[k]->idx.sha1));
}
}
}
@@ -1685,7 +1756,7 @@ static void read_marks(void)
e = insert_object(sha1);
e->type = type;
e->pack_id = MAX_PACK_ID;
- e->offset = 1; /* just not zero! */
+ e->idx.offset = 1; /* just not zero! */
}
insert_mark(mark, e);
}
@@ -1757,7 +1828,7 @@ static void parse_mark(void)
next_mark = 0;
}
-static void parse_data(struct strbuf *sb)
+static int parse_data(struct strbuf *sb, uintmax_t limit, uintmax_t *len_res)
{
strbuf_reset(sb);
@@ -1781,9 +1852,15 @@ static void parse_data(struct strbuf *sb)
free(term);
}
else {
- size_t n = 0, length;
+ uintmax_t len = strtoumax(command_buf.buf + 5, NULL, 10);
+ size_t n = 0, length = (size_t)len;
- length = strtoul(command_buf.buf + 5, NULL, 10);
+ if (limit && limit < len) {
+ *len_res = len;
+ return 0;
+ }
+ if (length < len)
+ die("data is too large to use in this context");
while (n < length) {
size_t s = strbuf_fread(sb, length - n, stdin);
@@ -1795,6 +1872,7 @@ static void parse_data(struct strbuf *sb)
}
skip_optional_lf();
+ return 1;
}
static int validate_raw_date(const char *src, char *result, int maxlen)
@@ -1859,14 +1937,32 @@ static char *parse_ident(const char *buf)
return ident;
}
-static void parse_new_blob(void)
+static void parse_and_store_blob(
+ struct last_object *last,
+ unsigned char *sha1out,
+ uintmax_t mark)
{
static struct strbuf buf = STRBUF_INIT;
+ uintmax_t len;
+ if (parse_data(&buf, big_file_threshold, &len))
+ store_object(OBJ_BLOB, &buf, last, sha1out, mark);
+ else {
+ if (last) {
+ strbuf_release(&last->data);
+ last->offset = 0;
+ last->depth = 0;
+ }
+ stream_blob(len, sha1out, mark);
+ skip_optional_lf();
+ }
+}
+
+static void parse_new_blob(void)
+{
read_next_command();
parse_mark();
- parse_data(&buf);
- store_object(OBJ_BLOB, &buf, &last_blob, NULL, next_mark);
+ parse_and_store_blob(&last_blob, NULL, next_mark);
}
static void unload_one_branch(void)
@@ -2045,7 +2141,7 @@ static void file_change_m(struct branch *b)
if (*p == ':') {
char *x;
oe = find_mark(strtoumax(p + 1, &x, 10));
- hashcpy(sha1, oe->sha1);
+ hashcpy(sha1, oe->idx.sha1);
p = x;
} else if (!prefixcmp(p, "inline")) {
inline_data = 1;
@@ -2080,15 +2176,12 @@ static void file_change_m(struct branch *b)
* another repository.
*/
} else if (inline_data) {
- static struct strbuf buf = STRBUF_INIT;
-
if (p != uq.buf) {
strbuf_addstr(&uq, p);
p = uq.buf;
}
read_next_command();
- parse_data(&buf);
- store_object(OBJ_BLOB, &buf, &last_blob, sha1, 0);
+ parse_and_store_blob(&last_blob, sha1, 0);
} else if (oe) {
if (oe->type != OBJ_BLOB)
die("Not a blob (actually a %s): %s",
@@ -2181,7 +2274,7 @@ static void note_change_n(struct branch *b, unsigned char old_fanout)
if (*p == ':') {
char *x;
oe = find_mark(strtoumax(p + 1, &x, 10));
- hashcpy(sha1, oe->sha1);
+ hashcpy(sha1, oe->idx.sha1);
p = x;
} else if (!prefixcmp(p, "inline")) {
inline_data = 1;
@@ -2204,7 +2297,7 @@ static void note_change_n(struct branch *b, unsigned char old_fanout)
struct object_entry *commit_oe = find_mark(commit_mark);
if (commit_oe->type != OBJ_COMMIT)
die("Mark :%" PRIuMAX " not a commit", commit_mark);
- hashcpy(commit_sha1, commit_oe->sha1);
+ hashcpy(commit_sha1, commit_oe->idx.sha1);
} else if (!get_sha1(p, commit_sha1)) {
unsigned long size;
char *buf = read_object_with_reference(commit_sha1,
@@ -2216,15 +2309,12 @@ static void note_change_n(struct branch *b, unsigned char old_fanout)
die("Invalid ref name or SHA1 expression: %s", p);
if (inline_data) {
- static struct strbuf buf = STRBUF_INIT;
-
if (p != uq.buf) {
strbuf_addstr(&uq, p);
p = uq.buf;
}
read_next_command();
- parse_data(&buf);
- store_object(OBJ_BLOB, &buf, &last_blob, sha1, 0);
+ parse_and_store_blob(&last_blob, sha1, 0);
} else if (oe) {
if (oe->type != OBJ_BLOB)
die("Not a blob (actually a %s): %s",
@@ -2314,7 +2404,7 @@ static int parse_from(struct branch *b)
struct object_entry *oe = find_mark(idnum);
if (oe->type != OBJ_COMMIT)
die("Mark :%" PRIuMAX " not a commit", idnum);
- hashcpy(b->sha1, oe->sha1);
+ hashcpy(b->sha1, oe->idx.sha1);
if (oe->pack_id != MAX_PACK_ID) {
unsigned long size;
char *buf = gfi_unpack_entry(oe, &size);
@@ -2349,7 +2439,7 @@ static struct hash_list *parse_merge(unsigned int *count)
struct object_entry *oe = find_mark(idnum);
if (oe->type != OBJ_COMMIT)
die("Mark :%" PRIuMAX " not a commit", idnum);
- hashcpy(n->sha1, oe->sha1);
+ hashcpy(n->sha1, oe->idx.sha1);
} else if (!get_sha1(from, n->sha1)) {
unsigned long size;
char *buf = read_object_with_reference(n->sha1,
@@ -2401,7 +2491,7 @@ static void parse_new_commit(void)
}
if (!committer)
die("Expected committer but didn't get one");
- parse_data(&msg);
+ parse_data(&msg, 0, NULL);
read_next_command();
parse_from(b);
merge_list = parse_merge(&merge_count);
@@ -2507,7 +2597,7 @@ static void parse_new_tag(void)
from_mark = strtoumax(from + 1, NULL, 10);
oe = find_mark(from_mark);
type = oe->type;
- hashcpy(sha1, oe->sha1);
+ hashcpy(sha1, oe->idx.sha1);
} else if (!get_sha1(from, sha1)) {
unsigned long size;
char *buf;
@@ -2528,7 +2618,7 @@ static void parse_new_tag(void)
tagger = NULL;
/* tag payload/message */
- parse_data(&msg);
+ parse_data(&msg, 0, NULL);
/* build the tag object */
strbuf_reset(&new_data);
@@ -2632,11 +2722,6 @@ static void option_date_format(const char *fmt)
die("unknown --date-format argument %s", fmt);
}
-static void option_max_pack_size(const char *packsize)
-{
- max_packsize = strtoumax(packsize, NULL, 0) * 1024 * 1024;
-}
-
static void option_depth(const char *depth)
{
max_depth = strtoul(depth, NULL, 0);
@@ -2666,7 +2751,22 @@ static void option_export_pack_edges(const char *edges)
static int parse_one_option(const char *option)
{
if (!prefixcmp(option, "max-pack-size=")) {
- option_max_pack_size(option + 14);
+ unsigned long v;
+ if (!git_parse_ulong(option + 14, &v))
+ return 0;
+ if (v < 8192) {
+ warning("max-pack-size is now in bytes, assuming --max-pack-size=%lum", v);
+ v *= 1024 * 1024;
+ } else if (v < 1024 * 1024) {
+ warning("minimum max-pack-size is 1 MiB");
+ v = 1024 * 1024;
+ }
+ max_packsize = v;
+ } else if (!prefixcmp(option, "big-file-threshold=")) {
+ unsigned long v;
+ if (!git_parse_ulong(option + 19, &v))
+ return 0;
+ big_file_threshold = v;
} else if (!prefixcmp(option, "depth=")) {
option_depth(option + 6);
} else if (!prefixcmp(option, "active-branches=")) {
@@ -2749,11 +2849,26 @@ static int git_pack_config(const char *k, const char *v, void *cb)
pack_compression_seen = 1;
return 0;
}
+ if (!strcmp(k, "pack.indexversion")) {
+ pack_idx_default_version = git_config_int(k, v);
+ if (pack_idx_default_version > 2)
+ die("bad pack.indexversion=%"PRIu32,
+ pack_idx_default_version);
+ return 0;
+ }
+ if (!strcmp(k, "pack.packsizelimit")) {
+ max_packsize = git_config_ulong(k, v);
+ return 0;
+ }
+ if (!strcmp(k, "core.bigfilethreshold")) {
+ long n = git_config_int(k, v);
+ big_file_threshold = 0 < n ? n : 0;
+ }
return git_default_config(k, v, cb);
}
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]";
+"git fast-import [--date-format=f] [--max-pack-size=n] [--big-file-threshold=n] [--depth=n] [--active-branches=n] [--export-marks=marks.file]";
static void parse_argv(void)
{
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index cd43c34912..21f1330a5b 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -957,6 +957,28 @@ sub coalesce_overlapping_hunks {
return @out;
}
+sub reassemble_patch {
+ my $head = shift;
+ my @patch;
+
+ # Include everything in the header except the beginning of the diff.
+ push @patch, (grep { !/^[-+]{3}/ } @$head);
+
+ # Then include any headers from the hunk lines, which must
+ # come before any actual hunk.
+ while (@_ && $_[0] !~ /^@/) {
+ push @patch, shift;
+ }
+
+ # Then begin the diff.
+ push @patch, grep { /^[-+]{3}/ } @$head;
+
+ # And then the actual hunks.
+ push @patch, @_;
+
+ return @patch;
+}
+
sub color_diff {
return map {
colored((/^@/ ? $fraginfo_color :
@@ -1453,7 +1475,7 @@ sub patch_update_file {
if (@result) {
my $fh;
- my @patch = (@{$head->{TEXT}}, @result);
+ my @patch = reassemble_patch($head->{TEXT}, @result);
my $apply_routine = $patch_mode_flavour{APPLY};
&$apply_routine(@patch);
refresh();
diff --git a/git-am.sh b/git-am.sh
index 7644474bca..1056075545 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -15,6 +15,8 @@ q,quiet be quiet
s,signoff add a Signed-off-by line to the commit message
u,utf8 recode into utf8 (default)
k,keep pass -k flag to git-mailinfo
+keep-cr pass --keep-cr flag to git-mailsplit for mbox format
+no-keep-cr do not pass --keep-cr flag to git-mailsplit independent of am.keepcr
c,scissors strip everything before a scissors line
whitespace= pass it through git-apply
ignore-space-change pass it through git-apply
@@ -25,7 +27,8 @@ p= pass it through git-apply
patch-format= format the patch(es) are in
reject pass it through git-apply
resolvemsg= override error message when patch failure occurs
-r,resolved to be used after a patch failure
+continue continue applying patches after resolving a conflict
+r,resolved synonyms for --continue
skip skip the current patch
abort restore the original branch and abort the patching operation.
committer-date-is-author-date lie about committer date
@@ -205,7 +208,8 @@ check_patch_format () {
# discarding the indented remainder of folded lines,
# and see if it looks like that they all begin with the
# header field names...
- sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" |
+ tr -d '\015' <"$1" |
+ sed -n -e '/^$/q' -e '/^[ ]/d' -e p |
sane_egrep -v '^[!-9;-~]+:' >/dev/null ||
patch_format=mbox
fi
@@ -215,12 +219,12 @@ check_patch_format () {
split_patches () {
case "$patch_format" in
mbox)
- case "$rebasing" in
- '')
- keep_cr= ;;
- ?*)
- keep_cr=--keep-cr ;;
- esac
+ if test -n "$rebasing" || test t = "$keepcr"
+ then
+ keep_cr=--keep-cr
+ else
+ keep_cr=
+ fi
git mailsplit -d"$prec" -o"$dotest" -b $keep_cr -- "$@" > "$dotest/last" ||
clean_abort
;;
@@ -289,13 +293,18 @@ split_patches () {
prec=4
dotest="$GIT_DIR/rebase-apply"
-sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=
+sign= utf8=t keep= keepcr= skip= interactive= resolved= rebasing= abort=
resolvemsg= resume= scissors= no_inbody_headers=
git_apply_opt=
committer_date_is_author_date=
ignore_date=
allow_rerere_autoupdate=
+if test "$(git config --bool --get am.keepcr)" = true
+then
+ keepcr=t
+fi
+
while test $# != 0
do
case "$1" in
@@ -317,7 +326,7 @@ do
scissors=t ;;
--no-scissors)
scissors=f ;;
- -r|--resolved)
+ -r|--resolved|--continue)
resolved=t ;;
--skip)
skip=t ;;
@@ -346,6 +355,10 @@ do
allow_rerere_autoupdate="$1" ;;
-q|--quiet)
GIT_QUIET=t ;;
+ --keep-cr)
+ keepcr=t ;;
+ --no-keep-cr)
+ keepcr=f ;;
--)
shift; break ;;
*)
@@ -451,6 +464,7 @@ else
echo "$sign" >"$dotest/sign"
echo "$utf8" >"$dotest/utf8"
echo "$keep" >"$dotest/keep"
+ echo "$keepcr" >"$dotest/keepcr"
echo "$scissors" >"$dotest/scissors"
echo "$no_inbody_headers" >"$dotest/no_inbody_headers"
echo "$GIT_QUIET" >"$dotest/quiet"
@@ -494,6 +508,12 @@ if test "$(cat "$dotest/keep")" = t
then
keep=-k
fi
+case "$(cat "$dotest/keepcr")" in
+t)
+ keepcr=--keep-cr ;;
+f)
+ keepcr=--no-keep-cr ;;
+esac
case "$(cat "$dotest/scissors")" in
t)
scissors=--scissors ;;
@@ -663,10 +683,7 @@ do
[eE]*) git_editor "$dotest/final-commit"
action=again ;;
[vV]*) action=again
- : ${GIT_PAGER=$(git var GIT_PAGER)}
- : ${LESS=-FRSX}
- export LESS
- $GIT_PAGER "$dotest/patch" ;;
+ git_pager "$dotest/patch" ;;
*) action=again ;;
esac
done
@@ -787,6 +804,5 @@ if test -s "$dotest"/rewritten; then
fi
fi
-git gc --auto
-
rm -fr "$dotest"
+git gc --auto
diff --git a/git-compat-util.h b/git-compat-util.h
index aff627a85a..a3c4537366 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -178,6 +178,9 @@ extern char *gitbasename(char *);
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#define NORETURN_PTR __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+#define NORETURN __declspec(noreturn)
+#define NORETURN_PTR
#else
#define NORETURN
#define NORETURN_PTR
@@ -345,6 +348,7 @@ extern void release_pack_memory(size_t, int);
extern char *xstrdup(const char *str);
extern void *xmalloc(size_t size);
+extern void *xmallocz(size_t size);
extern void *xmemdupz(const void *data, size_t len);
extern char *xstrndup(const char *str, size_t len);
extern void *xrealloc(void *ptr, size_t size);
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 4853bf7a0d..9e03eee458 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -29,7 +29,7 @@ use IPC::Open2;
$SIG{'PIPE'}="IGNORE";
$ENV{'TZ'}="UTC";
-our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r);
+our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,@opt_M,$opt_A,$opt_S,$opt_L, $opt_a, $opt_r, $opt_R);
my (%conv_author_name, %conv_author_email);
sub usage(;$) {
@@ -40,7 +40,7 @@ Usage: git cvsimport # fetch/update GIT from CVS
[-o branch-for-HEAD] [-h] [-v] [-d CVSROOT] [-A author-conv-file]
[-p opts-for-cvsps] [-P file] [-C GIT_repository] [-z fuzz] [-i] [-k]
[-u] [-s subst] [-a] [-m] [-M regex] [-S regex] [-L commitlimit]
- [-r remote] [CVS_module]
+ [-r remote] [-R] [CVS_module]
END
exit(1);
}
@@ -110,7 +110,7 @@ sub read_repo_config {
}
}
-my $opts = "haivmkuo:d:p:r:C:z:s:M:P:A:S:L:";
+my $opts = "haivmkuo:d:p:r:C:z:s:M:P:A:S:L:R";
read_repo_config($opts);
Getopt::Long::Configure( 'no_ignore_case', 'bundling' );
@@ -659,6 +659,11 @@ if ($opt_A) {
write_author_info("$git_dir/cvs-authors");
}
+# open .git/cvs-revisions, if requested
+open my $revision_map, '>>', "$git_dir/cvs-revisions"
+ or die "Can't open $git_dir/cvs-revisions for appending: $!\n"
+ if defined $opt_R;
+
#
# run cvsps into a file unless we are getting
@@ -742,7 +747,7 @@ sub write_tree () {
}
my ($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
-my (@old,@new,@skipped,%ignorebranch);
+my (@old,@new,@skipped,%ignorebranch,@commit_revisions);
# commits that cvsps cannot place anywhere...
$ignorebranch{'#CVSPS_NO_BRANCH'} = 1;
@@ -825,6 +830,11 @@ sub commit {
system('git' , 'update-ref', "$remote/$branch", $cid) == 0
or die "Cannot write branch $branch for update: $!\n";
+ if ($revision_map) {
+ print $revision_map "@$_ $cid\n" for @commit_revisions;
+ }
+ @commit_revisions = ();
+
if ($tag) {
my ($xtag) = $tag;
$xtag =~ s/\s+\*\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY **
@@ -959,6 +969,7 @@ while (<CVS>) {
push(@skipped, $fn);
next;
}
+ push @commit_revisions, [$fn, $rev];
print "Fetching $fn v $rev\n" if $opt_v;
my ($tmpname, $size) = $cvs->file($fn,$rev);
if ($size == -1) {
@@ -981,7 +992,9 @@ while (<CVS>) {
unlink($tmpname);
} elsif ($state == 9 and /^\s+(.+?):\d+(?:\.\d+)+->(\d+(?:\.\d+)+)\(DEAD\)\s*$/) {
my $fn = $1;
+ my $rev = $2;
$fn =~ s#^/+##;
+ push @commit_revisions, [$fn, $rev];
push(@old,$fn);
print "Delete $fn\n" if $opt_v;
} elsif ($state == 9 and /^\s*$/) {
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 28041060c8..13751db882 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -408,7 +408,7 @@ sub req_Directory
$state->{localdir} = $data;
$state->{repository} = $repository;
$state->{path} = $repository;
- $state->{path} =~ s/^$state->{CVSROOT}\///;
+ $state->{path} =~ s/^\Q$state->{CVSROOT}\E\///;
$state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
$state->{path} .= "/" if ( $state->{path} =~ /\S/ );
diff --git a/git-difftool.perl b/git-difftool.perl
index d975d072db..adc42de875 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -78,11 +78,13 @@ sub generate_command
next;
}
if ($arg eq '-g' || $arg eq '--gui') {
- my $tool = Git::command_oneline('config',
- 'diff.guitool');
- if (length($tool)) {
- $ENV{GIT_DIFF_TOOL} = $tool;
- }
+ eval {
+ my $tool = Git::command_oneline('config',
+ 'diff.guitool');
+ if (length($tool)) {
+ $ENV{GIT_DIFF_TOOL} = $tool;
+ }
+ };
next;
}
if ($arg eq '-y' || $arg eq '--no-prompt') {
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 195b5ef48e..88fb0f070e 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -207,7 +207,7 @@ t,)
,*)
;;
*)
- die "Cannot set --prune-empty and --filter-commit at the same time"
+ die "Cannot set --prune-empty and --commit-filter at the same time"
esac
case "$force" in
@@ -331,7 +331,7 @@ while read commit parents; do
die "tree filter failed: $filter_tree"
(
- git diff-index -r --name-only $commit &&
+ git diff-index -r --name-only --ignore-submodules $commit &&
git ls-files --others
) > "$tempdir"/tree-state || exit
git update-index --add --replace --remove --stdin \
@@ -462,11 +462,11 @@ if [ "$filter_tag_name" ]; then
"$new_sha1" "$new_ref"
git cat-file tag "$ref" |
sed -n \
- -e "1,/^$/{
+ -e '1,/^$/{
/^object /d
/^type /d
/^tag /d
- }" \
+ }' \
-e '/^-----BEGIN PGP SIGNATURE-----/q' \
-e 'p' ) |
git mktag) ||
diff --git a/git-gui/Makefile b/git-gui/Makefile
index b3580e9e48..197b55edf3 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -7,7 +7,7 @@ all::
# TCL_PATH must be vaild for this to work.
#
-GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
-include GIT-VERSION-FILE
@@ -270,7 +270,7 @@ TRACK_VARS = \
GITGUI_MACOSXAPP=$(GITGUI_MACOSXAPP) \
#end TRACK_VARS
-GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
+GIT-GUI-VARS: FORCE
@VARS='$(TRACK_VARS)'; \
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
echo 1>&2 " * new locations or Tcl/Tk interpreter"; \
@@ -340,5 +340,4 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
.PHONY: all install uninstall dist-version clean
-.PHONY: .FORCE-GIT-VERSION-FILE
-.PHONY: .FORCE-GIT-GUI-VARS
+.PHONY: FORCE
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 718277a651..7d5451198c 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -121,6 +121,8 @@ unset oguimsg
set _appname {Git Gui}
set _gitdir {}
+set _gitworktree {}
+set _isbare {}
set _gitexec {}
set _githtmldir {}
set _reponame {}
@@ -276,6 +278,32 @@ proc get_config {name} {
}
}
+proc is_bare {} {
+ global _isbare
+ global _gitdir
+ global _gitworktree
+
+ if {$_isbare eq {}} {
+ if {[catch {
+ set _bare [git rev-parse --is-bare-repository]
+ switch -- $_bare {
+ true { set _isbare 1 }
+ false { set _isbare 0}
+ default { throw }
+ }
+ }]} {
+ if {[is_config_true core.bare]
+ || ($_gitworktree eq {}
+ && [lindex [file split $_gitdir] end] ne {.git})} {
+ set _isbare 1
+ } else {
+ set _isbare 0
+ }
+ }
+ }
+ return $_isbare
+}
+
######################################################################
##
## handy utils
@@ -649,12 +677,17 @@ if {[is_Windows]} {
## config defaults
set cursor_ptr arrow
-font create font_diff -family Courier -size 10
font create font_ui
-catch {
- label .dummy
- eval font configure font_ui [font actual [.dummy cget -font]]
- destroy .dummy
+if {[lsearch -exact [font names] TkDefaultFont] != -1} {
+ eval [linsert [font actual TkDefaultFont] 0 font configure font_ui]
+ eval [linsert [font actual TkFixedFont] 0 font create font_diff]
+} else {
+ font create font_diff -family Courier -size 10
+ catch {
+ label .dummy
+ eval font configure font_ui [font actual [.dummy cget -font]]
+ destroy .dummy
+ }
}
font create font_uiitalic
@@ -669,6 +702,9 @@ foreach class {Button Checkbutton Entry Label
}
if {![is_MacOSX]} {
option add *Menu.font font_ui
+ option add *Entry.borderWidth 1 startupFile
+ option add *Entry.relief sunken startupFile
+ option add *RadioButton.anchor w startupFile
}
unset class
@@ -721,6 +757,18 @@ proc apply_config {} {
font configure ${font}bold -weight bold
font configure ${font}italic -slant italic
}
+
+ global use_ttk NS
+ set use_ttk 0
+ set NS {}
+ if {$repo_config(gui.usettk)} {
+ set use_ttk [package vsatisfies [package provide Tk] 8.5]
+ if {$use_ttk} {
+ set NS ttk
+ bind [winfo class .] <<ThemeChanged>> [list InitTheme]
+ pave_toplevel .
+ }
+ }
}
set default_config(branch.autosetupmerge) true
@@ -747,6 +795,7 @@ set default_config(gui.fontui) [font configure font_ui]
set default_config(gui.fontdiff) [font configure font_diff]
# TODO: this option should be added to the git-config documentation
set default_config(gui.maxfilesdisplayed) 5000
+set default_config(gui.usettk) 1
set font_descs {
{fontui font_ui {mc "Main Font"}}
{fontdiff font_diff {mc "Diff/Console Font"}}
@@ -1074,6 +1123,8 @@ if {[catch {
set _prefix {}
}]
&& [catch {
+ # beware that from the .git dir this sets _gitdir to .
+ # and _prefix to the empty string
set _gitdir [git rev-parse --git-dir]
set _prefix [git rev-parse --show-prefix]
} err]} {
@@ -1082,6 +1133,14 @@ if {[catch {
choose_repository::pick
set picked 1
}
+
+# we expand the _gitdir when it's just a single dot (i.e. when we're being
+# run from the .git dir itself) lest the routines to find the worktree
+# get confused
+if {$_gitdir eq "."} {
+ set _gitdir [pwd]
+}
+
if {![file isdirectory $_gitdir] && [is_Cygwin]} {
catch {set _gitdir [exec cygpath --windows $_gitdir]}
}
@@ -1090,25 +1149,41 @@ if {![file isdirectory $_gitdir]} {
error_popup [strcat [mc "Git directory not found:"] "\n\n$_gitdir"]
exit 1
}
+# _gitdir exists, so try loading the config
+load_config 0
+apply_config
+# try to set work tree from environment, falling back to core.worktree
+if {[catch { set _gitworktree $env(GIT_WORK_TREE) }]} {
+ set _gitworktree [get_config core.worktree]
+}
if {$_prefix ne {}} {
- regsub -all {[^/]+/} $_prefix ../ cdup
+ if {$_gitworktree eq {}} {
+ regsub -all {[^/]+/} $_prefix ../ cdup
+ } else {
+ set cdup $_gitworktree
+ }
if {[catch {cd $cdup} err]} {
catch {wm withdraw .}
error_popup [strcat [mc "Cannot move to top of working directory:"] "\n\n$err"]
exit 1
}
+ set _gitworktree [pwd]
unset cdup
} elseif {![is_enabled bare]} {
- if {[lindex [file split $_gitdir] end] ne {.git}} {
+ if {[is_bare]} {
catch {wm withdraw .}
- error_popup [strcat [mc "Cannot use funny .git directory:"] "\n\n$_gitdir"]
+ error_popup [strcat [mc "Cannot use bare repository:"] "\n\n$_gitdir"]
exit 1
}
- if {[catch {cd [file dirname $_gitdir]} err]} {
+ if {$_gitworktree eq {}} {
+ set _gitworktree [file dirname $_gitdir]
+ }
+ if {[catch {cd $_gitworktree} err]} {
catch {wm withdraw .}
- error_popup [strcat [mc "No working directory"] " [file dirname $_gitdir]:\n\n$err"]
+ error_popup [strcat [mc "No working directory"] " $_gitworktree:\n\n$err"]
exit 1
}
+ set _gitworktree [pwd]
}
set _reponame [file split [file normalize $_gitdir]]
if {[lindex $_reponame end] eq {.git}} {
@@ -1117,6 +1192,9 @@ if {[lindex $_reponame end] eq {.git}} {
set _reponame [lindex $_reponame end]
}
+set env(GIT_DIR) $_gitdir
+set env(GIT_WORK_TREE) $_gitworktree
+
######################################################################
##
## global init
@@ -1613,6 +1691,9 @@ proc merge_state {path new_state {head_info {}} {index_info {}}} {
} elseif {$s0 ne {_} && [string index $state 0] eq {_}
&& $head_info eq {}} {
set head_info $index_info
+ } elseif {$s0 eq {_} && [string index $state 0] ne {_}} {
+ set index_info $head_info
+ set head_info {}
}
set file_states($path) [list $s0$s1 $icon \
@@ -1795,15 +1876,6 @@ static unsigned char file_fulltick_bits[] = {
0x62, 0x10, 0x02, 0x10, 0xfe, 0x1f};
} -maskdata $filemask
-image create bitmap file_parttick -background white -foreground "#005050" -data {
-#define parttick_width 14
-#define parttick_height 15
-static unsigned char parttick_bits[] = {
- 0xfe, 0x01, 0x02, 0x03, 0x7a, 0x05, 0x02, 0x09, 0x7a, 0x1f, 0x02, 0x10,
- 0x7a, 0x14, 0x02, 0x16, 0x02, 0x13, 0x8a, 0x11, 0xda, 0x10, 0x72, 0x10,
- 0x22, 0x10, 0x02, 0x10, 0xfe, 0x1f};
-} -maskdata $filemask
-
image create bitmap file_question -background white -foreground black -data {
#define file_question_width 14
#define file_question_height 15
@@ -1844,7 +1916,7 @@ set ui_index .vpane.files.index.list
set ui_workdir .vpane.files.workdir.list
set all_icons(_$ui_index) file_plain
-set all_icons(A$ui_index) file_fulltick
+set all_icons(A$ui_index) file_plain
set all_icons(M$ui_index) file_fulltick
set all_icons(D$ui_index) file_removed
set all_icons(U$ui_index) file_merge
@@ -1920,7 +1992,10 @@ proc incr_font_size {font {amt 1}} {
set starting_gitk_msg [mc "Starting gitk... please wait..."]
-proc do_gitk {revs} {
+proc do_gitk {revs {is_submodule false}} {
+ global current_diff_path file_states current_diff_side ui_index
+ global _gitdir _gitworktree
+
# -- Always start gitk through whatever we were loaded with. This
# lets us bypass using shell process on Windows systems.
#
@@ -1931,23 +2006,78 @@ proc do_gitk {revs} {
} else {
global env
- if {[info exists env(GIT_DIR)]} {
- set old_GIT_DIR $env(GIT_DIR)
+ set pwd [pwd]
+
+ if {!$is_submodule} {
+ if {![is_bare]} {
+ cd $_gitworktree
+ }
} else {
- set old_GIT_DIR {}
+ cd $current_diff_path
+ if {$revs eq {--}} {
+ set s $file_states($current_diff_path)
+ set old_sha1 {}
+ set new_sha1 {}
+ switch -glob -- [lindex $s 0] {
+ M_ { set old_sha1 [lindex [lindex $s 2] 1] }
+ _M { set old_sha1 [lindex [lindex $s 3] 1] }
+ MM {
+ if {$current_diff_side eq $ui_index} {
+ set old_sha1 [lindex [lindex $s 2] 1]
+ set new_sha1 [lindex [lindex $s 3] 1]
+ } else {
+ set old_sha1 [lindex [lindex $s 3] 1]
+ }
+ }
+ }
+ set revs $old_sha1...$new_sha1
+ }
+ # GIT_DIR and GIT_WORK_TREE for the submodule are not the ones
+ # we've been using for the main repository, so unset them.
+ # TODO we could make life easier (start up faster?) for gitk
+ # by setting these to the appropriate values to allow gitk
+ # to skip the heuristics to find their proper value
+ unset env(GIT_DIR)
+ unset env(GIT_WORK_TREE)
+ }
+ eval exec $cmd $revs "--" "--" &
+
+ set env(GIT_DIR) $_gitdir
+ set env(GIT_WORK_TREE) $_gitworktree
+ cd $pwd
+
+ ui_status $::starting_gitk_msg
+ after 10000 {
+ ui_ready $starting_gitk_msg
}
+ }
+}
+
+proc do_git_gui {} {
+ global current_diff_path
+
+ # -- Always start git gui through whatever we were loaded with. This
+ # lets us bypass using shell process on Windows systems.
+ #
+ set exe [list [_which git]]
+ if {$exe eq {}} {
+ error_popup [mc "Couldn't find git gui in PATH"]
+ } else {
+ global env
+ global _gitdir _gitworktree
+
+ # see note in do_gitk about unsetting these vars when
+ # running tools in a submodule
+ unset env(GIT_DIR)
+ unset env(GIT_WORK_TREE)
set pwd [pwd]
- cd [file dirname [gitdir]]
- set env(GIT_DIR) [file tail [gitdir]]
+ cd $current_diff_path
- eval exec $cmd $revs &
+ eval exec $exe gui &
- if {$old_GIT_DIR eq {}} {
- unset env(GIT_DIR)
- } else {
- set env(GIT_DIR) $old_GIT_DIR
- }
+ set env(GIT_DIR) $_gitdir
+ set env(GIT_WORK_TREE) $_gitworktree
cd $pwd
ui_status $::starting_gitk_msg
@@ -1958,6 +2088,7 @@ proc do_gitk {revs} {
}
proc do_explore {} {
+ global _gitworktree
set explorer {}
if {[is_Cygwin] || [is_Windows]} {
set explorer "explorer.exe"
@@ -1967,7 +2098,7 @@ proc do_explore {} {
# freedesktop.org-conforming system is our best shot
set explorer "xdg-open"
}
- eval exec $explorer [list [file nativename [file dirname [gitdir]]]] &
+ eval exec $explorer $_gitworktree &
}
set is_quitting 0
@@ -1983,7 +2114,7 @@ proc do_quit {{rc {1}}} {
global ui_comm is_quitting repo_config commit_type
global GITGUI_BCK_exists GITGUI_BCK_i
global ui_comm_spell
- global ret_code
+ global ret_code use_ttk
if {$is_quitting} return
set is_quitting 1
@@ -2041,8 +2172,13 @@ proc do_quit {{rc {1}}} {
}
set cfg_geometry [list]
lappend cfg_geometry [wm geometry .]
- lappend cfg_geometry [lindex [.vpane sash coord 0] 0]
- lappend cfg_geometry [lindex [.vpane.files sash coord 0] 1]
+ if {$use_ttk} {
+ lappend cfg_geometry [.vpane sashpos 0]
+ lappend cfg_geometry [.vpane.files sashpos 0]
+ } else {
+ lappend cfg_geometry [lindex [.vpane sash coord 0] 0]
+ lappend cfg_geometry [lindex [.vpane.files sash coord 0] 1]
+ }
if {[catch {set rc_geometry $repo_config(gui.geometry)}]} {
set rc_geometry {}
}
@@ -2331,8 +2467,6 @@ proc show_less_context {} {
##
## ui construction
-load_config 0
-apply_config
set ui_comm {}
# -- Menu Bar
@@ -2364,10 +2498,12 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
#
menu .mbar.repository
-.mbar.repository add command \
- -label [mc "Explore Working Copy"] \
- -command {do_explore}
-.mbar.repository add separator
+if {![is_bare]} {
+ .mbar.repository add command \
+ -label [mc "Explore Working Copy"] \
+ -command {do_explore}
+ .mbar.repository add separator
+}
.mbar.repository add command \
-label [mc "Browse Current Branch's Files"] \
@@ -2543,12 +2679,14 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
[list .mbar.commit entryconf [.mbar.commit index last] -state]
.mbar.commit add command -label [mc "Unstage From Commit"] \
- -command do_unstage_selection
+ -command do_unstage_selection \
+ -accelerator $M1T-U
lappend disable_on_lock \
[list .mbar.commit entryconf [.mbar.commit index last] -state]
.mbar.commit add command -label [mc "Revert Changes"] \
- -command do_revert_selection
+ -command do_revert_selection \
+ -accelerator $M1T-J
lappend disable_on_lock \
[list .mbar.commit entryconf [.mbar.commit index last] -state]
@@ -2807,14 +2945,13 @@ default {
# -- Branch Control
#
-frame .branch \
- -borderwidth 1 \
- -relief sunken
-label .branch.l1 \
+${NS}::frame .branch
+if {!$use_ttk} {.branch configure -borderwidth 1 -relief sunken}
+${NS}::label .branch.l1 \
-text [mc "Current Branch:"] \
-anchor w \
-justify left
-label .branch.cb \
+${NS}::label .branch.cb \
-textvariable current_branch \
-anchor w \
-justify left
@@ -2824,15 +2961,20 @@ pack .branch -side top -fill x
# -- Main Window Layout
#
-panedwindow .vpane -orient horizontal
-panedwindow .vpane.files -orient vertical
-.vpane add .vpane.files -sticky nsew -height 100 -width 200
+${NS}::panedwindow .vpane -orient horizontal
+${NS}::panedwindow .vpane.files -orient vertical
+if {$use_ttk} {
+ .vpane add .vpane.files
+} else {
+ .vpane add .vpane.files -sticky nsew -height 100 -width 200
+}
pack .vpane -anchor n -side top -fill both -expand 1
# -- Index File List
#
-frame .vpane.files.index -height 100 -width 200
-label .vpane.files.index.title -text [mc "Staged Changes (Will Commit)"] \
+${NS}::frame .vpane.files.index -height 100 -width 200
+tlabel .vpane.files.index.title \
+ -text [mc "Staged Changes (Will Commit)"] \
-background lightgreen -foreground black
text $ui_index -background white -foreground black \
-borderwidth 0 \
@@ -2842,8 +2984,8 @@ text $ui_index -background white -foreground black \
-xscrollcommand {.vpane.files.index.sx set} \
-yscrollcommand {.vpane.files.index.sy set} \
-state disabled
-scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]
-scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]
+${NS}::scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]
+${NS}::scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]
pack .vpane.files.index.title -side top -fill x
pack .vpane.files.index.sx -side bottom -fill x
pack .vpane.files.index.sy -side right -fill y
@@ -2851,8 +2993,8 @@ pack $ui_index -side left -fill both -expand 1
# -- Working Directory File List
#
-frame .vpane.files.workdir -height 100 -width 200
-label .vpane.files.workdir.title -text [mc "Unstaged Changes"] \
+${NS}::frame .vpane.files.workdir -height 100 -width 200
+tlabel .vpane.files.workdir.title -text [mc "Unstaged Changes"] \
-background lightsalmon -foreground black
text $ui_workdir -background white -foreground black \
-borderwidth 0 \
@@ -2862,15 +3004,19 @@ text $ui_workdir -background white -foreground black \
-xscrollcommand {.vpane.files.workdir.sx set} \
-yscrollcommand {.vpane.files.workdir.sy set} \
-state disabled
-scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]
-scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]
+${NS}::scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]
+${NS}::scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]
pack .vpane.files.workdir.title -side top -fill x
pack .vpane.files.workdir.sx -side bottom -fill x
pack .vpane.files.workdir.sy -side right -fill y
pack $ui_workdir -side left -fill both -expand 1
-.vpane.files add .vpane.files.workdir -sticky nsew
-.vpane.files add .vpane.files.index -sticky nsew
+.vpane.files add .vpane.files.workdir
+.vpane.files add .vpane.files.index
+if {!$use_ttk} {
+ .vpane.files paneconfigure .vpane.files.workdir -sticky news
+ .vpane.files paneconfigure .vpane.files.index -sticky news
+}
foreach i [list $ui_index $ui_workdir] {
rmsel_tag $i
@@ -2880,68 +3026,69 @@ unset i
# -- Diff and Commit Area
#
-frame .vpane.lower -height 300 -width 400
-frame .vpane.lower.commarea
-frame .vpane.lower.diff -relief sunken -borderwidth 1
+${NS}::frame .vpane.lower -height 300 -width 400
+${NS}::frame .vpane.lower.commarea
+${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1
pack .vpane.lower.diff -fill both -expand 1
pack .vpane.lower.commarea -side bottom -fill x
-.vpane add .vpane.lower -sticky nsew
+.vpane add .vpane.lower
+if {!$use_ttk} {.vpane paneconfigure .vpane.lower -sticky nsew}
# -- Commit Area Buttons
#
-frame .vpane.lower.commarea.buttons
-label .vpane.lower.commarea.buttons.l -text {} \
+${NS}::frame .vpane.lower.commarea.buttons
+${NS}::label .vpane.lower.commarea.buttons.l -text {} \
-anchor w \
-justify left
pack .vpane.lower.commarea.buttons.l -side top -fill x
pack .vpane.lower.commarea.buttons -side left -fill y
-button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \
+${NS}::button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \
-command ui_do_rescan
pack .vpane.lower.commarea.buttons.rescan -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.rescan conf -state}
-button .vpane.lower.commarea.buttons.incall -text [mc "Stage Changed"] \
+${NS}::button .vpane.lower.commarea.buttons.incall -text [mc "Stage Changed"] \
-command do_add_all
pack .vpane.lower.commarea.buttons.incall -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.incall conf -state}
if {![is_enabled nocommitmsg]} {
- button .vpane.lower.commarea.buttons.signoff -text [mc "Sign Off"] \
+ ${NS}::button .vpane.lower.commarea.buttons.signoff -text [mc "Sign Off"] \
-command do_signoff
pack .vpane.lower.commarea.buttons.signoff -side top -fill x
}
-button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \
+${NS}::button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \
-command do_commit
pack .vpane.lower.commarea.buttons.commit -side top -fill x
lappend disable_on_lock \
{.vpane.lower.commarea.buttons.commit conf -state}
if {![is_enabled nocommit]} {
- button .vpane.lower.commarea.buttons.push -text [mc Push] \
+ ${NS}::button .vpane.lower.commarea.buttons.push -text [mc Push] \
-command do_push_anywhere
pack .vpane.lower.commarea.buttons.push -side top -fill x
}
# -- Commit Message Buffer
#
-frame .vpane.lower.commarea.buffer
-frame .vpane.lower.commarea.buffer.header
+${NS}::frame .vpane.lower.commarea.buffer
+${NS}::frame .vpane.lower.commarea.buffer.header
set ui_comm .vpane.lower.commarea.buffer.t
set ui_coml .vpane.lower.commarea.buffer.header.l
if {![is_enabled nocommit]} {
- radiobutton .vpane.lower.commarea.buffer.header.new \
+ ${NS}::radiobutton .vpane.lower.commarea.buffer.header.new \
-text [mc "New Commit"] \
-command do_select_commit_type \
-variable selected_commit_type \
-value new
lappend disable_on_lock \
[list .vpane.lower.commarea.buffer.header.new conf -state]
- radiobutton .vpane.lower.commarea.buffer.header.amend \
+ ${NS}::radiobutton .vpane.lower.commarea.buffer.header.amend \
-text [mc "Amend Last Commit"] \
-command do_select_commit_type \
-variable selected_commit_type \
@@ -2950,7 +3097,7 @@ if {![is_enabled nocommit]} {
[list .vpane.lower.commarea.buffer.header.amend conf -state]
}
-label $ui_coml \
+${NS}::label $ui_coml \
-anchor w \
-justify left
proc trace_commit_type {varname args} {
@@ -2982,7 +3129,7 @@ text $ui_comm -background white -foreground black \
-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \
-font font_diff \
-yscrollcommand {.vpane.lower.commarea.buffer.sby set}
-scrollbar .vpane.lower.commarea.buffer.sby \
+${NS}::scrollbar .vpane.lower.commarea.buffer.sby \
-command [list $ui_comm yview]
pack .vpane.lower.commarea.buffer.header -side top -fill x
pack .vpane.lower.commarea.buffer.sby -side right -fill y
@@ -3048,19 +3195,19 @@ proc trace_current_diff_path {varname args} {
}
trace add variable current_diff_path write trace_current_diff_path
-frame .vpane.lower.diff.header -background gold
-label .vpane.lower.diff.header.status \
+gold_frame .vpane.lower.diff.header
+tlabel .vpane.lower.diff.header.status \
-background gold \
-foreground black \
-width $max_status_desc \
-anchor w \
-justify left
-label .vpane.lower.diff.header.file \
+tlabel .vpane.lower.diff.header.file \
-background gold \
-foreground black \
-anchor w \
-justify left
-label .vpane.lower.diff.header.path \
+tlabel .vpane.lower.diff.header.path \
-background gold \
-foreground black \
-anchor w \
@@ -3084,7 +3231,7 @@ bind_button3 .vpane.lower.diff.header.path "tk_popup $ctxm %X %Y"
# -- Diff Body
#
-frame .vpane.lower.diff.body
+${NS}::frame .vpane.lower.diff.body
set ui_diff .vpane.lower.diff.body.t
text $ui_diff -background white -foreground black \
-borderwidth 0 \
@@ -3093,9 +3240,9 @@ text $ui_diff -background white -foreground black \
-xscrollcommand {.vpane.lower.diff.body.sbx set} \
-yscrollcommand {.vpane.lower.diff.body.sby set} \
-state disabled
-scrollbar .vpane.lower.diff.body.sbx -orient horizontal \
+${NS}::scrollbar .vpane.lower.diff.body.sbx -orient horizontal \
-command [list $ui_diff xview]
-scrollbar .vpane.lower.diff.body.sby -orient vertical \
+${NS}::scrollbar .vpane.lower.diff.body.sby -orient vertical \
-command [list $ui_diff yview]
pack .vpane.lower.diff.body.sbx -side bottom -fill x
pack .vpane.lower.diff.body.sby -side right -fill y
@@ -3140,15 +3287,6 @@ $ui_diff tag raise sel
proc create_common_diff_popup {ctxm} {
$ctxm add command \
- -label [mc "Show Less Context"] \
- -command show_less_context
- lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
- $ctxm add command \
- -label [mc "Show More Context"] \
- -command show_more_context
- 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]
@@ -3199,10 +3337,19 @@ set ui_diff_applyhunk [$ctxm index last]
lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
$ctxm add command \
-label [mc "Apply/Reverse Line"] \
- -command {apply_line $cursorX $cursorY; do_rescan}
+ -command {apply_range_or_line $cursorX $cursorY; do_rescan}
set ui_diff_applyline [$ctxm index last]
lappend diff_actions [list $ctxm entryconf $ui_diff_applyline -state]
$ctxm add separator
+$ctxm add command \
+ -label [mc "Show Less Context"] \
+ -command show_less_context
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add command \
+ -label [mc "Show More Context"] \
+ -command show_more_context
+lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+$ctxm add separator
create_common_diff_popup $ctxm
set ctxmmg .vpane.lower.diff.body.ctxmmg
@@ -3225,9 +3372,40 @@ $ctxmmg add command \
-command {merge_resolve_one 1}
lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]
$ctxmmg add separator
+$ctxmmg add command \
+ -label [mc "Show Less Context"] \
+ -command show_less_context
+lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]
+$ctxmmg add command \
+ -label [mc "Show More Context"] \
+ -command show_more_context
+lappend diff_actions [list $ctxmmg entryconf [$ctxmmg index last] -state]
+$ctxmmg add separator
create_common_diff_popup $ctxmmg
-proc popup_diff_menu {ctxm ctxmmg x y X Y} {
+set ctxmsm .vpane.lower.diff.body.ctxmsm
+menu $ctxmsm -tearoff 0
+$ctxmsm add command \
+ -label [mc "Visualize These Changes In The Submodule"] \
+ -command {do_gitk -- true}
+lappend diff_actions [list $ctxmsm entryconf [$ctxmsm index last] -state]
+$ctxmsm add command \
+ -label [mc "Visualize Current Branch History In The Submodule"] \
+ -command {do_gitk {} true}
+lappend diff_actions [list $ctxmsm entryconf [$ctxmsm index last] -state]
+$ctxmsm add command \
+ -label [mc "Visualize All Branch History In The Submodule"] \
+ -command {do_gitk --all true}
+lappend diff_actions [list $ctxmsm entryconf [$ctxmsm index last] -state]
+$ctxmsm add separator
+$ctxmsm add command \
+ -label [mc "Start git gui In The Submodule"] \
+ -command {do_git_gui}
+lappend diff_actions [list $ctxmsm entryconf [$ctxmsm index last] -state]
+$ctxmsm add separator
+create_common_diff_popup $ctxmsm
+
+proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
global current_diff_path file_states
set ::cursorX $x
set ::cursorY $y
@@ -3238,15 +3416,26 @@ proc popup_diff_menu {ctxm ctxmmg x y X Y} {
}
if {[string first {U} $state] >= 0} {
tk_popup $ctxmmg $X $Y
+ } elseif {$::is_submodule_diff} {
+ tk_popup $ctxmsm $X $Y
} else {
+ set has_range [expr {[$::ui_diff tag nextrange sel 0.0] != {}}]
if {$::ui_index eq $::current_diff_side} {
set l [mc "Unstage Hunk From Commit"]
- set t [mc "Unstage Line From Commit"]
+ if {$has_range} {
+ set t [mc "Unstage Lines From Commit"]
+ } else {
+ set t [mc "Unstage Line From Commit"]
+ }
} else {
set l [mc "Stage Hunk For Commit"]
- set t [mc "Stage Line For Commit"]
+ if {$has_range} {
+ set t [mc "Stage Lines For Commit"]
+ } else {
+ set t [mc "Stage Line For Commit"]
+ }
}
- if {$::is_3way_diff || $::is_submodule_diff
+ if {$::is_3way_diff
|| $current_diff_path eq {}
|| {__} eq $state
|| {_O} eq $state
@@ -3261,7 +3450,7 @@ proc popup_diff_menu {ctxm ctxmmg x y X Y} {
tk_popup $ctxm $X $Y
}
}
-bind_button3 $ui_diff [list popup_diff_menu $ctxm $ctxmmg %x %y %X %Y]
+bind_button3 $ui_diff [list popup_diff_menu $ctxm $ctxmmg $ctxmsm %x %y %X %Y]
# -- Status Bar
#
@@ -3274,12 +3463,17 @@ $main_status show [mc "Initializing..."]
catch {
set gm $repo_config(gui.geometry)
wm geometry . [lindex $gm 0]
-.vpane sash place 0 \
- [lindex $gm 1] \
- [lindex [.vpane sash coord 0] 1]
-.vpane.files sash place 0 \
- [lindex [.vpane.files sash coord 0] 0] \
- [lindex $gm 2]
+if {$use_ttk} {
+ .vpane sashpos 0 [lindex $gm 1]
+ .vpane.files sashpos 0 [lindex $gm 2]
+} else {
+ .vpane sash place 0 \
+ [lindex $gm 1] \
+ [lindex [.vpane sash coord 0] 1]
+ .vpane.files sash place 0 \
+ [lindex [.vpane.files sash coord 0] 0] \
+ [lindex $gm 2]
+}
unset gm
}
@@ -3296,6 +3490,10 @@ unset gws
bind $ui_comm <$M1B-Key-Return> {do_commit;break}
bind $ui_comm <$M1B-Key-t> {do_add_selection;break}
bind $ui_comm <$M1B-Key-T> {do_add_selection;break}
+bind $ui_comm <$M1B-Key-u> {do_unstage_selection;break}
+bind $ui_comm <$M1B-Key-U> {do_unstage_selection;break}
+bind $ui_comm <$M1B-Key-j> {do_revert_selection;break}
+bind $ui_comm <$M1B-Key-J> {do_revert_selection;break}
bind $ui_comm <$M1B-Key-i> {do_add_all;break}
bind $ui_comm <$M1B-Key-I> {do_add_all;break}
bind $ui_comm <$M1B-Key-x> {tk_textCut %W;break}
@@ -3352,6 +3550,8 @@ bind . <$M1B-Key-s> do_signoff
bind . <$M1B-Key-S> do_signoff
bind . <$M1B-Key-t> do_add_selection
bind . <$M1B-Key-T> do_add_selection
+bind . <$M1B-Key-j> do_revert_selection
+bind . <$M1B-Key-J> do_revert_selection
bind . <$M1B-Key-i> do_add_all
bind . <$M1B-Key-I> do_add_all
bind . <$M1B-Key-minus> {show_less_context;break}
@@ -3370,7 +3570,7 @@ unset i
set file_lists($ui_index) [list]
set file_lists($ui_workdir) [list]
-wm title . "[appname] ([reponame]) [file normalize [file dirname [gitdir]]]"
+wm title . "[appname] ([reponame]) [file normalize $_gitworktree]"
focus -force $ui_comm
# -- Warn the user about environmental problems. Cygwin's Tcl
@@ -3543,3 +3743,9 @@ if {[is_enabled retcode]} {
if {$picked && [is_config_true gui.autoexplore]} {
do_explore
}
+
+# Local variables:
+# mode: tcl
+# indent-tabs-mode: t
+# tab-width: 4
+# End:
diff --git a/git-gui/lib/about.tcl b/git-gui/lib/about.tcl
index 241ab892cd..cfa50fca87 100644
--- a/git-gui/lib/about.tcl
+++ b/git-gui/lib/about.tcl
@@ -4,31 +4,26 @@
proc do_about {} {
global appvers copyright oguilib
global tcl_patchLevel tk_patchLevel
- global ui_comm_spell
+ global ui_comm_spell NS use_ttk
set w .about_dialog
- toplevel $w
+ Dialog $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
pack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10
- label $w.header -text [mc "About %s" [appname]] \
- -font font_uibold
+ ${NS}::label $w.header -text [mc "About %s" [appname]] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.close -text {Close} \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.close -text {Close} \
-default active \
-command [list destroy $w]
pack $w.buttons.close -side right
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- label $w.desc \
- -text "[mc "git-gui - a graphical user interface for Git."]\n$copyright" \
- -padx 5 -pady 5 \
- -justify left \
- -anchor w \
- -borderwidth 1 \
- -relief solid
+ paddedlabel $w.desc \
+ -text "[mc "git-gui - a graphical user interface for Git."]\n$copyright"
pack $w.desc -side top -fill x -padx 5 -pady 5
set v {}
@@ -52,22 +47,10 @@ proc do_about {} {
append d "git exec dir: [gitexec]\n"
append d "git-gui lib: $oguilib"
- label $w.vers \
- -text $v \
- -padx 5 -pady 5 \
- -justify left \
- -anchor w \
- -borderwidth 1 \
- -relief solid
+ paddedlabel $w.vers -text $v
pack $w.vers -side top -fill x -padx 5 -pady 5
- label $w.dirs \
- -text $d \
- -padx 5 -pady 5 \
- -justify left \
- -anchor w \
- -borderwidth 1 \
- -relief solid
+ paddedlabel $w.dirs -text $d
pack $w.dirs -side top -fill x -padx 5 -pady 5
menu $w.ctxm -tearoff 0
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 8525b79aaa..786b50b8c2 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -61,7 +61,7 @@ field tooltip_timer {} ; # Current timer event for our tooltip
field tooltip_commit {} ; # Commit(s) in tooltip
constructor new {i_commit i_path i_jump} {
- global cursor_ptr M1B M1T have_tk85
+ global cursor_ptr M1B M1T have_tk85 use_ttk NS
variable active_color
variable group_colors
@@ -73,15 +73,15 @@ constructor new {i_commit i_path i_jump} {
set font_w [font measure font_diff "0"]
- frame $w.header -background gold
- label $w.header.commit_l \
+ gold_frame $w.header
+ tlabel $w.header.commit_l \
-text [mc "Commit:"] \
-background gold \
-foreground black \
-anchor w \
-justify left
set w_back $w.header.commit_b
- label $w_back \
+ tlabel $w_back \
-image ::blame::img_back_arrow \
-borderwidth 0 \
-relief flat \
@@ -94,20 +94,20 @@ constructor new {i_commit i_path i_jump} {
[cb _history_menu]
}
"
- label $w.header.commit \
+ tlabel $w.header.commit \
-textvariable @commit \
-background gold \
-foreground black \
-anchor w \
-justify left
- label $w.header.path_l \
+ tlabel $w.header.path_l \
-text [mc "File:"] \
-background gold \
-foreground black \
-anchor w \
-justify left
set w_path $w.header.path
- label $w_path \
+ tlabel $w_path \
-background gold \
-foreground black \
-anchor w \
@@ -209,10 +209,10 @@ constructor new {i_commit i_path i_jump} {
set w_columns [list $w_amov $w_asim $w_line $w_file]
- scrollbar $w.file_pane.out.sbx \
+ ${NS}::scrollbar $w.file_pane.out.sbx \
-orient h \
-command [list $w_file xview]
- scrollbar $w.file_pane.out.sby \
+ ${NS}::scrollbar $w.file_pane.out.sby \
-orient v \
-command [list scrollbar2many $w_columns yview]
eval grid $w_columns $w.file_pane.out.sby -sticky nsew
@@ -254,10 +254,10 @@ constructor new {i_commit i_path i_jump} {
-background $active_color \
-font font_ui
$w_cviewer tag raise sel
- scrollbar $w.file_pane.cm.sbx \
+ ${NS}::scrollbar $w.file_pane.cm.sbx \
-orient h \
-command [list $w_cviewer xview]
- scrollbar $w.file_pane.cm.sby \
+ ${NS}::scrollbar $w.file_pane.cm.sby \
-orient v \
-command [list $w_cviewer yview]
pack $w.file_pane.cm.sby -side right -fill y
diff --git a/git-gui/lib/branch_checkout.tcl b/git-gui/lib/branch_checkout.tcl
index 6603703ea1..2e459a8297 100644
--- a/git-gui/lib/branch_checkout.tcl
+++ b/git-gui/lib/branch_checkout.tcl
@@ -10,21 +10,24 @@ field opt_fetch 1; # refetch tracking branch if used?
field opt_detach 0; # force a detached head case?
constructor dialog {} {
- make_toplevel top w
+ global use_ttk NS
+ make_dialog top w
+ wm withdraw $w
wm title $top [append "[appname] ([reponame]): " [mc "Checkout Branch"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- label $w.header -text [mc "Checkout Branch"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Checkout Branch"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.create -text [mc Checkout] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.create -text [mc Checkout] \
-default active \
-command [cb _checkout]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
@@ -33,14 +36,14 @@ constructor dialog {} {
$w_rev bind_listbox <Double-Button-1> [cb _checkout]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
- labelframe $w.options -text [mc Options]
+ ${NS}::labelframe $w.options -text [mc Options]
- checkbutton $w.options.fetch \
+ ${NS}::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw
- checkbutton $w.options.detach \
+ ${NS}::checkbutton $w.options.detach \
-text [mc "Detach From Local Branch"] \
-variable @opt_detach
pack $w.options.detach -anchor nw
@@ -50,6 +53,7 @@ constructor dialog {} {
bind $w <Visibility> [cb _visible]
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [cb _checkout]\;break
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/branch_create.tcl b/git-gui/lib/branch_create.tcl
index 3817771b94..4bb907705c 100644
--- a/git-gui/lib/branch_create.tcl
+++ b/git-gui/lib/branch_create.tcl
@@ -16,48 +16,48 @@ field opt_fetch 1; # refetch tracking branch if used?
field reset_ok 0; # did the user agree to reset?
constructor dialog {} {
- global repo_config
+ global repo_config use_ttk NS
- make_toplevel top w
+ make_dialog top w
+ wm withdraw $w
wm title $top [append "[appname] ([reponame]): " [mc "Create Branch"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- label $w.header -text [mc "Create New Branch"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Create New Branch"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.create -text [mc Create] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.create -text [mc Create] \
-default active \
-command [cb _create]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.desc -text [mc "Branch Name"]
- radiobutton $w.desc.name_r \
- -anchor w \
+ ${NS}::labelframe $w.desc -text [mc "Branch Name"]
+ ${NS}::radiobutton $w.desc.name_r \
-text [mc "Name:"] \
-value user \
-variable @name_type
+ if {!$use_ttk} {$w.desc.name_r configure -anchor w}
set w_name $w.desc.name_t
- entry $w_name \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate %d %S]
grid $w.desc.name_r $w_name -sticky we -padx {0 5}
- radiobutton $w.desc.match_r \
- -anchor w \
+ ${NS}::radiobutton $w.desc.match_r \
-text [mc "Match Tracking Branch Name"] \
-value match \
-variable @name_type
+ if {!$use_ttk} {$w.desc.match_r configure -anchor w}
grid $w.desc.match_r -sticky we -padx {0 5} -columnspan 2
grid columnconfigure $w.desc 1 -weight 1
@@ -66,34 +66,34 @@ constructor dialog {} {
set w_rev [::choose_rev::new $w.rev [mc "Starting Revision"]]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
- labelframe $w.options -text [mc Options]
+ ${NS}::labelframe $w.options -text [mc Options]
- frame $w.options.merge
- label $w.options.merge.l -text [mc "Update Existing Branch:"]
+ ${NS}::frame $w.options.merge
+ ${NS}::label $w.options.merge.l -text [mc "Update Existing Branch:"]
pack $w.options.merge.l -side left
- radiobutton $w.options.merge.no \
+ ${NS}::radiobutton $w.options.merge.no \
-text [mc No] \
-value none \
-variable @opt_merge
pack $w.options.merge.no -side left
- radiobutton $w.options.merge.ff \
+ ${NS}::radiobutton $w.options.merge.ff \
-text [mc "Fast Forward Only"] \
-value ff \
-variable @opt_merge
pack $w.options.merge.ff -side left
- radiobutton $w.options.merge.reset \
+ ${NS}::radiobutton $w.options.merge.reset \
-text [mc Reset] \
-value reset \
-variable @opt_merge
pack $w.options.merge.reset -side left
pack $w.options.merge -anchor nw
- checkbutton $w.options.fetch \
+ ${NS}::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw
- checkbutton $w.options.checkout \
+ ${NS}::checkbutton $w.options.checkout \
-text [mc "Checkout After Creation"] \
-variable @opt_checkout
pack $w.options.checkout -anchor nw
@@ -109,6 +109,7 @@ constructor dialog {} {
bind $w <Visibility> [cb _visible]
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [cb _create]\;break
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/branch_delete.tcl b/git-gui/lib/branch_delete.tcl
index 20d5e42307..867938ec6a 100644
--- a/git-gui/lib/branch_delete.tcl
+++ b/git-gui/lib/branch_delete.tcl
@@ -9,41 +9,40 @@ field w_check ; # revision picker for merge test
field w_delete ; # delete button
constructor dialog {} {
- global current_branch
+ global current_branch use_ttk NS
- make_toplevel top w
+ make_dialog top w
+ wm withdraw $w
wm title $top [append "[appname] ([reponame]): " [mc "Delete Branch"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- label $w.header -text [mc "Delete Local Branch"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Delete Local Branch"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
+ ${NS}::frame $w.buttons
set w_delete $w.buttons.delete
- button $w_delete \
+ ${NS}::button $w_delete \
-text [mc Delete] \
-default active \
-state disabled \
-command [cb _delete]
pack $w_delete -side right
- button $w.buttons.cancel \
+ ${NS}::button $w.buttons.cancel \
-text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.list -text [mc "Local Branches"]
+ ${NS}::labelframe $w.list -text [mc "Local Branches"]
set w_heads $w.list.l
- listbox $w_heads \
+ slistbox $w_heads \
-height 10 \
-width 70 \
-selectmode extended \
- -exportselection false \
- -yscrollcommand [list $w.list.sby set]
- scrollbar $w.list.sby -command [list $w.list.l yview]
- pack $w.list.sby -side right -fill y
+ -exportselection false
pack $w.list.l -side left -fill both -expand 1
pack $w.list -fill both -expand 1 -pady 5 -padx 5
@@ -67,6 +66,7 @@ constructor dialog {} {
"
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [cb _delete]\;break
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/branch_rename.tcl b/git-gui/lib/branch_rename.tcl
index 166538808f..63988773ba 100644
--- a/git-gui/lib/branch_rename.tcl
+++ b/git-gui/lib/branch_rename.tcl
@@ -8,9 +8,10 @@ field oldname
field newname
constructor dialog {} {
- global current_branch
+ global current_branch use_ttk NS
- make_toplevel top w
+ make_dialog top w
+ wm withdraw $w
wm title $top [append "[appname] ([reponame]): " [mc "Rename Branch"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
@@ -19,27 +20,31 @@ constructor dialog {} {
set oldname $current_branch
set newname [get_config gui.newbranchtemplate]
- label $w.header -text [mc "Rename Branch"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Rename Branch"]\
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.rename -text [mc Rename] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.rename -text [mc Rename] \
-default active \
-command [cb _rename]
pack $w.buttons.rename -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- frame $w.rename
- label $w.rename.oldname_l -text [mc "Branch:"]
- eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]
+ ${NS}::frame $w.rename
+ ${NS}::label $w.rename.oldname_l -text [mc "Branch:"]
+ if {$use_ttk} {
+ ttk::combobox $w.rename.oldname_m -textvariable @oldname \
+ -values [load_all_heads] -state readonly
+ } else {
+ eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]
+ }
- label $w.rename.newname_l -text [mc "New Name:"]
- entry $w.rename.newname_t \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::label $w.rename.newname_l -text [mc "New Name:"]
+ ${NS}::entry $w.rename.newname_t \
-width 40 \
-textvariable @newname \
-validate key \
@@ -60,6 +65,7 @@ constructor dialog {} {
$w.rename.newname_t icursor end
focus $w.rename.newname_t
"
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
index 0410cc68df..c2415729e0 100644
--- a/git-gui/lib/browser.tcl
+++ b/git-gui/lib/browser.tcl
@@ -21,23 +21,23 @@ field browser_busy 1
field ls_buf {}; # Buffered record output from ls-tree
constructor new {commit {path {}}} {
- global cursor_ptr M1B
- make_toplevel top w
+ global cursor_ptr M1B use_ttk NS
+ make_dialog top w
+ wm withdraw $top
wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
set browser_commit $commit
set browser_path $browser_commit:$path
- label $w.path \
+ ${NS}::label $w.path \
-textvariable @browser_path \
-anchor w \
-justify left \
- -borderwidth 1 \
- -relief sunken \
-font font_uibold
+ if {!$use_ttk} { $w.path configure -borderwidth 1 -relief sunken}
pack $w.path -anchor w -side top -fill x
- frame $w.list
+ ${NS}::frame $w.list
set w_list $w.list.l
text $w_list -background white -foreground black \
-borderwidth 0 \
@@ -49,19 +49,18 @@ constructor new {commit {path {}}} {
-xscrollcommand [list $w.list.sbx set] \
-yscrollcommand [list $w.list.sby set]
rmsel_tag $w_list
- scrollbar $w.list.sbx -orient h -command [list $w_list xview]
- scrollbar $w.list.sby -orient v -command [list $w_list yview]
+ ${NS}::scrollbar $w.list.sbx -orient h -command [list $w_list xview]
+ ${NS}::scrollbar $w.list.sby -orient v -command [list $w_list yview]
pack $w.list.sbx -side bottom -fill x
pack $w.list.sby -side right -fill y
pack $w_list -side left -fill both -expand 1
pack $w.list -side top -fill both -expand 1
- label $w.status \
+ ${NS}::label $w.status \
-textvariable @browser_status \
-anchor w \
- -justify left \
- -borderwidth 1 \
- -relief sunken
+ -justify left
+ if {!$use_ttk} { $w.status configure -borderwidth 1 -relief sunken}
pack $w.status -anchor w -side bottom -fill x
bind $w_list <Button-1> "[cb _click 0 @%x,%y];break"
@@ -78,6 +77,7 @@ constructor new {commit {path {}}} {
bind $w_list <Right> break
bind $w_list <Visibility> [list focus $w_list]
+ wm deiconify $top
set w $w_list
if {$path ne {}} {
_ls $this $browser_commit:$path $path
@@ -263,23 +263,27 @@ field w ; # widget path
field w_rev ; # mega-widget to pick the initial revision
constructor dialog {} {
- make_toplevel top w
+ global use_ttk NS
+ make_dialog top w
+ wm withdraw $top
wm title $top [append "[appname] ([reponame]): " [mc "Browse Branch Files"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
+ wm transient $top .
}
- label $w.header \
+ ${NS}::label $w.header \
-text [mc "Browse Branch Files"] \
- -font font_uibold
+ -font font_uibold \
+ -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.browse -text [mc Browse] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.browse -text [mc Browse] \
-default active \
-command [cb _open]
pack $w.buttons.browse -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
@@ -291,6 +295,7 @@ constructor dialog {} {
bind $w <Visibility> [cb _visible]
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [cb _open]\;break
+ wm deiconify $top
tkwait window $w
}
diff --git a/git-gui/lib/choose_font.tcl b/git-gui/lib/choose_font.tcl
index 56443b042c..ebe50bd7d0 100644
--- a/git-gui/lib/choose_font.tcl
+++ b/git-gui/lib/choose_font.tcl
@@ -17,6 +17,7 @@ variable all_families [list] ; # All fonts known to Tk
constructor pick {path title a_family a_size} {
variable all_families
+ global use_ttk NS
set v_family $a_family
set v_size $a_size
@@ -27,29 +28,30 @@ constructor pick {path title a_family a_size} {
set f_family $pv_family
set f_size $pv_size
- make_toplevel top w
+ make_dialog top w
+ wm withdraw $top
wm title $top "[appname] ([reponame]): $title"
wm geometry $top "+[winfo rootx $path]+[winfo rooty $path]"
- label $w.header -text $title -font font_uibold
+ ${NS}::label $w.header -text $title -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.select \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.select \
-text [mc Select] \
-default active \
-command [cb _select]
- button $w.buttons.cancel \
+ ${NS}::button $w.buttons.cancel \
-text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.select -side right
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- frame $w.inner
+ ${NS}::frame $w.inner
- frame $w.inner.family
- label $w.inner.family.l \
+ ${NS}::frame $w.inner.family
+ ${NS}::label $w.inner.family.l \
-text [mc "Font Family"] \
-anchor w
set w_family $w.inner.family.v
@@ -64,16 +66,16 @@ constructor pick {path title a_family a_size} {
-height 10 \
-yscrollcommand [list $w.inner.family.sby set]
rmsel_tag $w_family
- scrollbar $w.inner.family.sby -command [list $w_family yview]
+ ${NS}::scrollbar $w.inner.family.sby -command [list $w_family yview]
pack $w.inner.family.l -side top -fill x
pack $w.inner.family.sby -side right -fill y
pack $w_family -fill both -expand 1
- frame $w.inner.size
- label $w.inner.size.l \
+ ${NS}::frame $w.inner.size
+ ${NS}::label $w.inner.size.l \
-text [mc "Font Size"] \
-anchor w
- spinbox $w.inner.size.v \
+ tspinbox $w.inner.size.v \
-textvariable @f_size \
-from 2 -to 80 -increment 1 \
-width 3
@@ -86,8 +88,8 @@ constructor pick {path title a_family a_size} {
grid columnconfigure $w.inner 0 -weight 1
pack $w.inner -fill both -expand 1 -padx 5 -pady 5
- frame $w.example
- label $w.example.l \
+ ${NS}::frame $w.example
+ ${NS}::label $w.example.l \
-text [mc "Font Example"] \
-anchor w
set w_example $w.example.t
@@ -129,6 +131,7 @@ constructor pick {path title a_family a_size} {
grab $w
focus $w
"
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/choose_repository.tcl b/git-gui/lib/choose_repository.tcl
index 633cc572bb..64f06748b6 100644
--- a/git-gui/lib/choose_repository.tcl
+++ b/git-gui/lib/choose_repository.tcl
@@ -22,9 +22,9 @@ field readtree_err ; # Error output from read-tree (if any)
field sorted_recent ; # recent repositories (sorted)
constructor pick {} {
- global M1T M1B
+ global M1T M1B use_ttk NS
- make_toplevel top w
+ make_dialog top w
wm title $top [mc "Git Gui"]
if {$top eq {.}} {
@@ -71,11 +71,11 @@ constructor pick {} {
set w_body $w.body
set opts $w_body.options
- frame $w_body
+ ${NS}::frame $w_body
text $opts \
-cursor $::cursor_ptr \
-relief flat \
- -background [$w_body cget -background] \
+ -background [get_bg_color $w_body] \
-wrap none \
-spacing1 5 \
-width 50 \
@@ -132,15 +132,15 @@ constructor pick {} {
-label [mc "Recent Repositories"]
}
- label $w_body.space
- label $w_body.recentlabel \
+ ${NS}::label $w_body.space
+ ${NS}::label $w_body.recentlabel \
-anchor w \
-text [mc "Open Recent Repository:"]
set w_recentlist $w_body.recentlist
text $w_recentlist \
-cursor $::cursor_ptr \
-relief flat \
- -background [$w_body.recentlabel cget -background] \
+ -background [get_bg_color $w_body.recentlabel] \
-wrap none \
-width 50 \
-height 10
@@ -176,10 +176,10 @@ constructor pick {} {
}
pack $w_body -fill x -padx 10 -pady 10
- frame $w.buttons
+ ${NS}::frame $w.buttons
set w_next $w.buttons.next
set w_quit $w.buttons.quit
- button $w_quit \
+ ${NS}::button $w_quit \
-text [mc "Quit"] \
-command exit
pack $w_quit -side right -padx 5
@@ -203,6 +203,7 @@ constructor pick {} {
wm deiconify $top
tkwait variable @done
+ grab release $top
if {$top eq {.}} {
eval destroy [winfo children $top]
}
@@ -235,6 +236,8 @@ proc _get_recentrepos {} {
foreach p [get_config gui.recentrepo] {
if {[_is_git [file join $p .git]]} {
lappend recent $p
+ } else {
+ _unset_recentrepo $p
}
}
return [lsort $recent]
@@ -243,6 +246,7 @@ proc _get_recentrepos {} {
proc _unset_recentrepo {p} {
regsub -all -- {([()\[\]{}\.^$+*?\\])} $p {\\\1} p
git config --global --unset gui.recentrepo "^$p\$"
+ load_config 1
}
proc _append_recentrepos {path} {
@@ -261,6 +265,7 @@ proc _append_recentrepos {path} {
lappend recent $path
git config --global --add gui.recentrepo $path
+ load_config 1
while {[llength $recent] > 10} {
_unset_recentrepo [lindex $recent 0]
@@ -280,9 +285,10 @@ method _open_recent_path {p} {
}
method _next {action} {
+ global NS
destroy $w_body
if {![winfo exists $w_next]} {
- button $w_next -default active
+ ${NS}::button $w_next -default active
pack $w_next -side right -padx 5 -before $w_quit
}
_do_$action $this
@@ -371,26 +377,25 @@ proc _objdir {path} {
## Create New Repository
method _do_new {} {
+ global use_ttk NS
$w_next conf \
-state disabled \
-command [cb _do_new2] \
-text [mc "Create"]
- frame $w_body
- label $w_body.h \
- -font font_uibold \
+ ${NS}::frame $w_body
+ ${NS}::label $w_body.h \
+ -font font_uibold -anchor center \
-text [mc "Create New Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
- frame $w_body.where
- label $w_body.where.l -text [mc "Directory:"]
- entry $w_body.where.t \
+ ${NS}::frame $w_body.where
+ ${NS}::label $w_body.where.l -text [mc "Directory:"]
+ ${NS}::entry $w_body.where.t \
-textvariable @local_path \
- -borderwidth 1 \
- -relief sunken \
-width 50
- button $w_body.where.b \
+ ${NS}::button $w_body.where.b \
-text [mc "Browse"] \
-command [cb _new_local_path]
set w_localpath $w_body.where.t
@@ -456,63 +461,57 @@ proc _new_ok {p} {
## Clone Existing Repository
method _do_clone {} {
+ global use_ttk NS
$w_next conf \
-state disabled \
-command [cb _do_clone2] \
-text [mc "Clone"]
- frame $w_body
- label $w_body.h \
- -font font_uibold \
+ ${NS}::frame $w_body
+ ${NS}::label $w_body.h \
+ -font font_uibold -anchor center \
-text [mc "Clone Existing Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
set args $w_body.args
- frame $w_body.args
+ ${NS}::frame $w_body.args
pack $args -fill both
- label $args.origin_l -text [mc "Source Location:"]
- entry $args.origin_t \
+ ${NS}::label $args.origin_l -text [mc "Source Location:"]
+ ${NS}::entry $args.origin_t \
-textvariable @origin_url \
- -borderwidth 1 \
- -relief sunken \
-width 50
- button $args.origin_b \
+ ${NS}::button $args.origin_b \
-text [mc "Browse"] \
-command [cb _open_origin]
grid $args.origin_l $args.origin_t $args.origin_b -sticky ew
- label $args.where_l -text [mc "Target Directory:"]
- entry $args.where_t \
+ ${NS}::label $args.where_l -text [mc "Target Directory:"]
+ ${NS}::entry $args.where_t \
-textvariable @local_path \
- -borderwidth 1 \
- -relief sunken \
-width 50
- button $args.where_b \
+ ${NS}::button $args.where_b \
-text [mc "Browse"] \
-command [cb _new_local_path]
grid $args.where_l $args.where_t $args.where_b -sticky ew
set w_localpath $args.where_t
- label $args.type_l -text [mc "Clone Type:"]
- frame $args.type_f
+ ${NS}::label $args.type_l -text [mc "Clone Type:"]
+ ${NS}::frame $args.type_f
set w_types [list]
- lappend w_types [radiobutton $args.type_f.hardlink \
+ lappend w_types [${NS}::radiobutton $args.type_f.hardlink \
-state disabled \
- -anchor w \
-text [mc "Standard (Fast, Semi-Redundant, Hardlinks)"] \
-variable @clone_type \
-value hardlink]
- lappend w_types [radiobutton $args.type_f.full \
+ lappend w_types [${NS}::radiobutton $args.type_f.full \
-state disabled \
- -anchor w \
-text [mc "Full Copy (Slower, Redundant Backup)"] \
-variable @clone_type \
-value full]
- lappend w_types [radiobutton $args.type_f.shared \
+ lappend w_types [${NS}::radiobutton $args.type_f.shared \
-state disabled \
- -anchor w \
-text [mc "Shared (Fastest, Not Recommended, No Backup)"] \
-variable @clone_type \
-value shared]
@@ -1001,26 +1000,25 @@ method _postcheckout_wait {fd_ph} {
## Open Existing Repository
method _do_open {} {
+ global NS
$w_next conf \
-state disabled \
-command [cb _do_open2] \
-text [mc "Open"]
- frame $w_body
- label $w_body.h \
- -font font_uibold \
+ ${NS}::frame $w_body
+ ${NS}::label $w_body.h \
+ -font font_uibold -anchor center \
-text [mc "Open Existing Repository"]
pack $w_body.h -side top -fill x -pady 10
pack $w_body -fill x -padx 10
- frame $w_body.where
- label $w_body.where.l -text [mc "Repository:"]
- entry $w_body.where.t \
+ ${NS}::frame $w_body.where
+ ${NS}::label $w_body.where.l -text [mc "Repository:"]
+ ${NS}::entry $w_body.where.t \
-textvariable @local_path \
- -borderwidth 1 \
- -relief sunken \
-width 50
- button $w_body.where.b \
+ ${NS}::button $w_body.where.b \
-text [mc "Browse"] \
-command [cb _open_local_path]
diff --git a/git-gui/lib/choose_rev.tcl b/git-gui/lib/choose_rev.tcl
index c8821c1463..c12d5e1698 100644
--- a/git-gui/lib/choose_rev.tcl
+++ b/git-gui/lib/choose_rev.tcl
@@ -10,7 +10,7 @@ field w_list ; # list of currently filtered specs
field w_filter ; # filter entry for $w_list
field c_expr {}; # current revision expression
-field filter ; # current filter string
+field filter ""; # current filter string
field revtype head; # type of revision chosen
field cur_specs [list]; # list of specs for $revtype
field spec_head ; # list of all head specs
@@ -32,7 +32,7 @@ proc new_unmerged {path {title {}}} {
}
constructor _new {path unmerged_only title} {
- global current_branch is_detached
+ global current_branch is_detached use_ttk NS
if {![info exists ::all_remotes]} {
load_all_remotes
@@ -41,65 +41,65 @@ constructor _new {path unmerged_only title} {
set w $path
if {$title ne {}} {
- labelframe $w -text $title
+ ${NS}::labelframe $w -text $title
} else {
- frame $w
+ ${NS}::frame $w
}
bind $w <Destroy> [cb _delete %W]
if {$is_detached} {
- radiobutton $w.detachedhead_r \
- -anchor w \
+ ${NS}::radiobutton $w.detachedhead_r \
-text [mc "This Detached Checkout"] \
-value HEAD \
-variable @revtype
+ if {!$use_ttk} {$w.detachedhead_r configure -anchor w}
grid $w.detachedhead_r -sticky we -padx {0 5} -columnspan 2
}
- radiobutton $w.expr_r \
+ ${NS}::radiobutton $w.expr_r \
-text [mc "Revision Expression:"] \
-value expr \
-variable @revtype
- entry $w.expr_t \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w.expr_t \
-width 50 \
-textvariable @c_expr \
-validate key \
-validatecommand [cb _validate %d %S]
grid $w.expr_r $w.expr_t -sticky we -padx {0 5}
- frame $w.types
- radiobutton $w.types.head_r \
+ ${NS}::frame $w.types
+ ${NS}::radiobutton $w.types.head_r \
-text [mc "Local Branch"] \
-value head \
-variable @revtype
pack $w.types.head_r -side left
- radiobutton $w.types.trck_r \
+ ${NS}::radiobutton $w.types.trck_r \
-text [mc "Tracking Branch"] \
-value trck \
-variable @revtype
pack $w.types.trck_r -side left
- radiobutton $w.types.tag_r \
+ ${NS}::radiobutton $w.types.tag_r \
-text [mc "Tag"] \
-value tag \
-variable @revtype
pack $w.types.tag_r -side left
set w_filter $w.types.filter
- entry $w_filter \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_filter \
-width 12 \
-textvariable @filter \
-validate key \
-validatecommand [cb _filter %P]
pack $w_filter -side right
- pack [label $w.types.filter_icon \
+ pack [${NS}::label $w.types.filter_icon \
-image ::choose_rev::img_find \
] -side right
grid $w.types -sticky we -padx {0 5} -columnspan 2
- frame $w.list
+ if {$use_ttk} {
+ ttk::frame $w.list -style SListbox.TFrame -padding 2
+ } else {
+ frame $w.list
+ }
set w_list $w.list.l
listbox $w_list \
-font font_diff \
@@ -109,6 +109,9 @@ constructor _new {path unmerged_only title} {
-exportselection false \
-xscrollcommand [cb _sb_set $w.list.sbx h] \
-yscrollcommand [cb _sb_set $w.list.sby v]
+ if {$use_ttk} {
+ $w_list configure -relief flat -highlightthickness 0 -borderwidth 0
+ }
pack $w_list -fill both -expand 1
grid $w.list -sticky nswe -padx {20 5} -columnspan 2
bind $w_list <Any-Motion> [cb _show_tooltip @%x,%y]
@@ -235,11 +238,12 @@ constructor _new {path unmerged_only title} {
}
method none {text} {
+ global NS use_ttk
if {![winfo exists $w.none_r]} {
- radiobutton $w.none_r \
- -anchor w \
+ ${NS}::radiobutton $w.none_r \
-value none \
-variable @revtype
+ if {!$use_ttk} {$w.none_r configure -anchor w}
grid $w.none_r -sticky we -padx {0 5} -columnspan 2
}
$w.none_r configure -text $text
@@ -425,6 +429,7 @@ method _delete {current} {
}
method _sb_set {sb orient first last} {
+ global NS
set old_focus [focus -lastfor $w]
if {$first == 0 && $last == 1} {
@@ -440,10 +445,10 @@ method _sb_set {sb orient first last} {
if {![winfo exists $sb]} {
if {$orient eq {h}} {
- scrollbar $sb -orient h -command [list $w_list xview]
+ ${NS}::scrollbar $sb -orient h -command [list $w_list xview]
pack $sb -fill x -side bottom -before $w_list
} else {
- scrollbar $sb -orient v -command [list $w_list yview]
+ ${NS}::scrollbar $sb -orient v -command [list $w_list yview]
pack $sb -fill y -side right -before $w_list
}
if {$old_focus ne {}} {
diff --git a/git-gui/lib/class.tcl b/git-gui/lib/class.tcl
index dc2141192a..c27b71476a 100644
--- a/git-gui/lib/class.tcl
+++ b/git-gui/lib/class.tcl
@@ -134,6 +134,13 @@ proc delete_this {{t {}}} {
if {[namespace exists $t]} {namespace delete $t}
}
+proc make_dialog {t w args} {
+ upvar $t top $w pfx this this
+ global use_ttk
+ uplevel [linsert $args 0 make_toplevel $t $w]
+ pave_toplevel $pfx
+}
+
proc make_toplevel {t w args} {
upvar $t top $w pfx this this
diff --git a/git-gui/lib/console.tcl b/git-gui/lib/console.tcl
index c112464ec3..1f3248ffd1 100644
--- a/git-gui/lib/console.tcl
+++ b/git-gui/lib/console.tcl
@@ -27,20 +27,20 @@ constructor embed {path title} {
}
method _init {} {
- global M1B
+ global M1B use_ttk NS
if {$is_toplevel} {
- make_toplevel top w -autodelete 0
+ make_dialog top w -autodelete 0
wm title $top "[appname] ([reponame]): $t_short"
} else {
- frame $w
+ ${NS}::frame $w
}
set console_cr 1.0
set w_t $w.m.t
- frame $w.m
- label $w.m.l1 \
+ ${NS}::frame $w.m
+ ${NS}::label $w.m.l1 \
-textvariable @t_long \
-anchor w \
-justify left \
@@ -78,7 +78,7 @@ method _init {} {
"
if {$is_toplevel} {
- button $w.ok -text [mc "Close"] \
+ ${NS}::button $w.ok -text [mc "Close"] \
-state disabled \
-command [list destroy $w]
pack $w.ok -side bottom -anchor e -pady 10 -padx 10
@@ -206,13 +206,14 @@ method done {ok} {
}
method _sb_set {sb orient first last} {
+ global NS
if {![winfo exists $sb]} {
if {$first == $last || ($first == 0 && $last == 1)} return
if {$orient eq {h}} {
- scrollbar $sb -orient h -command [list $w_t xview]
+ ${NS}::scrollbar $sb -orient h -command [list $w_t xview]
pack $sb -fill x -side bottom -before $w_t
} else {
- scrollbar $sb -orient v -command [list $w_t yview]
+ ${NS}::scrollbar $sb -orient v -command [list $w_t yview]
pack $sb -fill y -side right -before $w_t
}
}
diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl
index d4e0bed0b6..1f187ed286 100644
--- a/git-gui/lib/database.tcl
+++ b/git-gui/lib/database.tcl
@@ -2,6 +2,7 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc do_stats {} {
+ global use_ttk NS
set fd [git_read count-objects -v]
while {[gets $fd line] > 0} {
if {[regexp {^([^:]+): (\d+)$} $line _ name value]} {
@@ -21,24 +22,22 @@ proc do_stats {} {
}
set w .stats_view
- toplevel $w
+ Dialog $w
+ wm withdraw $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- label $w.header -text [mc "Database Statistics"]
- pack $w.header -side top -fill x
-
- frame $w.buttons -border 1
- button $w.buttons.close -text [mc Close] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.close -text [mc Close] \
-default active \
-command [list destroy $w]
- button $w.buttons.gc -text [mc "Compress Database"] \
+ ${NS}::button $w.buttons.gc -text [mc "Compress Database"] \
-default normal \
-command "destroy $w;do_gc"
pack $w.buttons.close -side right
pack $w.buttons.gc -side left
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- frame $w.stat -borderwidth 1 -relief solid
+ ${NS}::labelframe $w.stat -text [mc "Database Statistics"]
foreach s {
{count {mc "Number of loose objects"}}
{size {mc "Disk space used by loose objects"} { KiB}}
@@ -55,8 +54,8 @@ proc do_stats {} {
set value "$value[lindex $s 2]"
}
- label $w.stat.l_$name -text "$label:" -anchor w
- label $w.stat.v_$name -text $value -anchor w
+ ${NS}::label $w.stat.l_$name -text "$label:" -anchor w
+ ${NS}::label $w.stat.v_$name -text $value -anchor w
grid $w.stat.l_$name $w.stat.v_$name -sticky we -padx {0 5}
}
pack $w.stat -pady 10 -padx 10
@@ -65,6 +64,7 @@ proc do_stats {} {
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [list destroy $w]
wm title $w [append "[appname] ([reponame]): " [mc "Database Statistics"]]
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index bd5d189ed1..ec8c11eeb7 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -281,6 +281,15 @@ proc start_show_diff {cont_info {add_opts {}}} {
}
}
+ if {[string match {160000 *} [lindex $s 2]]
+ || [string match {160000 *} [lindex $s 3]]} {
+ set is_submodule_diff 1
+
+ if {[git-version >= "1.6.6"]} {
+ lappend cmd --submodule
+ }
+ }
+
lappend cmd -p
lappend cmd --no-color
if {$repo_config(gui.diffcontext) >= 1} {
@@ -296,9 +305,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd $path
}
- if {[string match {160000 *} [lindex $s 2]]
- || [string match {160000 *} [lindex $s 3]]} {
- set is_submodule_diff 1
+ if {$is_submodule_diff && [git-version < "1.6.6"]} {
if {$w eq $ui_index} {
set cmd [list submodule summary --cached -- $path]
} else {
@@ -387,7 +394,9 @@ proc read_diff {fd cont_info} {
}
} elseif {$is_submodule_diff} {
if {$line == ""} continue
- if {[regexp {^\* } $line]} {
+ if {[regexp {^Submodule } $line]} {
+ set tags d_@
+ } elseif {[regexp {^\* } $line]} {
set line [string replace $line 0 1 {Submodule }]
set tags d_@
} else {
@@ -533,10 +542,23 @@ proc apply_hunk {x y} {
}
}
-proc apply_line {x y} {
+proc apply_range_or_line {x y} {
global current_diff_path current_diff_header current_diff_side
global ui_diff ui_index file_states
+ set selected [$ui_diff tag nextrange sel 0.0]
+
+ if {$selected == {}} {
+ set first [$ui_diff index "@$x,$y"]
+ set last $first
+ } else {
+ set first [lindex $selected 0]
+ set last [lindex $selected 1]
+ }
+
+ set first_l [$ui_diff index "$first linestart"]
+ set last_l [$ui_diff index "$last lineend"]
+
if {$current_diff_path eq {} || $current_diff_header eq {}} return
if {![lock_index apply_hunk]} return
@@ -559,119 +581,147 @@ proc apply_line {x y} {
}
}
- set the_l [$ui_diff index @$x,$y]
+ set wholepatch {}
- # operate only on change lines
- set c1 [$ui_diff get "$the_l linestart"]
- if {$c1 ne {+} && $c1 ne {-}} {
- unlock_index
- return
- }
- set sign $c1
-
- set i_l [$ui_diff search -backwards -regexp ^@@ $the_l 0.0]
- if {$i_l eq {}} {
- unlock_index
- return
- }
- # $i_l is now at the beginning of a line
+ while {$first_l < $last_l} {
+ set i_l [$ui_diff search -backwards -regexp ^@@ $first_l 0.0]
+ if {$i_l eq {}} {
+ # If there's not a @@ above, then the selected range
+ # must have come before the first_l @@
+ set i_l [$ui_diff search -regexp ^@@ $first_l $last_l]
+ }
+ if {$i_l eq {}} {
+ unlock_index
+ return
+ }
+ # $i_l is now at the beginning of a line
- # pick start line number from hunk header
- set hh [$ui_diff get $i_l "$i_l + 1 lines"]
- set hh [lindex [split $hh ,] 0]
- set hln [lindex [split $hh -] 1]
+ # pick start line number from hunk header
+ set hh [$ui_diff get $i_l "$i_l + 1 lines"]
+ set hh [lindex [split $hh ,] 0]
+ set hln [lindex [split $hh -] 1]
- # There is a special situation to take care of. Consider this hunk:
- #
- # @@ -10,4 +10,4 @@
- # context before
- # -old 1
- # -old 2
- # +new 1
- # +new 2
- # context after
- #
- # We used to keep the context lines in the order they appear in the
- # hunk. But then it is not possible to correctly stage only
- # "-old 1" and "+new 1" - it would result in this staged text:
- #
- # context before
- # old 2
- # new 1
- # context after
- #
- # (By symmetry it is not possible to *un*stage "old 2" and "new 2".)
- #
- # We resolve the problem by introducing an asymmetry, namely, when
- # a "+" line is *staged*, it is moved in front of the context lines
- # that are generated from the "-" lines that are immediately before
- # the "+" block. That is, we construct this patch:
- #
- # @@ -10,4 +10,5 @@
- # context before
- # +new 1
- # old 1
- # old 2
- # context after
- #
- # But we do *not* treat "-" lines that are *un*staged in a special
- # way.
- #
- # With this asymmetry it is possible to stage the change
- # "old 1" -> "new 1" directly, and to stage the change
- # "old 2" -> "new 2" by first staging the entire hunk and
- # then unstaging the change "old 1" -> "new 1".
-
- # This is non-empty if and only if we are _staging_ changes;
- # then it accumulates the consecutive "-" lines (after converting
- # them to context lines) in order to be moved after the "+" change
- # line.
- set pre_context {}
-
- set n 0
- set i_l [$ui_diff index "$i_l + 1 lines"]
- set patch {}
- while {[$ui_diff compare $i_l < "end - 1 chars"] &&
- [$ui_diff get $i_l "$i_l + 2 chars"] ne {@@}} {
- set next_l [$ui_diff index "$i_l + 1 lines"]
- set c1 [$ui_diff get $i_l]
- if {[$ui_diff compare $i_l <= $the_l] &&
- [$ui_diff compare $the_l < $next_l]} {
- # the line to stage/unstage
- set ln [$ui_diff get $i_l $next_l]
- if {$c1 eq {-}} {
- set n [expr $n+1]
+ # There is a special situation to take care of. Consider this
+ # hunk:
+ #
+ # @@ -10,4 +10,4 @@
+ # context before
+ # -old 1
+ # -old 2
+ # +new 1
+ # +new 2
+ # context after
+ #
+ # We used to keep the context lines in the order they appear in
+ # the hunk. But then it is not possible to correctly stage only
+ # "-old 1" and "+new 1" - it would result in this staged text:
+ #
+ # context before
+ # old 2
+ # new 1
+ # context after
+ #
+ # (By symmetry it is not possible to *un*stage "old 2" and "new
+ # 2".)
+ #
+ # We resolve the problem by introducing an asymmetry, namely,
+ # when a "+" line is *staged*, it is moved in front of the
+ # context lines that are generated from the "-" lines that are
+ # immediately before the "+" block. That is, we construct this
+ # patch:
+ #
+ # @@ -10,4 +10,5 @@
+ # context before
+ # +new 1
+ # old 1
+ # old 2
+ # context after
+ #
+ # But we do *not* treat "-" lines that are *un*staged in a
+ # special way.
+ #
+ # With this asymmetry it is possible to stage the change "old
+ # 1" -> "new 1" directly, and to stage the change "old 2" ->
+ # "new 2" by first staging the entire hunk and then unstaging
+ # the change "old 1" -> "new 1".
+ #
+ # Applying multiple lines adds complexity to the special
+ # situation. The pre_context must be moved after the entire
+ # first block of consecutive staged "+" lines, so that
+ # staging both additions gives the following patch:
+ #
+ # @@ -10,4 +10,6 @@
+ # context before
+ # +new 1
+ # +new 2
+ # old 1
+ # old 2
+ # context after
+
+ # This is non-empty if and only if we are _staging_ changes;
+ # then it accumulates the consecutive "-" lines (after
+ # converting them to context lines) in order to be moved after
+ # "+" change lines.
+ set pre_context {}
+
+ set n 0
+ set m 0
+ set i_l [$ui_diff index "$i_l + 1 lines"]
+ set patch {}
+ while {[$ui_diff compare $i_l < "end - 1 chars"] &&
+ [$ui_diff get $i_l "$i_l + 2 chars"] ne {@@}} {
+ set next_l [$ui_diff index "$i_l + 1 lines"]
+ set c1 [$ui_diff get $i_l]
+ if {[$ui_diff compare $first_l <= $i_l] &&
+ [$ui_diff compare $i_l < $last_l] &&
+ ($c1 eq {-} || $c1 eq {+})} {
+ # a line to stage/unstage
+ set ln [$ui_diff get $i_l $next_l]
+ if {$c1 eq {-}} {
+ set n [expr $n+1]
+ set patch "$patch$pre_context$ln"
+ set pre_context {}
+ } else {
+ set m [expr $m+1]
+ set patch "$patch$ln"
+ }
+ } elseif {$c1 ne {-} && $c1 ne {+}} {
+ # context line
+ set ln [$ui_diff get $i_l $next_l]
set patch "$patch$pre_context$ln"
+ set n [expr $n+1]
+ set m [expr $m+1]
+ set pre_context {}
+ } elseif {$c1 eq $to_context} {
+ # turn change line into context line
+ set ln [$ui_diff get "$i_l + 1 chars" $next_l]
+ if {$c1 eq {-}} {
+ set pre_context "$pre_context $ln"
+ } else {
+ set patch "$patch $ln"
+ }
+ set n [expr $n+1]
+ set m [expr $m+1]
} else {
- set patch "$patch$ln$pre_context"
- }
- set pre_context {}
- } elseif {$c1 ne {-} && $c1 ne {+}} {
- # context line
- set ln [$ui_diff get $i_l $next_l]
- set patch "$patch$pre_context$ln"
- set n [expr $n+1]
- set pre_context {}
- } elseif {$c1 eq $to_context} {
- # turn change line into context line
- set ln [$ui_diff get "$i_l + 1 chars" $next_l]
- if {$c1 eq {-}} {
- set pre_context "$pre_context $ln"
- } else {
- set patch "$patch $ln"
+ # a change in the opposite direction of
+ # to_context which is outside the range of
+ # lines to apply.
+ set patch "$patch$pre_context"
+ set pre_context {}
}
- set n [expr $n+1]
+ set i_l $next_l
}
- set i_l $next_l
+ set patch "$patch$pre_context"
+ set wholepatch "$wholepatch@@ -$hln,$n +$hln,$m @@\n$patch"
+ set first_l [$ui_diff index "$next_l + 1 lines"]
}
- set patch "@@ -$hln,$n +$hln,[eval expr $n $sign 1] @@\n$patch"
if {[catch {
set enc [get_path_encoding $current_diff_path]
set p [eval git_write $apply_cmd]
fconfigure $p -translation binary -encoding $enc
puts -nonewline $p $current_diff_header
- puts -nonewline $p $patch
+ puts -nonewline $p $wholepatch
close $p} err]} {
error_popup [append $failed_msg "\n\n$err"]
}
diff --git a/git-gui/lib/error.tcl b/git-gui/lib/error.tcl
index 75650157e5..c0fa69af56 100644
--- a/git-gui/lib/error.tcl
+++ b/git-gui/lib/error.tcl
@@ -71,11 +71,13 @@ proc ask_popup {msg} {
}
proc hook_failed_popup {hook msg {is_fatal 1}} {
+ global use_ttk NS
set w .hookfail
- toplevel $w
+ Dialog $w
+ wm withdraw $w
- frame $w.m
- label $w.m.l1 -text "$hook hook failed:" \
+ ${NS}::frame $w.m
+ ${NS}::label $w.m.l1 -text "$hook hook failed:" \
-anchor w \
-justify left \
-font font_uibold
@@ -87,10 +89,10 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
-width 80 -height 10 \
-font font_diff \
-yscrollcommand [list $w.m.sby set]
- scrollbar $w.m.sby -command [list $w.m.t yview]
+ ${NS}::scrollbar $w.m.sby -command [list $w.m.t yview]
pack $w.m.l1 -side top -fill x
if {$is_fatal} {
- label $w.m.l2 \
+ ${NS}::label $w.m.l2 \
-text [mc "You must correct the above errors before committing."] \
-anchor w \
-justify left \
@@ -104,7 +106,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
$w.m.t insert 1.0 $msg
$w.m.t conf -state disabled
- button $w.ok -text OK \
+ ${NS}::button $w.ok -text OK \
-width 15 \
-command "destroy $w"
pack $w.ok -side bottom -anchor e -pady 10 -padx 10
@@ -112,5 +114,6 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
bind $w <Visibility> "grab $w; focus $w"
bind $w <Key-Return> "destroy $w"
wm title $w [strcat "[appname] ([reponame]): " [mc "error"]]
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index d33896a0ce..e9db0c4989 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -8,36 +8,41 @@ proc _delete_indexlock {} {
}
proc _close_updateindex {fd after} {
+ global use_ttk NS
fconfigure $fd -blocking 1
if {[catch {close $fd} err]} {
set w .indexfried
- toplevel $w
+ Dialog $w
+ wm withdraw $w
wm title $w [strcat "[appname] ([reponame]): " [mc "Index Error"]]
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- pack [label $w.msg \
- -justify left \
- -anchor w \
- -text [strcat \
- [mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."] \
- "\n\n$err"] \
- ] -anchor w
-
- frame $w.buttons
- button $w.buttons.continue \
+ set s [mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."]
+ text $w.msg -yscrollcommand [list $w.vs set] \
+ -width [string length $s] -relief flat \
+ -borderwidth 0 -highlightthickness 0 \
+ -background [get_bg_color $w]
+ $w.msg tag configure bold -font font_uibold -justify center
+ ${NS}::scrollbar $w.vs -command [list $w.msg yview]
+ $w.msg insert end $s bold \n\n$err {}
+ $w.msg configure -state disabled
+
+ ${NS}::button $w.continue \
-text [mc "Continue"] \
-command [list destroy $w]
- pack $w.buttons.continue -side right -padx 5
- button $w.buttons.unlock \
+ ${NS}::button $w.unlock \
-text [mc "Unlock Index"] \
-command "destroy $w; _delete_indexlock"
- pack $w.buttons.unlock -side right
- pack $w.buttons -side bottom -fill x -pady 10 -padx 10
+ grid $w.msg - $w.vs -sticky news
+ grid $w.unlock $w.continue - -sticky se -padx 2 -pady 2
+ grid columnconfigure $w 0 -weight 1
+ grid rowconfigure $w 0 -weight 1
wm protocol $w WM_DELETE_WINDOW update
- bind $w.buttons.continue <Visibility> "
+ bind $w.continue <Visibility> "
grab $w
- focus $w.buttons.continue
+ focus %W
"
+ wm deiconify $w
tkwait window $w
$::main_status stop
diff --git a/git-gui/lib/merge.tcl b/git-gui/lib/merge.tcl
index 283e4915e9..5cded2341c 100644
--- a/git-gui/lib/merge.tcl
+++ b/git-gui/lib/merge.tcl
@@ -139,14 +139,14 @@ method _finish {cons ok} {
constructor dialog {} {
global current_branch
- global M1B
+ global M1B use_ttk NS
if {![_can_merge $this]} {
delete_this
return
}
- make_toplevel top w
+ make_dialog top w
wm title $top [append "[appname] ([reponame]): " [mc "Merge"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
@@ -154,21 +154,21 @@ constructor dialog {} {
set _start [cb _start]
- label $w.header \
+ ${NS}::label $w.header \
-text [mc "Merge Into %s" $current_branch] \
-font font_uibold
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.visualize \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.visualize \
-text [mc Visualize] \
-command [cb _visualize]
pack $w.buttons.visualize -side left
- button $w.buttons.merge \
+ ${NS}::button $w.buttons.merge \
-text [mc Merge] \
-command $_start
pack $w.buttons.merge -side right
- button $w.buttons.cancel \
+ ${NS}::button $w.buttons.cancel \
-text [mc "Cancel"] \
-command [cb _cancel]
pack $w.buttons.cancel -side right -padx 5
diff --git a/git-gui/lib/option.tcl b/git-gui/lib/option.tcl
index 1d55b49c9b..d4c5e45c8a 100644
--- a/git-gui/lib/option.tcl
+++ b/git-gui/lib/option.tcl
@@ -91,7 +91,7 @@ proc save_config {} {
proc do_options {} {
global repo_config global_config font_descs
global repo_config_new global_config_new
- global ui_comm_spell
+ global ui_comm_spell use_ttk NS
array unset repo_config_new
array unset global_config_new
@@ -110,26 +110,28 @@ proc do_options {} {
}
set w .options_editor
- toplevel $w
+ Dialog $w
+ wm withdraw $w
+ wm transient $w [winfo parent $w]
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
- frame $w.buttons
- button $w.buttons.restore -text [mc "Restore Defaults"] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.restore -text [mc "Restore Defaults"] \
-default normal \
-command do_restore_defaults
pack $w.buttons.restore -side left
- button $w.buttons.save -text [mc Save] \
+ ${NS}::button $w.buttons.save -text [mc Save] \
-default active \
-command [list do_save_config $w]
pack $w.buttons.save -side right
- button $w.buttons.cancel -text [mc "Cancel"] \
+ ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
-default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.repo -text [mc "%s Repository" [reponame]]
- labelframe $w.global -text [mc "Global (All Repositories)"]
+ ${NS}::labelframe $w.repo -text [mc "%s Repository" [reponame]]
+ ${NS}::labelframe $w.global -text [mc "Global (All Repositories)"]
pack $w.repo -side left -fill both -expand 1 -pady 5 -padx 5
pack $w.global -side right -fill both -expand 1 -pady 5 -padx 5
@@ -161,7 +163,7 @@ proc do_options {} {
foreach f {repo global} {
switch -glob -- $type {
b {
- checkbutton $w.$f.$optid -text $text \
+ ${NS}::checkbutton $w.$f.$optid -text $text \
-variable ${f}_config_new($name) \
-onvalue true \
-offvalue false
@@ -169,10 +171,10 @@ proc do_options {} {
}
i-* {
regexp -- {-(\d+)\.\.(\d+)$} $type _junk min max
- frame $w.$f.$optid
- label $w.$f.$optid.l -text "$text:"
+ ${NS}::frame $w.$f.$optid
+ ${NS}::label $w.$f.$optid.l -text "$text:"
pack $w.$f.$optid.l -side left -anchor w -fill x
- spinbox $w.$f.$optid.v \
+ tspinbox $w.$f.$optid.v \
-textvariable ${f}_config_new($name) \
-from $min \
-to $max \
@@ -184,11 +186,9 @@ proc do_options {} {
}
c -
t {
- frame $w.$f.$optid
- label $w.$f.$optid.l -text "$text:"
- entry $w.$f.$optid.v \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::frame $w.$f.$optid
+ ${NS}::label $w.$f.$optid.l -text "$text:"
+ ${NS}::entry $w.$f.$optid.v \
-width 20 \
-textvariable ${f}_config_new($name)
pack $w.$f.$optid.l -side left -anchor w
@@ -199,7 +199,7 @@ proc do_options {} {
menu $w.$f.$optid.m
build_encoding_menu $w.$f.$optid.m \
[list set ${f}_config_new($name)] 1
- button $w.$f.$optid.b \
+ ${NS}::button $w.$f.$optid.b \
-text [mc "Change"] \
-command [list popup_btn_menu \
$w.$f.$optid.m $w.$f.$optid.b]
@@ -226,11 +226,17 @@ proc do_options {} {
set ${f}_config_new(gui.spellingdictionary) $value
}
- frame $w.$f.$optid
- label $w.$f.$optid.l -text [mc "Spelling Dictionary:"]
- eval tk_optionMenu $w.$f.$optid.v \
- ${f}_config_new(gui.spellingdictionary) \
- $all_dicts
+ ${NS}::frame $w.$f.$optid
+ ${NS}::label $w.$f.$optid.l -text [mc "Spelling Dictionary:"]
+ if {$use_ttk} {
+ ttk::combobox $w.$f.$optid.v \
+ -textvariable ${f}_config_new(gui.spellingdictionary) \
+ -values $all_dicts -state readonly
+ } else {
+ eval tk_optionMenu $w.$f.$optid.v \
+ ${f}_config_new(gui.spellingdictionary) \
+ $all_dicts
+ }
pack $w.$f.$optid.l -side left -anchor w -fill x
pack $w.$f.$optid.v -side right -anchor e -padx 5
pack $w.$f.$optid -side top -anchor w -fill x
@@ -248,20 +254,20 @@ proc do_options {} {
set global_config_new(gui.$font^^size) \
[font configure $font -size]
- frame $w.global.$name
- label $w.global.$name.l -text "$text:"
- button $w.global.$name.b \
+ ${NS}::frame $w.global.$name
+ ${NS}::label $w.global.$name.l -text "$text:"
+ ${NS}::button $w.global.$name.b \
-text [mc "Change Font"] \
-command [list \
- choose_font::pick \
+ tchoosefont \
$w \
[mc "Choose %s" $text] \
global_config_new(gui.$font^^family) \
global_config_new(gui.$font^^size) \
]
- label $w.global.$name.f -textvariable global_config_new(gui.$font^^family)
- label $w.global.$name.s -textvariable global_config_new(gui.$font^^size)
- label $w.global.$name.pt -text [mc "pt."]
+ ${NS}::label $w.global.$name.f -textvariable global_config_new(gui.$font^^family)
+ ${NS}::label $w.global.$name.s -textvariable global_config_new(gui.$font^^size)
+ ${NS}::label $w.global.$name.pt -text [mc "pt."]
pack $w.global.$name.l -side left -anchor w
pack $w.global.$name.b -side right -anchor e
pack $w.global.$name.pt -side right -anchor w
@@ -280,6 +286,7 @@ proc do_options {} {
set t [mc "Options"]
}
wm title $w "[appname] ([reponame]): $t"
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl
index fb29422aa7..50029d0cee 100644
--- a/git-gui/lib/remote_add.tcl
+++ b/git-gui/lib/remote_add.tcl
@@ -13,45 +13,43 @@ field location {}; # location of the remote the user has chosen
field opt_action fetch; # action to do after registering the remote locally
constructor dialog {} {
- global repo_config
+ global repo_config use_ttk NS
- make_toplevel top w
+ make_dialog top w
+ wm withdraw $top
wm title $top [append "[appname] ([reponame]): " [mc "Add Remote"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- label $w.header -text [mc "Add New Remote"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Add New Remote"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.create -text [mc Add] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.create -text [mc Add] \
-default active \
-command [cb _add]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.desc -text [mc "Remote Details"]
+ ${NS}::labelframe $w.desc -text [mc "Remote Details"]
- label $w.desc.name_l -text [mc "Name:"]
+ ${NS}::label $w.desc.name_l -text [mc "Name:"]
set w_name $w.desc.name_t
- entry $w_name \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate_name %d %S]
grid $w.desc.name_l $w_name -sticky we -padx {0 5}
- label $w.desc.loc_l -text [mc "Location:"]
+ ${NS}::label $w.desc.loc_l -text [mc "Location:"]
set w_loc $w.desc.loc_t
- entry $w_loc \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_loc \
-width 40 \
-textvariable @location
grid $w.desc.loc_l $w_loc -sticky we -padx {0 5}
@@ -59,21 +57,21 @@ constructor dialog {} {
grid columnconfigure $w.desc 1 -weight 1
pack $w.desc -anchor nw -fill x -pady 5 -padx 5
- labelframe $w.action -text [mc "Further Action"]
+ ${NS}::labelframe $w.action -text [mc "Further Action"]
- radiobutton $w.action.fetch \
+ ${NS}::radiobutton $w.action.fetch \
-text [mc "Fetch Immediately"] \
-value fetch \
-variable @opt_action
pack $w.action.fetch -anchor nw
- radiobutton $w.action.push \
+ ${NS}::radiobutton $w.action.push \
-text [mc "Initialize Remote Repository and Push"] \
-value push \
-variable @opt_action
pack $w.action.push -anchor nw
- radiobutton $w.action.none \
+ ${NS}::radiobutton $w.action.none \
-text [mc "Do Nothing Else Now"] \
-value none \
-variable @opt_action
@@ -85,6 +83,7 @@ constructor dialog {} {
bind $w <Visibility> [cb _visible]
bind $w <Key-Escape> [list destroy $w]
bind $w <Key-Return> [cb _add]\;break
+ wm deiconify $top
tkwait window $w
}
diff --git a/git-gui/lib/remote_branch_delete.tcl b/git-gui/lib/remote_branch_delete.tcl
index 241642062e..f872a3d89d 100644
--- a/git-gui/lib/remote_branch_delete.tcl
+++ b/git-gui/lib/remote_branch_delete.tcl
@@ -23,34 +23,40 @@ field full_cache
field cached
constructor dialog {} {
- global all_remotes M1B
+ global all_remotes M1B use_ttk NS
- make_toplevel top w
+ make_dialog top w
wm title $top [append "[appname] ([reponame]): " [mc "Delete Branch Remotely"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}
- label $w.header -text [mc "Delete Branch Remotely"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Delete Branch Remotely"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.delete -text [mc Delete] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.delete -text [mc Delete] \
-default active \
-command [cb _delete]
pack $w.buttons.delete -side right
- button $w.buttons.cancel -text [mc "Cancel"] \
+ ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.dest -text [mc "From Repository"]
+ ${NS}::labelframe $w.dest -text [mc "From Repository"]
if {$all_remotes ne {}} {
- radiobutton $w.dest.remote_r \
+ ${NS}::radiobutton $w.dest.remote_r \
-text [mc "Remote:"] \
-value remote \
-variable @urltype
- eval tk_optionMenu $w.dest.remote_m @remote $all_remotes
+ if {$use_ttk} {
+ ttk::combobox $w.dest.remote_m -textvariable @remote \
+ -values $all_remotes -state readonly
+ } else {
+ eval tk_optionMenu $w.dest.remote_m @remote $all_remotes
+ }
grid $w.dest.remote_r $w.dest.remote_m -sticky w
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
set remote origin
@@ -62,13 +68,11 @@ constructor dialog {} {
} else {
set urltype url
}
- radiobutton $w.dest.url_r \
+ ${NS}::radiobutton $w.dest.url_r \
-text [mc "Arbitrary Location:"] \
-value url \
-variable @urltype
- entry $w.dest.url_t \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w.dest.url_t \
-width 50 \
-textvariable @url \
-validate key \
@@ -81,33 +85,30 @@ constructor dialog {} {
grid columnconfigure $w.dest 1 -weight 1
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
- labelframe $w.heads -text [mc "Branches"]
- listbox $w.heads.l \
+ ${NS}::labelframe $w.heads -text [mc "Branches"]
+ slistbox $w.heads.l \
-height 10 \
-width 70 \
-listvariable @head_list \
- -selectmode extended \
- -yscrollcommand [list $w.heads.sby set]
- scrollbar $w.heads.sby -command [list $w.heads.l yview]
+ -selectmode extended
- frame $w.heads.footer
- label $w.heads.footer.status \
+ ${NS}::frame $w.heads.footer
+ ${NS}::label $w.heads.footer.status \
-textvariable @status \
-anchor w \
-justify left
- button $w.heads.footer.rescan \
+ ${NS}::button $w.heads.footer.rescan \
-text [mc "Rescan"] \
-command [cb _rescan]
pack $w.heads.footer.status -side left -fill x
pack $w.heads.footer.rescan -side right
pack $w.heads.footer -side bottom -fill x
- pack $w.heads.sby -side right -fill y
pack $w.heads.l -side left -fill both -expand 1
pack $w.heads -fill both -expand 1 -pady 5 -padx 5
- labelframe $w.validate -text [mc "Delete Only If"]
- radiobutton $w.validate.head_r \
+ ${NS}::labelframe $w.validate -text [mc "Delete Only If"]
+ ${NS}::radiobutton $w.validate.head_r \
-text [mc "Merged Into:"] \
-value head \
-variable @checktype
@@ -115,7 +116,7 @@ constructor dialog {} {
trace add variable @head_list write [cb _write_head_list]
trace add variable @check_head write [cb _write_check_head]
grid $w.validate.head_r $w.validate.head_m -sticky w
- radiobutton $w.validate.always_r \
+ ${NS}::radiobutton $w.validate.always_r \
-text [mc "Always (Do not perform merge checks)"] \
-value always \
-variable @checktype
diff --git a/git-gui/lib/search.tcl b/git-gui/lib/search.tcl
index b371e9a30a..7fdbf87bcd 100644
--- a/git-gui/lib/search.tcl
+++ b/git-gui/lib/search.tcl
@@ -14,15 +14,16 @@ field smarktop
field smarkbot
constructor new {i_w i_text args} {
+ global use_ttk NS
set w $i_w
set ctext $i_text
- frame $w
- label $w.l -text [mc Find:]
+ ${NS}::frame $w
+ ${NS}::label $w.l -text [mc Find:]
entry $w.ent -textvariable ${__this}::searchstring -background lightgreen
- button $w.bn -text [mc Next] -command [cb find_next]
- button $w.bp -text [mc Prev] -command [cb find_prev]
- checkbutton $w.cs -text [mc Case-Sensitive] \
+ ${NS}::button $w.bn -text [mc Next] -command [cb find_next]
+ ${NS}::button $w.bp -text [mc Prev] -command [cb find_prev]
+ ${NS}::checkbutton $w.cs -text [mc Case-Sensitive] \
-variable ${__this}::casesensitive -command [cb _incrsearch]
pack $w.l -side left
pack $w.cs -side right
diff --git a/git-gui/lib/shortcut.tcl b/git-gui/lib/shortcut.tcl
index 2f20eb39c0..79c1888e11 100644
--- a/git-gui/lib/shortcut.tcl
+++ b/git-gui/lib/shortcut.tcl
@@ -2,6 +2,7 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc do_windows_shortcut {} {
+ global _gitworktree
set fn [tk_getSaveFile \
-parent . \
-title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
@@ -15,7 +16,7 @@ proc do_windows_shortcut {} {
[info nameofexecutable] \
[file normalize $::argv0] \
] \
- [file dirname [file normalize [gitdir]]]
+ [file normalize [$_gitworktree]]
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}
@@ -23,7 +24,7 @@ proc do_windows_shortcut {} {
}
proc do_cygwin_shortcut {} {
- global argv0
+ global argv0 _gitworktree
if {[catch {
set desktop [exec cygpath \
@@ -56,7 +57,7 @@ proc do_cygwin_shortcut {} {
$sh -c \
"CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
] \
- [file dirname [file normalize [gitdir]]]
+ [file normalize [$_gitworktree]]
} err]} {
error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
}
diff --git a/git-gui/lib/sshkey.tcl b/git-gui/lib/sshkey.tcl
index 82a1a80ff4..5f75bc96b3 100644
--- a/git-gui/lib/sshkey.tcl
+++ b/git-gui/lib/sshkey.tcl
@@ -15,7 +15,7 @@ proc find_ssh_key {} {
}
proc do_ssh_key {} {
- global sshkey_title have_tk85 sshkey_fd
+ global sshkey_title have_tk85 sshkey_fd use_ttk NS
set w .sshkey_dialog
if {[winfo exists $w]} {
@@ -23,7 +23,7 @@ proc do_ssh_key {} {
return
}
- toplevel $w
+ Dialog $w
wm transient $w .
set finfo [find_ssh_key]
@@ -35,9 +35,9 @@ proc do_ssh_key {} {
set gen_state disabled
}
- frame $w.header -relief flat
- label $w.header.lbl -textvariable sshkey_title -anchor w
- button $w.header.gen -text [mc "Generate Key"] \
+ ${NS}::frame $w.header
+ ${NS}::label $w.header.lbl -textvariable sshkey_title -anchor w
+ ${NS}::button $w.header.gen -text [mc "Generate Key"] \
-command [list make_ssh_key $w] -state $gen_state
pack $w.header.lbl -side left -expand 1 -fill x
pack $w.header.gen -side right
@@ -46,14 +46,16 @@ proc do_ssh_key {} {
text $w.contents -width 60 -height 10 -wrap char -relief sunken
pack $w.contents -fill both -expand 1
if {$have_tk85} {
- $w.contents configure -inactiveselectbackground darkblue
+ set clr darkblue
+ if {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }
+ $w.contents configure -inactiveselectbackground $clr
}
- frame $w.buttons
- button $w.buttons.close -text [mc Close] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.close -text [mc Close] \
-default active -command [list destroy $w]
pack $w.buttons.close -side right
- button $w.buttons.copy -text [mc "Copy To Clipboard"] \
+ ${NS}::button $w.buttons.copy -text [mc "Copy To Clipboard"] \
-command [list tk_textCopy $w.contents]
pack $w.buttons.copy -side left
pack $w.buttons -side bottom -fill x -pady 5 -padx 5
diff --git a/git-gui/lib/status_bar.tcl b/git-gui/lib/status_bar.tcl
index 51d4177551..5fe3aad382 100644
--- a/git-gui/lib/status_bar.tcl
+++ b/git-gui/lib/status_bar.tcl
@@ -13,14 +13,16 @@ field units {}; # unit of progress
field meter {}; # current core git progress meter (if active)
constructor new {path} {
+ global use_ttk NS
set w $path
set w_l $w.l
set w_c $w.c
- frame $w \
- -borderwidth 1 \
- -relief sunken
- label $w_l \
+ ${NS}::frame $w
+ if {!$use_ttk} {
+ $w configure -borderwidth 1 -relief sunken
+ }
+ ${NS}::label $w_l \
-textvariable @status \
-anchor w \
-justify left
@@ -41,8 +43,8 @@ constructor two_line {path} {
set w_l $w.l
set w_c $w.c
- frame $w
- label $w_l \
+ ${NS}::frame $w
+ ${NS}::label $w_l \
-textvariable @status \
-anchor w \
-justify left
diff --git a/git-gui/lib/themed.tcl b/git-gui/lib/themed.tcl
new file mode 100644
index 0000000000..1da458673b
--- /dev/null
+++ b/git-gui/lib/themed.tcl
@@ -0,0 +1,174 @@
+# Functions for supporting the use of themed Tk widgets in git-gui.
+# Copyright (C) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+proc InitTheme {} {
+ # Create a color label style (bg can be overridden by widget option)
+ ttk::style layout Color.TLabel {
+ Color.Label.border -sticky news -children {
+ Color.label.fill -sticky news -children {
+ Color.Label.padding -sticky news -children {
+ Color.Label.label -sticky news}}}}
+ eval [linsert [ttk::style configure TLabel] 0 \
+ ttk::style configure Color.TLabel]
+ ttk::style configure Color.TLabel \
+ -borderwidth 0 -relief flat -padding 2
+ ttk::style map Color.TLabel -background {{} gold}
+ # We also need a padded label.
+ ttk::style configure Padded.TLabel \
+ -padding {5 5} -borderwidth 1 -relief solid
+ # We need a gold frame.
+ ttk::style layout Gold.TFrame {
+ Gold.Frame.border -sticky nswe -children {
+ Gold.Frame.fill -sticky nswe}}
+ ttk::style configure Gold.TFrame -background gold -relief flat
+ # listboxes should have a theme border so embed in ttk::frame
+ ttk::style layout SListbox.TFrame {
+ SListbox.Frame.Entry.field -sticky news -border true -children {
+ SListbox.Frame.padding -sticky news
+ }
+ }
+}
+
+proc gold_frame {w args} {
+ global use_ttk
+ if {$use_ttk} {
+ eval [linsert $args 0 ttk::frame $w -style Gold.TFrame]
+ } else {
+ eval [linsert $args 0 frame $w -background gold]
+ }
+}
+
+proc tlabel {w args} {
+ global use_ttk
+ if {$use_ttk} {
+ set cmd [list ttk::label $w -style Color.TLabel]
+ foreach {k v} $args {
+ switch -glob -- $k {
+ -activebackground {}
+ default { lappend cmd $k $v }
+ }
+ }
+ eval $cmd
+ } else {
+ eval [linsert $args 0 label $w]
+ }
+}
+
+# The padded label gets used in the about class.
+proc paddedlabel {w args} {
+ global use_ttk
+ if {$use_ttk} {
+ eval [linsert $args 0 ttk::label $w -style Padded.TLabel]
+ } else {
+ eval [linsert $args 0 label $w \
+ -padx 5 -pady 5 \
+ -justify left \
+ -anchor w \
+ -borderwidth 1 \
+ -relief solid]
+ }
+}
+
+# Create a toplevel for use as a dialog.
+# If available, sets the EWMH dialog hint and if ttk is enabled
+# place a themed frame over the surface.
+proc Dialog {w args} {
+ eval [linsert $args 0 toplevel $w -class Dialog]
+ pave_toplevel $w
+ return $w
+}
+
+# Tk toplevels are not themed - so pave it over with a themed frame to get
+# the base color correct per theme.
+proc pave_toplevel {w} {
+ global use_ttk
+ if {$use_ttk && ![winfo exists $w.!paving]} {
+ set paving [ttk::frame $w.!paving]
+ place $paving -x 0 -y 0 -relwidth 1 -relheight 1
+ lower $paving
+ }
+}
+
+# Create a scrolled listbox with appropriate border for the current theme.
+# On many themes the border for a scrolled listbox needs to go around the
+# listbox and the scrollbar.
+proc slistbox {w args} {
+ global use_ttk NS
+ if {$use_ttk} {
+ set f [ttk::frame $w -style SListbox.TFrame -padding 2]
+ } else {
+ set f [frame $w -relief flat]
+ }
+ if {[catch {
+ if {$use_ttk} {
+ eval [linsert $args 0 listbox $f.list -relief flat \
+ -highlightthickness 0 -borderwidth 0]
+ } else {
+ eval [linsert $args 0 listbox $f.list]
+ }
+ ${NS}::scrollbar $f.vs -command [list $f.list yview]
+ $f.list configure -yscrollcommand [list $f.vs set]
+ grid $f.list $f.vs -sticky news
+ grid rowconfigure $f 0 -weight 1
+ grid columnconfigure $f 0 -weight 1
+ bind $f.list <<ListboxSelect>> \
+ [list event generate $w <<ListboxSelect>>]
+ interp hide {} $w
+ interp alias {} $w {} $f.list
+ } err]} {
+ destroy $f
+ return -code error $err
+ }
+ return $w
+}
+
+# fetch the background color from a widget.
+proc get_bg_color {w} {
+ global use_ttk
+ if {$use_ttk} {
+ set bg [ttk::style lookup [winfo class $w] -background]
+ } else {
+ set bg [$w cget -background]
+ }
+ return $bg
+}
+
+# ttk::spinbox didn't get added until 8.6
+proc tspinbox {w args} {
+ global use_ttk
+ if {$use_ttk && [llength [info commands ttk::spinbox]] > 0} {
+ eval [linsert $args 0 ttk::spinbox $w]
+ } else {
+ eval [linsert $args 0 spinbox $w]
+ }
+}
+
+# Tk 8.6 provides a standard font selection dialog. This uses the native
+# dialogs on Windows and MacOSX or a standard Tk dialog on X11.
+proc tchoosefont {w title familyvar sizevar} {
+ if {[package vsatisfies [package provide Tk] 8.6]} {
+ upvar #0 $familyvar family
+ upvar #0 $sizevar size
+ tk fontchooser configure -parent $w -title $title \
+ -font [list $family $size] \
+ -command [list on_choosefont $familyvar $sizevar]
+ tk fontchooser show
+ } else {
+ choose_font::pick $w $title $familyvar $sizevar
+ }
+}
+
+# Called when the Tk 8.6 fontchooser selects a font.
+proc on_choosefont {familyvar sizevar font} {
+ upvar #0 $familyvar family
+ upvar #0 $sizevar size
+ set font [font actual $font]
+ set family [dict get $font -family]
+ set size [dict get $font -size]
+}
+
+# Local variables:
+# mode: tcl
+# indent-tabs-mode: t
+# tab-width: 4
+# End:
diff --git a/git-gui/lib/tools_dlg.tcl b/git-gui/lib/tools_dlg.tcl
index 5f7f08e239..7eeda9daf2 100644
--- a/git-gui/lib/tools_dlg.tcl
+++ b/git-gui/lib/tools_dlg.tcl
@@ -16,53 +16,50 @@ field ask_branch 0; # ask for a revision
field ask_args 0; # ask for additional args
constructor dialog {} {
- global repo_config
+ global repo_config use_ttk NS
- make_toplevel top w
+ make_dialog top w
wm title $top [append "[appname] ([reponame]): " [mc "Add Tool"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
wm transient $top .
}
- label $w.header -text [mc "Add New Tool Command"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Add New Tool Command"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- checkbutton $w.buttons.global \
+ ${NS}::frame $w.buttons
+ ${NS}::checkbutton $w.buttons.global \
-text [mc "Add globally"] \
-variable @add_global
pack $w.buttons.global -side left -padx 5
- button $w.buttons.create -text [mc Add] \
+ ${NS}::button $w.buttons.create -text [mc Add] \
-default active \
-command [cb _add]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.desc -text [mc "Tool Details"]
+ ${NS}::labelframe $w.desc -text [mc "Tool Details"]
- label $w.desc.name_cmnt -anchor w\
+ ${NS}::label $w.desc.name_cmnt -anchor w\
-text [mc "Use '/' separators to create a submenu tree:"]
grid x $w.desc.name_cmnt -sticky we -padx {0 5} -pady {0 2}
- label $w.desc.name_l -text [mc "Name:"]
+ ${NS}::label $w.desc.name_l -text [mc "Name:"]
set w_name $w.desc.name_t
- entry $w_name \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate_name %d %S]
grid $w.desc.name_l $w_name -sticky we -padx {0 5}
- label $w.desc.cmd_l -text [mc "Command:"]
+ ${NS}::label $w.desc.cmd_l -text [mc "Command:"]
set w_cmd $w.desc.cmd_t
- entry $w_cmd \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_cmd \
-width 40 \
-textvariable @command
grid $w.desc.cmd_l $w_cmd -sticky we -padx {0 5} -pady {0 3}
@@ -70,30 +67,30 @@ constructor dialog {} {
grid columnconfigure $w.desc 1 -weight 1
pack $w.desc -anchor nw -fill x -pady 5 -padx 5
- checkbutton $w.confirm \
+ ${NS}::checkbutton $w.confirm \
-text [mc "Show a dialog before running"] \
-variable @confirm -command [cb _check_enable_dlg]
- labelframe $w.dlg -labelwidget $w.confirm
+ ${NS}::labelframe $w.dlg -labelwidget $w.confirm
- checkbutton $w.dlg.askbranch \
+ ${NS}::checkbutton $w.dlg.askbranch \
-text [mc "Ask the user to select a revision (sets \$REVISION)"] \
-variable @ask_branch -state disabled
pack $w.dlg.askbranch -anchor w -padx 15
- checkbutton $w.dlg.askargs \
+ ${NS}::checkbutton $w.dlg.askargs \
-text [mc "Ask the user for additional arguments (sets \$ARGS)"] \
-variable @ask_args -state disabled
pack $w.dlg.askargs -anchor w -padx 15
pack $w.dlg -anchor nw -fill x -pady {0 8} -padx 5
- checkbutton $w.noconsole \
+ ${NS}::checkbutton $w.noconsole \
-text [mc "Don't show the command output window"] \
-variable @no_console
pack $w.noconsole -anchor w -padx 5
- checkbutton $w.needsfile \
+ ${NS}::checkbutton $w.needsfile \
-text [mc "Run only if a diff is selected (\$FILENAME not empty)"] \
-variable @needs_file
pack $w.needsfile -anchor w -padx 5
@@ -182,40 +179,38 @@ field w ; # widget path
field w_names ; # name list
constructor dialog {} {
- global repo_config global_config system_config
+ global repo_config global_config system_config use_ttk NS
load_config 1
- make_toplevel top w
+ make_dialog top w
wm title $top [append "[appname] ([reponame]): " [mc "Remove Tool"]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
wm transient $top .
}
- label $w.header -text [mc "Remove Tool Commands"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Remove Tool Commands"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.create -text [mc Remove] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.create -text [mc Remove] \
-default active \
-command [cb _remove]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc Cancel] \
+ ${NS}::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- frame $w.list
+ ${NS}::frame $w.list
set w_names $w.list.l
- listbox $w_names \
+ slistbox $w_names \
-height 10 \
-width 30 \
-selectmode extended \
- -exportselection false \
- -yscrollcommand [list $w.list.sby set]
- scrollbar $w.list.sby -command [list $w.list.l yview]
- pack $w.list.sby -side right -fill y
+ -exportselection false
pack $w.list.l -side left -fill both -expand 1
pack $w.list -fill both -expand 1 -pady 5 -padx 5
@@ -232,7 +227,7 @@ constructor dialog {} {
}
if {$local_cnt > 0} {
- label $w.colorlbl -foreground blue \
+ ${NS}::label $w.colorlbl -foreground blue \
-text [mc "(Blue denotes repository-local tools)"]
pack $w.colorlbl -fill x -pady 5 -padx 5
}
@@ -277,14 +272,14 @@ field is_ok 0; # ok to start
field argstr {}; # arguments
constructor dialog {fullname} {
- global M1B
+ global M1B use_ttk NS
set title [get_config "guitool.$fullname.title"]
if {$title eq {}} {
regsub {/} $fullname { / } title
}
- make_toplevel top w -autodelete 0
+ make_dialog top w -autodelete 0
wm title $top [append "[appname] ([reponame]): " $title]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
@@ -297,7 +292,7 @@ constructor dialog {fullname} {
set prompt [mc "Run Command: %s" $command]
}
- label $w.header -text $prompt -font font_uibold
+ ${NS}::label $w.header -text $prompt -font font_uibold -anchor center
pack $w.header -side top -fill x
set argprompt [get_config "guitool.$fullname.argprompt"]
@@ -311,12 +306,10 @@ constructor dialog {fullname} {
set argprompt [mc "Arguments"]
}
- labelframe $w.arg -text $argprompt
+ ${NS}::labelframe $w.arg -text $argprompt
set w_args $w.arg.txt
- entry $w_args \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w_args \
-width 40 \
-textvariable @argstr
pack $w_args -padx 5 -pady 5 -fill both
@@ -337,18 +330,18 @@ constructor dialog {fullname} {
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5
}
- frame $w.buttons
+ ${NS}::frame $w.buttons
if {$is_ask_revs} {
- button $w.buttons.visualize \
+ ${NS}::button $w.buttons.visualize \
-text [mc Visualize] \
-command [cb _visualize]
pack $w.buttons.visualize -side left
}
- button $w.buttons.ok \
+ ${NS}::button $w.buttons.ok \
-text [mc OK] \
-command [cb _start]
pack $w.buttons.ok -side right
- button $w.buttons.cancel \
+ ${NS}::button $w.buttons.cancel \
-text [mc "Cancel"] \
-command [cb _cancel]
pack $w.buttons.cancel -side right -padx 5
diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
index b18d9c7a1b..60e3a642c5 100644
--- a/git-gui/lib/transport.tcl
+++ b/git-gui/lib/transport.tcl
@@ -91,50 +91,55 @@ trace add variable push_remote write \
proc do_push_anywhere {} {
global all_remotes current_branch
global push_urltype push_remote push_url push_thin push_tags
- global push_force
+ global push_force use_ttk NS
set w .push_setup
toplevel $w
+ wm withdraw $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
+ pave_toplevel $w
- label $w.header -text [mc "Push Branches"] -font font_uibold
+ ${NS}::label $w.header -text [mc "Push Branches"] \
+ -font font_uibold -anchor center
pack $w.header -side top -fill x
- frame $w.buttons
- button $w.buttons.create -text [mc Push] \
+ ${NS}::frame $w.buttons
+ ${NS}::button $w.buttons.create -text [mc Push] \
-default active \
-command [list start_push_anywhere_action $w]
pack $w.buttons.create -side right
- button $w.buttons.cancel -text [mc "Cancel"] \
+ ${NS}::button $w.buttons.cancel -text [mc "Cancel"] \
-default normal \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
- labelframe $w.source -text [mc "Source Branches"]
- listbox $w.source.l \
+ ${NS}::labelframe $w.source -text [mc "Source Branches"]
+ slistbox $w.source.l \
-height 10 \
-width 70 \
- -selectmode extended \
- -yscrollcommand [list $w.source.sby set]
+ -selectmode extended
foreach h [load_all_heads] {
$w.source.l insert end $h
if {$h eq $current_branch} {
$w.source.l select set end
}
}
- scrollbar $w.source.sby -command [list $w.source.l yview]
- pack $w.source.sby -side right -fill y
pack $w.source.l -side left -fill both -expand 1
pack $w.source -fill both -expand 1 -pady 5 -padx 5
- labelframe $w.dest -text [mc "Destination Repository"]
+ ${NS}::labelframe $w.dest -text [mc "Destination Repository"]
if {$all_remotes ne {}} {
- radiobutton $w.dest.remote_r \
+ ${NS}::radiobutton $w.dest.remote_r \
-text [mc "Remote:"] \
-value remote \
-variable push_urltype
- eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
+ if {$use_ttk} {
+ ttk::combobox $w.dest.remote_m -textvariable push_remote \
+ -values $all_remotes
+ } else {
+ eval tk_optionMenu $w.dest.remote_m push_remote $all_remotes
+ }
grid $w.dest.remote_r $w.dest.remote_m -sticky w
if {[lsearch -sorted -exact $all_remotes origin] != -1} {
set push_remote origin
@@ -145,13 +150,11 @@ proc do_push_anywhere {} {
} else {
set push_urltype url
}
- radiobutton $w.dest.url_r \
+ ${NS}::radiobutton $w.dest.url_r \
-text [mc "Arbitrary Location:"] \
-value url \
-variable push_urltype
- entry $w.dest.url_t \
- -borderwidth 1 \
- -relief sunken \
+ ${NS}::entry $w.dest.url_t \
-width 50 \
-textvariable push_url \
-validate key \
@@ -166,16 +169,16 @@ proc do_push_anywhere {} {
grid columnconfigure $w.dest 1 -weight 1
pack $w.dest -anchor nw -fill x -pady 5 -padx 5
- labelframe $w.options -text [mc "Transfer Options"]
- checkbutton $w.options.force \
+ ${NS}::labelframe $w.options -text [mc "Transfer Options"]
+ ${NS}::checkbutton $w.options.force \
-text [mc "Force overwrite existing branch (may discard changes)"] \
-variable push_force
grid $w.options.force -columnspan 2 -sticky w
- checkbutton $w.options.thin \
+ ${NS}::checkbutton $w.options.thin \
-text [mc "Use thin pack (for slow network connections)"] \
-variable push_thin
grid $w.options.thin -columnspan 2 -sticky w
- checkbutton $w.options.tags \
+ ${NS}::checkbutton $w.options.tags \
-text [mc "Include tags"] \
-variable push_tags
grid $w.options.tags -columnspan 2 -sticky w
@@ -191,5 +194,6 @@ proc do_push_anywhere {} {
bind $w <Key-Escape> "destroy $w"
bind $w <Key-Return> [list start_push_anywhere_action $w]
wm title $w [append "[appname] ([reponame]): " [mc "Push"]]
+ wm deiconify $w
tkwait window $w
}
diff --git a/git-gui/po/de.po b/git-gui/po/de.po
index 51abb50bb6..44c5ddc8b6 100644
--- a/git-gui/po/de.po
+++ b/git-gui/po/de.po
@@ -7,41 +7,41 @@ msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-12-06 20:51+0100\n"
-"PO-Revision-Date: 2008-12-06 21:22+0100\n"
+"POT-Creation-Date: 2010-01-26 22:22+0100\n"
+"PO-Revision-Date: 2010-01-26 22:25+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"
-#: git-gui.sh:41 git-gui.sh:634 git-gui.sh:648 git-gui.sh:661 git-gui.sh:744
-#: git-gui.sh:763
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr "git-gui: Programmfehler"
-#: git-gui.sh:593
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "Ungültige Zeichensatz-Angabe in %s:"
-#: git-gui.sh:620
+#: git-gui.sh:779
msgid "Main Font"
msgstr "Programmschriftart"
-#: git-gui.sh:621
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr "Vergleich-Schriftart"
-#: git-gui.sh:635
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr "Git kann im PATH nicht gefunden werden."
-#: git-gui.sh:662
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr "Git Versionsangabe kann nicht erkannt werden:"
-#: git-gui.sh:680
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -60,447 +60,479 @@ msgstr ""
"\n"
"Soll angenommen werden, »%s« sei Version 1.5.0?\n"
-#: git-gui.sh:918
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr "Git-Verzeichnis nicht gefunden:"
-#: git-gui.sh:925
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr ""
"Es konnte nicht in das oberste Verzeichnis der Arbeitskopie gewechselt "
"werden:"
-#: git-gui.sh:932
-msgid "Cannot use funny .git directory:"
-msgstr "Unerwartete Struktur des .git Verzeichnis:"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
+msgstr "Leeres Projektarchiv kann nicht benutzt werden:"
-#: git-gui.sh:937
+#: git-gui.sh:1162
msgid "No working directory"
msgstr "Kein Arbeitsverzeichnis"
-#: git-gui.sh:1084 lib/checkout_op.tcl:283
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "Dateistatus aktualisieren..."
-#: git-gui.sh:1149
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr "Nach geänderten Dateien suchen..."
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr "Aufrufen der Eintragen-Vorbereiten-Kontrolle..."
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
-msgstr "Eintragen abgelehnt durch Eintragen-Vorbereiten-Kontrolle (»prepare-commit hook«)."
+msgstr ""
+"Eintragen abgelehnt durch Eintragen-Vorbereiten-Kontrolle (»prepare-commit "
+"hook«)."
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr "Bereit."
-#: git-gui.sh:1590
+#: git-gui.sh:1787
+#, tcl-format
+msgid "Displaying only %s of %s files."
+msgstr "Nur %s von %s Dateien werden angezeigt."
+
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr "Unverändert"
-#: git-gui.sh:1592
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr "Verändert, nicht bereitgestellt"
-#: git-gui.sh:1593 git-gui.sh:1598
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr "Bereitgestellt zum Eintragen"
-#: git-gui.sh:1594 git-gui.sh:1599
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr "Teilweise bereitgestellt zum Eintragen"
-#: git-gui.sh:1595 git-gui.sh:1600
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr "Bereitgestellt zum Eintragen, fehlend"
-#: git-gui.sh:1658
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr "Dateityp geändert, nicht bereitgestellt"
-#: git-gui.sh:1659
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr "Dateityp geändert, bereitgestellt"
-#: git-gui.sh:1661
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr "Nicht unter Versionskontrolle, nicht bereitgestellt"
-#: git-gui.sh:1602
+#: git-gui.sh:1928
msgid "Missing"
msgstr "Fehlend"
-#: git-gui.sh:1603
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr "Bereitgestellt zum Löschen"
-#: git-gui.sh:1604
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr "Bereitgestellt zum Löschen, trotzdem vorhanden"
-#: git-gui.sh:1606 git-gui.sh:1607 git-gui.sh:1608 git-gui.sh:1609
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr "Konfliktauflösung nötig"
-#: git-gui.sh:1644
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr "Gitk wird gestartet... bitte warten."
-#: git-gui.sh:1698
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
msgstr "Gitk kann im PATH nicht gefunden werden."
-#: git-gui.sh:1948 lib/choose_repository.tcl:36
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr "»Git gui« kann im PATH nicht gefunden werden."
+
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "Projektarchiv"
-#: git-gui.sh:1861
+#: git-gui.sh:2456
msgid "Edit"
msgstr "Bearbeiten"
-#: git-gui.sh:1863 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "Zweig"
-#: git-gui.sh:1866 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "Version"
-#: git-gui.sh:1869 lib/merge.tcl:120 lib/merge.tcl:149 lib/merge.tcl:167
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr "Zusammenführen"
-#: git-gui.sh:1870 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr "Andere Archive"
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
msgstr "Werkzeuge"
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr "Arbeitskopie im Dateimanager"
-#: git-gui.sh:2247
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr "Aktuellen Zweig durchblättern"
-#: git-gui.sh:1883
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr "Einen Zweig durchblättern..."
-#: git-gui.sh:1888
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr "Aktuellen Zweig darstellen"
-#: git-gui.sh:1892
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr "Alle Zweige darstellen"
-#: git-gui.sh:1899
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr "Zweig »%s« durchblättern"
-#: git-gui.sh:1901
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr "Historie von »%s« darstellen"
-#: git-gui.sh:1906 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr "Datenbankstatistik"
-#: git-gui.sh:1909 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr "Datenbank komprimieren"
-#: git-gui.sh:1912
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr "Datenbank überprüfen"
-#: git-gui.sh:1919 git-gui.sh:1923 git-gui.sh:1927 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr "Desktop-Icon erstellen"
-#: git-gui.sh:1932 lib/choose_repository.tcl:177 lib/choose_repository.tcl:185
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr "Beenden"
-#: git-gui.sh:1939
+#: git-gui.sh:2547
msgid "Undo"
msgstr "Rückgängig"
-#: git-gui.sh:1942
+#: git-gui.sh:2550
msgid "Redo"
msgstr "Wiederholen"
-#: git-gui.sh:1946 git-gui.sh:2443
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr "Ausschneiden"
-#: git-gui.sh:1949 git-gui.sh:2446 git-gui.sh:2520 git-gui.sh:2614
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr "Kopieren"
-#: git-gui.sh:1952 git-gui.sh:2449
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr "Einfügen"
-#: git-gui.sh:1955 git-gui.sh:2452 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "Löschen"
-#: git-gui.sh:1959 git-gui.sh:2456 git-gui.sh:2618 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr "Alle auswählen"
-#: git-gui.sh:1968
+#: git-gui.sh:2576
msgid "Create..."
msgstr "Erstellen..."
-#: git-gui.sh:1974
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr "Umstellen..."
-#: git-gui.sh:1980
+#: git-gui.sh:2588
msgid "Rename..."
msgstr "Umbenennen..."
-#: git-gui.sh:1985 git-gui.sh:2085
+#: git-gui.sh:2593
msgid "Delete..."
msgstr "Löschen..."
-#: git-gui.sh:1990
+#: git-gui.sh:2598
msgid "Reset..."
msgstr "Zurücksetzen..."
-#: git-gui.sh:2372
+#: git-gui.sh:2608
msgid "Done"
msgstr "Fertig"
-#: git-gui.sh:2374
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr "Eintragen"
-#: git-gui.sh:2383 git-gui.sh:2786
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr "Neue Version"
-#: git-gui.sh:2010 git-gui.sh:2396
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr "Letzte nachbessern"
-#: git-gui.sh:2019 git-gui.sh:2356 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr "Neu laden"
-#: git-gui.sh:2025
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr "Zum Eintragen bereitstellen"
-#: git-gui.sh:2031
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr "Geänderte Dateien bereitstellen"
-#: git-gui.sh:2037
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr "Aus der Bereitstellung herausnehmen"
-#: git-gui.sh:2042 lib/index.tcl:395
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr "Änderungen verwerfen"
-#: git-gui.sh:2141 git-gui.sh:2702
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr "Weniger Zeilen anzeigen"
-#: git-gui.sh:2145 git-gui.sh:2706
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr "Mehr Zeilen anzeigen"
-#: git-gui.sh:2151 git-gui.sh:2470 git-gui.sh:2569
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr "Abzeichnen"
-#: git-gui.sh:2458
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr "Lokales Zusammenführen..."
-#: git-gui.sh:2069
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr "Zusammenführen abbrechen..."
-#: git-gui.sh:2475
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr "Hinzufügen..."
-#: git-gui.sh:2479
+#: git-gui.sh:2717
msgid "Push..."
msgstr "Versenden..."
-#: git-gui.sh:2483
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr "Zweig löschen..."
-#: git-gui.sh:2493 git-gui.sh:2515 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:50
-#, tcl-format
-msgid "About %s"
-msgstr "Über %s"
-
-#: git-gui.sh:2099
-msgid "Preferences..."
-msgstr "Einstellungen..."
-
-#: git-gui.sh:2107 git-gui.sh:2639
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr "Optionen..."
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr "Entfernen..."
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr "Hilfe"
-#: git-gui.sh:2154
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr "Über %s"
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr "Online-Dokumentation"
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr "SSH-Schlüssel anzeigen"
-#: git-gui.sh:2707
+#: git-gui.sh:2893
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr ""
"Fehler: Verzeichnis »%s« kann nicht gelesen werden: Datei oder Verzeichnis "
"nicht gefunden"
-#: git-gui.sh:2271
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr "Aktueller Zweig:"
-#: git-gui.sh:2292
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr "Bereitstellung (zum Eintragen)"
-#: git-gui.sh:2312
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr "Nicht bereitgestellte Änderungen"
-#: git-gui.sh:2362
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr "Alles bereitstellen"
-#: git-gui.sh:2378 lib/transport.tcl:93 lib/transport.tcl:182
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr "Versenden"
-#: git-gui.sh:2408
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr "Erste Versionsbeschreibung:"
-#: git-gui.sh:2409
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr "Nachgebesserte Beschreibung:"
-#: git-gui.sh:2410
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr "Nachgebesserte erste Beschreibung:"
-#: git-gui.sh:2411
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr "Nachgebesserte Zusammenführungs-Beschreibung:"
-#: git-gui.sh:2412
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr "Zusammenführungs-Beschreibung:"
-#: git-gui.sh:2413
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr "Versionsbeschreibung:"
-#: git-gui.sh:2459 git-gui.sh:2622 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr "Alle kopieren"
-#: git-gui.sh:2483 lib/blame.tcl:107
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr "Datei:"
-#: git-gui.sh:2834
+#: git-gui.sh:3255
msgid "Refresh"
msgstr "Aktualisieren"
-#: git-gui.sh:2631
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr "Schriftgröße verkleinern"
-#: git-gui.sh:2635
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr "Schriftgröße vergrößern"
-#: git-gui.sh:3033 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr "Zeichenkodierung"
-#: git-gui.sh:3044
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr "Kontext anwenden/umkehren"
-#: git-gui.sh:2875
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr "Zeile anwenden/umkehren"
-#: git-gui.sh:2885
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr "Zusammenführungswerkzeug"
-#: git-gui.sh:2890
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr "Entfernte Version benutzen"
-#: git-gui.sh:2894
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr "Lokale Version benutzen"
-#: git-gui.sh:2898
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr "Ursprüngliche Version benutzen"
-#: git-gui.sh:3091
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr "Diese Änderungen im Untermodul darstellen"
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr "Aktuellen Zweig im Untermodul darstellen"
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr "Alle Zweige im Untermodul darstellen"
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr "Git gui im Untermodul starten"
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr "Kontext aus Bereitstellung herausnehmen"
-#: git-gui.sh:2748
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr "Zeilen aus der Bereitstellung herausnehmen"
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr "Zeile aus der Bereitstellung herausnehmen"
-#: git-gui.sh:2750
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr "Kontext zur Bereitstellung hinzufügen"
-#: git-gui.sh:2751
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr "Zeilen zur Bereitstellung hinzufügen"
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr "Zeile zur Bereitstellung hinzufügen"
-#: git-gui.sh:2771
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr "Initialisieren..."
-#: git-gui.sh:2762
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -516,7 +548,7 @@ msgstr ""
"von %s an Git weitergegeben werden:\n"
"\n"
-#: git-gui.sh:2792
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -526,7 +558,7 @@ msgstr ""
"Dies ist ein bekanntes Problem der Tcl-Version, die\n"
"in Cygwin mitgeliefert wird."
-#: git-gui.sh:2797
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -546,15 +578,15 @@ msgstr ""
msgid "git-gui - a graphical user interface for Git."
msgstr "git-gui - eine grafische Oberfläche für Git."
-#: lib/blame.tcl:77
+#: lib/blame.tcl:72
msgid "File Viewer"
msgstr "Datei-Browser"
-#: lib/blame.tcl:81
+#: lib/blame.tcl:78
msgid "Commit:"
msgstr "Version:"
-#: lib/blame.tcl:264
+#: lib/blame.tcl:271
msgid "Copy Commit"
msgstr "Version kopieren"
@@ -566,88 +598,88 @@ msgstr "Text suchen..."
msgid "Do Full Copy Detection"
msgstr "Volle Kopie-Erkennung"
-#: lib/blame.tcl:263
+#: lib/blame.tcl:288
msgid "Show History Context"
msgstr "Historien-Kontext anzeigen"
-#: lib/blame.tcl:266
+#: lib/blame.tcl:291
msgid "Blame Parent Commit"
msgstr "Elternversion annotieren"
-#: lib/blame.tcl:394
+#: lib/blame.tcl:450
#, tcl-format
msgid "Reading %s..."
msgstr "%s lesen..."
-#: lib/blame.tcl:488
+#: lib/blame.tcl:557
msgid "Loading copy/move tracking annotations..."
msgstr "Annotierungen für Kopieren/Verschieben werden geladen..."
-#: lib/blame.tcl:508
+#: lib/blame.tcl:577
msgid "lines annotated"
msgstr "Zeilen annotiert"
-#: lib/blame.tcl:689
+#: lib/blame.tcl:769
msgid "Loading original location annotations..."
msgstr "Annotierungen für ursprünglichen Ort werden geladen..."
-#: lib/blame.tcl:692
+#: lib/blame.tcl:772
msgid "Annotation complete."
msgstr "Annotierung vollständig."
-#: lib/blame.tcl:737
+#: lib/blame.tcl:802
msgid "Busy"
msgstr "Verarbeitung läuft"
-#: lib/blame.tcl:738
+#: lib/blame.tcl:803
msgid "Annotation process is already running."
msgstr "Annotierung läuft bereits."
-#: lib/blame.tcl:777
+#: lib/blame.tcl:842
msgid "Running thorough copy detection..."
msgstr "Intensive Kopie-Erkennung läuft..."
-#: lib/blame.tcl:827
+#: lib/blame.tcl:910
msgid "Loading annotation..."
msgstr "Annotierung laden..."
-#: lib/blame.tcl:802
+#: lib/blame.tcl:963
msgid "Author:"
msgstr "Autor:"
-#: lib/blame.tcl:806
+#: lib/blame.tcl:967
msgid "Committer:"
msgstr "Eintragender:"
-#: lib/blame.tcl:811
+#: lib/blame.tcl:972
msgid "Original File:"
msgstr "Ursprüngliche Datei:"
-#: lib/blame.tcl:1021
+#: lib/blame.tcl:1020
msgid "Cannot find HEAD commit:"
msgstr "Zweigspitze (»HEAD«) kann nicht gefunden werden:"
-#: lib/blame.tcl:1076
+#: lib/blame.tcl:1075
msgid "Cannot find parent commit:"
msgstr "Elternversion kann nicht gefunden werden:"
-#: lib/blame.tcl:1001
+#: lib/blame.tcl:1090
msgid "Unable to display parent"
msgstr "Elternversion kann nicht angezeigt werden"
-#: lib/blame.tcl:1002 lib/diff.tcl:191
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr "Fehler beim Laden des Vergleichs:"
-#: lib/blame.tcl:1142
+#: lib/blame.tcl:1231
msgid "Originally By:"
msgstr "Ursprünglich von:"
-#: lib/blame.tcl:931
+#: lib/blame.tcl:1237
msgid "In File:"
msgstr "In Datei:"
-#: lib/blame.tcl:936
+#: lib/blame.tcl:1242
msgid "Copied Or Moved Here By:"
msgstr "Kopiert oder verschoben durch:"
@@ -661,16 +693,18 @@ msgstr "Umstellen"
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:522 lib/choose_font.tcl:43 lib/merge.tcl:171
-#: lib/option.tcl:103 lib/remote_branch_delete.tcl:42 lib/transport.tcl:97
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
+#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
+#: lib/transport.tcl:108
msgid "Cancel"
msgstr "Abbrechen"
-#: lib/branch_checkout.tcl:32 lib/browser.tcl:287
+#: lib/branch_checkout.tcl:32 lib/browser.tcl:287 lib/tools_dlg.tcl:328
msgid "Revision"
msgstr "Version"
-#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:242
+#: lib/branch_checkout.tcl:36 lib/branch_create.tcl:69 lib/option.tcl:280
msgid "Options"
msgstr "Optionen"
@@ -690,7 +724,7 @@ msgstr "Zweig erstellen"
msgid "Create New Branch"
msgstr "Neuen Zweig erstellen"
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:371
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr "Erstellen"
@@ -698,7 +732,7 @@ msgstr "Erstellen"
msgid "Branch Name"
msgstr "Zweigname"
-#: lib/branch_create.tcl:43
+#: lib/branch_create.tcl:43 lib/remote_add.tcl:39 lib/tools_dlg.tcl:50
msgid "Name:"
msgstr "Name:"
@@ -722,7 +756,7 @@ msgstr "Nein"
msgid "Fast Forward Only"
msgstr "Nur Schnellzusammenführung"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:514
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr "Zurücksetzen"
@@ -764,15 +798,26 @@ msgstr "Lokale Zweige"
msgid "Delete Only If Merged Into"
msgstr "Nur löschen, wenn zusammengeführt nach"
-#: lib/branch_delete.tcl:54
-msgid "Always (Do not perform merge test.)"
-msgstr "Immer (ohne Zusammenführungstest)"
+#: lib/branch_delete.tcl:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "Immer (Keine Zusammenführungsprüfung)"
#: lib/branch_delete.tcl:103
#, tcl-format
msgid "The following branches are not completely merged into %s:"
msgstr "Folgende Zweige sind noch nicht mit »%s« zusammengeführt:"
+#: lib/branch_delete.tcl:115 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Das Wiederherstellen von gelöschten Zweigen ist nur mit größerem Aufwand "
+"möglich.\n"
+"\n"
+"Sollen die ausgewählten Zweige gelöscht werden?"
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -802,7 +847,7 @@ msgstr "Neuer Name:"
msgid "Please select a branch to rename."
msgstr "Bitte wählen Sie einen Zweig zum umbenennen."
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:179
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "Zweig »%s« existiert bereits."
@@ -833,37 +878,38 @@ msgstr "[Nach oben]"
msgid "Browse Branch Files"
msgstr "Dateien des Zweigs durchblättern"
-#: lib/browser.tcl:278 lib/choose_repository.tcl:387
-#: lib/choose_repository.tcl:474 lib/choose_repository.tcl:484
-#: lib/choose_repository.tcl:987
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr "Blättern"
-#: lib/checkout_op.tcl:79
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr "Änderungen »%s« von »%s« anfordern"
-#: lib/checkout_op.tcl:127
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "Fehler: »%s« kann nicht als Zweig oder Version erkannt werden"
-#: lib/checkout_op.tcl:140 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
+#: lib/sshkey.tcl:53
msgid "Close"
msgstr "Schließen"
-#: lib/checkout_op.tcl:169
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "Zweig »%s« existiert nicht."
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr "Fehler beim Einrichten der vereinfachten git-pull für »%s«."
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -876,21 +922,21 @@ msgstr ""
"Zweig kann nicht mit »%s« schnellzusammengeführt werden. Reguläres "
"Zusammenführen ist notwendig."
-#: lib/checkout_op.tcl:220
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "Zusammenführungsmethode »%s« nicht unterstützt."
-#: lib/checkout_op.tcl:239
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "Aktualisieren von »%s« fehlgeschlagen."
-#: lib/checkout_op.tcl:251
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr "Bereitstellung (»index«) ist zur Bearbeitung gesperrt (»locked«)."
-#: lib/checkout_op.tcl:266
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -906,32 +952,32 @@ msgstr ""
"\n"
"Es wird gleich neu geladen.\n"
-#: lib/checkout_op.tcl:322
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Arbeitskopie umstellen auf »%s«..."
-#: lib/checkout_op.tcl:323
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "Dateien aktualisiert"
-#: lib/checkout_op.tcl:353
+#: lib/checkout_op.tcl:376
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
msgstr ""
"Auf Zweig »%s« umstellen abgebrochen (Zusammenführen der Dateien ist "
"notwendig)."
-#: lib/checkout_op.tcl:354
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr "Zusammenführen der Dateien ist notwendig."
-#: lib/checkout_op.tcl:358
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Es wird auf Zweig »%s« verblieben."
-#: lib/checkout_op.tcl:429
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -943,32 +989,32 @@ msgstr ""
"Wenn Sie auf einem Zweig arbeiten möchten, erstellen Sie bitte jetzt einen "
"Zweig mit der Auswahl »Abgetrennte Arbeitskopie-Version«."
-#: lib/checkout_op.tcl:446 lib/checkout_op.tcl:450
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr "Umgestellt auf »%s«."
-#: lib/checkout_op.tcl:478
+#: lib/checkout_op.tcl:535
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr "Zurücksetzen von »%s« nach »%s« wird folgende Versionen verwerfen:"
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:557
msgid "Recovering lost commits may not be easy."
msgstr ""
"Verworfene Versionen können nur mit größerem Aufwand wiederhergestellt "
"werden."
-#: lib/checkout_op.tcl:505
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr "»%s« zurücksetzen?"
-#: lib/checkout_op.tcl:510 lib/merge.tcl:163
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr "Darstellen"
-#: lib/checkout_op.tcl:578
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -1014,231 +1060,231 @@ msgstr ""
msgid "Git Gui"
msgstr "Git Gui"
-#: lib/choose_repository.tcl:81 lib/choose_repository.tcl:376
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr "Neues Projektarchiv"
-#: lib/choose_repository.tcl:87
+#: lib/choose_repository.tcl:93
msgid "New..."
msgstr "Neu..."
-#: lib/choose_repository.tcl:94 lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr "Projektarchiv klonen"
-#: lib/choose_repository.tcl:100
+#: lib/choose_repository.tcl:106
msgid "Clone..."
msgstr "Klonen..."
-#: lib/choose_repository.tcl:107 lib/choose_repository.tcl:976
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr "Projektarchiv öffnen"
-#: lib/choose_repository.tcl:113
+#: lib/choose_repository.tcl:119
msgid "Open..."
msgstr "Öffnen..."
-#: lib/choose_repository.tcl:126
+#: lib/choose_repository.tcl:132
msgid "Recent Repositories"
msgstr "Zuletzt benutzte Projektarchive"
-#: lib/choose_repository.tcl:132
+#: lib/choose_repository.tcl:138
msgid "Open Recent Repository:"
msgstr "Zuletzt benutztes Projektarchiv öffnen:"
-#: lib/choose_repository.tcl:296 lib/choose_repository.tcl:303
-#: lib/choose_repository.tcl:310
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "Projektarchiv »%s« konnte nicht erstellt werden:"
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr "Verzeichnis:"
-#: lib/choose_repository.tcl:412 lib/choose_repository.tcl:537
-#: lib/choose_repository.tcl:1011
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr "Git Projektarchiv"
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr "Verzeichnis »%s« existiert bereits."
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr "Datei »%s« existiert bereits."
-#: lib/choose_repository.tcl:455
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr "Klonen"
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr "Herkunft:"
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr "Zielverzeichnis:"
-#: lib/choose_repository.tcl:490
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr "Art des Klonens:"
-#: lib/choose_repository.tcl:495
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Standard (schnell, teilweise redundant, Hardlinks)"
-#: lib/choose_repository.tcl:501
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Alles kopieren (langsamer, volle Redundanz)"
-#: lib/choose_repository.tcl:507
+#: lib/choose_repository.tcl:520
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr "Verknüpft (schnell, nicht empfohlen, kein Backup)"
-#: lib/choose_repository.tcl:543 lib/choose_repository.tcl:590
-#: lib/choose_repository.tcl:736 lib/choose_repository.tcl:806
-#: lib/choose_repository.tcl:1017 lib/choose_repository.tcl:1025
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "Kein Git-Projektarchiv in »%s« gefunden."
-#: lib/choose_repository.tcl:579
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr "Standard ist nur für lokale Projektarchive verfügbar."
-#: lib/choose_repository.tcl:583
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr "Verknüpft ist nur für lokale Projektarchive verfügbar."
-#: lib/choose_repository.tcl:604
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr "Projektarchiv »%s« existiert bereits."
-#: lib/choose_repository.tcl:615
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr "Der Ursprungsort konnte nicht eingerichtet werden"
-#: lib/choose_repository.tcl:627
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr "Objekte werden gezählt"
-#: lib/choose_repository.tcl:628
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr "Buckets"
-#: lib/choose_repository.tcl:652
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "Kopien von Objekten/Info/Alternates konnten nicht erstellt werden: %s"
-#: lib/choose_repository.tcl:688
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "Von »%s« konnte nichts geklont werden."
-#: lib/choose_repository.tcl:690 lib/choose_repository.tcl:904
-#: lib/choose_repository.tcl:916
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr "Der »master«-Zweig wurde noch nicht initialisiert."
-#: lib/choose_repository.tcl:703
+#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
msgstr "Hardlinks nicht verfügbar. Stattdessen wird kopiert."
-#: lib/choose_repository.tcl:715
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr "Kopieren von »%s«"
-#: lib/choose_repository.tcl:746
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr "Objektdatenbank kopieren"
-#: lib/choose_repository.tcl:747
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr "KB"
-#: lib/choose_repository.tcl:771
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "Objekt kann nicht kopiert werden: %s"
-#: lib/choose_repository.tcl:781
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr "Objekte verlinken"
-#: lib/choose_repository.tcl:782
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr "Objekte"
-#: lib/choose_repository.tcl:790
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "Für Objekt konnte kein Hardlink erstellt werden: %s"
-#: lib/choose_repository.tcl:845
+#: lib/choose_repository.tcl:858
msgid "Cannot fetch branches and objects. See console output for details."
msgstr ""
"Zweige und Objekte konnten nicht angefordert werden. Kontrollieren Sie die "
"Ausgaben auf der Konsole für weitere Angaben."
-#: lib/choose_repository.tcl:856
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr ""
"Markierungen konnten nicht angefordert werden. Kontrollieren Sie die "
"Ausgaben auf der Konsole für weitere Angaben."
-#: lib/choose_repository.tcl:880
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
msgstr ""
"Die Zweigspitze (HEAD) konnte nicht gefunden werden. Kontrollieren Sie die "
"Ausgaben auf der Konsole für weitere Angaben."
-#: lib/choose_repository.tcl:889
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "Verzeichnis »%s« kann nicht aufgeräumt werden."
-#: lib/choose_repository.tcl:895
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr "Klonen fehlgeschlagen."
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr "Kein voreingestellter Zweig gefunden."
-#: lib/choose_repository.tcl:913
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "»%s« wurde nicht als Version gefunden."
-#: lib/choose_repository.tcl:925
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr "Arbeitskopie erstellen"
-#: lib/choose_repository.tcl:926 lib/index.tcl:65 lib/index.tcl:127
-#: lib/index.tcl:193
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr "Dateien"
-#: lib/choose_repository.tcl:955
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr "Erstellen der Arbeitskopie fehlgeschlagen."
-#: lib/choose_repository.tcl:971
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr "Öffnen"
-#: lib/choose_repository.tcl:981
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr "Projektarchiv:"
-#: lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "Projektarchiv »%s« konnte nicht geöffnet werden."
@@ -1311,19 +1357,24 @@ msgstr ""
"unfertige Zusammenführung existiert. Dazu müssen Sie die Zusammenführung "
"beenden oder abbrechen.\n"
-#: lib/commit.tcl:49
+#: lib/commit.tcl:48
msgid "Error loading commit data for amend:"
msgstr "Fehler beim Laden der Versionsdaten für Nachbessern:"
-#: lib/commit.tcl:76
+#: lib/commit.tcl:75
msgid "Unable to obtain your identity:"
msgstr "Benutzername konnte nicht bestimmt werden:"
-#: lib/commit.tcl:81
+#: lib/commit.tcl:80
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "Ungültiger Wert von GIT_COMMITTER_INDENT:"
-#: lib/commit.tcl:133
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "Warning: Tcl/Tk unterstützt die Zeichencodierung »%s« nicht."
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1339,7 +1390,7 @@ msgstr ""
"\n"
"Es wird gleich neu geladen.\n"
-#: lib/commit.tcl:154
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1352,7 +1403,7 @@ msgstr ""
"Die Datei »%s« hat noch nicht aufgelöste Zusammenführungs-Konflikte. Sie "
"müssen diese Konflikte auflösen, bevor Sie eintragen können.\n"
-#: lib/commit.tcl:162
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1363,7 +1414,7 @@ msgstr ""
"\n"
"Datei »%s« kann nicht eingetragen werden.\n"
-#: lib/commit.tcl:170
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
@@ -1373,7 +1424,7 @@ msgstr ""
"\n"
"Sie müssen mindestens eine Datei bereitstellen, bevor Sie eintragen können.\n"
-#: lib/commit.tcl:183
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1393,47 +1444,42 @@ msgstr ""
"\n"
"- Rest: Eine ausführliche Beschreibung, warum diese Änderung hilfreich ist.\n"
-#: lib/commit.tcl:207
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr "Warning: Tcl/Tk unterstützt die Zeichencodierung »%s« nicht."
-
-#: lib/commit.tcl:221
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr "Aufrufen der Vor-Eintragen-Kontrolle..."
-#: lib/commit.tcl:236
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr "Eintragen abgelehnt durch Vor-Eintragen-Kontrolle (»pre-commit hook«)."
-#: lib/commit.tcl:259
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr "Aufrufen der Versionsbeschreibungs-Kontrolle..."
-#: lib/commit.tcl:274
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr ""
"Eintragen abgelehnt durch Versionsbeschreibungs-Kontrolle (»commit-message "
"hook«)."
-#: lib/commit.tcl:287
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr "Änderungen eintragen..."
-#: lib/commit.tcl:303
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr "write-tree fehlgeschlagen:"
-#: lib/commit.tcl:304 lib/commit.tcl:348 lib/commit.tcl:368
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr "Eintragen fehlgeschlagen."
-#: lib/commit.tcl:321
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "Version »%s« scheint beschädigt zu sein"
-#: lib/commit.tcl:326
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1448,19 +1494,19 @@ msgstr ""
"\n"
"Das Arbeitsverzeichnis wird daher jetzt neu geladen.\n"
-#: lib/commit.tcl:333
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr "Keine Änderungen, die eingetragen werden können."
-#: lib/commit.tcl:347
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr "commit-tree fehlgeschlagen:"
-#: lib/commit.tcl:367
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr "update-ref fehlgeschlagen:"
-#: lib/commit.tcl:454
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr "Version %s übertragen: %s"
@@ -1513,21 +1559,19 @@ msgstr "Objektdatenbank komprimieren"
msgid "Verifying the object database with fsck-objects"
msgstr "Die Objektdatenbank durch »fsck-objects« überprüfen lassen"
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\n"
"\n"
"Compress the database now?"
msgstr ""
"Dieses Projektarchiv enthält ungefähr %i nicht verknüpfte Objekte.\n"
"\n"
-"Für eine optimale Performance wird empfohlen, die Datenbank des "
-"Projektarchivs zu komprimieren, sobald mehr als %i nicht verknüpfte Objekte "
-"vorliegen.\n"
+"Für eine optimale Performance wird empfohlen, die Datenbank des Projektarchivs zu komprimieren.\n"
"\n"
"Soll die Datenbank jetzt komprimiert werden?"
@@ -1536,7 +1580,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Ungültiges Datum von Git: %s"
-#: lib/diff.tcl:42
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1551,19 +1595,19 @@ msgid ""
msgstr ""
"Keine Änderungen feststellbar.\n"
"\n"
-"»%s« enthält keine Änderungen. Zwar wurde das Änderungsdatum dieser Datei "
-"von einem anderen Programm modifiziert, aber der Inhalt der Datei ist "
+"»%s« enthält keine Änderungen. Zwar wurde das Änderungsdatum dieser Datei von "
+"einem anderen Programm modifiziert, aber der Inhalt der Datei ist "
"unverändert.\n"
"\n"
"Das Arbeitsverzeichnis wird jetzt neu geladen, um diese Änderung bei allen "
"Dateien zu prüfen."
-#: lib/diff.tcl:81
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr "Vergleich von »%s« laden..."
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
@@ -1571,7 +1615,7 @@ msgstr ""
"LOKAL: gelöscht\n"
"ANDERES:\n"
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
@@ -1579,32 +1623,32 @@ msgstr ""
"ANDERES: gelöscht\n"
"LOKAL:\n"
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr "LOKAL:\n"
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr "ANDERES:\n"
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr "Datei »%s« kann nicht angezeigt werden"
-#: lib/diff.tcl:115
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr "Fehler beim Laden der Datei:"
-#: lib/diff.tcl:122
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr "Git-Projektarchiv (Unterprojekt)"
-#: lib/diff.tcl:134
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr "* Binärdatei (Inhalt wird nicht angezeigt)"
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
@@ -1613,7 +1657,7 @@ msgstr ""
"* Datei nicht unter Versionskontrolle, Dateigröße %d Bytes.\n"
"* Nur erste %d Bytes werden angezeigt.\n"
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1624,20 +1668,20 @@ msgstr ""
"* Datei nicht unter Versionskontrolle, hier abgeschnitten durch %s.\n"
"* Zum Ansehen der vollständigen Datei externen Editor benutzen.\n"
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr ""
"Fehler beim Herausnehmen des gewählten Kontexts aus der Bereitstellung."
-#: lib/diff.tcl:310
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr "Fehler beim Bereitstellen des gewählten Kontexts."
-#: lib/diff.tcl:386
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr "Fehler beim Herausnehmen der gewählten Zeile aus der Bereitstellung."
-#: lib/diff.tcl:394
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr "Fehler beim Bereitstellen der gewählten Zeile."
@@ -1675,7 +1719,7 @@ msgstr "Bereitstellung kann nicht wieder freigegeben werden."
msgid "Index Error"
msgstr "Fehler in Bereitstellung"
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
@@ -1684,7 +1728,7 @@ msgstr ""
"Git-Aktualisierung wird jetzt gestartet, um git-gui wieder mit git zu "
"synchronisieren."
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr "Fortsetzen"
@@ -1692,44 +1736,44 @@ msgstr "Fortsetzen"
msgid "Unlock Index"
msgstr "Bereitstellung freigeben"
-#: lib/index.tcl:282
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr "Datei »%s« aus der Bereitstellung herausnehmen"
-#: lib/index.tcl:313
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr "Bereit zum Eintragen."
-#: lib/index.tcl:326
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr "»%s« hinzufügen..."
-#: lib/index.tcl:381
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr "Änderungen in Datei »%s« verwerfen?"
-#: lib/index.tcl:383
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr "Änderungen in den gewählten %i Dateien verwerfen?"
-#: lib/index.tcl:391
+#: lib/index.tcl:408
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr ""
"Alle nicht bereitgestellten Änderungen werden beim Verwerfen verloren gehen."
-#: lib/index.tcl:394
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr "Nichts tun"
-#: lib/index.tcl:419
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr "Änderungen in gewählten Dateien verwerfen"
-#: lib/index.tcl:423
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr "Änderungen in %s verwerfen"
@@ -1761,7 +1805,7 @@ msgstr ""
"\n"
"Es wird gleich neu geladen.\n"
-#: lib/merge.tcl:44
+#: lib/merge.tcl:45
#, tcl-format
msgid ""
"You are in the middle of a conflicted merge.\n"
@@ -1778,7 +1822,7 @@ msgstr ""
"bereitstellen und eintragen, um die Zusammenführung abzuschließen. Erst "
"danach kann eine neue Zusammenführung begonnen werden.\n"
-#: lib/merge.tcl:54
+#: lib/merge.tcl:55
#, tcl-format
msgid ""
"You are in the middle of a change.\n"
@@ -1795,34 +1839,34 @@ msgstr ""
"Reihenfolge können Sie mögliche Konflikte beim Zusammenführen wesentlich "
"einfacher beheben oder abbrechen.\n"
-#: lib/merge.tcl:106
+#: lib/merge.tcl:107
#, tcl-format
msgid "%s of %s"
msgstr "%s von %s"
-#: lib/merge.tcl:119
+#: lib/merge.tcl:120
#, tcl-format
msgid "Merging %s and %s..."
msgstr "Zusammenführen von %s und %s..."
-#: lib/merge.tcl:130
+#: lib/merge.tcl:131
msgid "Merge completed successfully."
msgstr "Zusammenführen erfolgreich abgeschlossen."
-#: lib/merge.tcl:132
+#: lib/merge.tcl:133
msgid "Merge failed. Conflict resolution is required."
msgstr "Zusammenführen fehlgeschlagen. Konfliktauflösung ist notwendig."
-#: lib/merge.tcl:157
+#: lib/merge.tcl:158
#, tcl-format
msgid "Merge Into %s"
msgstr "Zusammenführen in »%s«"
-#: lib/merge.tcl:176
+#: lib/merge.tcl:177
msgid "Revision To Merge"
msgstr "Zusammenzuführende Version"
-#: lib/merge.tcl:211
+#: lib/merge.tcl:212
msgid ""
"Cannot abort while amending.\n"
"\n"
@@ -1832,7 +1876,7 @@ msgstr ""
"\n"
"Sie müssen die Nachbesserung der Version abschließen.\n"
-#: lib/merge.tcl:221
+#: lib/merge.tcl:222
msgid ""
"Abort merge?\n"
"\n"
@@ -1847,7 +1891,7 @@ msgstr ""
"\n"
"Zusammenführen jetzt abbrechen?"
-#: lib/merge.tcl:227
+#: lib/merge.tcl:228
msgid ""
"Reset changes?\n"
"\n"
@@ -1862,35 +1906,35 @@ msgstr ""
"\n"
"Änderungen jetzt zurücksetzen?"
-#: lib/merge.tcl:238
+#: lib/merge.tcl:239
msgid "Aborting"
msgstr "Abbruch"
-#: lib/merge.tcl:238
+#: lib/merge.tcl:239
msgid "files reset"
msgstr "Dateien zurückgesetzt"
-#: lib/merge.tcl:265
+#: lib/merge.tcl:267
msgid "Abort failed."
msgstr "Abbruch fehlgeschlagen."
-#: lib/merge.tcl:267
+#: lib/merge.tcl:269
msgid "Abort completed. Ready."
msgstr "Abbruch durchgeführt. Bereit."
-#: lib/mergetool.tcl:14
+#: lib/mergetool.tcl:8
msgid "Force resolution to the base version?"
msgstr "Konflikt durch Basisversion ersetzen?"
-#: lib/mergetool.tcl:15
+#: lib/mergetool.tcl:9
msgid "Force resolution to this branch?"
msgstr "Konflikt durch diesen Zweig ersetzen?"
-#: lib/mergetool.tcl:16
+#: lib/mergetool.tcl:10
msgid "Force resolution to the other branch?"
msgstr "Konflikt durch anderen Zweig ersetzen?"
-#: lib/mergetool.tcl:20
+#: lib/mergetool.tcl:14
#, tcl-format
msgid ""
"Note that the diff shows only conflicting changes.\n"
@@ -1916,31 +1960,31 @@ msgstr "Datei »%s« hat nicht aufgelöste Konflikte. Trotzdem bereitstellen?"
msgid "Adding resolution for %s"
msgstr "Auflösung hinzugefügt für %s"
-#: lib/mergetool.tcl:119
+#: lib/mergetool.tcl:141
msgid "Cannot resolve deletion or link conflicts using a tool"
msgstr ""
"Konflikte durch gelöschte Dateien oder symbolische Links können nicht durch "
"das Zusamenführungswerkzeug gelöst werden."
-#: lib/mergetool.tcl:124
+#: lib/mergetool.tcl:146
msgid "Conflict file does not exist"
msgstr "Konflikt-Datei existiert nicht"
-#: lib/mergetool.tcl:236
+#: lib/mergetool.tcl:264
#, tcl-format
msgid "Not a GUI merge tool: '%s'"
msgstr "Kein GUI Zusammenführungswerkzeug: »%s«"
-#: lib/mergetool.tcl:240
+#: lib/mergetool.tcl:268
#, tcl-format
msgid "Unsupported merge tool '%s'"
msgstr "Unbekanntes Zusammenführungswerkzeug: »%s«"
-#: lib/mergetool.tcl:275
+#: lib/mergetool.tcl:303
msgid "Merge tool is already running, terminate it?"
msgstr "Zusammenführungswerkzeug läuft bereits. Soll es abgebrochen werden?"
-#: lib/mergetool.tcl:295
+#: lib/mergetool.tcl:323
#, tcl-format
msgid ""
"Error retrieving versions:\n"
@@ -1949,7 +1993,7 @@ msgstr ""
"Fehler beim Abrufen der Dateiversionen:\n"
"%s"
-#: lib/mergetool.tcl:315
+#: lib/mergetool.tcl:343
#, tcl-format
msgid ""
"Could not start the merge tool:\n"
@@ -1960,11 +2004,11 @@ msgstr ""
"\n"
"%s"
-#: lib/mergetool.tcl:319
+#: lib/mergetool.tcl:347
msgid "Running merge tool..."
msgstr "Zusammenführungswerkzeug starten..."
-#: lib/mergetool.tcl:347 lib/mergetool.tcl:363
+#: lib/mergetool.tcl:375 lib/mergetool.tcl:383
msgid "Merge tool failed."
msgstr "Zusammenführungswerkzeug fehlgeschlagen."
@@ -1982,76 +2026,76 @@ msgstr "Ungültige Archiv-Zeichenkodierung »%s«"
msgid "Restore Defaults"
msgstr "Voreinstellungen wiederherstellen"
-#: lib/option.tcl:99
+#: lib/option.tcl:121
msgid "Save"
msgstr "Speichern"
-#: lib/option.tcl:109
+#: lib/option.tcl:131
#, tcl-format
msgid "%s Repository"
msgstr "Projektarchiv %s"
-#: lib/option.tcl:110
+#: lib/option.tcl:132
msgid "Global (All Repositories)"
msgstr "Global (Alle Projektarchive)"
-#: lib/option.tcl:116
+#: lib/option.tcl:138
msgid "User Name"
msgstr "Benutzername"
-#: lib/option.tcl:117
+#: lib/option.tcl:139
msgid "Email Address"
msgstr "E-Mail-Adresse"
-#: lib/option.tcl:119
+#: lib/option.tcl:141
msgid "Summarize Merge Commits"
msgstr "Zusammenführungs-Versionen zusammenfassen"
-#: lib/option.tcl:120
+#: lib/option.tcl:142
msgid "Merge Verbosity"
msgstr "Ausführlichkeit der Zusammenführen-Meldungen"
-#: lib/option.tcl:121
+#: lib/option.tcl:143
msgid "Show Diffstat After Merge"
msgstr "Vergleichsstatistik nach Zusammenführen anzeigen"
-#: lib/option.tcl:122
+#: lib/option.tcl:144
msgid "Use Merge Tool"
msgstr "Zusammenführungswerkzeug"
-#: lib/option.tcl:124
+#: lib/option.tcl:146
msgid "Trust File Modification Timestamps"
msgstr "Auf Dateiänderungsdatum verlassen"
-#: lib/option.tcl:124
+#: lib/option.tcl:147
msgid "Prune Tracking Branches During Fetch"
msgstr "Übernahmezweige aufräumen während Anforderung"
-#: lib/option.tcl:125
+#: lib/option.tcl:148
msgid "Match Tracking Branches"
msgstr "Passend zu Übernahmezweig"
-#: lib/option.tcl:126
+#: lib/option.tcl:149
msgid "Blame Copy Only On Changed Files"
msgstr "Kopie-Annotieren nur bei geänderten Dateien"
-#: lib/option.tcl:127
+#: lib/option.tcl:150
msgid "Minimum Letters To Blame Copy On"
msgstr "Mindestzahl Zeichen für Kopie-Annotieren"
-#: lib/option.tcl:128
+#: lib/option.tcl:151
msgid "Blame History Context Radius (days)"
msgstr "Anzahl Tage für Historien-Kontext"
-#: lib/option.tcl:129
+#: lib/option.tcl:152
msgid "Number of Diff Context Lines"
msgstr "Anzahl der Kontextzeilen beim Vergleich"
-#: lib/option.tcl:127
+#: lib/option.tcl:153
msgid "Commit Message Text Width"
msgstr "Textbreite der Versionsbeschreibung"
-#: lib/option.tcl:128
+#: lib/option.tcl:154
msgid "New Branch Name Template"
msgstr "Namensvorschlag für neue Zweige"
@@ -2067,24 +2111,24 @@ msgstr "Ändern"
msgid "Spelling Dictionary:"
msgstr "Wörterbuch Rechtschreibprüfung:"
-#: lib/option.tcl:216
+#: lib/option.tcl:254
msgid "Change Font"
msgstr "Schriftart ändern"
-#: lib/option.tcl:220
+#: lib/option.tcl:258
#, tcl-format
msgid "Choose %s"
msgstr "%s wählen"
-#: lib/option.tcl:226
+#: lib/option.tcl:264
msgid "pt."
msgstr "pt."
-#: lib/option.tcl:240
+#: lib/option.tcl:278
msgid "Preferences"
msgstr "Einstellungen"
-#: lib/option.tcl:275
+#: lib/option.tcl:314
msgid "Failed to completely save options:"
msgstr "Optionen konnten nicht gespeichert werden:"
@@ -2096,7 +2140,7 @@ msgstr "Anderes Archiv hinzufügen"
msgid "Add New Remote"
msgstr "Neues anderes Archiv hinzufügen"
-#: lib/remote_add.tcl:28
+#: lib/remote_add.tcl:28 lib/tools_dlg.tcl:36
msgid "Add"
msgstr "Hinzufügen"
@@ -2151,8 +2195,7 @@ msgstr "»%s« anfordern"
#: lib/remote_add.tcl:157
#, tcl-format
msgid "Do not know how to initialize repository at location '%s'."
-msgstr ""
-"Initialisieren eines anderen Archivs an Adresse »%s« ist nicht möglich."
+msgstr "Initialisieren eines anderen Archivs an Adresse »%s« ist nicht möglich."
#: lib/remote_add.tcl:163 lib/transport.tcl:25 lib/transport.tcl:63
#: lib/transport.tcl:81
@@ -2173,11 +2216,11 @@ msgstr "Zweig in anderem Archiv löschen"
msgid "From Repository"
msgstr "In Projektarchiv"
-#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
+#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:134
msgid "Remote:"
msgstr "Anderes Archiv:"
-#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:138
+#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:149
msgid "Arbitrary Location:"
msgstr "Adresse:"
@@ -2193,10 +2236,6 @@ msgstr "Nur löschen, wenn"
msgid "Merged Into:"
msgstr "Zusammengeführt mit:"
-#: lib/remote_branch_delete.tcl:119
-msgid "Always (Do not perform merge checks)"
-msgstr "Immer (Keine Zusammenführungsprüfung)"
-
#: lib/remote_branch_delete.tcl:152
msgid "A branch is required for 'Merged Into'."
msgstr "Für »Zusammenführen mit« muss ein Zweig angegeben werden."
@@ -2226,27 +2265,16 @@ msgstr ""
msgid "Please select one or more branches to delete."
msgstr "Bitte wählen Sie mindestens einen Zweig, der gelöscht werden soll."
-#: lib/remote_branch_delete.tcl:216
-msgid ""
-"Recovering deleted branches is difficult.\n"
-"\n"
-"Delete the selected branches?"
-msgstr ""
-"Das Wiederherstellen von gelöschten Zweigen ist nur mit größerem Aufwand "
-"möglich.\n"
-"\n"
-"Sollen die ausgewählten Zweige gelöscht werden?"
-
#: lib/remote_branch_delete.tcl:226
#, tcl-format
msgid "Deleting branches from %s"
msgstr "Zweige auf »%s« werden gelöscht"
-#: lib/remote_branch_delete.tcl:286
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr "Kein Projektarchiv ausgewählt."
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr "»%s« laden..."
@@ -2259,11 +2287,11 @@ msgstr "Anderes Archiv entfernen"
msgid "Prune from"
msgstr "Aufräumen von"
-#: lib/remote.tcl:170
+#: lib/remote.tcl:173
msgid "Fetch from"
msgstr "Anfordern von"
-#: lib/remote.tcl:213
+#: lib/remote.tcl:215
msgid "Push to"
msgstr "Versenden nach"
@@ -2271,11 +2299,11 @@ msgstr "Versenden nach"
msgid "Find:"
msgstr "Suchen:"
-#: lib/search.tcl:22
+#: lib/search.tcl:23
msgid "Next"
msgstr "Nächster"
-#: lib/search.tcl:23
+#: lib/search.tcl:24
msgid "Prev"
msgstr "Voriger"
@@ -2283,11 +2311,11 @@ msgstr "Voriger"
msgid "Case-Sensitive"
msgstr "Groß-/Kleinschreibung unterscheiden"
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr "Fehler beim Schreiben der Verknüpfung:"
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr "Fehler beim Erstellen des Icons:"
@@ -2316,15 +2344,15 @@ msgstr "Rechtschreibprüfungsprogramm mit Fehler abgebrochen"
msgid "Unrecognized spell checker"
msgstr "Unbekanntes Rechtschreibprüfungsprogramm"
-#: lib/spellcheck.tcl:180
+#: lib/spellcheck.tcl:186
msgid "No Suggestions"
msgstr "Keine Vorschläge"
-#: lib/spellcheck.tcl:381
+#: lib/spellcheck.tcl:388
msgid "Unexpected EOF from spell checker"
msgstr "Unerwartetes EOF vom Rechtschreibprüfungsprogramm"
-#: lib/spellcheck.tcl:385
+#: lib/spellcheck.tcl:392
msgid "Spell Checker Failed"
msgstr "Rechtschreibprüfung fehlgeschlagen"
@@ -2534,31 +2562,31 @@ msgstr "Spiegeln nach %s"
msgid "Pushing %s %s to %s"
msgstr "%s %s nach %s versenden"
-#: lib/transport.tcl:89
+#: lib/transport.tcl:100
msgid "Push Branches"
msgstr "Zweige versenden"
-#: lib/transport.tcl:103
+#: lib/transport.tcl:114
msgid "Source Branches"
msgstr "Lokale Zweige"
-#: lib/transport.tcl:120
+#: lib/transport.tcl:131
msgid "Destination Repository"
msgstr "Ziel-Projektarchiv"
-#: lib/transport.tcl:158
+#: lib/transport.tcl:169
msgid "Transfer Options"
msgstr "Netzwerk-Einstellungen"
-#: lib/transport.tcl:160
+#: lib/transport.tcl:171
msgid "Force overwrite existing branch (may discard changes)"
msgstr ""
"Überschreiben von existierenden Zweigen erzwingen (könnte Änderungen löschen)"
-#: lib/transport.tcl:164
+#: lib/transport.tcl:175
msgid "Use thin pack (for slow network connections)"
msgstr "Kompaktes Datenformat benutzen (für langsame Netzverbindungen)"
-#: lib/transport.tcl:168
+#: lib/transport.tcl:179
msgid "Include tags"
msgstr "Mit Markierungen übertragen"
diff --git a/git-gui/po/fr.po b/git-gui/po/fr.po
index a944ace6ce..81706965f3 100644
--- a/git-gui/po/fr.po
+++ b/git-gui/po/fr.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-16 13:56-0800\n"
-"PO-Revision-Date: 2008-11-20 10:20+0100\n"
+"POT-Creation-Date: 2010-01-26 15:47-0800\n"
+"PO-Revision-Date: 2010-02-02 12:59+0100\n"
"Last-Translator: Christian Couder <chriscool@tuxfamily.org>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
@@ -19,33 +19,33 @@ msgstr ""
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: git-gui.sh:41 git-gui.sh:737 git-gui.sh:751 git-gui.sh:764 git-gui.sh:847
-#: git-gui.sh:866
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr "git-gui: erreur fatale"
-#: git-gui.sh:689
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "Police invalide spécifiée dans %s :"
-#: git-gui.sh:723
+#: git-gui.sh:779
msgid "Main Font"
msgstr "Police principale"
-#: git-gui.sh:724
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr "Police diff/console"
-#: git-gui.sh:738
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr "Impossible de trouver git dans PATH."
-#: git-gui.sh:765
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr "Impossible de parser la version de Git :"
-#: git-gui.sh:783
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -64,446 +64,475 @@ msgstr ""
"\n"
"Peut-on considérer que '%s' est en version 1.5.0 ?\n"
-#: git-gui.sh:1062
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr "Impossible de trouver le répertoire git :"
-#: git-gui.sh:1069
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr "Impossible d'aller à la racine du répertoire de travail :"
-#: git-gui.sh:1076
-msgid "Cannot use funny .git directory:"
-msgstr "Impossible d'utiliser le répertoire .git:"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
+msgstr "Impossible d'utiliser un dépôt nu (bare) :"
-#: git-gui.sh:1081
+#: git-gui.sh:1162
msgid "No working directory"
msgstr "Aucun répertoire de travail"
-#: git-gui.sh:1247 lib/checkout_op.tcl:305
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "Rafraîchissement du statut des fichiers..."
-#: git-gui.sh:1303
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr "Recherche de fichiers modifiés..."
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr "Lancement de l'action de préparation du message de commit..."
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
msgstr "Commit refusé par l'action de préparation du message de commit."
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr "Prêt."
-#: git-gui.sh:1819
+#: git-gui.sh:1787
+#, tcl-format
+msgid "Displaying only %s of %s files."
+msgstr "Affiche seulement %s fichiers sur %s."
+
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr "Non modifié"
-#: git-gui.sh:1821
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr "Modifié, pas indexé"
-#: git-gui.sh:1822 git-gui.sh:1830
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr "Indexé"
-#: git-gui.sh:1823 git-gui.sh:1831
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr "Portions indexées"
-#: git-gui.sh:1824 git-gui.sh:1832
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr "Indexés, manquant"
-#: git-gui.sh:1826
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr "Le type de fichier a changé, non indexé"
-#: git-gui.sh:1827
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr "Le type de fichier a changé, indexé"
-#: git-gui.sh:1829
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr "Non versionné, non indexé"
-#: git-gui.sh:1834
+#: git-gui.sh:1928
msgid "Missing"
msgstr "Manquant"
-#: git-gui.sh:1835
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr "Indexé pour suppression"
-#: git-gui.sh:1836
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr "Indexé pour suppression, toujours présent"
-#: git-gui.sh:1838 git-gui.sh:1839 git-gui.sh:1840 git-gui.sh:1841
-#: git-gui.sh:1842 git-gui.sh:1843
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr "Nécessite la résolution d'une fusion"
-#: git-gui.sh:1878
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr "Lancement de gitk... un instant..."
-#: git-gui.sh:1887
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
msgstr "Impossible de trouver gitk dans PATH."
-#: git-gui.sh:2280 lib/choose_repository.tcl:36
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr "Impossible de trouver git gui dans PATH"
+
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "Dépôt"
-#: git-gui.sh:2281
+#: git-gui.sh:2456
msgid "Edit"
msgstr "Édition"
-#: git-gui.sh:2283 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "Branche"
-#: git-gui.sh:2286 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "Commit"
-#: git-gui.sh:2289 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr "Fusionner"
-#: git-gui.sh:2290 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr "Dépôt distant"
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
msgstr "Outils"
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr "Explorer la copie de travail"
-#: git-gui.sh:2307
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr "Naviguer dans la branche courante"
-#: git-gui.sh:2311
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr "Naviguer dans la branche..."
-#: git-gui.sh:2316
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr "Visualiser l'historique de la branche courante"
-#: git-gui.sh:2320
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr "Voir l'historique de toutes les branches"
-#: git-gui.sh:2327
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr "Parcourir l'arborescence de %s"
-#: git-gui.sh:2329
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr "Voir l'historique de la branche : %s"
-#: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr "Statistiques du dépôt"
-#: git-gui.sh:2337 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr "Comprimer le dépôt"
-#: git-gui.sh:2340
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr "Vérifier le dépôt"
-#: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr "Créer une icône sur le bureau"
-#: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr "Quitter"
-#: git-gui.sh:2371
+#: git-gui.sh:2547
msgid "Undo"
msgstr "Défaire"
-#: git-gui.sh:2374
+#: git-gui.sh:2550
msgid "Redo"
msgstr "Refaire"
-#: git-gui.sh:2378 git-gui.sh:2923
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr "Couper"
-#: git-gui.sh:2381 git-gui.sh:2926 git-gui.sh:3000 git-gui.sh:3082
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr "Copier"
-#: git-gui.sh:2384 git-gui.sh:2929
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr "Coller"
-#: git-gui.sh:2387 git-gui.sh:2932 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "Supprimer"
-#: git-gui.sh:2391 git-gui.sh:2936 git-gui.sh:3086 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr "Tout sélectionner"
-#: git-gui.sh:2400
+#: git-gui.sh:2576
msgid "Create..."
msgstr "Créer..."
-#: git-gui.sh:2406
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr "Charger (checkout)..."
-#: git-gui.sh:2412
+#: git-gui.sh:2588
msgid "Rename..."
msgstr "Renommer..."
-#: git-gui.sh:2417
+#: git-gui.sh:2593
msgid "Delete..."
msgstr "Supprimer..."
-#: git-gui.sh:2422
+#: git-gui.sh:2598
msgid "Reset..."
msgstr "Réinitialiser..."
-#: git-gui.sh:2432
+#: git-gui.sh:2608
msgid "Done"
msgstr "Effectué"
-#: git-gui.sh:2434
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr "Commiter@@verb"
-#: git-gui.sh:2443 git-gui.sh:2864
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr "Nouveau commit"
-#: git-gui.sh:2451 git-gui.sh:2871
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr "Corriger dernier commit"
-#: git-gui.sh:2461 git-gui.sh:2825 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr "Recharger modifs."
-#: git-gui.sh:2467
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr "Indexer"
-#: git-gui.sh:2473
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr "Indexer toutes modifications"
-#: git-gui.sh:2479
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr "Désindexer"
-#: git-gui.sh:2484 lib/index.tcl:410
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr "Annuler les modifications"
-#: git-gui.sh:2491 git-gui.sh:3069
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr "Montrer moins de contexte"
-#: git-gui.sh:2495 git-gui.sh:3073
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr "Montrer plus de contexte"
-#: git-gui.sh:2502 git-gui.sh:2838 git-gui.sh:2947
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr "Signer"
-#: git-gui.sh:2518
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr "Fusion locale..."
-#: git-gui.sh:2523
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr "Abandonner fusion..."
-#: git-gui.sh:2535 git-gui.sh:2575
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr "Ajouter..."
-#: git-gui.sh:2539
+#: git-gui.sh:2717
msgid "Push..."
msgstr "Pousser..."
-#: git-gui.sh:2543
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr "Supprimer branche..."
-#: git-gui.sh:2553 git-gui.sh:2589 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
-#, tcl-format
-msgid "About %s"
-msgstr "À propos de %s"
-
-#: git-gui.sh:2557
-msgid "Preferences..."
-msgstr "Préférences..."
-
-#: git-gui.sh:2565 git-gui.sh:3115
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr "Options..."
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr "Supprimer..."
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr "Aide"
-#: git-gui.sh:2611
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr "À propos de %s"
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr "Documentation en ligne"
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr "Montrer la clé SSH"
-#: git-gui.sh:2707
+#: git-gui.sh:2893
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr ""
"erreur fatale : pas d'infos sur le chemin %s : Fichier ou répertoire "
"inexistant"
-#: git-gui.sh:2740
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr "Branche courante :"
-#: git-gui.sh:2761
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr "Modifs. indexées (pour commit)"
-#: git-gui.sh:2781
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr "Modifs. non indexées"
-#: git-gui.sh:2831
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr "Indexer modifs."
-#: git-gui.sh:2850 lib/transport.tcl:93 lib/transport.tcl:182
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr "Pousser"
-#: git-gui.sh:2885
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr "Message de commit initial :"
-#: git-gui.sh:2886
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr "Message de commit corrigé :"
-#: git-gui.sh:2887
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr "Message de commit initial corrigé :"
-#: git-gui.sh:2888
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr "Message de commit de fusion corrigé :"
-#: git-gui.sh:2889
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr "Message de commit de fusion :"
-#: git-gui.sh:2890
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr "Message de commit :"
-#: git-gui.sh:2939 git-gui.sh:3090 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr "Copier tout"
-#: git-gui.sh:2963 lib/blame.tcl:104
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr "Fichier :"
-#: git-gui.sh:3078
+#: git-gui.sh:3255
msgid "Refresh"
msgstr "Rafraîchir"
-#: git-gui.sh:3099
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr "Diminuer la police"
-#: git-gui.sh:3103
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr "Agrandir la police"
-#: git-gui.sh:3111 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr "Codage des caractères"
-#: git-gui.sh:3122
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr "Appliquer/Inverser section"
-#: git-gui.sh:3127
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr "Appliquer/Inverser la ligne"
-#: git-gui.sh:3137
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr "Lancer l'outil de fusion"
-#: git-gui.sh:3142
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr "Utiliser la version distante"
-#: git-gui.sh:3146
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr "Utiliser la version locale"
-#: git-gui.sh:3150
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr "Revenir à la version de base"
-#: git-gui.sh:3169
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr "Voir les changments dans le sous-module"
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr "Voir l'historique de la branche courante du sous-module"
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr "Voir l'historique de toutes les branches du sous-module"
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr "Démarrer git gui dans le sous-module"
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr "Désindexer la section"
-#: git-gui.sh:3170
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr "Désindexer la ligne du commit"
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr "Désindexer la ligne"
-#: git-gui.sh:3172
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr "Indexer la section"
-#: git-gui.sh:3173
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr "Indexer les lignes"
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr "Indexer la ligne"
-#: git-gui.sh:3196
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr "Initialisation..."
-#: git-gui.sh:3301
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -520,7 +549,7 @@ msgstr ""
"sous-processus de Git lancés par %s\n"
"\n"
-#: git-gui.sh:3331
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -530,7 +559,7 @@ msgstr ""
"Ceci est dû à un problème connu avec\n"
"le binaire Tcl distribué par Cygwin."
-#: git-gui.sh:3336
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -616,43 +645,43 @@ msgstr "Recherche de copie approfondie en cours..."
msgid "Loading annotation..."
msgstr "Chargement des annotations..."
-#: lib/blame.tcl:964
+#: lib/blame.tcl:963
msgid "Author:"
msgstr "Auteur :"
-#: lib/blame.tcl:968
+#: lib/blame.tcl:967
msgid "Committer:"
msgstr "Commiteur :"
-#: lib/blame.tcl:973
+#: lib/blame.tcl:972
msgid "Original File:"
msgstr "Fichier original :"
-#: lib/blame.tcl:1021
+#: lib/blame.tcl:1020
msgid "Cannot find HEAD commit:"
msgstr "Impossible de trouver le commit HEAD :"
-#: lib/blame.tcl:1076
+#: lib/blame.tcl:1075
msgid "Cannot find parent commit:"
msgstr "Impossible de trouver le commit parent :"
-#: lib/blame.tcl:1091
+#: lib/blame.tcl:1090
msgid "Unable to display parent"
msgstr "Impossible d'afficher le parent"
-#: lib/blame.tcl:1092 lib/diff.tcl:297
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr "Erreur lors du chargement des différences :"
-#: lib/blame.tcl:1232
+#: lib/blame.tcl:1231
msgid "Originally By:"
msgstr "À l'origine par :"
-#: lib/blame.tcl:1238
+#: lib/blame.tcl:1237
msgid "In File:"
msgstr "Dans le fichier :"
-#: lib/blame.tcl:1243
+#: lib/blame.tcl:1242
msgid "Copied Or Moved Here By:"
msgstr "Copié ou déplacé ici par :"
@@ -666,10 +695,10 @@ msgstr "Charger (checkout)"
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
-#: lib/transport.tcl:97
+#: lib/transport.tcl:108
msgid "Cancel"
msgstr "Annuler"
@@ -697,7 +726,7 @@ msgstr "Créer une branche"
msgid "Create New Branch"
msgstr "Créer une nouvelle branche"
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr "Créer"
@@ -729,7 +758,7 @@ msgstr "Non"
msgid "Fast Forward Only"
msgstr "Mise à jour rectiligne seulement (fast-forward)"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr "Réinitialiser"
@@ -771,15 +800,25 @@ msgstr "Branches locales"
msgid "Delete Only If Merged Into"
msgstr "Supprimer seulement si fusionnée dans :"
-#: 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:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "Toujours (ne pas vérifier les fusions)"
#: 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 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Il est difficile de récupérer des branches supprimées.\n"
+"\n"
+"Supprimer les branches sélectionnées ?"
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -809,7 +848,7 @@ msgstr "Nouveau nom :"
msgid "Please select a branch to rename."
msgstr "Merci de sélectionner une branche à renommer."
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:201
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "La branche '%s' existe déjà."
@@ -840,38 +879,38 @@ msgstr "[Jusqu'au parent]"
msgid "Browse Branch Files"
msgstr "Naviguer dans les fichiers de le branche"
-#: lib/browser.tcl:278 lib/choose_repository.tcl:394
-#: lib/choose_repository.tcl:480 lib/choose_repository.tcl:491
-#: lib/choose_repository.tcl:995
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr "Naviguer"
-#: lib/checkout_op.tcl:84
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr "Récupération de %s à partir de %s"
-#: lib/checkout_op.tcl:132
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "erreur fatale : Impossible de résoudre %s"
-#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
#: lib/sshkey.tcl:53
msgid "Close"
msgstr "Fermer"
-#: lib/checkout_op.tcl:174
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "La branche '%s' n'existe pas."
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr "Échec de la configuration simplifiée de git-pull pour '%s'."
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -884,21 +923,21 @@ msgstr ""
"Impossible de faire une avance rapide (fast forward) vers %s.\n"
"Une fusion est nécessaire."
-#: lib/checkout_op.tcl:242
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "La stratégie de fusion '%s' n'est pas supportée."
-#: lib/checkout_op.tcl:261
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "La mise à jour de '%s' a échoué."
-#: lib/checkout_op.tcl:273
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr "L'index (staging area) est déjà verrouillé."
-#: lib/checkout_op.tcl:288
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -916,30 +955,31 @@ msgstr ""
"\n"
"Cela va être fait tout de suite automatiquement.\n"
-#: lib/checkout_op.tcl:344
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Mise à jour du répertoire courant avec '%s'..."
-#: lib/checkout_op.tcl:345
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "fichiers chargés"
-#: lib/checkout_op.tcl:375
+#: lib/checkout_op.tcl:376
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
-msgstr "Chargement de '%s' abandonné (il est nécessaire de fusionner des fichiers)."
+msgstr ""
+"Chargement de '%s' abandonné (il est nécessaire de fusionner des fichiers)."
-#: lib/checkout_op.tcl:376
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr "Il est nécessaire de fusionner des fichiers."
-#: lib/checkout_op.tcl:380
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Le répertoire de travail reste sur la branche '%s'."
-#: lib/checkout_op.tcl:451
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -951,30 +991,30 @@ msgstr ""
"Si vous vouliez être sur une branche, créez-en une maintenant en partant de "
"'Cet emprunt détaché'."
-#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr "'%s' chargé."
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:535
#, 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:522
+#: lib/checkout_op.tcl:557
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:527
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr "Réinitialiser '%s' ?"
-#: lib/checkout_op.tcl:532 lib/merge.tcl:164 lib/tools_dlg.tcl:343
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr "Visualiser"
-#: lib/checkout_op.tcl:600
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -1020,7 +1060,7 @@ msgstr ""
msgid "Git Gui"
msgstr "Git Gui"
-#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:382
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr "Créer nouveau dépôt"
@@ -1028,7 +1068,7 @@ msgstr "Créer nouveau dépôt"
msgid "New..."
msgstr "Nouveau..."
-#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr "Cloner un dépôt existant"
@@ -1036,7 +1076,7 @@ msgstr "Cloner un dépôt existant"
msgid "Clone..."
msgstr "Cloner..."
-#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr "Ouvrir un dépôt existant"
@@ -1052,197 +1092,199 @@ msgstr "Dépôts récemment utilisés"
msgid "Open Recent Repository:"
msgstr "Ouvrir un dépôt récent :"
-#: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
-#: lib/choose_repository.tcl:316
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "La création du dépôt %s a échoué :"
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr "Répertoire :"
-#: lib/choose_repository.tcl:417 lib/choose_repository.tcl:544
-#: lib/choose_repository.tcl:1017
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr "Dépôt Git"
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr "Le répertoire %s existe déjà."
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr "Le fichier %s existe déjà."
-#: lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr "Cloner"
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr "Emplacement source :"
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr "Répertoire cible :"
-#: lib/choose_repository.tcl:496
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr "Type de clonage :"
-#: lib/choose_repository.tcl:502
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Standard (rapide, semi-redondant, liens durs)"
-#: lib/choose_repository.tcl:508
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Copy complète (plus lent, sauvegarde redondante)"
-#: lib/choose_repository.tcl:514
+#: lib/choose_repository.tcl:520
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:743 lib/choose_repository.tcl:813
-#: lib/choose_repository.tcl:1023 lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "'%s' n'est pas un dépôt Git."
-#: lib/choose_repository.tcl:586
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr "Standard n'est disponible que pour un dépôt local."
-#: lib/choose_repository.tcl:590
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr "Partagé n'est disponible que pour un dépôt local."
-#: lib/choose_repository.tcl:611
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr "L'emplacement %s existe déjà."
-#: lib/choose_repository.tcl:622
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr "La configuration de l'origine a échoué."
-#: lib/choose_repository.tcl:634
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr "Décompte des objets"
-#: lib/choose_repository.tcl:635
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr "paniers"
-#: lib/choose_repository.tcl:659
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "Impossible de copier 'objects/info/alternates' : %s"
-#: lib/choose_repository.tcl:695
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "Il n'y a rien à cloner depuis %s."
-#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
-#: lib/choose_repository.tcl:923
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr "La branche 'master' n'a pas été initialisée."
-#: lib/choose_repository.tcl:710
+#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
-msgstr "Les liens durs ne sont pas supportés. Une copie sera effectuée à la place."
+msgstr ""
+"Les liens durs ne sont pas supportés. Une copie sera effectuée à la place."
-#: lib/choose_repository.tcl:722
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr "Clonage depuis %s"
-#: lib/choose_repository.tcl:753
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr "Copie des objets"
-#: lib/choose_repository.tcl:754
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr "KiB"
-#: lib/choose_repository.tcl:778
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "Impossible de copier l'objet : %s"
-#: lib/choose_repository.tcl:788
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr "Liaison des objets"
-#: lib/choose_repository.tcl:789
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr "objets"
-#: lib/choose_repository.tcl:797
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "Impossible créer un lien dur pour l'objet : %s"
-#: lib/choose_repository.tcl:852
+#: lib/choose_repository.tcl:858
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:863
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr ""
"Impossible de récupérer les marques (tags). Voir la sortie console pour plus "
"de détails."
-#: lib/choose_repository.tcl:887
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
-msgstr "Impossible de déterminer HEAD. Voir la sortie console pour plus de détails."
+msgstr ""
+"Impossible de déterminer HEAD. Voir la sortie console pour plus de détails."
-#: lib/choose_repository.tcl:896
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "Impossible de nettoyer %s"
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr "Le clonage a échoué."
-#: lib/choose_repository.tcl:909
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr "Aucune branche par défaut n'a été obtenue."
-#: lib/choose_repository.tcl:920
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "Impossible de résoudre %s comme commit."
-#: lib/choose_repository.tcl:932
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr "Création du répertoire de travail"
-#: lib/choose_repository.tcl:933 lib/index.tcl:65 lib/index.tcl:128
-#: lib/index.tcl:196
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr "fichiers"
-#: lib/choose_repository.tcl:962
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr "Le chargement initial du fichier a échoué."
-#: lib/choose_repository.tcl:978
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr "Ouvrir"
-#: lib/choose_repository.tcl:988
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr "Dépôt :"
-#: lib/choose_repository.tcl:1037
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "Impossible d'ouvrir le dépôt %s :"
@@ -1314,19 +1356,24 @@ msgstr ""
"terminée. Vous ne pouvez pas corriger le commit précédent sauf si vous "
"abandonnez la fusion courante.\n"
-#: lib/commit.tcl:49
+#: lib/commit.tcl:48
msgid "Error loading commit data for amend:"
msgstr "Erreur lors du chargement des données de commit pour correction :"
-#: lib/commit.tcl:76
+#: lib/commit.tcl:75
msgid "Unable to obtain your identity:"
msgstr "Impossible d'obtenir votre identité :"
-#: lib/commit.tcl:81
+#: lib/commit.tcl:80
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "GIT_COMMITTER_IDENT invalide :"
-#: lib/commit.tcl:133
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "attention : Tcl ne supporte pas le codage '%s'."
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1344,7 +1391,7 @@ msgstr ""
"\n"
"Cela va être fait tout de suite automatiquement.\n"
-#: lib/commit.tcl:156
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1357,7 +1404,7 @@ msgstr ""
"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:164
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1368,7 +1415,7 @@ msgstr ""
"\n"
"Le fichier %s ne peut pas être commité par ce programme.\n"
-#: lib/commit.tcl:172
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
@@ -1378,7 +1425,7 @@ msgstr ""
"\n"
"Vous devez indexer au moins 1 fichier avant de pouvoir commiter.\n"
-#: lib/commit.tcl:187
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1396,45 +1443,40 @@ msgstr ""
"- Deuxième ligne : rien.\n"
"- Lignes suivantes : Décrire pourquoi ces modifications sont bonnes.\n"
-#: lib/commit.tcl:211
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr "attention : Tcl ne supporte pas le codage '%s'."
-
-#: lib/commit.tcl:227
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr "Lancement de l'action d'avant-commit..."
-#: lib/commit.tcl:242
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr "Commit refusé par l'action d'avant-commit."
-#: lib/commit.tcl:265
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr "Lancement de l'action \"message de commit\"..."
-#: lib/commit.tcl:280
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr "Commit refusé par l'action \"message de commit\"."
-#: lib/commit.tcl:293
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr "Commit des modifications..."
-#: lib/commit.tcl:309
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr "write-tree a échoué :"
-#: lib/commit.tcl:310 lib/commit.tcl:354 lib/commit.tcl:374
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr "Le commit a échoué."
-#: lib/commit.tcl:327
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "Le commit %s semble être corrompu"
-#: lib/commit.tcl:332
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1449,19 +1491,19 @@ msgstr ""
"\n"
"Une resynchronisation va être lancée tout de suite automatiquement.\n"
-#: lib/commit.tcl:339
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr "Pas de modifications à commiter."
-#: lib/commit.tcl:353
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr "commit-tree a échoué :"
-#: lib/commit.tcl:373
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr "update-ref a échoué :"
-#: lib/commit.tcl:461
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr "Commit %s créé : %s"
@@ -1514,13 +1556,13 @@ msgstr "Compression de la base des objets"
msgid "Verifying the object database with fsck-objects"
msgstr "Vérification de la base des objets avec fsck-objects"
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\n"
"\n"
"Compress the database now?"
msgstr ""
@@ -1528,8 +1570,7 @@ msgstr ""
"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"
+"comprimer la base de donnée.\n"
"\n"
"Comprimer la base maintenant ?"
@@ -1538,7 +1579,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Date invalide de Git : %s"
-#: lib/diff.tcl:59
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1561,12 +1602,12 @@ msgstr ""
"Une resynchronisation va être lancée automatiquement pour trouver d'autres "
"fichiers qui pourraient se trouver dans le même état."
-#: lib/diff.tcl:99
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr "Chargement des différences de %s..."
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
@@ -1574,7 +1615,7 @@ msgstr ""
"LOCAL : supprimé\n"
"DISTANT :\n"
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
@@ -1582,32 +1623,32 @@ msgstr ""
"DISTANT : supprimé\n"
"LOCAL :\n"
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr "LOCAL :\n"
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr "DISTANT :\n"
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr "Impossible d'afficher %s"
-#: lib/diff.tcl:198
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr "Erreur lors du chargement du fichier :"
-#: lib/diff.tcl:205
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr "Dépôt Git (sous projet)"
-#: lib/diff.tcl:217
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr "* Fichier binaire (pas d'apperçu du contenu)."
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
@@ -1616,7 +1657,7 @@ msgstr ""
"* Le fichier non suivi fait %d octets.\n"
"* Seuls les %d premiers octets sont montrés.\n"
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1627,19 +1668,19 @@ msgstr ""
"* Fichier suivi raccourcis ici de %s.\n"
"* Pour voir le fichier entier, utilisez un éditeur externe.\n"
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr "Échec lors de la désindexation de la section sélectionnée."
-#: lib/diff.tcl:443
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr "Échec lors de l'indexation de la section."
-#: lib/diff.tcl:509
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr "Échec lors de la désindexation de la ligne sélectionnée."
-#: lib/diff.tcl:517
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr "Échec lors de l'indexation de la ligne."
@@ -1676,7 +1717,7 @@ msgstr "Impossible de déverrouiller l'index."
msgid "Index Error"
msgstr "Erreur de l'index"
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
@@ -1684,7 +1725,7 @@ msgstr ""
"Échec de la mise à jour de l'index. Une resynchronisation va être lancée "
"automatiquement."
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr "Continuer"
@@ -1692,45 +1733,45 @@ msgstr "Continuer"
msgid "Unlock Index"
msgstr "Déverrouiller l'index"
-#: lib/index.tcl:287
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr "Désindexation de : %s"
-#: lib/index.tcl:326
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr "Prêt à être commité."
-#: lib/index.tcl:339
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr "Ajout de %s"
-#: lib/index.tcl:396
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr "Annuler les modifications dans le fichier %s ? "
-#: lib/index.tcl:398
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr "Annuler les modifications dans ces %i fichiers ?"
-#: lib/index.tcl:406
+#: lib/index.tcl:408
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr ""
"Toutes les modifications non-indexées seront définitivement perdues par "
"l'annulation."
-#: lib/index.tcl:409
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr "Ne rien faire"
-#: lib/index.tcl:427
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr "Annuler modifications dans fichiers selectionnés"
-#: lib/index.tcl:431
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr "Annulation des modifications dans %s"
@@ -1913,7 +1954,8 @@ msgstr ""
#: lib/mergetool.tcl:45
#, tcl-format
msgid "File %s seems to have unresolved conflicts, still stage?"
-msgstr "Le fichier %s semble avoir des conflits non résolus, indexer quand même ?"
+msgstr ""
+"Le fichier %s semble avoir des conflits non résolus, indexer quand même ?"
#: lib/mergetool.tcl:60
#, tcl-format
@@ -1922,7 +1964,9 @@ msgstr "Ajouter une résolution pour %s"
#: lib/mergetool.tcl:141
msgid "Cannot resolve deletion or link conflicts using a tool"
-msgstr "Impossible de résoudre la suppression ou de relier des conflits en utilisant un outil"
+msgstr ""
+"Impossible de résoudre la suppression ou de relier des conflits en utilisant "
+"un outil"
#: lib/mergetool.tcl:146
msgid "Conflict file does not exist"
@@ -2171,7 +2215,8 @@ msgstr "Récupération de %s"
msgid "Do not know how to initialize repository at location '%s'."
msgstr "Pas de méthode connue pour initialiser le dépôt à l'emplacement '%s'."
-#: lib/remote_add.tcl:163 lib/transport.tcl:25 lib/transport.tcl:71
+#: lib/remote_add.tcl:163 lib/transport.tcl:25 lib/transport.tcl:63
+#: lib/transport.tcl:81
#, tcl-format
msgid "push %s"
msgstr "pousser %s"
@@ -2189,11 +2234,11 @@ msgstr "Supprimer une branche à distance"
msgid "From Repository"
msgstr "Dépôt source"
-#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
+#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:134
msgid "Remote:"
msgstr "Branche distante :"
-#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:138
+#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:149
msgid "Arbitrary Location:"
msgstr "Emplacement arbitraire :"
@@ -2209,10 +2254,6 @@ msgstr "Supprimer seulement si"
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'."
@@ -2235,32 +2276,23 @@ msgid ""
"necessary commits. Try fetching from %s first."
msgstr ""
"Un ou plusieurs des tests de fusion ont échoué parce que vous n'avez pas "
-"récupéré les commits nécessaires. Essayez de récupérer à partir de %s d'abord."
+"récupéré les commits nécessaires. Essayez de récupérer à 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 ""
-"Il est difficile de récupérer des branches supprimées.\n"
-"\n"
-"Supprimer les branches sélectionnées ?"
-
#: lib/remote_branch_delete.tcl:226
#, tcl-format
msgid "Deleting branches from %s"
msgstr "Suppression des branches de %s"
-#: lib/remote_branch_delete.tcl:286
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr "Aucun dépôt n'est sélectionné."
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr "Synchronisation de %s..."
@@ -2281,11 +2313,11 @@ msgstr "Précédent"
msgid "Case-Sensitive"
msgstr "Sensible à la casse"
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr "Impossible d'écrire le raccourci :"
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr "Impossible d'écrire l'icône :"
@@ -2440,7 +2472,8 @@ msgstr "Montrer une boîte de dialogue avant le lancement"
#: lib/tools_dlg.tcl:80
msgid "Ask the user to select a revision (sets $REVISION)"
-msgstr "Demander à l'utilisateur de sélectionner une révision (change $REVISION)"
+msgstr ""
+"Demander à l'utilisateur de sélectionner une révision (change $REVISION)"
#: lib/tools_dlg.tcl:85
msgid "Ask the user for additional arguments (sets $ARGS)"
@@ -2521,38 +2554,51 @@ msgstr "Nettoyer les branches de suivi supprimées de %s"
msgid "Pushing changes to %s"
msgstr "Les modifications sont poussées vers %s"
-#: lib/transport.tcl:72
+#: lib/transport.tcl:64
+#, tcl-format
+msgid "Mirroring to %s"
+msgstr "Dupliquer dans %s"
+
+#: lib/transport.tcl:82
#, tcl-format
msgid "Pushing %s %s to %s"
msgstr "Pousse %s %s vers %s"
-#: lib/transport.tcl:89
+#: lib/transport.tcl:100
msgid "Push Branches"
msgstr "Pousser branches"
-#: lib/transport.tcl:103
+#: lib/transport.tcl:114
msgid "Source Branches"
msgstr "Branches source"
-#: lib/transport.tcl:120
+#: lib/transport.tcl:131
msgid "Destination Repository"
msgstr "Dépôt de destination"
-#: lib/transport.tcl:158
+#: lib/transport.tcl:169
msgid "Transfer Options"
msgstr "Options de transfert"
-#: lib/transport.tcl:160
+#: lib/transport.tcl:171
msgid "Force overwrite existing branch (may discard changes)"
msgstr ""
"Forcer l'écrasement d'une branche existante (peut supprimer des "
"modifications)"
-#: lib/transport.tcl:164
+#: lib/transport.tcl:175
msgid "Use thin pack (for slow network connections)"
msgstr "Utiliser des petits paquets (pour les connexions lentes)"
-#: lib/transport.tcl:168
+#: lib/transport.tcl:179
msgid "Include tags"
msgstr "Inclure les marques (tags)"
+#~ msgid "Cannot use funny .git directory:"
+#~ msgstr "Impossible d'utiliser le répertoire .git:"
+
+#~ msgid "Preferences..."
+#~ msgstr "Préférences..."
+
+#~ msgid "Always (Do not perform merge test.)"
+#~ msgstr "Toujours (Ne pas faire de test de fusion.)"
diff --git a/git-gui/po/git-gui.pot b/git-gui/po/git-gui.pot
index 074582d979..1ae2aaa0b3 100644
--- a/git-gui/po/git-gui.pot
+++ b/git-gui/po/git-gui.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-12-08 08:31-0800\n"
+"POT-Creation-Date: 2010-01-26 15:47-0800\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"
@@ -16,33 +16,33 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: git-gui.sh:41 git-gui.sh:737 git-gui.sh:751 git-gui.sh:764 git-gui.sh:847
-#: git-gui.sh:866
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr ""
-#: git-gui.sh:689
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr ""
-#: git-gui.sh:723
+#: git-gui.sh:779
msgid "Main Font"
msgstr ""
-#: git-gui.sh:724
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr ""
-#: git-gui.sh:738
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr ""
-#: git-gui.sh:765
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr ""
-#: git-gui.sh:783
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -54,449 +54,473 @@ msgid ""
"Assume '%s' is version 1.5.0?\n"
msgstr ""
-#: git-gui.sh:1062
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr ""
-#: git-gui.sh:1069
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr ""
-#: git-gui.sh:1076
-msgid "Cannot use funny .git directory:"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
msgstr ""
-#: git-gui.sh:1081
+#: git-gui.sh:1162
msgid "No working directory"
msgstr ""
-#: git-gui.sh:1247 lib/checkout_op.tcl:305
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr ""
-#: git-gui.sh:1303
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr ""
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr ""
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
msgstr ""
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr ""
-#: git-gui.sh:1726
+#: git-gui.sh:1787
#, tcl-format
msgid "Displaying only %s of %s files."
msgstr ""
-#: git-gui.sh:1819
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr ""
-#: git-gui.sh:1821
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr ""
-#: git-gui.sh:1822 git-gui.sh:1830
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr ""
-#: git-gui.sh:1823 git-gui.sh:1831
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr ""
-#: git-gui.sh:1824 git-gui.sh:1832
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr ""
-#: git-gui.sh:1826
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr ""
-#: git-gui.sh:1827
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr ""
-#: git-gui.sh:1829
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr ""
-#: git-gui.sh:1834
+#: git-gui.sh:1928
msgid "Missing"
msgstr ""
-#: git-gui.sh:1835
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr ""
-#: git-gui.sh:1836
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr ""
-#: git-gui.sh:1838 git-gui.sh:1839 git-gui.sh:1840 git-gui.sh:1841
-#: git-gui.sh:1842 git-gui.sh:1843
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr ""
-#: git-gui.sh:1878
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr ""
-#: git-gui.sh:1887
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
msgstr ""
-#: git-gui.sh:2280 lib/choose_repository.tcl:36
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr ""
+
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr ""
-#: git-gui.sh:2281
+#: git-gui.sh:2456
msgid "Edit"
msgstr ""
-#: git-gui.sh:2283 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr ""
-#: git-gui.sh:2286 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr ""
-#: git-gui.sh:2289 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr ""
-#: git-gui.sh:2290 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr ""
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
msgstr ""
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr ""
-#: git-gui.sh:2307
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr ""
-#: git-gui.sh:2311
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr ""
-#: git-gui.sh:2316
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr ""
-#: git-gui.sh:2320
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr ""
-#: git-gui.sh:2327
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr ""
-#: git-gui.sh:2329
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr ""
-#: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr ""
-#: git-gui.sh:2337 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr ""
-#: git-gui.sh:2340
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr ""
-#: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr ""
-#: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr ""
-#: git-gui.sh:2371
+#: git-gui.sh:2547
msgid "Undo"
msgstr ""
-#: git-gui.sh:2374
+#: git-gui.sh:2550
msgid "Redo"
msgstr ""
-#: git-gui.sh:2378 git-gui.sh:2937
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr ""
-#: git-gui.sh:2381 git-gui.sh:2940 git-gui.sh:3014 git-gui.sh:3096
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr ""
-#: git-gui.sh:2384 git-gui.sh:2943
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr ""
-#: git-gui.sh:2387 git-gui.sh:2946 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr ""
-#: git-gui.sh:2391 git-gui.sh:2950 git-gui.sh:3100 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr ""
-#: git-gui.sh:2400
+#: git-gui.sh:2576
msgid "Create..."
msgstr ""
-#: git-gui.sh:2406
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr ""
-#: git-gui.sh:2412
+#: git-gui.sh:2588
msgid "Rename..."
msgstr ""
-#: git-gui.sh:2417
+#: git-gui.sh:2593
msgid "Delete..."
msgstr ""
-#: git-gui.sh:2422
+#: git-gui.sh:2598
msgid "Reset..."
msgstr ""
-#: git-gui.sh:2432
+#: git-gui.sh:2608
msgid "Done"
msgstr ""
-#: git-gui.sh:2434
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr ""
-#: git-gui.sh:2443 git-gui.sh:2878
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr ""
-#: git-gui.sh:2451 git-gui.sh:2885
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr ""
-#: git-gui.sh:2461 git-gui.sh:2839 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr ""
-#: git-gui.sh:2467
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr ""
-#: git-gui.sh:2473
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr ""
-#: git-gui.sh:2479
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr ""
-#: git-gui.sh:2484 lib/index.tcl:410
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr ""
-#: git-gui.sh:2491 git-gui.sh:3083
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr ""
-#: git-gui.sh:2495 git-gui.sh:3087
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr ""
-#: git-gui.sh:2502 git-gui.sh:2852 git-gui.sh:2961
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr ""
-#: git-gui.sh:2518
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr ""
-#: git-gui.sh:2523
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr ""
-#: git-gui.sh:2535 git-gui.sh:2575
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr ""
-#: git-gui.sh:2539
+#: git-gui.sh:2717
msgid "Push..."
msgstr ""
-#: git-gui.sh:2543
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr ""
-#: git-gui.sh:2553 git-gui.sh:2589 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
-#, tcl-format
-msgid "About %s"
-msgstr ""
-
-#: git-gui.sh:2557
-msgid "Preferences..."
-msgstr ""
-
-#: git-gui.sh:2565 git-gui.sh:3129
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr ""
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr ""
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr ""
-#: git-gui.sh:2611
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr ""
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr ""
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr ""
-#: git-gui.sh:2721
+#: git-gui.sh:2893
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr ""
-#: git-gui.sh:2754
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr ""
-#: git-gui.sh:2775
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr ""
-#: git-gui.sh:2795
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr ""
-#: git-gui.sh:2845
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr ""
-#: git-gui.sh:2864 lib/transport.tcl:104 lib/transport.tcl:193
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr ""
-#: git-gui.sh:2899
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr ""
-#: git-gui.sh:2900
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr ""
-#: git-gui.sh:2901
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr ""
-#: git-gui.sh:2902
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr ""
-#: git-gui.sh:2903
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr ""
-#: git-gui.sh:2904
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr ""
-#: git-gui.sh:2953 git-gui.sh:3104 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr ""
-#: git-gui.sh:2977 lib/blame.tcl:104
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr ""
-#: git-gui.sh:3092
+#: git-gui.sh:3255
msgid "Refresh"
msgstr ""
-#: git-gui.sh:3113
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr ""
-#: git-gui.sh:3117
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr ""
-#: git-gui.sh:3125 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr ""
-#: git-gui.sh:3136
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr ""
-#: git-gui.sh:3141
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr ""
-#: git-gui.sh:3151
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr ""
-#: git-gui.sh:3156
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr ""
-#: git-gui.sh:3160
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr ""
-#: git-gui.sh:3164
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr ""
-#: git-gui.sh:3183
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr ""
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr ""
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr ""
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr ""
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr ""
-#: git-gui.sh:3184
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr ""
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr ""
-#: git-gui.sh:3186
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr ""
-#: git-gui.sh:3187
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr ""
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr ""
-#: git-gui.sh:3210
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr ""
-#: git-gui.sh:3315
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -507,14 +531,14 @@ msgid ""
"\n"
msgstr ""
-#: git-gui.sh:3345
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
"Tcl binary distributed by Cygwin."
msgstr ""
-#: git-gui.sh:3350
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -618,7 +642,7 @@ msgstr ""
msgid "Unable to display parent"
msgstr ""
-#: lib/blame.tcl:1091 lib/diff.tcl:297
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr ""
@@ -644,7 +668,7 @@ msgstr ""
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
#: lib/transport.tcl:108
@@ -675,7 +699,7 @@ msgstr ""
msgid "Create New Branch"
msgstr ""
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr ""
@@ -707,7 +731,7 @@ msgstr ""
msgid "Fast Forward Only"
msgstr ""
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr ""
@@ -749,8 +773,8 @@ msgstr ""
msgid "Delete Only If Merged Into"
msgstr ""
-#: lib/branch_delete.tcl:54
-msgid "Always (Do not perform merge test.)"
+#: lib/branch_delete.tcl:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
msgstr ""
#: lib/branch_delete.tcl:103
@@ -758,6 +782,13 @@ msgstr ""
msgid "The following branches are not completely merged into %s:"
msgstr ""
+#: lib/branch_delete.tcl:115 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -785,7 +816,7 @@ msgstr ""
msgid "Please select a branch to rename."
msgstr ""
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:201
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr ""
@@ -816,38 +847,38 @@ msgstr ""
msgid "Browse Branch Files"
msgstr ""
-#: lib/browser.tcl:278 lib/choose_repository.tcl:394
-#: lib/choose_repository.tcl:480 lib/choose_repository.tcl:491
-#: lib/choose_repository.tcl:995
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr ""
-#: lib/checkout_op.tcl:84
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr ""
-#: lib/checkout_op.tcl:132
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr ""
-#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
#: lib/sshkey.tcl:53
msgid "Close"
msgstr ""
-#: lib/checkout_op.tcl:174
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr ""
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr ""
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -856,21 +887,21 @@ msgid ""
"A merge is required."
msgstr ""
-#: lib/checkout_op.tcl:242
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr ""
-#: lib/checkout_op.tcl:261
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr ""
-#: lib/checkout_op.tcl:273
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr ""
-#: lib/checkout_op.tcl:288
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -880,30 +911,30 @@ msgid ""
"The rescan will be automatically started now.\n"
msgstr ""
-#: lib/checkout_op.tcl:344
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr ""
-#: lib/checkout_op.tcl:345
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr ""
-#: lib/checkout_op.tcl:375
+#: lib/checkout_op.tcl:376
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
msgstr ""
-#: lib/checkout_op.tcl:376
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr ""
-#: lib/checkout_op.tcl:380
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr ""
-#: lib/checkout_op.tcl:451
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -911,30 +942,30 @@ msgid ""
"Checkout'."
msgstr ""
-#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr ""
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:535
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr ""
-#: lib/checkout_op.tcl:522
+#: lib/checkout_op.tcl:557
msgid "Recovering lost commits may not be easy."
msgstr ""
-#: lib/checkout_op.tcl:527
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr ""
-#: lib/checkout_op.tcl:532 lib/merge.tcl:164 lib/tools_dlg.tcl:343
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr ""
-#: lib/checkout_op.tcl:600
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -971,7 +1002,7 @@ msgstr ""
msgid "Git Gui"
msgstr ""
-#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:382
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr ""
@@ -979,7 +1010,7 @@ msgstr ""
msgid "New..."
msgstr ""
-#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr ""
@@ -987,7 +1018,7 @@ msgstr ""
msgid "Clone..."
msgstr ""
-#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr ""
@@ -1003,193 +1034,193 @@ msgstr ""
msgid "Open Recent Repository:"
msgstr ""
-#: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
-#: lib/choose_repository.tcl:316
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr ""
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr ""
-#: lib/choose_repository.tcl:417 lib/choose_repository.tcl:544
-#: lib/choose_repository.tcl:1017
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr ""
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr ""
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr ""
-#: lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr ""
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr ""
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr ""
-#: lib/choose_repository.tcl:496
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr ""
-#: lib/choose_repository.tcl:502
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr ""
-#: lib/choose_repository.tcl:508
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr ""
-#: lib/choose_repository.tcl:514
+#: lib/choose_repository.tcl:520
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr ""
-#: lib/choose_repository.tcl:550 lib/choose_repository.tcl:597
-#: lib/choose_repository.tcl:743 lib/choose_repository.tcl:813
-#: lib/choose_repository.tcl:1023 lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr ""
-#: lib/choose_repository.tcl:586
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr ""
-#: lib/choose_repository.tcl:590
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr ""
-#: lib/choose_repository.tcl:611
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr ""
-#: lib/choose_repository.tcl:622
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr ""
-#: lib/choose_repository.tcl:634
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr ""
-#: lib/choose_repository.tcl:635
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr ""
-#: lib/choose_repository.tcl:659
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr ""
-#: lib/choose_repository.tcl:695
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr ""
-#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
-#: lib/choose_repository.tcl:923
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr ""
-#: lib/choose_repository.tcl:710
+#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
msgstr ""
-#: lib/choose_repository.tcl:722
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr ""
-#: lib/choose_repository.tcl:753
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr ""
-#: lib/choose_repository.tcl:754
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr ""
-#: lib/choose_repository.tcl:778
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr ""
-#: lib/choose_repository.tcl:788
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr ""
-#: lib/choose_repository.tcl:789
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr ""
-#: lib/choose_repository.tcl:797
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr ""
-#: lib/choose_repository.tcl:852
+#: lib/choose_repository.tcl:858
msgid "Cannot fetch branches and objects. See console output for details."
msgstr ""
-#: lib/choose_repository.tcl:863
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr ""
-#: lib/choose_repository.tcl:887
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
msgstr ""
-#: lib/choose_repository.tcl:896
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr ""
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr ""
-#: lib/choose_repository.tcl:909
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr ""
-#: lib/choose_repository.tcl:920
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr ""
-#: lib/choose_repository.tcl:932
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr ""
-#: lib/choose_repository.tcl:933 lib/index.tcl:65 lib/index.tcl:128
-#: lib/index.tcl:196
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr ""
-#: lib/choose_repository.tcl:962
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr ""
-#: lib/choose_repository.tcl:978
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr ""
-#: lib/choose_repository.tcl:988
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr ""
-#: lib/choose_repository.tcl:1037
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr ""
@@ -1264,7 +1295,12 @@ msgstr ""
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr ""
-#: lib/commit.tcl:132
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr ""
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1274,7 +1310,7 @@ msgid ""
"The rescan will be automatically started now.\n"
msgstr ""
-#: lib/commit.tcl:155
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1283,7 +1319,7 @@ msgid ""
"before committing.\n"
msgstr ""
-#: lib/commit.tcl:163
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1291,14 +1327,14 @@ msgid ""
"File %s cannot be committed by this program.\n"
msgstr ""
-#: lib/commit.tcl:171
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
"You must stage at least 1 file before you can commit.\n"
msgstr ""
-#: lib/commit.tcl:186
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1309,45 +1345,40 @@ msgid ""
"- Remaining lines: Describe why this change is good.\n"
msgstr ""
-#: lib/commit.tcl:210
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr ""
-
-#: lib/commit.tcl:226
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr ""
-#: lib/commit.tcl:241
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr ""
-#: lib/commit.tcl:264
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr ""
-#: lib/commit.tcl:279
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr ""
-#: lib/commit.tcl:292
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr ""
-#: lib/commit.tcl:308
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr ""
-#: lib/commit.tcl:309 lib/commit.tcl:353 lib/commit.tcl:373
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr ""
-#: lib/commit.tcl:326
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr ""
-#: lib/commit.tcl:331
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1356,19 +1387,19 @@ msgid ""
"A rescan will be automatically started now.\n"
msgstr ""
-#: lib/commit.tcl:338
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr ""
-#: lib/commit.tcl:352
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr ""
-#: lib/commit.tcl:372
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr ""
-#: lib/commit.tcl:460
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr ""
@@ -1421,13 +1452,13 @@ msgstr ""
msgid "Verifying the object database with fsck-objects"
msgstr ""
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\n"
"\n"
"Compress the database now?"
msgstr ""
@@ -1437,7 +1468,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr ""
-#: lib/diff.tcl:59
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1451,56 +1482,56 @@ msgid ""
"the same state."
msgstr ""
-#: lib/diff.tcl:99
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr ""
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
msgstr ""
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
msgstr ""
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr ""
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr ""
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr ""
-#: lib/diff.tcl:198
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr ""
-#: lib/diff.tcl:205
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr ""
-#: lib/diff.tcl:217
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr ""
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
"* Showing only first %d bytes.\n"
msgstr ""
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1508,19 +1539,19 @@ msgid ""
"* To see the entire file, use an external editor.\n"
msgstr ""
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr ""
-#: lib/diff.tcl:443
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr ""
-#: lib/diff.tcl:509
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr ""
-#: lib/diff.tcl:517
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr ""
@@ -1557,13 +1588,13 @@ msgstr ""
msgid "Index Error"
msgstr ""
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
msgstr ""
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr ""
@@ -1571,43 +1602,43 @@ msgstr ""
msgid "Unlock Index"
msgstr ""
-#: lib/index.tcl:287
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr ""
-#: lib/index.tcl:326
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr ""
-#: lib/index.tcl:339
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr ""
-#: lib/index.tcl:396
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr ""
-#: lib/index.tcl:398
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr ""
-#: lib/index.tcl:406
+#: lib/index.tcl:408
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr ""
-#: lib/index.tcl:409
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr ""
-#: lib/index.tcl:427
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr ""
-#: lib/index.tcl:431
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr ""
@@ -2036,10 +2067,6 @@ msgstr ""
msgid "Merged Into:"
msgstr ""
-#: lib/remote_branch_delete.tcl:119
-msgid "Always (Do not perform merge checks)"
-msgstr ""
-
#: lib/remote_branch_delete.tcl:152
msgid "A branch is required for 'Merged Into'."
msgstr ""
@@ -2063,23 +2090,16 @@ msgstr ""
msgid "Please select one or more branches to delete."
msgstr ""
-#: lib/remote_branch_delete.tcl:216
-msgid ""
-"Recovering deleted branches is difficult.\n"
-"\n"
-"Delete the selected branches?"
-msgstr ""
-
#: lib/remote_branch_delete.tcl:226
#, tcl-format
msgid "Deleting branches from %s"
msgstr ""
-#: lib/remote_branch_delete.tcl:286
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr ""
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr ""
@@ -2100,11 +2120,11 @@ msgstr ""
msgid "Case-Sensitive"
msgstr ""
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr ""
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr ""
diff --git a/git-gui/po/it.po b/git-gui/po/it.po
index 762632c22f..aa15a204d8 100644
--- a/git-gui/po/it.po
+++ b/git-gui/po/it.po
@@ -9,41 +9,41 @@ msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-12-08 08:31-0800\n"
-"PO-Revision-Date: 2008-12-09 13:04+0100\n"
+"POT-Creation-Date: 2010-01-26 15:47-0800\n"
+"PO-Revision-Date: 2010-01-28 10:04+0100\n"
"Last-Translator: Michele Ballabio <barra_cuda@katamail.com>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: git-gui.sh:41 git-gui.sh:737 git-gui.sh:751 git-gui.sh:764 git-gui.sh:847
-#: git-gui.sh:866
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr "git-gui: errore grave"
-#: git-gui.sh:689
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "Caratteri non validi specificati in %s:"
-#: git-gui.sh:723
+#: git-gui.sh:779
msgid "Main Font"
msgstr "Caratteri principali"
-#: git-gui.sh:724
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr "Caratteri per confronti e terminale"
-#: git-gui.sh:738
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr "Impossibile trovare git nel PATH"
-#: git-gui.sh:765
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr "Impossibile determinare la versione di Git:"
-#: git-gui.sh:783
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -62,446 +62,475 @@ msgstr ""
"\n"
"Assumere che '%s' sia alla versione 1.5.0?\n"
-#: git-gui.sh:1062
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr "Non trovo la directory di git: "
-#: git-gui.sh:1069
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr "Impossibile spostarsi sulla directory principale del progetto:"
-#: git-gui.sh:1076
-msgid "Cannot use funny .git directory:"
-msgstr "Impossibile usare una .git directory strana:"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
+msgstr "Impossibile usare un archivio senza directory di lavoro:"
-#: git-gui.sh:1081
+#: git-gui.sh:1162
msgid "No working directory"
msgstr "Nessuna directory di lavoro"
-#: git-gui.sh:1247 lib/checkout_op.tcl:305
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "Controllo dello stato dei file in corso..."
-#: git-gui.sh:1303
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr "Ricerca di file modificati in corso..."
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr "Avvio prepare-commit-msg hook..."
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
msgstr "Revisione rifiutata dal prepare-commit-msg hook."
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr "Pronto."
-#: git-gui.sh:1819
+#: git-gui.sh:1787
+#, tcl-format
+msgid "Displaying only %s of %s files."
+msgstr "Saranno mostrati solo %s file su %s."
+
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr "Non modificato"
-#: git-gui.sh:1821
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr "Modificato, non preparato per una nuova revisione"
-#: git-gui.sh:1822 git-gui.sh:1830
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr "Preparato per una nuova revisione"
-#: git-gui.sh:1823 git-gui.sh:1831
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr "Parti preparate per una nuova revisione"
-#: git-gui.sh:1824 git-gui.sh:1832
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr "Preparato per una nuova revisione, mancante"
-#: git-gui.sh:1826
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr "Tipo di file modificato, non preparato per una nuova revisione"
-#: git-gui.sh:1827
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr "Tipo di file modificato, preparato per una nuova revisione"
-#: git-gui.sh:1829
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr "Non tracciato, non preparato per una nuova revisione"
-#: git-gui.sh:1834
+#: git-gui.sh:1928
msgid "Missing"
msgstr "Mancante"
-#: git-gui.sh:1835
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr "Preparato per la rimozione"
-#: git-gui.sh:1836
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr "Preparato alla rimozione, ancora presente"
-#: git-gui.sh:1838 git-gui.sh:1839 git-gui.sh:1840 git-gui.sh:1841
-#: git-gui.sh:1842 git-gui.sh:1843
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr "Richiede risoluzione dei conflitti"
-#: git-gui.sh:1878
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr "Avvio di gitk... attendere..."
-#: git-gui.sh:1887
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
msgstr "Impossibile trovare gitk nel PATH"
-#: git-gui.sh:2280 lib/choose_repository.tcl:36
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr "Impossibile trovare git gui nel PATH"
+
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "Archivio"
-#: git-gui.sh:2281
+#: git-gui.sh:2456
msgid "Edit"
msgstr "Modifica"
-#: git-gui.sh:2283 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "Ramo"
-#: git-gui.sh:2286 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "Revisione"
-#: git-gui.sh:2289 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr "Fusione (Merge)"
-#: git-gui.sh:2290 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr "Remoto"
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
-msgstr "Strumenti"
+msgstr "Accessori"
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr "Esplora copia di lavoro"
-#: git-gui.sh:2307
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr "Esplora i file del ramo attuale"
-#: git-gui.sh:2311
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr "Esplora i file del ramo..."
-#: git-gui.sh:2316
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr "Visualizza la cronologia del ramo attuale"
-#: git-gui.sh:2320
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr "Visualizza la cronologia di tutti i rami"
-#: git-gui.sh:2327
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr "Esplora i file di %s"
-#: git-gui.sh:2329
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr "Visualizza la cronologia di %s"
-#: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr "Statistiche dell'archivio"
-#: git-gui.sh:2337 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr "Comprimi l'archivio"
-#: git-gui.sh:2340
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr "Verifica l'archivio"
-#: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr "Crea icona desktop"
-#: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr "Esci"
-#: git-gui.sh:2371
+#: git-gui.sh:2547
msgid "Undo"
msgstr "Annulla"
-#: git-gui.sh:2374
+#: git-gui.sh:2550
msgid "Redo"
msgstr "Ripeti"
-#: git-gui.sh:2378 git-gui.sh:2937
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr "Taglia"
-#: git-gui.sh:2381 git-gui.sh:2940 git-gui.sh:3014 git-gui.sh:3096
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr "Copia"
-#: git-gui.sh:2384 git-gui.sh:2943
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr "Incolla"
-#: git-gui.sh:2387 git-gui.sh:2946 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "Elimina"
-#: git-gui.sh:2391 git-gui.sh:2950 git-gui.sh:3100 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr "Seleziona tutto"
-#: git-gui.sh:2400
+#: git-gui.sh:2576
msgid "Create..."
msgstr "Crea..."
-#: git-gui.sh:2406
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr "Attiva..."
-#: git-gui.sh:2412
+#: git-gui.sh:2588
msgid "Rename..."
msgstr "Rinomina"
-#: git-gui.sh:2417
+#: git-gui.sh:2593
msgid "Delete..."
msgstr "Elimina..."
-#: git-gui.sh:2422
+#: git-gui.sh:2598
msgid "Reset..."
msgstr "Ripristina..."
-#: git-gui.sh:2432
+#: git-gui.sh:2608
msgid "Done"
msgstr "Fatto"
-#: git-gui.sh:2434
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr "Nuova revisione"
-#: git-gui.sh:2443 git-gui.sh:2878
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr "Nuova revisione"
-#: git-gui.sh:2451 git-gui.sh:2885
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr "Correggi l'ultima revisione"
-#: git-gui.sh:2461 git-gui.sh:2839 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr "Analizza nuovamente"
-#: git-gui.sh:2467
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr "Prepara per una nuova revisione"
-#: git-gui.sh:2473
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr "Prepara i file modificati per una nuova revisione"
-#: git-gui.sh:2479
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr "Annulla preparazione"
-#: git-gui.sh:2484 lib/index.tcl:410
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr "Annulla modifiche"
-#: git-gui.sh:2491 git-gui.sh:3083
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr "Mostra meno contesto"
-#: git-gui.sh:2495 git-gui.sh:3087
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr "Mostra più contesto"
-#: git-gui.sh:2502 git-gui.sh:2852 git-gui.sh:2961
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr "Sign Off"
-#: git-gui.sh:2518
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr "Fusione locale..."
-#: git-gui.sh:2523
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr "Interrompi fusione..."
-#: git-gui.sh:2535 git-gui.sh:2575
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr "Aggiungi..."
-#: git-gui.sh:2539
+#: git-gui.sh:2717
msgid "Push..."
msgstr "Propaga..."
-#: git-gui.sh:2543
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr "Elimina ramo..."
-#: git-gui.sh:2553 git-gui.sh:2589 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
-#, tcl-format
-msgid "About %s"
-msgstr "Informazioni su %s"
-
-#: git-gui.sh:2557
-msgid "Preferences..."
-msgstr "Preferenze..."
-
-#: git-gui.sh:2565 git-gui.sh:3129
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr "Opzioni..."
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr "Rimuovi..."
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr "Aiuto"
-#: git-gui.sh:2611
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr "Informazioni su %s"
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr "Documentazione sul web"
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr "Mostra chave SSH"
-#: git-gui.sh:2721
+#: git-gui.sh:2893
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr ""
"errore grave: impossibile effettuare lo stat del path %s: file o directory "
"non trovata"
-#: git-gui.sh:2754
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr "Ramo attuale:"
-#: git-gui.sh:2775
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr "Modifiche preparate (saranno nella nuova revisione)"
-#: git-gui.sh:2795
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr "Modifiche non preparate"
-#: git-gui.sh:2845
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr "Prepara modificati"
-#: git-gui.sh:2864 lib/transport.tcl:104 lib/transport.tcl:193
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr "Propaga (Push)"
-#: git-gui.sh:2899
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr "Messaggio di revisione iniziale:"
-#: git-gui.sh:2900
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr "Messaggio di revisione corretto:"
-#: git-gui.sh:2901
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr "Messaggio iniziale di revisione corretto:"
-#: git-gui.sh:2902
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr "Messaggio di fusione corretto:"
-#: git-gui.sh:2903
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr "Messaggio di fusione:"
-#: git-gui.sh:2904
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr "Messaggio di revisione:"
-#: git-gui.sh:2953 git-gui.sh:3104 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr "Copia tutto"
-#: git-gui.sh:2977 lib/blame.tcl:104
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr "File:"
-#: git-gui.sh:3092
+#: git-gui.sh:3255
msgid "Refresh"
msgstr "Rinfresca"
-#: git-gui.sh:3113
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr "Diminuisci dimensione caratteri"
-#: git-gui.sh:3117
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr "Aumenta dimensione caratteri"
-#: git-gui.sh:3125 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr "Codifica"
-#: git-gui.sh:3136
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr "Applica/Inverti sezione"
-#: git-gui.sh:3141
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr "Applica/Inverti riga"
-#: git-gui.sh:3151
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr "Avvia programma esterno per la risoluzione dei conflitti"
-#: git-gui.sh:3156
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr "Usa versione remota"
-#: git-gui.sh:3160
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr "Usa versione locale"
-#: git-gui.sh:3164
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr "Ritorna alla revisione comune"
-#: git-gui.sh:3183
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr "Visualizza queste modifiche nel sottomodulo"
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr "Visualizza la cronologia del ramo attuale nel sottomodulo"
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr "Visualizza la cronologia di tutti i rami nel sottomodulo"
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr "Avvia git gui nel sottomodulo"
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr "Annulla preparazione della sezione per una nuova revisione"
-#: git-gui.sh:3184
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr "Annulla preparazione delle linee per una nuova revisione"
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr "Annulla preparazione della linea per una nuova revisione"
-#: git-gui.sh:3186
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr "Prepara sezione per una nuova revisione"
-#: git-gui.sh:3187
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr "Prepara linee per una nuova revisione"
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr "Prepara linea per una nuova revisione"
-#: git-gui.sh:3210
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr "Inizializzazione..."
-#: git-gui.sh:3315
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -518,7 +547,7 @@ msgstr ""
"da %s:\n"
"\n"
-#: git-gui.sh:3345
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -528,7 +557,7 @@ msgstr ""
"Ciò è dovuto a un problema conosciuto\n"
"causato dall'eseguibile Tcl distribuito da Cygwin."
-#: git-gui.sh:3350
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -637,7 +666,7 @@ msgstr "Impossibile trovare la revisione precedente:"
msgid "Unable to display parent"
msgstr "Impossibile visualizzare la revisione precedente"
-#: lib/blame.tcl:1091 lib/diff.tcl:297
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr "Errore nel caricamento delle differenze:"
@@ -663,7 +692,7 @@ msgstr "Attiva"
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
#: lib/transport.tcl:108
@@ -694,7 +723,7 @@ msgstr "Crea ramo"
msgid "Create New Branch"
msgstr "Crea nuovo ramo"
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr "Crea"
@@ -726,7 +755,7 @@ msgstr "No"
msgid "Fast Forward Only"
msgstr "Solo fast forward"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr "Ripristina"
@@ -769,15 +798,25 @@ msgstr "Rami locali"
msgid "Delete Only If Merged Into"
msgstr "Cancella solo se fuso con un altro ramo"
-#: lib/branch_delete.tcl:54
-msgid "Always (Do not perform merge test.)"
-msgstr "Sempre (Non effettuare verifiche di fusione)."
+#: lib/branch_delete.tcl:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "Sempre (non verificare le fusioni)"
#: lib/branch_delete.tcl:103
#, tcl-format
msgid "The following branches are not completely merged into %s:"
msgstr "I rami seguenti non sono stati fusi completamente in %s:"
+#: lib/branch_delete.tcl:115 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Ripristinare rami cancellati è difficile.\n"
+"\n"
+"Cancellare i rami selezionati?"
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -807,7 +846,7 @@ msgstr "Nuovo Nome:"
msgid "Please select a branch to rename."
msgstr "Scegliere un ramo da rinominare."
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:201
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "Il ramo '%s' esiste già."
@@ -838,38 +877,38 @@ msgstr "[Directory superiore]"
msgid "Browse Branch Files"
msgstr "Esplora i file del ramo"
-#: lib/browser.tcl:278 lib/choose_repository.tcl:394
-#: lib/choose_repository.tcl:480 lib/choose_repository.tcl:491
-#: lib/choose_repository.tcl:995
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr "Esplora"
-#: lib/checkout_op.tcl:84
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr "Recupero %s da %s"
-#: lib/checkout_op.tcl:132
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "errore grave: impossibile risolvere %s"
-#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
#: lib/sshkey.tcl:53
msgid "Close"
msgstr "Chiudi"
-#: lib/checkout_op.tcl:174
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "Il ramo '%s' non esiste."
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr "Impossibile configurare git-pull semplificato per '%s'."
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -882,22 +921,22 @@ msgstr ""
"Non può effettuare un 'fast-forward' a %s.\n"
"E' necessaria una fusione."
-#: lib/checkout_op.tcl:242
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "La strategia di fusione '%s' non è supportata."
-#: lib/checkout_op.tcl:261
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "Impossibile aggiornare '%s'."
-#: lib/checkout_op.tcl:273
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr ""
"L'area di preparazione per una nuova revisione (indice) è già bloccata."
-#: lib/checkout_op.tcl:288
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -914,30 +953,30 @@ msgstr ""
"\n"
"La nuova analisi comincerà ora.\n"
-#: lib/checkout_op.tcl:344
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Aggiornamento della directory di lavoro a '%s' in corso..."
-#: lib/checkout_op.tcl:345
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "file presenti nella directory di lavoro"
-#: lib/checkout_op.tcl:375
+#: lib/checkout_op.tcl:376
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
msgstr "Attivazione di '%s' fallita (richiesta una fusione a livello file)."
-#: lib/checkout_op.tcl:376
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr "E' richiesta una fusione a livello file."
-#: lib/checkout_op.tcl:380
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Si rimarrà sul ramo '%s'."
-#: lib/checkout_op.tcl:451
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -949,31 +988,31 @@ msgstr ""
"Se si vuole rimanere su un ramo, crearne uno ora a partire da 'Questa "
"revisione attiva staccata'."
-#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr "Attivazione di '%s' completata."
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:535
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr ""
"Ripristinare '%s' a '%s' comporterà la perdita delle seguenti revisioni:"
-#: lib/checkout_op.tcl:522
+#: lib/checkout_op.tcl:557
msgid "Recovering lost commits may not be easy."
msgstr "Ricomporre le revisioni perdute potrebbe non essere semplice."
-#: lib/checkout_op.tcl:527
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr "Ripristinare '%s'?"
-#: lib/checkout_op.tcl:532 lib/merge.tcl:164 lib/tools_dlg.tcl:343
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr "Visualizza"
-#: lib/checkout_op.tcl:600
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -1019,7 +1058,7 @@ msgstr ""
msgid "Git Gui"
msgstr "Git Gui"
-#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:382
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr "Crea nuovo archivio"
@@ -1027,7 +1066,7 @@ msgstr "Crea nuovo archivio"
msgid "New..."
msgstr "Nuovo..."
-#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr "Clona archivio esistente"
@@ -1035,7 +1074,7 @@ msgstr "Clona archivio esistente"
msgid "Clone..."
msgstr "Clona..."
-#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr "Apri archivio esistente"
@@ -1051,198 +1090,198 @@ msgstr "Archivi recenti"
msgid "Open Recent Repository:"
msgstr "Apri archivio recente:"
-#: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
-#: lib/choose_repository.tcl:316
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "Impossibile creare l'archivio %s:"
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr "Directory:"
-#: lib/choose_repository.tcl:417 lib/choose_repository.tcl:544
-#: lib/choose_repository.tcl:1017
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr "Archivio Git"
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr "La directory %s esiste già."
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr "Il file %s esiste già."
-#: lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr "Clona"
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr "Posizione sorgente:"
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr "Directory di destinazione:"
-#: lib/choose_repository.tcl:496
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr "Tipo di clone:"
-#: lib/choose_repository.tcl:502
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Standard (veloce, semi-ridondante, con hardlink)"
-#: lib/choose_repository.tcl:508
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Copia completa (più lento, backup ridondante)"
-#: lib/choose_repository.tcl:514
+#: lib/choose_repository.tcl:520
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr "Shared (il più veloce, non raccomandato, nessun backup)"
-#: lib/choose_repository.tcl:550 lib/choose_repository.tcl:597
-#: lib/choose_repository.tcl:743 lib/choose_repository.tcl:813
-#: lib/choose_repository.tcl:1023 lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "%s non è un archivio Git."
-#: lib/choose_repository.tcl:586
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr "Standard è disponibile solo per archivi locali."
-#: lib/choose_repository.tcl:590
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr "Shared è disponibile solo per archivi locali."
-#: lib/choose_repository.tcl:611
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr "Il file/directory %s esiste già."
-#: lib/choose_repository.tcl:622
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr "Impossibile configurare origin"
-#: lib/choose_repository.tcl:634
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr "Calcolo oggetti"
-#: lib/choose_repository.tcl:635
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr ""
-#: lib/choose_repository.tcl:659
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "Impossibile copiare oggetti/info/alternate: %s"
-#: lib/choose_repository.tcl:695
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "Niente da clonare da %s."
-#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
-#: lib/choose_repository.tcl:923
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr "Il ramo 'master' non è stato inizializzato."
-#: lib/choose_repository.tcl:710
+#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
msgstr "Impossibile utilizzare gli hardlink. Si ricorrerà alla copia."
-#: lib/choose_repository.tcl:722
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr "Clonazione da %s"
-#: lib/choose_repository.tcl:753
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr "Copia degli oggetti"
-#: lib/choose_repository.tcl:754
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr "KiB"
-#: lib/choose_repository.tcl:778
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "Impossibile copiare oggetto: %s"
-#: lib/choose_repository.tcl:788
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr "Collegamento oggetti"
-#: lib/choose_repository.tcl:789
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr "oggetti"
-#: lib/choose_repository.tcl:797
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "Hardlink impossibile sull'oggetto: %s"
-#: lib/choose_repository.tcl:852
+#: lib/choose_repository.tcl:858
msgid "Cannot fetch branches and objects. See console output for details."
msgstr ""
"Impossibile recuperare rami e oggetti. Controllare i dettagli forniti dalla "
"console."
-#: lib/choose_repository.tcl:863
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr ""
"Impossibile recuperare le etichette. Controllare i dettagli forniti dalla "
"console."
-#: lib/choose_repository.tcl:887
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
msgstr ""
"Impossibile determinare HEAD. Controllare i dettagli forniti dalla console."
-#: lib/choose_repository.tcl:896
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "Impossibile ripulire %s"
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr "Clonazione non riuscita."
-#: lib/choose_repository.tcl:909
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr "Non è stato trovato un ramo predefinito."
-#: lib/choose_repository.tcl:920
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "Impossibile risolvere %s come una revisione."
-#: lib/choose_repository.tcl:932
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr "Creazione directory di lavoro"
-#: lib/choose_repository.tcl:933 lib/index.tcl:65 lib/index.tcl:128
-#: lib/index.tcl:196
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr "file"
-#: lib/choose_repository.tcl:962
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr "Attivazione iniziale non riuscita."
-#: lib/choose_repository.tcl:978
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr "Apri"
-#: lib/choose_repository.tcl:988
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr "Archivio:"
-#: lib/choose_repository.tcl:1037
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "Impossibile accedere all'archivio %s:"
@@ -1326,7 +1365,12 @@ msgstr "Impossibile ottenere la tua identità:"
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "GIT_COMMITTER_IDENT non valida:"
-#: lib/commit.tcl:132
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "attenzione: Tcl non supporta la codifica '%s'."
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1343,7 +1387,7 @@ msgstr ""
"\n"
"La nuova analisi comincerà ora.\n"
-#: lib/commit.tcl:155
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1356,7 +1400,7 @@ msgstr ""
"Il file %s presenta dei conflitti. Devi risolverli e preparare il file per "
"creare una nuova revisione prima di effettuare questa azione.\n"
-#: lib/commit.tcl:163
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1367,7 +1411,7 @@ msgstr ""
"\n"
"Questo programma non può creare una revisione contenente il file %s.\n"
-#: lib/commit.tcl:171
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
@@ -1378,7 +1422,7 @@ msgstr ""
"Devi preparare per una nuova revisione almeno 1 file prima di effettuare "
"questa operazione.\n"
-#: lib/commit.tcl:186
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1396,45 +1440,40 @@ msgstr ""
"- Seconda linea: vuota.\n"
"- Terza linea: spiega a cosa serve la tua modifica.\n"
-#: lib/commit.tcl:210
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr "attenzione: Tcl non supporta la codifica '%s'."
-
-#: lib/commit.tcl:226
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr "Avvio pre-commit hook..."
-#: lib/commit.tcl:241
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr "Revisione rifiutata dal pre-commit hook."
-#: lib/commit.tcl:264
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr "Avvio commit-msg hook..."
-#: lib/commit.tcl:279
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr "Revisione rifiutata dal commit-msg hook."
-#: lib/commit.tcl:292
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr "Archiviazione modifiche..."
-#: lib/commit.tcl:308
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr "write-tree non riuscito:"
-#: lib/commit.tcl:309 lib/commit.tcl:353 lib/commit.tcl:373
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr "Impossibile creare una nuova revisione."
-#: lib/commit.tcl:326
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "La revisione %s sembra essere danneggiata"
-#: lib/commit.tcl:331
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1448,19 +1487,19 @@ msgstr ""
"\n"
"Si procederà subito ad una nuova analisi.\n"
-#: lib/commit.tcl:338
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr "Nessuna modifica per la nuova revisione."
-#: lib/commit.tcl:352
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr "commit-tree non riuscito:"
-#: lib/commit.tcl:372
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr "update-ref non riuscito:"
-#: lib/commit.tcl:460
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr "Creata revisione %s: %s"
@@ -1513,20 +1552,19 @@ msgstr "Compressione dell'archivio in corso"
msgid "Verifying the object database with fsck-objects"
msgstr "Verifica dell'archivio con fsck-objects in corso"
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\n"
"\n"
"Compress the database now?"
msgstr ""
"Questo archivio attualmente ha circa %i oggetti slegati.\n"
"\n"
-"Per mantenere buone prestazioni si raccomanda di comprimere l'archivio "
-"quando sono presenti più di %i oggetti slegati.\n"
+"Per mantenere buone prestazioni si raccomanda di comprimere l'archivio.\n"
"\n"
"Comprimere l'archivio ora?"
@@ -1535,7 +1573,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Git ha restituito una data non valida: %s"
-#: lib/diff.tcl:59
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1558,12 +1596,12 @@ msgstr ""
"Si procederà automaticamente ad una nuova analisi per trovare altri file che "
"potrebbero avere lo stesso stato."
-#: lib/diff.tcl:99
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr "Caricamento delle differenze di %s..."
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
@@ -1571,7 +1609,7 @@ msgstr ""
"LOCALE: cancellato\n"
"REMOTO:\n"
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
@@ -1579,32 +1617,32 @@ msgstr ""
"REMOTO: cancellato\n"
"LOCALE:\n"
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr "LOCALE:\n"
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr "REMOTO:\n"
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr "Impossibile visualizzare %s"
-#: lib/diff.tcl:198
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr "Errore nel caricamento del file:"
-#: lib/diff.tcl:205
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr "Archivio Git (sottoprogetto)"
-#: lib/diff.tcl:217
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr "* File binario (il contenuto non sarà mostrato)."
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
@@ -1613,7 +1651,7 @@ msgstr ""
"* Il file non tracciato è di %d byte.\n"
"* Saranno visualizzati solo i primi %d byte.\n"
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1624,19 +1662,19 @@ msgstr ""
"* %s non visualizza completamente questo file non tracciato.\n"
"* Per visualizzare il file completo, usare un programma esterno.\n"
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr "Impossibile rimuovere la sezione scelta dalla nuova revisione."
-#: lib/diff.tcl:443
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr "Impossibile preparare la sezione scelta per una nuova revisione."
-#: lib/diff.tcl:509
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr "Impossibile rimuovere la riga scelta dalla nuova revisione."
-#: lib/diff.tcl:517
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr "Impossibile preparare la riga scelta per una nuova revisione."
@@ -1674,7 +1712,7 @@ msgstr "Impossibile sbloccare l'accesso all'indice"
msgid "Index Error"
msgstr "Errore nell'indice"
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
@@ -1682,7 +1720,7 @@ msgstr ""
"Impossibile aggiornare l'indice. Ora sarà avviata una nuova analisi che "
"aggiornerà git-gui."
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr "Continua"
@@ -1690,45 +1728,45 @@ msgstr "Continua"
msgid "Unlock Index"
msgstr "Sblocca l'accesso all'indice"
-#: lib/index.tcl:287
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr "%s non farà parte della prossima revisione"
-#: lib/index.tcl:326
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr "Pronto per creare una nuova revisione."
-#: lib/index.tcl:339
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr "Aggiunta di %s in corso"
-#: lib/index.tcl:396
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr "Annullare le modifiche nel file %s?"
-#: lib/index.tcl:398
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr "Annullare le modifiche in questi %i file?"
-#: lib/index.tcl:406
+#: lib/index.tcl:408
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr ""
"Tutte le modifiche non preparate per una nuova revisione saranno perse per "
"sempre."
-#: lib/index.tcl:409
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr "Non fare niente"
-#: lib/index.tcl:427
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr "Annullo le modifiche nei file selezionati"
-#: lib/index.tcl:431
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr "Annullo le modifiche in %s"
@@ -2215,10 +2253,6 @@ msgstr "Elimina solo se"
msgid "Merged Into:"
msgstr "Fuso in:"
-#: lib/remote_branch_delete.tcl:119
-msgid "Always (Do not perform merge checks)"
-msgstr "Sempre (non verificare le fusioni)"
-
#: lib/remote_branch_delete.tcl:152
msgid "A branch is required for 'Merged Into'."
msgstr "Si richiede un ramo per 'Fuso in'."
@@ -2247,26 +2281,16 @@ msgstr ""
msgid "Please select one or more branches to delete."
msgstr "Scegliere uno o più rami da cancellare."
-#: lib/remote_branch_delete.tcl:216
-msgid ""
-"Recovering deleted branches is difficult.\n"
-"\n"
-"Delete the selected branches?"
-msgstr ""
-"Ricomporre rami cancellati è difficile.\n"
-"\n"
-"Cancellare i rami selezionati?"
-
#: lib/remote_branch_delete.tcl:226
#, tcl-format
msgid "Deleting branches from %s"
msgstr "Cancellazione rami da %s"
-#: lib/remote_branch_delete.tcl:286
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr "Nessun archivio selezionato."
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr "Analisi in corso %s..."
@@ -2287,11 +2311,11 @@ msgstr "Prec"
msgid "Case-Sensitive"
msgstr "Distingui maiuscole"
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr "Impossibile scrivere shortcut:"
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr "Impossibile scrivere icona:"
@@ -2399,7 +2423,7 @@ msgstr "Vuoi davvero eseguire %s?"
#: lib/tools.tcl:110
#, tcl-format
msgid "Tool: %s"
-msgstr "Strumento: %s"
+msgstr "Accessorio: %s"
#: lib/tools.tcl:111
#, tcl-format
@@ -2418,7 +2442,7 @@ msgstr "Il programma esterno ha riportato un errore: %s"
#: lib/tools_dlg.tcl:22
msgid "Add Tool"
-msgstr "Aggiungi strumento"
+msgstr "Aggiungi accessorio"
#: lib/tools_dlg.tcl:28
msgid "Add New Tool Command"
@@ -2430,7 +2454,7 @@ msgstr "Aggiungi per tutti gli archivi"
#: lib/tools_dlg.tcl:45
msgid "Tool Details"
-msgstr "Dettagli sullo strumento"
+msgstr "Dettagli sull'accessorio"
#: lib/tools_dlg.tcl:48
msgid "Use '/' separators to create a submenu tree:"
@@ -2462,12 +2486,12 @@ msgstr "Avvia solo se è selezionata una differenza ($FILENAME non è vuoto)"
#: lib/tools_dlg.tcl:121
msgid "Please supply a name for the tool."
-msgstr "Bisogna dare un nome allo strumento."
+msgstr "Bisogna dare un nome all'accessorio."
#: lib/tools_dlg.tcl:129
#, tcl-format
msgid "Tool '%s' already exists."
-msgstr "Lo strumento '%s' esiste già."
+msgstr "L'accessorio '%s' esiste già."
#: lib/tools_dlg.tcl:151
#, tcl-format
@@ -2475,17 +2499,17 @@ msgid ""
"Could not add tool:\n"
"%s"
msgstr ""
-"Impossibile aggiungere lo strumento:\n"
+"Impossibile aggiungere l'accessorio:\n"
"\n"
"%s"
#: lib/tools_dlg.tcl:190
msgid "Remove Tool"
-msgstr "Rimuovi strumento"
+msgstr "Rimuovi accessorio"
#: lib/tools_dlg.tcl:196
msgid "Remove Tool Commands"
-msgstr "Rimuovi i comandi dello strumento"
+msgstr "Rimuovi i comandi accessori"
#: lib/tools_dlg.tcl:200
msgid "Remove"
@@ -2493,7 +2517,7 @@ msgstr "Rimuovi"
#: lib/tools_dlg.tcl:236
msgid "(Blue denotes repository-local tools)"
-msgstr "(Il colore blu indica strumenti per l'archivio locale)"
+msgstr "(Il colore blu indica accessori per l'archivio locale)"
#: lib/tools_dlg.tcl:297
#, tcl-format
diff --git a/git-gui/po/ja.po b/git-gui/po/ja.po
index 63c4695103..15017985e5 100644
--- a/git-gui/po/ja.po
+++ b/git-gui/po/ja.po
@@ -3,46 +3,45 @@
# This file is distributed under the same license as the git-gui package.
# しらいし ななこ <nanako3@bluebottle.com>, 2007.
#
-#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-12-08 08:31-0800\n"
-"PO-Revision-Date: 2008-12-09 06:27+0900\n"
+"POT-Creation-Date: 2010-01-26 15:47-0800\n"
+"PO-Revision-Date: 2010-02-02 19:03+0900\n"
"Last-Translator: しらいし ななこ <nanako3@lavabit.com>\n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: git-gui.sh:41 git-gui.sh:737 git-gui.sh:751 git-gui.sh:764 git-gui.sh:847
-#: git-gui.sh:866
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr "git-gui: 致命的なエラー"
-#: git-gui.sh:689
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "%s に無効なフォントが指定されています:"
-#: git-gui.sh:723
+#: git-gui.sh:779
msgid "Main Font"
msgstr "主フォント"
-#: git-gui.sh:724
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr "diff/コンソール・フォント"
-#: git-gui.sh:738
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr "PATH 中に git が見つかりません"
-#: git-gui.sh:765
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr "Git バージョン名が理解できません:"
-#: git-gui.sh:783
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -61,446 +60,475 @@ msgstr ""
"\n"
"'%s' はバージョン 1.5.0 と思って良いですか?\n"
-#: git-gui.sh:1062
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr "Git ディレクトリが見つかりません:"
-#: git-gui.sh:1069
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr "作業ディレクトリの最上位に移動できません"
-#: git-gui.sh:1076
-msgid "Cannot use funny .git directory:"
-msgstr "変な .git ディレクトリは使えません"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
+msgstr "裸のリポジトリは使えません:"
-#: git-gui.sh:1081
+#: git-gui.sh:1162
msgid "No working directory"
msgstr "作業ディレクトリがありません"
-#: git-gui.sh:1247 lib/checkout_op.tcl:305
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "ファイル状態を更新しています…"
-#: git-gui.sh:1303
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr "変更されたファイルをスキャンしています…"
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr "prepare-commit-msg フックを実行中・・・"
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
msgstr "prepare-commit-msg フックがコミットを拒否しました"
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr "準備完了"
-#: git-gui.sh:1819
+#: git-gui.sh:1787
+#, tcl-format
+msgid "Displaying only %s of %s files."
+msgstr "全体で%s個の内の%sファイルだけ表示しています"
+
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr "変更無し"
-#: git-gui.sh:1821
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr "変更あり、コミット未予定"
-#: git-gui.sh:1822 git-gui.sh:1830
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr "コミット予定済"
-#: git-gui.sh:1823 git-gui.sh:1831
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr "部分的にコミット予定済"
-#: git-gui.sh:1824 git-gui.sh:1832
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr "コミット予定済、ファイル無し"
-#: git-gui.sh:1826
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr "ファイル型変更、コミット未予定"
-#: git-gui.sh:1827
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr "ファイル型変更、コミット予定済"
-#: git-gui.sh:1829
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr "管理外、コミット未予定"
-#: git-gui.sh:1834
+#: git-gui.sh:1928
msgid "Missing"
msgstr "ファイル無し"
-#: git-gui.sh:1835
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr "削除予定済"
-#: git-gui.sh:1836
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr "削除予定済、ファイル未削除"
-#: git-gui.sh:1838 git-gui.sh:1839 git-gui.sh:1840 git-gui.sh:1841
-#: git-gui.sh:1842 git-gui.sh:1843
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr "要マージ解決"
-#: git-gui.sh:1878
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr "gitk を起動中…お待ち下さい…"
-#: git-gui.sh:1887
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
msgstr "PATH 中に gitk が見つかりません"
-#: git-gui.sh:2280 lib/choose_repository.tcl:36
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr "PATH 中に git gui が見つかりません"
+
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "リポジトリ"
-#: git-gui.sh:2281
+#: git-gui.sh:2456
msgid "Edit"
msgstr "編集"
-#: git-gui.sh:2283 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "ブランチ"
-#: git-gui.sh:2286 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "コミット"
-#: git-gui.sh:2289 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr "マージ"
-#: git-gui.sh:2290 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr "リモート"
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
msgstr "ツール"
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr "ワーキングコピーをブラウズ"
-#: git-gui.sh:2307
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr "現在のブランチのファイルを見る"
-#: git-gui.sh:2311
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr "ブランチのファイルを見る…"
-#: git-gui.sh:2316
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr "現在のブランチの履歴を見る"
-#: git-gui.sh:2320
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr "全てのブランチの履歴を見る"
-#: git-gui.sh:2327
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr "ブランチ %s のファイルを見る"
-#: git-gui.sh:2329
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr "ブランチ %s の履歴を見る"
-#: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr "データベース統計"
-#: git-gui.sh:2337 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr "データベース圧縮"
-#: git-gui.sh:2340
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr "データベース検証"
-#: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr "デスクトップ・アイコンを作る"
-#: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr "終了"
-#: git-gui.sh:2371
+#: git-gui.sh:2547
msgid "Undo"
msgstr "元に戻す"
-#: git-gui.sh:2374
+#: git-gui.sh:2550
msgid "Redo"
msgstr "やり直し"
-#: git-gui.sh:2378 git-gui.sh:2923
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr "切り取り"
-#: git-gui.sh:2381 git-gui.sh:2926 git-gui.sh:3000 git-gui.sh:3082
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr "コピー"
-#: git-gui.sh:2384 git-gui.sh:2929
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr "貼り付け"
-#: git-gui.sh:2387 git-gui.sh:2932 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "削除"
-#: git-gui.sh:2391 git-gui.sh:2936 git-gui.sh:3086 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr "全て選択"
-#: git-gui.sh:2400
+#: git-gui.sh:2576
msgid "Create..."
msgstr "作成…"
-#: git-gui.sh:2406
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr "チェックアウト"
-#: git-gui.sh:2412
+#: git-gui.sh:2588
msgid "Rename..."
msgstr "名前変更…"
-#: git-gui.sh:2417
+#: git-gui.sh:2593
msgid "Delete..."
msgstr "削除…"
-#: git-gui.sh:2422
+#: git-gui.sh:2598
msgid "Reset..."
msgstr "リセット…"
-#: git-gui.sh:2432
+#: git-gui.sh:2608
msgid "Done"
msgstr "完了"
-#: git-gui.sh:2434
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr "コミット"
-#: git-gui.sh:2443 git-gui.sh:2864
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr "新規コミット"
-#: git-gui.sh:2451 git-gui.sh:2871
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr "最新コミットを訂正"
-#: git-gui.sh:2461 git-gui.sh:2825 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr "再スキャン"
-#: git-gui.sh:2467
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr "コミット予定する"
-#: git-gui.sh:2473
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr "変更されたファイルをコミット予定"
-#: git-gui.sh:2479
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr "コミットから降ろす"
-#: git-gui.sh:2484 lib/index.tcl:410
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr "変更を元に戻す"
-#: git-gui.sh:2491 git-gui.sh:3069
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr "文脈を少なく"
-#: git-gui.sh:2495 git-gui.sh:3073
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr "文脈を多く"
-#: git-gui.sh:2502 git-gui.sh:2838 git-gui.sh:2947
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr "署名"
-#: git-gui.sh:2518
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr "ローカル・マージ…"
-#: git-gui.sh:2523
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr "マージ中止…"
-#: git-gui.sh:2535 git-gui.sh:2575
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr "追加"
-#: git-gui.sh:2539
+#: git-gui.sh:2717
msgid "Push..."
msgstr "プッシュ…"
-#: git-gui.sh:2543
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr "ブランチ削除..."
-#: git-gui.sh:2553 git-gui.sh:2589 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
-#, tcl-format
-msgid "About %s"
-msgstr "%s について"
-
-#: git-gui.sh:2557
-msgid "Preferences..."
-msgstr "設定…"
-
-#: git-gui.sh:2565 git-gui.sh:3115
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr "オプション…"
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr "削除..."
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr "ヘルプ"
-#: git-gui.sh:2611
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr "%s について"
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr "オンライン・ドキュメント"
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr "SSH キーを表示"
-#: git-gui.sh:2707
+#: git-gui.sh:2893
#, tcl-format
msgid "fatal: cannot stat path %s: No such file or directory"
msgstr ""
"致命的: パス %s が stat できません。そのようなファイルやディレクトリはありま"
"せん"
-#: git-gui.sh:2740
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr "現在のブランチ"
-#: git-gui.sh:2761
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr "ステージングされた(コミット予定済の)変更"
-#: git-gui.sh:2781
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr "コミット予定に入っていない変更"
-#: git-gui.sh:2831
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr "変更をコミット予定に入れる"
-#: git-gui.sh:2850 lib/transport.tcl:93 lib/transport.tcl:182
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr "プッシュ"
-#: git-gui.sh:2885
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr "最初のコミットメッセージ:"
-#: git-gui.sh:2886
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr "訂正したコミットメッセージ:"
-#: git-gui.sh:2887
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr "訂正した最初のコミットメッセージ:"
-#: git-gui.sh:2888
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr "訂正したマージコミットメッセージ:"
-#: git-gui.sh:2889
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr "マージコミットメッセージ:"
-#: git-gui.sh:2890
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr "コミットメッセージ:"
-#: git-gui.sh:2939 git-gui.sh:3090 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr "全てコピー"
-#: git-gui.sh:2963 lib/blame.tcl:104
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr "ファイル:"
-#: git-gui.sh:3078
+#: git-gui.sh:3255
msgid "Refresh"
msgstr "再読み込み"
-#: git-gui.sh:3099
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr "フォントを小さく"
-#: git-gui.sh:3103
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr "フォントを大きく"
-#: git-gui.sh:3111 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr "エンコーディング"
-#: git-gui.sh:3122
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr "パッチを適用/取り消す"
-#: git-gui.sh:3127
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr "パッチ行を適用/取り消す"
-#: git-gui.sh:3137
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr "マージツールを起動"
-#: git-gui.sh:3142
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr "リモートの方を採用"
-#: git-gui.sh:3146
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr "ローカルの方を採用"
-#: git-gui.sh:3150
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr "ベース版を採用"
-#: git-gui.sh:3169
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr "サブモジュール内のこれらの変更を見る"
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr "サブモジュール内で現在のブランチの履歴を見る"
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr "サブモジュール内で全てのブランチの履歴を見る"
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr "サブモジュール内でgit guiを起動する"
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr "パッチをコミット予定から外す"
-#: git-gui.sh:3170
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr "コミット予定から行を外す"
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr "コミット予定から行を外す"
-#: git-gui.sh:3172
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr "パッチをコミット予定に加える"
-#: git-gui.sh:3173
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr "パッチ行をコミット予定に加える"
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr "パッチ行をコミット予定に加える"
-#: git-gui.sh:3196
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr "初期化しています…"
-#: git-gui.sh:3301
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -515,7 +543,7 @@ msgstr ""
"以下の環境変数は %s が起動する Git サブプロセスによって無視されるでしょう:\n"
"\n"
-#: git-gui.sh:3331
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -525,7 +553,7 @@ msgstr ""
"これは Cygwin で配布されている Tcl バイナリに\n"
"関しての既知の問題によります"
-#: git-gui.sh:3336
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -609,43 +637,43 @@ msgstr "コピー検知を実行中…"
msgid "Loading annotation..."
msgstr "注釈を読み込んでいます…"
-#: lib/blame.tcl:964
+#: lib/blame.tcl:963
msgid "Author:"
msgstr "作者:"
-#: lib/blame.tcl:968
+#: lib/blame.tcl:967
msgid "Committer:"
msgstr "コミット者:"
-#: lib/blame.tcl:973
+#: lib/blame.tcl:972
msgid "Original File:"
msgstr "元ファイル"
-#: lib/blame.tcl:1021
+#: lib/blame.tcl:1020
msgid "Cannot find HEAD commit:"
msgstr "HEAD コミットが見つかりません"
-#: lib/blame.tcl:1076
+#: lib/blame.tcl:1075
msgid "Cannot find parent commit:"
msgstr "親コミットが見つかりません:"
-#: lib/blame.tcl:1091
+#: lib/blame.tcl:1090
msgid "Unable to display parent"
msgstr "親を表示できません"
-#: lib/blame.tcl:1092 lib/diff.tcl:297
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr "diff を読む際のエラーです:"
-#: lib/blame.tcl:1232
+#: lib/blame.tcl:1231
msgid "Originally By:"
msgstr "原作者:"
-#: lib/blame.tcl:1238
+#: lib/blame.tcl:1237
msgid "In File:"
msgstr "ファイル:"
-#: lib/blame.tcl:1243
+#: lib/blame.tcl:1242
msgid "Copied Or Moved Here By:"
msgstr "複写・移動者:"
@@ -659,10 +687,10 @@ msgstr "チェックアウト"
#: lib/branch_checkout.tcl:27 lib/branch_create.tcl:35
#: lib/branch_delete.tcl:32 lib/branch_rename.tcl:30 lib/browser.tcl:282
-#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
-#: lib/transport.tcl:97
+#: lib/transport.tcl:108
msgid "Cancel"
msgstr "中止"
@@ -690,7 +718,7 @@ msgstr "ブランチを作成"
msgid "Create New Branch"
msgstr "ブランチを新規作成"
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr "作成"
@@ -722,7 +750,7 @@ msgstr "いいえ"
msgid "Fast Forward Only"
msgstr "早送りのみ"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr "リセット"
@@ -764,15 +792,25 @@ msgstr "ローカル・ブランチ"
msgid "Delete Only If Merged Into"
msgstr "マージ済みの時のみ削除"
-#: lib/branch_delete.tcl:54
-msgid "Always (Do not perform merge test.)"
-msgstr "無条件(マージテストしない)"
+#: lib/branch_delete.tcl:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+msgstr "無条件(マージ検査をしない)"
#: lib/branch_delete.tcl:103
#, tcl-format
msgid "The following branches are not completely merged into %s:"
msgstr "以下のブランチは %s に完全にマージされていません:"
+#: lib/branch_delete.tcl:115 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"削除したブランチを回復するのは困難です。\n"
+"\n"
+"選択したブランチを削除して良いですか?"
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -802,7 +840,7 @@ msgstr "新しい名前:"
msgid "Please select a branch to rename."
msgstr "名前を変更するブランチを選んで下さい。"
-#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:201
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "'%s'というブランチは既に存在します。"
@@ -833,38 +871,38 @@ msgstr "[上位フォルダへ]"
msgid "Browse Branch Files"
msgstr "現在のブランチのファイルを見る"
-#: lib/browser.tcl:278 lib/choose_repository.tcl:394
-#: lib/choose_repository.tcl:480 lib/choose_repository.tcl:491
-#: lib/choose_repository.tcl:995
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr "ブラウズ"
-#: lib/checkout_op.tcl:84
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr "%s から %s をフェッチしています"
-#: lib/checkout_op.tcl:132
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "致命的エラー: %s を解決できません"
-#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
#: lib/sshkey.tcl:53
msgid "Close"
msgstr "閉じる"
-#: lib/checkout_op.tcl:174
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "ブランチ'%s'は存在しません。"
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr "'%s' に簡易 git-pull を設定できませんでした"
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -877,21 +915,21 @@ msgstr ""
"%s に早送りできません。\n"
"マージが必要です。"
-#: lib/checkout_op.tcl:242
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "'%s' マージ戦略はサポートされていません。"
-#: lib/checkout_op.tcl:261
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "'%s' の更新に失敗しました。"
-#: lib/checkout_op.tcl:273
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr "インデックスは既にロックされています。"
-#: lib/checkout_op.tcl:288
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -907,30 +945,30 @@ msgstr ""
"\n"
"自動的に再スキャンを開始します。\n"
-#: lib/checkout_op.tcl:344
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "作業ディレクトリを '%s' に更新しています…"
-#: lib/checkout_op.tcl:345
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "チェックアウトされたファイル"
-#: lib/checkout_op.tcl:375
+#: lib/checkout_op.tcl:376
#, tcl-format
msgid "Aborted checkout of '%s' (file level merging is required)."
msgstr "'%s' のチェックアウトを中止しました(ファイル毎のマージが必要です)。"
-#: lib/checkout_op.tcl:376
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr "ファイル毎のマージが必要です。"
-#: lib/checkout_op.tcl:380
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "ブランチ '%s' に滞まります。"
-#: lib/checkout_op.tcl:451
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -942,30 +980,30 @@ msgstr ""
"ブランチ上に滞まりたいときは、この「分離されたチェックアウト」から新規ブラン"
"チを開始してください。"
-#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr "'%s' をチェックアウトしました"
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:535
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr "'%s' を '%s' にリセットすると、以下のコミットが失なわれます:"
-#: lib/checkout_op.tcl:522
+#: lib/checkout_op.tcl:557
msgid "Recovering lost commits may not be easy."
msgstr "失なわれたコミットを回復するのは簡単ではありません。"
-#: lib/checkout_op.tcl:527
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr "'%s' をリセットしますか?"
-#: lib/checkout_op.tcl:532 lib/merge.tcl:164 lib/tools_dlg.tcl:343
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr "可視化"
-#: lib/checkout_op.tcl:600
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -1009,7 +1047,7 @@ msgstr ""
msgid "Git Gui"
msgstr "Git GUI"
-#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:382
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr "新しいリポジトリを作る"
@@ -1017,7 +1055,7 @@ msgstr "新しいリポジトリを作る"
msgid "New..."
msgstr "新規…"
-#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr "既存リポジトリを複製する"
@@ -1025,7 +1063,7 @@ msgstr "既存リポジトリを複製する"
msgid "Clone..."
msgstr "複製…"
-#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr "既存リポジトリを開く"
@@ -1041,193 +1079,193 @@ msgstr "最近使ったリポジトリ"
msgid "Open Recent Repository:"
msgstr "最近使ったリポジトリを開く"
-#: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
-#: lib/choose_repository.tcl:316
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "リポジトリ %s を作製できません:"
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr "ディレクトリ:"
-#: lib/choose_repository.tcl:417 lib/choose_repository.tcl:544
-#: lib/choose_repository.tcl:1017
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr "GIT リポジトリ"
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr "ディレクトリ '%s' は既に存在します。"
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr "ファイル '%s' は既に存在します。"
-#: lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr "複製"
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr "ソースの位置"
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr "先ディレクトリ:"
-#: lib/choose_repository.tcl:496
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr "複製方式:"
-#: lib/choose_repository.tcl:502
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "標準(高速・中冗長度・ハードリンク)"
-#: lib/choose_repository.tcl:508
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "全複写(低速・冗長バックアップ)"
-#: lib/choose_repository.tcl:514
+#: lib/choose_repository.tcl:520
msgid "Shared (Fastest, Not Recommended, No Backup)"
msgstr "共有(最高速・非推奨・バックアップ無し)"
-#: lib/choose_repository.tcl:550 lib/choose_repository.tcl:597
-#: lib/choose_repository.tcl:743 lib/choose_repository.tcl:813
-#: lib/choose_repository.tcl:1023 lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "Git リポジトリではありません: %s"
-#: lib/choose_repository.tcl:586
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr "標準方式は同一計算機上のリポジトリにのみ使えます。"
-#: lib/choose_repository.tcl:590
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr "共有方式は同一計算機上のリポジトリにのみ使えます。"
-#: lib/choose_repository.tcl:611
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr "'%s' は既に存在します。"
-#: lib/choose_repository.tcl:622
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr "origin を設定できませんでした"
-#: lib/choose_repository.tcl:634
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr "オブジェクトを数えています"
-#: lib/choose_repository.tcl:635
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr "バケツ"
-#: lib/choose_repository.tcl:659
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "objects/info/alternates を複写できません: %s"
-#: lib/choose_repository.tcl:695
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "%s から複製する内容はありません"
-#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
-#: lib/choose_repository.tcl:923
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr "'master' ブランチが初期化されていません"
-#: lib/choose_repository.tcl:710
+#: lib/choose_repository.tcl:716
msgid "Hardlinks are unavailable. Falling back to copying."
msgstr "ハードリンクが作れないので、コピーします"
-#: lib/choose_repository.tcl:722
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr "%s から複製しています"
-#: lib/choose_repository.tcl:753
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr "オブジェクトを複写しています"
-#: lib/choose_repository.tcl:754
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr "KiB"
-#: lib/choose_repository.tcl:778
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "オブジェクトを複写できません: %s"
-#: lib/choose_repository.tcl:788
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr "オブジェクトを連結しています"
-#: lib/choose_repository.tcl:789
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr "オブジェクト"
-#: lib/choose_repository.tcl:797
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "オブジェクトをハードリンクできません: %s"
-#: lib/choose_repository.tcl:852
+#: lib/choose_repository.tcl:858
msgid "Cannot fetch branches and objects. See console output for details."
msgstr "ブランチやオブジェクトを取得できません。コンソール出力を見て下さい"
-#: lib/choose_repository.tcl:863
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr "タグを取得できません。コンソール出力を見て下さい"
-#: lib/choose_repository.tcl:887
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
msgstr "HEAD を確定できません。コンソール出力を見て下さい"
-#: lib/choose_repository.tcl:896
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "%s を掃除できません"
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr "複写に失敗しました。"
-#: lib/choose_repository.tcl:909
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr "デフォールト・ブランチが取得されませんでした"
-#: lib/choose_repository.tcl:920
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "%s をコミットとして解釈できません"
-#: lib/choose_repository.tcl:932
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr "作業ディレクトリを作成しています"
-#: lib/choose_repository.tcl:933 lib/index.tcl:65 lib/index.tcl:128
-#: lib/index.tcl:196
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr "ファイル"
-#: lib/choose_repository.tcl:962
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr "初期チェックアウトに失敗しました"
-#: lib/choose_repository.tcl:978
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr "開く"
-#: lib/choose_repository.tcl:988
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr "リポジトリ:"
-#: lib/choose_repository.tcl:1037
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "リポジトリ %s を開けません:"
@@ -1298,19 +1336,24 @@ msgstr ""
"現在はまだマージの途中です。先にこのマージを中止しないと、前のコミットの訂正"
"はできません\n"
-#: lib/commit.tcl:49
+#: lib/commit.tcl:48
msgid "Error loading commit data for amend:"
msgstr "訂正するコミットのデータを読めません:"
-#: lib/commit.tcl:76
+#: lib/commit.tcl:75
msgid "Unable to obtain your identity:"
msgstr "ユーザの正体を確認できません:"
-#: lib/commit.tcl:81
+#: lib/commit.tcl:80
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "GIT_COMMITTER_IDENT が無効です:"
-#: lib/commit.tcl:133
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "警告: Tcl はエンコーディング '%s' をサポートしていません"
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1326,7 +1369,7 @@ msgstr ""
"\n"
"自動的に再スキャンを開始します。\n"
-#: lib/commit.tcl:156
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1339,7 +1382,7 @@ msgstr ""
"ファイル %s にはマージ衝突が残っています。まず解決してコミット予定に加える必"
"要があります。\n"
-#: lib/commit.tcl:164
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1350,7 +1393,7 @@ msgstr ""
"\n"
"ファイル %s は本プログラムではコミットできません。\n"
-#: lib/commit.tcl:172
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
@@ -1360,7 +1403,7 @@ msgstr ""
"\n"
"最低一つの変更をコミット予定に加えてからコミットして下さい。\n"
-#: lib/commit.tcl:187
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1378,45 +1421,40 @@ msgstr ""
"- 第2行: 空白\n"
"- 残りの行: なぜ、この変更が良い変更か、の説明。\n"
-#: lib/commit.tcl:211
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr "警告: Tcl はエンコーディング '%s' をサポートしていません"
-
-#: lib/commit.tcl:227
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr "コミット前フックを実行中・・・"
-#: lib/commit.tcl:242
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr "コミット前フックがコミットを拒否しました"
-#: lib/commit.tcl:265
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr "コミット・メッセージ・フックを実行中・・・"
-#: lib/commit.tcl:280
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr "コミット・メッセージ・フックがコミットを拒否しました"
-#: lib/commit.tcl:293
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr "変更点をコミット中・・・"
-#: lib/commit.tcl:309
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr "write-tree が失敗しました:"
-#: lib/commit.tcl:310 lib/commit.tcl:354 lib/commit.tcl:374
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr "コミットに失敗しました。"
-#: lib/commit.tcl:327
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "コミット %s は壊れています"
-#: lib/commit.tcl:332
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1430,19 +1468,19 @@ msgstr ""
"\n"
"自動的に再スキャンを開始します。\n"
-#: lib/commit.tcl:339
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr "コミットする変更がありません。"
-#: lib/commit.tcl:353
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr "commit-tree が失敗しました:"
-#: lib/commit.tcl:373
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr "update-ref が失敗しました:"
-#: lib/commit.tcl:461
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr "コミット %s を作成しました: %s"
@@ -1495,20 +1533,19 @@ msgstr "データベース圧縮"
msgid "Verifying the object database with fsck-objects"
msgstr "fsck-objects でオブジェクト・データベースを検証しています"
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\n"
"\n"
"Compress the database now?"
msgstr ""
"このリポジトリにはおおよそ %i 個の個別オブジェクトがあります\n"
"\n"
-"最適な性能を保つために、%i 個以上の個別オブジェクトを作る毎にデータベースを圧"
-"縮することを推奨します\n"
+"最適な性能を保つために、データベースを圧縮することを推奨します\n"
"\n"
"データベースを圧縮しますか?"
@@ -1517,7 +1554,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Git から出た無効な日付: %s"
-#: lib/diff.tcl:59
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1539,12 +1576,12 @@ msgstr ""
"\n"
"同様な状態のファイルを探すために、自動的に再スキャンを開始します。"
-#: lib/diff.tcl:99
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr "%s の変更点をロード中…"
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
@@ -1552,7 +1589,7 @@ msgstr ""
"LOCAL: 削除\n"
"Remote:\n"
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
@@ -1560,32 +1597,32 @@ msgstr ""
"REMOTE: 削除\n"
"LOCAL:\n"
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr "LOCAL:\n"
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr "REMOTE\n"
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr "%s を表示できません"
-#: lib/diff.tcl:198
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr "ファイルを読む際のエラーです:"
-#: lib/diff.tcl:205
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr "Git リポジトリ(サブプロジェクト)"
-#: lib/diff.tcl:217
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr "* バイナリファイル(内容は表示しません)"
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
@@ -1594,7 +1631,7 @@ msgstr ""
"* 管理外のファイルの大きさは %d バイトです。\n"
"* 最初の %d バイトだけ表示しています。\n"
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1606,19 +1643,19 @@ msgstr ""
"* %s は管理外のファイルをここで切りおとしました。\n"
"* 全体を見るには外部エディタを使ってください。\n"
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr "選択されたパッチをコミット予定から外せません。"
-#: lib/diff.tcl:443
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr "選択されたパッチをコミット予定に加えられません。"
-#: lib/diff.tcl:509
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr "選択されたパッチ行をコミット予定から外せません。"
-#: lib/diff.tcl:517
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr "選択されたパッチ行をコミット予定に加えられません。"
@@ -1655,7 +1692,7 @@ msgstr "インデックスをロックできません"
msgid "Index Error"
msgstr "索引エラー"
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
@@ -1663,7 +1700,7 @@ msgstr ""
"GIT インデックスの更新が失敗しました。git-gui と同期をとるために再スキャンし"
"ます。"
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr "続行"
@@ -1671,43 +1708,43 @@ msgstr "続行"
msgid "Unlock Index"
msgstr "インデックスのロック解除"
-#: lib/index.tcl:287
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr "コミットから '%s' を降ろす"
-#: lib/index.tcl:326
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr "コミット準備完了"
-#: lib/index.tcl:339
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr "コミットに %s を加えています"
-#: lib/index.tcl:396
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr "ファイル %s にした変更を元に戻しますか?"
-#: lib/index.tcl:398
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr "これら %i 個のファイルにした変更を元に戻しますか?"
-#: lib/index.tcl:406
+#: lib/index.tcl:408
msgid "Any unstaged changes will be permanently lost by the revert."
msgstr "変更を元に戻すとコミット予定していない変更は全て失われます。"
-#: lib/index.tcl:409
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr "何もしない"
-#: lib/index.tcl:427
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr "選択されたファイルにした変更を元に戻します"
-#: lib/index.tcl:431
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr "%s にした変更を元に戻します"
@@ -1883,7 +1920,8 @@ msgstr ""
#: lib/mergetool.tcl:45
#, tcl-format
msgid "File %s seems to have unresolved conflicts, still stage?"
-msgstr "ファイル %s には解決していない競合部分がまだあるようですが、いいですか?"
+msgstr ""
+"ファイル %s には解決していない競合部分がまだあるようですが、いいですか?"
#: lib/mergetool.tcl:60
#, tcl-format
@@ -2141,7 +2179,8 @@ msgstr "%s からフェッチしています"
msgid "Do not know how to initialize repository at location '%s'."
msgstr "リポジトリ '%s' を初期化できません。"
-#: lib/remote_add.tcl:163 lib/transport.tcl:25 lib/transport.tcl:71
+#: lib/remote_add.tcl:163 lib/transport.tcl:25 lib/transport.tcl:63
+#: lib/transport.tcl:81
#, tcl-format
msgid "push %s"
msgstr "%s をプッシュ"
@@ -2159,11 +2198,11 @@ msgstr "遠隔でブランチ削除"
msgid "From Repository"
msgstr "元のリポジトリ"
-#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:123
+#: lib/remote_branch_delete.tcl:50 lib/transport.tcl:134
msgid "Remote:"
msgstr "リモート:"
-#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:138
+#: lib/remote_branch_delete.tcl:66 lib/transport.tcl:149
msgid "Arbitrary Location:"
msgstr "任意の位置:"
@@ -2179,10 +2218,6 @@ msgstr "条件付で削除"
msgid "Merged Into:"
msgstr "マージ先:"
-#: lib/remote_branch_delete.tcl:119
-msgid "Always (Do not perform merge checks)"
-msgstr "無条件(マージ検査をしない)"
-
#: lib/remote_branch_delete.tcl:152
msgid "A branch is required for 'Merged Into'."
msgstr "'マージ先' にはブランチが必要です。"
@@ -2211,26 +2246,16 @@ msgstr ""
msgid "Please select one or more branches to delete."
msgstr "削除するブランチを選択して下さい。"
-#: lib/remote_branch_delete.tcl:216
-msgid ""
-"Recovering deleted branches is difficult.\n"
-"\n"
-"Delete the selected branches?"
-msgstr ""
-"削除したブランチを回復するのは困難です。\n"
-"\n"
-"選択したブランチを削除して良いですか?"
-
#: lib/remote_branch_delete.tcl:226
#, tcl-format
msgid "Deleting branches from %s"
msgstr "%s からブランチを削除しています。"
-#: lib/remote_branch_delete.tcl:286
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr "リポジトリが選択されていません。"
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr "%s をスキャンしています…"
@@ -2251,11 +2276,11 @@ msgstr "前"
msgid "Case-Sensitive"
msgstr "大文字小文字を区別"
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr "ショートカットが書けません:"
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr "アイコンが書けません:"
@@ -2501,30 +2526,30 @@ msgstr "%s へミラーしています"
msgid "Pushing %s %s to %s"
msgstr "%3$s へ %1$s %2$s をプッシュしています"
-#: lib/transport.tcl:89
+#: lib/transport.tcl:100
msgid "Push Branches"
msgstr "ブランチをプッシュ"
-#: lib/transport.tcl:103
+#: lib/transport.tcl:114
msgid "Source Branches"
msgstr "元のブランチ"
-#: lib/transport.tcl:120
+#: lib/transport.tcl:131
msgid "Destination Repository"
msgstr "送り先リポジトリ"
-#: lib/transport.tcl:158
+#: lib/transport.tcl:169
msgid "Transfer Options"
msgstr "通信オプション"
-#: lib/transport.tcl:160
+#: lib/transport.tcl:171
msgid "Force overwrite existing branch (may discard changes)"
msgstr "既存ブランチを上書き(変更を破棄する可能性があります)"
-#: lib/transport.tcl:164
+#: lib/transport.tcl:175
msgid "Use thin pack (for slow network connections)"
msgstr "Thin Pack を使う(遅いネットワーク接続)"
-#: lib/transport.tcl:168
+#: lib/transport.tcl:179
msgid "Include tags"
msgstr "タグを含める"
diff --git a/git-gui/po/sv.po b/git-gui/po/sv.po
index c1535f94e8..d8d73acf2c 100644
--- a/git-gui/po/sv.po
+++ b/git-gui/po/sv.po
@@ -8,41 +8,41 @@ msgid ""
msgstr ""
"Project-Id-Version: sv\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-12-08 08:31-0800\n"
-"PO-Revision-Date: 2008-12-10 09:49+0100\n"
+"POT-Creation-Date: 2010-01-26 15:47-0800\n"
+"PO-Revision-Date: 2010-01-28 13:57+0100\n"
"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
+"Content-Transfer-Encoding: 8bit"
-#: git-gui.sh:41 git-gui.sh:737 git-gui.sh:751 git-gui.sh:764 git-gui.sh:847
-#: git-gui.sh:866
+#: git-gui.sh:41 git-gui.sh:793 git-gui.sh:807 git-gui.sh:820 git-gui.sh:903
+#: git-gui.sh:922
msgid "git-gui: fatal error"
msgstr "git-gui: ödesdigert fel"
-#: git-gui.sh:689
+#: git-gui.sh:743
#, tcl-format
msgid "Invalid font specified in %s:"
msgstr "Ogiltigt teckensnitt angivet i %s:"
-#: git-gui.sh:723
+#: git-gui.sh:779
msgid "Main Font"
msgstr "Huvudteckensnitt"
-#: git-gui.sh:724
+#: git-gui.sh:780
msgid "Diff/Console Font"
msgstr "Diff/konsolteckensnitt"
-#: git-gui.sh:738
+#: git-gui.sh:794
msgid "Cannot find git in PATH."
msgstr "Hittar inte git i PATH."
-#: git-gui.sh:765
+#: git-gui.sh:821
msgid "Cannot parse Git version string:"
msgstr "Kan inte tolka versionssträng från Git:"
-#: git-gui.sh:783
+#: git-gui.sh:839
#, tcl-format
msgid ""
"Git version cannot be determined.\n"
@@ -61,449 +61,478 @@ msgstr ""
"\n"
"Anta att \"%s\" är version 1.5.0?\n"
-#: git-gui.sh:1062
+#: git-gui.sh:1128
msgid "Git directory not found:"
msgstr "Git-katalogen hittades inte:"
-#: git-gui.sh:1069
+#: git-gui.sh:1146
msgid "Cannot move to top of working directory:"
msgstr "Kan inte gå till början på arbetskatalogen:"
-#: git-gui.sh:1076
-msgid "Cannot use funny .git directory:"
-msgstr "Kan inte använda underlig .git-katalog:"
+#: git-gui.sh:1154
+msgid "Cannot use bare repository:"
+msgstr "Kan inte använda naket arkiv:"
-#: git-gui.sh:1081
+#: git-gui.sh:1162
msgid "No working directory"
msgstr "Ingen arbetskatalog"
-#: git-gui.sh:1247 lib/checkout_op.tcl:305
+#: git-gui.sh:1334 lib/checkout_op.tcl:306
msgid "Refreshing file status..."
msgstr "Uppdaterar filstatus..."
-#: git-gui.sh:1303
+#: git-gui.sh:1390
msgid "Scanning for modified files ..."
msgstr "Söker efter ändrade filer..."
-#: git-gui.sh:1367
+#: git-gui.sh:1454
msgid "Calling prepare-commit-msg hook..."
msgstr ""
"Anropar kroken för förberedelse av incheckningsmeddelande (prepare-commit-"
"msg)..."
-#: git-gui.sh:1384
+#: git-gui.sh:1471
msgid "Commit declined by prepare-commit-msg hook."
msgstr ""
"Incheckningen avvisades av kroken för förberedelse av incheckningsmeddelande "
"(prepare-commit-msg)."
-#: git-gui.sh:1542 lib/browser.tcl:246
+#: git-gui.sh:1629 lib/browser.tcl:246
msgid "Ready."
msgstr "Klar."
-#: git-gui.sh:1819
+#: git-gui.sh:1787
+#, tcl-format
+msgid "Displaying only %s of %s files."
+msgstr "Visar endast %s av %s filer."
+
+#: git-gui.sh:1913
msgid "Unmodified"
msgstr "Oförändrade"
-#: git-gui.sh:1821
+#: git-gui.sh:1915
msgid "Modified, not staged"
msgstr "Förändrade, ej köade"
-#: git-gui.sh:1822 git-gui.sh:1830
+#: git-gui.sh:1916 git-gui.sh:1924
msgid "Staged for commit"
msgstr "Köade för incheckning"
-#: git-gui.sh:1823 git-gui.sh:1831
+#: git-gui.sh:1917 git-gui.sh:1925
msgid "Portions staged for commit"
msgstr "Delar köade för incheckning"
-#: git-gui.sh:1824 git-gui.sh:1832
+#: git-gui.sh:1918 git-gui.sh:1926
msgid "Staged for commit, missing"
msgstr "Köade för incheckning, saknade"
-#: git-gui.sh:1826
+#: git-gui.sh:1920
msgid "File type changed, not staged"
msgstr "Filtyp ändrad, ej köade"
-#: git-gui.sh:1827
+#: git-gui.sh:1921
msgid "File type changed, staged"
msgstr "Filtyp ändrad, köade"
-#: git-gui.sh:1829
+#: git-gui.sh:1923
msgid "Untracked, not staged"
msgstr "Ej spårade, ej köade"
-#: git-gui.sh:1834
+#: git-gui.sh:1928
msgid "Missing"
msgstr "Saknade"
-#: git-gui.sh:1835
+#: git-gui.sh:1929
msgid "Staged for removal"
msgstr "Köade för borttagning"
-#: git-gui.sh:1836
+#: git-gui.sh:1930
msgid "Staged for removal, still present"
msgstr "Köade för borttagning, fortfarande närvarande"
-#: git-gui.sh:1838 git-gui.sh:1839 git-gui.sh:1840 git-gui.sh:1841
-#: git-gui.sh:1842 git-gui.sh:1843
+#: git-gui.sh:1932 git-gui.sh:1933 git-gui.sh:1934 git-gui.sh:1935
+#: git-gui.sh:1936 git-gui.sh:1937
msgid "Requires merge resolution"
msgstr "Kräver konflikthantering efter sammanslagning"
-#: git-gui.sh:1878
+#: git-gui.sh:1972
msgid "Starting gitk... please wait..."
msgstr "Startar gitk... vänta..."
-#: git-gui.sh:1887
+#: git-gui.sh:1984
msgid "Couldn't find gitk in PATH"
-msgstr "Hittar inte gitk i PATH."
+msgstr "Hittade inte gitk i PATH."
+
+#: git-gui.sh:2043
+msgid "Couldn't find git gui in PATH"
+msgstr "Hittade inte git gui i PATH."
-#: git-gui.sh:2280 lib/choose_repository.tcl:36
+#: git-gui.sh:2455 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "Arkiv"
-#: git-gui.sh:2281
+#: git-gui.sh:2456
msgid "Edit"
msgstr "Redigera"
-#: git-gui.sh:2283 lib/choose_rev.tcl:561
+#: git-gui.sh:2458 lib/choose_rev.tcl:561
msgid "Branch"
msgstr "Gren"
-#: git-gui.sh:2286 lib/choose_rev.tcl:548
+#: git-gui.sh:2461 lib/choose_rev.tcl:548
msgid "Commit@@noun"
msgstr "Incheckning"
-#: git-gui.sh:2289 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
+#: git-gui.sh:2464 lib/merge.tcl:121 lib/merge.tcl:150 lib/merge.tcl:168
msgid "Merge"
msgstr "Slå ihop"
-#: git-gui.sh:2290 lib/choose_rev.tcl:557
+#: git-gui.sh:2465 lib/choose_rev.tcl:557
msgid "Remote"
msgstr "Fjärrarkiv"
-#: git-gui.sh:2293
+#: git-gui.sh:2468
msgid "Tools"
msgstr "Verktyg"
-#: git-gui.sh:2302
+#: git-gui.sh:2477
msgid "Explore Working Copy"
msgstr "Utforska arbetskopia"
-#: git-gui.sh:2307
+#: git-gui.sh:2483
msgid "Browse Current Branch's Files"
msgstr "Bläddra i grenens filer"
-#: git-gui.sh:2311
+#: git-gui.sh:2487
msgid "Browse Branch Files..."
msgstr "Bläddra filer på gren..."
-#: git-gui.sh:2316
+#: git-gui.sh:2492
msgid "Visualize Current Branch's History"
msgstr "Visualisera grenens historik"
-#: git-gui.sh:2320
+#: git-gui.sh:2496
msgid "Visualize All Branch History"
msgstr "Visualisera alla grenars historik"
-#: git-gui.sh:2327
+#: git-gui.sh:2503
#, tcl-format
msgid "Browse %s's Files"
msgstr "Bläddra i filer för %s"
-#: git-gui.sh:2329
+#: git-gui.sh:2505
#, tcl-format
msgid "Visualize %s's History"
msgstr "Visualisera historik för %s"
-#: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
+#: git-gui.sh:2510 lib/database.tcl:27 lib/database.tcl:67
msgid "Database Statistics"
msgstr "Databasstatistik"
-#: git-gui.sh:2337 lib/database.tcl:34
+#: git-gui.sh:2513 lib/database.tcl:34
msgid "Compress Database"
msgstr "Komprimera databas"
-#: git-gui.sh:2340
+#: git-gui.sh:2516
msgid "Verify Database"
msgstr "Verifiera databas"
-#: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
-#: lib/shortcut.tcl:39 lib/shortcut.tcl:71
+#: git-gui.sh:2523 git-gui.sh:2527 git-gui.sh:2531 lib/shortcut.tcl:8
+#: lib/shortcut.tcl:40 lib/shortcut.tcl:72
msgid "Create Desktop Icon"
msgstr "Skapa skrivbordsikon"
-#: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
+#: git-gui.sh:2539 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
msgid "Quit"
msgstr "Avsluta"
-#: git-gui.sh:2371
+#: git-gui.sh:2547
msgid "Undo"
msgstr "Ångra"
-#: git-gui.sh:2374
+#: git-gui.sh:2550
msgid "Redo"
msgstr "Gör om"
-#: git-gui.sh:2378 git-gui.sh:2937
+#: git-gui.sh:2554 git-gui.sh:3109
msgid "Cut"
msgstr "Klipp ut"
-#: git-gui.sh:2381 git-gui.sh:2940 git-gui.sh:3014 git-gui.sh:3096
+#: git-gui.sh:2557 git-gui.sh:3112 git-gui.sh:3186 git-gui.sh:3259
#: lib/console.tcl:69
msgid "Copy"
msgstr "Kopiera"
-#: git-gui.sh:2384 git-gui.sh:2943
+#: git-gui.sh:2560 git-gui.sh:3115
msgid "Paste"
msgstr "Klistra in"
-#: git-gui.sh:2387 git-gui.sh:2946 lib/branch_delete.tcl:26
+#: git-gui.sh:2563 git-gui.sh:3118 lib/branch_delete.tcl:26
#: lib/remote_branch_delete.tcl:38
msgid "Delete"
msgstr "Ta bort"
-#: git-gui.sh:2391 git-gui.sh:2950 git-gui.sh:3100 lib/console.tcl:71
+#: git-gui.sh:2567 git-gui.sh:3122 git-gui.sh:3263 lib/console.tcl:71
msgid "Select All"
msgstr "Markera alla"
-#: git-gui.sh:2400
+#: git-gui.sh:2576
msgid "Create..."
msgstr "Skapa..."
-#: git-gui.sh:2406
+#: git-gui.sh:2582
msgid "Checkout..."
msgstr "Checka ut..."
-#: git-gui.sh:2412
+#: git-gui.sh:2588
msgid "Rename..."
msgstr "Byt namn..."
-#: git-gui.sh:2417
+#: git-gui.sh:2593
msgid "Delete..."
msgstr "Ta bort..."
-#: git-gui.sh:2422
+#: git-gui.sh:2598
msgid "Reset..."
msgstr "Återställ..."
-#: git-gui.sh:2432
+#: git-gui.sh:2608
msgid "Done"
msgstr "Färdig"
-#: git-gui.sh:2434
+#: git-gui.sh:2610
msgid "Commit@@verb"
msgstr "Checka in"
-#: git-gui.sh:2443 git-gui.sh:2878
+#: git-gui.sh:2619 git-gui.sh:3050
msgid "New Commit"
msgstr "Ny incheckning"
-#: git-gui.sh:2451 git-gui.sh:2885
+#: git-gui.sh:2627 git-gui.sh:3057
msgid "Amend Last Commit"
msgstr "Lägg till föregående incheckning"
-#: git-gui.sh:2461 git-gui.sh:2839 lib/remote_branch_delete.tcl:99
+#: git-gui.sh:2637 git-gui.sh:3011 lib/remote_branch_delete.tcl:99
msgid "Rescan"
msgstr "Sök på nytt"
-#: git-gui.sh:2467
+#: git-gui.sh:2643
msgid "Stage To Commit"
msgstr "Köa för incheckning"
-#: git-gui.sh:2473
+#: git-gui.sh:2649
msgid "Stage Changed Files To Commit"
msgstr "Köa ändrade filer för incheckning"
-#: git-gui.sh:2479
+#: git-gui.sh:2655
msgid "Unstage From Commit"
msgstr "Ta bort från incheckningskö"
-#: git-gui.sh:2484 lib/index.tcl:410
+#: git-gui.sh:2661 lib/index.tcl:412
msgid "Revert Changes"
msgstr "Återställ ändringar"
-#: git-gui.sh:2491 git-gui.sh:3083
+#: git-gui.sh:2669 git-gui.sh:3310 git-gui.sh:3341
msgid "Show Less Context"
msgstr "Visa mindre sammanhang"
-#: git-gui.sh:2495 git-gui.sh:3087
+#: git-gui.sh:2673 git-gui.sh:3314 git-gui.sh:3345
msgid "Show More Context"
msgstr "Visa mer sammanhang"
-#: git-gui.sh:2502 git-gui.sh:2852 git-gui.sh:2961
+#: git-gui.sh:2680 git-gui.sh:3024 git-gui.sh:3133
msgid "Sign Off"
msgstr "Skriv under"
-#: git-gui.sh:2518
+#: git-gui.sh:2696
msgid "Local Merge..."
msgstr "Lokal sammanslagning..."
-#: git-gui.sh:2523
+#: git-gui.sh:2701
msgid "Abort Merge..."
msgstr "Avbryt sammanslagning..."
-#: git-gui.sh:2535 git-gui.sh:2575
+#: git-gui.sh:2713 git-gui.sh:2741
msgid "Add..."
msgstr "Lägg till..."
-#: git-gui.sh:2539
+#: git-gui.sh:2717
msgid "Push..."
msgstr "Sänd..."
-#: git-gui.sh:2543
+#: git-gui.sh:2721
msgid "Delete Branch..."
msgstr "Ta bort gren..."
-#: git-gui.sh:2553 git-gui.sh:2589 lib/about.tcl:14
-#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
-#, tcl-format
-msgid "About %s"
-msgstr "Om %s"
-
-#: git-gui.sh:2557
-msgid "Preferences..."
-msgstr "Inställningar..."
-
-#: git-gui.sh:2565 git-gui.sh:3129
+#: git-gui.sh:2731 git-gui.sh:3292
msgid "Options..."
msgstr "Alternativ..."
-#: git-gui.sh:2576
+#: git-gui.sh:2742
msgid "Remove..."
msgstr "Ta bort..."
-#: git-gui.sh:2585 lib/choose_repository.tcl:50
+#: git-gui.sh:2751 lib/choose_repository.tcl:50
msgid "Help"
msgstr "Hjälp"
-#: git-gui.sh:2611
+#: git-gui.sh:2755 git-gui.sh:2759 lib/about.tcl:14
+#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:53
+#, tcl-format
+msgid "About %s"
+msgstr "Om %s"
+
+#: git-gui.sh:2783
msgid "Online Documentation"
msgstr "Webbdokumentation"
-#: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
+#: git-gui.sh:2786 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
msgid "Show SSH Key"
msgstr "Visa SSH-nyckel"
-#: git-gui.sh:2721
+#: git-gui.sh:2893
#, 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:2754
+#: git-gui.sh:2926
msgid "Current Branch:"
msgstr "Aktuell gren:"
-#: git-gui.sh:2775
+#: git-gui.sh:2947
msgid "Staged Changes (Will Commit)"
msgstr "Köade ändringar (kommer att checkas in)"
-#: git-gui.sh:2795
+#: git-gui.sh:2967
msgid "Unstaged Changes"
msgstr "Oköade ändringar"
-#: git-gui.sh:2845
+#: git-gui.sh:3017
msgid "Stage Changed"
msgstr "Köa ändrade"
-#: git-gui.sh:2864 lib/transport.tcl:104 lib/transport.tcl:193
+#: git-gui.sh:3036 lib/transport.tcl:104 lib/transport.tcl:193
msgid "Push"
msgstr "Sänd"
-#: git-gui.sh:2899
+#: git-gui.sh:3071
msgid "Initial Commit Message:"
msgstr "Inledande incheckningsmeddelande:"
-#: git-gui.sh:2900
+#: git-gui.sh:3072
msgid "Amended Commit Message:"
msgstr "Utökat incheckningsmeddelande:"
-#: git-gui.sh:2901
+#: git-gui.sh:3073
msgid "Amended Initial Commit Message:"
msgstr "Utökat inledande incheckningsmeddelande:"
-#: git-gui.sh:2902
+#: git-gui.sh:3074
msgid "Amended Merge Commit Message:"
msgstr "Utökat incheckningsmeddelande för sammanslagning:"
-#: git-gui.sh:2903
+#: git-gui.sh:3075
msgid "Merge Commit Message:"
msgstr "Incheckningsmeddelande för sammanslagning:"
-#: git-gui.sh:2904
+#: git-gui.sh:3076
msgid "Commit Message:"
msgstr "Incheckningsmeddelande:"
-#: git-gui.sh:2953 git-gui.sh:3104 lib/console.tcl:73
+#: git-gui.sh:3125 git-gui.sh:3267 lib/console.tcl:73
msgid "Copy All"
msgstr "Kopiera alla"
-#: git-gui.sh:2977 lib/blame.tcl:104
+#: git-gui.sh:3149 lib/blame.tcl:104
msgid "File:"
msgstr "Fil:"
-#: git-gui.sh:3092
+#: git-gui.sh:3255
msgid "Refresh"
msgstr "Uppdatera"
-#: git-gui.sh:3113
+#: git-gui.sh:3276
msgid "Decrease Font Size"
msgstr "Minska teckensnittsstorlek"
-#: git-gui.sh:3117
+#: git-gui.sh:3280
msgid "Increase Font Size"
msgstr "Öka teckensnittsstorlek"
-#: git-gui.sh:3125 lib/blame.tcl:281
+#: git-gui.sh:3288 lib/blame.tcl:281
msgid "Encoding"
msgstr "Teckenkodning"
-#: git-gui.sh:3136
+#: git-gui.sh:3299
msgid "Apply/Reverse Hunk"
msgstr "Använd/återställ del"
-#: git-gui.sh:3141
+#: git-gui.sh:3304
msgid "Apply/Reverse Line"
msgstr "Använd/återställ rad"
-#: git-gui.sh:3151
+#: git-gui.sh:3323
msgid "Run Merge Tool"
msgstr "Starta verktyg för sammanslagning"
-#: git-gui.sh:3156
+#: git-gui.sh:3328
msgid "Use Remote Version"
msgstr "Använd versionen från fjärrarkivet"
-#: git-gui.sh:3160
+#: git-gui.sh:3332
msgid "Use Local Version"
msgstr "Använd lokala versionen"
-#: git-gui.sh:3164
+#: git-gui.sh:3336
msgid "Revert To Base"
msgstr "Återställ till basversionen"
-#: git-gui.sh:3183
+#: git-gui.sh:3354
+msgid "Visualize These Changes In The Submodule"
+msgstr "Visualisera ändringarna i undermodulen"
+
+#: git-gui.sh:3358
+msgid "Visualize Current Branch History In The Submodule"
+msgstr "Visualisera grenens historik i undermodulen"
+
+#: git-gui.sh:3362
+msgid "Visualize All Branch History In The Submodule"
+msgstr "Visualisera alla grenars historik i undermodulen"
+
+#: git-gui.sh:3367
+msgid "Start git gui In The Submodule"
+msgstr "Starta git gui i undermodulen"
+
+#: git-gui.sh:3389
msgid "Unstage Hunk From Commit"
msgstr "Ta bort del ur incheckningskö"
-#: git-gui.sh:3184
+#: git-gui.sh:3391
+msgid "Unstage Lines From Commit"
+msgstr "Ta bort rader ur incheckningskö"
+
+#: git-gui.sh:3393
msgid "Unstage Line From Commit"
msgstr "Ta bort rad ur incheckningskö"
-#: git-gui.sh:3186
+#: git-gui.sh:3396
msgid "Stage Hunk For Commit"
msgstr "Ställ del i incheckningskö"
-#: git-gui.sh:3187
+#: git-gui.sh:3398
+msgid "Stage Lines For Commit"
+msgstr "Ställ rader i incheckningskö"
+
+#: git-gui.sh:3400
msgid "Stage Line For Commit"
msgstr "Ställ rad i incheckningskö"
-#: git-gui.sh:3210
+#: git-gui.sh:3424
msgid "Initializing..."
msgstr "Initierar..."
-#: git-gui.sh:3315
+#: git-gui.sh:3541
#, tcl-format
msgid ""
"Possible environment issues exist.\n"
@@ -520,7 +549,7 @@ msgstr ""
"av %s:\n"
"\n"
-#: git-gui.sh:3345
+#: git-gui.sh:3570
msgid ""
"\n"
"This is due to a known issue with the\n"
@@ -530,7 +559,7 @@ msgstr ""
"Detta beror på ett känt problem med\n"
"Tcl-binären som följer med Cygwin."
-#: git-gui.sh:3350
+#: git-gui.sh:3575
#, tcl-format
msgid ""
"\n"
@@ -640,7 +669,7 @@ msgstr "Hittar inte föräldraincheckning:"
msgid "Unable to display parent"
msgstr "Kan inte visa förälder"
-#: lib/blame.tcl:1091 lib/diff.tcl:297
+#: lib/blame.tcl:1091 lib/diff.tcl:320
msgid "Error loading diff:"
msgstr "Fel vid inläsning av differens:"
@@ -666,7 +695,7 @@ 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:282
-#: lib/checkout_op.tcl:544 lib/choose_font.tcl:43 lib/merge.tcl:172
+#: lib/checkout_op.tcl:579 lib/choose_font.tcl:43 lib/merge.tcl:172
#: lib/option.tcl:125 lib/remote_add.tcl:32 lib/remote_branch_delete.tcl:42
#: lib/tools_dlg.tcl:40 lib/tools_dlg.tcl:204 lib/tools_dlg.tcl:352
#: lib/transport.tcl:108
@@ -697,7 +726,7 @@ msgstr "Skapa gren"
msgid "Create New Branch"
msgstr "Skapa ny gren"
-#: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
+#: lib/branch_create.tcl:31 lib/choose_repository.tcl:381
msgid "Create"
msgstr "Skapa"
@@ -729,7 +758,7 @@ msgstr "Nej"
msgid "Fast Forward Only"
msgstr "Endast snabbspolning"
-#: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
+#: lib/branch_create.tcl:85 lib/checkout_op.tcl:571
msgid "Reset"
msgstr "Återställ"
@@ -771,15 +800,25 @@ msgstr "Lokala grenar"
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:54 lib/remote_branch_delete.tcl:119
+msgid "Always (Do not perform merge checks)"
+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 lib/remote_branch_delete.tcl:217
+msgid ""
+"Recovering deleted branches is difficult.\n"
+"\n"
+"Delete the selected branches?"
+msgstr ""
+"Det kan vara svårt att återställa borttagna grenar.\n"
+"\n"
+"Ta bort de valda grenarna?"
+
#: lib/branch_delete.tcl:141
#, tcl-format
msgid ""
@@ -809,7 +848,7 @@ msgstr "Nytt namn:"
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:201
+#: lib/branch_rename.tcl:96 lib/checkout_op.tcl:202
#, tcl-format
msgid "Branch '%s' already exists."
msgstr "Grenen \"%s\" finns redan."
@@ -840,38 +879,38 @@ msgstr "[Upp till förälder]"
msgid "Browse Branch Files"
msgstr "Bläddra filer på grenen"
-#: lib/browser.tcl:278 lib/choose_repository.tcl:394
-#: lib/choose_repository.tcl:480 lib/choose_repository.tcl:491
-#: lib/choose_repository.tcl:995
+#: lib/browser.tcl:278 lib/choose_repository.tcl:398
+#: lib/choose_repository.tcl:486 lib/choose_repository.tcl:497
+#: lib/choose_repository.tcl:1028
msgid "Browse"
msgstr "Bläddra"
-#: lib/checkout_op.tcl:84
+#: lib/checkout_op.tcl:85
#, tcl-format
msgid "Fetching %s from %s"
msgstr "Hämtar %s från %s"
-#: lib/checkout_op.tcl:132
+#: lib/checkout_op.tcl:133
#, tcl-format
msgid "fatal: Cannot resolve %s"
msgstr "ödesdigert: Kunde inte slå upp %s"
-#: lib/checkout_op.tcl:145 lib/console.tcl:81 lib/database.tcl:31
+#: lib/checkout_op.tcl:146 lib/console.tcl:81 lib/database.tcl:31
#: lib/sshkey.tcl:53
msgid "Close"
msgstr "Stäng"
-#: lib/checkout_op.tcl:174
+#: lib/checkout_op.tcl:175
#, tcl-format
msgid "Branch '%s' does not exist."
msgstr "Grenen \"%s\" finns inte."
-#: lib/checkout_op.tcl:193
+#: lib/checkout_op.tcl:194
#, tcl-format
msgid "Failed to configure simplified git-pull for '%s'."
msgstr "Kunde inte konfigurera förenklad git-pull för '%s'."
-#: lib/checkout_op.tcl:228
+#: lib/checkout_op.tcl:229
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -884,21 +923,21 @@ msgstr ""
"Den kan inte snabbspolas till %s.\n"
"En sammanslagning krävs."
-#: lib/checkout_op.tcl:242
+#: lib/checkout_op.tcl:243
#, tcl-format
msgid "Merge strategy '%s' not supported."
msgstr "Sammanslagningsstrategin \"%s\" stöds inte."
-#: lib/checkout_op.tcl:261
+#: lib/checkout_op.tcl:262
#, tcl-format
msgid "Failed to update '%s'."
msgstr "Misslyckades med att uppdatera \"%s\"."
-#: lib/checkout_op.tcl:273
+#: lib/checkout_op.tcl:274
msgid "Staging area (index) is already locked."
msgstr "Köområdet (index) är redan låst."
-#: lib/checkout_op.tcl:288
+#: lib/checkout_op.tcl:289
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -914,30 +953,30 @@ msgstr ""
"\n"
"Sökningen kommer att startas automatiskt nu.\n"
-#: lib/checkout_op.tcl:344
+#: lib/checkout_op.tcl:345
#, tcl-format
msgid "Updating working directory to '%s'..."
msgstr "Uppdaterar arbetskatalogen till \"%s\"..."
-#: lib/checkout_op.tcl:345
+#: lib/checkout_op.tcl:346
msgid "files checked out"
msgstr "filer utcheckade"
-#: lib/checkout_op.tcl:375
+#: lib/checkout_op.tcl:376
#, 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:376
+#: lib/checkout_op.tcl:377
msgid "File level merge required."
msgstr "Sammanslagning på filnivå krävs."
-#: lib/checkout_op.tcl:380
+#: lib/checkout_op.tcl:381
#, tcl-format
msgid "Staying on branch '%s'."
msgstr "Stannar på grenen \"%s\"."
-#: lib/checkout_op.tcl:451
+#: lib/checkout_op.tcl:452
msgid ""
"You are no longer on a local branch.\n"
"\n"
@@ -949,31 +988,31 @@ msgstr ""
"Om du ville vara på en gren skapar du en nu, baserad på \"Denna frånkopplade "
"utcheckning\"."
-#: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
+#: lib/checkout_op.tcl:503 lib/checkout_op.tcl:507
#, tcl-format
msgid "Checked out '%s'."
msgstr "Checkade ut \"%s\"."
-#: lib/checkout_op.tcl:500
+#: lib/checkout_op.tcl:535
#, tcl-format
msgid "Resetting '%s' to '%s' will lose the following commits:"
msgstr ""
"Om du återställer \"%s\" till \"%s\" går följande incheckningar förlorade:"
-#: lib/checkout_op.tcl:522
+#: lib/checkout_op.tcl:557
msgid "Recovering lost commits may not be easy."
msgstr "Det kanske inte är så enkelt att återskapa förlorade incheckningar."
-#: lib/checkout_op.tcl:527
+#: lib/checkout_op.tcl:562
#, tcl-format
msgid "Reset '%s'?"
msgstr "Återställa \"%s\"?"
-#: lib/checkout_op.tcl:532 lib/merge.tcl:164 lib/tools_dlg.tcl:343
+#: lib/checkout_op.tcl:567 lib/merge.tcl:164 lib/tools_dlg.tcl:343
msgid "Visualize"
msgstr "Visualisera"
-#: lib/checkout_op.tcl:600
+#: lib/checkout_op.tcl:635
#, tcl-format
msgid ""
"Failed to set current branch.\n"
@@ -1018,7 +1057,7 @@ msgstr ""
msgid "Git Gui"
msgstr "Git Gui"
-#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:382
+#: lib/choose_repository.tcl:87 lib/choose_repository.tcl:386
msgid "Create New Repository"
msgstr "Skapa nytt arkiv"
@@ -1026,7 +1065,7 @@ msgstr "Skapa nytt arkiv"
msgid "New..."
msgstr "Nytt..."
-#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
+#: lib/choose_repository.tcl:100 lib/choose_repository.tcl:471
msgid "Clone Existing Repository"
msgstr "Klona befintligt arkiv"
@@ -1034,7 +1073,7 @@ msgstr "Klona befintligt arkiv"
msgid "Clone..."
msgstr "Klona..."
-#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
+#: lib/choose_repository.tcl:113 lib/choose_repository.tcl:1016
msgid "Open Existing Repository"
msgstr "Öppna befintligt arkiv"
@@ -1050,193 +1089,193 @@ msgstr "Senaste arkiven"
msgid "Open Recent Repository:"
msgstr "Öppna tidigare arkiv:"
-#: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
-#: lib/choose_repository.tcl:316
+#: lib/choose_repository.tcl:306 lib/choose_repository.tcl:313
+#: lib/choose_repository.tcl:320
#, tcl-format
msgid "Failed to create repository %s:"
msgstr "Kunde inte skapa arkivet %s:"
-#: lib/choose_repository.tcl:387
+#: lib/choose_repository.tcl:391
msgid "Directory:"
msgstr "Katalog:"
-#: lib/choose_repository.tcl:417 lib/choose_repository.tcl:544
-#: lib/choose_repository.tcl:1017
+#: lib/choose_repository.tcl:423 lib/choose_repository.tcl:550
+#: lib/choose_repository.tcl:1052
msgid "Git Repository"
msgstr "Gitarkiv"
-#: lib/choose_repository.tcl:442
+#: lib/choose_repository.tcl:448
#, tcl-format
msgid "Directory %s already exists."
msgstr "Katalogen %s finns redan."
-#: lib/choose_repository.tcl:446
+#: lib/choose_repository.tcl:452
#, tcl-format
msgid "File %s already exists."
msgstr "Filen %s finns redan."
-#: lib/choose_repository.tcl:460
+#: lib/choose_repository.tcl:466
msgid "Clone"
msgstr "Klona"
-#: lib/choose_repository.tcl:473
+#: lib/choose_repository.tcl:479
msgid "Source Location:"
msgstr "Plats för källkod:"
-#: lib/choose_repository.tcl:484
+#: lib/choose_repository.tcl:490
msgid "Target Directory:"
msgstr "Målkatalog:"
-#: lib/choose_repository.tcl:496
+#: lib/choose_repository.tcl:502
msgid "Clone Type:"
msgstr "Typ av klon:"
-#: lib/choose_repository.tcl:502
+#: lib/choose_repository.tcl:508
msgid "Standard (Fast, Semi-Redundant, Hardlinks)"
msgstr "Standard (snabb, semiredundant, hårda länkar)"
-#: lib/choose_repository.tcl:508
+#: lib/choose_repository.tcl:514
msgid "Full Copy (Slower, Redundant Backup)"
msgstr "Full kopia (långsammare, redundant säkerhetskopia)"
-#: lib/choose_repository.tcl:514
+#: lib/choose_repository.tcl:520
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:743 lib/choose_repository.tcl:813
-#: lib/choose_repository.tcl:1023 lib/choose_repository.tcl:1031
+#: lib/choose_repository.tcl:556 lib/choose_repository.tcl:603
+#: lib/choose_repository.tcl:749 lib/choose_repository.tcl:819
+#: lib/choose_repository.tcl:1058 lib/choose_repository.tcl:1066
#, tcl-format
msgid "Not a Git repository: %s"
msgstr "Inte ett Gitarkiv: %s"
-#: lib/choose_repository.tcl:586
+#: lib/choose_repository.tcl:592
msgid "Standard only available for local repository."
msgstr "Standard är endast tillgängligt för lokala arkiv."
-#: lib/choose_repository.tcl:590
+#: lib/choose_repository.tcl:596
msgid "Shared only available for local repository."
msgstr "Delat är endast tillgängligt för lokala arkiv."
-#: lib/choose_repository.tcl:611
+#: lib/choose_repository.tcl:617
#, tcl-format
msgid "Location %s already exists."
msgstr "Platsen %s finns redan."
-#: lib/choose_repository.tcl:622
+#: lib/choose_repository.tcl:628
msgid "Failed to configure origin"
msgstr "Kunde inte konfigurera ursprung"
-#: lib/choose_repository.tcl:634
+#: lib/choose_repository.tcl:640
msgid "Counting objects"
msgstr "Räknar objekt"
-#: lib/choose_repository.tcl:635
+#: lib/choose_repository.tcl:641
msgid "buckets"
msgstr "hinkar"
-#: lib/choose_repository.tcl:659
+#: lib/choose_repository.tcl:665
#, tcl-format
msgid "Unable to copy objects/info/alternates: %s"
msgstr "Kunde inte kopiera objekt/info/alternativ: %s"
-#: lib/choose_repository.tcl:695
+#: lib/choose_repository.tcl:701
#, tcl-format
msgid "Nothing to clone from %s."
msgstr "Ingenting att klona från %s."
-#: lib/choose_repository.tcl:697 lib/choose_repository.tcl:911
-#: lib/choose_repository.tcl:923
+#: lib/choose_repository.tcl:703 lib/choose_repository.tcl:917
+#: lib/choose_repository.tcl:929
msgid "The 'master' branch has not been initialized."
msgstr "Grenen \"master\" har inte initierats."
-#: lib/choose_repository.tcl:710
+#: lib/choose_repository.tcl:716
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:722
+#: lib/choose_repository.tcl:728
#, tcl-format
msgid "Cloning from %s"
msgstr "Klonar från %s"
-#: lib/choose_repository.tcl:753
+#: lib/choose_repository.tcl:759
msgid "Copying objects"
msgstr "Kopierar objekt"
-#: lib/choose_repository.tcl:754
+#: lib/choose_repository.tcl:760
msgid "KiB"
msgstr "KiB"
-#: lib/choose_repository.tcl:778
+#: lib/choose_repository.tcl:784
#, tcl-format
msgid "Unable to copy object: %s"
msgstr "Kunde inte kopiera objekt: %s"
-#: lib/choose_repository.tcl:788
+#: lib/choose_repository.tcl:794
msgid "Linking objects"
msgstr "Länkar objekt"
-#: lib/choose_repository.tcl:789
+#: lib/choose_repository.tcl:795
msgid "objects"
msgstr "objekt"
-#: lib/choose_repository.tcl:797
+#: lib/choose_repository.tcl:803
#, tcl-format
msgid "Unable to hardlink object: %s"
msgstr "Kunde inte hårdlänka objekt: %s"
-#: lib/choose_repository.tcl:852
+#: lib/choose_repository.tcl:858
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:863
+#: lib/choose_repository.tcl:869
msgid "Cannot fetch tags. See console output for details."
msgstr "Kunde inte hämta taggar. Se konsolutdata för detaljer."
-#: lib/choose_repository.tcl:887
+#: lib/choose_repository.tcl:893
msgid "Cannot determine HEAD. See console output for details."
msgstr "Kunde inte avgöra HEAD. Se konsolutdata för detaljer."
-#: lib/choose_repository.tcl:896
+#: lib/choose_repository.tcl:902
#, tcl-format
msgid "Unable to cleanup %s"
msgstr "Kunde inte städa upp %s"
-#: lib/choose_repository.tcl:902
+#: lib/choose_repository.tcl:908
msgid "Clone failed."
msgstr "Kloning misslyckades."
-#: lib/choose_repository.tcl:909
+#: lib/choose_repository.tcl:915
msgid "No default branch obtained."
msgstr "Hämtade ingen standardgren."
-#: lib/choose_repository.tcl:920
+#: lib/choose_repository.tcl:926
#, tcl-format
msgid "Cannot resolve %s as a commit."
msgstr "Kunde inte slå upp %s till någon incheckning."
-#: lib/choose_repository.tcl:932
+#: lib/choose_repository.tcl:938
msgid "Creating working directory"
msgstr "Skapar arbetskatalog"
-#: lib/choose_repository.tcl:933 lib/index.tcl:65 lib/index.tcl:128
-#: lib/index.tcl:196
+#: lib/choose_repository.tcl:939 lib/index.tcl:67 lib/index.tcl:130
+#: lib/index.tcl:198
msgid "files"
msgstr "filer"
-#: lib/choose_repository.tcl:962
+#: lib/choose_repository.tcl:968
msgid "Initial file checkout failed."
msgstr "Inledande filutcheckning misslyckades."
-#: lib/choose_repository.tcl:978
+#: lib/choose_repository.tcl:1011
msgid "Open"
msgstr "Öppna"
-#: lib/choose_repository.tcl:988
+#: lib/choose_repository.tcl:1021
msgid "Repository:"
msgstr "Arkiv:"
-#: lib/choose_repository.tcl:1037
+#: lib/choose_repository.tcl:1072
#, tcl-format
msgid "Failed to open repository %s:"
msgstr "Kunde inte öppna arkivet %s:"
@@ -1320,7 +1359,12 @@ msgstr "Kunde inte hämta din identitet:"
msgid "Invalid GIT_COMMITTER_IDENT:"
msgstr "Felaktig GIT_COMMITTER_IDENT:"
-#: lib/commit.tcl:132
+#: lib/commit.tcl:129
+#, tcl-format
+msgid "warning: Tcl does not support encoding '%s'."
+msgstr "varning: Tcl stöder inte teckenkodningen \"%s\"."
+
+#: lib/commit.tcl:149
msgid ""
"Last scanned state does not match repository state.\n"
"\n"
@@ -1336,7 +1380,7 @@ msgstr ""
"\n"
"Sökningen kommer att startas automatiskt nu.\n"
-#: lib/commit.tcl:155
+#: lib/commit.tcl:172
#, tcl-format
msgid ""
"Unmerged files cannot be committed.\n"
@@ -1349,7 +1393,7 @@ msgstr ""
"Filen %s har sammanslagningskonflikter. Du måste lösa dem och köa filen "
"innan du checkar in den.\n"
-#: lib/commit.tcl:163
+#: lib/commit.tcl:180
#, tcl-format
msgid ""
"Unknown file state %s detected.\n"
@@ -1360,7 +1404,7 @@ msgstr ""
"\n"
"Filen %s kan inte checkas in av programmet.\n"
-#: lib/commit.tcl:171
+#: lib/commit.tcl:188
msgid ""
"No changes to commit.\n"
"\n"
@@ -1370,7 +1414,7 @@ msgstr ""
"\n"
"Du måste köa åtminstone en fil innan du kan checka in.\n"
-#: lib/commit.tcl:186
+#: lib/commit.tcl:203
msgid ""
"Please supply a commit message.\n"
"\n"
@@ -1388,45 +1432,40 @@ msgstr ""
"- Andra raden: Tom\n"
"- Följande rader: Beskriv varför det här är en bra ändring.\n"
-#: lib/commit.tcl:210
-#, tcl-format
-msgid "warning: Tcl does not support encoding '%s'."
-msgstr "varning: Tcl stöder inte teckenkodningen \"%s\"."
-
-#: lib/commit.tcl:226
+#: lib/commit.tcl:234
msgid "Calling pre-commit hook..."
msgstr "Anropar kroken före incheckning (pre-commit)..."
-#: lib/commit.tcl:241
+#: lib/commit.tcl:249
msgid "Commit declined by pre-commit hook."
msgstr "Incheckningen avvisades av kroken före incheckning (pre-commit)."
-#: lib/commit.tcl:264
+#: lib/commit.tcl:272
msgid "Calling commit-msg hook..."
msgstr "Anropar kroken för incheckningsmeddelande (commit-msg)..."
-#: lib/commit.tcl:279
+#: lib/commit.tcl:287
msgid "Commit declined by commit-msg hook."
msgstr "Incheckning avvisad av kroken för incheckningsmeddelande (commit-msg)."
-#: lib/commit.tcl:292
+#: lib/commit.tcl:300
msgid "Committing changes..."
msgstr "Checkar in ändringar..."
-#: lib/commit.tcl:308
+#: lib/commit.tcl:316
msgid "write-tree failed:"
msgstr "write-tree misslyckades:"
-#: lib/commit.tcl:309 lib/commit.tcl:353 lib/commit.tcl:373
+#: lib/commit.tcl:317 lib/commit.tcl:361 lib/commit.tcl:382
msgid "Commit failed."
msgstr "Incheckningen misslyckades."
-#: lib/commit.tcl:326
+#: lib/commit.tcl:334
#, tcl-format
msgid "Commit %s appears to be corrupt"
msgstr "Incheckningen %s verkar vara trasig"
-#: lib/commit.tcl:331
+#: lib/commit.tcl:339
msgid ""
"No changes to commit.\n"
"\n"
@@ -1440,19 +1479,19 @@ msgstr ""
"\n"
"En sökning kommer att startas automatiskt nu.\n"
-#: lib/commit.tcl:338
+#: lib/commit.tcl:346
msgid "No changes to commit."
msgstr "Inga ändringar att checka in."
-#: lib/commit.tcl:352
+#: lib/commit.tcl:360
msgid "commit-tree failed:"
msgstr "commit-tree misslyckades:"
-#: lib/commit.tcl:372
+#: lib/commit.tcl:381
msgid "update-ref failed:"
msgstr "update-ref misslyckades:"
-#: lib/commit.tcl:460
+#: lib/commit.tcl:469
#, tcl-format
msgid "Created commit %s: %s"
msgstr "Skapade incheckningen %s: %s"
@@ -1505,20 +1544,20 @@ msgstr "Komprimerar objektdatabasen"
msgid "Verifying the object database with fsck-objects"
msgstr "Verifierar objektdatabasen med fsck-objects"
-#: lib/database.tcl:108
+#: lib/database.tcl:107
#, 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"
+"the database.\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"
+"du komprimerar databasen.\n"
"\n"
"Komprimera databasen nu?"
@@ -1527,7 +1566,7 @@ msgstr ""
msgid "Invalid date from Git: %s"
msgstr "Ogiltigt datum från Git: %s"
-#: lib/diff.tcl:59
+#: lib/diff.tcl:64
#, tcl-format
msgid ""
"No differences detected.\n"
@@ -1550,12 +1589,12 @@ msgstr ""
"En sökning kommer automatiskt att startas för att hitta andra filer som kan "
"vara i samma tillstånd."
-#: lib/diff.tcl:99
+#: lib/diff.tcl:104
#, tcl-format
msgid "Loading diff of %s..."
msgstr "Läser differens för %s..."
-#: lib/diff.tcl:120
+#: lib/diff.tcl:125
msgid ""
"LOCAL: deleted\n"
"REMOTE:\n"
@@ -1563,7 +1602,7 @@ msgstr ""
"LOKAL: borttagen\n"
"FJÄRR:\n"
-#: lib/diff.tcl:125
+#: lib/diff.tcl:130
msgid ""
"REMOTE: deleted\n"
"LOCAL:\n"
@@ -1571,32 +1610,32 @@ msgstr ""
"FJÄRR: borttagen\n"
"LOKAL:\n"
-#: lib/diff.tcl:132
+#: lib/diff.tcl:137
msgid "LOCAL:\n"
msgstr "LOKAL:\n"
-#: lib/diff.tcl:135
+#: lib/diff.tcl:140
msgid "REMOTE:\n"
msgstr "FJÄRR:\n"
-#: lib/diff.tcl:197 lib/diff.tcl:296
+#: lib/diff.tcl:202 lib/diff.tcl:319
#, tcl-format
msgid "Unable to display %s"
msgstr "Kan inte visa %s"
-#: lib/diff.tcl:198
+#: lib/diff.tcl:203
msgid "Error loading file:"
msgstr "Fel vid läsning av fil:"
-#: lib/diff.tcl:205
+#: lib/diff.tcl:210
msgid "Git Repository (subproject)"
msgstr "Gitarkiv (underprojekt)"
-#: lib/diff.tcl:217
+#: lib/diff.tcl:222
msgid "* Binary file (not showing content)."
msgstr "* Binärfil (visar inte innehållet)."
-#: lib/diff.tcl:222
+#: lib/diff.tcl:227
#, tcl-format
msgid ""
"* Untracked file is %d bytes.\n"
@@ -1605,7 +1644,7 @@ msgstr ""
"* Den ospårade filen är %d byte.\n"
"* Visar endast inledande %d byte.\n"
-#: lib/diff.tcl:228
+#: lib/diff.tcl:233
#, tcl-format
msgid ""
"\n"
@@ -1616,19 +1655,19 @@ msgstr ""
"* Den ospårade filen klipptes här av %s.\n"
"* För att se hela filen, använd ett externt redigeringsprogram.\n"
-#: lib/diff.tcl:436
+#: lib/diff.tcl:482
msgid "Failed to unstage selected hunk."
msgstr "Kunde inte ta bort den valda delen från kön."
-#: lib/diff.tcl:443
+#: lib/diff.tcl:489
msgid "Failed to stage selected hunk."
msgstr "Kunde inte lägga till den valda delen till kön."
-#: lib/diff.tcl:509
+#: lib/diff.tcl:568
msgid "Failed to unstage selected line."
msgstr "Kunde inte ta bort den valda raden från kön."
-#: lib/diff.tcl:517
+#: lib/diff.tcl:576
msgid "Failed to stage selected line."
msgstr "Kunde inte lägga till den valda raden till kön."
@@ -1665,7 +1704,7 @@ msgstr "Kunde inte låsa upp indexet."
msgid "Index Error"
msgstr "Indexfel"
-#: lib/index.tcl:21
+#: lib/index.tcl:17
msgid ""
"Updating the Git index failed. A rescan will be automatically started to "
"resynchronize git-gui."
@@ -1673,7 +1712,7 @@ msgstr ""
"Misslyckades med att uppdatera Gitindexet. En omsökning kommer att startas "
"automatiskt för att synkronisera om git-gui."
-#: lib/index.tcl:27
+#: lib/index.tcl:28
msgid "Continue"
msgstr "Forstätt"
@@ -1681,44 +1720,44 @@ msgstr "Forstätt"
msgid "Unlock Index"
msgstr "Lås upp index"
-#: lib/index.tcl:287
+#: lib/index.tcl:289
#, tcl-format
msgid "Unstaging %s from commit"
msgstr "Tar bort %s för incheckningskön"
-#: lib/index.tcl:326
+#: lib/index.tcl:328
msgid "Ready to commit."
msgstr "Redo att checka in."
-#: lib/index.tcl:339
+#: lib/index.tcl:341
#, tcl-format
msgid "Adding %s"
msgstr "Lägger till %s"
-#: lib/index.tcl:396
+#: lib/index.tcl:398
#, tcl-format
msgid "Revert changes in file %s?"
msgstr "Återställ ändringarna i filen %s?"
-#: lib/index.tcl:398
+#: lib/index.tcl:400
#, tcl-format
msgid "Revert changes in these %i files?"
msgstr "Återställ ändringarna i dessa %i filer?"
-#: lib/index.tcl:406
+#: lib/index.tcl:408
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:409
+#: lib/index.tcl:411
msgid "Do Nothing"
msgstr "Gör ingenting"
-#: lib/index.tcl:427
+#: lib/index.tcl:429
msgid "Reverting selected files"
msgstr "Återställer valda filer"
-#: lib/index.tcl:431
+#: lib/index.tcl:433
#, tcl-format
msgid "Reverting %s"
msgstr "Återställer %s"
@@ -2195,10 +2234,6 @@ msgstr "Ta endast bort om"
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\"."
@@ -2227,26 +2262,16 @@ msgstr ""
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 borttagna 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
+#: lib/remote_branch_delete.tcl:292
msgid "No repository selected."
msgstr "Inget arkiv markerat."
-#: lib/remote_branch_delete.tcl:291
+#: lib/remote_branch_delete.tcl:297
#, tcl-format
msgid "Scanning %s..."
msgstr "Söker %s..."
@@ -2267,11 +2292,11 @@ msgstr "Föreg"
msgid "Case-Sensitive"
msgstr "Skilj på VERSALER/gemener"
-#: lib/shortcut.tcl:20 lib/shortcut.tcl:61
+#: lib/shortcut.tcl:21 lib/shortcut.tcl:62
msgid "Cannot write shortcut:"
msgstr "Kan inte skriva genväg:"
-#: lib/shortcut.tcl:136
+#: lib/shortcut.tcl:137
msgid "Cannot write icon:"
msgstr "Kan inte skriva ikon:"
@@ -2545,6 +2570,15 @@ msgstr "Använd tunt paket (för långsamma nätverksanslutningar)"
msgid "Include tags"
msgstr "Ta med taggar"
+#~ msgid "Cannot use funny .git directory:"
+#~ msgstr "Kan inte använda underlig .git-katalog:"
+
+#~ msgid "Preferences..."
+#~ msgstr "Inställningar..."
+
+#~ msgid "Always (Do not perform merge test.)"
+#~ msgstr "Alltid (utför inte sammanslagningstest)."
+
#~ msgid "URL:"
#~ msgstr "Webbadress:"
diff --git a/git-instaweb.sh b/git-instaweb.sh
index b8e6456208..6a65f255cc 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -320,7 +320,7 @@ EOF
else
# plain-old CGI
resolve_full_httpd
- list_mods=$(echo "$full_httpd" | sed "s/-f$/-l/")
+ list_mods=$(echo "$full_httpd" | sed 's/-f$/-l/')
$list_mods | sane_grep 'mod_cgi\.c' >/dev/null 2>&1 || \
if test -f "$module_path/mod_cgi.so"
then
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 5b6278572a..51dd0d67ba 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -1,3 +1,4 @@
+#!/bin/sh
# git-mergetool--lib is a library for common merge tool functions
diff_mode() {
test "$TOOL_MODE" = diff
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 5f47b18141..5f47b18141 100755..100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
diff --git a/git-pull.sh b/git-pull.sh
index 2de4c3aa70..1a4729f7bb 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -38,10 +38,10 @@ test -z "$(git ls-files -u)" || die_conflict
test -f "$GIT_DIR/MERGE_HEAD" && die_merge
strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
-log_arg= verbosity=
+log_arg= verbosity= progress=
merge_args=
curr_branch=$(git symbolic-ref -q HEAD)
-curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
+curr_branch_short="${curr_branch#refs/heads/}"
rebase=$(git config --bool branch.$curr_branch_short.rebase)
while :
do
@@ -50,6 +50,8 @@ do
verbosity="$verbosity -q" ;;
-v|--verbose)
verbosity="$verbosity -v" ;;
+ --progress)
+ progress=--progress ;;
-n|--no-stat|--no-summary)
diffstat=--no-stat ;;
--stat|--summary)
@@ -214,7 +216,7 @@ test true = "$rebase" && {
done
}
orig_head=$(git rev-parse -q --verify HEAD)
-git fetch $verbosity --update-head-ok "$@" || exit 1
+git fetch $verbosity $progress --update-head-ok "$@" || exit 1
curr_head=$(git rev-parse -q --verify HEAD)
if test -n "$orig_head" && test "$curr_head" != "$orig_head"
@@ -275,7 +277,7 @@ true)
*)
eval="git-merge $diffstat $no_commit $squash $no_ff $ff_only"
eval="$eval $log_arg $strategy_args $merge_args"
- eval="$eval \"$merge_name\" HEAD $merge_head $verbosity"
+ eval="$eval \"\$merge_name\" HEAD $merge_head $verbosity"
;;
esac
eval "exec $eval"
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index f69c062def..8a2771f1f9 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -223,10 +223,10 @@ has_action () {
# Run command with GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and
# GIT_AUTHOR_DATE exported from the current environment.
do_with_author () {
- GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
- GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
- GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
- "$@"
+ (
+ export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
+ "$@"
+ )
}
pick_one () {
@@ -387,7 +387,7 @@ update_squash_messages () {
sed -e 1d -e '2,/^./{
/^$/d
}' <"$SQUASH_MSG".bak
- } >$SQUASH_MSG
+ } >"$SQUASH_MSG"
else
commit_message HEAD > "$FIXUP_MSG" || die "Cannot write $FIXUP_MSG"
COUNT=2
@@ -396,7 +396,7 @@ update_squash_messages () {
echo "# The first commit's message is:"
echo
cat "$FIXUP_MSG"
- } >$SQUASH_MSG
+ } >"$SQUASH_MSG"
fi
case $1 in
squash)
@@ -412,11 +412,11 @@ update_squash_messages () {
echo
commit_message $2 | sed -e 's/^/# /'
;;
- esac >>$SQUASH_MSG
+ esac >>"$SQUASH_MSG"
}
peek_next_command () {
- sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO"
+ sed -n -e "/^#/d" -e '/^$/d' -e "s/ .*//p" -e "q" < "$TODO"
}
# A squash/fixup has failed. Prepare the long version of the squash
@@ -484,7 +484,7 @@ do_next () {
mark_action_done
pick_one $sha1 ||
die_with_patch $sha1 "Could not apply $sha1... $rest"
- echo "$1" > "$DOTEST"/stopped-sha
+ echo "$sha1" > "$DOTEST"/stopped-sha
make_patch $sha1
git rev-parse --verify HEAD > "$AMEND"
warn "Stopped at $sha1... $rest"
@@ -732,9 +732,10 @@ first and then run 'git rebase --continue' again."
test -n "$amend" && git reset --soft $amend
die "Could not commit staged changes."
}
- record_in_rewritten "$(cat "$DOTEST"/stopped-sha)"
fi
+ record_in_rewritten "$(cat "$DOTEST"/stopped-sha)"
+
require_clean_work_tree
do_rest
;;
diff --git a/git-rebase.sh b/git-rebase.sh
index 3a26321faa..e0eb9568f3 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -86,10 +86,8 @@ continue_merge () {
printf "Already applied: %0${prec}d " $msgnum
fi
fi
- if test -z "$GIT_QUIET"
- then
- git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
- fi
+ test -z "$GIT_QUIET" &&
+ GIT_PAGER='' git log --format=%s -1 "$cmt"
prev_head=`git rev-parse HEAD^0`
# save the resulting commit so we can read-tree on it later
diff --git a/git-request-pull.sh b/git-request-pull.sh
index 630ceddf03..8fd15f6df4 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -65,11 +65,11 @@ if [ -z "$branch" ]; then
status=1
fi
-echo "The following changes since commit $baserev:"
-git shortlog --max-count=1 $baserev | sed -e 's/^\(.\)/ \1/'
+git show -s --format='The following changes since commit %H:
-echo "are available in the git repository at:"
-echo
+ %s (%ci)
+
+are available in the git repository at:' $baserev
echo " $url $branch"
echo
diff --git a/git-send-email.perl b/git-send-email.perl
index e05455f74c..d612ae8729 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -47,9 +47,9 @@ git send-email [options] <file | directory | rev-list options >
Composing:
--from <str> * Email From:
- --to <str> * Email To:
- --cc <str> * Email Cc:
- --bcc <str> * Email Bcc:
+ --[no-]to <str> * Email To:
+ --[no-]cc <str> * Email Cc:
+ --[no-]bcc <str> * Email Bcc:
--subject <str> * Email "Subject:"
--in-reply-to <str> * Email "In-Reply-To:"
--annotate * Review each patch that will be sent in an editor.
@@ -135,7 +135,7 @@ sub unique_email_list(@);
sub cleanup_compose_files();
# Variables we fill in automatically, or via prompting:
-my (@to,@cc,@initial_cc,@bcclist,@xh,
+my (@to,$no_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
$initial_reply_to,$initial_subject,@files,
$author,$sender,$smtp_authpass,$annotate,$compose,$time);
@@ -261,8 +261,11 @@ my $rc = GetOptions("sender|from=s" => \$sender,
"in-reply-to=s" => \$initial_reply_to,
"subject=s" => \$initial_subject,
"to=s" => \@to,
+ "no-to" => \$no_to,
"cc=s" => \@initial_cc,
+ "no-cc" => \$no_cc,
"bcc=s" => \@bcclist,
+ "no-bcc" => \$no_bcc,
"chain-reply-to!" => \$chain_reply_to,
"smtp-server=s" => \$smtp_server,
"smtp-server-port=s" => \$smtp_server_port,
@@ -305,6 +308,9 @@ sub read_config {
foreach my $setting (keys %config_settings) {
my $target = $config_settings{$setting};
+ next if $setting eq "to" and defined $no_to;
+ next if $setting eq "cc" and defined $no_cc;
+ next if $setting eq "bcc" and defined $no_bcc;
if (ref($target) eq "ARRAY") {
unless (@$target) {
my @values = Git::config(@repo, "$prefix.$setting");
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index d56426dd39..6131670860 100755..100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -107,6 +107,19 @@ git_editor() {
eval "$GIT_EDITOR" '"$@"'
}
+git_pager() {
+ if test -t 1
+ then
+ GIT_PAGER=$(git var GIT_PAGER)
+ else
+ GIT_PAGER=cat
+ fi
+ : ${LESS=-FRSX}
+ export LESS
+
+ eval "$GIT_PAGER" '"$@"'
+}
+
sane_grep () {
GREP_OPTIONS= LC_ALL=C grep "$@"
}
@@ -128,7 +141,7 @@ cd_to_toplevel () {
}
require_work_tree () {
- test $(git rev-parse --is-inside-work-tree) = true ||
+ test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
die "fatal: $0 cannot be used without a working tree."
}
@@ -159,6 +172,13 @@ get_author_ident_from_commit () {
LANG=C LC_ALL=C sed -ne "$pick_author_script"
}
+# Clear repo-local GIT_* environment variables. Useful when switching to
+# another repository (e.g. when entering a submodule). See also the env
+# list in git_connect()
+clear_local_git_env() {
+ unset $(git rev-parse --local-env-vars)
+}
+
# Make sure we are in a valid repository of a vintage we understand,
# if we require to be in a git repository.
if test -z "$NONGIT_OK"
diff --git a/git-stash.sh b/git-stash.sh
index 3a0685f189..aa47e541ee 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -151,6 +151,7 @@ save_stash () {
;;
-*)
echo "error: unknown option for 'stash save': $1"
+ echo " To provide a message, use git stash save -- '$1'"
usage
;;
*)
@@ -221,6 +222,7 @@ show_stash () {
}
apply_stash () {
+ applied_stash=
unstash_index=
while test $# != 0
@@ -242,6 +244,9 @@ apply_stash () {
if test $# = 0
then
have_stash || die 'Nothing to apply'
+ applied_stash="$ref_stash@{0}"
+ else
+ applied_stash="$*"
fi
# stash records the work tree, and is a merge between the
@@ -415,8 +420,7 @@ pop)
shift
if apply_stash "$@"
then
- test -z "$unstash_index" || shift
- drop_stash "$@"
+ drop_stash "$applied_stash"
fi
;;
branch)
diff --git a/git-submodule.sh b/git-submodule.sh
index 77d223292c..2dd372a21d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -222,7 +222,7 @@ cmd_add()
module_clone "$path" "$realrepo" "$reference" || exit
(
- unset GIT_DIR
+ clear_local_git_env
cd "$path" &&
# ash fails to wordsplit ${branch:+-b "$branch"...}
case "$branch" in
@@ -278,7 +278,7 @@ cmd_foreach()
name=$(module_name "$path")
(
prefix="$prefix$path/"
- unset GIT_DIR
+ clear_local_git_env
cd "$path" &&
eval "$@" &&
if test -n "$recursive"
@@ -434,7 +434,7 @@ cmd_update()
module_clone "$path" "$url" "$reference"|| exit
subsha1=
else
- subsha1=$(unset GIT_DIR; cd "$path" &&
+ subsha1=$(clear_local_git_env; cd "$path" &&
git rev-parse --verify HEAD) ||
die "Unable to find current revision in submodule path '$path'"
fi
@@ -454,7 +454,7 @@ cmd_update()
if test -z "$nofetch"
then
- (unset GIT_DIR; cd "$path" &&
+ (clear_local_git_env; cd "$path" &&
git-fetch) ||
die "Unable to fetch in submodule path '$path'"
fi
@@ -477,14 +477,14 @@ cmd_update()
;;
esac
- (unset GIT_DIR; cd "$path" && $command "$sha1") ||
+ (clear_local_git_env; cd "$path" && $command "$sha1") ||
die "Unable to $action '$sha1' in submodule path '$path'"
say "Submodule path '$path': $msg '$sha1'"
fi
if test -n "$recursive"
then
- (unset GIT_DIR; cd "$path" && cmd_update $orig_args) ||
+ (clear_local_git_env; cd "$path" && cmd_update $orig_args) ||
die "Failed to recurse into submodule path '$path'"
fi
done
@@ -492,7 +492,7 @@ cmd_update()
set_name_rev () {
revname=$( (
- unset GIT_DIR
+ clear_local_git_env
cd "$1" && {
git describe "$2" 2>/dev/null ||
git describe --tags "$2" 2>/dev/null ||
@@ -553,12 +553,17 @@ cmd_summary() {
test $summary_limit = 0 && return
- if rev=$(git rev-parse -q --verify "$1^0")
+ if rev=$(git rev-parse -q --verify --default HEAD ${1+"$1"})
then
head=$rev
- shift
+ test $# = 0 || shift
+ elif test -z "$1" -o "$1" = "HEAD"
+ then
+ # before the first commit: compare with an empty tree
+ head=$(git hash-object -w -t tree --stdin </dev/null)
+ test -z "$1" || shift
else
- head=HEAD
+ head="HEAD"
fi
if [ -n "$files" ]
@@ -688,7 +693,11 @@ cmd_summary() {
echo
done |
if test -n "$for_status"; then
- echo "# Modified submodules:"
+ if [ -n "$files" ]; then
+ echo "# Submodules changed but not updated:"
+ else
+ echo "# Submodule changes to be committed:"
+ fi
echo "#"
sed -e 's|^|# |' -e 's|^# $|#|'
else
@@ -753,7 +762,7 @@ cmd_status()
else
if test -z "$cached"
then
- sha1=$(unset GIT_DIR; cd "$path" && git rev-parse --verify HEAD)
+ sha1=$(clear_local_git_env; cd "$path" && git rev-parse --verify HEAD)
set_name_rev "$path" "$sha1"
fi
say "+$sha1 $displaypath$revname"
@@ -763,7 +772,7 @@ cmd_status()
then
(
prefix="$displaypath/"
- unset GIT_DIR
+ clear_local_git_env
cd "$path" &&
cmd_status $orig_args
) ||
@@ -814,7 +823,7 @@ cmd_sync()
if test -e "$path"/.git
then
(
- unset GIT_DIR
+ clear_local_git_env
cd "$path"
remote=$(get_default_remote)
say "Synchronizing submodule url for '$name'"
diff --git a/git-svn.perl b/git-svn.perl
index 650c9e5f02..2c86ea2e38 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -26,6 +26,7 @@ if (! exists $ENV{SVN_SSH}) {
$ENV{SVN_SSH} = $ENV{GIT_SSH};
if ($^O eq 'msys') {
$ENV{SVN_SSH} =~ s/\\/\\\\/g;
+ $ENV{SVN_SSH} =~ s/(.*)/"$1"/;
}
}
}
@@ -35,11 +36,13 @@ $ENV{TZ} = 'UTC';
$| = 1; # unbuffer STDOUT
sub fatal (@) { print STDERR "@_\n"; exit 1 }
-require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
-require SVN::Ra;
-require SVN::Delta;
-if ($SVN::Core::VERSION lt '1.1.0') {
- fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
+sub _req_svn {
+ require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
+ require SVN::Ra;
+ require SVN::Delta;
+ if ($SVN::Core::VERSION lt '1.1.0') {
+ fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
+ }
}
my $can_compress = eval { require Compress::Zlib; 1};
push @Git::SVN::Ra::ISA, 'SVN::Ra';
@@ -115,6 +118,7 @@ my %init_opts = ( 'template=s' => \$_template, 'shared:s' => \$_shared,
'use-svm-props' => sub { $icv{useSvmProps} = 1 },
'use-svnsync-props' => sub { $icv{useSvnsyncProps} = 1 },
'rewrite-root=s' => sub { $icv{rewriteRoot} = $_[1] },
+ 'rewrite-uuid=s' => sub { $icv{rewriteUUID} = $_[1] },
%remote_opts );
my %cmt_opts = ( 'edit|e' => \$_edit,
'rmdir' => \$SVN::Git::Editor::_rmdir,
@@ -155,12 +159,16 @@ my %cmd = (
{ 'message|m=s' => \$_message,
'destination|d=s' => \$_branch_dest,
'dry-run|n' => \$_dry_run,
- 'tag|t' => \$_tag } ],
+ 'tag|t' => \$_tag,
+ 'username=s' => \$Git::SVN::Prompt::_username,
+ 'commit-url=s' => \$_commit_url } ],
tag => [ sub { $_tag = 1; cmd_branch(@_) },
'Create a tag in the SVN repository',
{ 'message|m=s' => \$_message,
'destination|d=s' => \$_branch_dest,
- 'dry-run|n' => \$_dry_run } ],
+ 'dry-run|n' => \$_dry_run,
+ 'username=s' => \$Git::SVN::Prompt::_username,
+ 'commit-url=s' => \$_commit_url } ],
'set-tree' => [ \&cmd_set_tree,
"Set an SVN repository to a git tree-ish",
{ 'stdin' => \$_stdin, %cmt_opts, %fc_opts, } ],
@@ -343,6 +351,7 @@ information.
}
sub version {
+ ::_req_svn();
print "git-svn version $VERSION (svn $SVN::Core::VERSION)\n";
exit 0;
}
@@ -361,7 +370,6 @@ sub do_git_init_db {
command_noisy(@init_db);
$_repository = Git->repository(Repository => ".git");
}
- command_noisy('config', 'core.autocrlf', 'false');
my $set;
my $pfx = "svn-remote.$Git::SVN::default_repo_id";
foreach my $i (keys %icv) {
@@ -708,7 +716,23 @@ sub cmd_branch {
}
}
my ($lft, $rgt) = @{ $glob->{path} }{qw/left right/};
- my $dst = join '/', $remote->{url}, $lft, $branch_name, ($rgt || ());
+ my $url;
+ if (defined $_commit_url) {
+ $url = $_commit_url;
+ } else {
+ $url = eval { command_oneline('config', '--get',
+ "svn-remote.$gs->{repo_id}.commiturl") };
+ if (!$url) {
+ $url = $remote->{url};
+ }
+ }
+ my $dst = join '/', $url, $lft, $branch_name, ($rgt || ());
+
+ if ($dst =~ /^https:/ && $src =~ /^http:/) {
+ $src=~s/^http:/https:/;
+ }
+
+ ::_req_svn();
my $ctx = SVN::Client->new(
auth => Git::SVN::Ra::_auth_providers(),
@@ -1078,6 +1102,7 @@ sub cmd_info {
if ($@) {
$result .= "Repository Root: (offline)\n";
}
+ ::_req_svn();
$result .= "Repository UUID: $uuid\n" unless $diff_status eq "A" &&
($SVN::Core::VERSION le '1.5.4' || $file_type ne "dir");
$result .= "Revision: " . ($diff_status eq "A" ? 0 : $rev) . "\n";
@@ -1636,6 +1661,7 @@ use File::Path qw/mkpath/;
use File::Copy qw/copy/;
use IPC::Open3;
use Memoize; # core since 5.8.0, Jul 2002
+use Memoize::Storable;
my ($_gc_nr, $_gc_period);
@@ -1806,8 +1832,8 @@ sub read_all_remotes {
my $rs = {
t => $t,
remote => $remote,
- path => Git::SVN::GlobSpec->new($local_ref),
- ref => Git::SVN::GlobSpec->new($remote_ref) };
+ path => Git::SVN::GlobSpec->new($local_ref, 1),
+ ref => Git::SVN::GlobSpec->new($remote_ref, 0) };
if (length($rs->{ref}->{right}) != 0) {
die "The '*' glob character must be the last ",
"character of '$remote_ref'\n";
@@ -2189,6 +2215,10 @@ sub svnsync {
die "Can't have both 'useSvnsyncProps' and 'rewriteRoot' ",
"options set!\n";
}
+ if ($self->rewrite_uuid) {
+ die "Can't have both 'useSvnsyncProps' and 'rewriteUUID' ",
+ "options set!\n";
+ }
my $svnsync;
# see if we have it in our config, first:
@@ -2470,6 +2500,20 @@ sub rewrite_root {
$self->{-rewrite_root} = $rwr;
}
+sub rewrite_uuid {
+ my ($self) = @_;
+ return $self->{-rewrite_uuid} if exists $self->{-rewrite_uuid};
+ my $k = "svn-remote.$self->{repo_id}.rewriteUUID";
+ my $rwid = eval { command_oneline(qw/config --get/, $k) };
+ if ($rwid) {
+ $rwid =~ s#/+$##;
+ if ($rwid !~ m#^[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}$#) {
+ die "$rwid is not a valid UUID (key: $k)\n";
+ }
+ }
+ $self->{-rewrite_uuid} = $rwid;
+}
+
sub metadata_url {
my ($self) = @_;
($self->rewrite_root || $self->{url}) .
@@ -2954,7 +2998,7 @@ sub find_extra_svk_parents {
for my $ticket ( @tickets ) {
my ($uuid, $path, $rev) = split /:/, $ticket;
if ( $uuid eq $self->ra_uuid ) {
- my $url = $self->rewrite_root || $self->{url};
+ my $url = $self->{url};
my $repos_root = $url;
my $branch_from = $path;
$branch_from =~ s{^/}{};
@@ -3052,12 +3096,65 @@ sub check_cherry_pick {
for my $range ( @ranges ) {
delete @commits{_rev_list($range)};
}
+ for my $commit (keys %commits) {
+ if (has_no_changes($commit)) {
+ delete $commits{$commit};
+ }
+ }
return (keys %commits);
}
-BEGIN {
- memoize 'lookup_svn_merge';
- memoize 'check_cherry_pick';
+sub has_no_changes {
+ my $commit = shift;
+
+ my @revs = split / /, command_oneline(
+ qw(rev-list --parents -1 -m), $commit);
+
+ # Commits with no parents, e.g. the start of a partial branch,
+ # have changes by definition.
+ return 1 if (@revs < 2);
+
+ # Commits with multiple parents, e.g a merge, have no changes
+ # by definition.
+ return 0 if (@revs > 2);
+
+ return (command_oneline("rev-parse", "$commit^{tree}") eq
+ command_oneline("rev-parse", "$commit~1^{tree}"));
+}
+
+# The GIT_DIR environment variable is not always set until after the command
+# line arguments are processed, so we can't memoize in a BEGIN block.
+{
+ my $memoized = 0;
+
+ sub memoize_svn_mergeinfo_functions {
+ return if $memoized;
+ $memoized = 1;
+
+ my $cache_path = "$ENV{GIT_DIR}/svn/.caches/";
+ mkpath([$cache_path]) unless -d $cache_path;
+
+ tie my %lookup_svn_merge_cache => 'Memoize::Storable',
+ "$cache_path/lookup_svn_merge.db", 'nstore';
+ memoize 'lookup_svn_merge',
+ SCALAR_CACHE => 'FAULT',
+ LIST_CACHE => ['HASH' => \%lookup_svn_merge_cache],
+ ;
+
+ tie my %check_cherry_pick_cache => 'Memoize::Storable',
+ "$cache_path/check_cherry_pick.db", 'nstore';
+ memoize 'check_cherry_pick',
+ SCALAR_CACHE => 'FAULT',
+ LIST_CACHE => ['HASH' => \%check_cherry_pick_cache],
+ ;
+
+ tie my %has_no_changes_cache => 'Memoize::Storable',
+ "$cache_path/has_no_changes.db", 'nstore';
+ memoize 'has_no_changes',
+ SCALAR_CACHE => ['HASH' => \%has_no_changes_cache],
+ LIST_CACHE => 'FAULT',
+ ;
+ }
}
sub parents_exclude {
@@ -3101,13 +3198,15 @@ sub find_extra_svn_parents {
my ($self, $ed, $mergeinfo, $parents) = @_;
# aha! svk:merge property changed...
+ memoize_svn_mergeinfo_functions();
+
# We first search for merged tips which are not in our
# history. Then, we figure out which git revisions are in
# that tip, but not this revision. If all of those revisions
# are now marked as merge, we can add the tip as a parent.
my @merges = split "\n", $mergeinfo;
my @merge_tips;
- my $url = $self->rewrite_root || $self->{url};
+ my $url = $self->{url};
my $uuid = $self->ra_uuid;
my %ranges;
for my $merge ( @merges ) {
@@ -3134,10 +3233,21 @@ sub find_extra_svn_parents {
my $ranges = $ranges{$merge_tip};
# check out 'new' tips
- my $merge_base = command_oneline(
- "merge-base",
- @$parents, $merge_tip,
- );
+ my $merge_base;
+ eval {
+ $merge_base = command_oneline(
+ "merge-base",
+ @$parents, $merge_tip,
+ );
+ };
+ if ($@) {
+ die "An error occurred during merge-base"
+ unless $@->isa("Git::Error::Command");
+
+ warn "W: Cannot find common ancestor between ".
+ "@$parents and $merge_tip. Ignoring merge info.\n";
+ next;
+ }
# double check that there are no missing non-merge commits
my (@incomplete) = check_cherry_pick(
@@ -3168,7 +3278,7 @@ sub find_extra_svn_parents {
"$new_parents[$i]..$new_parents[$j]",
);
if ( !$revs ) {
- undef($new_parents[$i]);
+ undef($new_parents[$j]);
}
}
}
@@ -3253,6 +3363,10 @@ sub make_log_entry {
die "Can't have both 'useSvmProps' and 'rewriteRoot' ",
"options set!\n";
}
+ if ($self->rewrite_uuid) {
+ die "Can't have both 'useSvmProps' and 'rewriteUUID' ",
+ "options set!\n";
+ }
my ($uuid, $r) = $headrev =~ m{^([a-f\d\-]{30,}):(\d+)$}i;
# we don't want "SVM: initializing mirror for junk" ...
return undef if $r == 0;
@@ -3283,10 +3397,10 @@ sub make_log_entry {
} else {
my $url = $self->metadata_url;
remove_username($url);
- $log_entry{metadata} = "$url\@$rev " .
- $self->ra->get_uuid;
- $email ||= "$author\@" . $self->ra->get_uuid;
- $commit_email ||= "$author\@" . $self->ra->get_uuid;
+ my $uuid = $self->rewrite_uuid || $self->ra->get_uuid;
+ $log_entry{metadata} = "$url\@$rev " . $uuid;
+ $email ||= "$author\@" . $uuid;
+ $commit_email ||= "$author\@" . $uuid;
}
$log_entry{name} = $name;
$log_entry{email} = $email;
@@ -3368,7 +3482,7 @@ sub rebuild {
'--');
my $metadata_url = $self->metadata_url;
remove_username($metadata_url);
- my $svn_uuid = $self->ra_uuid;
+ my $svn_uuid = $self->rewrite_uuid || $self->ra_uuid;
my $c;
while (<$log>) {
if ( m{^commit ($::sha1)$} ) {
@@ -3857,18 +3971,25 @@ sub username {
sub _read_password {
my ($prompt, $realm) = @_;
- print STDERR $prompt;
- STDERR->flush;
- require Term::ReadKey;
- Term::ReadKey::ReadMode('noecho');
my $password = '';
- while (defined(my $key = Term::ReadKey::ReadKey(0))) {
- last if $key =~ /[\012\015]/; # \n\r
- $password .= $key;
+ if (exists $ENV{GIT_ASKPASS}) {
+ open(PH, "-|", $ENV{GIT_ASKPASS}, $prompt);
+ $password = <PH>;
+ $password =~ s/[\012\015]//; # \n\r
+ close(PH);
+ } else {
+ print STDERR $prompt;
+ STDERR->flush;
+ require Term::ReadKey;
+ Term::ReadKey::ReadMode('noecho');
+ while (defined(my $key = Term::ReadKey::ReadKey(0))) {
+ last if $key =~ /[\012\015]/; # \n\r
+ $password .= $key;
+ }
+ Term::ReadKey::ReadMode('restore');
+ print STDERR "\n";
+ STDERR->flush;
}
- Term::ReadKey::ReadMode('restore');
- print STDERR "\n";
- STDERR->flush;
$password;
}
@@ -4750,6 +4871,8 @@ sub new {
$url =~ s!/+$!!;
return $RA if ($RA && $RA->{url} eq $url);
+ ::_req_svn();
+
SVN::_Core::svn_config_ensure($config_dir, undef);
my ($baton, $callbacks) = SVN::Core::auth_open_helper(_auth_providers);
my $config = SVN::Core::config_get_config($config_dir);
@@ -5157,6 +5280,7 @@ sub match_globs {
next if (length $g->{path}->{right} &&
($self->check_path($p, $r) !=
$SVN::Node::dir));
+ next unless $p =~ /$g->{path}->{regex}/;
$exists->{$p} = Git::SVN->init($self->{url}, $p, undef,
$g->{ref}->full_path($de), 1);
}
@@ -5349,7 +5473,12 @@ sub git_svn_log_cmd {
# adapted from pager.c
sub config_pager {
- chomp(my $pager = command_oneline(qw(var GIT_PAGER)));
+ if (! -t *STDOUT) {
+ $ENV{GIT_PAGER_IN_USE} = 'false';
+ $pager = undef;
+ return;
+ }
+ chomp($pager = command_oneline(qw(var GIT_PAGER)));
if ($pager eq 'cat') {
$pager = undef;
}
@@ -5357,7 +5486,7 @@ sub config_pager {
}
sub run_pager {
- return unless -t *STDOUT && defined $pager;
+ return unless defined $pager;
pipe my ($rfd, $wfd) or return;
defined(my $pid = fork) or ::fatal "Can't fork: $!";
if (!$pid) {
@@ -5930,29 +6059,48 @@ use strict;
use warnings;
sub new {
- my ($class, $glob) = @_;
+ my ($class, $glob, $pattern_ok) = @_;
my $re = $glob;
$re =~ s!/+$!!g; # no need for trailing slashes
- $re =~ m!^([^*]*)(\*(?:/\*)*)(.*)$!;
- my $temp = $re;
- my ($left, $right) = ($1, $3);
- $re = $2;
- my $depth = $re =~ tr/*/*/;
- if ($depth != $temp =~ tr/*/*/) {
- die "Only one set of wildcard directories " .
- "(e.g. '*' or '*/*/*') is supported: '$glob'\n";
+ my (@left, @right, @patterns);
+ my $state = "left";
+ my $die_msg = "Only one set of wildcard directories " .
+ "(e.g. '*' or '*/*/*') is supported: '$glob'\n";
+ for my $part (split(m|/|, $glob)) {
+ if ($part =~ /\*/ && $part ne "*") {
+ die "Invalid pattern in '$glob': $part\n";
+ } elsif ($pattern_ok && $part =~ /[{}]/ &&
+ $part !~ /^\{[^{}]+\}/) {
+ die "Invalid pattern in '$glob': $part\n";
+ }
+ if ($part eq "*") {
+ die $die_msg if $state eq "right";
+ $state = "pattern";
+ push(@patterns, "[^/]*");
+ } elsif ($pattern_ok && $part =~ /^\{(.*)\}$/) {
+ die $die_msg if $state eq "right";
+ $state = "pattern";
+ my $p = quotemeta($1);
+ $p =~ s/\\,/|/g;
+ push(@patterns, "(?:$p)");
+ } else {
+ if ($state eq "left") {
+ push(@left, $part);
+ } else {
+ push(@right, $part);
+ $state = "right";
+ }
+ }
}
+ my $depth = @patterns;
if ($depth == 0) {
- die "One '*' is needed for glob: '$glob'\n";
- }
- $re =~ s!\*!\[^/\]*!g;
- $re = quotemeta($left) . "($re)" . quotemeta($right);
- if (length $left && !($left =~ s!/+$!!g)) {
- die "Missing trailing '/' on left side of: '$glob' ($left)\n";
- }
- if (length $right && !($right =~ s!^/+!!g)) {
- die "Missing leading '/' on right side of: '$glob' ($right)\n";
+ die "One '*' is needed in glob: '$glob'\n";
}
+ my $left = join('/', @left);
+ my $right = join('/', @right);
+ $re = join('/', @patterns);
+ $re = join('\/',
+ grep(length, quotemeta($left), "($re)", quotemeta($right)));
my $left_re = qr/^\/\Q$left\E(\/|$)/;
bless { left => $left, right => $right, left_regex => $left_re,
regex => qr/$re/, glob => $glob, depth => $depth }, $class;
diff --git a/git.c b/git.c
index 32f76e15ea..6bae30545b 100644
--- a/git.c
+++ b/git.c
@@ -54,6 +54,9 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
{
int handled = 0;
+ if (!getenv("GIT_ASKPASS") && getenv("SSH_ASKPASS"))
+ setenv("GIT_ASKPASS", getenv("SSH_ASKPASS"), 1);
+
while (*argc > 0) {
const char *cmd = (*argv)[0];
if (cmd[0] != '-')
@@ -528,7 +531,7 @@ int main(int argc, const char **argv)
break;
if (was_alias) {
fprintf(stderr, "Expansion of alias '%s' failed; "
- "'%s' is not a git-command\n",
+ "'%s' is not a git command\n",
cmd, argv[0]);
exit(1);
}
diff --git a/git.spec.in b/git.spec.in
index ab224f7eae..ee74a5eed7 100644
--- a/git.spec.in
+++ b/git.spec.in
@@ -98,6 +98,7 @@ BuildRequires: perl(Error)
Perl interface to Git
%define path_settings ETC_GITCONFIG=/etc/gitconfig prefix=%{_prefix} mandir=%{_mandir} htmldir=%{_docdir}/%{name}-%{version}
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%prep
%setup -q
@@ -112,6 +113,7 @@ rm -rf $RPM_BUILD_ROOT
make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
%{path_settings} \
INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
+test ! -d $RPM_BUILD_ROOT%{python_sitelib} || rm -fr $RPM_BUILD_ROOT%{python_sitelib}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
@@ -190,6 +192,12 @@ rm -rf $RPM_BUILD_ROOT
# No files for you!
%changelog
+* Sun Jan 31 2010 Junio C Hamano <gitster@pobox.com>
+- Do not use %define inside %{!?...} construct.
+
+* Sat Jan 30 2010 Junio C Hamano <gitster@pobox.com>
+- We don't ship Python bits until a real foreign scm interface comes.
+
* Mon Feb 04 2009 David J. Mellor <dmellor@whistlingcat.com>
- fixed broken git help -w after renaming the git-core package to git.
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 364c7a84cb..1f36a3e815 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -130,7 +130,7 @@ proc unmerged_files {files} {
}
proc parseviewargs {n arglist} {
- global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs
+ global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env
set vdatemode($n) 0
set vmergeonly($n) 0
@@ -210,6 +210,9 @@ proc parseviewargs {n arglist} {
# git rev-parse doesn't understand --merge
lappend revargs --gitk-symmetric-diff-marker MERGE_HEAD...HEAD
}
+ "--no-replace-objects" {
+ set env(GIT_NO_REPLACE_OBJECTS) "1"
+ }
"-*" {
# Other flag arguments including -<n>
if {[string is digit -strict [string range $arg 1 end]]} {
@@ -2085,7 +2088,7 @@ proc makewindow {} {
set sha1entry .tf.bar.sha1
set entries $sha1entry
set sha1but .tf.bar.sha1label
- button $sha1but -text [mc "SHA1 ID: "] -state disabled -relief flat \
+ 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
@@ -2779,7 +2782,7 @@ proc about {} {
message $w.m -text [mc "
Gitk - a commit viewer for git
-Copyright \u00a9 2005-2009 Paul Mackerras
+Copyright © 2005-2009 Paul Mackerras
Use and redistribute under the terms of the GNU General Public License"] \
-justify center -aspect 400 -border 2 -bg white -relief groove
@@ -7686,8 +7689,10 @@ proc getblobdiffline {bdf ids} {
makediffhdr $fname $ids
$ctext insert end "\n$line\n" filesep
} elseif {![string compare -length 3 " >" $line]} {
+ set line [encoding convertfrom $diffencoding $line]
$ctext insert end "$line\n" dresult
} elseif {![string compare -length 3 " <" $line]} {
+ set line [encoding convertfrom $diffencoding $line]
$ctext insert end "$line\n" d0
} elseif {$diffinhdr} {
if {![string compare -length 12 "rename from " $line]} {
@@ -8698,6 +8703,11 @@ proc mktag {} {
${NS}::label $top.tlab -text [mc "Tag name:"]
${NS}::entry $top.tag -width 60
grid $top.tlab $top.tag -sticky w
+ ${NS}::label $top.op -text [mc "Tag message is optional"]
+ grid $top.op -columnspan 2 -sticky we
+ ${NS}::label $top.mlab -text [mc "Tag message:"]
+ ${NS}::entry $top.msg -width 60
+ grid $top.mlab $top.msg -sticky w
${NS}::frame $top.buts
${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo
${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan
@@ -8715,6 +8725,7 @@ proc domktag {} {
set id [$mktagtop.sha1 get]
set tag [$mktagtop.tag get]
+ set msg [$mktagtop.msg get]
if {$tag == {}} {
error_popup [mc "No tag name specified"] $mktagtop
return 0
@@ -8724,7 +8735,11 @@ proc domktag {} {
return 0
}
if {[catch {
- exec git tag $tag $id
+ if {$msg != {}} {
+ exec git tag -a -m $msg $tag $id
+ } else {
+ exec git tag $tag $id
+ }
} err]} {
error_popup "[mc "Error creating tag:"] $err" $mktagtop
return 0
@@ -10480,7 +10495,7 @@ proc showtag {tag isnew} {
set linknum 0
if {![info exists tagcontents($tag)]} {
catch {
- set tagcontents($tag) [exec git cat-file tag $tagobjid($tag)]
+ set tagcontents($tag) [exec git cat-file tag $tag]
}
}
if {[info exists tagcontents($tag)]} {
diff --git a/gitk-git/po/de.po b/gitk-git/po/de.po
index 53ef0d6359..c79aa9cbc8 100644
--- a/gitk-git/po/de.po
+++ b/gitk-git/po/de.po
@@ -8,33 +8,33 @@ msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-05-12 21:55+0200\n"
-"PO-Revision-Date: 2009-05-12 22:18+0200\n"
+"POT-Creation-Date: 2010-01-27 20:21+0100\n"
+"PO-Revision-Date: 2010-01-27 20:27+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:113
+#: gitk:115
msgid "Couldn't get list of unmerged files:"
msgstr "Liste der nicht zusammengeführten Dateien nicht gefunden:"
-#: gitk:268
+#: gitk:274
msgid "Error parsing revisions:"
msgstr "Fehler beim Laden der Versionen:"
-#: gitk:323
+#: gitk:329
msgid "Error executing --argscmd command:"
msgstr "Fehler beim Ausführen des --argscmd-Kommandos:"
-#: gitk:336
+#: gitk:342
msgid "No files selected: --merge specified but no files are unmerged."
msgstr ""
"Keine Dateien ausgewählt: Es wurde --merge angegeben, aber es existieren "
"keine nicht zusammengeführten Dateien."
-#: gitk:339
+#: gitk:345
msgid ""
"No files selected: --merge specified but no unmerged files are within file "
"limit."
@@ -42,719 +42,801 @@ msgstr ""
"Keine Dateien ausgewählt: Es wurde --merge angegeben, aber es sind keine "
"nicht zusammengeführten Dateien in der Dateiauswahl."
-#: gitk:361 gitk:508
+#: gitk:367 gitk:514
msgid "Error executing git log:"
msgstr "Fehler beim Ausführen von »git log«:"
-#: gitk:379 gitk:524
+#: gitk:385 gitk:530
msgid "Reading"
msgstr "Lesen"
-#: gitk:439 gitk:4061
+#: gitk:445 gitk:4261
msgid "Reading commits..."
msgstr "Versionen werden gelesen ..."
-#: gitk:442 gitk:1560 gitk:4064
+#: gitk:448 gitk:1578 gitk:4264
msgid "No commits selected"
msgstr "Keine Versionen ausgewählt"
-#: gitk:1436
+#: gitk:1454
msgid "Can't parse git log output:"
msgstr "Ausgabe von »git log« kann nicht erkannt werden:"
-#: gitk:1656
+#: gitk:1674
msgid "No commit information available"
msgstr "Keine Versionsinformation verfügbar"
-#: gitk:1791 gitk:1815 gitk:3854 gitk:8714 gitk:10250 gitk:10422
+#: gitk:1816
+msgid "mc"
+msgstr "mc"
+
+#: gitk:1851 gitk:4054 gitk:9044 gitk:10585 gitk:10804
msgid "OK"
msgstr "Ok"
-#: gitk:1817 gitk:3856 gitk:8311 gitk:8385 gitk:8495 gitk:8544 gitk:8716
-#: gitk:10251 gitk:10423
+#: gitk:1853 gitk:4056 gitk:8634 gitk:8713 gitk:8828 gitk:8877 gitk:9046
+#: gitk:10586 gitk:10805
msgid "Cancel"
msgstr "Abbrechen"
-#: gitk:1917
+#: gitk:1975
msgid "Update"
msgstr "Aktualisieren"
-#: gitk:1918
+#: gitk:1976
msgid "Reload"
msgstr "Neu laden"
-#: gitk:1919
+#: gitk:1977
msgid "Reread references"
msgstr "Zweige neu laden"
-#: gitk:1920
+#: gitk:1978
msgid "List references"
msgstr "Zweige/Markierungen auflisten"
-#: gitk:1922
+#: gitk:1980
msgid "Start git gui"
msgstr "»git gui« starten"
-#: gitk:1924
+#: gitk:1982
msgid "Quit"
msgstr "Beenden"
-#: gitk:1916
+#: gitk:1974
msgid "File"
msgstr "Datei"
-#: gitk:1928
+#: gitk:1986
msgid "Preferences"
msgstr "Einstellungen"
-#: gitk:1927
+#: gitk:1985
msgid "Edit"
msgstr "Bearbeiten"
-#: gitk:1932
+#: gitk:1990
msgid "New view..."
msgstr "Neue Ansicht ..."
-#: gitk:1933
+#: gitk:1991
msgid "Edit view..."
msgstr "Ansicht bearbeiten ..."
-#: gitk:1934
+#: gitk:1992
msgid "Delete view"
msgstr "Ansicht entfernen"
-#: gitk:1936
+#: gitk:1994
msgid "All files"
msgstr "Alle Dateien"
-#: gitk:1931 gitk:3666
+#: gitk:1989 gitk:3808
msgid "View"
msgstr "Ansicht"
-#: gitk:1941 gitk:1951 gitk:2650
+#: gitk:1999 gitk:2009 gitk:2780
msgid "About gitk"
msgstr "Über gitk"
-#: gitk:1942 gitk:1956
+#: gitk:2000 gitk:2014
msgid "Key bindings"
msgstr "Tastenkürzel"
-#: gitk:1940 gitk:1955
+#: gitk:1998 gitk:2013
msgid "Help"
msgstr "Hilfe"
-#: gitk:2016
-msgid "SHA1 ID: "
-msgstr "SHA1:"
+#: gitk:2091 gitk:8110
+msgid "SHA1 ID:"
+msgstr "SHA1 ID:"
-#: gitk:2047
+#: gitk:2122
msgid "Row"
msgstr "Zeile"
-#: gitk:2078
+#: gitk:2160
msgid "Find"
msgstr "Suche"
-#: gitk:2079
+#: gitk:2161
msgid "next"
msgstr "nächste"
-#: gitk:2080
+#: gitk:2162
msgid "prev"
msgstr "vorige"
-#: gitk:2081
+#: gitk:2163
msgid "commit"
msgstr "Version nach"
-#: gitk:2084 gitk:2086 gitk:4222 gitk:4245 gitk:4269 gitk:6210 gitk:6282
-#: gitk:6366
+#: gitk:2166 gitk:2168 gitk:4422 gitk:4445 gitk:4469 gitk:6410 gitk:6482
+#: gitk:6566
msgid "containing:"
msgstr "Beschreibung:"
-#: gitk:2087 gitk:3158 gitk:3163 gitk:4297
+#: gitk:2169 gitk:3290 gitk:3295 gitk:4497
msgid "touching paths:"
msgstr "Dateien:"
-#: gitk:2088 gitk:4302
+#: gitk:2170 gitk:4502
msgid "adding/removing string:"
msgstr "Änderungen:"
-#: gitk:2097 gitk:2099
+#: gitk:2179 gitk:2181
msgid "Exact"
msgstr "Exakt"
-#: gitk:2099 gitk:4377 gitk:6178
+#: gitk:2181 gitk:4577 gitk:6378
msgid "IgnCase"
msgstr "Kein Groß/Klein"
-#: gitk:2099 gitk:4271 gitk:4375 gitk:6174
+#: gitk:2181 gitk:4471 gitk:4575 gitk:6374
msgid "Regexp"
msgstr "Regexp"
-#: gitk:2101 gitk:2102 gitk:4396 gitk:4426 gitk:4433 gitk:6302 gitk:6370
+#: gitk:2183 gitk:2184 gitk:4596 gitk:4626 gitk:4633 gitk:6502 gitk:6570
msgid "All fields"
msgstr "Alle Felder"
-#: gitk:2102 gitk:4394 gitk:4426 gitk:6241
+#: gitk:2184 gitk:4594 gitk:4626 gitk:6441
msgid "Headline"
msgstr "Überschrift"
-#: gitk:2103 gitk:4394 gitk:6241 gitk:6370 gitk:6804
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6570 gitk:7003
msgid "Comments"
msgstr "Beschreibung"
-#: gitk:2103 gitk:4394 gitk:4398 gitk:4433 gitk:6241 gitk:6739 gitk:7991
-#: gitk:8006
+#: gitk:2185 gitk:4594 gitk:4598 gitk:4633 gitk:6441 gitk:6938 gitk:8285
+#: gitk:8300
msgid "Author"
msgstr "Autor"
-#: gitk:2103 gitk:4394 gitk:6241 gitk:6741
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6940
msgid "Committer"
msgstr "Eintragender"
-#: gitk:2132
+#: gitk:2216
msgid "Search"
msgstr "Suchen"
-#: gitk:2139
+#: gitk:2224
msgid "Diff"
msgstr "Vergleich"
-#: gitk:2141
+#: gitk:2226
msgid "Old version"
msgstr "Alte Version"
-#: gitk:2143
+#: gitk:2228
msgid "New version"
msgstr "Neue Version"
-#: gitk:2145
+#: gitk:2230
msgid "Lines of context"
msgstr "Kontextzeilen"
-#: gitk:2155
+#: gitk:2240
msgid "Ignore space change"
msgstr "Leerzeichenänderungen ignorieren"
-#: gitk:2213
+#: gitk:2299
msgid "Patch"
msgstr "Patch"
-#: gitk:2215
+#: gitk:2301
msgid "Tree"
msgstr "Baum"
-#: gitk:2359 gitk:2376
+#: gitk:2456 gitk:2473
msgid "Diff this -> selected"
msgstr "Vergleich: diese -> gewählte"
-#: gitk:2360 gitk:2377
+#: gitk:2457 gitk:2474
msgid "Diff selected -> this"
msgstr "Vergleich: gewählte -> diese"
-#: gitk:2361 gitk:2378
+#: gitk:2458 gitk:2475
msgid "Make patch"
msgstr "Patch erstellen"
-#: gitk:2362 gitk:8369
+#: gitk:2459 gitk:8692
msgid "Create tag"
msgstr "Markierung erstellen"
-#: gitk:2363 gitk:8475
+#: gitk:2460 gitk:8808
msgid "Write commit to file"
msgstr "Version in Datei schreiben"
-#: gitk:2364 gitk:8532
+#: gitk:2461 gitk:8865
msgid "Create new branch"
msgstr "Neuen Zweig erstellen"
-#: gitk:2365
+#: gitk:2462
msgid "Cherry-pick this commit"
msgstr "Diese Version pflücken"
-#: gitk:2366
+#: gitk:2463
msgid "Reset HEAD branch to here"
msgstr "HEAD-Zweig auf diese Version zurücksetzen"
-#: gitk:2367
+#: gitk:2464
msgid "Mark this commit"
msgstr "Lesezeichen setzen"
-#: gitk:2368
+#: gitk:2465
msgid "Return to mark"
msgstr "Zum Lesezeichen"
-#: gitk:2369
+#: gitk:2466
msgid "Find descendant of this and mark"
msgstr "Abkömmling von Lesezeichen und dieser Version finden"
-#: gitk:2370
+#: gitk:2467
msgid "Compare with marked commit"
msgstr "Mit Lesezeichen vergleichen"
-#: gitk:2384
+#: gitk:2481
msgid "Check out this branch"
msgstr "Auf diesen Zweig umstellen"
-#: gitk:2385
+#: gitk:2482
msgid "Remove this branch"
msgstr "Zweig löschen"
-#: gitk:2392
+#: gitk:2489
msgid "Highlight this too"
msgstr "Diesen auch hervorheben"
-#: gitk:2393
+#: gitk:2490
msgid "Highlight this only"
msgstr "Nur diesen hervorheben"
-#: gitk:2394
+#: gitk:2491
msgid "External diff"
msgstr "Externes Diff-Programm"
-#: gitk:2395
+#: gitk:2492
msgid "Blame parent commit"
msgstr "Annotieren der Elternversion"
-#: gitk:2402
+#: gitk:2499
msgid "Show origin of this line"
msgstr "Herkunft dieser Zeile anzeigen"
-#: gitk:2403
+#: gitk:2500
msgid "Run git gui blame on this line"
msgstr "Diese Zeile annotieren (»git gui blame«)"
-#: gitk:2652
+#: gitk:2782
msgid ""
"\n"
"Gitk - a commit viewer for git\n"
"\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright ©9 2005-2009 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-2008 Paul Mackerras\n"
+"Copyright © 2005-2009 Paul Mackerras\n"
"\n"
-"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public "
-"License"
+"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public License"
-#: gitk:2660 gitk:2722 gitk:8897
+#: gitk:2790 gitk:2854 gitk:9230
msgid "Close"
msgstr "Schließen"
-#: gitk:2679
+#: gitk:2811
msgid "Gitk key bindings"
msgstr "Gitk-Tastaturbelegung"
-#: gitk:2682
+#: gitk:2814
msgid "Gitk key bindings:"
msgstr "Gitk-Tastaturbelegung:"
-#: gitk:2684
+#: gitk:2816
#, tcl-format
msgid "<%s-Q>\t\tQuit"
msgstr "<%s-Q>\t\tBeenden"
-#: gitk:2685
+#: gitk:2817
msgid "<Home>\t\tMove to first commit"
msgstr "<Pos1>\t\tZur neuesten Version springen"
-#: gitk:2686
+#: gitk:2818
msgid "<End>\t\tMove to last commit"
msgstr "<Ende>\t\tZur ältesten Version springen"
-#: gitk:2687
+#: gitk:2819
msgid "<Up>, p, i\tMove up one commit"
msgstr "<Hoch>, p, i\tNächste neuere Version"
-#: gitk:2688
+#: gitk:2820
msgid "<Down>, n, k\tMove down one commit"
msgstr "<Runter>, n, k\tNächste ältere Version"
-#: gitk:2689
+#: gitk:2821
msgid "<Left>, z, j\tGo back in history list"
msgstr "<Links>, z, j\tEine Version zurückgehen"
-#: gitk:2690
+#: gitk:2822
msgid "<Right>, x, l\tGo forward in history list"
msgstr "<Rechts>, x, l\tEine Version weitergehen"
-#: gitk:2691
+#: gitk:2823
msgid "<PageUp>\tMove up one page in commit list"
msgstr "<BildHoch>\tEine Seite nach oben blättern"
-#: gitk:2692
+#: gitk:2824
msgid "<PageDown>\tMove down one page in commit list"
msgstr "<BildRunter>\tEine Seite nach unten blättern"
-#: gitk:2693
+#: gitk:2825
#, tcl-format
msgid "<%s-Home>\tScroll to top of commit list"
msgstr "<%s-Pos1>\tZum oberen Ende der Versionsliste blättern"
-#: gitk:2694
+#: gitk:2826
#, tcl-format
msgid "<%s-End>\tScroll to bottom of commit list"
msgstr "<%s-Ende>\tZum unteren Ende der Versionsliste blättern"
-#: gitk:2695
+#: gitk:2827
#, tcl-format
msgid "<%s-Up>\tScroll commit list up one line"
msgstr "<%s-Hoch>\tVersionsliste eine Zeile nach oben blättern"
-#: gitk:2696
+#: gitk:2828
#, tcl-format
msgid "<%s-Down>\tScroll commit list down one line"
msgstr "<%s-Runter>\tVersionsliste eine Zeile nach unten blättern"
-#: gitk:2697
+#: gitk:2829
#, tcl-format
msgid "<%s-PageUp>\tScroll commit list up one page"
msgstr "<%s-BildHoch>\tVersionsliste eine Seite nach oben blättern"
-#: gitk:2698
+#: gitk:2830
#, tcl-format
msgid "<%s-PageDown>\tScroll commit list down one page"
msgstr "<%s-BildRunter>\tVersionsliste eine Seite nach unten blättern"
-#: gitk:2699
+#: gitk:2831
msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
msgstr "<Umschalt-Hoch>\tRückwärts suchen (nach oben; neuere Versionen)"
-#: gitk:2700
+#: gitk:2832
msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
msgstr "<Umschalt-Runter> Suchen (nach unten; ältere Versionen)"
-#: gitk:2701
+#: gitk:2833
msgid "<Delete>, b\tScroll diff view up one page"
msgstr "<Entf>, b\t\tVergleich eine Seite nach oben blättern"
-#: gitk:2702
+#: gitk:2834
msgid "<Backspace>\tScroll diff view up one page"
msgstr "<Löschtaste>\tVergleich eine Seite nach oben blättern"
-#: gitk:2703
+#: gitk:2835
msgid "<Space>\t\tScroll diff view down one page"
msgstr "<Leertaste>\tVergleich eine Seite nach unten blättern"
-#: gitk:2704
+#: gitk:2836
msgid "u\t\tScroll diff view up 18 lines"
msgstr "u\t\tVergleich um 18 Zeilen nach oben blättern"
-#: gitk:2705
+#: gitk:2837
msgid "d\t\tScroll diff view down 18 lines"
msgstr "d\t\tVergleich um 18 Zeilen nach unten blättern"
-#: gitk:2706
+#: gitk:2838
#, tcl-format
msgid "<%s-F>\t\tFind"
msgstr "<%s-F>\t\tSuchen"
-#: gitk:2707
+#: gitk:2839
#, tcl-format
msgid "<%s-G>\t\tMove to next find hit"
msgstr "<%s-G>\t\tWeitersuchen"
-#: gitk:2708
+#: gitk:2840
msgid "<Return>\tMove to next find hit"
msgstr "<Eingabetaste>\tWeitersuchen"
-#: gitk:2709
+#: gitk:2841
msgid "/\t\tFocus the search box"
msgstr "/\t\tTastaturfokus ins Suchfeld"
-#: gitk:2710
+#: gitk:2842
msgid "?\t\tMove to previous find hit"
msgstr "?\t\tRückwärts weitersuchen"
-#: gitk:2711
+#: gitk:2843
msgid "f\t\tScroll diff view to next file"
msgstr "f\t\tVergleich zur nächsten Datei blättern"
-#: gitk:2712
+#: gitk:2844
#, tcl-format
msgid "<%s-S>\t\tSearch for next hit in diff view"
msgstr "<%s-S>\t\tWeitersuchen im Vergleich"
-#: gitk:2713
+#: gitk:2845
#, tcl-format
msgid "<%s-R>\t\tSearch for previous hit in diff view"
msgstr "<%s-R>\t\tRückwärts weitersuchen im Vergleich"
-#: gitk:2714
+#: gitk:2846
#, tcl-format
msgid "<%s-KP+>\tIncrease font size"
msgstr "<%s-Nummerblock-Plus>\tSchrift vergrößern"
-#: gitk:2715
+#: gitk:2847
#, tcl-format
msgid "<%s-plus>\tIncrease font size"
msgstr "<%s-Plus>\tSchrift vergrößern"
-#: gitk:2716
+#: gitk:2848
#, tcl-format
msgid "<%s-KP->\tDecrease font size"
msgstr "<%s-Nummernblock-Minus> Schrift verkleinern"
-#: gitk:2717
+#: gitk:2849
#, tcl-format
msgid "<%s-minus>\tDecrease font size"
msgstr "<%s-Minus>\tSchrift verkleinern"
-#: gitk:2718
+#: gitk:2850
msgid "<F5>\t\tUpdate"
msgstr "<F5>\t\tAktualisieren"
-#: gitk:3173
-#, tcl-format
-msgid "Error getting \"%s\" from %s:"
-msgstr "Fehler beim Holen von »%s« von »%s«:"
-
-#: gitk:3230 gitk:3239
+#: gitk:3305 gitk:3314
#, tcl-format
msgid "Error creating temporary directory %s:"
msgstr "Fehler beim Erzeugen des temporären Verzeichnisses »%s«:"
-#: gitk:3251
+#: gitk:3327
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Fehler beim Holen von »%s« von »%s«:"
+
+#: gitk:3390
msgid "command failed:"
msgstr "Kommando fehlgeschlagen:"
-#: gitk:3397
+#: gitk:3539
msgid "No such commit"
msgstr "Version nicht gefunden"
-#: gitk:3411
+#: gitk:3553
msgid "git gui blame: command failed:"
msgstr "git gui blame: Kommando fehlgeschlagen:"
-#: gitk:3442
+#: gitk:3584
#, tcl-format
msgid "Couldn't read merge head: %s"
msgstr "Zusammenführungs-Spitze konnte nicht gelesen werden: %s"
-#: gitk:3450
+#: gitk:3592
#, tcl-format
msgid "Error reading index: %s"
msgstr "Fehler beim Lesen der Bereitstellung (»index«): %s"
-#: gitk:3475
+#: gitk:3617
#, tcl-format
msgid "Couldn't start git blame: %s"
msgstr "»git blame« konnte nicht gestartet werden: %s"
-#: gitk:3478 gitk:6209
+#: gitk:3620 gitk:6409
msgid "Searching"
msgstr "Suchen"
-#: gitk:3510
+#: gitk:3652
#, tcl-format
msgid "Error running git blame: %s"
msgstr "Fehler beim Ausführen von »git blame«: %s"
-#: gitk:3538
+#: gitk:3680
#, tcl-format
msgid "That line comes from commit %s, which is not in this view"
msgstr ""
"Diese Zeile stammt aus Version %s, die nicht in dieser Ansicht gezeigt wird"
-#: gitk:3552
+#: gitk:3694
msgid "External diff viewer failed:"
msgstr "Externes Diff-Programm fehlgeschlagen:"
-#: gitk:3670
+#: gitk:3812
msgid "Gitk view definition"
msgstr "Gitk-Ansichten"
-#: gitk:3674
+#: gitk:3816
msgid "Remember this view"
msgstr "Diese Ansicht speichern"
-#: gitk:3675
-msgid "Commits to include (arguments to git log):"
-msgstr "Versionen anzeigen (Argumente von git log):"
+#: gitk:3817
+msgid "References (space separated list):"
+msgstr "Zweige/Markierungen (durch Leerzeichen getrennte Liste):"
-#: gitk:3676
-msgid "Use all refs"
-msgstr "Alle Zweige verwenden"
+#: gitk:3818
+msgid "Branches & tags:"
+msgstr "Zweige/Markierungen:"
-#: gitk:3677
-msgid "Strictly sort by date"
-msgstr "Streng nach Datum sortieren"
+#: gitk:3819
+msgid "All refs"
+msgstr "Alle Markierungen und Zweige"
-#: gitk:3678
-msgid "Mark branch sides"
-msgstr "Zweig-Seiten markieren"
+#: gitk:3820
+msgid "All (local) branches"
+msgstr "Alle (lokalen) Zweige"
-#: gitk:3679
-msgid "Since date:"
-msgstr "Von Datum:"
+#: gitk:3821
+msgid "All tags"
+msgstr "Alle Markierungen"
-#: gitk:3680
-msgid "Until date:"
-msgstr "Bis Datum:"
+#: gitk:3822
+msgid "All remote-tracking branches"
+msgstr "Alle Übernahmezweige"
+
+#: gitk:3823
+msgid "Commit Info (regular expressions):"
+msgstr "Versionsinformationen (reguläre Ausdrücke):"
+
+#: gitk:3824
+msgid "Author:"
+msgstr "Autor:"
+
+#: gitk:3825
+msgid "Committer:"
+msgstr "Eintragender:"
+
+#: gitk:3826
+msgid "Commit Message:"
+msgstr "Versionsbeschreibung:"
-#: gitk:3681
-msgid "Max count:"
-msgstr "Max. Anzahl:"
+#: gitk:3827
+msgid "Matches all Commit Info criteria"
+msgstr "Alle Versionsinformationen-Kriterien erfüllen"
-#: gitk:3682
-msgid "Skip:"
+#: gitk:3828
+msgid "Changes to Files:"
+msgstr "Dateien:"
+
+#: gitk:3829
+msgid "Fixed String"
+msgstr "Zeichenkette"
+
+#: gitk:3830
+msgid "Regular Expression"
+msgstr "Regulärer Ausdruck"
+
+#: gitk:3831
+msgid "Search string:"
+msgstr "Suchausdruck:"
+
+#: gitk:3832
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr "Datum (»2 weeks ago«, »2009-03-17 15:27:38«, »March 17, 2009 15:27:38«)"
+
+#: gitk:3833
+msgid "Since:"
+msgstr "Von:"
+
+#: gitk:3834
+msgid "Until:"
+msgstr "Bis:"
+
+#: gitk:3835
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr "Versionsanzahl begrenzen oder einige überspringen (ganzzahliger Wert):"
+
+#: gitk:3836
+msgid "Number to show:"
+msgstr "Anzeigen:"
+
+#: gitk:3837
+msgid "Number to skip:"
msgstr "Überspringen:"
-#: gitk:3683
+#: gitk:3838
+msgid "Miscellaneous options:"
+msgstr "Sonstiges:"
+
+#: gitk:3839
+msgid "Strictly sort by date"
+msgstr "Streng nach Datum sortieren"
+
+#: gitk:3840
+msgid "Mark branch sides"
+msgstr "Zweig-Seiten markieren"
+
+#: gitk:3841
msgid "Limit to first parent"
msgstr "Auf erste Elternversion beschränken"
-#: gitk:3684
+#: gitk:3842
+msgid "Simple history"
+msgstr "Einfache Historie"
+
+#: gitk:3843
+msgid "Additional arguments to git log:"
+msgstr "Zusätzliche Argumente für »git log«:"
+
+#: gitk:3844
+msgid "Enter files and directories to include, one per line:"
+msgstr "Folgende Dateien und Verzeichnisse anzeigen (eine pro Zeile):"
+
+#: gitk:3845
msgid "Command to generate more commits to include:"
msgstr "Versionsliste durch folgendes Kommando erzeugen lassen:"
-#: gitk:3780
+#: gitk:3967
msgid "Gitk: edit view"
msgstr "Gitk: Ansicht bearbeiten"
-#: gitk:3793
-msgid "Name"
-msgstr "Name"
+#: gitk:3975
+msgid "-- criteria for selecting revisions"
+msgstr "-- Auswahl der angezeigten Versionen"
-#: gitk:3841
-msgid "Enter files and directories to include, one per line:"
-msgstr "Folgende Dateien und Verzeichnisse anzeigen (eine pro Zeile):"
+#: gitk:3980
+msgid "View Name"
+msgstr "Ansichtsname"
-#: gitk:3855
+#: gitk:4055
msgid "Apply (F5)"
msgstr "Anwenden (F5)"
-#: gitk:3893
+#: gitk:4093
msgid "Error in commit selection arguments:"
msgstr "Fehler in den ausgewählten Versionen:"
-#: gitk:3946 gitk:3998 gitk:4446 gitk:4460 gitk:5721 gitk:11114 gitk:11115
+#: gitk:4146 gitk:4198 gitk:4646 gitk:4660 gitk:5921 gitk:11534 gitk:11535
msgid "None"
msgstr "Keine"
-#: gitk:4394 gitk:6241 gitk:7993 gitk:8008
+#: gitk:4594 gitk:6441 gitk:8287 gitk:8302
msgid "Date"
msgstr "Datum"
-#: gitk:4394 gitk:6241
+#: gitk:4594 gitk:6441
msgid "CDate"
msgstr "Eintragedatum"
-#: gitk:4543 gitk:4548
+#: gitk:4743 gitk:4748
msgid "Descendant"
msgstr "Abkömmling"
-#: gitk:4544
+#: gitk:4744
msgid "Not descendant"
msgstr "Kein Abkömmling"
-#: gitk:4551 gitk:4556
+#: gitk:4751 gitk:4756
msgid "Ancestor"
msgstr "Vorgänger"
-#: gitk:4552
+#: gitk:4752
msgid "Not ancestor"
msgstr "Kein Vorgänger"
-#: gitk:4842
+#: gitk:5042
msgid "Local changes checked in to index but not committed"
msgstr "Lokale Änderungen bereitgestellt, aber nicht eingetragen"
-#: gitk:4878
+#: gitk:5078
msgid "Local uncommitted changes, not checked in to index"
msgstr "Lokale Änderungen, nicht bereitgestellt"
-#: gitk:6559
+#: gitk:6759
msgid "many"
msgstr "viele"
-#: gitk:6743
+#: gitk:6942
msgid "Tags:"
msgstr "Markierungen:"
-#: gitk:6760 gitk:6766 gitk:7986
+#: gitk:6959 gitk:6965 gitk:8280
msgid "Parent"
msgstr "Eltern"
-#: gitk:6771
+#: gitk:6970
msgid "Child"
msgstr "Kind"
-#: gitk:6780
+#: gitk:6979
msgid "Branch"
msgstr "Zweig"
-#: gitk:6783
+#: gitk:6982
msgid "Follows"
msgstr "Folgt auf"
-#: gitk:6786
+#: gitk:6985
msgid "Precedes"
msgstr "Vorgänger von"
-#: gitk:7279
+#: gitk:7522
#, tcl-format
msgid "Error getting diffs: %s"
msgstr "Fehler beim Laden des Vergleichs: %s"
-#: gitk:7819
+#: gitk:8108
msgid "Goto:"
msgstr "Gehe zu:"
-#: gitk:7821
-msgid "SHA1 ID:"
-msgstr "SHA1-Hashwert:"
-
-#: gitk:7840
+#: gitk:8129
#, tcl-format
msgid "Short SHA1 id %s is ambiguous"
msgstr "Kurzer SHA1-Hashwert »%s« ist mehrdeutig"
-#: gitk:7852
+#: gitk:8136
+#, tcl-format
+msgid "Revision %s is not known"
+msgstr "Version »%s« ist unbekannt"
+
+#: gitk:8146
#, tcl-format
msgid "SHA1 id %s is not known"
msgstr "SHA1-Hashwert »%s« ist unbekannt"
-#: gitk:7854
+#: gitk:8148
#, tcl-format
-msgid "Tag/Head %s is not known"
-msgstr "Markierung/Zweig »%s« ist unbekannt"
+msgid "Revision %s is not in the current view"
+msgstr "Version »%s« wird in der aktuellen Ansicht nicht angezeigt"
-#: gitk:7996
+#: gitk:8290
msgid "Children"
msgstr "Kinder"
-#: gitk:8053
+#: gitk:8348
#, tcl-format
msgid "Reset %s branch to here"
msgstr "Zweig »%s« hierher zurücksetzen"
-#: gitk:8055
+#: gitk:8350
msgid "Detached head: can't reset"
msgstr "Zweigspitze ist abgetrennt: Zurücksetzen nicht möglich"
-#: gitk:8164 gitk:8170
+#: gitk:8459 gitk:8465
msgid "Skipping merge commit "
msgstr "Überspringe Zusammenführungs-Version "
-#: gitk:8179 gitk:8184
+#: gitk:8474 gitk:8479
msgid "Error getting patch ID for "
msgstr "Fehler beim Holen der Patch-ID für "
-#: gitk:8180 gitk:8185
+#: gitk:8475 gitk:8480
msgid " - stopping\n"
msgstr " - Abbruch.\n"
-#: gitk:8190 gitk:8193 gitk:8201 gitk:8211 gitk:8220
+#: gitk:8485 gitk:8488 gitk:8496 gitk:8510 gitk:8519
msgid "Commit "
msgstr "Version "
-#: gitk:8194
+#: gitk:8489
msgid ""
" is the same patch as\n"
" "
@@ -762,7 +844,7 @@ msgstr ""
" ist das gleiche Patch wie\n"
" "
-#: gitk:8202
+#: gitk:8497
msgid ""
" differs from\n"
" "
@@ -770,117 +852,138 @@ msgstr ""
" ist unterschiedlich von\n"
" "
-#: gitk:8204
-msgid "- stopping\n"
-msgstr "- Abbruch.\n"
+#: gitk:8499
+msgid ""
+"Diff of commits:\n"
+"\n"
+msgstr ""
+"Vergleich der Versionen:\n"
+"\n"
-#: gitk:8212 gitk:8221
+#: gitk:8511 gitk:8520
#, tcl-format
msgid " has %s children - stopping\n"
msgstr " hat %s Kinder. Abbruch\n"
-#: gitk:8252
+#: gitk:8539
+#, tcl-format
+msgid "Error writing commit to file: %s"
+msgstr "Fehler beim Schreiben der Version in Datei: %s"
+
+#: gitk:8545
+#, tcl-format
+msgid "Error diffing commits: %s"
+msgstr "Fehler beim Vergleichen der Versionen: %s"
+
+#: gitk:8575
msgid "Top"
msgstr "Oben"
-#: gitk:8253
+#: gitk:8576
msgid "From"
msgstr "Von"
-#: gitk:8258
+#: gitk:8581
msgid "To"
msgstr "bis"
-#: gitk:8282
+#: gitk:8605
msgid "Generate patch"
msgstr "Patch erstellen"
-#: gitk:8284
+#: gitk:8607
msgid "From:"
msgstr "Von:"
-#: gitk:8293
+#: gitk:8616
msgid "To:"
msgstr "bis:"
-#: gitk:8302
+#: gitk:8625
msgid "Reverse"
msgstr "Umgekehrt"
-#: gitk:8304 gitk:8489
+#: gitk:8627 gitk:8822
msgid "Output file:"
msgstr "Ausgabedatei:"
-#: gitk:8310
+#: gitk:8633
msgid "Generate"
msgstr "Erzeugen"
-#: gitk:8348
+#: gitk:8671
msgid "Error creating patch:"
msgstr "Fehler beim Erzeugen des Patches:"
-#: gitk:8371 gitk:8477 gitk:8534
+#: gitk:8694 gitk:8810 gitk:8867
msgid "ID:"
msgstr "ID:"
-#: gitk:8380
+#: gitk:8703
msgid "Tag name:"
msgstr "Markierungsname:"
-#: gitk:8384 gitk:8543
+#: gitk:8706
+msgid "Tag message is optional"
+msgstr "Eine Markierungsbeschreibung ist optional"
+
+#: gitk:8708
+msgid "Tag message:"
+msgstr "Markierungsbeschreibung:"
+
+#: gitk:8712 gitk:8876
msgid "Create"
msgstr "Erstellen"
-#: gitk:8401
+#: gitk:8730
msgid "No tag name specified"
msgstr "Kein Markierungsname angegeben"
-#: gitk:8405
+#: gitk:8734
#, tcl-format
msgid "Tag \"%s\" already exists"
msgstr "Markierung »%s« existiert bereits."
-#: gitk:8411
+#: gitk:8744
msgid "Error creating tag:"
msgstr "Fehler beim Erstellen der Markierung:"
-#: gitk:8486
+#: gitk:8819
msgid "Command:"
msgstr "Kommando:"
-#: gitk:8494
+#: gitk:8827
msgid "Write"
msgstr "Schreiben"
-#: gitk:8512
+#: gitk:8845
msgid "Error writing commit:"
msgstr "Fehler beim Schreiben der Version:"
-#: gitk:8539
+#: gitk:8872
msgid "Name:"
msgstr "Name:"
-#: gitk:8562
+#: gitk:8895
msgid "Please specify a name for the new branch"
msgstr "Bitte geben Sie einen Namen für den neuen Zweig an."
-#: gitk:8567
+#: gitk:8900
#, tcl-format
msgid "Branch '%s' already exists. Overwrite?"
msgstr "Zweig »%s« existiert bereits. Soll er überschrieben werden?"
-#: gitk:8633
+#: gitk:8966
#, 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?"
+"Version »%s« ist bereits im Zweig »%s« enthalten -- trotzdem erneut eintragen?"
-#: gitk:8638
+#: gitk:8971
msgid "Cherry-picking"
msgstr "Version pflücken"
-#: gitk:8647
+#: gitk:8980
#, tcl-format
msgid ""
"Cherry-pick failed because of local changes to file '%s'.\n"
@@ -890,7 +993,7 @@ msgstr ""
"vorliegen. Bitte diese Änderungen eintragen, zurücksetzen oder\n"
"zwischenspeichern (»git stash«) und dann erneut versuchen."
-#: gitk:8653
+#: gitk:8986
msgid ""
"Cherry-pick failed because of merge conflict.\n"
"Do you wish to run git citool to resolve it?"
@@ -899,34 +1002,34 @@ msgstr ""
"ist. Soll das Zusammenführungs-Werkzeug (»git citool«) aufgerufen\n"
"werden, um diesen Konflikt aufzulösen?"
-#: gitk:8669
+#: gitk:9002
msgid "No changes committed"
msgstr "Keine Änderungen eingetragen"
-#: gitk:8695
+#: gitk:9028
msgid "Confirm reset"
msgstr "Zurücksetzen bestätigen"
-#: gitk:8697
+#: gitk:9030
#, tcl-format
msgid "Reset branch %s to %s?"
msgstr "Zweig »%s« auf »%s« zurücksetzen?"
-#: gitk:8701
+#: gitk:9032
msgid "Reset type:"
msgstr "Art des Zurücksetzens:"
-#: gitk:8705
+#: gitk:9035
msgid "Soft: Leave working tree and index untouched"
msgstr "Harmlos: Arbeitskopie und Bereitstellung unverändert"
-#: gitk:8708
+#: gitk:9038
msgid "Mixed: Leave working tree untouched, reset index"
msgstr ""
"Gemischt: Arbeitskopie unverändert,\n"
"Bereitstellung zurückgesetzt"
-#: gitk:8711
+#: gitk:9041
msgid ""
"Hard: Reset working tree and index\n"
"(discard ALL local changes)"
@@ -934,21 +1037,21 @@ msgstr ""
"Hart: Arbeitskopie und Bereitstellung\n"
"(Alle lokalen Änderungen werden gelöscht)"
-#: gitk:8728
+#: gitk:9058
msgid "Resetting"
msgstr "Zurücksetzen"
-#: gitk:8785
+#: gitk:9118
msgid "Checking out"
msgstr "Umstellen"
-#: gitk:8838
+#: gitk:9171
msgid "Cannot delete the currently checked-out branch"
msgstr ""
"Der Zweig, auf den die Arbeitskopie momentan umgestellt ist, kann nicht "
"gelöscht werden."
-#: gitk:8844
+#: gitk:9177
#, tcl-format
msgid ""
"The commits on branch %s aren't on any other branch.\n"
@@ -957,16 +1060,16 @@ msgstr ""
"Die Versionen auf Zweig »%s« existieren auf keinem anderen Zweig.\n"
"Zweig »%s« trotzdem löschen?"
-#: gitk:8875
+#: gitk:9208
#, tcl-format
msgid "Tags and heads: %s"
msgstr "Markierungen und Zweige: %s"
-#: gitk:8890
+#: gitk:9223
msgid "Filter"
msgstr "Filtern"
-#: gitk:9185
+#: gitk:9518
msgid ""
"Error reading commit topology information; branch and preceding/following "
"tag information will be incomplete."
@@ -974,182 +1077,202 @@ msgstr ""
"Fehler beim Lesen der Strukturinformationen; Zweige und Informationen zu "
"Vorgänger/Nachfolger werden unvollständig sein."
-#: gitk:10171
+#: gitk:10504
msgid "Tag"
msgstr "Markierung"
-#: gitk:10171
+#: gitk:10504
msgid "Id"
msgstr "Id"
-#: gitk:10219
+#: gitk:10554
msgid "Gitk font chooser"
msgstr "Gitk-Schriften wählen"
-#: gitk:10236
+#: gitk:10571
msgid "B"
msgstr "F"
-#: gitk:10239
+#: gitk:10574
msgid "I"
msgstr "K"
-#: gitk:10334
+#: gitk:10692
msgid "Gitk preferences"
msgstr "Gitk-Einstellungen"
-#: gitk:10336
+#: gitk:10694
msgid "Commit list display options"
msgstr "Anzeige der Versionsliste"
-#: gitk:10339
+#: gitk:10697
msgid "Maximum graph width (lines)"
msgstr "Maximale Graphenbreite (Zeilen)"
-#: gitk:10343
+#: gitk:10700
#, tcl-format
msgid "Maximum graph width (% of pane)"
msgstr "Maximale Graphenbreite (% des Fensters)"
-#: gitk:10347
+#: gitk:10703
msgid "Show local changes"
msgstr "Lokale Änderungen anzeigen"
-#: gitk:10350
+#: gitk:10706
msgid "Auto-select SHA1"
msgstr "SHA1-Hashwert automatisch auswählen"
-#: gitk:10354
+#: gitk:10709
+msgid "Hide remote refs"
+msgstr "Entfernte Zweige/Markierungen ausblenden"
+
+#: gitk:10713
msgid "Diff display options"
msgstr "Anzeige des Vergleichs"
-#: gitk:10356
+#: gitk:10715
msgid "Tab spacing"
msgstr "Tabulatorbreite"
-#: gitk:10359
+#: gitk:10718
msgid "Display nearby tags"
msgstr "Naheliegende Markierungen anzeigen"
-#: gitk:10362
+#: gitk:10721
msgid "Limit diffs to listed paths"
msgstr "Vergleich nur für angezeigte Pfade"
-#: gitk:10365
+#: gitk:10724
msgid "Support per-file encodings"
msgstr "Zeichenkodierung pro Datei ermitteln"
-#: gitk:10371 gitk:10436
+#: gitk:10730 gitk:10819
msgid "External diff tool"
msgstr "Externes Diff-Programm"
-#: gitk:10373
+#: gitk:10731
msgid "Choose..."
msgstr "Wählen ..."
-#: gitk:10378
+#: gitk:10736
+msgid "General options"
+msgstr "Allgemeine Optionen"
+
+#: gitk:10739
+msgid "Use themed widgets"
+msgstr "Aussehen der Benutzeroberfläche durch Thema bestimmen"
+
+#: gitk:10741
+msgid "(change requires restart)"
+msgstr "(Änderungen werden erst nach Neustart wirksam)"
+
+#: gitk:10743
+msgid "(currently unavailable)"
+msgstr "(Momentan nicht verfügbar)"
+
+#: gitk:10747
msgid "Colors: press to choose"
msgstr "Farben: Klicken zum Wählen"
-#: gitk:10381
+#: gitk:10750
+msgid "Interface"
+msgstr "Benutzeroberfläche"
+
+#: gitk:10751
+msgid "interface"
+msgstr "Benutzeroberfläche"
+
+#: gitk:10754
msgid "Background"
msgstr "Hintergrund"
-#: gitk:10382 gitk:10412
+#: gitk:10755 gitk:10785
msgid "background"
msgstr "Hintergrund"
-#: gitk:10385
+#: gitk:10758
msgid "Foreground"
msgstr "Vordergrund"
-#: gitk:10386
+#: gitk:10759
msgid "foreground"
msgstr "Vordergrund"
-#: gitk:10389
+#: gitk:10762
msgid "Diff: old lines"
msgstr "Vergleich: Alte Zeilen"
-#: gitk:10390
+#: gitk:10763
msgid "diff old lines"
msgstr "Vergleich - Alte Zeilen"
-#: gitk:10394
+#: gitk:10767
msgid "Diff: new lines"
msgstr "Vergleich: Neue Zeilen"
-#: gitk:10395
+#: gitk:10768
msgid "diff new lines"
msgstr "Vergleich - Neue Zeilen"
-#: gitk:10399
+#: gitk:10772
msgid "Diff: hunk header"
msgstr "Vergleich: Änderungstitel"
-#: gitk:10401
+#: gitk:10774
msgid "diff hunk header"
msgstr "Vergleich - Änderungstitel"
-#: gitk:10405
+#: gitk:10778
msgid "Marked line bg"
msgstr "Hintergrund für markierte Zeile"
-#: gitk:10407
+#: gitk:10780
msgid "marked line background"
msgstr "Hintergrund für markierte Zeile"
-#: gitk:10411
+#: gitk:10784
msgid "Select bg"
msgstr "Hintergrundfarbe auswählen"
-#: gitk:10415
+#: gitk:10788
msgid "Fonts: press to choose"
msgstr "Schriftart: Klicken zum Wählen"
-#: gitk:10417
+#: gitk:10790
msgid "Main font"
msgstr "Programmschriftart"
-#: gitk:10418
+#: gitk:10791
msgid "Diff display font"
msgstr "Schriftart für Vergleich"
-#: gitk:10419
+#: gitk:10792
msgid "User interface font"
msgstr "Beschriftungen"
-#: gitk:10446
+#: gitk:10829
#, tcl-format
msgid "Gitk: choose color for %s"
msgstr "Gitk: Farbe wählen für %s"
-#: gitk:10893
-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:11020
+#: gitk:11433
msgid "Cannot find a git repository here."
msgstr "Kein Git-Projektarchiv gefunden."
-#: gitk:11024
+#: gitk:11437
#, tcl-format
msgid "Cannot find the git directory \"%s\"."
msgstr "Git-Verzeichnis »%s« wurde nicht gefunden."
-#: gitk:11071
+#: gitk:11484
#, tcl-format
msgid "Ambiguous argument '%s': both revision and filename"
msgstr "Mehrdeutige Angabe »%s«: Sowohl Version als auch Dateiname existiert."
-#: gitk:11083
+#: gitk:11496
msgid "Bad arguments to gitk:"
msgstr "Falsche Kommandozeilen-Parameter für gitk:"
-#: gitk:11167
+#: gitk:11587
msgid "Command line"
msgstr "Kommandozeile"
diff --git a/gitk-git/po/fr.po b/gitk-git/po/fr.po
new file mode 100644
index 0000000000..cb0e1edc63
--- /dev/null
+++ b/gitk-git/po/fr.po
@@ -0,0 +1,1254 @@
+# French translation of the gitk package
+# Copyright (C) 2005-2008 Paul Mackerras. All rights reserved.
+# This file is distributed under the same license as the gitk package.
+# Translators:
+# Emmanuel Trillaud <etrillaud@gmail.com>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gitk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-05 15:16+0200\n"
+"PO-Revision-Date: 2009-11-19 22:13+0100\n"
+"Last-Translator: Emmanuel Trillaud <etrillaud@gmail.com>\n"
+"Language-Team: git@vger.kernel.org\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: FRANCE\n"
+
+#: gitk:113
+msgid "Couldn't get list of unmerged files:"
+msgstr "Impossible de récupérer la liste des fichiers non fusionnés :"
+
+#: gitk:269
+msgid "Error parsing revisions:"
+msgstr "Erreur lors du parcours des révisions :"
+
+#: gitk:324
+msgid "Error executing --argscmd command:"
+msgstr "Erreur à l'exécution de la commande --argscmd :"
+
+#: gitk:337
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr ""
+"Aucun fichier sélectionné : --merge précisé, mais tous les fichiers sont "
+"fusionnés."
+
+# FIXME : améliorer la traduction de 'file limite'
+#: gitk:340
+#, fuzzy
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr ""
+"Aucun fichier sélectionné : --merge précisé mais aucun fichier non fusionné "
+"n'est dans la limite des fichiers."
+
+#: gitk:362 gitk:509
+msgid "Error executing git log:"
+msgstr "Erreur à l'exécution de git log :"
+
+#: gitk:380 gitk:525
+msgid "Reading"
+msgstr "Lecture en cours"
+
+#: gitk:440 gitk:4123
+msgid "Reading commits..."
+msgstr "Lecture des commits..."
+
+#: gitk:443 gitk:1561 gitk:4126
+msgid "No commits selected"
+msgstr "Aucun commit sélectionné"
+
+#: gitk:1437
+msgid "Can't parse git log output:"
+msgstr "Impossible de lire la sortie de git log :"
+
+#: gitk:1657
+msgid "No commit information available"
+msgstr "Aucune information disponible sur le commit"
+
+#: gitk:1793 gitk:1817 gitk:3916 gitk:8786 gitk:10322 gitk:10498
+msgid "OK"
+msgstr "OK"
+
+#: gitk:1819 gitk:3918 gitk:8383 gitk:8457 gitk:8567 gitk:8616 gitk:8788
+#: gitk:10323 gitk:10499
+msgid "Cancel"
+msgstr "Annuler"
+
+#: gitk:1919
+msgid "Update"
+msgstr "Mise à jour"
+
+#: gitk:1920
+msgid "Reload"
+msgstr "Recharger"
+
+#: gitk:1921
+msgid "Reread references"
+msgstr "Relire les références"
+
+#: gitk:1922
+msgid "List references"
+msgstr "Lister les références"
+
+#: gitk:1924
+msgid "Start git gui"
+msgstr "Démarrer git gui"
+
+#: gitk:1926
+msgid "Quit"
+msgstr "Quitter"
+
+#: gitk:1918
+msgid "File"
+msgstr "Fichier"
+
+#: gitk:1930
+msgid "Preferences"
+msgstr "Préférences"
+
+#: gitk:1929
+msgid "Edit"
+msgstr "Éditer"
+
+#: gitk:1934
+msgid "New view..."
+msgstr "Nouvelle vue..."
+
+#: gitk:1935
+msgid "Edit view..."
+msgstr "Éditer la vue..."
+
+#: gitk:1936
+msgid "Delete view"
+msgstr "Supprimer la vue"
+
+#: gitk:1938
+msgid "All files"
+msgstr "Tous les fichiers"
+
+#: gitk:1933 gitk:3670
+msgid "View"
+msgstr "Vue"
+
+#: gitk:1943 gitk:1953 gitk:2654
+msgid "About gitk"
+msgstr "À propos de gitk"
+
+#: gitk:1944 gitk:1958
+msgid "Key bindings"
+msgstr "Raccourcis clavier"
+
+#: gitk:1942 gitk:1957
+msgid "Help"
+msgstr "Aide"
+
+#: gitk:2018
+msgid "SHA1 ID: "
+msgstr "ID SHA1 :"
+
+#: gitk:2049
+msgid "Row"
+msgstr "Colonne"
+
+#: gitk:2080
+msgid "Find"
+msgstr "Recherche"
+
+#: gitk:2081
+msgid "next"
+msgstr "suivant"
+
+#: gitk:2082
+msgid "prev"
+msgstr "précédent"
+
+#: gitk:2083
+msgid "commit"
+msgstr "commit"
+
+#: gitk:2086 gitk:2088 gitk:4284 gitk:4307 gitk:4331 gitk:6272 gitk:6344
+#: gitk:6428
+msgid "containing:"
+msgstr "contient :"
+
+#: gitk:2089 gitk:3162 gitk:3167 gitk:4359
+msgid "touching paths:"
+msgstr "chemins modifiés :"
+
+#: gitk:2090 gitk:4364
+msgid "adding/removing string:"
+msgstr "ajoute/supprime la chaîne :"
+
+#: gitk:2099 gitk:2101
+msgid "Exact"
+msgstr "Exact"
+
+#: gitk:2101 gitk:4439 gitk:6240
+msgid "IgnCase"
+msgstr "Ignorer la casse"
+
+#: gitk:2101 gitk:4333 gitk:4437 gitk:6236
+msgid "Regexp"
+msgstr "Expression régulière"
+
+#: gitk:2103 gitk:2104 gitk:4458 gitk:4488 gitk:4495 gitk:6364 gitk:6432
+msgid "All fields"
+msgstr "Tous les champs"
+
+#: gitk:2104 gitk:4456 gitk:4488 gitk:6303
+msgid "Headline"
+msgstr "Surligner"
+
+#: gitk:2105 gitk:4456 gitk:6303 gitk:6432 gitk:6866
+msgid "Comments"
+msgstr "Commentaires"
+
+#: gitk:2105 gitk:4456 gitk:4460 gitk:4495 gitk:6303 gitk:6801 gitk:8063
+#: gitk:8078
+msgid "Author"
+msgstr "Auteur"
+
+#: gitk:2105 gitk:4456 gitk:6303 gitk:6803
+msgid "Committer"
+msgstr "Auteur du commit"
+
+#: gitk:2134
+msgid "Search"
+msgstr "Rechercher"
+
+#: gitk:2141
+msgid "Diff"
+msgstr "Diff"
+
+#: gitk:2143
+msgid "Old version"
+msgstr "Ancienne version"
+
+#: gitk:2145
+msgid "New version"
+msgstr "Nouvelle version"
+
+#: gitk:2147
+msgid "Lines of context"
+msgstr "Lignes de contexte"
+
+#: gitk:2157
+msgid "Ignore space change"
+msgstr "Ignorer les modifications d'espace"
+
+#: gitk:2215
+msgid "Patch"
+msgstr "Patch"
+
+#: gitk:2217
+msgid "Tree"
+msgstr "Arbre"
+
+#: gitk:2361 gitk:2378
+msgid "Diff this -> selected"
+msgstr "Diff entre ceci et la sélection"
+
+#: gitk:2362 gitk:2379
+msgid "Diff selected -> this"
+msgstr "Diff entre sélection et ceci"
+
+#: gitk:2363 gitk:2380
+msgid "Make patch"
+msgstr "Créer patch"
+
+#: gitk:2364 gitk:8441
+msgid "Create tag"
+msgstr "Créer tag"
+
+#: gitk:2365 gitk:8547
+msgid "Write commit to file"
+msgstr "Écrire le commit dans un fichier"
+
+#: gitk:2366 gitk:8604
+msgid "Create new branch"
+msgstr "Créer une nouvelle branche"
+
+#: gitk:2367
+msgid "Cherry-pick this commit"
+msgstr "Cueillir (cherry-pick) ce commit"
+
+#: gitk:2368
+msgid "Reset HEAD branch to here"
+msgstr "Réinitialiser la branche HEAD vers cet état"
+
+#: gitk:2369
+msgid "Mark this commit"
+msgstr "Marquer ce commit"
+
+#: gitk:2370
+msgid "Return to mark"
+msgstr "Retourner à la marque"
+
+#: gitk:2371
+msgid "Find descendant of this and mark"
+msgstr "Chercher le descendant de ceci et le marquer"
+
+#: gitk:2372
+msgid "Compare with marked commit"
+msgstr "Comparer avec le commit marqué"
+
+#: gitk:2386
+msgid "Check out this branch"
+msgstr "Récupérer cette branche"
+
+#: gitk:2387
+msgid "Remove this branch"
+msgstr "Supprimer cette branche"
+
+#: gitk:2394
+msgid "Highlight this too"
+msgstr "Surligner également ceci"
+
+#: gitk:2395
+msgid "Highlight this only"
+msgstr "Surligner seulement ceci"
+
+#: gitk:2396
+msgid "External diff"
+msgstr "Diff externe"
+
+#: gitk:2397
+msgid "Blame parent commit"
+msgstr "Blâmer le commit parent"
+
+#: gitk:2404
+msgid "Show origin of this line"
+msgstr "Montrer l'origine de cette ligne"
+
+#: gitk:2405
+msgid "Run git gui blame on this line"
+msgstr "Exécuter git gui blame sur cette ligne"
+
+#: gitk:2656
+msgid ""
+"\n"
+"Gitk - a commit viewer for git\n"
+"\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
+"\n"
+"Use and redistribute under the terms of the GNU General Public License"
+msgstr ""
+"\n"
+"Gitk - visualisateur de commit pour git\n"
+"\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
+"\n"
+"Utilisation et redistribution soumises aux termes de la GNU General Public "
+"License"
+
+#: gitk:2664 gitk:2726 gitk:8969
+msgid "Close"
+msgstr "Fermer"
+
+#: gitk:2683
+msgid "Gitk key bindings"
+msgstr "Raccourcis clavier de Gitk"
+
+#: gitk:2686
+msgid "Gitk key bindings:"
+msgstr "Raccourcis clavier de Gitk :"
+
+#: gitk:2688
+#, tcl-format
+msgid "<%s-Q>\t\tQuit"
+msgstr "<%s-Q>\t\tQuitter"
+
+#: gitk:2689
+msgid "<Home>\t\tMove to first commit"
+msgstr "<Début>\t\tAller au premier commit"
+
+#: gitk:2690
+msgid "<End>\t\tMove to last commit"
+msgstr "<Fin>\t\tAller au dernier commit"
+
+#: gitk:2691
+msgid "<Up>, p, i\tMove up one commit"
+msgstr "<Haut>, p, i\t Aller au commit suivant"
+
+#: gitk:2692
+msgid "<Down>, n, k\tMove down one commit"
+msgstr "<Bas>, n, k\t Aller au commit précédent"
+
+#: gitk:2693
+msgid "<Left>, z, j\tGo back in history list"
+msgstr "<Gauche>, z, j\tReculer dans l'historique"
+
+#: gitk:2694
+msgid "<Right>, x, l\tGo forward in history list"
+msgstr "<Droite>, x, l\tAvancer dans l'historique"
+
+#: gitk:2695
+msgid "<PageUp>\tMove up one page in commit list"
+msgstr "<PageUp>\tMonter d'une page dans la liste des commits"
+
+#: gitk:2696
+msgid "<PageDown>\tMove down one page in commit list"
+msgstr "<PageDown>\tDescendre d'une page dans la liste des commits"
+
+#: gitk:2697
+#, tcl-format
+msgid "<%s-Home>\tScroll to top of commit list"
+msgstr "<%s-Début>\tAller en haut de la liste des commits"
+
+#: gitk:2698
+#, tcl-format
+msgid "<%s-End>\tScroll to bottom of commit list"
+msgstr "<%s-End>\tAller en bas de la liste des commits"
+
+#: gitk:2699
+#, tcl-format
+msgid "<%s-Up>\tScroll commit list up one line"
+msgstr "<%s-Up>\tMonter d'une ligne dans la liste des commits"
+
+#: gitk:2700
+#, tcl-format
+msgid "<%s-Down>\tScroll commit list down one line"
+msgstr "<%s-Down>\tDescendre d'une ligne dans la liste des commits"
+
+#: gitk:2701
+#, tcl-format
+msgid "<%s-PageUp>\tScroll commit list up one page"
+msgstr "<%s-PageUp>\tMonter d'une page dans la liste des commits"
+
+#: gitk:2702
+#, tcl-format
+msgid "<%s-PageDown>\tScroll commit list down one page"
+msgstr "<%s-PageDown>\tDescendre d'une page dans la liste des commits"
+
+#: gitk:2703
+msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
+msgstr ""
+"<Shift-Up>\tRecherche en arrière (vers l'avant, commits les plus anciens)"
+
+#: gitk:2704
+msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
+msgstr ""
+"<Shift-Down>\tRecherche en avant (vers l'arrière, commit les plus récents)"
+
+#: gitk:2705
+msgid "<Delete>, b\tScroll diff view up one page"
+msgstr "<Supprimer>, b\tMonter d'une page dans la vue des diff"
+
+#: gitk:2706
+msgid "<Backspace>\tScroll diff view up one page"
+msgstr "<Backspace>\tMonter d'une page dans la vue des diff"
+
+#: gitk:2707
+msgid "<Space>\t\tScroll diff view down one page"
+msgstr "<Espace>\t\tDescendre d'une page dans la vue des diff"
+
+#: gitk:2708
+msgid "u\t\tScroll diff view up 18 lines"
+msgstr "u\t\tMonter de 18 lignes dans la vue des diff"
+
+#: gitk:2709
+msgid "d\t\tScroll diff view down 18 lines"
+msgstr "d\t\tDescendre de 18 lignes dans la vue des diff"
+
+#: gitk:2710
+#, tcl-format
+msgid "<%s-F>\t\tFind"
+msgstr "<%s-F>\t\tRechercher"
+
+#: gitk:2711
+#, tcl-format
+msgid "<%s-G>\t\tMove to next find hit"
+msgstr "<%s-G>\t\tAller au résultat de recherche suivant"
+
+#: gitk:2712
+msgid "<Return>\tMove to next find hit"
+msgstr "<Return>\t\tAller au résultat de recherche suivant"
+
+#: gitk:2713
+msgid "/\t\tFocus the search box"
+msgstr "/\t\tFocus sur la zone de recherche"
+
+#: gitk:2714
+msgid "?\t\tMove to previous find hit"
+msgstr "?\t\tAller au résultat de recherche précédent"
+
+#: gitk:2715
+msgid "f\t\tScroll diff view to next file"
+msgstr "f\t\tAller au prochain fichier dans la vue des diff"
+
+#: gitk:2716
+#, tcl-format
+msgid "<%s-S>\t\tSearch for next hit in diff view"
+msgstr "<%s-S>\t\tAller au résultat suivant dans la vue des diff"
+
+#: gitk:2717
+#, tcl-format
+msgid "<%s-R>\t\tSearch for previous hit in diff view"
+msgstr "<%s-R>\t\tAller au résultat précédent dans la vue des diff"
+
+#: gitk:2718
+#, tcl-format
+msgid "<%s-KP+>\tIncrease font size"
+msgstr "<%s-KP+>\tAugmenter la taille de la police"
+
+#: gitk:2719
+#, tcl-format
+msgid "<%s-plus>\tIncrease font size"
+msgstr "<%s-plus>\tAugmenter la taille de la police"
+
+#: gitk:2720
+#, tcl-format
+msgid "<%s-KP->\tDecrease font size"
+msgstr "<%s-KP->\tDiminuer la taille de la police"
+
+#: gitk:2721
+#, tcl-format
+msgid "<%s-minus>\tDecrease font size"
+msgstr "<%s-minus>\tDiminuer la taille de la police"
+
+#: gitk:2722
+msgid "<F5>\t\tUpdate"
+msgstr "<F5>\t\tMise à jour"
+
+#: gitk:3177
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Erreur en obtenant \"%s\" de %s:"
+
+#: gitk:3234 gitk:3243
+#, tcl-format
+msgid "Error creating temporary directory %s:"
+msgstr "Erreur lors de la création du répertoire temporaire %s :"
+
+#: gitk:3255
+msgid "command failed:"
+msgstr "échec de la commande :"
+
+#: gitk:3401
+msgid "No such commit"
+msgstr "Commit inexistant"
+
+#: gitk:3415
+msgid "git gui blame: command failed:"
+msgstr "git gui blame : échec de la commande :"
+
+#: gitk:3446
+#, tcl-format
+msgid "Couldn't read merge head: %s"
+msgstr "Impossible de lire le head de la fusion : %s"
+
+#: gitk:3454
+#, tcl-format
+msgid "Error reading index: %s"
+msgstr "Erreur à la lecture de l'index : %s"
+
+#: gitk:3479
+#, tcl-format
+msgid "Couldn't start git blame: %s"
+msgstr "Impossible de démarrer git blame : %s"
+
+#: gitk:3482 gitk:6271
+msgid "Searching"
+msgstr "Recherche en cours"
+
+#: gitk:3514
+#, tcl-format
+msgid "Error running git blame: %s"
+msgstr "Erreur à l'exécution de git blame : %s"
+
+#: gitk:3542
+#, tcl-format
+msgid "That line comes from commit %s, which is not in this view"
+msgstr "Cette ligne est issue du commit %s, qui n'est pas dans cette vue"
+
+#: gitk:3556
+msgid "External diff viewer failed:"
+msgstr "Échec de l'outil externe de visualisation des diff"
+
+#: gitk:3674
+msgid "Gitk view definition"
+msgstr "Définition des vues de Gitk"
+
+#: gitk:3678
+msgid "Remember this view"
+msgstr "Se souvenir de cette vue"
+
+#: gitk:3679
+msgid "References (space separated list):"
+msgstr "Références (liste d'éléments séparés par des espaces) :"
+
+#: gitk:3680
+msgid "Branches & tags:"
+msgstr "Branches & tags :"
+
+#: gitk:3681
+msgid "All refs"
+msgstr "Toutes les références"
+
+#: gitk:3682
+msgid "All (local) branches"
+msgstr "Toutes les branches (locales)"
+
+#: gitk:3683
+msgid "All tags"
+msgstr "Tous les tags"
+
+#: gitk:3684
+msgid "All remote-tracking branches"
+msgstr "Toutes les branches de suivi à distance"
+
+#: gitk:3685
+msgid "Commit Info (regular expressions):"
+msgstr "Info sur les commits (expressions régulières) :"
+
+#: gitk:3686
+msgid "Author:"
+msgstr "Auteur :"
+
+#: gitk:3687
+msgid "Committer:"
+msgstr "Commiteur :"
+
+#: gitk:3688
+msgid "Commit Message:"
+msgstr "Message de commit :"
+
+#: gitk:3689
+msgid "Matches all Commit Info criteria"
+msgstr "Correspond à tous les critères d'Info sur les commits"
+
+#: gitk:3690
+msgid "Changes to Files:"
+msgstr "Changements des fichiers :"
+
+#: gitk:3691
+msgid "Fixed String"
+msgstr "Chaîne Figée"
+
+#: gitk:3692
+msgid "Regular Expression"
+msgstr "Expression Régulière"
+
+#: gitk:3693
+msgid "Search string:"
+msgstr "Recherche de la chaîne :"
+
+#: gitk:3694
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr ""
+"Dates des commits (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, "
+"2009 15:27:38\") :"
+
+#: gitk:3695
+msgid "Since:"
+msgstr "De :"
+
+#: gitk:3696
+msgid "Until:"
+msgstr "Jusqu'au :"
+
+#: gitk:3697
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr "Limiter et/ou sauter un certain nombre (entier positif) de révisions :"
+
+#: gitk:3698
+msgid "Number to show:"
+msgstr "Nombre à afficher :"
+
+#: gitk:3699
+msgid "Number to skip:"
+msgstr "Nombre à sauter :"
+
+#: gitk:3700
+msgid "Miscellaneous options:"
+msgstr "Options diverses :"
+
+#: gitk:3701
+msgid "Strictly sort by date"
+msgstr "Trier par date"
+
+# FIXME : traduction de "branch sides"
+#: gitk:3702
+#, fuzzy
+msgid "Mark branch sides"
+msgstr "Marquer les extrémités des branches"
+
+#: gitk:3703
+msgid "Limit to first parent"
+msgstr "Limiter au premier ancêtre"
+
+#: gitk:3704
+msgid "Simple history"
+msgstr "Historique simple"
+
+#: gitk:3705
+msgid "Additional arguments to git log:"
+msgstr "Arguments supplémentaires de git log :"
+
+#: gitk:3706
+msgid "Enter files and directories to include, one per line:"
+msgstr "Saisir les fichiers et répertoires à inclure, un par ligne :"
+
+#: gitk:3707
+msgid "Command to generate more commits to include:"
+msgstr "Commande pour générer plus de commits à inclure :"
+
+#: gitk:3829
+msgid "Gitk: edit view"
+msgstr "Gitk : éditer la vue"
+
+#: gitk:3837
+msgid "-- criteria for selecting revisions"
+msgstr "-- critère pour la sélection des révisions"
+
+#: gitk:3842
+msgid "View Name:"
+msgstr "Nom de la vue :"
+
+#: gitk:3917
+msgid "Apply (F5)"
+msgstr "Appliquer (F5)"
+
+#: gitk:3955
+msgid "Error in commit selection arguments:"
+msgstr "Erreur dans les arguments de sélection des commits :"
+
+#: gitk:4008 gitk:4060 gitk:4508 gitk:4522 gitk:5783 gitk:11196 gitk:11197
+msgid "None"
+msgstr "Aucun"
+
+#: gitk:4456 gitk:6303 gitk:8065 gitk:8080
+msgid "Date"
+msgstr "Date"
+
+#: gitk:4456 gitk:6303
+msgid "CDate"
+msgstr "CDate"
+
+#: gitk:4605 gitk:4610
+msgid "Descendant"
+msgstr "Descendant"
+
+#: gitk:4606
+msgid "Not descendant"
+msgstr "Pas un descendant"
+
+#: gitk:4613 gitk:4618
+msgid "Ancestor"
+msgstr "Ancêtre"
+
+#: gitk:4614
+msgid "Not ancestor"
+msgstr "Pas un ancêtre"
+
+#: gitk:4904
+msgid "Local changes checked in to index but not committed"
+msgstr "Modifications locales enregistrées dans l'index mais non commitées"
+
+#: gitk:4940
+msgid "Local uncommitted changes, not checked in to index"
+msgstr "Modifications locales non enregistrées dans l'index et non commitées"
+
+#: gitk:6621
+msgid "many"
+msgstr "nombreux"
+
+#: gitk:6805
+msgid "Tags:"
+msgstr "Tags :"
+
+#: gitk:6822 gitk:6828 gitk:8058
+msgid "Parent"
+msgstr "Parent"
+
+#: gitk:6833
+msgid "Child"
+msgstr "Enfant"
+
+#: gitk:6842
+msgid "Branch"
+msgstr "Branche"
+
+#: gitk:6845
+msgid "Follows"
+msgstr "Suit"
+
+#: gitk:6848
+msgid "Precedes"
+msgstr "Précède"
+
+#: gitk:7346
+#, tcl-format
+msgid "Error getting diffs: %s"
+msgstr "Erreur lors de la récupération des diff : %s"
+
+#: gitk:7886
+msgid "Goto:"
+msgstr "Aller à :"
+
+#: gitk:7888
+msgid "SHA1 ID:"
+msgstr "Id SHA1 :"
+
+#: gitk:7907
+#, tcl-format
+msgid "Short SHA1 id %s is ambiguous"
+msgstr "Id SHA1 court %s est ambigu"
+
+#: gitk:7914
+#, tcl-format
+msgid "Revision %s is not known"
+msgstr "Id SHA1 %s est inconnu"
+
+#: gitk:7924
+#, tcl-format
+msgid "SHA1 id %s is not known"
+msgstr "Id SHA1 %s est inconnu"
+
+#: gitk:7926
+#, tcl-format
+msgid "Revision %s is not in the current view"
+msgstr "La révision %s n'est pas dans la vue courante"
+
+#: gitk:8068
+msgid "Children"
+msgstr "Enfants"
+
+#: gitk:8125
+#, tcl-format
+msgid "Reset %s branch to here"
+msgstr "Réinitialiser la branche %s vers cet état"
+
+#: gitk:8127
+msgid "Detached head: can't reset"
+msgstr "Head détaché : impossible de réinitialiser"
+
+#: gitk:8236 gitk:8242
+msgid "Skipping merge commit "
+msgstr "Éviter le commit de la fusion "
+
+#: gitk:8251 gitk:8256
+msgid "Error getting patch ID for "
+msgstr "Erreur à l'obtention de l'ID du patch pour "
+
+#: gitk:8252 gitk:8257
+msgid " - stopping\n"
+msgstr " - arrêt en cours\n"
+
+#: gitk:8262 gitk:8265 gitk:8273 gitk:8283 gitk:8292
+msgid "Commit "
+msgstr "Commit "
+
+#: gitk:8266
+msgid ""
+" is the same patch as\n"
+" "
+msgstr ""
+"est le même patch que \n"
+" "
+
+#: gitk:8274
+msgid ""
+" differs from\n"
+" "
+msgstr ""
+" diffère de\n"
+" "
+
+#: gitk:8276
+msgid "- stopping\n"
+msgstr "- arrêt en cours\n"
+
+#: gitk:8284 gitk:8293
+#, tcl-format
+msgid " has %s children - stopping\n"
+msgstr "a %s enfants - arrêt en cours\n"
+
+#: gitk:8324
+msgid "Top"
+msgstr "Haut"
+
+#: gitk:8325
+msgid "From"
+msgstr "De"
+
+#: gitk:8330
+msgid "To"
+msgstr "À"
+
+#: gitk:8354
+msgid "Generate patch"
+msgstr "Générer le patch"
+
+#: gitk:8356
+msgid "From:"
+msgstr "De :"
+
+#: gitk:8365
+msgid "To:"
+msgstr "À :"
+
+#: gitk:8374
+msgid "Reverse"
+msgstr "Inverser"
+
+#: gitk:8376 gitk:8561
+msgid "Output file:"
+msgstr "Fichier de sortie :"
+
+#: gitk:8382
+msgid "Generate"
+msgstr "Générer"
+
+#: gitk:8420
+msgid "Error creating patch:"
+msgstr "Erreur à la création du patch :"
+
+#: gitk:8443 gitk:8549 gitk:8606
+msgid "ID:"
+msgstr "ID :"
+
+#: gitk:8452
+msgid "Tag name:"
+msgstr "Nom du Tag :"
+
+#: gitk:8456 gitk:8615
+msgid "Create"
+msgstr "Créer"
+
+#: gitk:8473
+msgid "No tag name specified"
+msgstr "Aucun nom de tag spécifié"
+
+#: gitk:8477
+#, tcl-format
+msgid "Tag \"%s\" already exists"
+msgstr "Le tag \"%s\" existe déjà"
+
+#: gitk:8483
+msgid "Error creating tag:"
+msgstr "Erreur à la création du tag :"
+
+#: gitk:8558
+msgid "Command:"
+msgstr "Commande :"
+
+#: gitk:8566
+msgid "Write"
+msgstr "Écrire"
+
+#: gitk:8584
+msgid "Error writing commit:"
+msgstr "Erreur à l'ecriture du commit :"
+
+#: gitk:8611
+msgid "Name:"
+msgstr "Nom :"
+
+#: gitk:8634
+msgid "Please specify a name for the new branch"
+msgstr "Veuillez spécifier un nom pour la nouvelle branche"
+
+#: gitk:8639
+#, tcl-format
+msgid "Branch '%s' already exists. Overwrite?"
+msgstr "La branche '%s' existe déjà. Écraser?"
+
+#: gitk:8705
+#, tcl-format
+msgid "Commit %s is already included in branch %s -- really re-apply it?"
+msgstr ""
+"Le Commit %s est déjà inclus dans la branche %s -- le ré-appliquer malgré "
+"tout?"
+
+#: gitk:8710
+msgid "Cherry-picking"
+msgstr "Cueillir (Cherry-picking)"
+
+#: gitk:8719
+#, tcl-format
+msgid ""
+"Cherry-pick failed because of local changes to file '%s'.\n"
+"Please commit, reset or stash your changes and try again."
+msgstr ""
+"La cueillette (cherry-pick) a échouée à cause de modifications locales du "
+"fichier '%s'.\n"
+"Veuillez commiter, réinitialiser ou stasher vos changements et essayer de "
+"nouveau."
+
+#: gitk:8725
+msgid ""
+"Cherry-pick failed because of merge conflict.\n"
+"Do you wish to run git citool to resolve it?"
+msgstr ""
+"La cueillette (cherry-pick) a échouée à cause d'un conflit lors d'une "
+"fusion.\n"
+"Souhaitez-vous exécuter git citool pour le résoudre ?"
+
+#: gitk:8741
+msgid "No changes committed"
+msgstr "Aucun changement commité"
+
+#: gitk:8767
+msgid "Confirm reset"
+msgstr "Confirmer la réinitialisation"
+
+#: gitk:8769
+#, tcl-format
+msgid "Reset branch %s to %s?"
+msgstr "Réinitialiser la branche %s à %s?"
+
+#: gitk:8773
+msgid "Reset type:"
+msgstr "Type de réinitialisation :"
+
+#: gitk:8777
+msgid "Soft: Leave working tree and index untouched"
+msgstr "Douce : Laisse le répertoire de travail et l'index intacts"
+
+#: gitk:8780
+msgid "Mixed: Leave working tree untouched, reset index"
+msgstr ""
+"Hybride : Laisse le répertoire de travail dans son état courant, "
+"réinitialise l'index"
+
+#: gitk:8783
+msgid ""
+"Hard: Reset working tree and index\n"
+"(discard ALL local changes)"
+msgstr ""
+"Dure : Réinitialise le répertoire de travail et l'index\n"
+"(abandonne TOUS les changements locaux)"
+
+#: gitk:8800
+msgid "Resetting"
+msgstr "Réinitialisation"
+
+# Fixme: Récupération est-il vraiment une mauvaise traduction?
+#: gitk:8857
+#, fuzzy
+msgid "Checking out"
+msgstr "Récupération"
+
+#: gitk:8910
+msgid "Cannot delete the currently checked-out branch"
+msgstr "Impossible de supprimer la branche en cours"
+
+#: gitk:8916
+#, tcl-format
+msgid ""
+"The commits on branch %s aren't on any other branch.\n"
+"Really delete branch %s?"
+msgstr ""
+"Les commits de la branche %s ne sont dans aucune autre branche.\n"
+"Voulez-vous vraiment supprimer cette branche %s ?"
+
+#: gitk:8947
+#, tcl-format
+msgid "Tags and heads: %s"
+msgstr "Tags et heads : %s"
+
+#: gitk:8962
+msgid "Filter"
+msgstr "Filtrer"
+
+#: gitk:9257
+msgid ""
+"Error reading commit topology information; branch and preceding/following "
+"tag information will be incomplete."
+msgstr ""
+"Erreur à la lecture des informations sur la topologie des commits, les "
+"informations sur les branches et les tags précédents/suivants seront "
+"incomplètes."
+
+#: gitk:10243
+msgid "Tag"
+msgstr "Tag"
+
+#: gitk:10243
+msgid "Id"
+msgstr "Id"
+
+#: gitk:10291
+msgid "Gitk font chooser"
+msgstr "Sélecteur de police de Gitk"
+
+#: gitk:10308
+msgid "B"
+msgstr "B"
+
+#: gitk:10311
+msgid "I"
+msgstr "I"
+
+#: gitk:10407
+msgid "Gitk preferences"
+msgstr "Préférences de Gitk"
+
+#: gitk:10409
+msgid "Commit list display options"
+msgstr "Options d'affichage de la liste des commits"
+
+#: gitk:10412
+msgid "Maximum graph width (lines)"
+msgstr "Longueur maximum du graphe (lignes)"
+
+# FIXME : Traduction standard de "pane"?
+#: gitk:10416
+#, fuzzy, tcl-format
+msgid "Maximum graph width (% of pane)"
+msgstr "Longueur maximum du graphe (% du panneau)"
+
+#: gitk:10420
+msgid "Show local changes"
+msgstr "Montrer les changements locaux"
+
+#: gitk:10423
+msgid "Auto-select SHA1"
+msgstr "Sélection auto. du SHA1"
+
+#: gitk:10427
+msgid "Diff display options"
+msgstr "Options d'affichage des diff"
+
+#: gitk:10429
+msgid "Tab spacing"
+msgstr "Taille des tabulations"
+
+#: gitk:10432
+msgid "Display nearby tags"
+msgstr "Afficher les tags les plus proches"
+
+#: gitk:10435
+msgid "Hide remote refs"
+msgstr "Cacher les refs distantes"
+
+#: gitk:10438
+msgid "Limit diffs to listed paths"
+msgstr "Limiter les différences aux chemins listés"
+
+#: gitk:10441
+msgid "Support per-file encodings"
+msgstr "Support pour un encodage des caractères par fichier"
+
+#: gitk:10447 gitk:10512
+msgid "External diff tool"
+msgstr "Outil diff externe"
+
+#: gitk:10449
+msgid "Choose..."
+msgstr "Choisir..."
+
+#: gitk:10454
+msgid "Colors: press to choose"
+msgstr "Couleurs : cliquer pour choisir"
+
+#: gitk:10457
+msgid "Background"
+msgstr "Arrière-plan"
+
+#: gitk:10458 gitk:10488
+msgid "background"
+msgstr "arrière-plan"
+
+#: gitk:10461
+msgid "Foreground"
+msgstr "Premier plan"
+
+#: gitk:10462
+msgid "foreground"
+msgstr "premier plan"
+
+#: gitk:10465
+msgid "Diff: old lines"
+msgstr "Diff : anciennes lignes"
+
+#: gitk:10466
+msgid "diff old lines"
+msgstr "diff anciennes lignes"
+
+#: gitk:10470
+msgid "Diff: new lines"
+msgstr "Diff : nouvelles lignes"
+
+#: gitk:10471
+msgid "diff new lines"
+msgstr "diff nouvelles lignes"
+
+#: gitk:10475
+msgid "Diff: hunk header"
+msgstr "Diff : entête du hunk"
+
+#: gitk:10477
+msgid "diff hunk header"
+msgstr "diff : entête du hunk"
+
+#: gitk:10481
+msgid "Marked line bg"
+msgstr "Arrière-plan de la ligne marquée"
+
+#: gitk:10483
+msgid "marked line background"
+msgstr "Arrière-plan de la ligne marquée"
+
+#: gitk:10487
+msgid "Select bg"
+msgstr "Sélectionner l'arrière-plan"
+
+#: gitk:10491
+msgid "Fonts: press to choose"
+msgstr "Polices : cliquer pour choisir"
+
+#: gitk:10493
+msgid "Main font"
+msgstr "Police principale"
+
+#: gitk:10494
+msgid "Diff display font"
+msgstr "Police d'affichage des diff"
+
+#: gitk:10495
+msgid "User interface font"
+msgstr "Police de l'interface utilisateur"
+
+#: gitk:10522
+#, tcl-format
+msgid "Gitk: choose color for %s"
+msgstr "Gitk : choisir la couleur de %s"
+
+#: gitk:10973
+msgid ""
+"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+" Gitk requires at least Tcl/Tk 8.4."
+msgstr ""
+"Désolé, gitk ne peut être exécuté avec cette version de Tcl/Tk.\n"
+" Gitk requiert Tcl/Tk version 8.4 ou supérieur."
+
+#: gitk:11101
+msgid "Cannot find a git repository here."
+msgstr "Impossible de trouver un dépôt git ici."
+
+#: gitk:11105
+#, tcl-format
+msgid "Cannot find the git directory \"%s\"."
+msgstr "Impossible de trouver le répertoire git \"%s\"."
+
+#: gitk:11152
+#, tcl-format
+msgid "Ambiguous argument '%s': both revision and filename"
+msgstr "Argument '%s' ambigu : à la fois une révision et un nom de fichier"
+
+#: gitk:11164
+msgid "Bad arguments to gitk:"
+msgstr "Arguments invalides pour gitk :"
+
+#: gitk:11249
+msgid "Command line"
+msgstr "Ligne de commande"
diff --git a/gitk-git/po/hu.po b/gitk-git/po/hu.po
new file mode 100644
index 0000000000..1df212e881
--- /dev/null
+++ b/gitk-git/po/hu.po
@@ -0,0 +1,1295 @@
+# Translation of gitk to Hungarian.
+# Copyright (C) 2007 Paul Mackerras.
+# This file is distributed under the same license as the gitk package.
+#
+# Laszlo Papp <laszlo.papp@arhungary.hu>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: git-gui\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-14 13:33+0100\n"
+"PO-Revision-Date: 2009-12-14 14:04+0100\n"
+"Last-Translator: Laszlo Papp <djszapi@archlinux.us>\n"
+"Language-Team: Hungarian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gitk:115
+msgid "Couldn't get list of unmerged files:"
+msgstr "Nem sikerült letölteni az unmerged fájl listát:"
+
+#: gitk:271
+msgid "Error parsing revisions:"
+msgstr "Hiba történt értelmezés közben:"
+
+#: gitk:326
+msgid "Error executing --argscmd command:"
+msgstr "Hiba történt a végrehajtáskor --argscmd parancs:"
+
+#: gitk:339
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr ""
+"Nincsen fájl kiválasztva: --merge megadve, de egyetlen fájl sem unmerged."
+
+#: gitk:342
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr ""
+"Nincsen fájl kiválasztva: --merge megadva, de nincsenek unmerged fájlok a "
+"fájlon belül limit."
+
+#: gitk:364 gitk:511
+msgid "Error executing git log:"
+msgstr "Hiba történt a git log végrehajtása közben:"
+
+#: gitk:382 gitk:527
+msgid "Reading"
+msgstr "Olvasás"
+
+#: gitk:442 gitk:4258
+msgid "Reading commits..."
+msgstr "Commitok olvasása ..."
+
+#: gitk:445 gitk:1575 gitk:4261
+msgid "No commits selected"
+msgstr "Nincsen commit kiválasztva"
+
+#: gitk:1451
+msgid "Can't parse git log output:"
+msgstr "Nem lehet értelmezni a git log kimenetét:"
+
+#: gitk:1671
+msgid "No commit information available"
+msgstr "Nincsen elérhető commit információ"
+
+#: gitk:1813
+msgid "mc"
+msgstr "mc"
+
+#: gitk:1848 gitk:4051 gitk:9029 gitk:10570 gitk:10789
+msgid "OK"
+msgstr "OK"
+
+#: gitk:1850 gitk:4053 gitk:8629 gitk:8703 gitk:8813 gitk:8862 gitk:9031
+#: gitk:10571 gitk:10790
+msgid "Cancel"
+msgstr "Visszavonás"
+
+#: gitk:1972
+msgid "Update"
+msgstr "Frissités"
+
+#: gitk:1973
+msgid "Reload"
+msgstr "Újratöltés"
+
+#: gitk:1974
+msgid "Reread references"
+msgstr "Referenciák újraolvasása"
+
+#: gitk:1975
+msgid "List references"
+msgstr "Referenciák listázása"
+
+#: gitk:1977
+msgid "Start git gui"
+msgstr "Git gui indítása"
+
+#: gitk:1979
+msgid "Quit"
+msgstr "Kilépés"
+
+#: gitk:1971
+msgid "File"
+msgstr "Fájl"
+
+#: gitk:1983
+msgid "Preferences"
+msgstr "Beállítások"
+
+#: gitk:1982
+msgid "Edit"
+msgstr "Szerkesztés"
+
+#: gitk:1987
+msgid "New view..."
+msgstr "Új nézet ..."
+
+#: gitk:1988
+msgid "Edit view..."
+msgstr "Nézet szerkesztése ..."
+
+#: gitk:1989
+msgid "Delete view"
+msgstr "Nézet törlése"
+
+#: gitk:1991
+msgid "All files"
+msgstr "Minden fájl"
+
+#: gitk:1986 gitk:3805
+msgid "View"
+msgstr "Nézet"
+
+#: gitk:1996 gitk:2006 gitk:2777
+msgid "About gitk"
+msgstr "Gitk névjegy"
+
+#: gitk:1997 gitk:2011
+msgid "Key bindings"
+msgstr "Billentyűkombináció"
+
+#: gitk:1995 gitk:2010
+msgid "Help"
+msgstr "Segítség"
+
+#: gitk:2088
+msgid "SHA1 ID: "
+msgstr "SHA1 ID: "
+
+#: gitk:2119
+msgid "Row"
+msgstr "Sor"
+
+#: gitk:2157
+msgid "Find"
+msgstr "Keresés"
+
+#: gitk:2158
+msgid "next"
+msgstr "következő"
+
+#: gitk:2159
+msgid "prev"
+msgstr "előző"
+
+#: gitk:2160
+msgid "commit"
+msgstr "commit"
+
+#: gitk:2163 gitk:2165 gitk:4419 gitk:4442 gitk:4466 gitk:6407 gitk:6479
+#: gitk:6563
+msgid "containing:"
+msgstr "tartalmazás:"
+
+#: gitk:2166 gitk:3287 gitk:3292 gitk:4494
+msgid "touching paths:"
+msgstr "érintendő útvonalak:"
+
+#: gitk:2167 gitk:4499
+msgid "adding/removing string:"
+msgstr "string hozzáadása/törlése:"
+
+#: gitk:2176 gitk:2178
+msgid "Exact"
+msgstr "Pontos"
+
+#: gitk:2178 gitk:4574 gitk:6375
+msgid "IgnCase"
+msgstr "Kis/nagy betű nem számít"
+
+#: gitk:2178 gitk:4468 gitk:4572 gitk:6371
+msgid "Regexp"
+msgstr "Regexp"
+
+#: gitk:2180 gitk:2181 gitk:4593 gitk:4623 gitk:4630 gitk:6499 gitk:6567
+msgid "All fields"
+msgstr "Minden mező"
+
+#: gitk:2181 gitk:4591 gitk:4623 gitk:6438
+msgid "Headline"
+msgstr "Főcím"
+
+#: gitk:2182 gitk:4591 gitk:6438 gitk:6567 gitk:7000
+msgid "Comments"
+msgstr "Megjegyzések"
+
+#: gitk:2182 gitk:4591 gitk:4595 gitk:4630 gitk:6438 gitk:6935 gitk:8280
+#: gitk:8295
+msgid "Author"
+msgstr "Szerző"
+
+#: gitk:2182 gitk:4591 gitk:6438 gitk:6937
+msgid "Committer"
+msgstr "Commitoló"
+
+#: gitk:2213
+msgid "Search"
+msgstr "Keresés"
+
+#: gitk:2221
+msgid "Diff"
+msgstr "Diff"
+
+#: gitk:2223
+msgid "Old version"
+msgstr "Régi verzió"
+
+#: gitk:2225
+msgid "New version"
+msgstr "Új verzió"
+
+#: gitk:2227
+msgid "Lines of context"
+msgstr "Tartalmi sorok"
+
+#: gitk:2237
+msgid "Ignore space change"
+msgstr "Space váltás mellőzése"
+
+#: gitk:2296
+msgid "Patch"
+msgstr "Patch"
+
+#: gitk:2298
+msgid "Tree"
+msgstr "Tree"
+
+#: gitk:2453 gitk:2470
+msgid "Diff this -> selected"
+msgstr "Diff ezeket -> kiválasztott"
+
+#: gitk:2454 gitk:2471
+msgid "Diff selected -> this"
+msgstr "Diff kiválasztottakat -> ezt"
+
+#: gitk:2455 gitk:2472
+msgid "Make patch"
+msgstr "Patch készítése"
+
+#: gitk:2456 gitk:8687
+msgid "Create tag"
+msgstr "Tag készítése"
+
+#: gitk:2457 gitk:8793
+msgid "Write commit to file"
+msgstr "Commit fáljba írása"
+
+#: gitk:2458 gitk:8850
+msgid "Create new branch"
+msgstr "Új branch készítése"
+
+#: gitk:2459
+msgid "Cherry-pick this commit"
+msgstr "Cherry-pick erre a commitra"
+
+#: gitk:2460
+msgid "Reset HEAD branch to here"
+msgstr "HEAD branch újraindítása ide"
+
+#: gitk:2461
+msgid "Mark this commit"
+msgstr "Ezen commit megjelölése"
+
+#: gitk:2462
+msgid "Return to mark"
+msgstr "Visszatérés a megjelöléshez"
+
+#: gitk:2463
+msgid "Find descendant of this and mark"
+msgstr "Találd meg ezen utódokat és jelöld meg"
+
+#: gitk:2464
+msgid "Compare with marked commit"
+msgstr "Összehasonlítás a megjelölt commit-tal"
+
+#: gitk:2478
+msgid "Check out this branch"
+msgstr "Check out ezt a branchot"
+
+#: gitk:2479
+msgid "Remove this branch"
+msgstr "Töröld ezt a branch-ot"
+
+#: gitk:2486
+msgid "Highlight this too"
+msgstr "Emeld ki ezt is"
+
+#: gitk:2487
+msgid "Highlight this only"
+msgstr "Csak ezt emeld ki"
+
+#: gitk:2488
+msgid "External diff"
+msgstr "Külső diff"
+
+#: gitk:2489
+msgid "Blame parent commit"
+msgstr "Blame szülő kommitra"
+
+#: gitk:2496
+msgid "Show origin of this line"
+msgstr "Mutasd meg ennek a sornak az eredetét"
+
+#: gitk:2497
+msgid "Run git gui blame on this line"
+msgstr "Futtasd a git gui blame-t ezen a soron"
+
+#: gitk:2779
+msgid ""
+"\n"
+"Gitk - a commit viewer for git\n"
+"\n"
+"Copyright ©9 2005-2009 Paul Mackerras\n"
+"\n"
+"Use and redistribute under the terms of the GNU General Public License"
+msgstr ""
+"\n"
+"Gitk - commit nézegető a githez\n"
+"\n"
+"Szerzői jog ©9 2005-2009 Paul Mackerras\n"
+"\n"
+"Használd és terjeszd a GNU General Public License feltételei mellett"
+
+#: gitk:2787 gitk:2851 gitk:9215
+msgid "Close"
+msgstr "Bezárás"
+
+#: gitk:2808
+msgid "Gitk key bindings"
+msgstr "Gitk-billentyű hozzárendelés"
+
+#: gitk:2811
+msgid "Gitk key bindings:"
+msgstr "Gitk-billentyű hozzaárendelés:"
+
+#: gitk:2813
+#, tcl-format
+msgid "<%s-Q>\t\tQuit"
+msgstr "<%s-Q>\t\tKilépés"
+
+#: gitk:2814
+msgid "<Home>\t\tMove to first commit"
+msgstr "<Pos1>\t\tElső commithoz"
+
+#: gitk:2815
+msgid "<End>\t\tMove to last commit"
+msgstr "<Ende>\t\tUtolsó commithoz"
+
+#: gitk:2816
+msgid "<Up>, p, i\tMove up one commit"
+msgstr "<Hoch>, p, i\tEgy committal feljebb"
+
+#: gitk:2817
+msgid "<Down>, n, k\tMove down one commit"
+msgstr "<Runter>, n, k\tEgy committal lejjebb"
+
+#: gitk:2818
+msgid "<Left>, z, j\tGo back in history list"
+msgstr "<Links>, z, j\tVissza a history listába"
+
+#: gitk:2819
+msgid "<Right>, x, l\tGo forward in history list"
+msgstr "<Rechts>, x, l\tElőre a history listába"
+
+#: gitk:2820
+msgid "<PageUp>\tMove up one page in commit list"
+msgstr "<BildHoch>\tEgy lappal feljebb a commit listába"
+
+#: gitk:2821
+msgid "<PageDown>\tMove down one page in commit list"
+msgstr "<BildRunter>\tEgy lappal lejjebb a commit listába"
+
+#: gitk:2822
+#, tcl-format
+msgid "<%s-Home>\tScroll to top of commit list"
+msgstr "<%s-Pos1>\tGörgetés a commit lista tetejéhez"
+
+#: gitk:2823
+#, tcl-format
+msgid "<%s-End>\tScroll to bottom of commit list"
+msgstr "<%s-Ende>\tGörgetés a commit lista aljához"
+
+#: gitk:2824
+#, tcl-format
+msgid "<%s-Up>\tScroll commit list up one line"
+msgstr "<%s-Hoch>\tEgy sorral feljebb görgetés a commit listában"
+
+#: gitk:2825
+#, tcl-format
+msgid "<%s-Down>\tScroll commit list down one line"
+msgstr "<%s-Runter>\tEgy sorral lejjebb görgetés a commit listában"
+
+#: gitk:2826
+#, tcl-format
+msgid "<%s-PageUp>\tScroll commit list up one page"
+msgstr "<%s-BildHoch>\tEgy lappal feljebb görgetés a commit listában"
+
+#: gitk:2827
+#, tcl-format
+msgid "<%s-PageDown>\tScroll commit list down one page"
+msgstr "<%s-BildRunter>\tEgy sorral lejjebb görgetés a commit listában"
+
+#: gitk:2828
+msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
+msgstr "<Umschalt-Hoch>\tKeresés visszafele (felfele, utolsó commitok)"
+
+#: gitk:2829
+msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
+msgstr "<Umschalt-Runter>\tKeresés előre (lefelé; korábbi commitok)"
+
+#: gitk:2830
+msgid "<Delete>, b\tScroll diff view up one page"
+msgstr "<Entf>, b\t\tEgy lappal feljebb görgetés a diff nézetben"
+
+#: gitk:2831
+msgid "<Backspace>\tScroll diff view up one page"
+msgstr "<Löschtaste>\tEgy lappal feljebb görgetés a diff nézetben"
+
+#: gitk:2832
+msgid "<Space>\t\tScroll diff view down one page"
+msgstr "<Leertaste>\tEgy lappal lejjebb görgetés a diff nézetben"
+
+#: gitk:2833
+msgid "u\t\tScroll diff view up 18 lines"
+msgstr "u\t\t18 sorral felfelé görgetés diff nézetben"
+
+#: gitk:2834
+msgid "d\t\tScroll diff view down 18 lines"
+msgstr "d\t\t18 sorral lejjebb görgetés a diff nézetben"
+
+#: gitk:2835
+#, tcl-format
+msgid "<%s-F>\t\tFind"
+msgstr "<%s-F>\t\tKeresés"
+
+#: gitk:2836
+#, tcl-format
+msgid "<%s-G>\t\tMove to next find hit"
+msgstr "<%s-G>\t\tKövetkező találathoz"
+
+#: gitk:2837
+msgid "<Return>\tMove to next find hit"
+msgstr "<Eingabetaste>\tKövetkező találathoz"
+
+#: gitk:2838
+msgid "/\t\tFocus the search box"
+msgstr "/\t\tLépj a keresési mezőre"
+
+#: gitk:2839
+msgid "?\t\tMove to previous find hit"
+msgstr "?\t\tElőző találathoz"
+
+#: gitk:2840
+msgid "f\t\tScroll diff view to next file"
+msgstr "f\t\tKövetkező fájlra görgetés diff nézetben"
+
+#: gitk:2841
+#, tcl-format
+msgid "<%s-S>\t\tSearch for next hit in diff view"
+msgstr "<%s-S>\t\tKövetkező találatra keresés diff nézetben"
+
+#: gitk:2842
+#, tcl-format
+msgid "<%s-R>\t\tSearch for previous hit in diff view"
+msgstr "<%s-R>\t\tElőző találatra keresés diff nézetben"
+
+#: gitk:2843
+#, tcl-format
+msgid "<%s-KP+>\tIncrease font size"
+msgstr "<%s-Nummerblock-Plus>\tBetűméret növelése"
+
+#: gitk:2844
+#, tcl-format
+msgid "<%s-plus>\tIncrease font size"
+msgstr "<%s-Plus>\tBetűméret növelése"
+
+#: gitk:2845
+#, tcl-format
+msgid "<%s-KP->\tDecrease font size"
+msgstr "<%s-Nummernblock-Minus> Betűméret csökkentése"
+
+#: gitk:2846
+#, tcl-format
+msgid "<%s-minus>\tDecrease font size"
+msgstr "<%s-Minus>\tBetűméret csökkentése"
+
+#: gitk:2847
+msgid "<F5>\t\tUpdate"
+msgstr "<F5>\t\tFrissítés"
+
+#: gitk:3302 gitk:3311
+#, tcl-format
+msgid "Error creating temporary directory %s:"
+msgstr "Hiba történt az ideiglenes könyvtár létrehozása közben %s:"
+
+#: gitk:3324
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Hiba történt \"%s\" letöltése közben %s-ről:"
+
+#: gitk:3387
+msgid "command failed:"
+msgstr "parancs hiba:"
+
+#: gitk:3536
+msgid "No such commit"
+msgstr "Nincs ilyen commit"
+
+#: gitk:3550
+msgid "git gui blame: command failed:"
+msgstr "git gui blame: parancs hiba:"
+
+#: gitk:3581
+#, tcl-format
+msgid "Couldn't read merge head: %s"
+msgstr "Nem sikerült a Merge head olvasása: %s"
+
+#: gitk:3589
+#, tcl-format
+msgid "Error reading index: %s"
+msgstr "Hiba történt az index olvasása közben: %s"
+
+#: gitk:3614
+#, tcl-format
+msgid "Couldn't start git blame: %s"
+msgstr "Nem sikerült a git blame indítása: %s"
+
+#: gitk:3617 gitk:6406
+msgid "Searching"
+msgstr "Keresés"
+
+#: gitk:3649
+#, tcl-format
+msgid "Error running git blame: %s"
+msgstr "Hiba történt a git blame futtatása közben: %s"
+
+#: gitk:3677
+#, tcl-format
+msgid "That line comes from commit %s, which is not in this view"
+msgstr ""
+"A %s commitból származik az a sor, amelyik nem található ebben a nézetben"
+
+#: gitk:3691
+msgid "External diff viewer failed:"
+msgstr "Külső diff nézegető hiba:"
+
+#: gitk:3809
+msgid "Gitk view definition"
+msgstr "Gitk nézet meghatározása"
+
+#: gitk:3813
+msgid "Remember this view"
+msgstr "Maradj ennél a nézetnél"
+
+#: gitk:3814
+msgid "References (space separated list):"
+msgstr "Referenciák (szóközzel tagolt lista"
+
+#: gitk:3815
+msgid "Branches & tags:"
+msgstr "Branch-ek & tagek:"
+
+#: gitk:3816
+msgid "All refs"
+msgstr "Minden ref"
+
+#: gitk:3817
+msgid "All (local) branches"
+msgstr "Minden (helyi) branch"
+
+#: gitk:3818
+msgid "All tags"
+msgstr "Minden tag"
+
+#: gitk:3819
+msgid "All remote-tracking branches"
+msgstr "Minden távoli követő branch"
+
+#: gitk:3820
+msgid "Commit Info (regular expressions):"
+msgstr "Commit Infó (reguláris kifejezés):"
+
+#: gitk:3821
+msgid "Author:"
+msgstr "Szerző:"
+
+#: gitk:3822
+msgid "Committer:"
+msgstr "Commitoló:"
+
+#: gitk:3823
+msgid "Commit Message:"
+msgstr "Commit üzenet:"
+
+#: gitk:3824
+msgid "Matches all Commit Info criteria"
+msgstr "Egyezik minen Commit Infó feltétellel"
+
+#: gitk:3825
+msgid "Changes to Files:"
+msgstr "Fájl változások:"
+
+#: gitk:3826
+msgid "Fixed String"
+msgstr "Fix String"
+
+#: gitk:3827
+msgid "Regular Expression"
+msgstr "Reguláris kifejezés"
+
+#: gitk:3828
+msgid "Search string:"
+msgstr "Keresés szöveg:"
+
+#: gitk:3829
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr ""
+"Commit Dátumok (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+
+#: gitk:3830
+msgid "Since:"
+msgstr "Ettől:"
+
+#: gitk:3831
+msgid "Until:"
+msgstr "Eddig:"
+
+#: gitk:3832
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr "Limitálva és/vagy kihagyva egy adott számú revíziót (pozitív egész):"
+
+#: gitk:3833
+msgid "Number to show:"
+msgstr "Mutatandó szám:"
+
+#: gitk:3834
+msgid "Number to skip:"
+msgstr "Kihagyandó szám:"
+
+#: gitk:3835
+msgid "Miscellaneous options:"
+msgstr "Különféle opciók:"
+
+#: gitk:3836
+msgid "Strictly sort by date"
+msgstr "Szigorú rendezás dátum alapján"
+
+#: gitk:3837
+msgid "Mark branch sides"
+msgstr "Jelölje meg az ágakat"
+
+#: gitk:3838
+msgid "Limit to first parent"
+msgstr "Korlátozás az első szülőre"
+
+#: gitk:3839
+msgid "Simple history"
+msgstr "Egyszerű history"
+
+#: gitk:3840
+msgid "Additional arguments to git log:"
+msgstr "További argumentok a git log-hoz:"
+
+#: gitk:3841
+msgid "Enter files and directories to include, one per line:"
+msgstr "Fájlok és könyvtárak bejegyzése amiket tartalmaz, soronként:"
+
+#: gitk:3842
+msgid "Command to generate more commits to include:"
+msgstr "Parancs több tartalmazó commit generálására:"
+
+#: gitk:3964
+msgid "Gitk: edit view"
+msgstr "Gitk: szerkesztés nézet"
+
+#: gitk:3972
+msgid "-- criteria for selecting revisions"
+msgstr "-- kritériumok a revíziók kiválasztásához"
+
+#: gitk:3977
+msgid "View Name"
+msgstr "Nézet neve"
+
+#: gitk:4052
+msgid "Apply (F5)"
+msgstr "Alkalmaz (F5)"
+
+#: gitk:4090
+msgid "Error in commit selection arguments:"
+msgstr "Hiba történt a commit argumentumok kiválasztása közben:"
+
+#: gitk:4143 gitk:4195 gitk:4643 gitk:4657 gitk:5918 gitk:11519 gitk:11520
+msgid "None"
+msgstr "Keine"
+
+#: gitk:4591 gitk:6438 gitk:8282 gitk:8297
+msgid "Date"
+msgstr "Dátum"
+
+#: gitk:4591 gitk:6438
+msgid "CDate"
+msgstr "Dátum"
+
+#: gitk:4740 gitk:4745
+msgid "Descendant"
+msgstr "Leszármazott"
+
+#: gitk:4741
+msgid "Not descendant"
+msgstr "Nem leszármazott"
+
+#: gitk:4748 gitk:4753
+msgid "Ancestor"
+msgstr "Előd"
+
+#: gitk:4749
+msgid "Not ancestor"
+msgstr "Nem előd"
+
+#: gitk:5039
+msgid "Local changes checked in to index but not committed"
+msgstr ""
+"Lokális változtatások, melyek be vannak téve az indexbe, de még nincsenek "
+"commitolva"
+
+#: gitk:5075
+msgid "Local uncommitted changes, not checked in to index"
+msgstr "Lokális nem commitolt változások, nincsenek betéve az indexbe"
+
+#: gitk:6756
+msgid "many"
+msgstr "sok"
+
+#: gitk:6939
+msgid "Tags:"
+msgstr "Tagek:"
+
+#: gitk:6956 gitk:6962 gitk:8275
+msgid "Parent"
+msgstr "Eltern"
+
+#: gitk:6967
+msgid "Child"
+msgstr "Gyerek"
+
+#: gitk:6976
+msgid "Branch"
+msgstr "Ág"
+
+#: gitk:6979
+msgid "Follows"
+msgstr "Következők"
+
+#: gitk:6982
+msgid "Precedes"
+msgstr "Megelőzők"
+
+#: gitk:7519
+#, tcl-format
+msgid "Error getting diffs: %s"
+msgstr "Hiba történt a diff-ek letöltése közben: %s"
+
+#: gitk:8103
+msgid "Goto:"
+msgstr "Menj:"
+
+#: gitk:8105
+msgid "SHA1 ID:"
+msgstr "SHA1 ID:"
+
+#: gitk:8124
+#, tcl-format
+msgid "Short SHA1 id %s is ambiguous"
+msgstr "Rövid SHA1 id %s félreérthető"
+
+#: gitk:8131
+msgid "Revision %s is not known"
+msgstr "A(z) %s revízió nem ismert"
+
+#: gitk:8141
+#, tcl-format
+msgid "SHA1 id %s is not known"
+msgstr "SHA1 id %s nem ismert"
+
+#: gitk:8143
+#, tcl-format
+msgid "Revision %s is not in the current view"
+msgstr "A(z) %s revízió nincs a jelenlegi nézetben"
+
+#: gitk:8285
+msgid "Children"
+msgstr "Gyerekek"
+
+#: gitk:8343
+#, tcl-format
+msgid "Reset %s branch to here"
+msgstr "Állítsd vissza a %s branch-ot ide"
+
+#: gitk:8345
+msgid "Detached head: can't reset"
+msgstr "Elkülönített head: nem lehet visszaállítani"
+
+#: gitk:8454 gitk:8460
+msgid "Skipping merge commit "
+msgstr "Merge commit kihagyása "
+
+#: gitk:8469 gitk:8474
+msgid "Error getting patch ID for "
+msgstr "Hiba történt a patch ID megszerzése közben a következőnél "
+
+#: gitk:8470 gitk:8475
+msgid " - stopping\n"
+msgstr " - abbahagyás\n"
+
+#: gitk:8480 gitk:8483 gitk:8491 gitk:8505 gitk:8514
+msgid "Commit "
+msgstr "Commit "
+
+#: gitk:8484
+msgid ""
+" is the same patch as\n"
+" "
+msgstr ""
+" Ugyanaz a patch mint\n"
+" "
+
+#: gitk:8492
+msgid ""
+" differs from\n"
+" "
+msgstr ""
+" különbözik innentől\n"
+" "
+
+#: gitk:8494
+msgid ""
+"Diff of commits:\n"
+"\n"
+msgstr ""
+"A commitok diffje:\n"
+"\n"
+
+#: gitk:8506 gitk:8515
+#, tcl-format
+msgid " has %s children - stopping\n"
+msgstr " %s gyereke van. abbahagyás\n"
+
+#: gitk:8534
+msgid "Error writing commit to file: %s"
+msgstr "Hiba történt a commit fájlba írása közben: %s"
+
+#: gitk:8540
+msgid "Error diffing commits: %s"
+msgstr "Hiba történt a commitok diffelése közben: %s"
+
+#: gitk:8570
+msgid "Top"
+msgstr "Teteje"
+
+#: gitk:8571
+msgid "From"
+msgstr "Innen"
+
+#: gitk:8576
+msgid "To"
+msgstr "Ide"
+
+#: gitk:8600
+msgid "Generate patch"
+msgstr "Patch generálása"
+
+#: gitk:8602
+msgid "From:"
+msgstr "Innen:"
+
+#: gitk:8611
+msgid "To:"
+msgstr "Ide:"
+
+#: gitk:8620
+msgid "Reverse"
+msgstr "Visszafele"
+
+#: gitk:8622 gitk:8807
+msgid "Output file:"
+msgstr "Kimeneti fájl:"
+
+#: gitk:8628
+msgid "Generate"
+msgstr "Generálás"
+
+#: gitk:8666
+msgid "Error creating patch:"
+msgstr "Hiba törtét a patch készítése közben:"
+
+#: gitk:8689 gitk:8795 gitk:8852
+msgid "ID:"
+msgstr "ID:"
+
+#: gitk:8698
+msgid "Tag name:"
+msgstr "Tag név:"
+
+#: gitk:8702 gitk:8861
+msgid "Create"
+msgstr "Létrehozás"
+
+#: gitk:8719
+msgid "No tag name specified"
+msgstr "A tag neve nincsen megadva"
+
+#: gitk:8723
+#, tcl-format
+msgid "Tag \"%s\" already exists"
+msgstr "%s Tag már létezik"
+
+#: gitk:8729
+msgid "Error creating tag:"
+msgstr "Hiba történt a tag létrehozása közben:"
+
+#: gitk:8804
+msgid "Command:"
+msgstr "Parancs:"
+
+#: gitk:8812
+msgid "Write"
+msgstr "Írás"
+
+#: gitk:8830
+msgid "Error writing commit:"
+msgstr "Hiba történt a commit írása közben:"
+
+#: gitk:8857
+msgid "Name:"
+msgstr "Név:"
+
+#: gitk:8880
+msgid "Please specify a name for the new branch"
+msgstr "Kérem adja meg a nevét az új branchhoz"
+
+#: gitk:8885
+#, tcl-format
+msgid "Branch '%s' already exists. Overwrite?"
+msgstr "%s branch már létezik. Felülírja?"
+
+#: gitk:8951
+#, tcl-format
+msgid "Commit %s is already included in branch %s -- really re-apply it?"
+msgstr ""
+"%s commit már benne van a %s branchban -- biztos hogy újra csinálja ?"
+"eintragen?"
+
+#: gitk:8956
+msgid "Cherry-picking"
+msgstr "Cherry-picking"
+
+#: gitk:8965
+#, tcl-format
+msgid ""
+"Cherry-pick failed because of local changes to file '%s'.\n"
+"Please commit, reset or stash your changes and try again."
+msgstr ""
+"Cherry-pick hiba történt lokális váltotások miatt a '%s' fájlban.\n"
+"Kérem commitolja, indítsa újra vagy rejtse el a változtatásait és próbálja "
+"újra."
+
+#: gitk:8971
+msgid ""
+"Cherry-pick failed because of merge conflict.\n"
+"Do you wish to run git citool to resolve it?"
+msgstr ""
+"Cherry-pick hiba történt merge konfliktus miatt.\n"
+"Kívánja futtatni a git citool-t a probléma megoldásához?"
+
+#: gitk:8987
+msgid "No changes committed"
+msgstr "Nincsen változás commitolva"
+
+#: gitk:9013
+msgid "Confirm reset"
+msgstr "Újraindítás megerősítése"
+
+#: gitk:9015
+#, tcl-format
+msgid "Reset branch %s to %s?"
+msgstr "Újraindítja a %s branchot %s-ig?"
+
+#: gitk:9017
+msgid "Reset type:"
+msgstr "Újraindítás típusa:"
+
+#: gitk:9020
+msgid "Soft: Leave working tree and index untouched"
+msgstr "Soft: Hagyd a working tree-t és az indexet érintetlenül"
+
+#: gitk:9023
+msgid "Mixed: Leave working tree untouched, reset index"
+msgstr "Kevert: Hagyd a working tree-t érintetlenül, töröld az indexet"
+
+#: gitk:9026
+msgid ""
+"Hard: Reset working tree and index\n"
+"(discard ALL local changes)"
+msgstr ""
+"Hard: Indítsd újra a working tree-t és az indexet\n"
+"(MINDEN lokális változás eldobása)"
+
+#: gitk:9043
+msgid "Resetting"
+msgstr "Újraindítás"
+
+#: gitk:9103
+msgid "Checking out"
+msgstr "Kivesz"
+
+#: gitk:9156
+msgid "Cannot delete the currently checked-out branch"
+msgstr "Nem lehet a jelenleg kivett branch-ot törölni"
+
+#: gitk:9162
+#, tcl-format
+msgid ""
+"The commits on branch %s aren't on any other branch.\n"
+"Really delete branch %s?"
+msgstr ""
+"A %s branchon található commit nem található meg semelyik másik branchon.\n"
+"Tényleg törli a %s branchot?"
+
+#: gitk:9193
+#, tcl-format
+msgid "Tags and heads: %s"
+msgstr "Tagek és headek: %s"
+
+#: gitk:9208
+msgid "Filter"
+msgstr "Szűrő"
+
+#: gitk:9503
+msgid ""
+"Error reading commit topology information; branch and preceding/following "
+"tag information will be incomplete."
+msgstr ""
+"Hiba történt a commit topológiai információ olvasása közben; branch ésa "
+"megelőző/következő információ nem lesz teljes."
+
+#: gitk:10489
+msgid "Tag"
+msgstr "Tag"
+
+#: gitk:10489
+msgid "Id"
+msgstr "Id"
+
+#: gitk:10539
+msgid "Gitk font chooser"
+msgstr "Gitk-betű kiválasztó"
+
+#: gitk:10556
+msgid "B"
+msgstr "F"
+
+#: gitk:10559
+msgid "I"
+msgstr "K"
+
+#: gitk:10677
+msgid "Gitk preferences"
+msgstr "Gitk beállítások"
+
+#: gitk:10679
+msgid "Commit list display options"
+msgstr "Commit lista kijelzési opciók"
+
+#: gitk:10682
+msgid "Maximum graph width (lines)"
+msgstr "Maximális grafikon szélesség (sorok)"
+
+#: gitk:10685
+#, tcl-format
+msgid "Maximum graph width (% of pane)"
+msgstr "Maximális grafikon szélesség (táble %-je)"
+
+#: gitk:10688
+msgid "Show local changes"
+msgstr "Mutasd a lokális változtatásokat"
+
+#: gitk:10691
+msgid "Auto-select SHA1"
+msgstr "SHA1 Automatikus kiválasztása"
+
+#: gitk:10694
+msgid "Hide remote refs"
+msgstr "A távoli refek elrejtése"
+
+#: gitk:10698
+msgid "Diff display options"
+msgstr "Diff kijelző opciók"
+
+#: gitk:10700
+msgid "Tab spacing"
+msgstr "Tab sorköz"
+
+#: gitk:10703
+msgid "Display nearby tags"
+msgstr "Szomszédos tagek kijelzése"
+
+#: gitk:10706
+msgid "Limit diffs to listed paths"
+msgstr "Korlátozott diffek a kilistázott útvonalakhoz"
+
+#: gitk:10709
+msgid "Support per-file encodings"
+msgstr "Fájlonkénti kódolás támgatása"
+
+#: gitk:10715 gitk:10804
+msgid "External diff tool"
+msgstr "Külső diff alkalmazás"
+
+#: gitk:10716
+msgid "Choose..."
+msgstr "Válaszd ..."
+
+#: gitk:10721
+msgid "General options"
+msgstr "Általános opciók"
+
+#: gitk:10724
+msgid "Use themed widgets"
+msgstr "Témázott vezérlők használata"
+
+#: gitk:10726
+msgid "(change requires restart)"
+msgstr "(a változás újraindítást igényel)"
+
+#: gitk:10728
+msgid "(currently unavailable)"
+msgstr "(jelenleg nem elérhető)"
+
+#: gitk:10732
+msgid "Colors: press to choose"
+msgstr "Színek: nyomja meg a kiválasztáshoz"
+
+#: gitk:10735
+msgid "Interface"
+msgstr "Interfész"
+
+#: gitk:10736
+msgid "interface"
+msgstr "interfész"
+
+#: gitk:10739
+msgid "Background"
+msgstr "Háttér"
+
+#: gitk:10740 gitk:10770
+msgid "background"
+msgstr "háttér"
+
+#: gitk:10743
+msgid "Foreground"
+msgstr "Előtér"
+
+#: gitk:10744
+msgid "foreground"
+msgstr "előtér"
+
+#: gitk:10747
+msgid "Diff: old lines"
+msgstr "Diff: régi sorok"
+
+#: gitk:10748
+msgid "diff old lines"
+msgstr "diff régi sorok"
+
+#: gitk:10752
+msgid "Diff: new lines"
+msgstr "Diff: új sorok"
+
+#: gitk:10753
+msgid "diff new lines"
+msgstr "diff - új sorok"
+
+#: gitk:10757
+msgid "Diff: hunk header"
+msgstr "Diff: nagy headerök"
+
+#: gitk:10759
+msgid "diff hunk header"
+msgstr "diff - nagy headerök"
+
+#: gitk:10763
+msgid "Marked line bg"
+msgstr "Megjelölt sor háttér"
+
+#: gitk:10765
+msgid "marked line background"
+msgstr "megjelölt sor háttér"
+
+#: gitk:10769
+msgid "Select bg"
+msgstr "Válasszon hátteret"
+
+#: gitk:10773
+msgid "Fonts: press to choose"
+msgstr "Betű: nyomja meg a kiválasztáshoz"
+
+#: gitk:10775
+msgid "Main font"
+msgstr "Fő betű"
+
+#: gitk:10776
+msgid "Diff display font"
+msgstr "Diff kijelző betű"
+
+#: gitk:10777
+msgid "User interface font"
+msgstr "Felhasználói interfész betű"
+
+#: gitk:10814
+#, tcl-format
+msgid "Gitk: choose color for %s"
+msgstr "Gitk: válasszon színt a %s-ra"
+
+#: gitk:11418
+msgid "Cannot find a git repository here."
+msgstr "Nem találhatü git repository itt."
+
+#: gitk:11422
+#, tcl-format
+msgid "Cannot find the git directory \"%s\"."
+msgstr "Nem található a \"%s\" könyvtár."
+
+#: gitk:11469
+#, tcl-format
+msgid "Ambiguous argument '%s': both revision and filename"
+msgstr "Félreérthető argumentum '%s': revízió és fájlnév is"
+
+#: gitk:11481
+msgid "Bad arguments to gitk:"
+msgstr "Rossz gitk argumentumok:"
+
+#: gitk:11572
+msgid "Command line"
+msgstr "Parancs sor"
+
+#~ msgid "Use all refs"
+#~ msgstr "Használd az összes referenciát"
+
+#~ msgid "Max count:"
+#~ msgstr "Max. szám:"
+
+#~ msgid "Skip:"
+#~ msgstr "Kihagy:"
+
+#~ msgid "Name"
+#~ msgstr "Név"
+
+#~ msgid "Tag/Head %s is not known"
+#~ msgstr "Tag/Head %s nem ismert"
+
+#~ msgid "- stopping\n"
+#~ msgstr "- abbahagyás.\n"
+
+#~ msgid ""
+#~ "Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+#~ " Gitk requires at least Tcl/Tk 8.4."
+#~ msgstr ""
+#~ "Sajnáljuk, de a gitk nem futtatható ezzel a Tcl/Tk verzióval.\n"
+#~ "Gitk futtatásához legalább Tcl/Tk 8.4 szükséges."
diff --git a/gitk-git/po/it.po b/gitk-git/po/it.po
index e89c95702c..4818652309 100644
--- a/gitk-git/po/it.po
+++ b/gitk-git/po/it.po
@@ -8,25 +8,33 @@ msgid ""
msgstr ""
"Project-Id-Version: gitk\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-18 22:03+1100\n"
-"PO-Revision-Date: 2008-03-13 17:34+0100\n"
+"POT-Creation-Date: 2010-01-28 18:40+0100\n"
+"PO-Revision-Date: 2010-01-28 18:41+0100\n"
"Last-Translator: Michele Ballabio <barra_cuda@katamail.com>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gitk:113
+#: gitk:115
msgid "Couldn't get list of unmerged files:"
msgstr "Impossibile ottenere l'elenco dei file in attesa di fusione:"
-#: gitk:340
+#: gitk:274
+msgid "Error parsing revisions:"
+msgstr "Errore nella lettura delle revisioni:"
+
+#: gitk:329
+msgid "Error executing --argscmd command:"
+msgstr "Errore nell'esecuzione del comando specificato con --argscmd:"
+
+#: gitk:342
msgid "No files selected: --merge specified but no files are unmerged."
msgstr ""
"Nessun file selezionato: è stata specificata l'opzione --merge ma non ci "
"sono file in attesa di fusione."
-#: gitk:343
+#: gitk:345
msgid ""
"No files selected: --merge specified but no unmerged files are within file "
"limit."
@@ -34,688 +42,994 @@ msgstr ""
"Nessun file selezionato: è stata specificata l'opzione --merge ma i file "
"specificati non sono in attesa di fusione."
-#: gitk:365 gitk:503
+#: gitk:367 gitk:514
msgid "Error executing git log:"
msgstr "Errore nell'esecuzione di git log:"
-#: gitk:378
+#: gitk:385 gitk:530
msgid "Reading"
msgstr "Lettura in corso"
-#: gitk:438 gitk:3462
+#: gitk:445 gitk:4261
msgid "Reading commits..."
msgstr "Lettura delle revisioni in corso..."
-#: gitk:441 gitk:1528 gitk:3465
+#: gitk:448 gitk:1578 gitk:4264
msgid "No commits selected"
msgstr "Nessuna revisione selezionata"
-#: gitk:1399
+#: gitk:1454
msgid "Can't parse git log output:"
msgstr "Impossibile elaborare i dati di git log:"
-#: gitk:1605
+#: gitk:1674
msgid "No commit information available"
msgstr "Nessuna informazione disponibile sulle revisioni"
-#: gitk:1709 gitk:1731 gitk:3259 gitk:7764 gitk:9293 gitk:9466
+#: gitk:1816
+msgid "mc"
+msgstr ""
+
+#: gitk:1851 gitk:4054 gitk:9044 gitk:10585 gitk:10804
msgid "OK"
msgstr "OK"
-#: gitk:1733 gitk:3260 gitk:7439 gitk:7510 gitk:7613 gitk:7660 gitk:7766
-#: gitk:9294 gitk:9467
+#: gitk:1853 gitk:4056 gitk:8634 gitk:8713 gitk:8828 gitk:8877 gitk:9046
+#: gitk:10586 gitk:10805
msgid "Cancel"
msgstr "Annulla"
-#: gitk:1811
+#: gitk:1975
msgid "Update"
msgstr "Aggiorna"
-#: gitk:1813
+#: gitk:1976
+msgid "Reload"
+msgstr "Ricarica"
+
+#: gitk:1977
msgid "Reread references"
msgstr "Rileggi riferimenti"
-#: gitk:1814
+#: gitk:1978
msgid "List references"
msgstr "Elenca riferimenti"
-#: gitk:1815
+#: gitk:1980
+msgid "Start git gui"
+msgstr "Avvia git gui"
+
+#: gitk:1982
msgid "Quit"
msgstr "Esci"
-#: gitk:1810
+#: gitk:1974
msgid "File"
msgstr "File"
-#: gitk:1818
+#: gitk:1986
msgid "Preferences"
msgstr "Preferenze"
-#: gitk:1817
+#: gitk:1985
msgid "Edit"
msgstr "Modifica"
-#: gitk:1821
+#: gitk:1990
msgid "New view..."
msgstr "Nuova vista..."
-#: gitk:1822
+#: gitk:1991
msgid "Edit view..."
msgstr "Modifica vista..."
-#: gitk:1823
+#: gitk:1992
msgid "Delete view"
msgstr "Elimina vista"
-#: gitk:1825
+#: gitk:1994
msgid "All files"
msgstr "Tutti i file"
-#: gitk:1820 gitk:3196
+#: gitk:1989 gitk:3808
msgid "View"
msgstr "Vista"
-#: gitk:1828 gitk:2487
+#: gitk:1999 gitk:2009 gitk:2780
msgid "About gitk"
msgstr "Informazioni su gitk"
-#: gitk:1829
+#: gitk:2000 gitk:2014
msgid "Key bindings"
msgstr "Scorciatoie da tastiera"
-#: gitk:1827
+#: gitk:1998 gitk:2013
msgid "Help"
msgstr "Aiuto"
-#: gitk:1887
-msgid "SHA1 ID: "
-msgstr "SHA1 ID: "
+#: gitk:2091 gitk:8110
+msgid "SHA1 ID:"
+msgstr "SHA1 ID:"
-#: gitk:1918
+#: gitk:2122
msgid "Row"
-msgstr ""
+msgstr "Riga"
-#: gitk:1949
+#: gitk:2160
msgid "Find"
msgstr "Trova"
-#: gitk:1950
+#: gitk:2161
msgid "next"
msgstr "succ"
-#: gitk:1951
+#: gitk:2162
msgid "prev"
msgstr "prec"
-#: gitk:1952
+#: gitk:2163
msgid "commit"
msgstr "revisione"
-#: gitk:1955 gitk:1957 gitk:3617 gitk:3640 gitk:3664 gitk:5550 gitk:5621
+#: gitk:2166 gitk:2168 gitk:4422 gitk:4445 gitk:4469 gitk:6410 gitk:6482
+#: gitk:6566
msgid "containing:"
msgstr "contenente:"
-#: gitk:1958 gitk:2954 gitk:2959 gitk:3692
+#: gitk:2169 gitk:3290 gitk:3295 gitk:4497
msgid "touching paths:"
msgstr "che riguarda i percorsi:"
-#: gitk:1959 gitk:3697
+#: gitk:2170 gitk:4502
msgid "adding/removing string:"
msgstr "che aggiunge/rimuove la stringa:"
-#: gitk:1968 gitk:1970
+#: gitk:2179 gitk:2181
msgid "Exact"
msgstr "Esatto"
-#: gitk:1970 gitk:3773 gitk:5518
+#: gitk:2181 gitk:4577 gitk:6378
msgid "IgnCase"
msgstr ""
-#: gitk:1970 gitk:3666 gitk:3771 gitk:5514
+#: gitk:2181 gitk:4471 gitk:4575 gitk:6374
msgid "Regexp"
msgstr ""
-#: gitk:1972 gitk:1973 gitk:3792 gitk:3822 gitk:3829 gitk:5641 gitk:5708
+#: gitk:2183 gitk:2184 gitk:4596 gitk:4626 gitk:4633 gitk:6502 gitk:6570
msgid "All fields"
msgstr "Tutti i campi"
-#: gitk:1973 gitk:3790 gitk:3822 gitk:5580
+#: gitk:2184 gitk:4594 gitk:4626 gitk:6441
msgid "Headline"
msgstr "Titolo"
-#: gitk:1974 gitk:3790 gitk:5580 gitk:5708 gitk:6109
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6570 gitk:7003
msgid "Comments"
msgstr "Commenti"
-#: gitk:1974 gitk:3790 gitk:3794 gitk:3829 gitk:5580 gitk:6045 gitk:7285
-#: gitk:7300
+#: gitk:2185 gitk:4594 gitk:4598 gitk:4633 gitk:6441 gitk:6938 gitk:8285
+#: gitk:8300
msgid "Author"
msgstr "Autore"
-#: gitk:1974 gitk:3790 gitk:5580 gitk:6047
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6940
msgid "Committer"
msgstr "Revisione creata da"
-#: gitk:2003
+#: gitk:2216
msgid "Search"
msgstr "Cerca"
-#: gitk:2010
+#: gitk:2224
msgid "Diff"
msgstr ""
-#: gitk:2012
+#: gitk:2226
msgid "Old version"
msgstr "Vecchia versione"
-#: gitk:2014
+#: gitk:2228
msgid "New version"
msgstr "Nuova versione"
-#: gitk:2016
+#: gitk:2230
msgid "Lines of context"
msgstr "Linee di contesto"
-#: gitk:2026
+#: gitk:2240
msgid "Ignore space change"
msgstr "Ignora modifiche agli spazi"
-#: gitk:2084
+#: gitk:2299
msgid "Patch"
msgstr "Modifiche"
-#: gitk:2086
+#: gitk:2301
msgid "Tree"
msgstr "Directory"
-#: gitk:2213 gitk:2226
+#: gitk:2456 gitk:2473
msgid "Diff this -> selected"
msgstr "Diff questo -> selezionato"
-#: gitk:2214 gitk:2227
+#: gitk:2457 gitk:2474
msgid "Diff selected -> this"
msgstr "Diff selezionato -> questo"
-#: gitk:2215 gitk:2228
+#: gitk:2458 gitk:2475
msgid "Make patch"
msgstr "Crea patch"
-#: gitk:2216 gitk:7494
+#: gitk:2459 gitk:8692
msgid "Create tag"
msgstr "Crea etichetta"
-#: gitk:2217 gitk:7593
+#: gitk:2460 gitk:8808
msgid "Write commit to file"
msgstr "Scrivi revisione in un file"
-#: gitk:2218 gitk:7647
+#: gitk:2461 gitk:8865
msgid "Create new branch"
msgstr "Crea un nuovo ramo"
-#: gitk:2219
+#: gitk:2462
msgid "Cherry-pick this commit"
msgstr "Porta questa revisione in cima al ramo attuale"
-#: gitk:2220
+#: gitk:2463
msgid "Reset HEAD branch to here"
msgstr "Aggiorna il ramo HEAD a questa revisione"
-#: gitk:2234
+#: gitk:2464
+msgid "Mark this commit"
+msgstr "Segna questa revisione"
+
+#: gitk:2465
+msgid "Return to mark"
+msgstr "Torna alla revisione segnata"
+
+#: gitk:2466
+msgid "Find descendant of this and mark"
+msgstr "Trova il discendente di questa revisione e di quella segnata"
+
+#: gitk:2467
+msgid "Compare with marked commit"
+msgstr "Confronta con la revisione segnata"
+
+#: gitk:2481
msgid "Check out this branch"
msgstr "Attiva questo ramo"
-#: gitk:2235
+#: gitk:2482
msgid "Remove this branch"
msgstr "Elimina questo ramo"
-#: gitk:2242
+#: gitk:2489
msgid "Highlight this too"
msgstr "Evidenzia anche questo"
-#: gitk:2243
+#: gitk:2490
msgid "Highlight this only"
msgstr "Evidenzia solo questo"
-#: gitk:2245
+#: gitk:2491
+msgid "External diff"
+msgstr "Visualizza differenze in un altro programma"
+
+#: gitk:2492
msgid "Blame parent commit"
-msgstr ""
+msgstr "Annota la revisione precedente"
+
+#: gitk:2499
+msgid "Show origin of this line"
+msgstr "Mostra la provenienza di questa riga"
-#: gitk:2488
+#: gitk:2500
+msgid "Run git gui blame on this line"
+msgstr "Esegui git gui blame su questa riga"
+
+#: gitk:2782
msgid ""
"\n"
"Gitk - a commit viewer for git\n"
"\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright © 2005-2009 Paul Mackerras\n"
"\n"
"Use and redistribute under the terms of the GNU General Public License"
msgstr ""
"\n"
"Gitk - un visualizzatore di revisioni per git\n"
"\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright © 2005-2009 Paul Mackerras\n"
"\n"
"Utilizzo e redistribuzione permessi sotto i termini della GNU General Public "
"License"
-#: gitk:2496 gitk:2557 gitk:7943
+#: gitk:2790 gitk:2854 gitk:9230
msgid "Close"
msgstr "Chiudi"
-#: gitk:2515
+#: gitk:2811
msgid "Gitk key bindings"
msgstr "Scorciatoie da tastiera di Gitk"
-#: gitk:2517
+#: gitk:2814
msgid "Gitk key bindings:"
msgstr "Scorciatoie da tastiera di Gitk:"
-#: gitk:2519
+#: gitk:2816
#, tcl-format
msgid "<%s-Q>\t\tQuit"
msgstr "<%s-Q>\t\tEsci"
-#: gitk:2520
+#: gitk:2817
msgid "<Home>\t\tMove to first commit"
msgstr "<Home>\t\tVai alla prima revisione"
-#: gitk:2521
+#: gitk:2818
msgid "<End>\t\tMove to last commit"
msgstr "<End>\t\tVai all'ultima revisione"
-#: gitk:2522
+#: gitk:2819
msgid "<Up>, p, i\tMove up one commit"
-msgstr "<Up>, p, i\tVai più in alto di una revisione"
+msgstr "<Su>, p, i\tVai più in alto di una revisione"
-#: gitk:2523
+#: gitk:2820
msgid "<Down>, n, k\tMove down one commit"
-msgstr "<Down>, n, k\tVai più in basso di una revisione"
+msgstr "<Giù>, n, k\tVai più in basso di una revisione"
-#: gitk:2524
+#: gitk:2821
msgid "<Left>, z, j\tGo back in history list"
-msgstr "<Left>, z, j\tTorna indietro nella cronologia"
+msgstr "<Sinistra>, z, j\tTorna indietro nella cronologia"
-#: gitk:2525
+#: gitk:2822
msgid "<Right>, x, l\tGo forward in history list"
-msgstr "<Right>, x, l\tVai avanti nella cronologia"
+msgstr "<Destra>, x, l\tVai avanti nella cronologia"
-#: gitk:2526
+#: gitk:2823
msgid "<PageUp>\tMove up one page in commit list"
-msgstr "<PageUp>\tVai più in alto di una pagina nella lista delle revisioni"
+msgstr "<PaginaSu>\tVai più in alto di una pagina nella lista delle revisioni"
-#: gitk:2527
+#: gitk:2824
msgid "<PageDown>\tMove down one page in commit list"
-msgstr "<PageDown>\tVai più in basso di una pagina nella lista delle revisioni"
+msgstr ""
+"<PaginaGiù>\tVai più in basso di una pagina nella lista delle revisioni"
-#: gitk:2528
+#: gitk:2825
#, tcl-format
msgid "<%s-Home>\tScroll to top of commit list"
msgstr "<%s-Home>\tScorri alla cima della lista delle revisioni"
-#: gitk:2529
+#: gitk:2826
#, tcl-format
msgid "<%s-End>\tScroll to bottom of commit list"
msgstr "<%s-End>\tScorri alla fine della lista delle revisioni"
-#: gitk:2530
+#: gitk:2827
#, tcl-format
msgid "<%s-Up>\tScroll commit list up one line"
-msgstr "<%s-Up>\tScorri la lista delle revisioni in alto di una riga"
+msgstr "<%s-Su>\tScorri la lista delle revisioni in alto di una riga"
-#: gitk:2531
+#: gitk:2828
#, tcl-format
msgid "<%s-Down>\tScroll commit list down one line"
-msgstr "<%s-Down>\tScorri la lista delle revisioni in basso di una riga"
+msgstr "<%s-Giù>\tScorri la lista delle revisioni in basso di una riga"
-#: gitk:2532
+#: gitk:2829
#, tcl-format
msgid "<%s-PageUp>\tScroll commit list up one page"
-msgstr "<%s-PageUp>\tScorri la lista delle revisioni in alto di una pagina"
+msgstr "<%s-PaginaSu>\tScorri la lista delle revisioni in alto di una pagina"
-#: gitk:2533
+#: gitk:2830
#, tcl-format
msgid "<%s-PageDown>\tScroll commit list down one page"
-msgstr "<%s-PageDown>\tScorri la lista delle revisioni in basso di una pagina"
+msgstr "<%s-PaginaGiù>\tScorri la lista delle revisioni in basso di una pagina"
-#: gitk:2534
+#: gitk:2831
msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
-msgstr "<Shift-Up>\tTrova all'indietro (verso l'alto, revisioni successive)"
+msgstr "<Shift-Su>\tTrova all'indietro (verso l'alto, revisioni successive)"
-#: gitk:2535
+#: gitk:2832
msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
-msgstr "<Shift-Down>\tTrova in avanti (verso il basso, revisioni precedenti)"
+msgstr "<Shift-Giù>\tTrova in avanti (verso il basso, revisioni precedenti)"
-#: gitk:2536
+#: gitk:2833
msgid "<Delete>, b\tScroll diff view up one page"
msgstr "<Delete>, b\tScorri la vista delle differenze in alto di una pagina"
-#: gitk:2537
+#: gitk:2834
msgid "<Backspace>\tScroll diff view up one page"
msgstr "<Backspace>\tScorri la vista delle differenze in alto di una pagina"
-#: gitk:2538
+#: gitk:2835
msgid "<Space>\t\tScroll diff view down one page"
-msgstr "<Space>\t\tScorri la vista delle differenze in basso di una pagina"
+msgstr "<Spazio>\t\tScorri la vista delle differenze in basso di una pagina"
-#: gitk:2539
+#: gitk:2836
msgid "u\t\tScroll diff view up 18 lines"
msgstr "u\t\tScorri la vista delle differenze in alto di 18 linee"
-#: gitk:2540
+#: gitk:2837
msgid "d\t\tScroll diff view down 18 lines"
msgstr "d\t\tScorri la vista delle differenze in basso di 18 linee"
-#: gitk:2541
+#: gitk:2838
#, tcl-format
msgid "<%s-F>\t\tFind"
msgstr "<%s-F>\t\tTrova"
-#: gitk:2542
+#: gitk:2839
#, tcl-format
msgid "<%s-G>\t\tMove to next find hit"
msgstr "<%s-G>\t\tTrova in avanti"
-#: gitk:2543
+#: gitk:2840
msgid "<Return>\tMove to next find hit"
-msgstr "<Return>\tTrova in avanti"
+msgstr "<Invio>\tTrova in avanti"
-#: gitk:2544
-msgid "/\t\tMove to next find hit, or redo find"
-msgstr "/\t\tTrova in avanti, o cerca di nuovo"
+#: gitk:2841
+msgid "/\t\tFocus the search box"
+msgstr "/\t\tCursore nel box di ricerca"
-#: gitk:2545
+#: gitk:2842
msgid "?\t\tMove to previous find hit"
msgstr "?\t\tTrova all'indietro"
-#: gitk:2546
+#: gitk:2843
msgid "f\t\tScroll diff view to next file"
msgstr "f\t\tScorri la vista delle differenze al file successivo"
-#: gitk:2547
+#: gitk:2844
#, tcl-format
msgid "<%s-S>\t\tSearch for next hit in diff view"
msgstr "<%s-S>\t\tCerca in avanti nella vista delle differenze"
-#: gitk:2548
+#: gitk:2845
#, tcl-format
msgid "<%s-R>\t\tSearch for previous hit in diff view"
msgstr "<%s-R>\t\tCerca all'indietro nella vista delle differenze"
-#: gitk:2549
+#: gitk:2846
#, tcl-format
msgid "<%s-KP+>\tIncrease font size"
-msgstr "<%s-KP+>\tAumenta grandezza carattere"
+msgstr "<%s-KP+>\tAumenta dimensione carattere"
-#: gitk:2550
+#: gitk:2847
#, tcl-format
msgid "<%s-plus>\tIncrease font size"
-msgstr "<%s-plus>\tAumenta grandezza carattere"
+msgstr "<%s-più>\tAumenta dimensione carattere"
-#: gitk:2551
+#: gitk:2848
#, tcl-format
msgid "<%s-KP->\tDecrease font size"
-msgstr "<%s-KP->\tDiminuisci grandezza carattere"
+msgstr "<%s-KP->\tDiminuisci dimensione carattere"
-#: gitk:2552
+#: gitk:2849
#, tcl-format
msgid "<%s-minus>\tDecrease font size"
-msgstr "<%s-minus>\tDiminuisci grandezza carattere"
+msgstr "<%s-meno>\tDiminuisci dimensione carattere"
-#: gitk:2553
+#: gitk:2850
msgid "<F5>\t\tUpdate"
msgstr "<F5>\t\tAggiorna"
-#: gitk:3200
+#: gitk:3305 gitk:3314
+#, tcl-format
+msgid "Error creating temporary directory %s:"
+msgstr "Errore durante la creazione della directory temporanea %s:"
+
+#: gitk:3327
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Errore nella lettura di \"%s\" da %s:"
+
+#: gitk:3390
+msgid "command failed:"
+msgstr "impossibile eseguire il comando:"
+
+#: gitk:3539
+msgid "No such commit"
+msgstr "Revisione inesistente"
+
+#: gitk:3553
+msgid "git gui blame: command failed:"
+msgstr "git gui blame: impossibile eseguire il comando:"
+
+#: gitk:3584
+#, tcl-format
+msgid "Couldn't read merge head: %s"
+msgstr "Impossibile leggere merge head: %s"
+
+#: gitk:3592
+#, tcl-format
+msgid "Error reading index: %s"
+msgstr "Errore nella lettura dell'indice: %s"
+
+#: gitk:3617
+#, tcl-format
+msgid "Couldn't start git blame: %s"
+msgstr "Impossibile eseguire git blame: %s"
+
+#: gitk:3620 gitk:6409
+msgid "Searching"
+msgstr "Ricerca in corso"
+
+#: gitk:3652
+#, tcl-format
+msgid "Error running git blame: %s"
+msgstr "Errore nell'esecuzione di git blame: %s"
+
+#: gitk:3680
+#, tcl-format
+msgid "That line comes from commit %s, which is not in this view"
+msgstr "Quella riga proviene dalla revisione %s, non presente in questa vista"
+
+#: gitk:3694
+msgid "External diff viewer failed:"
+msgstr "Impossibile eseguire il visualizzatore di differenze:"
+
+#: gitk:3812
msgid "Gitk view definition"
msgstr "Scelta vista Gitk"
-#: gitk:3225
-msgid "Name"
-msgstr "Nome"
-
-#: gitk:3228
+#: gitk:3816
msgid "Remember this view"
msgstr "Ricorda questa vista"
-#: gitk:3232
-msgid "Commits to include (arguments to git log):"
-msgstr "Revisioni da includere (argomenti di git log):"
+#: gitk:3817
+msgid "References (space separated list):"
+msgstr "Riferimenti (lista di elementi separati da spazi)"
-#: gitk:3239
-msgid "Command to generate more commits to include:"
-msgstr "Comando che genera altre revisioni da visualizzare:"
+#: gitk:3818
+msgid "Branches & tags:"
+msgstr "Rami ed etichette"
+
+#: gitk:3819
+msgid "All refs"
+msgstr "Tutti i riferimenti"
+
+#: gitk:3820
+msgid "All (local) branches"
+msgstr "Tutti i rami (locali)"
+
+#: gitk:3821
+msgid "All tags"
+msgstr "Tutte le etichette"
+
+#: gitk:3822
+msgid "All remote-tracking branches"
+msgstr "Tutti i rami remoti"
+
+#: gitk:3823
+msgid "Commit Info (regular expressions):"
+msgstr "Informazioni sulla revisione (espressioni regolari):"
+
+#: gitk:3824
+msgid "Author:"
+msgstr "Autore:"
+
+#: gitk:3825
+msgid "Committer:"
+msgstr "Revisione creata da:"
+
+#: gitk:3826
+msgid "Commit Message:"
+msgstr "Messaggio di revisione:"
+
+#: gitk:3827
+msgid "Matches all Commit Info criteria"
+msgstr "Risponde a tutti i criteri di ricerca sulle revisioni"
+
+#: gitk:3828
+msgid "Changes to Files:"
+msgstr "Modifiche ai file:"
+
+#: gitk:3829
+msgid "Fixed String"
+msgstr "Stringa fissa"
+
+#: gitk:3830
+msgid "Regular Expression"
+msgstr "Espressione regolare"
+
+#: gitk:3831
+msgid "Search string:"
+msgstr "Cerca stringa:"
+
+#: gitk:3832
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr ""
+"Date di revisione (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, "
+"2009 15:27:38\"):"
+
+#: gitk:3833
+msgid "Since:"
+msgstr "Da:"
+
+#: gitk:3834
+msgid "Until:"
+msgstr "A:"
+
+#: gitk:3835
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr "Limita e/o salta N revisioni (intero positivo):"
+
+#: gitk:3836
+msgid "Number to show:"
+msgstr "Numero di revisioni da mostrare:"
+
+#: gitk:3837
+msgid "Number to skip:"
+msgstr "Numero di revisioni da saltare:"
+
+#: gitk:3838
+msgid "Miscellaneous options:"
+msgstr "Altre opzioni:"
+
+#: gitk:3839
+msgid "Strictly sort by date"
+msgstr "Ordina solo per data"
+
+#: gitk:3840
+msgid "Mark branch sides"
+msgstr "Segna i lati del ramo"
+
+#: gitk:3841
+msgid "Limit to first parent"
+msgstr "Limita al primo genitore"
-#: gitk:3246
+#: gitk:3842
+msgid "Simple history"
+msgstr "Cronologia semplificata"
+
+#: gitk:3843
+msgid "Additional arguments to git log:"
+msgstr "Ulteriori argomenti da passare a git log:"
+
+#: gitk:3844
msgid "Enter files and directories to include, one per line:"
msgstr "Inserire file e directory da includere, uno per riga:"
-#: gitk:3293
+#: gitk:3845
+msgid "Command to generate more commits to include:"
+msgstr "Comando che genera altre revisioni da visualizzare:"
+
+#: gitk:3967
+msgid "Gitk: edit view"
+msgstr "Gitk: modifica vista"
+
+#: gitk:3975
+msgid "-- criteria for selecting revisions"
+msgstr "-- criteri per la scelta delle revisioni"
+
+#: gitk:3980
+msgid "View Name"
+msgstr "Nome vista"
+
+#: gitk:4055
+msgid "Apply (F5)"
+msgstr "Applica (F5)"
+
+#: gitk:4093
msgid "Error in commit selection arguments:"
msgstr "Errore negli argomenti di selezione delle revisioni:"
-#: gitk:3347 gitk:3399 gitk:3842 gitk:3856 gitk:5060 gitk:10141 gitk:10142
+#: gitk:4146 gitk:4198 gitk:4646 gitk:4660 gitk:5921 gitk:11534 gitk:11535
msgid "None"
msgstr "Nessuno"
-#: gitk:3790 gitk:5580 gitk:7287 gitk:7302
+#: gitk:4594 gitk:6441 gitk:8287 gitk:8302
msgid "Date"
msgstr "Data"
-#: gitk:3790 gitk:5580
+#: gitk:4594 gitk:6441
msgid "CDate"
msgstr ""
-#: gitk:3939 gitk:3944
+#: gitk:4743 gitk:4748
msgid "Descendant"
msgstr "Discendente"
-#: gitk:3940
+#: gitk:4744
msgid "Not descendant"
msgstr "Non discendente"
-#: gitk:3947 gitk:3952
+#: gitk:4751 gitk:4756
msgid "Ancestor"
msgstr "Ascendente"
-#: gitk:3948
+#: gitk:4752
msgid "Not ancestor"
msgstr "Non ascendente"
-#: gitk:4187
+#: gitk:5042
msgid "Local changes checked in to index but not committed"
msgstr "Modifiche locali presenti nell'indice ma non nell'archivio"
-#: gitk:4220
+#: gitk:5078
msgid "Local uncommitted changes, not checked in to index"
msgstr "Modifiche locali non presenti né nell'archivio né nell'indice"
-#: gitk:5549
-msgid "Searching"
-msgstr "Ricerca in corso"
+#: gitk:6759
+msgid "many"
+msgstr "molti"
-#: gitk:6049
+#: gitk:6942
msgid "Tags:"
msgstr "Etichette:"
-#: gitk:6066 gitk:6072 gitk:7280
+#: gitk:6959 gitk:6965 gitk:8280
msgid "Parent"
msgstr "Genitore"
-#: gitk:6077
+#: gitk:6970
msgid "Child"
msgstr "Figlio"
-#: gitk:6086
+#: gitk:6979
msgid "Branch"
msgstr "Ramo"
-#: gitk:6089
+#: gitk:6982
msgid "Follows"
msgstr "Segue"
-#: gitk:6092
+#: gitk:6985
msgid "Precedes"
msgstr "Precede"
-#: gitk:6378
-msgid "Error getting merge diffs:"
-msgstr "Errore nella lettura delle differenze di fusione:"
+#: gitk:7522
+#, tcl-format
+msgid "Error getting diffs: %s"
+msgstr "Errore nella lettura delle differenze:"
-#: gitk:7113
+#: gitk:8108
msgid "Goto:"
msgstr "Vai a:"
-#: gitk:7115
-msgid "SHA1 ID:"
-msgstr "SHA1 ID:"
-
-#: gitk:7134
+#: gitk:8129
#, tcl-format
msgid "Short SHA1 id %s is ambiguous"
msgstr "La SHA1 id abbreviata %s è ambigua"
-#: gitk:7146
+#: gitk:8136
+#, tcl-format
+msgid "Revision %s is not known"
+msgstr "La revisione %s è sconosciuta"
+
+#: gitk:8146
#, tcl-format
msgid "SHA1 id %s is not known"
msgstr "La SHA1 id %s è sconosciuta"
-#: gitk:7148
+#: gitk:8148
#, tcl-format
-msgid "Tag/Head %s is not known"
-msgstr "L'etichetta/ramo %s è sconosciuto"
+msgid "Revision %s is not in the current view"
+msgstr "La revisione %s non è presente nella vista attuale"
-#: gitk:7290
+#: gitk:8290
msgid "Children"
msgstr "Figli"
-#: gitk:7347
+#: gitk:8348
#, tcl-format
msgid "Reset %s branch to here"
msgstr "Aggiorna il ramo %s a questa revisione"
-#: gitk:7349
+#: gitk:8350
msgid "Detached head: can't reset"
+msgstr "Nessun ramo attivo: reset impossibile"
+
+#: gitk:8459 gitk:8465
+msgid "Skipping merge commit "
+msgstr "Salto la revisione di fusione "
+
+#: gitk:8474 gitk:8479
+msgid "Error getting patch ID for "
+msgstr "Errore nella identificazione della patch per "
+
+#: gitk:8475 gitk:8480
+msgid " - stopping\n"
+msgstr " - fine\n"
+
+#: gitk:8485 gitk:8488 gitk:8496 gitk:8510 gitk:8519
+msgid "Commit "
+msgstr "La revisione "
+
+#: gitk:8489
+msgid ""
+" is the same patch as\n"
+" "
msgstr ""
+" ha le stesse differenze di\n"
+" "
+
+#: gitk:8497
+msgid ""
+" differs from\n"
+" "
+msgstr ""
+" è diversa da\n"
+" "
+
+#: gitk:8499
+msgid ""
+"Diff of commits:\n"
+"\n"
+msgstr ""
+"Differenze tra le revisioni:\n"
+"\n"
+
+#: gitk:8511 gitk:8520
+#, tcl-format
+msgid " has %s children - stopping\n"
+msgstr " ha %s figli - fine\n"
+
+#: gitk:8539
+#, tcl-format
+msgid "Error writing commit to file: %s"
+msgstr "Errore nella scrittura della revisione nel file: %s"
-#: gitk:7381
+#: gitk:8545
+#, tcl-format
+msgid "Error diffing commits: %s"
+msgstr "Errore nelle differenze tra le revisioni: %s"
+
+#: gitk:8575
msgid "Top"
msgstr "Inizio"
-#: gitk:7382
+#: gitk:8576
msgid "From"
msgstr "Da"
-#: gitk:7387
+#: gitk:8581
msgid "To"
msgstr "A"
-#: gitk:7410
+#: gitk:8605
msgid "Generate patch"
msgstr "Genera patch"
-#: gitk:7412
+#: gitk:8607
msgid "From:"
msgstr "Da:"
-#: gitk:7421
+#: gitk:8616
msgid "To:"
msgstr "A:"
-#: gitk:7430
+#: gitk:8625
msgid "Reverse"
msgstr "Inverti"
-#: gitk:7432 gitk:7607
+#: gitk:8627 gitk:8822
msgid "Output file:"
msgstr "Scrivi sul file:"
-#: gitk:7438
+#: gitk:8633
msgid "Generate"
msgstr "Genera"
-#: gitk:7474
+#: gitk:8671
msgid "Error creating patch:"
msgstr "Errore nella creazione della patch:"
-#: gitk:7496 gitk:7595 gitk:7649
+#: gitk:8694 gitk:8810 gitk:8867
msgid "ID:"
msgstr "ID:"
-#: gitk:7505
+#: gitk:8703
msgid "Tag name:"
msgstr "Nome etichetta:"
-#: gitk:7509 gitk:7659
+#: gitk:8706
+msgid "Tag message is optional"
+msgstr "Il messaggio dell'etichetta è opzionale"
+
+#: gitk:8708
+msgid "Tag message:"
+msgstr "Messaggio dell'etichetta:"
+
+#: gitk:8712 gitk:8876
msgid "Create"
msgstr "Crea"
-#: gitk:7524
+#: gitk:8730
msgid "No tag name specified"
msgstr "Nessuna etichetta specificata"
-#: gitk:7528
+#: gitk:8734
#, tcl-format
msgid "Tag \"%s\" already exists"
msgstr "L'etichetta \"%s\" esiste già"
-#: gitk:7534
+#: gitk:8744
msgid "Error creating tag:"
msgstr "Errore nella creazione dell'etichetta:"
-#: gitk:7604
+#: gitk:8819
msgid "Command:"
msgstr "Comando:"
-#: gitk:7612
+#: gitk:8827
msgid "Write"
msgstr "Scrivi"
-#: gitk:7628
+#: gitk:8845
msgid "Error writing commit:"
msgstr "Errore nella scrittura della revisione:"
-#: gitk:7654
+#: gitk:8872
msgid "Name:"
msgstr "Nome:"
-#: gitk:7674
+#: gitk:8895
msgid "Please specify a name for the new branch"
msgstr "Specificare un nome per il nuovo ramo"
-#: gitk:7703
+#: gitk:8900
+#, tcl-format
+msgid "Branch '%s' already exists. Overwrite?"
+msgstr "Il ramo '%s' esiste già. Sovrascrivere?"
+
+#: gitk:8966
#, tcl-format
msgid "Commit %s is already included in branch %s -- really re-apply it?"
msgstr "La revisione %s è già inclusa nel ramo %s -- applicarla di nuovo?"
-#: gitk:7708
+#: gitk:8971
msgid "Cherry-picking"
msgstr ""
-#: gitk:7720
+#: gitk:8980
+#, tcl-format
+msgid ""
+"Cherry-pick failed because of local changes to file '%s'.\n"
+"Please commit, reset or stash your changes and try again."
+msgstr ""
+"Impossibile eseguire cherry-pick perché il file '%s' è stato modificato "
+"nella directory di lavoro.\n"
+"Prima di riprovare, bisogna creare una nuova revisione, annullare le "
+"modifiche o usare 'git stash'."
+
+#: gitk:8986
+msgid ""
+"Cherry-pick failed because of merge conflict.\n"
+"Do you wish to run git citool to resolve it?"
+msgstr ""
+"Impossibile eseguire cherry-pick a causa di un conflitto nella fusione.\n"
+"Vuoi avviare git citool per risolverlo?"
+
+#: gitk:9002
msgid "No changes committed"
msgstr "Nessuna modifica archiviata"
-#: gitk:7745
+#: gitk:9028
msgid "Confirm reset"
msgstr "Conferma git reset"
-#: gitk:7747
+#: gitk:9030
#, tcl-format
msgid "Reset branch %s to %s?"
msgstr "Aggiornare il ramo %s a %s?"
-#: gitk:7751
+#: gitk:9032
msgid "Reset type:"
msgstr "Tipo di aggiornamento:"
-#: gitk:7755
+#: gitk:9035
msgid "Soft: Leave working tree and index untouched"
msgstr "Soft: Lascia la direcory di lavoro e l'indice come sono"
-#: gitk:7758
+#: gitk:9038
msgid "Mixed: Leave working tree untouched, reset index"
msgstr "Mixed: Lascia la directory di lavoro come è, aggiorna l'indice"
-#: gitk:7761
+#: gitk:9041
msgid ""
"Hard: Reset working tree and index\n"
"(discard ALL local changes)"
@@ -723,19 +1037,19 @@ msgstr ""
"Hard: Aggiorna la directory di lavoro e l'indice\n"
"(abbandona TUTTE le modifiche locali)"
-#: gitk:7777
+#: gitk:9058
msgid "Resetting"
msgstr "git reset in corso"
-#: gitk:7834
+#: gitk:9118
msgid "Checking out"
msgstr "Attivazione in corso"
-#: gitk:7885
+#: gitk:9171
msgid "Cannot delete the currently checked-out branch"
msgstr "Impossibile cancellare il ramo attualmente attivo"
-#: gitk:7891
+#: gitk:9177
#, tcl-format
msgid ""
"The commits on branch %s aren't on any other branch.\n"
@@ -744,16 +1058,16 @@ msgstr ""
"Le revisioni nel ramo %s non sono presenti su altri rami.\n"
"Cancellare il ramo %s?"
-#: gitk:7922
+#: gitk:9208
#, tcl-format
msgid "Tags and heads: %s"
msgstr "Etichette e rami: %s"
-#: gitk:7936
+#: gitk:9223
msgid "Filter"
msgstr "Filtro"
-#: gitk:8230
+#: gitk:9518
msgid ""
"Error reading commit topology information; branch and preceding/following "
"tag information will be incomplete."
@@ -761,154 +1075,202 @@ msgstr ""
"Errore nella lettura della topologia delle revisioni: le informazioni sul "
"ramo e le etichette precedenti e seguenti saranno incomplete."
-#: gitk:9216
+#: gitk:10504
msgid "Tag"
msgstr "Etichetta"
-#: gitk:9216
+#: gitk:10504
msgid "Id"
msgstr "Id"
-#: gitk:9262
+#: gitk:10554
msgid "Gitk font chooser"
msgstr "Scelta caratteri gitk"
-#: gitk:9279
+#: gitk:10571
msgid "B"
msgstr "B"
-#: gitk:9282
+#: gitk:10574
msgid "I"
msgstr "I"
-#: gitk:9375
+#: gitk:10692
msgid "Gitk preferences"
msgstr "Preferenze gitk"
-#: gitk:9376
+#: gitk:10694
msgid "Commit list display options"
msgstr "Opzioni visualizzazione dell'elenco revisioni"
-#: gitk:9379
+#: gitk:10697
msgid "Maximum graph width (lines)"
msgstr "Larghezza massima del grafico (in linee)"
-#: gitk:9383
+#: gitk:10700
#, tcl-format
msgid "Maximum graph width (% of pane)"
msgstr "Larghezza massima del grafico (% del pannello)"
-#: gitk:9388
+#: gitk:10703
msgid "Show local changes"
msgstr "Mostra modifiche locali"
-#: gitk:9393
+#: gitk:10706
msgid "Auto-select SHA1"
msgstr "Seleziona automaticamente SHA1 hash"
-#: gitk:9398
+#: gitk:10709
+msgid "Hide remote refs"
+msgstr "Nascondi i riferimenti remoti"
+
+#: gitk:10713
msgid "Diff display options"
msgstr "Opzioni di visualizzazione delle differenze"
-#: gitk:9400
+#: gitk:10715
msgid "Tab spacing"
msgstr "Spaziatura tabulazioni"
-#: gitk:9404
+#: gitk:10718
msgid "Display nearby tags"
msgstr "Mostra etichette vicine"
-#: gitk:9409
+#: gitk:10721
msgid "Limit diffs to listed paths"
msgstr "Limita le differenze ai percorsi elencati"
-#: gitk:9414
+#: gitk:10724
msgid "Support per-file encodings"
-msgstr ""
+msgstr "Attiva codifica file per file"
-#: gitk:9421
+#: gitk:10730 gitk:10819
msgid "External diff tool"
-msgstr ""
+msgstr "Visualizzatore di differenze"
-#: gitk:9423
+#: gitk:10731
msgid "Choose..."
-msgstr ""
+msgstr "Scegli..."
-#: gitk:9428
+#: gitk:10736
+msgid "General options"
+msgstr "Opzioni generali"
+
+#: gitk:10739
+msgid "Use themed widgets"
+msgstr "Utilizza interfaccia a tema"
+
+#: gitk:10741
+msgid "(change requires restart)"
+msgstr "(una modifica richiede il riavvio)"
+
+#: gitk:10743
+msgid "(currently unavailable)"
+msgstr "(momentaneamente non disponibile)"
+
+#: gitk:10747
msgid "Colors: press to choose"
msgstr "Colori: premere per scegliere"
-#: gitk:9431
+#: gitk:10750
+msgid "Interface"
+msgstr "Interfaccia"
+
+#: gitk:10751
+msgid "interface"
+msgstr "interfaccia"
+
+#: gitk:10754
msgid "Background"
msgstr "Sfondo"
-#: gitk:9435
+#: gitk:10755 gitk:10785
+msgid "background"
+msgstr "sfondo"
+
+#: gitk:10758
msgid "Foreground"
msgstr "Primo piano"
-#: gitk:9439
+#: gitk:10759
+msgid "foreground"
+msgstr "primo piano"
+
+#: gitk:10762
msgid "Diff: old lines"
msgstr "Diff: vecchie linee"
-#: gitk:9444
+#: gitk:10763
+msgid "diff old lines"
+msgstr "vecchie linee"
+
+#: gitk:10767
msgid "Diff: new lines"
msgstr "Diff: nuove linee"
-#: gitk:9449
+#: gitk:10768
+msgid "diff new lines"
+msgstr "nuove linee"
+
+#: gitk:10772
msgid "Diff: hunk header"
msgstr "Diff: intestazione della sezione"
-#: gitk:9455
+#: gitk:10774
+msgid "diff hunk header"
+msgstr "intestazione della sezione"
+
+#: gitk:10778
+msgid "Marked line bg"
+msgstr "Sfondo riga selezionata"
+
+#: gitk:10780
+msgid "marked line background"
+msgstr "sfondo riga selezionata"
+
+#: gitk:10784
msgid "Select bg"
-msgstr "Sfondo selezione"
+msgstr "Sfondo"
-#: gitk:9459
+#: gitk:10788
msgid "Fonts: press to choose"
msgstr "Carattere: premere per scegliere"
-#: gitk:9461
+#: gitk:10790
msgid "Main font"
msgstr "Carattere principale"
-#: gitk:9462
+#: gitk:10791
msgid "Diff display font"
msgstr "Carattere per differenze"
-#: gitk:9463
+#: gitk:10792
msgid "User interface font"
msgstr "Carattere per interfaccia utente"
-#: gitk:9488
+#: gitk:10829
#, tcl-format
msgid "Gitk: choose color for %s"
msgstr "Gitk: scegliere un colore per %s"
-#: gitk:9934
-msgid ""
-"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
-" Gitk requires at least Tcl/Tk 8.4."
-msgstr ""
-"Questa versione di Tcl/Tk non può avviare gitk.\n"
-" Gitk richiede Tcl/Tk versione 8.4 o superiore."
-
-#: gitk:10047
+#: gitk:11433
msgid "Cannot find a git repository here."
msgstr "Archivio git non trovato."
-#: gitk:10051
+#: gitk:11437
#, tcl-format
msgid "Cannot find the git directory \"%s\"."
msgstr "Directory git \"%s\" non trovata."
-#: gitk:10098
+#: gitk:11484
#, tcl-format
msgid "Ambiguous argument '%s': both revision and filename"
msgstr "Argomento ambiguo: '%s' è sia revisione che nome di file"
-#: gitk:10110
+#: gitk:11496
msgid "Bad arguments to gitk:"
msgstr "Gitk: argomenti errati:"
-#: gitk:10170
+#: gitk:11587
msgid "Command line"
msgstr "Linea di comando"
diff --git a/gitk-git/po/sv.po b/gitk-git/po/sv.po
index 624eb2281e..0f5e2fd8d7 100644
--- a/gitk-git/po/sv.po
+++ b/gitk-git/po/sv.po
@@ -2,39 +2,39 @@
# Copyright (C) 2005-2009 Paul Mackerras
# This file is distributed under the same license as the gitk package.
#
-# Peter Krefting <peter@softwolves.pp.se>, 2008-2009.
+# Peter Krefting <peter@softwolves.pp.se>, 2008-2010.
# Mikael Magnusson <mikachu@gmail.com>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: sv\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-13 13:38+0100\n"
-"PO-Revision-Date: 2009-08-13 13:40+0100\n"
+"POT-Creation-Date: 2010-01-28 13:16+0100\n"
+"PO-Revision-Date: 2010-01-28 13:48+0100\n"
"Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit"
-#: gitk:113
+#: gitk:115
msgid "Couldn't get list of unmerged files:"
msgstr "Kunde inte hämta lista över ej sammanslagna filer:"
-#: gitk:269
+#: gitk:274
msgid "Error parsing revisions:"
msgstr "Fel vid tolkning av revisioner:"
-#: gitk:324
+#: gitk:329
msgid "Error executing --argscmd command:"
msgstr "Fel vid körning av --argscmd-kommando:"
-#: gitk:337
+#: gitk:342
msgid "No files selected: --merge specified but no files are unmerged."
msgstr ""
"Inga filer valdes: --merge angavs men det finns inga filer som inte har "
"slagits samman."
-#: gitk:340
+#: gitk:345
msgid ""
"No files selected: --merge specified but no unmerged files are within file "
"limit."
@@ -42,596 +42,600 @@ msgstr ""
"Inga filer valdes: --merge angavs men det finns inga filer inom "
"filbegränsningen."
-#: gitk:362 gitk:509
+#: gitk:367 gitk:514
msgid "Error executing git log:"
msgstr "Fel vid körning av git log:"
-#: gitk:380 gitk:525
+#: gitk:385 gitk:530
msgid "Reading"
msgstr "Läser"
-#: gitk:440 gitk:4123
+#: gitk:445 gitk:4261
msgid "Reading commits..."
msgstr "Läser incheckningar..."
-#: gitk:443 gitk:1561 gitk:4126
+#: gitk:448 gitk:1578 gitk:4264
msgid "No commits selected"
msgstr "Inga incheckningar markerade"
-#: gitk:1437
+#: gitk:1454
msgid "Can't parse git log output:"
msgstr "Kan inte tolka utdata från git log:"
-#: gitk:1657
+#: gitk:1674
msgid "No commit information available"
msgstr "Ingen incheckningsinformation är tillgänglig"
-#: gitk:1793 gitk:1817 gitk:3916 gitk:8786 gitk:10322 gitk:10498
+#: gitk:1816
+msgid "mc"
+msgstr "mc"
+
+#: gitk:1851 gitk:4054 gitk:9044 gitk:10585 gitk:10804
msgid "OK"
msgstr "OK"
-#: gitk:1819 gitk:3918 gitk:8383 gitk:8457 gitk:8567 gitk:8616 gitk:8788
-#: gitk:10323 gitk:10499
+#: gitk:1853 gitk:4056 gitk:8634 gitk:8713 gitk:8828 gitk:8877 gitk:9046
+#: gitk:10586 gitk:10805
msgid "Cancel"
msgstr "Avbryt"
-#: gitk:1919
+#: gitk:1975
msgid "Update"
msgstr "Uppdatera"
-#: gitk:1920
+#: gitk:1976
msgid "Reload"
msgstr "Ladda om"
-#: gitk:1921
+#: gitk:1977
msgid "Reread references"
msgstr "Läs om referenser"
-#: gitk:1922
+#: gitk:1978
msgid "List references"
msgstr "Visa referenser"
-#: gitk:1924
+#: gitk:1980
msgid "Start git gui"
msgstr "Starta git gui"
-#: gitk:1926
+#: gitk:1982
msgid "Quit"
msgstr "Avsluta"
-#: gitk:1918
+#: gitk:1974
msgid "File"
msgstr "Arkiv"
-#: gitk:1930
+#: gitk:1986
msgid "Preferences"
msgstr "Inställningar"
-#: gitk:1929
+#: gitk:1985
msgid "Edit"
msgstr "Redigera"
-#: gitk:1934
+#: gitk:1990
msgid "New view..."
msgstr "Ny vy..."
-#: gitk:1935
+#: gitk:1991
msgid "Edit view..."
msgstr "Ändra vy..."
-#: gitk:1936
+#: gitk:1992
msgid "Delete view"
msgstr "Ta bort vy"
-#: gitk:1938
+#: gitk:1994
msgid "All files"
msgstr "Alla filer"
-#: gitk:1933 gitk:3670
+#: gitk:1989 gitk:3808
msgid "View"
msgstr "Visa"
-#: gitk:1943 gitk:1953 gitk:2654
+#: gitk:1999 gitk:2009 gitk:2780
msgid "About gitk"
msgstr "Om gitk"
-#: gitk:1944 gitk:1958
+#: gitk:2000 gitk:2014
msgid "Key bindings"
msgstr "Tangentbordsbindningar"
-#: gitk:1942 gitk:1957
+#: gitk:1998 gitk:2013
msgid "Help"
msgstr "Hjälp"
-#: gitk:2018
-msgid "SHA1 ID: "
-msgstr "SHA1-id: "
+#: gitk:2091 gitk:8110
+msgid "SHA1 ID:"
+msgstr "SHA1-id:"
-#: gitk:2049
+#: gitk:2122
msgid "Row"
msgstr "Rad"
-#: gitk:2080
+#: gitk:2160
msgid "Find"
msgstr "Sök"
-#: gitk:2081
+#: gitk:2161
msgid "next"
msgstr "nästa"
-#: gitk:2082
+#: gitk:2162
msgid "prev"
msgstr "föreg"
-#: gitk:2083
+#: gitk:2163
msgid "commit"
msgstr "incheckning"
-#: gitk:2086 gitk:2088 gitk:4284 gitk:4307 gitk:4331 gitk:6272 gitk:6344
-#: gitk:6428
+#: gitk:2166 gitk:2168 gitk:4422 gitk:4445 gitk:4469 gitk:6410 gitk:6482
+#: gitk:6566
msgid "containing:"
msgstr "som innehåller:"
-#: gitk:2089 gitk:3162 gitk:3167 gitk:4359
+#: gitk:2169 gitk:3290 gitk:3295 gitk:4497
msgid "touching paths:"
msgstr "som rör sökväg:"
-#: gitk:2090 gitk:4364
+#: gitk:2170 gitk:4502
msgid "adding/removing string:"
msgstr "som lägger/till tar bort sträng:"
-#: gitk:2099 gitk:2101
+#: gitk:2179 gitk:2181
msgid "Exact"
msgstr "Exakt"
-#: gitk:2101 gitk:4439 gitk:6240
+#: gitk:2181 gitk:4577 gitk:6378
msgid "IgnCase"
msgstr "IgnVersaler"
-#: gitk:2101 gitk:4333 gitk:4437 gitk:6236
+#: gitk:2181 gitk:4471 gitk:4575 gitk:6374
msgid "Regexp"
msgstr "Reg.uttr."
-#: gitk:2103 gitk:2104 gitk:4458 gitk:4488 gitk:4495 gitk:6364 gitk:6432
+#: gitk:2183 gitk:2184 gitk:4596 gitk:4626 gitk:4633 gitk:6502 gitk:6570
msgid "All fields"
msgstr "Alla fält"
-#: gitk:2104 gitk:4456 gitk:4488 gitk:6303
+#: gitk:2184 gitk:4594 gitk:4626 gitk:6441
msgid "Headline"
msgstr "Rubrik"
-#: gitk:2105 gitk:4456 gitk:6303 gitk:6432 gitk:6866
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6570 gitk:7003
msgid "Comments"
msgstr "Kommentarer"
-#: gitk:2105 gitk:4456 gitk:4460 gitk:4495 gitk:6303 gitk:6801 gitk:8063
-#: gitk:8078
+#: gitk:2185 gitk:4594 gitk:4598 gitk:4633 gitk:6441 gitk:6938 gitk:8285
+#: gitk:8300
msgid "Author"
msgstr "Författare"
-#: gitk:2105 gitk:4456 gitk:6303 gitk:6803
+#: gitk:2185 gitk:4594 gitk:6441 gitk:6940
msgid "Committer"
msgstr "Incheckare"
-#: gitk:2134
+#: gitk:2216
msgid "Search"
msgstr "Sök"
-#: gitk:2141
+#: gitk:2224
msgid "Diff"
msgstr "Diff"
-#: gitk:2143
+#: gitk:2226
msgid "Old version"
msgstr "Gammal version"
-#: gitk:2145
+#: gitk:2228
msgid "New version"
msgstr "Ny version"
-#: gitk:2147
+#: gitk:2230
msgid "Lines of context"
msgstr "Rader sammanhang"
-#: gitk:2157
+#: gitk:2240
msgid "Ignore space change"
msgstr "Ignorera ändringar i blanksteg"
-#: gitk:2215
+#: gitk:2299
msgid "Patch"
msgstr "Patch"
-#: gitk:2217
+#: gitk:2301
msgid "Tree"
msgstr "Träd"
-#: gitk:2361 gitk:2378
+#: gitk:2456 gitk:2473
msgid "Diff this -> selected"
msgstr "Diff denna -> markerad"
-#: gitk:2362 gitk:2379
+#: gitk:2457 gitk:2474
msgid "Diff selected -> this"
msgstr "Diff markerad -> denna"
-#: gitk:2363 gitk:2380
+#: gitk:2458 gitk:2475
msgid "Make patch"
msgstr "Skapa patch"
-#: gitk:2364 gitk:8441
+#: gitk:2459 gitk:8692
msgid "Create tag"
msgstr "Skapa tagg"
-#: gitk:2365 gitk:8547
+#: gitk:2460 gitk:8808
msgid "Write commit to file"
msgstr "Skriv incheckning till fil"
-#: gitk:2366 gitk:8604
+#: gitk:2461 gitk:8865
msgid "Create new branch"
msgstr "Skapa ny gren"
-#: gitk:2367
+#: gitk:2462
msgid "Cherry-pick this commit"
msgstr "Plocka denna incheckning"
-#: gitk:2368
+#: gitk:2463
msgid "Reset HEAD branch to here"
msgstr "Återställ HEAD-grenen hit"
-#: gitk:2369
+#: gitk:2464
msgid "Mark this commit"
msgstr "Markera denna incheckning"
-#: gitk:2370
+#: gitk:2465
msgid "Return to mark"
msgstr "Återgå till markering"
-#: gitk:2371
+#: gitk:2466
msgid "Find descendant of this and mark"
msgstr "Hitta efterföljare till denna och markera"
-#: gitk:2372
+#: gitk:2467
msgid "Compare with marked commit"
msgstr "Jämför med markerad incheckning"
-#: gitk:2386
+#: gitk:2481
msgid "Check out this branch"
msgstr "Checka ut denna gren"
-#: gitk:2387
+#: gitk:2482
msgid "Remove this branch"
msgstr "Ta bort denna gren"
-#: gitk:2394
+#: gitk:2489
msgid "Highlight this too"
msgstr "Markera även detta"
-#: gitk:2395
+#: gitk:2490
msgid "Highlight this only"
msgstr "Markera bara detta"
-#: gitk:2396
+#: gitk:2491
msgid "External diff"
msgstr "Extern diff"
-#: gitk:2397
+#: gitk:2492
msgid "Blame parent commit"
msgstr "Klandra föräldraincheckning"
-#: gitk:2404
+#: gitk:2499
msgid "Show origin of this line"
msgstr "Visa ursprunget för den här raden"
-#: gitk:2405
+#: gitk:2500
msgid "Run git gui blame on this line"
msgstr "Kör git gui blame på den här raden"
-#: gitk:2656
+#: gitk:2782
msgid ""
"\n"
"Gitk - a commit viewer for git\n"
"\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright ©9 2005-2009 Paul Mackerras\n"
"\n"
"Use and redistribute under the terms of the GNU General Public License"
msgstr ""
"\n"
"Gitk - en incheckningsvisare för git\n"
"\n"
-"Copyright © 2005-2008 Paul Mackerras\n"
+"Copyright © 2005-2009 Paul Mackerras\n"
"\n"
"Använd och vidareförmedla enligt villkoren i GNU General Public License"
-#: gitk:2664 gitk:2726 gitk:8969
+#: gitk:2790 gitk:2854 gitk:9230
msgid "Close"
msgstr "Stäng"
-#: gitk:2683
+#: gitk:2811
msgid "Gitk key bindings"
msgstr "Tangentbordsbindningar för Gitk"
-#: gitk:2686
+#: gitk:2814
msgid "Gitk key bindings:"
msgstr "Tangentbordsbindningar för Gitk:"
-#: gitk:2688
+#: gitk:2816
#, tcl-format
msgid "<%s-Q>\t\tQuit"
msgstr "<%s-Q>\t\tAvsluta"
-#: gitk:2689
+#: gitk:2817
msgid "<Home>\t\tMove to first commit"
msgstr "<Home>\t\tGå till första incheckning"
-#: gitk:2690
+#: gitk:2818
msgid "<End>\t\tMove to last commit"
msgstr "<End>\t\tGå till sista incheckning"
-#: gitk:2691
+#: gitk:2819
msgid "<Up>, p, i\tMove up one commit"
msgstr "<Upp>, p, i\tGå en incheckning upp"
-#: gitk:2692
+#: gitk:2820
msgid "<Down>, n, k\tMove down one commit"
msgstr "<Ned>, n, k\tGå en incheckning ned"
-#: gitk:2693
+#: gitk:2821
msgid "<Left>, z, j\tGo back in history list"
msgstr "<Vänster>, z, j\tGå bakåt i historiken"
-#: gitk:2694
+#: gitk:2822
msgid "<Right>, x, l\tGo forward in history list"
msgstr "<Höger>, x, l\tGå framåt i historiken"
-#: gitk:2695
+#: gitk:2823
msgid "<PageUp>\tMove up one page in commit list"
msgstr "<PageUp>\tGå upp en sida i incheckningslistan"
-#: gitk:2696
+#: gitk:2824
msgid "<PageDown>\tMove down one page in commit list"
msgstr "<PageDown>\tGå ned en sida i incheckningslistan"
-#: gitk:2697
+#: gitk:2825
#, tcl-format
msgid "<%s-Home>\tScroll to top of commit list"
msgstr "<%s-Home>\tRulla till början av incheckningslistan"
-#: gitk:2698
+#: gitk:2826
#, tcl-format
msgid "<%s-End>\tScroll to bottom of commit list"
msgstr "<%s-End>\tRulla till slutet av incheckningslistan"
-#: gitk:2699
+#: gitk:2827
#, tcl-format
msgid "<%s-Up>\tScroll commit list up one line"
msgstr "<%s-Upp>\tRulla incheckningslistan upp ett steg"
-#: gitk:2700
+#: gitk:2828
#, tcl-format
msgid "<%s-Down>\tScroll commit list down one line"
msgstr "<%s-Ned>\tRulla incheckningslistan ned ett steg"
-#: gitk:2701
+#: gitk:2829
#, tcl-format
msgid "<%s-PageUp>\tScroll commit list up one page"
msgstr "<%s-PageUp>\tRulla incheckningslistan upp en sida"
-#: gitk:2702
+#: gitk:2830
#, tcl-format
msgid "<%s-PageDown>\tScroll commit list down one page"
msgstr "<%s-PageDown>\tRulla incheckningslistan ned en sida"
-#: gitk:2703
+#: gitk:2831
msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
msgstr "<Skift-Upp>\tSök bakåt (uppåt, senare incheckningar)"
-#: gitk:2704
+#: gitk:2832
msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
msgstr "<Skift-Ned>\tSök framåt (nedåt, tidigare incheckningar)"
-#: gitk:2705
+#: gitk:2833
msgid "<Delete>, b\tScroll diff view up one page"
msgstr "<Delete>, b\tRulla diffvisningen upp en sida"
-#: gitk:2706
+#: gitk:2834
msgid "<Backspace>\tScroll diff view up one page"
msgstr "<Baksteg>\tRulla diffvisningen upp en sida"
-#: gitk:2707
+#: gitk:2835
msgid "<Space>\t\tScroll diff view down one page"
msgstr "<Blanksteg>\tRulla diffvisningen ned en sida"
-#: gitk:2708
+#: gitk:2836
msgid "u\t\tScroll diff view up 18 lines"
msgstr "u\t\tRulla diffvisningen upp 18 rader"
-#: gitk:2709
+#: gitk:2837
msgid "d\t\tScroll diff view down 18 lines"
msgstr "d\t\tRulla diffvisningen ned 18 rader"
-#: gitk:2710
+#: gitk:2838
#, tcl-format
msgid "<%s-F>\t\tFind"
msgstr "<%s-F>\t\tSök"
-#: gitk:2711
+#: gitk:2839
#, tcl-format
msgid "<%s-G>\t\tMove to next find hit"
msgstr "<%s-G>\t\tGå till nästa sökträff"
-#: gitk:2712
+#: gitk:2840
msgid "<Return>\tMove to next find hit"
msgstr "<Return>\t\tGå till nästa sökträff"
-#: gitk:2713
+#: gitk:2841
msgid "/\t\tFocus the search box"
msgstr "/\t\tFokusera sökrutan"
-#: gitk:2714
+#: gitk:2842
msgid "?\t\tMove to previous find hit"
msgstr "?\t\tGå till föregående sökträff"
-#: gitk:2715
+#: gitk:2843
msgid "f\t\tScroll diff view to next file"
msgstr "f\t\tRulla diffvisningen till nästa fil"
-#: gitk:2716
+#: gitk:2844
#, tcl-format
msgid "<%s-S>\t\tSearch for next hit in diff view"
msgstr "<%s-S>\t\tGå till nästa sökträff i diffvisningen"
-#: gitk:2717
+#: gitk:2845
#, tcl-format
msgid "<%s-R>\t\tSearch for previous hit in diff view"
msgstr "<%s-R>\t\tGå till föregående sökträff i diffvisningen"
-#: gitk:2718
+#: gitk:2846
#, tcl-format
msgid "<%s-KP+>\tIncrease font size"
msgstr "<%s-Num+>\tÖka teckenstorlek"
-#: gitk:2719
+#: gitk:2847
#, tcl-format
msgid "<%s-plus>\tIncrease font size"
msgstr "<%s-plus>\tÖka teckenstorlek"
-#: gitk:2720
+#: gitk:2848
#, tcl-format
msgid "<%s-KP->\tDecrease font size"
msgstr "<%s-Num->\tMinska teckenstorlek"
-#: gitk:2721
+#: gitk:2849
#, tcl-format
msgid "<%s-minus>\tDecrease font size"
msgstr "<%s-minus>\tMinska teckenstorlek"
-#: gitk:2722
+#: gitk:2850
msgid "<F5>\t\tUpdate"
msgstr "<F5>\t\tUppdatera"
-#: gitk:3177
-#, tcl-format
-msgid "Error getting \"%s\" from %s:"
-msgstr "Fel vid hämtning av \"%s\" från %s:"
-
-#: gitk:3234 gitk:3243
+#: gitk:3305 gitk:3314
#, tcl-format
msgid "Error creating temporary directory %s:"
msgstr "Fel vid skapande av temporär katalog %s:"
-#: gitk:3255
+#: gitk:3327
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr "Fel vid hämtning av \"%s\" från %s:"
+
+#: gitk:3390
msgid "command failed:"
msgstr "kommando misslyckades:"
-#: gitk:3401
+#: gitk:3539
msgid "No such commit"
msgstr "Incheckning saknas"
-#: gitk:3415
+#: gitk:3553
msgid "git gui blame: command failed:"
msgstr "git gui blame: kommando misslyckades:"
-#: gitk:3446
+#: gitk:3584
#, tcl-format
msgid "Couldn't read merge head: %s"
msgstr "Kunde inte läsa sammanslagningshuvud: %s"
-#: gitk:3454
+#: gitk:3592
#, tcl-format
msgid "Error reading index: %s"
msgstr "Fel vid läsning av index: %s"
-#: gitk:3479
+#: gitk:3617
#, tcl-format
msgid "Couldn't start git blame: %s"
msgstr "Kunde inte starta git blame: %s"
-#: gitk:3482 gitk:6271
+#: gitk:3620 gitk:6409
msgid "Searching"
msgstr "Söker"
-#: gitk:3514
+#: gitk:3652
#, tcl-format
msgid "Error running git blame: %s"
msgstr "Fel vid körning av git blame: %s"
-#: gitk:3542
+#: gitk:3680
#, tcl-format
msgid "That line comes from commit %s, which is not in this view"
msgstr "Raden kommer från incheckningen %s, som inte finns i denna vy"
-#: gitk:3556
+#: gitk:3694
msgid "External diff viewer failed:"
msgstr "Externt diff-verktyg misslyckades:"
-#: gitk:3674
+#: gitk:3812
msgid "Gitk view definition"
msgstr "Definition av Gitk-vy"
-#: gitk:3678
+#: gitk:3816
msgid "Remember this view"
msgstr "Spara denna vy"
-#: gitk:3679
+#: gitk:3817
msgid "References (space separated list):"
msgstr "Referenser (blankstegsavdelad lista):"
-#: gitk:3680
+#: gitk:3818
msgid "Branches & tags:"
msgstr "Grenar & taggar:"
-#: gitk:3681
+#: gitk:3819
msgid "All refs"
msgstr "Alla referenser"
-#: gitk:3682
+#: gitk:3820
msgid "All (local) branches"
msgstr "Alla (lokala) grenar"
-#: gitk:3683
+#: gitk:3821
msgid "All tags"
msgstr "Alla taggar"
-#: gitk:3684
+#: gitk:3822
msgid "All remote-tracking branches"
msgstr "Alla fjärrspårande grenar"
-#: gitk:3685
+#: gitk:3823
msgid "Commit Info (regular expressions):"
msgstr "Incheckningsinfo (reguljära uttryck):"
-#: gitk:3686
+#: gitk:3824
msgid "Author:"
msgstr "Författare:"
-#: gitk:3687
+#: gitk:3825
msgid "Committer:"
msgstr "Incheckare:"
-#: gitk:3688
+#: gitk:3826
msgid "Commit Message:"
msgstr "Incheckningsmeddelande:"
-#: gitk:3689
+#: gitk:3827
msgid "Matches all Commit Info criteria"
msgstr "Motsvarar alla kriterier för incheckningsinfo"
-#: gitk:3690
+#: gitk:3828
msgid "Changes to Files:"
msgstr "Ändringar av filer:"
-#: gitk:3691
+#: gitk:3829
msgid "Fixed String"
msgstr "Fast sträng"
-#: gitk:3692
+#: gitk:3830
msgid "Regular Expression"
msgstr "Reguljärt uttryck"
-#: gitk:3693
+#: gitk:3831
msgid "Search string:"
msgstr "Söksträng:"
-#: gitk:3694
+#: gitk:3832
msgid ""
"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
"15:27:38\"):"
@@ -639,205 +643,201 @@ msgstr ""
"Incheckingsdatum (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
"15:27:38\"):"
-#: gitk:3695
+#: gitk:3833
msgid "Since:"
msgstr "Från:"
-#: gitk:3696
+#: gitk:3834
msgid "Until:"
msgstr "Till:"
-#: gitk:3697
+#: gitk:3835
msgid "Limit and/or skip a number of revisions (positive integer):"
msgstr "Begränsa och/eller hoppa över ett antal revisioner (positivt heltal):"
-#: gitk:3698
+#: gitk:3836
msgid "Number to show:"
msgstr "Antal att visa:"
-#: gitk:3699
+#: gitk:3837
msgid "Number to skip:"
msgstr "Antal att hoppa över:"
-#: gitk:3700
+#: gitk:3838
msgid "Miscellaneous options:"
msgstr "Diverse alternativ:"
-#: gitk:3701
+#: gitk:3839
msgid "Strictly sort by date"
msgstr "Strikt datumsortering"
-#: gitk:3702
+#: gitk:3840
msgid "Mark branch sides"
msgstr "Markera sidogrenar"
-#: gitk:3703
+#: gitk:3841
msgid "Limit to first parent"
msgstr "Begränsa till första förälder"
-#: gitk:3704
+#: gitk:3842
msgid "Simple history"
msgstr "Enkel historik"
-#: gitk:3705
+#: gitk:3843
msgid "Additional arguments to git log:"
msgstr "Ytterligare argument till git log:"
-#: gitk:3706
+#: gitk:3844
msgid "Enter files and directories to include, one per line:"
msgstr "Ange filer och kataloger att ta med, en per rad:"
-#: gitk:3707
+#: gitk:3845
msgid "Command to generate more commits to include:"
msgstr "Kommando för att generera fler incheckningar att ta med:"
-#: gitk:3829
+#: gitk:3967
msgid "Gitk: edit view"
msgstr "Gitk: redigera vy"
-#: gitk:3837
+#: gitk:3975
msgid "-- criteria for selecting revisions"
msgstr " - kriterier för val av revisioner"
-#: gitk:3842
-msgid "View Name:"
-msgstr "Namn på vy:"
+#: gitk:3980
+msgid "View Name"
+msgstr "Namn på vy"
-#: gitk:3917
+#: gitk:4055
msgid "Apply (F5)"
msgstr "Använd (F5)"
-#: gitk:3955
+#: gitk:4093
msgid "Error in commit selection arguments:"
msgstr "Fel i argument för val av incheckningar:"
-#: gitk:4008 gitk:4060 gitk:4508 gitk:4522 gitk:5783 gitk:11196 gitk:11197
+#: gitk:4146 gitk:4198 gitk:4646 gitk:4660 gitk:5921 gitk:11534 gitk:11535
msgid "None"
msgstr "Inget"
-#: gitk:4456 gitk:6303 gitk:8065 gitk:8080
+#: gitk:4594 gitk:6441 gitk:8287 gitk:8302
msgid "Date"
msgstr "Datum"
-#: gitk:4456 gitk:6303
+#: gitk:4594 gitk:6441
msgid "CDate"
msgstr "Skapat datum"
-#: gitk:4605 gitk:4610
+#: gitk:4743 gitk:4748
msgid "Descendant"
msgstr "Avkomling"
-#: gitk:4606
+#: gitk:4744
msgid "Not descendant"
msgstr "Inte avkomling"
-#: gitk:4613 gitk:4618
+#: gitk:4751 gitk:4756
msgid "Ancestor"
msgstr "Förfader"
-#: gitk:4614
+#: gitk:4752
msgid "Not ancestor"
msgstr "Inte förfader"
-#: gitk:4904
+#: gitk:5042
msgid "Local changes checked in to index but not committed"
msgstr "Lokala ändringar sparade i indexet men inte incheckade"
-#: gitk:4940
+#: gitk:5078
msgid "Local uncommitted changes, not checked in to index"
msgstr "Lokala ändringar, ej sparade i indexet"
-#: gitk:6621
+#: gitk:6759
msgid "many"
msgstr "många"
-#: gitk:6805
+#: gitk:6942
msgid "Tags:"
msgstr "Taggar:"
-#: gitk:6822 gitk:6828 gitk:8058
+#: gitk:6959 gitk:6965 gitk:8280
msgid "Parent"
msgstr "Förälder"
-#: gitk:6833
+#: gitk:6970
msgid "Child"
msgstr "Barn"
-#: gitk:6842
+#: gitk:6979
msgid "Branch"
msgstr "Gren"
-#: gitk:6845
+#: gitk:6982
msgid "Follows"
msgstr "Följer"
-#: gitk:6848
+#: gitk:6985
msgid "Precedes"
msgstr "Föregår"
-#: gitk:7346
+#: gitk:7522
#, tcl-format
msgid "Error getting diffs: %s"
msgstr "Fel vid hämtning av diff: %s"
-#: gitk:7886
+#: gitk:8108
msgid "Goto:"
msgstr "Gå till:"
-#: gitk:7888
-msgid "SHA1 ID:"
-msgstr "SHA1-id:"
-
-#: gitk:7907
+#: gitk:8129
#, tcl-format
msgid "Short SHA1 id %s is ambiguous"
msgstr "Förkortat SHA1-id %s är tvetydigt"
-#: gitk:7914
+#: gitk:8136
#, tcl-format
msgid "Revision %s is not known"
msgstr "Revisionen %s är inte känd"
-#: gitk:7924
+#: gitk:8146
#, tcl-format
msgid "SHA1 id %s is not known"
msgstr "SHA-id:t %s är inte känt"
-#: gitk:7926
+#: gitk:8148
#, tcl-format
msgid "Revision %s is not in the current view"
msgstr "Revisionen %s finns inte i den nuvarande vyn"
-#: gitk:8068
+#: gitk:8290
msgid "Children"
msgstr "Barn"
-#: gitk:8125
+#: gitk:8348
#, tcl-format
msgid "Reset %s branch to here"
msgstr "Återställ grenen %s hit"
-#: gitk:8127
+#: gitk:8350
msgid "Detached head: can't reset"
msgstr "Frånkopplad head: kan inte återställa"
-#: gitk:8236 gitk:8242
+#: gitk:8459 gitk:8465
msgid "Skipping merge commit "
msgstr "Hoppar över sammanslagningsincheckning "
-#: gitk:8251 gitk:8256
+#: gitk:8474 gitk:8479
msgid "Error getting patch ID for "
msgstr "Fel vid hämtning av patch-id för "
-#: gitk:8252 gitk:8257
+#: gitk:8475 gitk:8480
msgid " - stopping\n"
msgstr " - stannar\n"
-#: gitk:8262 gitk:8265 gitk:8273 gitk:8283 gitk:8292
+#: gitk:8485 gitk:8488 gitk:8496 gitk:8510 gitk:8519
msgid "Commit "
msgstr "Incheckning "
-#: gitk:8266
+#: gitk:8489
msgid ""
" is the same patch as\n"
" "
@@ -845,7 +845,7 @@ msgstr ""
" är samma patch som\n"
" "
-#: gitk:8274
+#: gitk:8497
msgid ""
" differs from\n"
" "
@@ -853,117 +853,139 @@ msgstr ""
" skiljer sig från\n"
" "
-#: gitk:8276
-msgid "- stopping\n"
-msgstr "- stannar\n"
+#: gitk:8499
+msgid ""
+"Diff of commits:\n"
+"\n"
+msgstr "Skillnad mellan incheckningar:\n"
+"\n"
+""
-#: gitk:8284 gitk:8293
+#: gitk:8511 gitk:8520
#, tcl-format
msgid " has %s children - stopping\n"
msgstr " har %s barn - stannar\n"
-#: gitk:8324
+#: gitk:8539
+#, tcl-format
+msgid "Error writing commit to file: %s"
+msgstr "Fel vid skrivning av incheckning till fil: %s"
+
+#: gitk:8545
+#, tcl-format
+msgid "Error diffing commits: %s"
+msgstr "Fel vid jämförelse av incheckningar: %s"
+
+#: gitk:8575
msgid "Top"
msgstr "Topp"
-#: gitk:8325
+#: gitk:8576
msgid "From"
msgstr "Från"
-#: gitk:8330
+#: gitk:8581
msgid "To"
msgstr "Till"
-#: gitk:8354
+#: gitk:8605
msgid "Generate patch"
msgstr "Generera patch"
-#: gitk:8356
+#: gitk:8607
msgid "From:"
msgstr "Från:"
-#: gitk:8365
+#: gitk:8616
msgid "To:"
msgstr "Till:"
-#: gitk:8374
+#: gitk:8625
msgid "Reverse"
msgstr "Vänd"
-#: gitk:8376 gitk:8561
+#: gitk:8627 gitk:8822
msgid "Output file:"
msgstr "Utdatafil:"
-#: gitk:8382
+#: gitk:8633
msgid "Generate"
msgstr "Generera"
-#: gitk:8420
+#: gitk:8671
msgid "Error creating patch:"
msgstr "Fel vid generering av patch:"
-#: gitk:8443 gitk:8549 gitk:8606
+#: gitk:8694 gitk:8810 gitk:8867
msgid "ID:"
msgstr "Id:"
-#: gitk:8452
+#: gitk:8703
msgid "Tag name:"
msgstr "Taggnamn:"
-#: gitk:8456 gitk:8615
+#: gitk:8706
+msgid "Tag message is optional"
+msgstr "Taggmeddelandet är valfritt"
+
+#: gitk:8708
+msgid "Tag message:"
+msgstr "Taggmeddelande:"
+
+#: gitk:8712 gitk:8876
msgid "Create"
msgstr "Skapa"
-#: gitk:8473
+#: gitk:8730
msgid "No tag name specified"
msgstr "Inget taggnamn angavs"
-#: gitk:8477
+#: gitk:8734
#, tcl-format
msgid "Tag \"%s\" already exists"
msgstr "Taggen \"%s\" finns redan"
-#: gitk:8483
+#: gitk:8744
msgid "Error creating tag:"
msgstr "Fel vid skapande av tagg:"
-#: gitk:8558
+#: gitk:8819
msgid "Command:"
msgstr "Kommando:"
-#: gitk:8566
+#: gitk:8827
msgid "Write"
msgstr "Skriv"
-#: gitk:8584
+#: gitk:8845
msgid "Error writing commit:"
msgstr "Fel vid skrivning av incheckning:"
-#: gitk:8611
+#: gitk:8872
msgid "Name:"
msgstr "Namn:"
-#: gitk:8634
+#: gitk:8895
msgid "Please specify a name for the new branch"
msgstr "Ange ett namn för den nya grenen"
-#: gitk:8639
+#: gitk:8900
#, tcl-format
msgid "Branch '%s' already exists. Overwrite?"
msgstr "Grenen \"%s\" finns redan. Skriva över?"
-#: gitk:8705
+#: gitk:8966
#, tcl-format
msgid "Commit %s is already included in branch %s -- really re-apply it?"
msgstr ""
"Incheckningen %s finns redan på grenen %s -- skall den verkligen appliceras "
"på nytt?"
-#: gitk:8710
+#: gitk:8971
msgid "Cherry-picking"
msgstr "Plockar"
-#: gitk:8719
+#: gitk:8980
#, tcl-format
msgid ""
"Cherry-pick failed because of local changes to file '%s'.\n"
@@ -973,7 +995,7 @@ msgstr ""
"Checka in, återställ eller spara undan (stash) dina ändringar och försök "
"igen."
-#: gitk:8725
+#: gitk:8986
msgid ""
"Cherry-pick failed because of merge conflict.\n"
"Do you wish to run git citool to resolve it?"
@@ -981,32 +1003,32 @@ msgstr ""
"Cherry-pick misslyckades på grund av en sammanslagningskonflikt.\n"
"Vill du köra git citool för att lösa den?"
-#: gitk:8741
+#: gitk:9002
msgid "No changes committed"
msgstr "Inga ändringar incheckade"
-#: gitk:8767
+#: gitk:9028
msgid "Confirm reset"
msgstr "Bekräfta återställning"
-#: gitk:8769
+#: gitk:9030
#, tcl-format
msgid "Reset branch %s to %s?"
msgstr "Återställa grenen %s till %s?"
-#: gitk:8773
+#: gitk:9032
msgid "Reset type:"
msgstr "Typ av återställning:"
-#: gitk:8777
+#: gitk:9035
msgid "Soft: Leave working tree and index untouched"
msgstr "Mjuk: Rör inte utcheckning och index"
-#: gitk:8780
+#: gitk:9038
msgid "Mixed: Leave working tree untouched, reset index"
msgstr "Blandad: Rör inte utcheckning, återställ index"
-#: gitk:8783
+#: gitk:9041
msgid ""
"Hard: Reset working tree and index\n"
"(discard ALL local changes)"
@@ -1014,19 +1036,19 @@ msgstr ""
"Hård: Återställ utcheckning och index\n"
"(förkastar ALLA lokala ändringar)"
-#: gitk:8800
+#: gitk:9058
msgid "Resetting"
msgstr "Återställer"
-#: gitk:8857
+#: gitk:9118
msgid "Checking out"
msgstr "Checkar ut"
-#: gitk:8910
+#: gitk:9171
msgid "Cannot delete the currently checked-out branch"
msgstr "Kan inte ta bort den just nu utcheckade grenen"
-#: gitk:8916
+#: gitk:9177
#, tcl-format
msgid ""
"The commits on branch %s aren't on any other branch.\n"
@@ -1035,16 +1057,16 @@ msgstr ""
"Incheckningarna på grenen %s existerar inte på någon annan gren.\n"
"Vill du verkligen ta bort grenen %s?"
-#: gitk:8947
+#: gitk:9208
#, tcl-format
msgid "Tags and heads: %s"
msgstr "Taggar och huvuden: %s"
-#: gitk:8962
+#: gitk:9223
msgid "Filter"
msgstr "Filter"
-#: gitk:9257
+#: gitk:9518
msgid ""
"Error reading commit topology information; branch and preceding/following "
"tag information will be incomplete."
@@ -1052,190 +1074,219 @@ msgstr ""
"Fel vid läsning av information om incheckningstopologi; information om "
"grenar och föregående/senare taggar kommer inte vara komplett."
-#: gitk:10243
+#: gitk:10504
msgid "Tag"
msgstr "Tagg"
-#: gitk:10243
+#: gitk:10504
msgid "Id"
msgstr "Id"
-#: gitk:10291
+#: gitk:10554
msgid "Gitk font chooser"
msgstr "Teckensnittsväljare för Gitk"
-#: gitk:10308
+#: gitk:10571
msgid "B"
msgstr "F"
-#: gitk:10311
+#: gitk:10574
msgid "I"
msgstr "K"
-#: gitk:10407
+#: gitk:10692
msgid "Gitk preferences"
msgstr "Inställningar för Gitk"
-#: gitk:10409
+#: gitk:10694
msgid "Commit list display options"
msgstr "Alternativ för incheckningslistvy"
-#: gitk:10412
+#: gitk:10697
msgid "Maximum graph width (lines)"
msgstr "Maximal grafbredd (rader)"
-#: gitk:10416
+#: gitk:10700
#, tcl-format
msgid "Maximum graph width (% of pane)"
msgstr "Maximal grafbredd (% av ruta)"
-#: gitk:10420
+#: gitk:10703
msgid "Show local changes"
msgstr "Visa lokala ändringar"
-#: gitk:10423
+#: gitk:10706
msgid "Auto-select SHA1"
msgstr "Välj SHA1 automatiskt"
-#: gitk:10427
+#: gitk:10709
+msgid "Hide remote refs"
+msgstr "Dölj fjärr-referenser"
+
+#: gitk:10713
msgid "Diff display options"
msgstr "Alternativ för diffvy"
-#: gitk:10429
+#: gitk:10715
msgid "Tab spacing"
msgstr "Blanksteg för tabulatortecken"
-#: gitk:10432
+#: gitk:10718
msgid "Display nearby tags"
msgstr "Visa närliggande taggar"
-#: gitk:10435
-msgid "Hide remote refs"
-msgstr "Dölj fjärr-referenser"
-
-#: gitk:10438
+#: gitk:10721
msgid "Limit diffs to listed paths"
msgstr "Begränsa diff till listade sökvägar"
-#: gitk:10441
+#: gitk:10724
msgid "Support per-file encodings"
msgstr "Stöd för filspecifika teckenkodningar"
-#: gitk:10447 gitk:10512
+#: gitk:10730 gitk:10819
msgid "External diff tool"
msgstr "Externt diff-verktyg"
-#: gitk:10449
+#: gitk:10731
msgid "Choose..."
msgstr "Välj..."
-#: gitk:10454
+#: gitk:10736
+msgid "General options"
+msgstr "Allmänna inställningar"
+
+#: gitk:10739
+msgid "Use themed widgets"
+msgstr "Använd tema på fönsterelement"
+
+#: gitk:10741
+msgid "(change requires restart)"
+msgstr "(ändringen kräver omstart)"
+
+#: gitk:10743
+msgid "(currently unavailable)"
+msgstr "(för närvarande inte tillgängligt)"
+
+#: gitk:10747
msgid "Colors: press to choose"
msgstr "Färger: tryck för att välja"
-#: gitk:10457
+#: gitk:10750
+msgid "Interface"
+msgstr "Gränssnitt"
+
+#: gitk:10751
+msgid "interface"
+msgstr "gränssnitt"
+
+#: gitk:10754
msgid "Background"
msgstr "Bakgrund"
-#: gitk:10458 gitk:10488
+#: gitk:10755 gitk:10785
msgid "background"
msgstr "bakgrund"
-#: gitk:10461
+#: gitk:10758
msgid "Foreground"
msgstr "Förgrund"
-#: gitk:10462
+#: gitk:10759
msgid "foreground"
msgstr "förgrund"
-#: gitk:10465
+#: gitk:10762
msgid "Diff: old lines"
msgstr "Diff: gamla rader"
-#: gitk:10466
+#: gitk:10763
msgid "diff old lines"
msgstr "diff gamla rader"
-#: gitk:10470
+#: gitk:10767
msgid "Diff: new lines"
msgstr "Diff: nya rader"
-#: gitk:10471
+#: gitk:10768
msgid "diff new lines"
msgstr "diff nya rader"
-#: gitk:10475
+#: gitk:10772
msgid "Diff: hunk header"
msgstr "Diff: delhuvud"
-#: gitk:10477
+#: gitk:10774
msgid "diff hunk header"
msgstr "diff delhuvud"
-#: gitk:10481
+#: gitk:10778
msgid "Marked line bg"
msgstr "Markerad rad bakgrund"
-#: gitk:10483
+#: gitk:10780
msgid "marked line background"
msgstr "markerad rad bakgrund"
-#: gitk:10487
+#: gitk:10784
msgid "Select bg"
msgstr "Markerad bakgrund"
-#: gitk:10491
+#: gitk:10788
msgid "Fonts: press to choose"
msgstr "Teckensnitt: tryck för att välja"
-#: gitk:10493
+#: gitk:10790
msgid "Main font"
msgstr "Huvudteckensnitt"
-#: gitk:10494
+#: gitk:10791
msgid "Diff display font"
msgstr "Teckensnitt för diffvisning"
-#: gitk:10495
+#: gitk:10792
msgid "User interface font"
msgstr "Teckensnitt för användargränssnitt"
-#: gitk:10522
+#: gitk:10829
#, tcl-format
msgid "Gitk: choose color for %s"
msgstr "Gitk: välj färg för %s"
-#: gitk:10973
-msgid ""
-"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
-" Gitk requires at least Tcl/Tk 8.4."
-msgstr ""
-"Gitk kan tyvärr inte köra med denna version av Tcl/Tk.\n"
-" Gitk kräver åtminstone Tcl/Tk 8.4."
-
-#: gitk:11101
+#: gitk:11433
msgid "Cannot find a git repository here."
msgstr "Hittar inget gitk-arkiv här."
-#: gitk:11105
+#: gitk:11437
#, tcl-format
msgid "Cannot find the git directory \"%s\"."
msgstr "Hittar inte git-katalogen \"%s\"."
-#: gitk:11152
+#: gitk:11484
#, tcl-format
msgid "Ambiguous argument '%s': both revision and filename"
msgstr "Tvetydigt argument \"%s\": både revision och filnamn"
-#: gitk:11164
+#: gitk:11496
msgid "Bad arguments to gitk:"
msgstr "Felaktiga argument till gitk:"
-#: gitk:11249
+#: gitk:11587
msgid "Command line"
msgstr "Kommandorad"
+#~ msgid "SHA1 ID: "
+#~ msgstr "SHA1-id: "
+
+#~ msgid "- stopping\n"
+#~ msgstr "- stannar\n"
+
+#~ msgid ""
+#~ "Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+#~ " Gitk requires at least Tcl/Tk 8.4."
+#~ msgstr ""
+#~ "Gitk kan tyvärr inte köra med denna version av Tcl/Tk.\n"
+#~ " Gitk kräver åtminstone Tcl/Tk 8.4."
+
#~ msgid "Tag/Head %s is not known"
#~ msgstr "Tagg/huvud %s är okänt"
diff --git a/gitweb/Makefile b/gitweb/Makefile
new file mode 100644
index 0000000000..c9eb1ee667
--- /dev/null
+++ b/gitweb/Makefile
@@ -0,0 +1,129 @@
+# The default target of this Makefile is...
+all::
+
+# Define V=1 to have a more verbose compile.
+#
+# Define JSMIN to point to JavaScript minifier that functions as
+# a filter to have gitweb.js minified.
+#
+
+prefix ?= $(HOME)
+bindir ?= $(prefix)/bin
+RM ?= rm -f
+
+# JavaScript minifier invocation that can function as filter
+JSMIN ?=
+
+# default configuration for gitweb
+GITWEB_CONFIG = gitweb_config.perl
+GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf
+GITWEB_HOME_LINK_STR = projects
+GITWEB_SITENAME =
+GITWEB_PROJECTROOT = /pub/git
+GITWEB_PROJECT_MAXDEPTH = 2007
+GITWEB_EXPORT_OK =
+GITWEB_STRICT_EXPORT =
+GITWEB_BASE_URL =
+GITWEB_LIST =
+GITWEB_HOMETEXT = indextext.html
+GITWEB_CSS = gitweb.css
+GITWEB_LOGO = git-logo.png
+GITWEB_FAVICON = git-favicon.png
+ifdef JSMIN
+GITWEB_JS = gitweb.min.js
+else
+GITWEB_JS = gitweb.js
+endif
+GITWEB_SITE_HEADER =
+GITWEB_SITE_FOOTER =
+
+# include user config
+-include ../config.mak.autogen
+-include ../config.mak
+
+# determine version
+../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+ $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
+
+-include ../GIT-VERSION-FILE
+
+### Build rules
+
+SHELL_PATH ?= $(SHELL)
+PERL_PATH ?= /usr/bin/perl
+
+# Shell quote;
+bindir_SQ = $(subst ','\'',$(bindir)) #'
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) #'
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) #'
+
+# Quiet generation (unless V=1)
+QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
+QUIET_SUBDIR1 =
+
+ifneq ($(findstring $(MAKEFLAGS),w),w)
+PRINT_DIR = --no-print-directory
+else # "make -w"
+NO_SUBDIR = :
+endif
+
+ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifndef V
+ QUIET = @
+ QUIET_GEN = $(QUIET)echo ' ' GEN $@;
+ QUIET_SUBDIR0 = +@subdir=
+ QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
+ $(MAKE) $(PRINT_DIR) -C $$subdir
+ export V
+ export QUIET
+ export QUIET_GEN
+ export QUIET_SUBDIR0
+ export QUIET_SUBDIR1
+endif
+endif
+
+all:: gitweb.cgi
+
+ifdef JSMIN
+FILES=gitweb.cgi gitweb.min.js
+gitweb.cgi: gitweb.perl gitweb.min.js
+else # !JSMIN
+FILES=gitweb.cgi
+gitweb.cgi: gitweb.perl
+endif # JSMIN
+
+gitweb.cgi:
+ $(QUIET_GEN)$(RM) $@ $@+ && \
+ sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+ -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
+ -e 's|++GIT_BINDIR++|$(bindir)|g' \
+ -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
+ -e 's|++GITWEB_CONFIG_SYSTEM++|$(GITWEB_CONFIG_SYSTEM)|g' \
+ -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \
+ -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
+ -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
+ -e 's|"++GITWEB_PROJECT_MAXDEPTH++"|$(GITWEB_PROJECT_MAXDEPTH)|g' \
+ -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
+ -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
+ -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \
+ -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
+ -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
+ -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
+ -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
+ -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
+ -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
+ -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
+ -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
+ $< >$@+ && \
+ chmod +x $@+ && \
+ mv $@+ $@
+
+ifdef JSMIN
+gitweb.min.js: gitweb.js
+ $(QUIET_GEN)$(JSMIN) <$< >$@
+endif # JSMIN
+
+clean:
+ $(RM) $(FILES)
+
+.PHONY: all clean .FORCE-GIT-VERSION-FILE
diff --git a/gitweb/README b/gitweb/README
index e34ee793ef..ad6a04c464 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -174,7 +174,7 @@ not include variables usually directly set during build):
Base URL for relative URLs in pages generated by gitweb,
(e.g. $logo, $favicon, @stylesheets if they are relative URLs),
needed and used only for URLs with nonempty PATH_INFO via
- <base href="$base_url>. Usually gitweb sets its value correctly,
+ <base href="$base_url">. Usually gitweb sets its value correctly,
and there is no need to set this variable, e.g. to $my_uri or "/".
* $home_link
Target of the home link on top of all pages (the first part of view
@@ -228,6 +228,11 @@ not include variables usually directly set during build):
repositories from launching cross-site scripting (XSS) attacks. Set this
to true if you don't trust the content of your repositories. The default
is false.
+ * $maxload
+ Used to set the maximum load that we will still respond to gitweb queries.
+ If server load exceed this value then return "503 Service Unavaliable" error.
+ Server load is taken to be 0 if gitweb cannot determine its value. Set it to
+ undefined value to turn it off. The default is 300.
Projects list file format
@@ -307,12 +312,16 @@ If you want to have one URL for both gitweb and your http://
repositories, you can configure apache like this:
<VirtualHost *:80>
- ServerName git.example.org
- DocumentRoot /pub/git
- SetEnv GITWEB_CONFIG /etc/gitweb.conf
+ ServerName git.example.org
+ DocumentRoot /pub/git
+ SetEnv GITWEB_CONFIG /etc/gitweb.conf
+
+ # turning on mod rewrite
RewriteEngine on
+
# make the front page an internal rewrite to the gitweb script
RewriteRule ^/$ /cgi-bin/gitweb.cgi
+
# make access for "dumb clients" work
RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
</VirtualHost>
@@ -338,6 +347,63 @@ something like the following in your gitweb.conf (or gitweb_config.perl) file:
$home_link = "/";
+Webserver configuration with multiple projects' root
+----------------------------------------------------
+
+If you want to use gitweb with several project roots you can edit your apache
+virtual host and gitweb.conf configuration files like this :
+
+virtual host configuration :
+
+<VirtualHost *:80>
+ ServerName git.example.org
+ DocumentRoot /pub/git
+ SetEnv GITWEB_CONFIG /etc/gitweb.conf
+
+ # turning on mod rewrite
+ RewriteEngine on
+
+ # make the front page an internal rewrite to the gitweb script
+ RewriteRule ^/$ /cgi-bin/gitweb.cgi [QSA,L,PT]
+
+ # look for a public_git folder in unix users' home
+ # http://git.example.org/~<user>/
+ RewriteRule ^/\~([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
+
+ # http://git.example.org/+<user>/
+ #RewriteRule ^/\+([^\/]+)(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
+
+ # http://git.example.org/user/<user>/
+ #RewriteRule ^/user/([^\/]+)/(gitweb.cgi)?$ /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/home/$1/public_git/,L,PT]
+
+ # defined list of project roots
+ RewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/pub/scm/,L,PT]
+ RewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi [QSA,E=GITWEB_PROJECTROOT:/var/git/,L,PT]
+
+ # make access for "dumb clients" work
+ RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
+</VirtualHost>
+
+gitweb.conf configuration :
+
+$projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/pub/git";
+
+These configurations enable two things. First, each unix user (<user>) of the
+server will be able to browse through gitweb git repositories found in
+~/public_git/ with the following url : http://git.example.org/~<user>/
+
+If you do not want this feature on your server just remove the second rewrite rule.
+
+If you already use mod_userdir in your virtual host or you don't want to use
+the '~' as first character just comment or remove the second rewrite rule and
+uncomment one of the following according to what you want.
+
+Second, repositories found in /pub/scm/ and /var/git/ will be accesible
+through http://git.example.org/scm/ and http://git.example.org/var/.
+You can add as many project roots as you want by adding rewrite rules like the
+third and the fourth.
+
+
PATH_INFO usage
-----------------------
If you enable PATH_INFO usage in gitweb by putting
diff --git a/gitweb/gitweb.js b/gitweb/gitweb.js
index 2a25b7cc47..9c66928c4a 100644
--- a/gitweb/gitweb.js
+++ b/gitweb/gitweb.js
@@ -779,7 +779,12 @@ function handleResponse() {
}
// the server returned error
- if (xhr.readyState === 3 && xhr.status !== 200) {
+ // try ... catch block is to work around bug in IE8
+ try {
+ if (xhr.readyState === 3 && xhr.status !== 200) {
+ return;
+ }
+ } catch (e) {
return;
}
if (xhr.readyState === 4 && xhr.status !== 200) {
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7e477af956..a2d2283ec9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -221,6 +221,12 @@ our %avatar_size = (
'double' => 32
);
+# Used to set the maximum load that we will still respond to gitweb queries.
+# If server load exceed this value then return "503 server busy" error.
+# If gitweb cannot determined server load, it is taken to be 0.
+# Leave it undefined (or set to 'undef') to turn off load checking.
+our $maxload = 300;
+
# You define site-wide feature defaults here; override them with
# $GITWEB_CONFIG as necessary.
our %feature = (
@@ -448,7 +454,11 @@ sub gitweb_get_feature {
$feature{$name}{'sub'},
$feature{$name}{'override'},
@{$feature{$name}{'default'}});
- if (!$override) { return @defaults; }
+ # project specific override is possible only if we have project
+ our $git_dir; # global variable, declared later
+ if (!$override || !defined $git_dir) {
+ return @defaults;
+ }
if (!defined $sub) {
warn "feature $name is not overridable";
return @defaults;
@@ -544,11 +554,36 @@ sub filter_snapshot_fmts {
}
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
+our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
+# die if there are errors parsing config file
if (-e $GITWEB_CONFIG) {
do $GITWEB_CONFIG;
-} else {
- our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
- do $GITWEB_CONFIG_SYSTEM if -e $GITWEB_CONFIG_SYSTEM;
+ die $@ if $@;
+} elsif (-e $GITWEB_CONFIG_SYSTEM) {
+ do $GITWEB_CONFIG_SYSTEM;
+ die $@ if $@;
+}
+
+# Get loadavg of system, to compare against $maxload.
+# Currently it requires '/proc/loadavg' present to get loadavg;
+# if it is not present it returns 0, which means no load checking.
+sub get_loadavg {
+ if( -e '/proc/loadavg' ){
+ open my $fd, '<', '/proc/loadavg'
+ or return 0;
+ my @load = split(/\s+/, scalar <$fd>);
+ close $fd;
+
+ # The first three columns measure CPU and IO utilization of the last one,
+ # five, and 10 minute periods. The fourth column shows the number of
+ # currently running processes and the total number of processes in the m/n
+ # format. The last column displays the last process ID used.
+ return $load[0] || 0;
+ }
+ # additional checks for load average should go here for things that don't export
+ # /proc/loadavg
+
+ return 0;
}
# version of the core git binary
@@ -557,6 +592,10 @@ $number_of_git_cmds++;
$projects_list ||= $projectroot;
+if (defined $maxload && get_loadavg() > $maxload) {
+ die_error(503, "The load average on the server is too high");
+}
+
# ======================================================================
# input validation and dispatch
@@ -1111,6 +1150,7 @@ sub validate_refname {
# in utf-8 thanks to "binmode STDOUT, ':utf8'" at beginning
sub to_utf8 {
my $str = shift;
+ return undef unless defined $str;
if (utf8::valid($str)) {
utf8::decode($str);
return $str;
@@ -1123,6 +1163,7 @@ sub to_utf8 {
# correct, but quoted slashes look too horrible in bookmarks
sub esc_param {
my $str = shift;
+ return undef unless defined $str;
$str =~ s/([^A-Za-z0-9\-_.~()\/:@ ]+)/CGI::escape($1)/eg;
$str =~ s/ /\+/g;
return $str;
@@ -1131,6 +1172,7 @@ sub esc_param {
# quote unsafe chars in whole URL, so some charactrs cannot be quoted
sub esc_url {
my $str = shift;
+ return undef unless defined $str;
$str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&=])/sprintf("%%%02X", ord($1))/eg;
$str =~ s/\+/%2B/g;
$str =~ s/ /\+/g;
@@ -1142,6 +1184,8 @@ sub esc_html {
my $str = shift;
my %opts = @_;
+ return undef unless defined $str;
+
$str = to_utf8($str);
$str = $cgi->escapeHTML($str);
if ($opts{'-nbsp'}) {
@@ -1156,6 +1200,8 @@ sub esc_path {
my $str = shift;
my %opts = @_;
+ return undef unless defined $str;
+
$str = to_utf8($str);
$str = $cgi->escapeHTML($str);
if ($opts{'-nbsp'}) {
@@ -1298,7 +1344,6 @@ sub chop_str {
$str =~ m/^(.*?)($begre)$/;
my ($lead, $body) = ($1, $2);
if (length($lead) > 4) {
- $body =~ s/^[^;]*;// if ($lead =~ m/&[^;]*$/);
$lead = " ...";
}
return "$lead$body";
@@ -1309,8 +1354,6 @@ sub chop_str {
$str =~ m/^(.*?)($begre)$/;
my ($mid, $right) = ($1, $2);
if (length($mid) > 5) {
- $left =~ s/&[^;]*$//;
- $right =~ s/^[^;]*;// if ($mid =~ m/&[^;]*$/);
$mid = " ... ";
}
return "$left$mid$right";
@@ -1320,7 +1363,6 @@ sub chop_str {
my $body = $1;
my $tail = $2;
if (length($tail) > 4) {
- $body =~ s/&[^;]*$//;
$tail = "... ";
}
return "$body$tail";
@@ -2174,6 +2216,9 @@ sub config_to_multi {
sub git_get_project_config {
my ($key, $type) = @_;
+ # do we have project
+ return unless (defined $project && defined $git_dir);
+
# key sanity check
return unless ($key);
$key =~ s/^gitweb\.//;
@@ -3222,7 +3267,7 @@ EOF
print "</head>\n" .
"<body>\n";
- if (-f $site_header) {
+ if (defined $site_header && -f $site_header) {
insert_file($site_header);
}
@@ -3323,12 +3368,13 @@ sub git_footer_html {
print "</div>\n"; # class="page_footer"
}
- if (-f $site_footer) {
+ if (defined $site_footer && -f $site_footer) {
insert_file($site_footer);
}
print qq!<script type="text/javascript" src="$javascript"></script>\n!;
- if ($action eq 'blame_incremental') {
+ if (defined $action &&
+ $action eq 'blame_incremental') {
print qq!<script type="text/javascript">\n!.
qq!startBlame("!. href(action=>"blame_data", -replay=>1) .qq!",\n!.
qq! "!. href() .qq!");\n!.
@@ -3343,7 +3389,7 @@ sub git_footer_html {
"</html>";
}
-# die_error(<http_status_code>, <error_message>)
+# die_error(<http_status_code>, <error_message>[, <detailed_html_description>])
# Example: die_error(404, 'Hash not found')
# By convention, use the following status codes (as defined in RFC 2616):
# 400: Invalid or missing CGI parameters, or
@@ -3354,22 +3400,33 @@ sub git_footer_html {
# 500: The server isn't configured properly, or
# an internal error occurred (e.g. failed assertions caused by bugs), or
# an unknown error occurred (e.g. the git binary died unexpectedly).
+# 503: The server is currently unavailable (because it is overloaded,
+# or down for maintenance). Generally, this is a temporary state.
sub die_error {
my $status = shift || 500;
- my $error = shift || "Internal server error";
-
- my %http_responses = (400 => '400 Bad Request',
- 403 => '403 Forbidden',
- 404 => '404 Not Found',
- 500 => '500 Internal Server Error');
+ my $error = esc_html(shift) || "Internal Server Error";
+ my $extra = shift;
+
+ my %http_responses = (
+ 400 => '400 Bad Request',
+ 403 => '403 Forbidden',
+ 404 => '404 Not Found',
+ 500 => '500 Internal Server Error',
+ 503 => '503 Service Unavailable',
+ );
git_header_html($http_responses{$status});
print <<EOF;
<div class="page_body">
<br /><br />
$status - $error
<br />
-</div>
EOF
+ if (defined $extra) {
+ print "<hr />\n" .
+ "$extra\n";
+ }
+ print "</div>\n";
+
git_footer_html();
exit;
}
@@ -3471,14 +3528,21 @@ sub git_print_header_div {
}
sub print_local_time {
+ print format_local_time(@_);
+}
+
+sub format_local_time {
+ my $localtime = '';
my %date = @_;
if ($date{'hour_local'} < 6) {
- printf(" (<span class=\"atnight\">%02d:%02d</span> %s)",
+ $localtime .= sprintf(" (<span class=\"atnight\">%02d:%02d</span> %s)",
$date{'hour_local'}, $date{'minute_local'}, $date{'tz_local'});
} else {
- printf(" (%02d:%02d %s)",
+ $localtime .= sprintf(" (%02d:%02d %s)",
$date{'hour_local'}, $date{'minute_local'}, $date{'tz_local'});
}
+
+ return $localtime;
}
# Outputs the author name and date in long form
@@ -4302,17 +4366,24 @@ sub fill_project_list_info {
# print 'sort by' <th> element, generating 'sort by $name' replay link
# if that order is not selected
sub print_sort_th {
+ print format_sort_th(@_);
+}
+
+sub format_sort_th {
my ($name, $order, $header) = @_;
+ my $sort_th = "";
$header ||= ucfirst($name);
if ($order eq $name) {
- print "<th>$header</th>\n";
+ $sort_th .= "<th>$header</th>\n";
} else {
- print "<th>" .
- $cgi->a({-href => href(-replay=>1, order=>$name),
- -class => "header"}, $header) .
- "</th>\n";
+ $sort_th .= "<th>" .
+ $cgi->a({-href => href(-replay=>1, order=>$name),
+ -class => "header"}, $header) .
+ "</th>\n";
}
+
+ return $sort_th;
}
sub git_project_list_body {
@@ -4743,7 +4814,7 @@ sub git_project_list {
}
git_header_html();
- if (-f $home_text) {
+ if (defined $home_text && -f $home_text) {
print "<div class=\"index_include\">\n";
insert_file($home_text);
print "</div>\n";
diff --git a/graph.c b/graph.c
index 6746d422a9..e6bbcaa8c4 100644
--- a/graph.c
+++ b/graph.c
@@ -80,12 +80,12 @@ static char column_colors[][COLOR_MAXLEN] = {
GIT_COLOR_BLUE,
GIT_COLOR_MAGENTA,
GIT_COLOR_CYAN,
- GIT_COLOR_BOLD GIT_COLOR_RED,
- GIT_COLOR_BOLD GIT_COLOR_GREEN,
- GIT_COLOR_BOLD GIT_COLOR_YELLOW,
- GIT_COLOR_BOLD GIT_COLOR_BLUE,
- GIT_COLOR_BOLD GIT_COLOR_MAGENTA,
- GIT_COLOR_BOLD GIT_COLOR_CYAN,
+ GIT_COLOR_BOLD_RED,
+ GIT_COLOR_BOLD_GREEN,
+ GIT_COLOR_BOLD_YELLOW,
+ GIT_COLOR_BOLD_BLUE,
+ GIT_COLOR_BOLD_MAGENTA,
+ GIT_COLOR_BOLD_CYAN,
};
#define COLUMN_COLORS_MAX (ARRAY_SIZE(column_colors))
diff --git a/grep.c b/grep.c
index 8e1f7de771..fdc4206268 100644
--- a/grep.c
+++ b/grep.c
@@ -11,8 +11,8 @@ void append_header_grep_pattern(struct grep_opt *opt, enum grep_header_field fie
p->no = 0;
p->token = GREP_PATTERN_HEAD;
p->field = field;
- *opt->pattern_tail = p;
- opt->pattern_tail = &p->next;
+ *opt->header_tail = p;
+ opt->header_tail = &p->next;
p->next = NULL;
}
@@ -29,17 +29,36 @@ void append_grep_pattern(struct grep_opt *opt, const char *pat,
p->next = NULL;
}
+struct grep_opt *grep_opt_dup(const struct grep_opt *opt)
+{
+ struct grep_pat *pat;
+ struct grep_opt *ret = xmalloc(sizeof(struct grep_opt));
+ *ret = *opt;
+
+ ret->pattern_list = NULL;
+ ret->pattern_tail = &ret->pattern_list;
+
+ for(pat = opt->pattern_list; pat != NULL; pat = pat->next)
+ {
+ if(pat->token == GREP_PATTERN_HEAD)
+ append_header_grep_pattern(ret, pat->field,
+ pat->pattern);
+ else
+ append_grep_pattern(ret, pat->pattern, pat->origin,
+ pat->no, pat->token);
+ }
+
+ return ret;
+}
+
static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
{
int err;
p->word_regexp = opt->word_regexp;
p->ignore_case = opt->ignore_case;
+ p->fixed = opt->fixed;
- if (opt->fixed)
- p->fixed = 1;
- if (opt->regflags & REG_ICASE)
- p->fixed = 0;
if (p->fixed)
return;
@@ -165,9 +184,26 @@ static struct grep_expr *compile_pattern_expr(struct grep_pat **list)
void compile_grep_patterns(struct grep_opt *opt)
{
struct grep_pat *p;
-
- if (opt->all_match)
- opt->extended = 1;
+ struct grep_expr *header_expr = NULL;
+
+ if (opt->header_list) {
+ p = opt->header_list;
+ header_expr = compile_pattern_expr(&p);
+ if (p)
+ die("incomplete pattern expression: %s", p->pattern);
+ for (p = opt->header_list; p; p = p->next) {
+ switch (p->token) {
+ case GREP_PATTERN: /* atom */
+ case GREP_PATTERN_HEAD:
+ case GREP_PATTERN_BODY:
+ compile_regexp(p, opt);
+ break;
+ default:
+ opt->extended = 1;
+ break;
+ }
+ }
+ }
for (p = opt->pattern_list; p; p = p->next) {
switch (p->token) {
@@ -182,7 +218,9 @@ void compile_grep_patterns(struct grep_opt *opt)
}
}
- if (!opt->extended)
+ if (opt->all_match || header_expr)
+ opt->extended = 1;
+ else if (!opt->extended)
return;
/* Then bundle them up in an expression.
@@ -193,6 +231,21 @@ void compile_grep_patterns(struct grep_opt *opt)
opt->pattern_expression = compile_pattern_expr(&p);
if (p)
die("incomplete pattern expression: %s", p->pattern);
+
+ if (!header_expr)
+ return;
+
+ if (opt->pattern_expression) {
+ struct grep_expr *z;
+ z = xcalloc(1, sizeof(*z));
+ z->node = GREP_NODE_OR;
+ z->u.binary.left = opt->pattern_expression;
+ z->u.binary.right = header_expr;
+ opt->pattern_expression = z;
+ } else {
+ opt->pattern_expression = header_expr;
+ }
+ opt->all_match = 1;
}
static void free_pattern_expr(struct grep_expr *x)
@@ -251,9 +304,29 @@ static int word_char(char ch)
return isalnum(ch) || ch == '_';
}
+static void output_color(struct grep_opt *opt, const void *data, size_t size,
+ const char *color)
+{
+ if (opt->color && color && color[0]) {
+ opt->output(opt, color, strlen(color));
+ opt->output(opt, data, size);
+ opt->output(opt, GIT_COLOR_RESET, strlen(GIT_COLOR_RESET));
+ } else
+ opt->output(opt, data, size);
+}
+
+static void output_sep(struct grep_opt *opt, char sign)
+{
+ if (opt->null_following_name)
+ opt->output(opt, "\0", 1);
+ else
+ output_color(opt, &sign, 1, opt->color_sep);
+}
+
static void show_name(struct grep_opt *opt, const char *name)
{
- printf("%s%c", name, opt->null_following_name ? '\0' : '\n');
+ output_color(opt, name, strlen(name), opt->color_filename);
+ opt->output(opt, opt->null_following_name ? "\0" : "\n", 1);
}
@@ -490,46 +563,61 @@ static void show_line(struct grep_opt *opt, char *bol, char *eol,
const char *name, unsigned lno, char sign)
{
int rest = eol - bol;
+ char *line_color = NULL;
if (opt->pre_context || opt->post_context) {
if (opt->last_shown == 0) {
- if (opt->show_hunk_mark)
- fputs("--\n", stdout);
- else
+ if (opt->show_hunk_mark) {
+ output_color(opt, "--", 2, opt->color_sep);
+ opt->output(opt, "\n", 1);
+ } else
opt->show_hunk_mark = 1;
- } else if (lno > opt->last_shown + 1)
- fputs("--\n", stdout);
+ } else if (lno > opt->last_shown + 1) {
+ output_color(opt, "--", 2, opt->color_sep);
+ opt->output(opt, "\n", 1);
+ }
}
opt->last_shown = lno;
- if (opt->null_following_name)
- sign = '\0';
- if (opt->pathname)
- printf("%s%c", name, sign);
- if (opt->linenum)
- printf("%d%c", lno, sign);
+ if (opt->pathname) {
+ output_color(opt, name, strlen(name), opt->color_filename);
+ output_sep(opt, sign);
+ }
+ if (opt->linenum) {
+ char buf[32];
+ snprintf(buf, sizeof(buf), "%d", lno);
+ output_color(opt, buf, strlen(buf), opt->color_lineno);
+ output_sep(opt, sign);
+ }
if (opt->color) {
regmatch_t match;
enum grep_context ctx = GREP_CONTEXT_BODY;
int ch = *eol;
int eflags = 0;
+ if (sign == ':')
+ line_color = opt->color_selected;
+ else if (sign == '-')
+ line_color = opt->color_context;
+ else if (sign == '=')
+ line_color = opt->color_function;
*eol = '\0';
while (next_match(opt, bol, eol, ctx, &match, eflags)) {
if (match.rm_so == match.rm_eo)
break;
- printf("%.*s%s%.*s%s",
- (int)match.rm_so, bol,
- opt->color_match,
- (int)(match.rm_eo - match.rm_so), bol + match.rm_so,
- GIT_COLOR_RESET);
+
+ output_color(opt, bol, match.rm_so, line_color);
+ output_color(opt, bol + match.rm_so,
+ match.rm_eo - match.rm_so,
+ opt->color_match);
bol += match.rm_eo;
rest -= match.rm_eo;
eflags = REG_NOTBOL;
}
*eol = ch;
}
- printf("%.*s\n", rest, bol);
+ output_color(opt, bol, rest, line_color);
+ opt->output(opt, "\n", 1);
}
static int match_funcname(struct grep_opt *opt, char *bol, char *eol)
@@ -640,8 +728,15 @@ static int look_ahead(struct grep_opt *opt,
if (p->fixed)
hit = !fixmatch(p->pattern, bol, p->ignore_case, &m);
- else
+ else {
+#ifdef REG_STARTEND
+ m.rm_so = 0;
+ m.rm_eo = *left_p;
+ hit = !regexec(&p->regexp, bol, 1, &m, REG_STARTEND);
+#else
hit = !regexec(&p->regexp, bol, 1, &m, 0);
+#endif
+ }
if (!hit || m.rm_so < 0 || m.rm_eo < 0)
continue;
if (earliest < 0 || m.rm_so < earliest)
@@ -667,6 +762,32 @@ static int look_ahead(struct grep_opt *opt,
return 0;
}
+int grep_threads_ok(const struct grep_opt *opt)
+{
+ /* If this condition is true, then we may use the attribute
+ * machinery in grep_buffer_1. The attribute code is not
+ * thread safe, so we disable the use of threads.
+ */
+ if (opt->funcname && !opt->unmatch_name_only && !opt->status_only &&
+ !opt->name_only)
+ return 0;
+
+ /* If we are showing hunk marks, we should not do it for the
+ * first match. The synchronization problem we get for this
+ * constraint is not yet solved, so we disable threading in
+ * this case.
+ */
+ if (opt->pre_context || opt->post_context)
+ return 0;
+
+ return 1;
+}
+
+static void std_output(struct grep_opt *opt, const void *buf, size_t size)
+{
+ fwrite(buf, size, 1, stdout);
+}
+
static int grep_buffer_1(struct grep_opt *opt, const char *name,
char *buf, unsigned long size, int collect_hits)
{
@@ -682,6 +803,9 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
opt->last_shown = 0;
+ if (!opt->output)
+ opt->output = std_output;
+
if (buffer_is_binary(buf, size)) {
switch (opt->binary) {
case GREP_BINARY_DEFAULT:
@@ -754,7 +878,10 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
if (opt->status_only)
return 1;
if (binary_match_only) {
- printf("Binary file %s matches\n", name);
+ opt->output(opt, "Binary file ", 12);
+ output_color(opt, name, strlen(name),
+ opt->color_filename);
+ opt->output(opt, " matches\n", 9);
return 1;
}
if (opt->name_only) {
@@ -810,9 +937,13 @@ static int grep_buffer_1(struct grep_opt *opt, const char *name,
* which feels mostly useless but sometimes useful. Maybe
* make it another option? For now suppress them.
*/
- if (opt->count && count)
- printf("%s%c%u\n", name,
- opt->null_following_name ? '\0' : ':', count);
+ if (opt->count && count) {
+ char buf[32];
+ output_color(opt, name, strlen(name), opt->color_filename);
+ output_sep(opt, ':');
+ snprintf(buf, sizeof(buf), "%u\n", count);
+ opt->output(opt, buf, strlen(buf));
+ }
return !!last_hit;
}
diff --git a/grep.h b/grep.h
index 0c61b00cbf..89342e5b47 100644
--- a/grep.h
+++ b/grep.h
@@ -59,6 +59,8 @@ struct grep_expr {
struct grep_opt {
struct grep_pat *pattern_list;
struct grep_pat **pattern_tail;
+ struct grep_pat *header_list;
+ struct grep_pat **header_tail;
struct grep_expr *pattern_expression;
const char *prefix;
int prefix_length;
@@ -84,13 +86,22 @@ struct grep_opt {
int color;
int max_depth;
int funcname;
+ char color_context[COLOR_MAXLEN];
+ char color_filename[COLOR_MAXLEN];
+ char color_function[COLOR_MAXLEN];
+ char color_lineno[COLOR_MAXLEN];
char color_match[COLOR_MAXLEN];
+ char color_selected[COLOR_MAXLEN];
+ char color_sep[COLOR_MAXLEN];
int regflags;
unsigned pre_context;
unsigned post_context;
unsigned last_shown;
int show_hunk_mark;
void *priv;
+
+ void (*output)(struct grep_opt *opt, const void *data, size_t size);
+ void *output_priv;
};
extern void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);
@@ -99,4 +110,7 @@ extern void compile_grep_patterns(struct grep_opt *opt);
extern void free_grep_patterns(struct grep_opt *opt);
extern int grep_buffer(struct grep_opt *opt, const char *name, char *buf, unsigned long size);
+extern struct grep_opt *grep_opt_dup(const struct grep_opt *opt);
+extern int grep_threads_ok(const struct grep_opt *opt);
+
#endif
diff --git a/help.c b/help.c
index 9da97d7462..7f4928e459 100644
--- a/help.c
+++ b/help.c
@@ -350,7 +350,7 @@ const char *help_unknown_cmd(const char *cmd)
return assumed;
}
- fprintf(stderr, "git: '%s' is not a git-command. See 'git --help'.\n", cmd);
+ fprintf(stderr, "git: '%s' is not a git command. See 'git --help'.\n", cmd);
if (SIMILAR_ENOUGH(best_similarity)) {
fprintf(stderr, "\nDid you mean %s?\n",
diff --git a/http-fetch.c b/http-fetch.c
index ffd0ad7e29..762c750d7a 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "exec_cmd.h"
+#include "http.h"
#include "walker.h"
static const char http_fetch_usage[] = "git http-fetch "
@@ -69,7 +70,8 @@ int main(int argc, const char **argv)
url = rewritten_url;
}
- walker = get_http_walker(url, NULL);
+ http_init(NULL);
+ walker = get_http_walker(url);
walker->get_tree = get_tree;
walker->get_history = get_history;
walker->get_all = get_all;
@@ -89,6 +91,7 @@ int main(int argc, const char **argv)
}
walker_free(walker);
+ http_cleanup();
free(rewritten_url);
diff --git a/http-push.c b/http-push.c
index 432b20f2d9..415b1ab0a7 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1965,7 +1965,7 @@ int main(int argc, char **argv)
}
if (!hashcmp(ref->old_sha1, ref->peer_ref->new_sha1)) {
- if (push_verbosely || 1)
+ if (push_verbosely)
fprintf(stderr, "'%s': up-to-date\n", ref->name);
if (helper_status)
printf("ok %s up to date\n", ref->name);
diff --git a/http-walker.c b/http-walker.c
index 700bc13112..ef99ae647a 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -543,17 +543,30 @@ static int fetch_ref(struct walker *walker, struct ref *ref)
static void cleanup(struct walker *walker)
{
- http_cleanup();
+ struct walker_data *data = walker->data;
+ struct alt_base *alt, *alt_next;
+
+ if (data) {
+ alt = data->alt;
+ while (alt) {
+ alt_next = alt->next;
+
+ free(alt->base);
+ free(alt);
+
+ alt = alt_next;
+ }
+ free(data);
+ walker->data = NULL;
+ }
}
-struct walker *get_http_walker(const char *url, struct remote *remote)
+struct walker *get_http_walker(const char *url)
{
char *s;
struct walker_data *data = xmalloc(sizeof(struct walker_data));
struct walker *walker = xmalloc(sizeof(struct walker));
- http_init(remote);
-
data->alt = xmalloc(sizeof(*data->alt));
data->alt->base = xmalloc(strlen(url) + 1);
strcpy(data->alt->base, url);
diff --git a/http.c b/http.c
index deab59551d..4814217c64 100644
--- a/http.c
+++ b/http.c
@@ -204,7 +204,7 @@ static void init_curl_http_auth(CURL *result)
if (user_name) {
struct strbuf up = STRBUF_INIT;
if (!user_pass)
- user_pass = xstrdup(getpass("Password: "));
+ user_pass = xstrdup(git_getpass("Password: "));
strbuf_addf(&up, "%s:%s", user_name, user_pass);
curl_easy_setopt(result, CURLOPT_USERPWD,
strbuf_detach(&up, NULL));
@@ -219,7 +219,7 @@ static int has_cert_password(void)
return 0;
/* Only prompt the user once. */
ssl_cert_password_required = -1;
- ssl_cert_password = getpass("Certificate Password: ");
+ ssl_cert_password = git_getpass("Certificate Password: ");
if (ssl_cert_password != NULL) {
ssl_cert_password = xstrdup(ssl_cert_password);
return 1;
diff --git a/imap-send.c b/imap-send.c
index 51f371ba9f..7107923a39 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -27,6 +27,9 @@
#include "run-command.h"
#ifdef NO_OPENSSL
typedef void *SSL;
+#else
+#include <openssl/evp.h>
+#include <openssl/hmac.h>
#endif
struct store_conf {
@@ -91,7 +94,6 @@ struct msg_data {
char *data;
int len;
unsigned char flags;
- unsigned int crlf:1;
};
static const char imap_send_usage[] = "git imap-send < <mbox>";
@@ -140,6 +142,20 @@ struct imap_server_conf {
int use_ssl;
int ssl_verify;
int use_html;
+ char *auth_method;
+};
+
+static struct imap_server_conf server = {
+ NULL, /* name */
+ NULL, /* tunnel */
+ NULL, /* host */
+ 0, /* port */
+ NULL, /* user */
+ NULL, /* pass */
+ 0, /* use_ssl */
+ 1, /* ssl_verify */
+ 0, /* use_html */
+ NULL, /* auth_method */
};
struct imap_store_conf {
@@ -214,6 +230,7 @@ enum CAPABILITY {
LITERALPLUS,
NAMESPACE,
STARTTLS,
+ AUTH_CRAM_MD5,
};
static const char *cap_list[] = {
@@ -222,6 +239,7 @@ static const char *cap_list[] = {
"LITERAL+",
"NAMESPACE",
"STARTTLS",
+ "AUTH=CRAM-MD5",
};
#define RESP_OK 0
@@ -949,6 +967,87 @@ static void imap_close_store(struct store *ctx)
free(ctx);
}
+#ifndef NO_OPENSSL
+
+/*
+ * hexchar() and cram() functions are based on the code from the isync
+ * project (http://isync.sf.net/).
+ */
+static char hexchar(unsigned int b)
+{
+ return b < 10 ? '0' + b : 'a' + (b - 10);
+}
+
+#define ENCODED_SIZE(n) (4*((n+2)/3))
+static char *cram(const char *challenge_64, const char *user, const char *pass)
+{
+ int i, resp_len, encoded_len, decoded_len;
+ HMAC_CTX hmac;
+ unsigned char hash[16];
+ char hex[33];
+ char *response, *response_64, *challenge;
+
+ /*
+ * length of challenge_64 (i.e. base-64 encoded string) is a good
+ * enough upper bound for challenge (decoded result).
+ */
+ encoded_len = strlen(challenge_64);
+ challenge = xmalloc(encoded_len);
+ decoded_len = EVP_DecodeBlock((unsigned char *)challenge,
+ (unsigned char *)challenge_64, encoded_len);
+ if (decoded_len < 0)
+ die("invalid challenge %s", challenge_64);
+ HMAC_Init(&hmac, (unsigned char *)pass, strlen(pass), EVP_md5());
+ HMAC_Update(&hmac, (unsigned char *)challenge, decoded_len);
+ HMAC_Final(&hmac, hash, NULL);
+ HMAC_CTX_cleanup(&hmac);
+
+ hex[32] = 0;
+ for (i = 0; i < 16; i++) {
+ hex[2 * i] = hexchar((hash[i] >> 4) & 0xf);
+ hex[2 * i + 1] = hexchar(hash[i] & 0xf);
+ }
+
+ /* response: "<user> <digest in hex>" */
+ resp_len = strlen(user) + 1 + strlen(hex) + 1;
+ response = xmalloc(resp_len);
+ sprintf(response, "%s %s", user, hex);
+
+ response_64 = xmalloc(ENCODED_SIZE(resp_len) + 1);
+ encoded_len = EVP_EncodeBlock((unsigned char *)response_64,
+ (unsigned char *)response, resp_len);
+ if (encoded_len < 0)
+ die("EVP_EncodeBlock error");
+ response_64[encoded_len] = '\0';
+ return (char *)response_64;
+}
+
+#else
+
+static char *cram(const char *challenge_64, const char *user, const char *pass)
+{
+ die("If you want to use CRAM-MD5 authenticate method, "
+ "you have to build git-imap-send with OpenSSL library.");
+}
+
+#endif
+
+static int auth_cram_md5(struct imap_store *ctx, struct imap_cmd *cmd, const char *prompt)
+{
+ int ret;
+ char *response;
+
+ response = cram(prompt, server.user, server.pass);
+
+ ret = socket_write(&ctx->imap->buf.sock, response, strlen(response));
+ if (ret != strlen(response))
+ return error("IMAP error: sending response failed\n");
+
+ free(response);
+
+ return 0;
+}
+
static struct store *imap_open_store(struct imap_server_conf *srvc)
{
struct imap_store *ctx;
@@ -1108,7 +1207,7 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
if (!srvc->pass) {
char prompt[80];
sprintf(prompt, "Password (%s@%s): ", srvc->user, srvc->host);
- arg = getpass(prompt);
+ arg = git_getpass(prompt);
if (!arg) {
perror("getpass");
exit(1);
@@ -1127,12 +1226,37 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
fprintf(stderr, "Skipping account %s@%s, server forbids LOGIN\n", srvc->user, srvc->host);
goto bail;
}
- if (!imap->buf.sock.ssl)
- imap_warn("*** IMAP Warning *** Password is being "
- "sent in the clear\n");
- if (imap_exec(ctx, NULL, "LOGIN \"%s\" \"%s\"", srvc->user, srvc->pass) != RESP_OK) {
- fprintf(stderr, "IMAP error: LOGIN failed\n");
- goto bail;
+
+ if (srvc->auth_method) {
+ struct imap_cmd_cb cb;
+
+ if (!strcmp(srvc->auth_method, "CRAM-MD5")) {
+ if (!CAP(AUTH_CRAM_MD5)) {
+ fprintf(stderr, "You specified"
+ "CRAM-MD5 as authentication method, "
+ "but %s doesn't support it.\n", srvc->host);
+ goto bail;
+ }
+ /* CRAM-MD5 */
+
+ memset(&cb, 0, sizeof(cb));
+ cb.cont = auth_cram_md5;
+ if (imap_exec(ctx, &cb, "AUTHENTICATE CRAM-MD5") != RESP_OK) {
+ fprintf(stderr, "IMAP error: AUTHENTICATE CRAM-MD5 failed\n");
+ goto bail;
+ }
+ } else {
+ fprintf(stderr, "Unknown authentication method:%s\n", srvc->host);
+ goto bail;
+ }
+ } else {
+ if (!imap->buf.sock.ssl)
+ imap_warn("*** IMAP Warning *** Password is being "
+ "sent in the clear\n");
+ if (imap_exec(ctx, NULL, "LOGIN \"%s\" \"%s\"", srvc->user, srvc->pass) != RESP_OK) {
+ fprintf(stderr, "IMAP error: LOGIN failed\n");
+ goto bail;
+ }
}
} /* !preauth */
@@ -1162,6 +1286,44 @@ static int imap_make_flags(int flags, char *buf)
return d;
}
+static void lf_to_crlf(struct msg_data *msg)
+{
+ char *new;
+ int i, j, lfnum = 0;
+
+ if (msg->data[0] == '\n')
+ lfnum++;
+ for (i = 1; i < msg->len; i++) {
+ if (msg->data[i - 1] != '\r' && msg->data[i] == '\n')
+ lfnum++;
+ }
+
+ new = xmalloc(msg->len + lfnum);
+ if (msg->data[0] == '\n') {
+ new[0] = '\r';
+ new[1] = '\n';
+ i = 1;
+ j = 2;
+ } else {
+ new[0] = msg->data[0];
+ i = 1;
+ j = 1;
+ }
+ for ( ; i < msg->len; i++) {
+ if (msg->data[i] != '\n') {
+ new[j++] = msg->data[i];
+ continue;
+ }
+ if (msg->data[i - 1] != '\r')
+ new[j++] = '\r';
+ /* otherwise it already had CR before */
+ new[j++] = '\n';
+ }
+ msg->len += lfnum;
+ free(msg->data);
+ msg->data = new;
+}
+
static int imap_store_msg(struct store *gctx, struct msg_data *data)
{
struct imap_store *ctx = (struct imap_store *)gctx;
@@ -1171,6 +1333,7 @@ static int imap_store_msg(struct store *gctx, struct msg_data *data)
int ret, d;
char flagstr[128];
+ lf_to_crlf(data);
memset(&cb, 0, sizeof(cb));
cb.dlen = data->len;
@@ -1310,18 +1473,6 @@ static int split_msg(struct msg_data *all_msgs, struct msg_data *msg, int *ofs)
return 1;
}
-static struct imap_server_conf server = {
- NULL, /* name */
- NULL, /* tunnel */
- NULL, /* host */
- 0, /* port */
- NULL, /* user */
- NULL, /* pass */
- 0, /* use_ssl */
- 1, /* ssl_verify */
- 0, /* use_html */
-};
-
static char *imap_folder;
static int git_imap_config(const char *key, const char *val, void *cb)
@@ -1331,11 +1482,16 @@ static int git_imap_config(const char *key, const char *val, void *cb)
if (strncmp(key, imap_key, sizeof imap_key - 1))
return 0;
- if (!val)
- return config_error_nonbool(key);
-
key += sizeof imap_key - 1;
+ /* check booleans first, and barf on others */
+ if (!strcmp("sslverify", key))
+ server.ssl_verify = git_config_bool(key, val);
+ else if (!strcmp("preformattedhtml", key))
+ server.use_html = git_config_bool(key, val);
+ else if (!val)
+ return config_error_nonbool(key);
+
if (!strcmp("folder", key)) {
imap_folder = xstrdup(val);
} else if (!strcmp("host", key)) {
@@ -1356,10 +1512,9 @@ static int git_imap_config(const char *key, const char *val, void *cb)
server.port = git_config_int(key, val);
else if (!strcmp("tunnel", key))
server.tunnel = xstrdup(val);
- else if (!strcmp("sslverify", key))
- server.ssl_verify = git_config_bool(key, val);
- else if (!strcmp("preformattedHTML", key))
- server.use_html = git_config_bool(key, val);
+ else if (!strcmp("authmethod", key))
+ server.auth_method = xstrdup(val);
+
return 0;
}
diff --git a/levenshtein.h b/levenshtein.h
index 0173abeef5..4105bf3549 100644
--- a/levenshtein.h
+++ b/levenshtein.h
@@ -2,7 +2,7 @@
#define LEVENSHTEIN_H
int levenshtein(const char *string1, const char *string2,
- int swap_penalty, int substition_penalty,
+ int swap_penalty, int substitution_penalty,
int insertion_penalty, int deletion_penalty);
#endif
diff --git a/ll-merge.c b/ll-merge.c
index 4c7f11ba84..82c7742e41 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -63,8 +63,6 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused,
int flag, int marker_size)
{
xmparam_t xmp;
- int style = 0;
- int favor = (flag >> 1) & 03;
if (buffer_is_binary(orig->ptr, orig->size) ||
buffer_is_binary(src1->ptr, src1->size) ||
@@ -79,15 +77,13 @@ static int ll_xdl_merge(const struct ll_merge_driver *drv_unused,
}
memset(&xmp, 0, sizeof(xmp));
+ xmp.level = XDL_MERGE_ZEALOUS;
+ xmp.favor= (flag >> 1) & 03;
if (git_xmerge_style >= 0)
- style = git_xmerge_style;
+ xmp.style = git_xmerge_style;
if (marker_size > 0)
xmp.marker_size = marker_size;
- return xdl_merge(orig,
- src1, name1,
- src2, name2,
- &xmp, XDL_MERGE_FLAGS(XDL_MERGE_ZEALOUS, style, favor),
- result);
+ return xdl_merge(orig, src1, name1, src2, name2, &xmp, result);
}
static int ll_union_merge(const struct ll_merge_driver *drv_unused,
@@ -98,44 +94,11 @@ static int ll_union_merge(const struct ll_merge_driver *drv_unused,
mmfile_t *src2, const char *name2,
int flag, int marker_size)
{
- char *src, *dst;
- long size;
- int status, saved_style;
-
- /* We have to force the RCS "merge" style */
- saved_style = git_xmerge_style;
- git_xmerge_style = 0;
- status = ll_xdl_merge(drv_unused, result, path_unused,
- orig, src1, NULL, src2, NULL,
- flag, marker_size);
- git_xmerge_style = saved_style;
- if (status <= 0)
- return status;
- size = result->size;
- src = dst = result->ptr;
- while (size) {
- char ch;
- if ((marker_size < size) &&
- (*src == '<' || *src == '=' || *src == '>')) {
- int i;
- ch = *src;
- for (i = 0; i < marker_size; i++)
- if (src[i] != ch)
- goto not_a_marker;
- if (src[marker_size] != '\n')
- goto not_a_marker;
- src += marker_size + 1;
- size -= marker_size + 1;
- continue;
- }
- not_a_marker:
- do {
- ch = *src++;
- *dst++ = ch;
- size--;
- } while (ch != '\n' && size);
- }
- result->size = dst - result->ptr;
+ /* Use union favor */
+ flag = (flag & 1) | (XDL_MERGE_FAVOR_UNION << 1);
+ return ll_xdl_merge(drv_unused, result, path_unused,
+ orig, src1, NULL, src2, NULL,
+ flag, marker_size);
return 0;
}
diff --git a/log-tree.c b/log-tree.c
index 27afcf6972..d3ae969f60 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -514,6 +514,16 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
return 0;
else if (opt->combine_merges)
return do_diff_combined(opt, commit);
+ else if (opt->first_parent_only) {
+ /*
+ * Generate merge log entry only for the first
+ * parent, showing summary diff of the others
+ * we merged _in_.
+ */
+ diff_tree_sha1(parents->item->object.sha1, sha1, "", &opt->diffopt);
+ log_tree_diff_flush(opt);
+ return !opt->loginfo;
+ }
/* If we show individual diffs, show the parent info */
log->parent = parents->item;
diff --git a/merge-recursive.c b/merge-recursive.c
index cb53b01c19..195ebf9744 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -599,23 +599,6 @@ struct merge_file_info
merge:1;
};
-static void fill_mm(const unsigned char *sha1, mmfile_t *mm)
-{
- unsigned long size;
- enum object_type type;
-
- if (!hashcmp(sha1, null_sha1)) {
- mm->ptr = xstrdup("");
- mm->size = 0;
- return;
- }
-
- mm->ptr = read_sha1_file(sha1, &type, &size);
- if (!mm->ptr || type != OBJ_BLOB)
- die("unable to read blob object %s", sha1_to_hex(sha1));
- mm->size = size;
-}
-
static int merge_3way(struct merge_options *o,
mmbuffer_t *result_buf,
struct diff_filespec *one,
@@ -653,9 +636,9 @@ static int merge_3way(struct merge_options *o,
name2 = xstrdup(mkpath("%s", branch2));
}
- fill_mm(one->sha1, &orig);
- fill_mm(a->sha1, &src1);
- fill_mm(b->sha1, &src2);
+ read_mmblob(&orig, one->sha1);
+ read_mmblob(&src1, a->sha1);
+ read_mmblob(&src2, b->sha1);
merge_status = ll_merge(result_buf, a->path, &orig,
&src1, name1, &src2, name2,
diff --git a/notes.c b/notes.c
index 0261e7898a..e425e19827 100644
--- a/notes.c
+++ b/notes.c
@@ -629,8 +629,8 @@ static void write_tree_entry(struct strbuf *buf, unsigned int mode,
const char *path, unsigned int path_len, const
unsigned char *sha1)
{
- strbuf_addf(buf, "%06o %.*s%c", mode, path_len, path, '\0');
- strbuf_add(buf, sha1, 20);
+ strbuf_addf(buf, "%o %.*s%c", mode, path_len, path, '\0');
+ strbuf_add(buf, sha1, 20);
}
static void tree_write_stack_init_subtree(struct tree_write_stack *tws,
@@ -1031,7 +1031,7 @@ void remove_note(struct notes_tree *t, const unsigned char *object_sha1)
t->dirty = 1;
hashcpy(l.key_sha1, object_sha1);
hashclr(l.val_sha1);
- return note_tree_remove(t, t->root, 0, &l);
+ note_tree_remove(t, t->root, 0, &l);
}
const unsigned char *get_note(struct notes_tree *t,
diff --git a/pack-write.c b/pack-write.c
index 9f47cf9961..a905ca4486 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -253,3 +253,30 @@ char *index_pack_lockfile(int ip_out)
}
return NULL;
}
+
+/*
+ * The per-object header is a pretty dense thing, which is
+ * - first byte: low four bits are "size", then three bits of "type",
+ * and the high bit is "size continues".
+ * - each byte afterwards: low seven bits are size continuation,
+ * with the high bit being "size continues"
+ */
+int encode_in_pack_object_header(enum object_type type, uintmax_t size, unsigned char *hdr)
+{
+ int n = 1;
+ unsigned char c;
+
+ if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)
+ die("bad type %d", type);
+
+ c = (type << 4) | (size & 15);
+ size >>= 4;
+ while (size) {
+ *hdr++ = c | 0x80;
+ c = size & 0x7f;
+ size >>= 7;
+ n++;
+ }
+ *hdr = c;
+ return n;
+}
diff --git a/pack.h b/pack.h
index b759a23d4d..d268c014c9 100644
--- a/pack.h
+++ b/pack.h
@@ -60,6 +60,7 @@ extern int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, off
extern int verify_pack(struct packed_git *);
extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t, unsigned char *, off_t);
extern char *index_pack_lockfile(int fd);
+extern int encode_in_pack_object_header(enum object_type, uintmax_t, unsigned char *);
#define PH_ERROR_EOF (-1)
#define PH_ERROR_PACK_SIGNATURE (-2)
diff --git a/pager.c b/pager.c
index 2c7e8ecb3c..dac358f047 100644
--- a/pager.c
+++ b/pager.c
@@ -48,11 +48,11 @@ static void wait_for_pager_signal(int signo)
raise(signo);
}
-const char *git_pager(void)
+const char *git_pager(int stdout_is_tty)
{
const char *pager;
- if (!isatty(1))
+ if (!stdout_is_tty)
return NULL;
pager = getenv("GIT_PAGER");
@@ -73,7 +73,7 @@ const char *git_pager(void)
void setup_pager(void)
{
- const char *pager = git_pager();
+ const char *pager = git_pager(isatty(1));
if (!pager)
return;
diff --git a/parse-options.c b/parse-options.c
index d218122af5..c83035d013 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -2,6 +2,7 @@
#include "parse-options.h"
#include "cache.h"
#include "commit.h"
+#include "color.h"
static int parse_options_usage(const char * const *usagestr,
const struct option *opts);
@@ -599,6 +600,21 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg,
return 0;
}
+int parse_opt_color_flag_cb(const struct option *opt, const char *arg,
+ int unset)
+{
+ int value;
+
+ if (!arg)
+ arg = unset ? "never" : (const char *)opt->defval;
+ value = git_config_colorbool(NULL, arg, -1);
+ if (value < 0)
+ return opterror(opt,
+ "expects \"always\", \"auto\", or \"never\"", 0);
+ *(int *)opt->value = value;
+ return 0;
+}
+
int parse_opt_verbosity_cb(const struct option *opt, const char *arg,
int unset)
{
diff --git a/parse-options.h b/parse-options.h
index 0c996916b6..9429f7e361 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -135,6 +135,10 @@ struct option {
PARSE_OPT_NOARG | PARSE_OPT_NONEG, (f) }
#define OPT_FILENAME(s, l, v, h) { OPTION_FILENAME, (s), (l), (v), \
"FILE", (h) }
+#define OPT_COLOR_FLAG(s, l, v, h) \
+ { OPTION_CALLBACK, (s), (l), (v), "when", (h), PARSE_OPT_OPTARG, \
+ parse_opt_color_flag_cb, (intptr_t)"always" }
+
/* parse_options() will filter out the processed options and leave the
* non-option arguments in argv[].
@@ -187,6 +191,7 @@ extern int parse_options_end(struct parse_opt_ctx_t *ctx);
/*----- some often used options -----*/
extern int parse_opt_abbrev_cb(const struct option *, const char *, int);
extern int parse_opt_approxidate_cb(const struct option *, const char *, int);
+extern int parse_opt_color_flag_cb(const struct option *, const char *, int);
extern int parse_opt_verbosity_cb(const struct option *, const char *, int);
extern int parse_opt_with_commit(const struct option *, const char *, int);
extern int parse_opt_tertiary(const struct option *, const char *, int);
@@ -203,5 +208,7 @@ extern int parse_opt_tertiary(const struct option *, const char *, int);
{ OPTION_CALLBACK, 0, "abbrev", (var), "n", \
"use <n> digits to display SHA-1s", \
PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
+#define OPT__COLOR(var, h) \
+ OPT_COLOR_FLAG(0, "color", (var), (h))
#endif
diff --git a/patch-delta.c b/patch-delta.c
index e02e13bd4e..d218faa02b 100644
--- a/patch-delta.c
+++ b/patch-delta.c
@@ -33,8 +33,7 @@ void *patch_delta(const void *src_buf, unsigned long src_size,
/* now the result size */
size = get_delta_hdr_size(&data, top);
- dst_buf = xmalloc(size + 1);
- dst_buf[size] = 0;
+ dst_buf = xmallocz(size);
out = dst_buf;
while (data < top) {
diff --git a/path.c b/path.c
index 2ec950b27f..b4c8d91722 100644
--- a/path.c
+++ b/path.c
@@ -157,6 +157,85 @@ int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)
return mkstemps(path, suffix_len);
}
+/* Adapted from libiberty's mkstemp.c. */
+
+#undef TMP_MAX
+#define TMP_MAX 16384
+
+int git_mkstemps_mode(char *pattern, int suffix_len, int mode)
+{
+ static const char letters[] =
+ "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "0123456789";
+ static const int num_letters = 62;
+ uint64_t value;
+ struct timeval tv;
+ char *template;
+ size_t len;
+ int fd, count;
+
+ len = strlen(pattern);
+
+ if (len < 6 + suffix_len) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (strncmp(&pattern[len - 6 - suffix_len], "XXXXXX", 6)) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /*
+ * Replace pattern's XXXXXX characters with randomness.
+ * Try TMP_MAX different filenames.
+ */
+ gettimeofday(&tv, NULL);
+ value = ((size_t)(tv.tv_usec << 16)) ^ tv.tv_sec ^ getpid();
+ template = &pattern[len - 6 - suffix_len];
+ for (count = 0; count < TMP_MAX; ++count) {
+ uint64_t v = value;
+ /* Fill in the random bits. */
+ template[0] = letters[v % num_letters]; v /= num_letters;
+ template[1] = letters[v % num_letters]; v /= num_letters;
+ template[2] = letters[v % num_letters]; v /= num_letters;
+ template[3] = letters[v % num_letters]; v /= num_letters;
+ template[4] = letters[v % num_letters]; v /= num_letters;
+ template[5] = letters[v % num_letters]; v /= num_letters;
+
+ fd = open(pattern, O_CREAT | O_EXCL | O_RDWR, mode);
+ if (fd > 0)
+ return fd;
+ /*
+ * Fatal error (EPERM, ENOSPC etc).
+ * It doesn't make sense to loop.
+ */
+ if (errno != EEXIST)
+ break;
+ /*
+ * This is a random value. It is only necessary that
+ * the next TMP_MAX values generated by adding 7777 to
+ * VALUE are different with (module 2^32).
+ */
+ value += 7777;
+ }
+ /* We return the null string if we can't find a unique file name. */
+ pattern[0] = '\0';
+ return -1;
+}
+
+int git_mkstemp_mode(char *pattern, int mode)
+{
+ /* mkstemp is just mkstemps with no suffix */
+ return git_mkstemps_mode(pattern, 0, mode);
+}
+
+int gitmkstemps(char *pattern, int suffix_len)
+{
+ return git_mkstemps_mode(pattern, suffix_len, 0600);
+}
+
int validate_headref(const char *path)
{
struct stat st;
@@ -336,7 +415,7 @@ char *enter_repo(char *path, int strict)
if (access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_headref("HEAD") == 0) {
- setenv(GIT_DIR_ENVIRONMENT, ".", 1);
+ set_git_dir(".");
check_repository_format();
return path;
}
@@ -394,17 +473,38 @@ int set_shared_perm(const char *path, int mode)
const char *make_relative_path(const char *abs, const char *base)
{
static char buf[PATH_MAX + 1];
- int baselen;
- if (!base)
- return abs;
- baselen = strlen(base);
- if (prefixcmp(abs, base))
+ int i = 0, j = 0;
+
+ if (!base || !base[0])
return abs;
- if (abs[baselen] == '/')
- baselen++;
- else if (base[baselen - 1] != '/')
+ while (base[i]) {
+ if (is_dir_sep(base[i])) {
+ if (!is_dir_sep(abs[j]))
+ return abs;
+ while (is_dir_sep(base[i]))
+ i++;
+ while (is_dir_sep(abs[j]))
+ j++;
+ continue;
+ } else if (abs[j] != base[i]) {
+ return abs;
+ }
+ i++;
+ j++;
+ }
+ if (
+ /* "/foo" is a prefix of "/foo" */
+ abs[j] &&
+ /* "/foo" is not a prefix of "/foobar" */
+ !is_dir_sep(base[i-1]) && !is_dir_sep(abs[j])
+ )
return abs;
- strcpy(buf, abs + baselen);
+ while (is_dir_sep(abs[j]))
+ j++;
+ if (!abs[j])
+ strcpy(buf, ".");
+ else
+ strcpy(buf, abs + j);
return buf;
}
@@ -589,7 +689,7 @@ int daemon_avoid_alias(const char *p)
/*
* This resurrects the belts and suspenders paranoia check by HPA
* done in <435560F7.4080006@zytor.com> thread, now enter_repo()
- * does not do getcwd() based path canonicalizations.
+ * does not do getcwd() based path canonicalization.
*
* sl becomes true immediately after seeing '/' and continues to
* be true as long as dots continue after that without intervening
@@ -628,3 +728,10 @@ int daemon_avoid_alias(const char *p)
}
}
}
+
+int offset_1st_component(const char *path)
+{
+ if (has_dos_drive_prefix(path))
+ return 2 + is_dir_sep(path[2]);
+ return is_dir_sep(path[0]);
+}
diff --git a/perl/Git.pm b/perl/Git.pm
index e8df55d2f2..1926dc9a4b 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -204,14 +204,14 @@ sub repository {
$dir = $opts{Directory};
unless (-d "$dir/refs" and -d "$dir/objects" and -e "$dir/HEAD") {
- # Mimick git-rev-parse --git-dir error message:
+ # Mimic git-rev-parse --git-dir error message:
throw Error::Simple("fatal: Not a git repository: $dir");
}
my $search = Git->repository(Repository => $dir);
try {
$search->command('symbolic-ref', 'HEAD');
} catch Git::Error::Command with {
- # Mimick git-rev-parse --git-dir error message:
+ # Mimic git-rev-parse --git-dir error message:
throw Error::Simple("fatal: Not a git repository: $dir");
}
@@ -842,7 +842,7 @@ sub _open_hash_and_insert_object_if_needed {
($self->{hash_object_pid}, $self->{hash_object_in},
$self->{hash_object_out}, $self->{hash_object_ctx}) =
- command_bidi_pipe(qw(hash-object -w --stdin-paths));
+ command_bidi_pipe(qw(hash-object -w --stdin-paths --no-filters));
}
sub _close_hash_and_insert_object {
diff --git a/preload-index.c b/preload-index.c
index 92899333c2..e3d0bda31a 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -47,6 +47,8 @@ static void *preload_thread(void *_data)
if (ce_stage(ce))
continue;
+ if (S_ISGITLINK(ce->ce_mode))
+ continue;
if (ce_uptodate(ce))
continue;
if (!ce_path_match(ce, p->pathspec))
diff --git a/quote.c b/quote.c
index acb6bf929f..fc93435727 100644
--- a/quote.c
+++ b/quote.c
@@ -213,7 +213,7 @@ static size_t quote_c_style_counted(const char *name, ssize_t maxlen,
int ch;
len = next_quote_pos(p, maxlen);
- if (len == maxlen || !p[len])
+ if (len == maxlen || (maxlen < 0 && !p[len]))
break;
if (!no_dq && p == name)
@@ -223,6 +223,8 @@ static size_t quote_c_style_counted(const char *name, ssize_t maxlen,
EMIT('\\');
p += len;
ch = (unsigned char)*p++;
+ if (maxlen >= 0)
+ maxlen -= len + 1;
if (sq_lookup[ch] >= ' ') {
EMIT(sq_lookup[ch]);
} else {
diff --git a/read-cache.c b/read-cache.c
index 79938bf09a..f1f789b7b8 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -26,7 +26,7 @@ static struct cache_entry *refresh_cache_entry(struct cache_entry *ce, int reall
#define CACHE_EXT(s) ( (s[0]<<24)|(s[1]<<16)|(s[2]<<8)|(s[3]) )
#define CACHE_EXT_TREE 0x54524545 /* "TREE" */
-#define CACHE_EXT_RESOLVE_UNDO 0x52455543 /* "REUN" */
+#define CACHE_EXT_RESOLVE_UNDO 0x52455543 /* "REUC" */
struct index_state the_index;
@@ -612,7 +612,8 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
if (alias && !ce_stage(alias) && !ie_match_stat(istate, alias, st, ce_option)) {
/* Nothing changed, really */
free(ce);
- ce_mark_uptodate(alias);
+ if (!S_ISGITLINK(alias->ce_mode))
+ ce_mark_uptodate(alias);
alias->ce_flags |= CE_ADDED;
return 0;
}
@@ -1050,7 +1051,8 @@ static struct cache_entry *refresh_cache_ent(struct index_state *istate,
* because CE_UPTODATE flag is in-core only;
* we are not going to write this change out.
*/
- ce_mark_uptodate(ce);
+ if (!S_ISGITLINK(ce->ce_mode))
+ ce_mark_uptodate(ce);
return ce;
}
}
diff --git a/refs.c b/refs.c
index 5a860c41eb..0f24c8d5d9 100644
--- a/refs.c
+++ b/refs.c
@@ -6,6 +6,7 @@
/* ISSYMREF=01 and ISPACKED=02 are public interfaces */
#define REF_KNOWS_PEELED 04
+#define REF_BROKEN 010
struct ref_list {
struct ref_list *next;
@@ -275,8 +276,10 @@ static struct ref_list *get_ref_dir(const char *base, struct ref_list *list)
list = get_ref_dir(ref, list);
continue;
}
- if (!resolve_ref(ref, sha1, 1, &flag))
+ if (!resolve_ref(ref, sha1, 1, &flag)) {
hashclr(sha1);
+ flag |= REF_BROKEN;
+ }
list = add_ref(ref, sha1, flag, list, NULL);
}
free(ref);
@@ -539,10 +542,10 @@ static int do_one_ref(const char *base, each_ref_fn fn, int trim,
{
if (strncmp(base, entry->name, trim))
return 0;
- /* Is this a "negative ref" that represents a deleted ref? */
- if (is_null_sha1(entry->sha1))
- return 0;
+
if (!(flags & DO_FOR_EACH_INCLUDE_BROKEN)) {
+ if (entry->flag & REF_BROKEN)
+ return 0; /* ignore dangling symref */
if (!has_sha1_file(entry->sha1)) {
error("%s does not point to a valid object!", entry->name);
return 0;
@@ -1572,7 +1575,7 @@ int for_each_recent_reflog_ent(const char *ref, each_reflog_ent_fn fn, long ofs,
{
const char *logfile;
FILE *logfp;
- char buf[1024];
+ struct strbuf sb = STRBUF_INIT;
int ret = 0;
logfile = git_path("logs/%s", ref);
@@ -1585,24 +1588,24 @@ int for_each_recent_reflog_ent(const char *ref, each_reflog_ent_fn fn, long ofs,
if (fstat(fileno(logfp), &statbuf) ||
statbuf.st_size < ofs ||
fseek(logfp, -ofs, SEEK_END) ||
- fgets(buf, sizeof(buf), logfp)) {
+ strbuf_getwholeline(&sb, logfp, '\n')) {
fclose(logfp);
+ strbuf_release(&sb);
return -1;
}
}
- while (fgets(buf, sizeof(buf), logfp)) {
+ while (!strbuf_getwholeline(&sb, logfp, '\n')) {
unsigned char osha1[20], nsha1[20];
char *email_end, *message;
unsigned long timestamp;
- int len, tz;
+ int tz;
/* old SP new SP name <email> SP time TAB msg LF */
- len = strlen(buf);
- if (len < 83 || buf[len-1] != '\n' ||
- get_sha1_hex(buf, osha1) || buf[40] != ' ' ||
- get_sha1_hex(buf + 41, nsha1) || buf[81] != ' ' ||
- !(email_end = strchr(buf + 82, '>')) ||
+ if (sb.len < 83 || sb.buf[sb.len - 1] != '\n' ||
+ get_sha1_hex(sb.buf, osha1) || sb.buf[40] != ' ' ||
+ get_sha1_hex(sb.buf + 41, nsha1) || sb.buf[81] != ' ' ||
+ !(email_end = strchr(sb.buf + 82, '>')) ||
email_end[1] != ' ' ||
!(timestamp = strtoul(email_end + 2, &message, 10)) ||
!message || message[0] != ' ' ||
@@ -1616,11 +1619,13 @@ int for_each_recent_reflog_ent(const char *ref, each_reflog_ent_fn fn, long ofs,
message += 6;
else
message += 7;
- ret = fn(osha1, nsha1, buf+82, timestamp, tz, message, cb_data);
+ ret = fn(osha1, nsha1, sb.buf + 82, timestamp, tz, message,
+ cb_data);
if (ret)
break;
}
fclose(logfp);
+ strbuf_release(&sb);
return ret;
}
diff --git a/remote-curl.c b/remote-curl.c
index a904164e42..b76bfcb3d3 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -10,7 +10,6 @@
static struct remote *remote;
static const char *url;
-static struct walker *walker;
struct options {
int verbosity;
@@ -22,12 +21,6 @@ struct options {
};
static struct options options;
-static void init_walker(void)
-{
- if (!walker)
- walker = get_http_walker(url, remote);
-}
-
static int set_option(const char *name, const char *value)
{
if (!strcmp(name, "verbosity")) {
@@ -119,7 +112,6 @@ static struct discovery* discover_refs(const char *service)
}
refs_url = strbuf_detach(&buffer, NULL);
- init_walker();
http_ret = http_get_strbuf(refs_url, &buffer, HTTP_NO_CACHE);
/* try again with "plain" url (no ? or & appended) */
@@ -184,13 +176,13 @@ static struct discovery* discover_refs(const char *service)
return last;
}
-static int write_discovery(int fd, void *data)
+static int write_discovery(int in, int out, void *data)
{
struct discovery *heads = data;
int err = 0;
- if (write_in_full(fd, heads->buf, heads->len) != heads->len)
+ if (write_in_full(out, heads->buf, heads->len) != heads->len)
err = 1;
- close(fd);
+ close(out);
return err;
}
@@ -202,6 +194,7 @@ static struct ref *parse_git_refs(struct discovery *heads)
memset(&async, 0, sizeof(async));
async.proc = write_discovery;
async.data = heads;
+ async.out = -1;
if (start_async(&async))
die("cannot start thread to parse advertised refs");
@@ -249,9 +242,8 @@ static struct ref *parse_info_refs(struct discovery *heads)
i++;
}
- init_walker();
ref = alloc_ref("HEAD");
- if (!walker->fetch_ref(walker, ref) &&
+ if (!http_fetch_ref(url, ref) &&
!resolve_remote_symref(ref, refs)) {
ref->next = refs;
refs = ref;
@@ -501,7 +493,6 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
struct child_process client;
int err = 0;
- init_walker();
memset(&client, 0, sizeof(client));
client.in = -1;
client.out = -1;
@@ -553,6 +544,7 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
static int fetch_dumb(int nr_heads, struct ref **to_fetch)
{
+ struct walker *walker;
char **targets = xmalloc(nr_heads * sizeof(char*));
int ret, i;
@@ -561,13 +553,14 @@ static int fetch_dumb(int nr_heads, struct ref **to_fetch)
for (i = 0; i < nr_heads; i++)
targets[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1));
- init_walker();
+ walker = get_http_walker(url);
walker->get_all = 1;
walker->get_tree = 1;
walker->get_history = 1;
walker->get_verbosely = options.verbosity >= 3;
walker->get_recover = 0;
ret = walker_fetch(walker, nr_heads, targets, NULL, NULL);
+ walker_free(walker);
for (i = 0; i < nr_heads; i++)
free(targets[i]);
@@ -810,6 +803,8 @@ int main(int argc, const char **argv)
url = remote->url[0];
}
+ http_init(remote);
+
do {
if (strbuf_getline(&buf, stdin, '\n') == EOF)
break;
@@ -855,5 +850,8 @@ int main(int argc, const char **argv)
}
strbuf_reset(&buf);
} while (1);
+
+ http_cleanup();
+
return 0;
}
diff --git a/rerere.c b/rerere.c
index a86d73d9dc..a59f74f76c 100644
--- a/rerere.c
+++ b/rerere.c
@@ -325,7 +325,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
for (i = 0; i < 3; i++)
free(mmfile[i].ptr);
- memset(&io, 0, sizeof(&io));
+ memset(&io, 0, sizeof(io));
io.io.getline = rerere_mem_getline;
if (output)
io.io.output = fopen(output, "w");
@@ -364,7 +364,7 @@ static int find_conflict(struct string_list *conflict)
static int merge(const char *name, const char *path)
{
int ret;
- mmfile_t cur, base, other;
+ mmfile_t cur = {NULL, 0}, base = {NULL, 0}, other = {NULL, 0};
mmbuffer_t result = {NULL, 0};
if (handle_file(path, NULL, rerere_path(name, "thisimage")) < 0)
@@ -372,8 +372,10 @@ static int merge(const char *name, const char *path)
if (read_mmfile(&cur, rerere_path(name, "thisimage")) ||
read_mmfile(&base, rerere_path(name, "preimage")) ||
- read_mmfile(&other, rerere_path(name, "postimage")))
- return 1;
+ read_mmfile(&other, rerere_path(name, "postimage"))) {
+ ret = 1;
+ goto out;
+ }
ret = ll_merge(&result, path, &base, &cur, "", &other, "", 0);
if (!ret) {
FILE *f = fopen(path, "w");
@@ -387,6 +389,7 @@ static int merge(const char *name, const char *path)
strerror(errno));
}
+out:
free(cur.ptr);
free(base.ptr);
free(other.ptr);
diff --git a/resolve-undo.c b/resolve-undo.c
index 37d73cd949..0f50ee0484 100644
--- a/resolve-undo.c
+++ b/resolve-undo.c
@@ -53,7 +53,7 @@ void resolve_undo_write(struct strbuf *sb, struct string_list *resolve_undo)
for_each_string_list(write_one, resolve_undo, sb);
}
-struct string_list *resolve_undo_read(void *data, unsigned long size)
+struct string_list *resolve_undo_read(const char *data, unsigned long size)
{
struct string_list *resolve_undo;
size_t len;
@@ -93,7 +93,7 @@ struct string_list *resolve_undo_read(void *data, unsigned long size)
continue;
if (size < 20)
goto error;
- hashcpy(ui->sha1[i], data);
+ hashcpy(ui->sha1[i], (const unsigned char *)data);
size -= 20;
data += 20;
}
diff --git a/resolve-undo.h b/resolve-undo.h
index e4e5c1b1ad..845876911d 100644
--- a/resolve-undo.h
+++ b/resolve-undo.h
@@ -8,7 +8,7 @@ struct resolve_undo_info {
extern void record_resolve_undo(struct index_state *, struct cache_entry *);
extern void resolve_undo_write(struct strbuf *, struct string_list *);
-extern struct string_list *resolve_undo_read(void *, unsigned long);
+extern struct string_list *resolve_undo_read(const char *, unsigned long);
extern void resolve_undo_clear_index(struct index_state *);
extern int unmerge_index_entry_at(struct index_state *, int);
extern void unmerge_index(struct index_state *, const char **);
diff --git a/revision.c b/revision.c
index 1c514d120b..f4b8b38315 100644
--- a/revision.c
+++ b/revision.c
@@ -135,10 +135,20 @@ static void add_pending_object_with_mode(struct rev_info *revs, struct object *o
{
if (revs->no_walk && (obj->flags & UNINTERESTING))
revs->no_walk = 0;
- if (revs->reflog_info && obj->type == OBJ_COMMIT &&
- add_reflog_for_walk(revs->reflog_info,
- (struct commit *)obj, name))
- return;
+ if (revs->reflog_info && obj->type == OBJ_COMMIT) {
+ struct strbuf buf = STRBUF_INIT;
+ int len = interpret_branch_name(name, &buf);
+ int st;
+
+ if (0 < len && name[len] && buf.len)
+ strbuf_addstr(&buf, name + len);
+ st = add_reflog_for_walk(revs->reflog_info,
+ (struct commit *)obj,
+ buf.buf[0] ? buf.buf: name);
+ strbuf_release(&buf);
+ if (st)
+ return;
+ }
add_object_array_with_mode(obj, name, &revs->pending, mode);
}
@@ -269,7 +279,7 @@ static int tree_difference = REV_TREE_SAME;
static void file_add_remove(struct diff_options *options,
int addremove, unsigned mode,
const unsigned char *sha1,
- const char *fullpath)
+ const char *fullpath, unsigned dirty_submodule)
{
int diff = addremove == '+' ? REV_TREE_NEW : REV_TREE_OLD;
@@ -282,7 +292,8 @@ static void file_change(struct diff_options *options,
unsigned old_mode, unsigned new_mode,
const unsigned char *old_sha1,
const unsigned char *new_sha1,
- const char *fullpath)
+ const char *fullpath,
+ unsigned old_dirty_submodule, unsigned new_dirty_submodule)
{
tree_difference = REV_TREE_DIFFERENT;
DIFF_OPT_SET(options, HAS_CHANGES);
@@ -537,6 +548,9 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
right_count++;
}
+ if (!left_count || !right_count)
+ return;
+
left_first = left_count < right_count;
init_patch_ids(&ids);
if (revs->diffopt.nr_paths) {
@@ -813,6 +827,7 @@ void init_revisions(struct rev_info *revs, const char *prefix)
revs->grep_filter.status_only = 1;
revs->grep_filter.pattern_tail = &(revs->grep_filter.pattern_list);
+ revs->grep_filter.header_tail = &(revs->grep_filter.header_list);
revs->grep_filter.regflags = REG_NEWLINE;
diff_setup(&revs->diffopt);
@@ -1338,9 +1353,9 @@ static void append_prune_data(const char ***prune_data, const char **av)
* Returns the number of arguments left that weren't recognized
* (which are also moved to the head of the argument list)
*/
-int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def)
+int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *opt)
{
- int i, flags, left, seen_dashdash, read_from_stdin;
+ int i, flags, left, seen_dashdash, read_from_stdin, got_rev_arg = 0;
const char **prune_data = NULL;
/* First, search for "--" */
@@ -1466,16 +1481,20 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
append_prune_data(&prune_data, argv + i);
break;
}
+ else
+ got_rev_arg = 1;
}
if (prune_data)
revs->prune_data = get_pathspec(revs->prefix, prune_data);
if (revs->def == NULL)
- revs->def = def;
+ revs->def = opt ? opt->def : NULL;
+ if (opt && opt->tweak)
+ opt->tweak(revs, opt);
if (revs->show_merge)
prepare_show_merge(revs);
- if (revs->def && !revs->pending.nr) {
+ if (revs->def && !revs->pending.nr && !got_rev_arg) {
unsigned char sha1[20];
struct object *object;
unsigned mode;
@@ -1506,11 +1525,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (!revs->full_diff)
diff_tree_setup_paths(revs->prune_data, &revs->diffopt);
}
- if (revs->combine_merges) {
+ if (revs->combine_merges)
revs->ignore_merges = 0;
- if (revs->dense_combined_merges && !revs->diffopt.output_format)
- revs->diffopt.output_format = DIFF_FORMAT_PATCH;
- }
revs->diffopt.abbrev = revs->abbrev;
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
@@ -1811,7 +1827,7 @@ static int rewrite_parents(struct rev_info *revs, struct commit *commit)
static int commit_match(struct commit *commit, struct rev_info *opt)
{
- if (!opt->grep_filter.pattern_list)
+ if (!opt->grep_filter.pattern_list && !opt->grep_filter.header_list)
return 1;
return grep_buffer(&opt->grep_filter,
NULL, /* we say nothing, not even filename */
diff --git a/revision.h b/revision.h
index 580f6eccee..568f1c98de 100644
--- a/revision.h
+++ b/revision.h
@@ -142,8 +142,13 @@ struct rev_info {
typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
extern volatile show_early_output_fn_t show_early_output;
+struct setup_revision_opt {
+ const char *def;
+ void (*tweak)(struct rev_info *, struct setup_revision_opt *);
+};
+
extern void init_revisions(struct rev_info *revs, const char *prefix);
-extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
+extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *);
extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
const struct option *options,
const char * const usagestr[]);
diff --git a/run-command.c b/run-command.c
index 2feb493951..c8d53795ec 100644
--- a/run-command.c
+++ b/run-command.c
@@ -67,19 +67,21 @@ static int child_notifier = -1;
static void notify_parent(void)
{
- write(child_notifier, "", 1);
+ ssize_t unused;
+ unused = write(child_notifier, "", 1);
}
static NORETURN void die_child(const char *err, va_list params)
{
char msg[4096];
+ ssize_t unused;
int len = vsnprintf(msg, sizeof(msg), err, params);
if (len > sizeof(msg))
len = sizeof(msg);
- write(child_err, "fatal: ", 7);
- write(child_err, msg, len);
- write(child_err, "\n", 1);
+ unused = write(child_err, "fatal: ", 7);
+ unused = write(child_err, msg, len);
+ unused = write(child_err, "\n", 1);
exit(128);
}
@@ -233,6 +235,9 @@ fail_pipe:
else if (need_err) {
dup2(fderr[1], 2);
close_pair(fderr);
+ } else if (cmd->err > 1) {
+ dup2(cmd->err, 2);
+ close(cmd->err);
}
if (cmd->no_stdout)
@@ -325,6 +330,8 @@ fail_pipe:
fherr = open("/dev/null", O_RDWR);
else if (need_err)
fherr = dup(fderr[1]);
+ else if (cmd->err > 2)
+ fherr = dup(cmd->err);
if (cmd->no_stdout)
fhout = open("/dev/null", O_RDWR);
@@ -394,6 +401,8 @@ fail_pipe:
if (need_err)
close(fderr[1]);
+ else if (cmd->err)
+ close(cmd->err);
return 0;
}
@@ -444,17 +453,51 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
static unsigned __stdcall run_thread(void *data)
{
struct async *async = data;
- return async->proc(async->fd_for_proc, async->data);
+ return async->proc(async->proc_in, async->proc_out, async->data);
}
#endif
int start_async(struct async *async)
{
- int pipe_out[2];
+ int need_in, need_out;
+ int fdin[2], fdout[2];
+ int proc_in, proc_out;
- if (pipe(pipe_out) < 0)
- return error("cannot create pipe: %s", strerror(errno));
- async->out = pipe_out[0];
+ need_in = async->in < 0;
+ if (need_in) {
+ if (pipe(fdin) < 0) {
+ if (async->out > 0)
+ close(async->out);
+ return error("cannot create pipe: %s", strerror(errno));
+ }
+ async->in = fdin[1];
+ }
+
+ need_out = async->out < 0;
+ if (need_out) {
+ if (pipe(fdout) < 0) {
+ if (need_in)
+ close_pair(fdin);
+ else if (async->in)
+ close(async->in);
+ return error("cannot create pipe: %s", strerror(errno));
+ }
+ async->out = fdout[0];
+ }
+
+ if (need_in)
+ proc_in = fdin[0];
+ else if (async->in)
+ proc_in = async->in;
+ else
+ proc_in = -1;
+
+ if (need_out)
+ proc_out = fdout[1];
+ else if (async->out)
+ proc_out = async->out;
+ else
+ proc_out = -1;
#ifndef WIN32
/* Flush stdio before fork() to avoid cloning buffers */
@@ -463,24 +506,47 @@ int start_async(struct async *async)
async->pid = fork();
if (async->pid < 0) {
error("fork (async) failed: %s", strerror(errno));
- close_pair(pipe_out);
- return -1;
+ goto error;
}
if (!async->pid) {
- close(pipe_out[0]);
- exit(!!async->proc(pipe_out[1], async->data));
+ if (need_in)
+ close(fdin[1]);
+ if (need_out)
+ close(fdout[0]);
+ exit(!!async->proc(proc_in, proc_out, async->data));
}
- close(pipe_out[1]);
+
+ if (need_in)
+ close(fdin[0]);
+ else if (async->in)
+ close(async->in);
+
+ if (need_out)
+ close(fdout[1]);
+ else if (async->out)
+ close(async->out);
#else
- async->fd_for_proc = pipe_out[1];
+ async->proc_in = proc_in;
+ async->proc_out = proc_out;
async->tid = (HANDLE) _beginthreadex(NULL, 0, run_thread, async, 0, NULL);
if (!async->tid) {
error("cannot create thread: %s", strerror(errno));
- close_pair(pipe_out);
- return -1;
+ goto error;
}
#endif
return 0;
+
+error:
+ if (need_in)
+ close_pair(fdin);
+ else if (async->in)
+ close(async->in);
+
+ if (need_out)
+ close_pair(fdout);
+ else if (async->out)
+ close(async->out);
+ return -1;
}
int finish_async(struct async *async)
diff --git a/run-command.h b/run-command.h
index 967ba8cc09..94619f52d9 100644
--- a/run-command.h
+++ b/run-command.h
@@ -18,7 +18,7 @@ struct child_process {
* - Specify > 0 to set a channel to a particular FD as follows:
* .in: a readable FD, becomes child's stdin
* .out: a writable FD, becomes child's stdout/stderr
- * .err > 0 not supported
+ * .err: a writable FD, becomes child's stderr
* The specified FD is closed by start_command(), even in case
* of errors!
*/
@@ -66,17 +66,20 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
*/
struct async {
/*
- * proc writes to fd and closes it;
+ * proc reads from in; closes it before return
+ * proc writes to out; closes it before return
* returns 0 on success, non-zero on failure
*/
- int (*proc)(int fd, void *data);
+ int (*proc)(int in, int out, void *data);
void *data;
+ int in; /* caller writes here and closes it */
int out; /* caller reads from here and closes it */
#ifndef WIN32
pid_t pid;
#else
HANDLE tid;
- int fd_for_proc;
+ int proc_in;
+ int proc_out;
#endif
};
diff --git a/send-pack.h b/send-pack.h
index 28141ac913..60b4ba66eb 100644
--- a/send-pack.h
+++ b/send-pack.h
@@ -4,6 +4,7 @@
struct send_pack_args {
unsigned verbose:1,
quiet:1,
+ porcelain:1,
send_mirror:1,
force_update:1,
use_thin_pack:1,
diff --git a/setup.c b/setup.c
index 710e2f3008..5716d90b57 100644
--- a/setup.c
+++ b/setup.c
@@ -18,14 +18,15 @@ const char *prefix_path(const char *prefix, int len, const char *path)
if (normalize_path_copy(sanitized, sanitized))
goto error_out;
if (is_absolute_path(orig)) {
- size_t len, total;
+ size_t root_len, len, total;
const char *work_tree = get_git_work_tree();
if (!work_tree)
goto error_out;
len = strlen(work_tree);
+ root_len = offset_1st_component(work_tree);
total = strlen(sanitized) + 1;
if (strncmp(sanitized, work_tree, len) ||
- (sanitized[len] != '\0' && sanitized[len] != '/')) {
+ (len > root_len && sanitized[len] != '\0' && sanitized[len] != '/')) {
error_out:
die("'%s' is outside repository", orig);
}
@@ -206,7 +207,7 @@ int is_inside_work_tree(void)
}
/*
- * set_work_tree() is only ever called if you set GIT_DIR explicitely.
+ * set_work_tree() is only ever called if you set GIT_DIR explicitly.
* The old behaviour (which we retain here) is to set the work tree root
* to the cwd, unless overridden by the config, the command line, or
* GIT_WORK_TREE.
@@ -321,7 +322,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
static char cwd[PATH_MAX+1];
const char *gitdirenv;
const char *gitfile_dir;
- int len, offset, ceil_offset;
+ int len, offset, ceil_offset, root_len;
/*
* Let's assume that we are in a git repository.
@@ -403,10 +404,11 @@ const char *setup_git_directory_gently(int *nongit_ok)
if (!work_tree_env)
inside_work_tree = 0;
if (offset != len) {
- cwd[offset] = '\0';
- setenv(GIT_DIR_ENVIRONMENT, cwd, 1);
+ root_len = offset_1st_component(cwd);
+ cwd[offset > root_len ? offset : root_len] = '\0';
+ set_git_dir(cwd);
} else
- setenv(GIT_DIR_ENVIRONMENT, ".", 1);
+ set_git_dir(".");
check_repository_format_gently(nongit_ok);
return NULL;
}
@@ -427,7 +429,8 @@ const char *setup_git_directory_gently(int *nongit_ok)
inside_git_dir = 0;
if (!work_tree_env)
inside_work_tree = 1;
- git_work_tree_cfg = xstrndup(cwd, offset);
+ root_len = offset_1st_component(cwd);
+ git_work_tree_cfg = xstrndup(cwd, offset > root_len ? offset : root_len);
if (check_repository_format_gently(nongit_ok))
return NULL;
if (offset == len)
diff --git a/sha1_file.c b/sha1_file.c
index 12478a3652..a08a9d0880 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -35,13 +35,6 @@ static size_t sz_fmt(size_t s) { return s; }
const unsigned char null_sha1[20];
-static inline int offset_1st_component(const char *path)
-{
- if (has_dos_drive_prefix(path))
- return 2 + (path[2] == '/');
- return *path == '/';
-}
-
int safe_create_leading_directories(char *path)
{
char *pos = path + offset_1st_component(path);
@@ -1166,7 +1159,7 @@ static int unpack_sha1_header(z_stream *stream, unsigned char *map, unsigned lon
static void *unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size, const unsigned char *sha1)
{
int bytes = strlen(buffer) + 1;
- unsigned char *buf = xmalloc(1+size);
+ unsigned char *buf = xmallocz(size);
unsigned long n;
int status = Z_OK;
@@ -1194,7 +1187,6 @@ static void *unpack_sha1_rest(z_stream *stream, void *buffer, unsigned long size
while (status == Z_OK)
status = git_inflate(stream, Z_FINISH);
}
- buf[size] = 0;
if (status == Z_STREAM_END && !stream->avail_in) {
git_inflate_end(stream);
return buf;
@@ -1517,8 +1509,7 @@ static void *unpack_compressed_entry(struct packed_git *p,
z_stream stream;
unsigned char *buffer, *in;
- buffer = xmalloc(size + 1);
- buffer[size] = 0;
+ buffer = xmallocz(size);
memset(&stream, 0, sizeof(stream));
stream.next_out = buffer;
stream.avail_out = size + 1;
@@ -2208,7 +2199,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
}
out:
- if (set_shared_perm(filename, (S_IFREG|0444)))
+ if (adjust_shared_perm(filename))
return error("unable to set permission to '%s'", filename);
return 0;
}
@@ -2264,7 +2255,7 @@ static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename)
}
memcpy(buffer, filename, dirlen);
strcpy(buffer + dirlen, "tmp_obj_XXXXXX");
- fd = mkstemp(buffer);
+ fd = git_mkstemp_mode(buffer, 0444);
if (fd < 0 && dirlen && errno == ENOENT) {
/* Make sure the directory exists */
memcpy(buffer, filename, dirlen);
@@ -2274,7 +2265,7 @@ static int create_tmpfile(char *buffer, size_t bufsiz, const char *filename)
/* Try again */
strcpy(buffer + dirlen - 1, "/tmp_obj_XXXXXX");
- fd = mkstemp(buffer);
+ fd = git_mkstemp_mode(buffer, 0444);
}
return fd;
}
@@ -2283,9 +2274,10 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
void *buf, unsigned long len, time_t mtime)
{
int fd, ret;
- size_t size;
- unsigned char *compressed;
+ unsigned char compressed[4096];
z_stream stream;
+ git_SHA_CTX c;
+ unsigned char parano_sha1[20];
char *filename;
static char tmpfile[PATH_MAX];
@@ -2303,36 +2295,40 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
/* Set it up */
memset(&stream, 0, sizeof(stream));
deflateInit(&stream, zlib_compression_level);
- size = 8 + deflateBound(&stream, len+hdrlen);
- compressed = xmalloc(size);
-
- /* Compress it */
stream.next_out = compressed;
- stream.avail_out = size;
+ stream.avail_out = sizeof(compressed);
+ git_SHA1_Init(&c);
/* First header.. */
stream.next_in = (unsigned char *)hdr;
stream.avail_in = hdrlen;
while (deflate(&stream, 0) == Z_OK)
/* nothing */;
+ git_SHA1_Update(&c, hdr, hdrlen);
/* Then the data itself.. */
stream.next_in = buf;
stream.avail_in = len;
- ret = deflate(&stream, Z_FINISH);
+ do {
+ unsigned char *in0 = stream.next_in;
+ ret = deflate(&stream, Z_FINISH);
+ git_SHA1_Update(&c, in0, stream.next_in - in0);
+ if (write_buffer(fd, compressed, stream.next_out - compressed) < 0)
+ die("unable to write sha1 file");
+ stream.next_out = compressed;
+ stream.avail_out = sizeof(compressed);
+ } while (ret == Z_OK);
+
if (ret != Z_STREAM_END)
die("unable to deflate new object %s (%d)", sha1_to_hex(sha1), ret);
-
ret = deflateEnd(&stream);
if (ret != Z_OK)
die("deflateEnd on object %s failed (%d)", sha1_to_hex(sha1), ret);
+ git_SHA1_Final(parano_sha1, &c);
+ if (hashcmp(sha1, parano_sha1) != 0)
+ die("confused by unstable object source data for %s", sha1_to_hex(sha1));
- size = stream.total_out;
-
- if (write_buffer(fd, compressed, size) < 0)
- die("unable to write sha1 file");
close_sha1_file(fd);
- free(compressed);
if (mtime) {
struct utimbuf utb;
@@ -2436,6 +2432,8 @@ static int index_mem(unsigned char *sha1, void *buf, size_t size,
return ret;
}
+#define SMALL_FILE_SIZE (32*1024)
+
int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
enum object_type type, const char *path)
{
@@ -2450,6 +2448,14 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
else
ret = -1;
strbuf_release(&sbuf);
+ } else if (size <= SMALL_FILE_SIZE) {
+ char *buf = xmalloc(size);
+ if (size == read_in_full(fd, buf, size))
+ ret = index_mem(sha1, buf, size, write_object, type,
+ path);
+ else
+ ret = error("short read %s", strerror(errno));
+ free(buf);
} else if (size) {
void *buf = xmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
ret = index_mem(sha1, buf, size, write_object, type, path);
diff --git a/sha1_name.c b/sha1_name.c
index 1739e9e612..bf92417838 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -5,6 +5,7 @@
#include "blob.h"
#include "tree-walk.h"
#include "refs.h"
+#include "remote.h"
static int find_short_object_filename(int len, const char *name, unsigned char *sha1)
{
@@ -240,7 +241,8 @@ static int ambiguous_path(const char *path, int len)
/*
* *string and *len will only be substituted, and *string returned (for
- * later free()ing) if the string passed in is of the form @{-<n>}.
+ * later free()ing) if the string passed in is a magic short-hand form
+ * to name a branch.
*/
static char *substitute_branch_name(const char **string, int *len)
{
@@ -278,8 +280,7 @@ int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref)
*ref = xstrdup(r);
if (!warn_ambiguous_refs)
break;
- } else if ((flag & REF_ISSYMREF) &&
- (len != 4 || strcmp(str, "HEAD")))
+ } else if ((flag & REF_ISSYMREF) && strcmp(fullref, "HEAD"))
warning("ignoring dangling symref %s.", fullref);
}
free(last_branch);
@@ -323,6 +324,20 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
return logs_found;
}
+static inline int upstream_mark(const char *string, int len)
+{
+ const char *suffix[] = { "@{upstream}", "@{u}" };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(suffix); i++) {
+ int suffix_len = strlen(suffix[i]);
+ if (suffix_len <= len
+ && !memcmp(string, suffix[i], suffix_len))
+ return suffix_len;
+ }
+ return 0;
+}
+
static int get_sha1_1(const char *name, int len, unsigned char *sha1);
static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
@@ -340,8 +355,10 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
if (len && str[len-1] == '}') {
for (at = len-2; at >= 0; at--) {
if (str[at] == '@' && str[at+1] == '{') {
- reflog_len = (len-1) - (at+2);
- len = at;
+ if (!upstream_mark(str + at, len - at)) {
+ reflog_len = (len-1) - (at+2);
+ len = at;
+ }
break;
}
}
@@ -381,6 +398,10 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
unsigned long co_time;
int co_tz, co_cnt;
+ /* a @{-N} placed anywhere except the start is an error */
+ if (str[at+2] == '-')
+ return -1;
+
/* Is it asking for N-th entry, or approxidate? */
for (i = nth = 0; 0 <= nth && i < reflog_len; i++) {
char ch = str[at+2+i];
@@ -395,9 +416,12 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
} else if (0 <= nth)
at_time = 0;
else {
+ int errors = 0;
char *tmp = xstrndup(str + at + 2, reflog_len);
- at_time = approxidate(tmp);
+ at_time = approxidate_careful(tmp, &errors);
free(tmp);
+ if (errors)
+ return -1;
}
if (read_ref_at(real_ref, at_time, nth, sha1, NULL,
&co_time, &co_tz, &co_cnt)) {
@@ -740,17 +764,10 @@ static int grab_nth_branch_switch(unsigned char *osha1, unsigned char *nsha1,
}
/*
- * This reads "@{-N}" syntax, finds the name of the Nth previous
- * branch we were on, and places the name of the branch in the given
- * buf and returns the number of characters parsed if successful.
- *
- * If the input is not of the accepted format, it returns a negative
- * number to signal an error.
- *
- * If the input was ok but there are not N branch switches in the
- * reflog, it returns 0.
+ * Parse @{-N} syntax, return the number of characters parsed
+ * if successful; otherwise signal an error with negative value.
*/
-int interpret_branch_name(const char *name, struct strbuf *buf)
+static int interpret_nth_prior_checkout(const char *name, struct strbuf *buf)
{
long nth;
int i, retval;
@@ -837,6 +854,80 @@ int get_sha1_mb(const char *name, unsigned char *sha1)
}
/*
+ * This reads short-hand syntax that not only evaluates to a commit
+ * object name, but also can act as if the end user spelled the name
+ * of the branch from the command line.
+ *
+ * - "@{-N}" finds the name of the Nth previous branch we were on, and
+ * places the name of the branch in the given buf and returns the
+ * number of characters parsed if successful.
+ *
+ * - "<branch>@{upstream}" finds the name of the other ref that
+ * <branch> is configured to merge with (missing <branch> defaults
+ * to the current branch), and places the name of the branch in the
+ * given buf and returns the number of characters parsed if
+ * successful.
+ *
+ * If the input is not of the accepted format, it returns a negative
+ * number to signal an error.
+ *
+ * If the input was ok but there are not N branch switches in the
+ * reflog, it returns 0.
+ */
+int interpret_branch_name(const char *name, struct strbuf *buf)
+{
+ char *cp;
+ struct branch *upstream;
+ int namelen = strlen(name);
+ int len = interpret_nth_prior_checkout(name, buf);
+ int tmp_len;
+
+ if (!len)
+ return len; /* syntax Ok, not enough switches */
+ if (0 < len && len == namelen)
+ return len; /* consumed all */
+ else if (0 < len) {
+ /* we have extra data, which might need further processing */
+ struct strbuf tmp = STRBUF_INIT;
+ int used = buf->len;
+ int ret;
+
+ strbuf_add(buf, name + len, namelen - len);
+ ret = interpret_branch_name(buf->buf, &tmp);
+ /* that data was not interpreted, remove our cruft */
+ if (ret < 0) {
+ strbuf_setlen(buf, used);
+ return len;
+ }
+ strbuf_reset(buf);
+ strbuf_addbuf(buf, &tmp);
+ strbuf_release(&tmp);
+ /* tweak for size of {-N} versus expanded ref name */
+ return ret - used + len;
+ }
+
+ cp = strchr(name, '@');
+ if (!cp)
+ return -1;
+ tmp_len = upstream_mark(cp, namelen - (cp - name));
+ if (!tmp_len)
+ return -1;
+ len = cp + tmp_len - name;
+ cp = xstrndup(name, cp - name);
+ upstream = branch_get(*cp ? cp : NULL);
+ if (!upstream
+ || !upstream->merge
+ || !upstream->merge[0]->dst)
+ return error("No upstream branch found for '%s'", cp);
+ free(cp);
+ cp = shorten_unambiguous_ref(upstream->merge[0]->dst, 0);
+ strbuf_reset(buf);
+ strbuf_addstr(buf, cp);
+ free(cp);
+ return len;
+}
+
+/*
* This is like "get_sha1_basic()", except it allows "sha1 expressions",
* notably "xyz^" for "parent of xyz"
*/
@@ -901,13 +992,15 @@ static void diagnose_invalid_index_path(int stage,
pos = cache_name_pos(filename, namelen);
if (pos < 0)
pos = -pos - 1;
- ce = active_cache[pos];
- if (ce_namelen(ce) == namelen &&
- !memcmp(ce->name, filename, namelen))
- die("Path '%s' is in the index, but not at stage %d.\n"
- "Did you mean ':%d:%s'?",
- filename, stage,
- ce_stage(ce), filename);
+ if (pos < active_nr) {
+ ce = active_cache[pos];
+ if (ce_namelen(ce) == namelen &&
+ !memcmp(ce->name, filename, namelen))
+ die("Path '%s' is in the index, but not at stage %d.\n"
+ "Did you mean ':%d:%s'?",
+ filename, stage,
+ ce_stage(ce), filename);
+ }
/* Confusion between relative and absolute filenames? */
fullnamelen = namelen + strlen(prefix);
@@ -917,13 +1010,15 @@ static void diagnose_invalid_index_path(int stage,
pos = cache_name_pos(fullname, fullnamelen);
if (pos < 0)
pos = -pos - 1;
- ce = active_cache[pos];
- if (ce_namelen(ce) == fullnamelen &&
- !memcmp(ce->name, fullname, fullnamelen))
- die("Path '%s' is in the index, but not '%s'.\n"
- "Did you mean ':%d:%s'?",
- fullname, filename,
- ce_stage(ce), fullname);
+ if (pos < active_nr) {
+ ce = active_cache[pos];
+ if (ce_namelen(ce) == fullnamelen &&
+ !memcmp(ce->name, fullname, fullnamelen))
+ die("Path '%s' is in the index, but not '%s'.\n"
+ "Did you mean ':%d:%s'?",
+ fullname, filename,
+ ce_stage(ce), fullname);
+ }
if (!lstat(filename, &st))
die("Path '%s' exists on disk, but not in the index.", filename);
diff --git a/submodule.c b/submodule.c
index 3007f7d5a6..b3b8bc1479 100644
--- a/submodule.c
+++ b/submodule.c
@@ -4,22 +4,26 @@
#include "diff.h"
#include "commit.h"
#include "revision.h"
+#include "run-command.h"
+#include "diffcore.h"
static int add_submodule_odb(const char *path)
{
struct strbuf objects_directory = STRBUF_INIT;
struct alternate_object_database *alt_odb;
+ int ret = 0;
strbuf_addf(&objects_directory, "%s/.git/objects/", path);
- if (!is_directory(objects_directory.buf))
- return -1;
-
+ if (!is_directory(objects_directory.buf)) {
+ ret = -1;
+ goto done;
+ }
/* avoid adding it twice */
for (alt_odb = alt_odb_list; alt_odb; alt_odb = alt_odb->next)
if (alt_odb->name - alt_odb->base == objects_directory.len &&
!strncmp(alt_odb->base, objects_directory.buf,
objects_directory.len))
- return 0;
+ goto done;
alt_odb = xmalloc(objects_directory.len + 42 + sizeof(*alt_odb));
alt_odb->next = alt_odb_list;
@@ -30,11 +34,14 @@ static int add_submodule_odb(const char *path)
alt_odb->name[41] = '\0';
alt_odb_list = alt_odb;
prepare_alt_odb();
- return 0;
+done:
+ strbuf_release(&objects_directory);
+ return ret;
}
void show_submodule_summary(FILE *f, const char *path,
unsigned char one[20], unsigned char two[20],
+ unsigned dirty_submodule,
const char *del, const char *add, const char *reset)
{
struct rev_info rev;
@@ -79,6 +86,16 @@ void show_submodule_summary(FILE *f, const char *path,
message = "(revision walker failed)";
}
+ if (dirty_submodule & DIRTY_SUBMODULE_UNTRACKED)
+ fprintf(f, "Submodule %s contains untracked content\n", path);
+ if (dirty_submodule & DIRTY_SUBMODULE_MODIFIED)
+ fprintf(f, "Submodule %s contains modified content\n", path);
+
+ if (!hashcmp(one, two)) {
+ strbuf_release(&sb);
+ return;
+ }
+
strbuf_addf(&sb, "Submodule %s %s..", path,
find_unique_abbrev(one, DEFAULT_ABBREV));
if (!fast_backward && !fast_forward)
@@ -112,3 +129,80 @@ void show_submodule_summary(FILE *f, const char *path,
}
strbuf_release(&sb);
}
+
+unsigned is_submodule_modified(const char *path, int ignore_untracked)
+{
+ int i;
+ ssize_t len;
+ struct child_process cp;
+ const char *argv[] = {
+ "status",
+ "--porcelain",
+ NULL,
+ NULL,
+ };
+ const char *env[LOCAL_REPO_ENV_SIZE + 3];
+ struct strbuf buf = STRBUF_INIT;
+ unsigned dirty_submodule = 0;
+ const char *line, *next_line;
+
+ for (i = 0; i < LOCAL_REPO_ENV_SIZE; i++)
+ env[i] = local_repo_env[i];
+
+ strbuf_addf(&buf, "%s/.git/", path);
+ if (!is_directory(buf.buf)) {
+ strbuf_release(&buf);
+ /* The submodule is not checked out, so it is not modified */
+ return 0;
+
+ }
+ strbuf_reset(&buf);
+
+ strbuf_addf(&buf, "GIT_WORK_TREE=%s", path);
+ env[i++] = strbuf_detach(&buf, NULL);
+ strbuf_addf(&buf, "GIT_DIR=%s/.git", path);
+ env[i++] = strbuf_detach(&buf, NULL);
+ env[i] = NULL;
+
+ if (ignore_untracked)
+ argv[2] = "-uno";
+
+ memset(&cp, 0, sizeof(cp));
+ cp.argv = argv;
+ cp.env = env;
+ cp.git_cmd = 1;
+ cp.no_stdin = 1;
+ cp.out = -1;
+ if (start_command(&cp))
+ die("Could not run git status --porcelain");
+
+ len = strbuf_read(&buf, cp.out, 1024);
+ line = buf.buf;
+ while (len > 2) {
+ if ((line[0] == '?') && (line[1] == '?')) {
+ dirty_submodule |= DIRTY_SUBMODULE_UNTRACKED;
+ if (dirty_submodule & DIRTY_SUBMODULE_MODIFIED)
+ break;
+ } else {
+ dirty_submodule |= DIRTY_SUBMODULE_MODIFIED;
+ if (ignore_untracked ||
+ (dirty_submodule & DIRTY_SUBMODULE_UNTRACKED))
+ break;
+ }
+ next_line = strchr(line, '\n');
+ if (!next_line)
+ break;
+ next_line++;
+ len -= (next_line - line);
+ line = next_line;
+ }
+ close(cp.out);
+
+ if (finish_command(&cp))
+ die("git status --porcelain failed");
+
+ for (i = LOCAL_REPO_ENV_SIZE; env[i]; i++)
+ free((char *)env[i]);
+ strbuf_release(&buf);
+ return dirty_submodule;
+}
diff --git a/submodule.h b/submodule.h
index 4c0269d679..dbda270873 100644
--- a/submodule.h
+++ b/submodule.h
@@ -3,6 +3,8 @@
void show_submodule_summary(FILE *f, const char *path,
unsigned char one[20], unsigned char two[20],
+ unsigned dirty_submodule,
const char *del, const char *add, const char *reset);
+unsigned is_submodule_modified(const char *path, int ignore_untracked);
#endif
diff --git a/t/Makefile b/t/Makefile
index bd09390d32..25c559bb49 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -27,6 +27,8 @@ pre-clean:
clean:
$(RM) -r 'trash directory'.* test-results
+ $(RM) t????/cvsroot/CVSROOT/?*
+ $(RM) -r valgrind/bin
aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
diff --git a/t/diff-lib.sh b/t/diff-lib.sh
index 4bddeb591e..75a35fcd06 100644
--- a/t/diff-lib.sh
+++ b/t/diff-lib.sh
@@ -1,7 +1,5 @@
:
-_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"
sanitize_diff_raw='/^:/s/ '"$_x40"' '"$_x40"' \([A-Z]\)[0-9]* / X X \1# /'
compare_diff_raw () {
# When heuristics are improved, the score numbers would change.
diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
index 76d8b7b803..5a734b1b7b 100644
--- a/t/gitweb-lib.sh
+++ b/t/gitweb-lib.sh
@@ -25,6 +25,7 @@ our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png';
our \$projects_list = '';
our \$export_ok = '';
our \$strict_export = '';
+our \$maxload = undef;
EOF
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 28aff887b5..da4b8d5a6f 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -131,3 +131,32 @@ stop_httpd() {
"$LIB_HTTPD_PATH" -d "$HTTPD_ROOT_PATH" \
-f "$TEST_PATH/apache.conf" $HTTPD_PARA -k stop
}
+
+test_http_push_nonff() {
+ REMOTE_REPO=$1
+ LOCAL_REPO=$2
+ BRANCH=$3
+
+ test_expect_success 'non-fast-forward push fails' '
+ cd "$REMOTE_REPO" &&
+ HEAD=$(git rev-parse --verify HEAD) &&
+
+ cd "$LOCAL_REPO" &&
+ git checkout $BRANCH &&
+ echo "changed" > path2 &&
+ git commit -a -m path2 --amend &&
+
+ !(git push -v origin >output 2>&1) &&
+ (cd "$REMOTE_REPO" &&
+ test $HEAD = $(git rev-parse --verify HEAD))
+ '
+
+ test_expect_success 'non-fast-forward push show ref status' '
+ grep "^ ! \[rejected\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$" output
+ '
+
+ test_expect_success 'non-fast-forward push shows help message' '
+ grep "To prevent you from losing history, non-fast-forward updates were rejected" \
+ output
+ '
+}
diff --git a/t/lib-patch-mode.sh b/t/lib-patch-mode.sh
index 75a3ee283d..ce36f34d03 100755..100644
--- a/t/lib-patch-mode.sh
+++ b/t/lib-patch-mode.sh
@@ -1,3 +1,5 @@
+: included from t2016 and others
+
. ./test-lib.sh
if ! test_have_prereq PERL; then
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 5386504790..675773479a 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -167,6 +167,25 @@ test_expect_success 'init with --template (blank)' '
! test -f template-blank/.git/info/exclude
'
+test_expect_success 'init with init.templatedir set' '
+ mkdir templatedir-source &&
+ echo Content >templatedir-source/file &&
+ (
+ HOME="`pwd`" &&
+ export HOME &&
+ test_config="${HOME}/.gitconfig" &&
+ git config -f "$test_config" init.templatedir "${HOME}/templatedir-source" &&
+ mkdir templatedir-set &&
+ cd templatedir-set &&
+ unset GIT_CONFIG_NOGLOBAL &&
+ unset GIT_TEMPLATE_DIR &&
+ NO_SET_GIT_TEMPLATE_DIR=t &&
+ export NO_SET_GIT_TEMPLATE_DIR &&
+ git init
+ ) &&
+ test_cmp templatedir-source/file templatedir-set/.git/file
+'
+
test_expect_success 'init --bare/--shared overrides system/global config' '
(
HOME="`pwd`" &&
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 4e72b53140..c3e7e322a8 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -4,21 +4,8 @@ test_description='CRLF conversion'
. ./test-lib.sh
-q_to_nul () {
- perl -pe 'y/Q/\000/'
-}
-
-q_to_cr () {
- tr Q '\015'
-}
-
-append_cr () {
- sed -e 's/$/Q/' | tr Q '\015'
-}
-
-remove_cr () {
- tr '\015' Q <"$1" | grep Q >/dev/null &&
- tr '\015' Q <"$1" | sed -ne 's/Q$//p'
+has_cr() {
+ tr '\015' Q <"$1" | grep Q >/dev/null
}
test_expect_success setup '
@@ -156,7 +143,7 @@ test_expect_success 'checkout with autocrlf=true' '
for f in one dir/two
do
- remove_cr "$f" >tmp && mv -f tmp $f &&
+ remove_cr <"$f" >tmp && mv -f tmp $f &&
git update-index -- $f || {
echo "Eh? $f"
false
@@ -180,7 +167,7 @@ test_expect_success 'checkout with autocrlf=input' '
for f in one dir/two
do
- if remove_cr "$f" >/dev/null
+ if has_cr "$f"
then
echo "Eh? $f"
false
@@ -245,7 +232,7 @@ test_expect_success 'apply patch (autocrlf=true)' '
git read-tree --reset -u HEAD &&
git apply patch.file &&
- test "$patched" = "`remove_cr one | git hash-object --stdin`" || {
+ test "$patched" = "`remove_cr <one | git hash-object --stdin`" || {
echo "Eh? apply without index"
false
}
@@ -272,7 +259,7 @@ test_expect_success 'apply patch --index (autocrlf=true)' '
git apply --index patch.file &&
test "$patched" = `git rev-parse :one` &&
- test "$patched" = "`remove_cr one | git hash-object --stdin`" || {
+ test "$patched" = "`remove_cr <one | git hash-object --stdin`" || {
echo "Eh? apply with --index"
false
}
@@ -285,7 +272,7 @@ test_expect_success '.gitattributes says two is binary' '
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
- if remove_cr dir/two >/dev/null
+ if has_cr dir/two
then
echo "Huh?"
false
@@ -293,7 +280,7 @@ test_expect_success '.gitattributes says two is binary' '
: happy
fi &&
- if remove_cr one >/dev/null
+ if has_cr one
then
: happy
else
@@ -301,7 +288,7 @@ test_expect_success '.gitattributes says two is binary' '
false
fi &&
- if remove_cr three >/dev/null
+ if has_cr three
then
echo "Huh?"
false
@@ -316,7 +303,7 @@ test_expect_success '.gitattributes says two is input' '
echo "two crlf=input" >.gitattributes &&
git read-tree --reset -u HEAD &&
- if remove_cr dir/two >/dev/null
+ if has_cr dir/two
then
echo "Huh?"
false
@@ -331,7 +318,7 @@ test_expect_success '.gitattributes says two and three are text' '
echo "t* crlf" >.gitattributes &&
git read-tree --reset -u HEAD &&
- if remove_cr dir/two >/dev/null
+ if has_cr dir/two
then
: happy
else
@@ -339,7 +326,7 @@ test_expect_success '.gitattributes says two and three are text' '
false
fi &&
- if remove_cr three >/dev/null
+ if has_cr three
then
: happy
else
@@ -357,14 +344,14 @@ test_expect_success 'in-tree .gitattributes (1)' '
rm -rf tmp one dir .gitattributes patch.file three &&
git read-tree --reset -u HEAD &&
- if remove_cr one >/dev/null
+ if has_cr one
then
echo "Eh? one should not have CRLF"
false
else
: happy
fi &&
- remove_cr three >/dev/null || {
+ has_cr three || {
echo "Eh? three should still have CRLF"
false
}
@@ -376,14 +363,14 @@ test_expect_success 'in-tree .gitattributes (2)' '
git read-tree --reset HEAD &&
git checkout-index -f -q -u -a &&
- if remove_cr one >/dev/null
+ if has_cr one
then
echo "Eh? one should not have CRLF"
false
else
: happy
fi &&
- remove_cr three >/dev/null || {
+ has_cr three || {
echo "Eh? three should still have CRLF"
false
}
@@ -396,14 +383,14 @@ test_expect_success 'in-tree .gitattributes (3)' '
git checkout-index -u .gitattributes &&
git checkout-index -u one dir/two three &&
- if remove_cr one >/dev/null
+ if has_cr one
then
echo "Eh? one should not have CRLF"
false
else
: happy
fi &&
- remove_cr three >/dev/null || {
+ has_cr three || {
echo "Eh? three should still have CRLF"
false
}
@@ -416,14 +403,14 @@ test_expect_success 'in-tree .gitattributes (4)' '
git checkout-index -u one dir/two three &&
git checkout-index -u .gitattributes &&
- if remove_cr one >/dev/null
+ if has_cr one
then
echo "Eh? one should not have CRLF"
false
else
: happy
fi &&
- remove_cr three >/dev/null || {
+ has_cr three || {
echo "Eh? three should still have CRLF"
false
}
@@ -456,7 +443,7 @@ test_expect_success 'checkout when deleting .gitattributes' '
git checkout master~1 &&
git checkout master &&
- remove_cr .file2 >/dev/null
+ has_cr .file2
'
diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh
index f1e1d48869..7af3fbcc7b 100755
--- a/t/t0022-crlf-rename.sh
+++ b/t/t0022-crlf-rename.sh
@@ -12,7 +12,7 @@ test_expect_success setup '
test_tick &&
git commit -m Initial &&
- sed -e "s/\$/ /" "$TEST_DIRECTORY"/t0022-crlf-rename.sh >elpmas &&
+ append_cr <"$TEST_DIRECTORY"/t0022-crlf-rename.sh >elpmas &&
git add elpmas &&
rm -f sample &&
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 89282ccf7a..41df6bcf27 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -108,13 +108,17 @@ $test_case 'merge (case change)' '
'
-$test_case 'add (with different case)' '
+
+
+test_expect_failure 'add (with different case)' '
git reset --hard initial &&
rm camelcase &&
echo 1 >CamelCase &&
git add CamelCase &&
- test $(git ls-files | grep -i camelcase | wc -l) = 1
+ camel=$(git ls-files | grep -i camelcase) &&
+ test $(echo "$camel" | wc -l) = 1 &&
+ test "z$(git cat-file blob :$camel)" = z1
'
diff --git a/t/t0101-at-syntax.sh b/t/t0101-at-syntax.sh
new file mode 100755
index 0000000000..a1998b558f
--- /dev/null
+++ b/t/t0101-at-syntax.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+test_description='various @{whatever} syntax tests'
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+ test_commit one &&
+ test_commit two
+'
+
+check_at() {
+ echo "$2" >expect &&
+ git log -1 --format=%s "$1" >actual &&
+ test_cmp expect actual
+}
+
+test_expect_success '@{0} shows current' '
+ check_at @{0} two
+'
+
+test_expect_success '@{1} shows old' '
+ check_at @{1} one
+'
+
+test_expect_success '@{now} shows current' '
+ check_at @{now} two
+'
+
+test_expect_success '@{2001-09-17} (before the first commit) shows old' '
+ check_at @{2001-09-17} one
+'
+
+test_expect_success 'silly approxidates work' '
+ check_at @{3.hot.dogs.on.2001-09-17} one
+'
+
+test_expect_success 'notice misspelled upstream' '
+ test_must_fail git log -1 --format=%s @{usptream}
+'
+
+test_expect_success 'complain about total nonsense' '
+ test_must_fail git log -1 --format=%s @{utter.bogosity}
+'
+
+test_done
diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index 22ba7a5442..4f171722d9 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -126,9 +126,6 @@ cat >expected <<\EOF
100644 X 0 Z/NN
EOF
-_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"
-
check_result () {
git ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
test_cmp expected current
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
index c2d408b461..6327d205cb 100755
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -26,8 +26,6 @@ read_tree_twoway () {
git read-tree -m "$1" "$2" && git ls-files --stage
}
-_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"
compare_change () {
sed -n >current \
-e '/^--- /d; /^+++ /d; /^@@ /d;' \
diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index 5e40cec530..0241329a08 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -10,8 +10,6 @@ This is identical to t1001, but uses -u to update the work tree as well.
'
. ./test-lib.sh
-_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"
compare_change () {
sed >current \
-e '1{/^diff --git /d;}' \
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index fd98e445bf..dd32432d62 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -65,10 +65,6 @@ test_expect_success "Can't use --path with --stdin-paths" '
echo example | test_must_fail git hash-object --stdin-paths --path=foo
'
-test_expect_success "Can't use --stdin-paths with --no-filters" '
- echo example | test_must_fail git hash-object --stdin-paths --no-filters
-'
-
test_expect_success "Can't use --path with --no-filters" '
test_must_fail git hash-object --no-filters --path=foo
'
@@ -141,6 +137,20 @@ test_expect_success 'check that --no-filters option works' '
git config --unset core.autocrlf
'
+test_expect_success 'check that --no-filters option works with --stdin-paths' '
+ echo fooQ | tr Q "\\015" >file0 &&
+ cp file0 file1 &&
+ echo "file0 -crlf" >.gitattributes &&
+ echo "file1 crlf" >>.gitattributes &&
+ git config core.autocrlf true &&
+ file0_sha=$(git hash-object file0) &&
+ file1_sha=$(git hash-object file1) &&
+ test "$file0_sha" != "$file1_sha" &&
+ nofilters_file1=$(echo "file1" | git hash-object --stdin-paths --no-filters) &&
+ test "$file0_sha" = "$nofilters_file1" &&
+ git config --unset core.autocrlf
+'
+
pop_repo
for args in "-w --stdin" "--stdin -w"; do
diff --git a/t/t1012-read-tree-df.sh b/t/t1012-read-tree-df.sh
new file mode 100755
index 0000000000..9811d467da
--- /dev/null
+++ b/t/t1012-read-tree-df.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+test_description='read-tree D/F conflict corner cases'
+
+. ./test-lib.sh
+
+maketree () {
+ (
+ rm -f .git/index .git/index.lock &&
+ git clean -d -f -f -q -x &&
+ name="$1" &&
+ shift &&
+ for it
+ do
+ path=$(expr "$it" : '\([^:]*\)') &&
+ mkdir -p $(dirname "$path") &&
+ echo "$it" >"$path" &&
+ git update-index --add "$path" || exit
+ done &&
+ git tag "$name" $(git write-tree)
+ )
+}
+
+settree () {
+ rm -f .git/index .git/index.lock &&
+ git clean -d -f -f -q -x &&
+ git read-tree "$1" &&
+ git checkout-index -f -q -u -a &&
+ git update-index --refresh
+}
+
+checkindex () {
+ git ls-files -s |
+ sed "s|^[0-7][0-7]* $_x40 \([0-3]\) |\1 |" >current &&
+ cat >expect &&
+ test_cmp expect current
+}
+
+test_expect_success setup '
+ maketree O-000 a/b-2/c/d a/b/c/d a/x &&
+ maketree A-000 a/b-2/c/d a/b/c/d a/x &&
+ maketree A-001 a/b-2/c/d a/b/c/d a/b/c/e a/x &&
+ maketree B-000 a/b-2/c/d a/b a/x &&
+
+ maketree O-010 t-0 t/1 t/2 t=3 &&
+ maketree A-010 t-0 t t=3 &&
+ maketree B-010 t/1: t=3: &&
+
+ maketree O-020 ds/dma/ioat.c ds/dma/ioat_dca.c &&
+ maketree A-020 ds/dma/ioat/Makefile ds/dma/ioat/registers.h &&
+ :
+'
+
+test_expect_success '3-way (1)' '
+ settree A-000 &&
+ git read-tree -m -u O-000 A-000 B-000 &&
+ checkindex <<-EOF
+ 3 a/b
+ 0 a/b-2/c/d
+ 1 a/b/c/d
+ 2 a/b/c/d
+ 0 a/x
+ EOF
+'
+
+test_expect_success '3-way (2)' '
+ settree A-001 &&
+ git read-tree -m -u O-000 A-001 B-000 &&
+ checkindex <<-EOF
+ 3 a/b
+ 0 a/b-2/c/d
+ 1 a/b/c/d
+ 2 a/b/c/d
+ 2 a/b/c/e
+ 0 a/x
+ EOF
+'
+
+test_expect_success '3-way (3)' '
+ settree A-010 &&
+ git read-tree -m -u O-010 A-010 B-010 &&
+ checkindex <<-EOF
+ 2 t
+ 1 t-0
+ 2 t-0
+ 1 t/1
+ 3 t/1
+ 1 t/2
+ 0 t=3
+ EOF
+'
+
+test_expect_success '2-way (1)' '
+ settree O-020 &&
+ git read-tree -m -u O-020 A-020 &&
+ checkindex <<-EOF
+ 0 ds/dma/ioat/Makefile
+ 0 ds/dma/ioat/registers.h
+ EOF
+'
+
+test_done
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index f89d7e9e49..f11f98c3ce 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -398,6 +398,17 @@ test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'
test_expect_success 'alternative GIT_CONFIG (--file)' \
'git config --file other-config -l > output && cmp output expect'
+test_expect_success 'refer config from subdirectory' '
+ mkdir x &&
+ (
+ cd x &&
+ echo strasse >expect
+ git config --get --file ../other-config ein.bahn >actual &&
+ test_cmp expect actual
+ )
+
+'
+
GIT_CONFIG=other-config git config anwohner.park ausweis
cat > expect << EOF
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
new file mode 100755
index 0000000000..cc30be4a65
--- /dev/null
+++ b/t/t1304-default-acl.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Matthieu Moy
+#
+
+test_description='Test repository with default ACL'
+
+# Create the test repo with restrictive umask
+# => this must come before . ./test-lib.sh
+umask 077
+
+. ./test-lib.sh
+
+# We need an arbitrary other user give permission to using ACLs. root
+# is a good candidate: exists on all unices, and it has permission
+# anyway, so we don't create a security hole running the testsuite.
+
+if ! setfacl -m u:root:rwx .; then
+ say "Skipping ACL tests: unable to use setfacl"
+ test_done
+fi
+
+modebits () {
+ ls -l "$1" | sed -e 's|^\(..........\).*|\1|'
+}
+
+check_perms_and_acl () {
+ actual=$(modebits "$1") &&
+ case "$actual" in
+ -r--r-----*)
+ : happy
+ ;;
+ *)
+ echo "Got permission '$actual', expected '-r--r-----'"
+ false
+ ;;
+ esac &&
+ getfacl "$1" > actual &&
+ grep -q "user:root:rwx" actual &&
+ grep -q "user:${LOGNAME}:rwx" actual &&
+ grep -q "mask::r--" actual &&
+ grep -q "group::---" actual || false
+}
+
+dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
+
+test_expect_success 'Setup test repo' '
+ setfacl -m u:root:rwx $dirs_to_set &&
+ setfacl -d -m u:"$LOGNAME":rwx $dirs_to_set &&
+ setfacl -d -m u:root:rwx $dirs_to_set &&
+
+ touch file.txt &&
+ git add file.txt &&
+ git commit -m "init"
+'
+
+test_expect_success 'Objects creation does not break ACLs with restrictive umask' '
+ # SHA1 for empty blob
+ check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
+'
+
+test_expect_success 'git gc does not break ACLs with restrictive umask' '
+ git gc &&
+ check_perms_and_acl .git/objects/pack/*.pack
+'
+
+test_done
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 80af6b9b7e..25046c4208 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -214,4 +214,45 @@ test_expect_success 'delete' '
'
+test_expect_success 'rewind2' '
+
+ test_tick && git reset --hard HEAD~2 &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+
+'
+
+test_expect_success '--expire=never' '
+
+ git reflog expire --verbose \
+ --expire=never \
+ --expire-unreachable=never \
+ --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+
+'
+
+test_expect_success 'gc.reflogexpire=never' '
+
+ git config gc.reflogexpire never &&
+ git config gc.reflogexpireunreachable never &&
+ git reflog expire --verbose --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4
+'
+
+test_expect_success 'gc.reflogexpire=false' '
+
+ git config gc.reflogexpire false &&
+ git config gc.reflogexpireunreachable false &&
+ git reflog expire --verbose --all &&
+ loglen=$(wc -l <.git/logs/refs/heads/master) &&
+ test $loglen = 4 &&
+
+ git config --unset gc.reflogexpire &&
+ git config --unset gc.reflogexpireunreachable
+
+'
+
test_done
diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh
index c18ed8edf9..ba25ff354d 100755
--- a/t/t1411-reflog-show.sh
+++ b/t/t1411-reflog-show.sh
@@ -64,4 +64,13 @@ test_expect_success 'using --date= shows reflog date (oneline)' '
test_cmp expect actual
'
+: >expect
+test_expect_success 'empty reflog file' '
+ git branch empty &&
+ : >.git/logs/refs/heads/empty &&
+
+ git log -g empty >actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index a22632f483..49cae3ed52 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -66,12 +66,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
-test_expect_failure 'tag pointing to nonexistent' '
- tag=$(git hash-object -w --stdin < invalid-tag) &&
+test_expect_success 'tag pointing to nonexistent' '
+ tag=$(git hash-object -t tag -w --stdin < invalid-tag) &&
echo $tag > .git/refs/tags/invalid &&
- git fsck --tags 2>out &&
+ test_must_fail git fsck --tags >out &&
cat out &&
- grep "could not load tagged object" out &&
+ grep "broken link" out &&
rm .git/refs/tags/invalid
'
@@ -84,12 +84,12 @@ tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
-test_expect_failure 'tag pointing to something else than its type' '
- tag=$(git hash-object -w --stdin < wrong-tag) &&
+test_expect_success 'tag pointing to something else than its type' '
+ tag=$(git hash-object -t tag -w --stdin < wrong-tag) &&
echo $tag > .git/refs/tags/wrong &&
- git fsck --tags 2>out &&
+ test_must_fail git fsck --tags 2>out &&
cat out &&
- grep "some sane error message" out &&
+ grep "error in tag.*broken links" out &&
rm .git/refs/tags/wrong
'
diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 74e6443664..9df301211c 100755
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
@@ -189,4 +189,10 @@ test_expect_success 'absolute pathspec should fail gracefully' '
)
'
+test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
+ : > dummy_file
+ echo git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file &&
+ git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file
+'
+
test_done
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
new file mode 100755
index 0000000000..8c8dfdaf9f
--- /dev/null
+++ b/t/t1507-rev-parse-upstream.sh
@@ -0,0 +1,139 @@
+#!/bin/sh
+
+test_description='test <branch>@{upstream} syntax'
+
+. ./test-lib.sh
+
+
+test_expect_success 'setup' '
+
+ test_commit 1 &&
+ git checkout -b side &&
+ test_commit 2 &&
+ git checkout master &&
+ git clone . clone &&
+ test_commit 3 &&
+ (cd clone &&
+ test_commit 4 &&
+ git branch --track my-side origin/side)
+
+'
+
+full_name () {
+ (cd clone &&
+ git rev-parse --symbolic-full-name "$@")
+}
+
+commit_subject () {
+ (cd clone &&
+ git show -s --pretty=format:%s "$@")
+}
+
+test_expect_success '@{upstream} resolves to correct full name' '
+ test refs/remotes/origin/master = "$(full_name @{upstream})"
+'
+
+test_expect_success '@{u} resolves to correct full name' '
+ test refs/remotes/origin/master = "$(full_name @{u})"
+'
+
+test_expect_success 'my-side@{upstream} resolves to correct full name' '
+ test refs/remotes/origin/side = "$(full_name my-side@{u})"
+'
+
+test_expect_success 'my-side@{u} resolves to correct commit' '
+ git checkout side &&
+ test_commit 5 &&
+ (cd clone && git fetch) &&
+ test 2 = "$(commit_subject my-side)" &&
+ test 5 = "$(commit_subject my-side@{u})"
+'
+
+test_expect_success 'not-tracking@{u} fails' '
+ test_must_fail full_name non-tracking@{u} &&
+ (cd clone && git checkout --no-track -b non-tracking) &&
+ test_must_fail full_name non-tracking@{u}
+'
+
+test_expect_success '<branch>@{u}@{1} resolves correctly' '
+ test_commit 6 &&
+ (cd clone && git fetch) &&
+ test 5 = $(commit_subject my-side@{u}@{1})
+'
+
+test_expect_success '@{u} without specifying branch fails on a detached HEAD' '
+ git checkout HEAD^0 &&
+ test_must_fail git rev-parse @{u}
+'
+
+test_expect_success 'checkout -b new my-side@{u} forks from the same' '
+(
+ cd clone &&
+ git checkout -b new my-side@{u} &&
+ git rev-parse --symbolic-full-name my-side@{u} >expect &&
+ git rev-parse --symbolic-full-name new@{u} >actual &&
+ test_cmp expect actual
+)
+'
+
+test_expect_success 'merge my-side@{u} records the correct name' '
+(
+ sq="'\''" &&
+ cd clone || exit
+ git checkout master || exit
+ git branch -D new ;# can fail but is ok
+ git branch -t new my-side@{u} &&
+ git merge -s ours new@{u} &&
+ git show -s --pretty=format:%s >actual &&
+ echo "Merge remote branch ${sq}origin/side${sq}" >expect &&
+ test_cmp expect actual
+)
+'
+
+test_expect_success 'branch -d other@{u}' '
+ git checkout -t -b other master &&
+ git branch -d @{u} &&
+ git for-each-ref refs/heads/master >actual &&
+ >expect &&
+ test_cmp expect actual
+'
+
+test_expect_success 'checkout other@{u}' '
+ git branch -f master HEAD &&
+ git checkout -t -b another master &&
+ git checkout @{u} &&
+ git symbolic-ref HEAD >actual &&
+ echo refs/heads/master >expect &&
+ test_cmp expect actual
+'
+
+cat >expect <<EOF
+commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+Reflog: master@{0} (C O Mitter <committer@example.com>)
+Reflog message: branch: Created from HEAD
+Author: A U Thor <author@example.com>
+Date: Thu Apr 7 15:15:13 2005 -0700
+
+ 3
+EOF
+test_expect_success 'log -g other@{u}' '
+ git log -1 -g other@{u} >actual &&
+ test_cmp expect actual
+'
+
+cat >expect <<EOF
+commit 8f489d01d0cc65c3b0f09504ec50b5ed02a70bd5
+Reflog: master@{Thu Apr 7 15:17:13 2005 -0700} (C O Mitter <committer@example.com>)
+Reflog message: branch: Created from HEAD
+Author: A U Thor <author@example.com>
+Date: Thu Apr 7 15:15:13 2005 -0700
+
+ 3
+EOF
+
+test_expect_success 'log -g other@{u}@{now}' '
+ git log -1 -g other@{u}@{now} >actual &&
+ test_cmp expect actual
+'
+
+test_done
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh
new file mode 100755
index 0000000000..d5d6244178
--- /dev/null
+++ b/t/t1508-at-combinations.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+test_description='test various @{X} syntax combinations together'
+. ./test-lib.sh
+
+check() {
+test_expect_${3:-success} "$1 = $2" "
+ echo '$2' >expect &&
+ git log -1 --format=%s '$1' >actual &&
+ test_cmp expect actual
+"
+}
+nonsense() {
+test_expect_${2:-success} "$1 is nonsensical" "
+ test_must_fail git log -1 '$1'
+"
+}
+fail() {
+ "$@" failure
+}
+
+test_expect_success 'setup' '
+ test_commit master-one &&
+ test_commit master-two &&
+ git checkout -b upstream-branch &&
+ test_commit upstream-one &&
+ test_commit upstream-two &&
+ git checkout -b old-branch &&
+ test_commit old-one &&
+ test_commit old-two &&
+ git checkout -b new-branch &&
+ test_commit new-one &&
+ test_commit new-two &&
+ git config branch.old-branch.remote . &&
+ git config branch.old-branch.merge refs/heads/master &&
+ git config branch.new-branch.remote . &&
+ git config branch.new-branch.merge refs/heads/upstream-branch
+'
+
+check HEAD new-two
+check "@{1}" new-one
+check "@{-1}" old-two
+check "@{-1}@{1}" old-one
+check "@{u}" upstream-two
+check "@{u}@{1}" upstream-one
+check "@{-1}@{u}" master-two
+check "@{-1}@{u}@{1}" master-one
+nonsense "@{u}@{-1}"
+nonsense "@{1}@{u}"
+
+test_done
diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh
new file mode 100755
index 0000000000..5322a3bf97
--- /dev/null
+++ b/t/t1509-root-worktree.sh
@@ -0,0 +1,249 @@
+#!/bin/sh
+
+test_description='Test Git when git repository is located at root
+
+This test requires write access in root. Do not bother if you do not
+have a throwaway chroot or VM.
+
+Script t1509/prepare-chroot.sh may help you setup chroot, then you
+can chroot in and execute this test from there.
+'
+
+. ./test-lib.sh
+
+test_cmp_val() {
+ echo "$1" > expected
+ echo "$2" > result
+ test_cmp expected result
+}
+
+test_vars() {
+ test_expect_success "$1: gitdir" '
+ test_cmp_val "'"$2"'" "$(git rev-parse --git-dir)"
+ '
+
+ test_expect_success "$1: worktree" '
+ test_cmp_val "'"$3"'" "$(git rev-parse --show-toplevel)"
+ '
+
+ test_expect_success "$1: prefix" '
+ test_cmp_val "'"$4"'" "$(git rev-parse --show-prefix)"
+ '
+}
+
+test_foobar_root() {
+ test_expect_success 'add relative' '
+ test -z "$(cd / && git ls-files)" &&
+ git add foo/foome &&
+ git add foo/bar/barme &&
+ git add me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+
+ test_expect_success 'add absolute' '
+ test -z "$(cd / && git ls-files)" &&
+ git add /foo/foome &&
+ git add /foo/bar/barme &&
+ git add /me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+
+}
+
+test_foobar_foo() {
+ test_expect_success 'add relative' '
+ test -z "$(cd / && git ls-files)" &&
+ git add foome &&
+ git add bar/barme &&
+ git add ../me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+
+ test_expect_success 'add absolute' '
+ test -z "$(cd / && git ls-files)" &&
+ git add /foo/foome &&
+ git add /foo/bar/barme &&
+ git add /me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+}
+
+test_foobar_foobar() {
+ test_expect_success 'add relative' '
+ test -z "$(cd / && git ls-files)" &&
+ git add ../foome &&
+ git add barme &&
+ git add ../../me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+
+ test_expect_success 'add absolute' '
+ test -z "$(cd / && git ls-files)" &&
+ git add /foo/foome &&
+ git add /foo/bar/barme &&
+ git add /me &&
+ ( cd / && git ls-files --stage ) > result &&
+ test_cmp /ls.expected result &&
+ rm "$(git rev-parse --git-dir)/index"
+ '
+}
+
+if ! test_have_prereq POSIXPERM || ! [ -w / ]; then
+ say "Dangerous test skipped. Read this test if you want to execute it"
+ test_done
+fi
+
+if [ "$IKNOWWHATIAMDOING" != "YES" ]; then
+ say "You must set env var IKNOWWHATIAMDOING=YES in order to run this test"
+ test_done
+fi
+
+if [ "$UID" = 0 ]; then
+ say "No you can't run this with root"
+ test_done
+fi
+
+ONE_SHA1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d
+
+test_expect_success 'setup' '
+ rm -rf /foo
+ mkdir /foo &&
+ mkdir /foo/bar &&
+ echo 1 > /foo/foome &&
+ echo 1 > /foo/bar/barme &&
+ echo 1 > /me
+'
+
+say "GIT_DIR absolute, GIT_WORK_TREE set"
+
+test_expect_success 'go to /' 'cd /'
+
+cat >ls.expected <<EOF
+100644 $ONE_SHA1 0 foo/bar/barme
+100644 $ONE_SHA1 0 foo/foome
+100644 $ONE_SHA1 0 me
+EOF
+
+export GIT_DIR="$TRASH_DIRECTORY/.git"
+export GIT_WORK_TREE=/
+
+test_vars 'abs gitdir, root' "$GIT_DIR" "/" ""
+test_foobar_root
+
+test_expect_success 'go to /foo' 'cd /foo'
+
+test_vars 'abs gitdir, foo' "$GIT_DIR" "/" "foo/"
+test_foobar_foo
+
+test_expect_success 'go to /foo/bar' 'cd /foo/bar'
+
+test_vars 'abs gitdir, foo/bar' "$GIT_DIR" "/" "foo/bar/"
+test_foobar_foobar
+
+say "GIT_DIR relative, GIT_WORK_TREE set"
+
+test_expect_success 'go to /' 'cd /'
+
+export GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git"
+export GIT_WORK_TREE=/
+
+test_vars 'rel gitdir, root' "$GIT_DIR" "/" ""
+test_foobar_root
+
+test_expect_success 'go to /foo' 'cd /foo'
+
+export GIT_DIR="../$TRASH_DIRECTORY/.git"
+export GIT_WORK_TREE=/
+
+test_vars 'rel gitdir, foo' "$TRASH_DIRECTORY/.git" "/" "foo/"
+test_foobar_foo
+
+test_expect_success 'go to /foo/bar' 'cd /foo/bar'
+
+export GIT_DIR="../../$TRASH_DIRECTORY/.git"
+export GIT_WORK_TREE=/
+
+test_vars 'rel gitdir, foo/bar' "$TRASH_DIRECTORY/.git" "/" "foo/bar/"
+test_foobar_foobar
+
+say "GIT_DIR relative, GIT_WORK_TREE relative"
+
+test_expect_success 'go to /' 'cd /'
+
+export GIT_DIR="$(echo $TRASH_DIRECTORY|sed 's,^/,,')/.git"
+export GIT_WORK_TREE=.
+
+test_vars 'rel gitdir, root' "$GIT_DIR" "/" ""
+test_foobar_root
+
+test_expect_success 'go to /' 'cd /foo'
+
+export GIT_DIR="../$TRASH_DIRECTORY/.git"
+export GIT_WORK_TREE=..
+
+test_vars 'rel gitdir, foo' "$TRASH_DIRECTORY/.git" "/" "foo/"
+test_foobar_foo
+
+test_expect_success 'go to /foo/bar' 'cd /foo/bar'
+
+export GIT_DIR="../../$TRASH_DIRECTORY/.git"
+export GIT_WORK_TREE=../..
+
+test_vars 'rel gitdir, foo/bar' "$TRASH_DIRECTORY/.git" "/" "foo/bar/"
+test_foobar_foobar
+
+say ".git at root"
+
+unset GIT_DIR
+unset GIT_WORK_TREE
+
+test_expect_success 'go to /' 'cd /'
+test_expect_success 'setup' '
+ rm -rf /.git
+ echo "Initialized empty Git repository in /.git/" > expected &&
+ git init > result &&
+ test_cmp expected result
+'
+
+test_vars 'auto gitdir, root' ".git" "/" ""
+test_foobar_root
+
+test_expect_success 'go to /foo' 'cd /foo'
+test_vars 'auto gitdir, foo' "/.git" "/" "foo/"
+test_foobar_foo
+
+test_expect_success 'go to /foo/bar' 'cd /foo/bar'
+test_vars 'auto gitdir, foo/bar' "/.git" "/" "foo/bar/"
+test_foobar_foobar
+
+test_expect_success 'cleanup' 'rm -rf /.git'
+
+say "auto bare gitdir"
+
+# DESTROYYYYY!!!!!
+test_expect_success 'setup' '
+ rm -rf /refs /objects /info /hooks
+ rm /*
+ cd / &&
+ echo "Initialized empty Git repository in /" > expected &&
+ git init --bare > result &&
+ test_cmp expected result
+'
+
+test_vars 'auto gitdir, root' "." "" ""
+
+test_expect_success 'go to /foo' 'cd /foo'
+
+test_vars 'auto gitdir, root' "/" "" ""
+
+test_done
diff --git a/t/t1509/excludes b/t/t1509/excludes
new file mode 100644
index 0000000000..d4d21d31a9
--- /dev/null
+++ b/t/t1509/excludes
@@ -0,0 +1,14 @@
+*.o
+*~
+*.bak
+*.c
+*.h
+.git
+contrib
+Documentation
+git-gui
+gitk-git
+gitweb
+t/t4013
+t/t5100
+t/t5515
diff --git a/t/t1509/prepare-chroot.sh b/t/t1509/prepare-chroot.sh
new file mode 100755
index 0000000000..c5334a8fa4
--- /dev/null
+++ b/t/t1509/prepare-chroot.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+die() {
+ echo >&2 "$@"
+ exit 1
+}
+
+xmkdir() {
+ while [ -n "$1" ]; do
+ [ -d "$1" ] || mkdir "$1" || die "Unable to mkdir $1"
+ shift
+ done
+}
+
+R="$1"
+
+[ -n "$R" ] || die "Usage: prepare-chroot.sh <root>"
+[ -x git ] || die "This script needs to be executed at git source code's top directory"
+[ -x /bin/busybox ] || die "You need busybox"
+
+xmkdir "$R" "$R/bin" "$R/etc" "$R/lib" "$R/dev"
+[ -c "$R/dev/null" ] || die "/dev/null is missing. Do mknod $R/dev/null c 1 3 && chmod 666 $R/dev/null"
+echo "root:x:0:0:root:/:/bin/sh" > "$R/etc/passwd"
+echo "$(id -nu):x:$(id -u):$(id -g)::$(pwd)/t:/bin/sh" >> "$R/etc/passwd"
+echo "root::0:root" > "$R/etc/group"
+echo "$(id -ng)::$(id -g):$(id -nu)" >> "$R/etc/group"
+
+[ -x "$R/bin/busybox" ] || cp /bin/busybox "$R/bin/busybox"
+[ -x "$R/bin/sh" ] || ln -s /bin/busybox "$R/bin/sh"
+[ -x "$R/bin/su" ] || ln -s /bin/busybox "$R/bin/su"
+
+mkdir -p "$R$(pwd)"
+rsync --exclude-from t/t1509/excludes -Ha . "$R$(pwd)"
+ldd git | grep '/' | sed 's,.*\s\(/[^ ]*\).*,\1,' | while read i; do
+ mkdir -p "$R$(dirname $i)"
+ cp "$i" "$R/$i"
+done
+echo "Execute this in root: 'chroot $R /bin/su - $(id -nu)'"
diff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh
index 4d1c2e9e09..2144184d79 100755
--- a/t/t2016-checkout-patch.sh
+++ b/t/t2016-checkout-patch.sh
@@ -66,6 +66,14 @@ test_expect_success 'git checkout -p HEAD^' '
verify_state dir/foo parent parent
'
+test_expect_success 'git checkout -p handles deletion' '
+ set_state dir/foo work index &&
+ rm dir/foo &&
+ (echo n; echo y) | git checkout -p &&
+ verify_saved_state bar &&
+ verify_state dir/foo index index
+'
+
# The idea in the rest is that bar sorts first, so we always say 'y'
# first and if the path limiter fails it'll apply to bar instead of
# dir/foo. There's always an extra 'n' to reject edits to dir/foo in
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 912075063b..2ad2819a34 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '
'
+test_expect_success '"add -u non-existent" should fail' '
+ test_must_fail git add -u non-existent &&
+ ! (git ls-files | grep "non-existent")
+'
+
test_done
diff --git a/t/t2204-add-ignored.sh b/t/t2204-add-ignored.sh
new file mode 100755
index 0000000000..24afdabab7
--- /dev/null
+++ b/t/t2204-add-ignored.sh
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+test_description='giving ignored paths to git add'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ mkdir sub dir dir/sub &&
+ echo sub >.gitignore &&
+ echo ign >>.gitignore &&
+ for p in . sub dir dir/sub
+ do
+ >"$p/ign" &&
+ >"$p/file" || exit 1
+ done
+'
+
+for i in file dir/file dir 'd*'
+do
+ test_expect_success "no complaints for unignored $i" '
+ rm -f .git/index &&
+ git add "$i" &&
+ git ls-files "$i" >out &&
+ test -s out
+ '
+done
+
+for i in ign dir/ign dir/sub dir/sub/*ign sub/file sub sub/*
+do
+ test_expect_success "complaints for ignored $i" '
+ rm -f .git/index &&
+ test_must_fail git add "$i" 2>err &&
+ git ls-files "$i" >out &&
+ ! test -s out &&
+ grep -e "Use -f if" err &&
+ cat err
+ '
+
+ test_expect_success "complaints for ignored $i with unignored file" '
+ rm -f .git/index &&
+ test_must_fail git add "$i" file 2>err &&
+ git ls-files "$i" >out &&
+ ! test -s out &&
+ grep -e "Use -f if" err &&
+ cat err
+ '
+done
+
+for i in sub sub/*
+do
+ test_expect_success "complaints for ignored $i in dir" '
+ rm -f .git/index &&
+ (
+ cd dir &&
+ test_must_fail git add "$i" 2>err &&
+ git ls-files "$i" >out &&
+ ! test -s out &&
+ grep -e "Use -f if" err &&
+ cat err
+ )
+ '
+done
+
+for i in ign file
+do
+ test_expect_success "complaints for ignored $i in sub" '
+ rm -f .git/index &&
+ (
+ cd sub &&
+ test_must_fail git add "$i" 2>err &&
+ git ls-files "$i" >out &&
+ ! test -s out &&
+ grep -e "Use -f if" err &&
+ cat err
+ )
+ '
+done
+
+test_done
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
index f4066cbc09..a7d8187169 100755
--- a/t/t3020-ls-files-error-unmatch.sh
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -11,9 +11,11 @@ line.
'
. ./test-lib.sh
-touch foo bar
-git update-index --add foo bar
-git commit -m "add foo bar"
+test_expect_success 'setup' '
+ touch foo bar &&
+ git update-index --add foo bar &&
+ git commit -m "add foo bar"
+'
test_expect_success \
'git ls-files --error-unmatch should fail with unmatched path.' \
diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index ee60d03fe8..eee0d344d2 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -43,8 +43,6 @@ test_expect_success \
tree=`git write-tree` &&
echo $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"
test_output () {
sed -e "s/ $_x40 / X /" <current >check
test_cmp expected check
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 8be9fb4112..06654c6f82 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -39,8 +39,6 @@ test_expect_success \
tree=`git write-tree` &&
echo $tree'
-_x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
test_output () {
sed -e "s/ $_x40 / X /" <current >check
test_cmp expected check
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index d59a9b4aef..e0b760513c 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -468,4 +468,30 @@ test_expect_success 'detect misconfigured autosetuprebase (no value)' '
git config --unset branch.autosetuprebase
'
+test_expect_success 'attempt to delete a branch without base and unmerged to HEAD' '
+ git checkout my9 &&
+ git config --unset branch.my8.merge &&
+ test_must_fail git branch -d my8
+'
+
+test_expect_success 'attempt to delete a branch merged to its base' '
+ # we are on my9 which is the initial commit; traditionally
+ # we would not have allowed deleting my8 that is not merged
+ # to my9, but it is set to track master that already has my8
+ git config branch.my8.merge refs/heads/master &&
+ git branch -d my8
+'
+
+test_expect_success 'attempt to delete a branch merged to its base' '
+ git checkout master &&
+ echo Third >>A &&
+ git commit -m "Third commit" A &&
+ git branch -t my10 my9 &&
+ git branch -f my10 HEAD^ &&
+ # we are on master which is at the third commit, and my10
+ # is behind us, so traditionally we would have allowed deleting
+ # it; but my10 is set to track my9 that is further behind.
+ test_must_fail git branch -d my10
+'
+
test_done
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 5b262114f3..1d6cd45b55 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -8,6 +8,7 @@ test_description='Test commit notes'
. ./test-lib.sh
cat > fake_editor.sh << \EOF
+#!/bin/sh
echo "$MSG" > "$1"
echo "$MSG" >& 2
EOF
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index cca284004d..dbf7dfba9b 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -134,10 +134,6 @@ test_expect_success 'rebase -q is quiet' '
test ! -s output.out
'
-q_to_cr () {
- tr Q '\015'
-}
-
test_expect_success 'Rebase a commit that sprinkles CRs in' '
(
echo "One"
diff --git a/t/t3408-rebase-multi-line.sh b/t/t3408-rebase-multi-line.sh
index e12cd578e8..2062b858bb 100755
--- a/t/t3408-rebase-multi-line.sh
+++ b/t/t3408-rebase-multi-line.sh
@@ -32,8 +32,8 @@ test_expect_success rebase '
git checkout side &&
git rebase master &&
- git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
- git cat-file commit side@{1} | sed -e "1,/^$/d" >expect &&
+ git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
+ git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
test_cmp expect actual
'
diff --git a/t/t3417-rebase-whitespace-fix.sh b/t/t3417-rebase-whitespace-fix.sh
new file mode 100755
index 0000000000..220a740ee8
--- /dev/null
+++ b/t/t3417-rebase-whitespace-fix.sh
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+test_description='git rebase --whitespace=fix
+
+This test runs git rebase --whitespace=fix and make sure that it works.
+'
+
+. ./test-lib.sh
+
+# prepare initial revision of "file" with a blank line at the end
+cat >file <<EOF
+a
+b
+c
+
+EOF
+
+# expected contents in "file" after rebase
+cat >expect-first <<EOF
+a
+b
+c
+EOF
+
+# prepare second revision of "file"
+cat >second <<EOF
+a
+b
+c
+
+d
+e
+f
+
+
+
+
+EOF
+
+# expected contents in second revision after rebase
+cat >expect-second <<EOF
+a
+b
+c
+
+d
+e
+f
+EOF
+
+test_expect_success 'blank line at end of file; extend at end of file' '
+ git commit --allow-empty -m "Initial empty commit" &&
+ git add file && git commit -m first &&
+ mv second file &&
+ git add file && git commit -m second &&
+ git rebase --whitespace=fix HEAD^^ &&
+ git diff --exit-code HEAD^:file expect-first &&
+ test_cmp file expect-second
+'
+
+# prepare third revision of "file"
+sed -e's/Z//' >third <<EOF
+a
+b
+c
+
+d
+e
+f
+ Z
+ Z
+h
+i
+j
+k
+l
+EOF
+
+sed -e's/ //g' <third >expect-third
+
+test_expect_success 'two blanks line at end of file; extend at end of file' '
+ cp third file && git add file && git commit -m third &&
+ git rebase --whitespace=fix HEAD^^ &&
+ git diff --exit-code HEAD^:file expect-second &&
+ test_cmp file expect-third
+'
+
+test_expect_success 'same, but do not remove trailing spaces' '
+ git config core.whitespace "-blank-at-eol" &&
+ git reset --hard HEAD^ &&
+ cp third file && git add file && git commit -m third &&
+ git rebase --whitespace=fix HEAD^^
+ git diff --exit-code HEAD^:file expect-second &&
+ test_cmp file third
+'
+
+sed -e's/Z//' >beginning <<EOF
+a
+ Z
+ Z
+EOF
+
+cat >expect-beginning <<EOF
+a
+
+
+1
+2
+3
+4
+5
+EOF
+
+test_expect_success 'at beginning of file' '
+ git config core.whitespace "blank-at-eol" &&
+ cp beginning file &&
+ git commit -m beginning file &&
+ for i in 1 2 3 4 5; do
+ echo $i
+ done >> file &&
+ git commit -m more file &&
+ git rebase --whitespace=fix HEAD^^ &&
+ test_cmp file expect-beginning
+'
+
+test_done
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 76b1bb4545..0aaf0ad84b 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -271,4 +271,12 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
test "$status" != 0
'
+test_expect_success 'rm removes subdirectories recursively' '
+ mkdir -p dir/subdir/subsubdir &&
+ echo content >dir/subdir/subsubdir/file &&
+ git add dir/subdir/subsubdir/file &&
+ git rm -f dir/subdir/subsubdir/file &&
+ ! test -d dir
+'
+
test_done
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 85eb0fbf96..525c9a8fdf 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -255,4 +255,9 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
git add track-this
'
+test_expect_success '"add non-existent" should fail' '
+ test_must_fail git add non-existent &&
+ ! (git ls-files | grep "non-existent")
+'
+
test_done
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index 6fb027ba57..8eb47942e2 100755
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
@@ -22,10 +22,12 @@ check_verify_failure () {
###########################################################
# first create a commit, so we have a valid object/type
# for the tag.
-echo Hello >A
-git update-index --add A
-git commit -m "Initial commit"
-head=$(git rev-parse --verify HEAD)
+test_expect_success 'setup' '
+ echo Hello >A &&
+ git update-index --add A &&
+ git commit -m "Initial commit" &&
+ head=$(git rev-parse --verify HEAD)
+'
############################################################
# 1. length check
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index 5868052425..29103f65dc 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -25,7 +25,7 @@ for_each_name () {
for name in \
Name "Name and a${LF}LF" "Name and an${HT}HT" "Name${DQ}" \
"$FN$HT$GN" "$FN$LF$GN" "$FN $GN" "$FN$GN" "$FN$DQ$GN" \
- "With SP in it"
+ "With SP in it" "$FN/file"
do
eval "$1"
done
@@ -33,6 +33,7 @@ for_each_name () {
test_expect_success setup '
+ mkdir "$FN" &&
for_each_name "echo initial >\"\$name\""
git add . &&
git commit -q -m Initial &&
@@ -54,6 +55,7 @@ With SP in it
"\346\277\261\351\207\216\n\347\264\224"
"\346\277\261\351\207\216 \347\264\224"
"\346\277\261\351\207\216\"\347\264\224"
+"\346\277\261\351\207\216/file"
"\346\277\261\351\207\216\347\264\224"
EOF
@@ -67,6 +69,7 @@ With SP in it
"濱野\n純"
濱野 純
"濱野\"純"
+濱野/file
濱野純
EOF
@@ -97,6 +100,13 @@ test_expect_success 'check fully quoted output from diff-tree' '
'
+test_expect_success 'check fully quoted output from ls-tree' '
+
+ git ls-tree --name-only -r HEAD >current &&
+ test_cmp expect.quoted current
+
+'
+
test_expect_success 'setting core.quotepath' '
git config --bool core.quotepath false
@@ -130,4 +140,11 @@ test_expect_success 'check fully quoted output from diff-tree' '
'
+test_expect_success 'check fully quoted output from ls-tree' '
+
+ git ls-tree --name-only -r HEAD >current &&
+ test_cmp expect.raw current
+
+'
+
test_done
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 5514f74b30..476e5ec038 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -194,6 +194,15 @@ test_expect_success 'pop -q is quiet' '
test ! -s output.out
'
+test_expect_success 'pop -q --index works and is quiet' '
+ echo foo > file &&
+ git add file &&
+ git stash save --quiet &&
+ git stash pop -q --index > output.out 2>&1 &&
+ test foo = "$(git show :file)" &&
+ test ! -s output.out
+'
+
test_expect_success 'drop -q is quiet' '
git stash &&
git stash drop -q > output.out 2>&1 &&
diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh
index 8c1b81e248..ff8c2f7532 100755
--- a/t/t4006-diff-mode.sh
+++ b/t/t4006-diff-mode.sh
@@ -20,8 +20,6 @@ test_expect_success \
'test_chmod +x rezrov &&
git diff-index $tree >current'
-_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"
sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check
echo ":100644 100755 X X M rezrov" >expected
diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
index f64aa48d24..bc46563afc 100755
--- a/t/t4012-diff-binary.sh
+++ b/t/t4012-diff-binary.sh
@@ -77,10 +77,6 @@ test_expect_success 'apply binary patch' \
tree1=`git write-tree` &&
test "$tree1" = "$tree0"'
-q_to_nul() {
- perl -pe 'y/Q/\000/'
-}
-
nul_to_q() {
perl -pe 'y/\000/Q/'
}
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 8e3694ed5b..dae6358516 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -204,6 +204,9 @@ log --root --patch-with-stat --summary master
log --root -c --patch-with-stat --summary master
# improved by Timo's patch
log --root --cc --patch-with-stat --summary master
+log -p --first-parent master
+log -m -p --first-parent master
+log -m -p master
log -SF master
log -SF -p master
log --decorate --all
@@ -235,6 +238,9 @@ show initial
show --root initial
show side
show master
+show -c master
+show -m master
+show --first-parent master
show --stat side
show --stat --summary side
show --patch-with-stat side
diff --git a/t/t4013/diff.log_-m_-p_--first-parent_master b/t/t4013/diff.log_-m_-p_--first-parent_master
new file mode 100644
index 0000000000..7a0073f529
--- /dev/null
+++ b/t/t4013/diff.log_-m_-p_--first-parent_master
@@ -0,0 +1,100 @@
+$ git log -m -p --first-parent master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index cead32e..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -4,3 +4,5 @@ C
+ D
+ E
+ F
++1
++2
+diff --git a/file0 b/file0
+index b414108..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -4,3 +4,6 @@
+ 4
+ 5
+ 6
++A
++B
++C
+
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:02:00 2006 +0000
+
+ Third
+
+diff --git a/dir/sub b/dir/sub
+index 8422d40..cead32e 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -2,3 +2,5 @@ A
+ B
+ C
+ D
++E
++F
+diff --git a/file1 b/file1
+new file mode 100644
+index 0000000..b1e6722
+--- /dev/null
++++ b/file1
+@@ -0,0 +1,3 @@
++A
++B
++C
+
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:01:00 2006 +0000
+
+ Second
+
+ This is the second commit.
+
+diff --git a/dir/sub b/dir/sub
+index 35d242b..8422d40 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,2 +1,4 @@
+ A
+ B
++C
++D
+diff --git a/file0 b/file0
+index 01e79c3..b414108 100644
+--- a/file0
++++ b/file0
+@@ -1,3 +1,6 @@
+ 1
+ 2
+ 3
++4
++5
++6
+diff --git a/file2 b/file2
+deleted file mode 100644
+index 01e79c3..0000000
+--- a/file2
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1
+-2
+-3
+
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:00:00 2006 +0000
+
+ Initial
+$
diff --git a/t/t4013/diff.log_-m_-p_master b/t/t4013/diff.log_-m_-p_master
new file mode 100644
index 0000000000..9ca62a01ed
--- /dev/null
+++ b/t/t4013/diff.log_-m_-p_master
@@ -0,0 +1,200 @@
+$ git log -m -p master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index cead32e..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -4,3 +4,5 @@ C
+ D
+ E
+ F
++1
++2
+diff --git a/file0 b/file0
+index b414108..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -4,3 +4,6 @@
+ 4
+ 5
+ 6
++A
++B
++C
+
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a)
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index 7289e35..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,4 +1,8 @@
+ A
+ B
++C
++D
++E
++F
+ 1
+ 2
+diff --git a/file0 b/file0
+index f4615da..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -1,6 +1,9 @@
+ 1
+ 2
+ 3
++4
++5
++6
+ A
+ B
+ C
+diff --git a/file1 b/file1
+new file mode 100644
+index 0000000..b1e6722
+--- /dev/null
++++ b/file1
+@@ -0,0 +1,3 @@
++A
++B
++C
+diff --git a/file2 b/file2
+deleted file mode 100644
+index 01e79c3..0000000
+--- a/file2
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1
+-2
+-3
+diff --git a/file3 b/file3
+deleted file mode 100644
+index 7289e35..0000000
+--- a/file3
++++ /dev/null
+@@ -1,4 +0,0 @@
+-A
+-B
+-1
+-2
+
+commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:03:00 2006 +0000
+
+ Side
+
+diff --git a/dir/sub b/dir/sub
+index 35d242b..7289e35 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,2 +1,4 @@
+ A
+ B
++1
++2
+diff --git a/file0 b/file0
+index 01e79c3..f4615da 100644
+--- a/file0
++++ b/file0
+@@ -1,3 +1,6 @@
+ 1
+ 2
+ 3
++A
++B
++C
+diff --git a/file3 b/file3
+new file mode 100644
+index 0000000..7289e35
+--- /dev/null
++++ b/file3
+@@ -0,0 +1,4 @@
++A
++B
++1
++2
+
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:02:00 2006 +0000
+
+ Third
+
+diff --git a/dir/sub b/dir/sub
+index 8422d40..cead32e 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -2,3 +2,5 @@ A
+ B
+ C
+ D
++E
++F
+diff --git a/file1 b/file1
+new file mode 100644
+index 0000000..b1e6722
+--- /dev/null
++++ b/file1
+@@ -0,0 +1,3 @@
++A
++B
++C
+
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:01:00 2006 +0000
+
+ Second
+
+ This is the second commit.
+
+diff --git a/dir/sub b/dir/sub
+index 35d242b..8422d40 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,2 +1,4 @@
+ A
+ B
++C
++D
+diff --git a/file0 b/file0
+index 01e79c3..b414108 100644
+--- a/file0
++++ b/file0
+@@ -1,3 +1,6 @@
+ 1
+ 2
+ 3
++4
++5
++6
+diff --git a/file2 b/file2
+deleted file mode 100644
+index 01e79c3..0000000
+--- a/file2
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1
+-2
+-3
+
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:00:00 2006 +0000
+
+ Initial
+$
diff --git a/t/t4013/diff.log_-p_--first-parent_master b/t/t4013/diff.log_-p_--first-parent_master
new file mode 100644
index 0000000000..3fc896d424
--- /dev/null
+++ b/t/t4013/diff.log_-p_--first-parent_master
@@ -0,0 +1,78 @@
+$ git log -p --first-parent master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:02:00 2006 +0000
+
+ Third
+
+diff --git a/dir/sub b/dir/sub
+index 8422d40..cead32e 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -2,3 +2,5 @@ A
+ B
+ C
+ D
++E
++F
+diff --git a/file1 b/file1
+new file mode 100644
+index 0000000..b1e6722
+--- /dev/null
++++ b/file1
+@@ -0,0 +1,3 @@
++A
++B
++C
+
+commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:01:00 2006 +0000
+
+ Second
+
+ This is the second commit.
+
+diff --git a/dir/sub b/dir/sub
+index 35d242b..8422d40 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,2 +1,4 @@
+ A
+ B
++C
++D
+diff --git a/file0 b/file0
+index 01e79c3..b414108 100644
+--- a/file0
++++ b/file0
+@@ -1,3 +1,6 @@
+ 1
+ 2
+ 3
++4
++5
++6
+diff --git a/file2 b/file2
+deleted file mode 100644
+index 01e79c3..0000000
+--- a/file2
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1
+-2
+-3
+
+commit 444ac553ac7612cc88969031b02b3767fb8a353a
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:00:00 2006 +0000
+
+ Initial
+$
diff --git a/t/t4013/diff.show_--first-parent_master b/t/t4013/diff.show_--first-parent_master
new file mode 100644
index 0000000000..3dcbe473a0
--- /dev/null
+++ b/t/t4013/diff.show_--first-parent_master
@@ -0,0 +1,30 @@
+$ git show --first-parent master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index cead32e..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -4,3 +4,5 @@ C
+ D
+ E
+ F
++1
++2
+diff --git a/file0 b/file0
+index b414108..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -4,3 +4,6 @@
+ 4
+ 5
+ 6
++A
++B
++C
+$
diff --git a/t/t4013/diff.show_-c_master b/t/t4013/diff.show_-c_master
new file mode 100644
index 0000000000..81aba8da96
--- /dev/null
+++ b/t/t4013/diff.show_-c_master
@@ -0,0 +1,36 @@
+$ git show -c master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --combined dir/sub
+index cead32e,7289e35..992913c
+--- a/dir/sub
++++ b/dir/sub
+@@@ -1,6 -1,4 +1,8 @@@
+ A
+ B
+ +C
+ +D
+ +E
+ +F
++ 1
++ 2
+diff --combined file0
+index b414108,f4615da..10a8a9f
+--- a/file0
++++ b/file0
+@@@ -1,6 -1,6 +1,9 @@@
+ 1
+ 2
+ 3
+ +4
+ +5
+ +6
++ A
++ B
++ C
+$
diff --git a/t/t4013/diff.show_-m_master b/t/t4013/diff.show_-m_master
new file mode 100644
index 0000000000..4ea2ee453d
--- /dev/null
+++ b/t/t4013/diff.show_-m_master
@@ -0,0 +1,93 @@
+$ git show -m master
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0)
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index cead32e..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -4,3 +4,5 @@ C
+ D
+ E
+ F
++1
++2
+diff --git a/file0 b/file0
+index b414108..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -4,3 +4,6 @@
+ 4
+ 5
+ 6
++A
++B
++C
+
+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (from c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a)
+Merge: 9a6d494 c7a2ab9
+Author: A U Thor <author@example.com>
+Date: Mon Jun 26 00:04:00 2006 +0000
+
+ Merge branch 'side'
+
+diff --git a/dir/sub b/dir/sub
+index 7289e35..992913c 100644
+--- a/dir/sub
++++ b/dir/sub
+@@ -1,4 +1,8 @@
+ A
+ B
++C
++D
++E
++F
+ 1
+ 2
+diff --git a/file0 b/file0
+index f4615da..10a8a9f 100644
+--- a/file0
++++ b/file0
+@@ -1,6 +1,9 @@
+ 1
+ 2
+ 3
++4
++5
++6
+ A
+ B
+ C
+diff --git a/file1 b/file1
+new file mode 100644
+index 0000000..b1e6722
+--- /dev/null
++++ b/file1
+@@ -0,0 +1,3 @@
++A
++B
++C
+diff --git a/file2 b/file2
+deleted file mode 100644
+index 01e79c3..0000000
+--- a/file2
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1
+-2
+-3
+diff --git a/file3 b/file3
+deleted file mode 100644
+index 7289e35..0000000
+--- a/file3
++++ /dev/null
+@@ -1,4 +0,0 @@
+-A
+-B
+-1
+-2
+$
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 3bc1cccf88..c7b625642d 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -93,9 +93,9 @@ test_expect_success 'extra headers' '
git config --add format.headers "Cc: S. E. Cipient <scipient@example.com>
" &&
git format-patch --stdout master..side > patch2 &&
- sed -e "/^$/q" patch2 > hdrs2 &&
- grep "^To: R. E. Cipient <rcipient@example.com>$" hdrs2 &&
- grep "^Cc: S. E. Cipient <scipient@example.com>$" hdrs2
+ sed -e "/^\$/q" patch2 > hdrs2 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" hdrs2 &&
+ grep "^Cc: S. E. Cipient <scipient@example.com>\$" hdrs2
'
@@ -104,9 +104,9 @@ test_expect_success 'extra headers without newlines' '
git config --replace-all format.headers "To: R. E. Cipient <rcipient@example.com>" &&
git config --add format.headers "Cc: S. E. Cipient <scipient@example.com>" &&
git format-patch --stdout master..side >patch3 &&
- sed -e "/^$/q" patch3 > hdrs3 &&
- grep "^To: R. E. Cipient <rcipient@example.com>$" hdrs3 &&
- grep "^Cc: S. E. Cipient <scipient@example.com>$" hdrs3
+ sed -e "/^\$/q" patch3 > hdrs3 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" hdrs3 &&
+ grep "^Cc: S. E. Cipient <scipient@example.com>\$" hdrs3
'
@@ -115,32 +115,84 @@ test_expect_success 'extra headers with multiple To:s' '
git config --replace-all format.headers "To: R. E. Cipient <rcipient@example.com>" &&
git config --add format.headers "To: S. E. Cipient <scipient@example.com>" &&
git format-patch --stdout master..side > patch4 &&
- sed -e "/^$/q" patch4 > hdrs4 &&
- grep "^To: R. E. Cipient <rcipient@example.com>,$" hdrs4 &&
- grep "^ *S. E. Cipient <scipient@example.com>$" hdrs4
+ sed -e "/^\$/q" patch4 > hdrs4 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>,\$" hdrs4 &&
+ grep "^ *S. E. Cipient <scipient@example.com>\$" hdrs4
'
test_expect_success 'additional command line cc' '
git config --replace-all format.headers "Cc: R. E. Cipient <rcipient@example.com>" &&
- git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^$/q" >patch5 &&
- grep "^Cc: R. E. Cipient <rcipient@example.com>,$" patch5 &&
- grep "^ *S. E. Cipient <scipient@example.com>$" patch5
+ git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
+ grep "^Cc: R. E. Cipient <rcipient@example.com>,\$" patch5 &&
+ grep "^ *S. E. Cipient <scipient@example.com>\$" patch5
'
test_expect_success 'command line headers' '
git config --unset-all format.headers &&
- git format-patch --add-header="Cc: R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^$/q" >patch6 &&
- grep "^Cc: R. E. Cipient <rcipient@example.com>$" patch6
+ git format-patch --add-header="Cc: R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch6 &&
+ grep "^Cc: R. E. Cipient <rcipient@example.com>\$" patch6
'
test_expect_success 'configuration headers and command line headers' '
git config --replace-all format.headers "Cc: R. E. Cipient <rcipient@example.com>" &&
- git format-patch --add-header="Cc: S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^$/q" >patch7 &&
- grep "^Cc: R. E. Cipient <rcipient@example.com>,$" patch7 &&
- grep "^ *S. E. Cipient <scipient@example.com>$" patch7
+ git format-patch --add-header="Cc: S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch7 &&
+ grep "^Cc: R. E. Cipient <rcipient@example.com>,\$" patch7 &&
+ grep "^ *S. E. Cipient <scipient@example.com>\$" patch7
+'
+
+test_expect_success 'command line To: header' '
+
+ git config --unset-all format.headers &&
+ git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" patch8
+'
+
+test_expect_success 'configuration To: header' '
+
+ git config format.to "R. E. Cipient <rcipient@example.com>" &&
+ git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" patch9
+'
+
+test_expect_success '--no-to overrides config.to' '
+
+ git config --replace-all format.to \
+ "R. E. Cipient <rcipient@example.com>" &&
+ git format-patch --no-to --stdout master..side |
+ sed -e "/^\$/q" >patch10 &&
+ ! grep "^To: R. E. Cipient <rcipient@example.com>\$" patch10
+'
+
+test_expect_success '--no-to and --to replaces config.to' '
+
+ git config --replace-all format.to \
+ "Someone <someone@out.there>" &&
+ git format-patch --no-to --to="Someone Else <else@out.there>" \
+ --stdout master..side |
+ sed -e "/^\$/q" >patch11 &&
+ ! grep "^To: Someone <someone@out.there>\$" patch11 &&
+ grep "^To: Someone Else <else@out.there>\$" patch11
+'
+
+test_expect_success '--no-cc overrides config.cc' '
+
+ git config --replace-all format.cc \
+ "C. E. Cipient <rcipient@example.com>" &&
+ git format-patch --no-cc --stdout master..side |
+ sed -e "/^\$/q" >patch12 &&
+ ! grep "^Cc: C. E. Cipient <rcipient@example.com>\$" patch12
+'
+
+test_expect_success '--no-add-headers overrides config.headers' '
+
+ git config --replace-all format.headers \
+ "Header1: B. E. Cipient <rcipient@example.com>" &&
+ git format-patch --no-add-headers --stdout master..side |
+ sed -e "/^\$/q" >patch13 &&
+ ! grep "^Header1: B. E. Cipient <rcipient@example.com>\$" patch13
'
test_expect_success 'multiple files' '
@@ -406,9 +458,9 @@ test_expect_success 'cover-letter inherits diff options' '
git mv file foo &&
git commit -m foo &&
git format-patch --cover-letter -1 &&
- ! grep "file => foo .* 0 *$" 0000-cover-letter.patch &&
+ ! grep "file => foo .* 0 *\$" 0000-cover-letter.patch &&
git format-patch --cover-letter -1 -M &&
- grep "file => foo .* 0 *$" 0000-cover-letter.patch
+ grep "file => foo .* 0 *\$" 0000-cover-letter.patch
'
@@ -425,7 +477,7 @@ EOF
test_expect_success 'shortlog of cover-letter wraps overly-long onelines' '
git format-patch --cover-letter -2 &&
- sed -e "1,/A U Thor/d" -e "/^$/q" < 0000-cover-letter.patch > output &&
+ sed -e "1,/A U Thor/d" -e "/^\$/q" < 0000-cover-letter.patch > output &&
test_cmp expect output
'
@@ -450,7 +502,7 @@ EOF
test_expect_success 'format-patch respects -U' '
git format-patch -U4 -2 &&
- sed -e "1,/^$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
+ sed -e "1,/^\$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
test_cmp expect output
'
@@ -471,7 +523,7 @@ EOF
test_expect_success 'format-patch -p suppresses stat' '
git format-patch -p -2 &&
- sed -e "1,/^$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
+ sed -e "1,/^\$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
test_cmp expect output
'
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 60dd2014d5..0391a5827e 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -5,6 +5,9 @@ test_description='Return value of diffs'
. ./test-lib.sh
test_expect_success 'setup' '
+ echo "1 " >a &&
+ git add . &&
+ git commit -m zeroth &&
echo 1 >a &&
git add . &&
git commit -m first &&
@@ -13,6 +16,18 @@ test_expect_success 'setup' '
git commit -a -m second
'
+test_expect_success 'git diff --quiet -w HEAD^^ HEAD^' '
+ git diff --quiet -w HEAD^^ HEAD^
+'
+
+test_expect_success 'git diff --quiet HEAD^^ HEAD^' '
+ test_must_fail git diff --quiet HEAD^^ HEAD^
+'
+
+test_expect_success 'git diff --quiet -w HEAD^ HEAD' '
+ test_must_fail git diff --quiet -w HEAD^ HEAD
+'
+
test_expect_success 'git diff-tree HEAD^ HEAD' '
git diff-tree --exit-code HEAD^ HEAD
test $? = 1
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index 5ade44c043..d5ccdd0cf8 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -8,14 +8,13 @@ test_description='Test diff/status color escape codes'
color()
{
- git config diff.color.new "$1" &&
- test "`git config --get-color diff.color.new`" = "$2"
+ actual=$(git config --get-color no.such.slot "$1") &&
+ test "$actual" = "$2"
}
invalid_color()
{
- git config diff.color.new "$1" &&
- test -z "`git config --get-color diff.color.new 2>/dev/null`"
+ test_must_fail git config --get-color no.such.slot "$1"
}
test_expect_success 'reset' '
@@ -42,6 +41,14 @@ test_expect_success 'fg bg attr' '
color "blue red ul" "[4;34;41m"
'
+test_expect_success 'fg bg attr...' '
+ color "blue bold dim ul blink reverse" "[1;2;4;5;7;34m"
+'
+
+test_expect_success 'long color specification' '
+ color "254 255 bold dim ul blink reverse" "[1;2;4;5;7;38;5;254;48;5;255m"
+'
+
test_expect_success '256 colors' '
color "254 bold 255" "[1;38;5;254;48;5;255m"
'
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh
index 5cf8924b21..83c1914771 100755
--- a/t/t4027-diff-submodule.sh
+++ b/t/t4027-diff-submodule.sh
@@ -32,7 +32,8 @@ test_expect_success setup '
cd sub &&
git rev-list HEAD
) &&
- echo ":160000 160000 $3 $_z40 M sub" >expect
+ echo ":160000 160000 $3 $_z40 M sub" >expect &&
+ subtip=$3 subprev=$2
'
test_expect_success 'git diff --raw HEAD' '
@@ -50,6 +51,87 @@ test_expect_success 'git diff-files --raw' '
test_cmp expect actual.files
'
+expect_from_to () {
+ printf "%sSubproject commit %s\n+Subproject commit %s\n" \
+ "-" "$1" "$2"
+}
+
+test_expect_success 'git diff HEAD' '
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subtip $subprev &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (work tree)' '
+ echo >>sub/world &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subtip $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (index)' '
+ (
+ cd sub &&
+ git reset --hard &&
+ echo >>world &&
+ git add world
+ ) &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subtip $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (untracked)' '
+ (
+ cd sub &&
+ git reset --hard &&
+ git clean -qfdx &&
+ >cruft
+ ) &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subtip $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)' '
+ git commit -m "x" sub &&
+ echo >>sub/world &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subprev $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (index, refs match)' '
+ (
+ cd sub &&
+ git reset --hard &&
+ echo >>world &&
+ git add world
+ ) &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subprev $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (untracked, refs match)' '
+ (
+ cd sub &&
+ git reset --hard &&
+ git clean -qfdx &&
+ >cruft
+ ) &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subprev $subprev-dirty &&
+ test_cmp expect.body actual.body
+'
+
test_expect_success 'git diff (empty submodule dir)' '
: >empty &&
rm -rf sub/* sub/.git &&
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 2cf7e01ac2..7584efa36b 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -76,7 +76,7 @@ test_expect_success 'check combined output (1)' '
verify_helper sidewithone
'
-test_expect_failure 'check combined output (2)' '
+test_expect_success 'check combined output (2)' '
git show sidesansone -- >sidesansone &&
verify_helper sidesansone
'
diff --git a/t/t4041-diff-submodule.sh b/t/t4041-diff-submodule.sh
index 5bb4fed3f5..11b19972ca 100755
--- a/t/t4041-diff-submodule.sh
+++ b/t/t4041-diff-submodule.sh
@@ -191,6 +191,78 @@ EOF
"
commit_file sm1 &&
+test_expect_success 'submodule is up to date' "
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+EOF
+"
+
+test_expect_success 'submodule contains untracked content' "
+ echo new > sm1/new-file &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains untracked content
+EOF
+"
+
+test_expect_success 'submodule contains untracked and modifed content' "
+ echo new > sm1/foo6 &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains untracked content
+Submodule sm1 contains modified content
+EOF
+"
+
+test_expect_success 'submodule contains modifed content' "
+ rm -f sm1/new-file &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains modified content
+EOF
+"
+
+(cd sm1; git commit -mchange foo6 >/dev/null) &&
+head8=$(cd sm1; git rev-parse --verify HEAD | cut -c1-7) &&
+test_expect_success 'submodule is modified' "
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 $head6..$head8:
+ > change
+EOF
+"
+
+test_expect_success 'modified submodule contains untracked content' "
+ echo new > sm1/new-file &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains untracked content
+Submodule sm1 $head6..$head8:
+ > change
+EOF
+"
+
+test_expect_success 'modified submodule contains untracked and modifed content' "
+ echo modification >> sm1/foo6 &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains untracked content
+Submodule sm1 contains modified content
+Submodule sm1 $head6..$head8:
+ > change
+EOF
+"
+
+test_expect_success 'modified submodule contains modifed content' "
+ rm -f sm1/new-file &&
+ git diff-index -p --submodule=log HEAD >actual &&
+ diff actual - <<-EOF
+Submodule sm1 contains modified content
+Submodule sm1 $head6..$head8:
+ > change
+EOF
+"
+
rm -rf sm1
test_expect_success 'deleted submodule' "
git diff-index -p --submodule=log HEAD >actual &&
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index ad4cc1a757..9692f16f35 100755
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -20,23 +20,25 @@ EOF
cat file1 >file2
cat file1 >file4
-git update-index --add --remove file1 file2 file4
-git commit -m 'Initial Version' 2>/dev/null
-
-git checkout -b binary
-perl -pe 'y/x/\000/' <file1 >file3
-cat file3 >file4
-git add file2
-perl -pe 'y/\000/v/' <file3 >file1
-rm -f file2
-git update-index --add --remove file1 file2 file3 file4
-git commit -m 'Second Version'
-
-git diff-tree -p master binary >B.diff
-git diff-tree -p -C master binary >C.diff
-
-git diff-tree -p --binary master binary >BF.diff
-git diff-tree -p --binary -C master binary >CF.diff
+test_expect_success 'setup' "
+ git update-index --add --remove file1 file2 file4 &&
+ git commit -m 'Initial Version' 2>/dev/null &&
+
+ git checkout -b binary &&
+ perl -pe 'y/x/\000/' <file1 >file3 &&
+ cat file3 >file4 &&
+ git add file2 &&
+ perl -pe 'y/\000/v/' <file3 >file1 &&
+ rm -f file2 &&
+ git update-index --add --remove file1 file2 file3 file4 &&
+ git commit -m 'Second Version' &&
+
+ git diff-tree -p master binary >B.diff &&
+ git diff-tree -p -C master binary >C.diff &&
+
+ git diff-tree -p --binary master binary >BF.diff &&
+ git diff-tree -p --binary -C master binary >CF.diff
+"
test_expect_success 'stat binary diff -- should not fail.' \
'git checkout master
diff --git a/t/t4104-apply-boundary.sh b/t/t4104-apply-boundary.sh
index 0e3ce3611d..c617c2a33d 100755
--- a/t/t4104-apply-boundary.sh
+++ b/t/t4104-apply-boundary.sh
@@ -134,4 +134,13 @@ test_expect_success 'two lines' '
'
+test_expect_success 'apply patch with 3 context lines matching at end' '
+ { echo a; echo b; echo c; echo d; } >file &&
+ git add file &&
+ echo e >>file &&
+ git diff >patch &&
+ >file &&
+ test_must_fail git apply patch
+'
+
test_done
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index ca26397590..fb9ad247bf 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -261,4 +261,174 @@ test_expect_success 'blank but not empty at EOF' '
grep "new blank line at EOF" error
'
+test_expect_success 'applying beyond EOF requires one non-blank context line' '
+ { echo; echo; echo; echo; } >one &&
+ git add one &&
+ { echo b; } >>one &&
+ git diff -- one >patch &&
+
+ git checkout one &&
+ { echo a; echo; } >one &&
+ cp one expect &&
+ test_must_fail git apply --whitespace=fix patch &&
+ test_cmp one expect &&
+ test_must_fail git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'tons of blanks at EOF should not apply' '
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
+ echo; echo; echo; echo;
+ done >one &&
+ git add one &&
+ echo a >>one &&
+ git diff -- one >patch &&
+
+ >one &&
+ test_must_fail git apply --whitespace=fix patch &&
+ test_must_fail git apply --ignore-space-change --whitespace=fix patch
+'
+
+test_expect_success 'missing blank line at end with --whitespace=fix' '
+ echo a >one &&
+ echo >>one &&
+ git add one &&
+ echo b >>one &&
+ cp one expect &&
+ git diff -- one >patch &&
+ echo a >one &&
+ cp one saved-one &&
+ test_must_fail git apply patch &&
+ git apply --whitespace=fix patch &&
+ test_cmp one expect &&
+ mv saved-one one &&
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'two missing blank lines at end with --whitespace=fix' '
+ { echo a; echo; echo b; echo c; } >one &&
+ cp one no-blank-lines &&
+ { echo; echo; } >>one &&
+ git add one &&
+ echo d >>one &&
+ cp one expect &&
+ echo >>one &&
+ git diff -- one >patch &&
+ cp no-blank-lines one &&
+ test_must_fail git apply patch &&
+ git apply --whitespace=fix patch &&
+ test_cmp one expect &&
+ mv no-blank-lines one &&
+ test_must_fail git apply patch &&
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'shrink file with tons of missing blanks at end of file' '
+ { echo a; echo b; echo c; } >one &&
+ cp one no-blank-lines &&
+ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
+ echo; echo; echo; echo;
+ done >>one &&
+ git add one &&
+ echo a >one &&
+ cp one expect &&
+ git diff -- one >patch &&
+ cp no-blank-lines one &&
+ test_must_fail git apply patch &&
+ git apply --whitespace=fix patch &&
+ test_cmp one expect &&
+ mv no-blank-lines one &&
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'missing blanks at EOF must only match blank lines' '
+ { echo a; echo b; } >one &&
+ git add one &&
+ { echo c; echo d; } >>one &&
+ git diff -- one >patch &&
+
+ echo a >one &&
+ test_must_fail git apply patch
+ test_must_fail git apply --whitespace=fix patch &&
+ test_must_fail git apply --ignore-space-change --whitespace=fix patch
+'
+
+sed -e's/Z//' >one <<EOF
+a
+b
+c
+ Z
+EOF
+
+test_expect_success 'missing blank line should match context line with spaces' '
+ git add one &&
+ echo d >>one &&
+ git diff -- one >patch &&
+ { echo a; echo b; echo c; } >one &&
+ cp one expect &&
+ { echo; echo d; } >>expect &&
+ git add one &&
+
+ git apply --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+sed -e's/Z//' >one <<EOF
+a
+b
+c
+ Z
+EOF
+
+test_expect_success 'same, but with the --ignore-space-option' '
+ git add one &&
+ echo d >>one &&
+ cp one expect &&
+ git diff -- one >patch &&
+ { echo a; echo b; echo c; } >one &&
+ git add one &&
+
+ git checkout-index -f one &&
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
+ git config core.whitespace cr-at-eol &&
+ printf "a\r\n" >one &&
+ printf "b\r\n" >>one &&
+ printf "c\r\n" >>one &&
+ cp one save-one &&
+ printf " \r\n" >>one
+ git add one &&
+ printf "d\r\n" >>one &&
+ cp one expect &&
+ git diff -- one >patch &&
+ mv save-one one &&
+
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
+test_expect_success 'same, but with CR-LF line endings && cr-at-eol unset' '
+ git config --unset core.whitespace &&
+ printf "a\r\n" >one &&
+ printf "b\r\n" >>one &&
+ printf "c\r\n" >>one &&
+ cp one save-one &&
+ printf " \r\n" >>one
+ git add one &&
+ cp one expect &&
+ printf "d\r\n" >>one &&
+ git diff -- one >patch &&
+ mv save-one one &&
+ echo d >>expect &&
+
+ git apply --ignore-space-change --whitespace=fix patch &&
+ test_cmp one expect
+'
+
test_done
diff --git a/t/t4125-apply-ws-fuzz.sh b/t/t4125-apply-ws-fuzz.sh
index 3b471b641b..9671de7999 100755
--- a/t/t4125-apply-ws-fuzz.sh
+++ b/t/t4125-apply-ws-fuzz.sh
@@ -37,11 +37,11 @@ test_expect_success setup '
# patch-2 is the same as patch-1 but is based
# on a version that already has whitespace fixed,
# and does not introduce whitespace breakages.
- sed -e "s/ $//" patch-1 >patch-2 &&
+ sed -e "s/ \$//" patch-1 >patch-2 &&
# If all whitespace breakages are fixed the contents
# should look like file-fixed
- sed -e "s/ $//" file-1 >file-fixed
+ sed -e "s/ \$//" file-1 >file-fixed
'
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 8296605234..810b04b817 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -83,6 +83,12 @@ test_expect_success setup '
echo "X-Fake-Field: Line Three" &&
git format-patch --stdout first | sed -e "1d"
} > patch1.eml &&
+ {
+ echo "X-Fake-Field: Line One" &&
+ echo "X-Fake-Field: Line Two" &&
+ echo "X-Fake-Field: Line Three" &&
+ git format-patch --stdout first | sed -e "1d"
+ } | append_cr >patch1-crlf.eml &&
sed -n -e "3,\$p" msg >file &&
git add file &&
test_tick &&
@@ -123,6 +129,15 @@ test_expect_success 'am applies patch e-mail not in a mbox' '
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
'
+test_expect_success 'am applies patch e-mail not in a mbox with CRLF' '
+ git checkout first &&
+ git am patch1-crlf.eml &&
+ ! test -d .git/rebase-apply &&
+ test -z "$(git diff second)" &&
+ test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
+ test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
+'
+
GIT_AUTHOR_NAME="Another Thor"
GIT_AUTHOR_EMAIL="a.thor@example.com"
GIT_COMMITTER_NAME="Co M Miter"
@@ -287,7 +302,7 @@ test_expect_success 'am --committer-date-is-author-date' '
git checkout first &&
test_tick &&
git am --committer-date-is-author-date patch1 &&
- git cat-file commit HEAD | sed -e "/^$/q" >head1 &&
+ git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
at=$(sed -ne "/^author /s/.*> //p" head1) &&
ct=$(sed -ne "/^committer /s/.*> //p" head1) &&
test "$at" = "$ct"
@@ -297,7 +312,7 @@ test_expect_success 'am without --committer-date-is-author-date' '
git checkout first &&
test_tick &&
git am patch1 &&
- git cat-file commit HEAD | sed -e "/^$/q" >head1 &&
+ git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
at=$(sed -ne "/^author /s/.*> //p" head1) &&
ct=$(sed -ne "/^committer /s/.*> //p" head1) &&
test "$at" != "$ct"
@@ -311,7 +326,7 @@ test_expect_success 'am --ignore-date' '
git checkout first &&
test_tick &&
git am --ignore-date patch1 &&
- git cat-file commit HEAD | sed -e "/^$/q" >head1 &&
+ git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
at=$(sed -ne "/^author /s/.*> //p" head1) &&
echo "$at" | grep "+0000"
'
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index bb402c3780..70856d07ed 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -8,40 +8,42 @@ test_description='git rerere
. ./test-lib.sh
-cat > a1 << EOF
-Some title
-==========
-Whether 'tis nobler in the mind to suffer
-The slings and arrows of outrageous fortune,
-Or to take arms against a sea of troubles,
-And by opposing end them? To die: to sleep;
-No more; and by a sleep to say we end
-The heart-ache and the thousand natural shocks
-That flesh is heir to, 'tis a consummation
-Devoutly to be wish'd.
-EOF
-
-git add a1
-git commit -q -a -m initial
-
-git checkout -b first
-cat >> a1 << EOF
-Some title
-==========
-To die, to sleep;
-To sleep: perchance to dream: ay, there's the rub;
-For in that sleep of death what dreams may come
-When we have shuffled off this mortal coil,
-Must give us pause: there's the respect
-That makes calamity of so long life;
-EOF
-git commit -q -a -m first
-
-git checkout -b second master
-git show first:a1 |
-sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1
-echo "* END *" >>a1
-git commit -q -a -m second
+test_expect_success 'setup' "
+ cat > a1 <<- EOF &&
+ Some title
+ ==========
+ Whether 'tis nobler in the mind to suffer
+ The slings and arrows of outrageous fortune,
+ Or to take arms against a sea of troubles,
+ And by opposing end them? To die: to sleep;
+ No more; and by a sleep to say we end
+ The heart-ache and the thousand natural shocks
+ That flesh is heir to, 'tis a consummation
+ Devoutly to be wish'd.
+ EOF
+
+ git add a1 &&
+ git commit -q -a -m initial &&
+
+ git checkout -b first &&
+ cat >> a1 <<- EOF &&
+ Some title
+ ==========
+ To die, to sleep;
+ To sleep: perchance to dream: ay, there's the rub;
+ For in that sleep of death what dreams may come
+ When we have shuffled off this mortal coil,
+ Must give us pause: there's the respect
+ That makes calamity of so long life;
+ EOF
+ git commit -q -a -m first &&
+
+ git checkout -b second master &&
+ git show first:a1 |
+ sed -e 's/To die, t/To die! T/' -e 's/Some title/Some Title/' > a1 &&
+ echo '* END *' >>a1 &&
+ git commit -q -a -m second
+"
test_expect_success 'nothing recorded without rerere' '
(rm -rf .git/rr-cache; git config rerere.enabled false) &&
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 779a5adf55..1dc224f6fb 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -255,7 +255,7 @@ EOF
test_expect_success 'log --graph with merge' '
git log --graph --date-order --pretty=tformat:%s |
- sed "s/ *$//" >actual &&
+ sed "s/ *\$//" >actual &&
test_cmp expect actual
'
@@ -315,7 +315,7 @@ EOF
test_expect_success 'log --graph with full output' '
git log --graph --date-order --pretty=short |
git name-rev --name-only --stdin |
- sed "s/Merge:.*/Merge: A B/;s/ *$//" >actual &&
+ sed "s/Merge:.*/Merge: A B/;s/ *\$//" >actual &&
test_cmp expect actual
'
@@ -383,7 +383,7 @@ EOF
test_expect_success 'log --graph with merge' '
git log --graph --date-order --pretty=tformat:%s |
- sed "s/ *$//" >actual &&
+ sed "s/ *\$//" >actual &&
test_cmp expect actual
'
diff --git a/t/t4253-am-keep-cr-dos.sh b/t/t4253-am-keep-cr-dos.sh
new file mode 100755
index 0000000000..735e55d77c
--- /dev/null
+++ b/t/t4253-am-keep-cr-dos.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Stefan-W. Hahn
+#
+
+test_description='git-am mbox with dos line ending.
+
+'
+. ./test-lib.sh
+
+# Three patches which will be added as files with dos line ending.
+
+cat >file1 <<\EOF
+line 1
+EOF
+
+cat >file1a <<\EOF
+line 1
+line 4
+EOF
+
+cat >file2 <<\EOF
+line 1
+line 2
+EOF
+
+cat >file3 <<\EOF
+line 1
+line 2
+line 3
+EOF
+
+test_expect_success 'setup repository with dos files' '
+ append_cr <file1 >file &&
+ git add file &&
+ git commit -m Initial &&
+ git tag initial &&
+ append_cr <file2 >file &&
+ git commit -a -m Second &&
+ append_cr <file3 >file &&
+ git commit -a -m Third
+'
+
+test_expect_success 'am with dos files without --keep-cr' '
+ git checkout -b dosfiles initial &&
+ git format-patch -k initial..master &&
+ test_must_fail git am -k -3 000*.patch &&
+ git am --abort &&
+ rm -rf .git/rebase-apply 000*.patch
+'
+
+test_expect_success 'am with dos files with --keep-cr' '
+ git checkout -b dosfiles-keep-cr initial &&
+ git format-patch -k --stdout initial..master | git am --keep-cr -k -3 &&
+ git diff --exit-code master
+'
+
+test_expect_success 'am with dos files config am.keepcr' '
+ git config am.keepcr 1 &&
+ git checkout -b dosfiles-conf-keepcr initial &&
+ git format-patch -k --stdout initial..master | git am -k -3 &&
+ git diff --exit-code master
+'
+
+test_expect_success 'am with dos files config am.keepcr overriden by --no-keep-cr' '
+ git config am.keepcr 1 &&
+ git checkout -b dosfiles-conf-keepcr-override initial &&
+ git format-patch -k initial..master &&
+ test_must_fail git am -k -3 --no-keep-cr 000*.patch &&
+ git am --abort &&
+ rm -rf .git/rebase-apply 000*.patch
+'
+
+test_expect_success 'am with dos files with --keep-cr continue' '
+ git checkout -b dosfiles-keep-cr-continue initial &&
+ git format-patch -k initial..master &&
+ append_cr <file1a >file &&
+ git commit -m "different patch" file &&
+ test_must_fail git am --keep-cr -k -3 000*.patch &&
+ append_cr <file2 >file &&
+ git add file &&
+ git am -3 --resolved &&
+ git diff --exit-code master
+'
+
+test_expect_success 'am with unix files config am.keepcr overriden by --no-keep-cr' '
+ git config am.keepcr 1 &&
+ git checkout -b unixfiles-conf-keepcr-override initial &&
+ cp -f file1 file &&
+ git commit -m "line ending to unix" file &&
+ git format-patch -k initial..master &&
+ git am -k -3 --no-keep-cr 000*.patch &&
+ git diff --exit-code -w master
+'
+
+test_done
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 0037f63d91..27bfba55bd 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -189,6 +189,16 @@ test_expect_success 'git archive --format=zip with --output' \
'git archive --format=zip --output=d2.zip HEAD &&
test_cmp d.zip d2.zip'
+test_expect_success 'git archive with --output, inferring format' '
+ git archive --output=d3.zip HEAD &&
+ test_cmp d.zip d3.zip
+'
+
+test_expect_success 'git archive with --output, override inferred format' '
+ git archive --format=tar --output=d4.zip HEAD &&
+ test_cmp b.tar d4.zip
+'
+
$UNZIP -v >/dev/null 2>&1
if [ $? -eq 127 ]; then
say "Skipping ZIP tests, because unzip was not found"
diff --git a/t/t5100/msg0015 b/t/t5100/msg0015
index 9577238685..4abb3d5c6c 100644
--- a/t/t5100/msg0015
+++ b/t/t5100/msg0015
@@ -1,2 +1,2 @@
-- a list
+ - a list
- of stuff
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
index e2aa254eae..7649b810b1 100755
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -16,7 +16,9 @@ test_expect_success \
perl -e "print \"a\" x 4096;" > a &&
perl -e "print \"b\" x 4096;" > b &&
perl -e "print \"c\" x 4096;" > c &&
- git update-index --add a b c &&
+ test-genrandom "seed a" 2097152 > a_big &&
+ test-genrandom "seed b" 2097152 > b_big &&
+ git update-index --add a a_big b b_big c &&
cat c >d && echo foo >>d && git update-index --add d &&
tree=`git write-tree` &&
commit=`git commit-tree $tree </dev/null` && {
@@ -280,26 +282,8 @@ test_expect_success \
:'
-test_expect_success \
- 'fake a SHA1 hash collision' \
- 'test -f .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 &&
- cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
- .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67'
-
-test_expect_success \
- 'make sure index-pack detects the SHA1 collision' \
- 'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
- grep "SHA1 COLLISION FOUND" msg'
-
-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_expect_success 'unpacking with --strict' '
- git config --unset pack.packsizelimit &&
for j in a b c d e f g
do
for i in 0 1 2 3 4 5 6 7 8 9
@@ -392,10 +376,42 @@ test_expect_success 'index-pack with --strict' '
)
'
-test_expect_success 'tolerate absurdly small packsizelimit' '
- git config pack.packSizeLimit 2 &&
- packname_9=$(git pack-objects test-9 <obj-list) &&
- test $(wc -l <obj-list) = $(ls test-9-*.pack | wc -l)
+test_expect_success 'honor pack.packSizeLimit' '
+ git config pack.packSizeLimit 3m &&
+ packname_10=$(git pack-objects test-10 <obj-list) &&
+ test 2 = $(ls test-10-*.pack | wc -l)
+'
+
+test_expect_success 'verify resulting packs' '
+ git verify-pack test-10-*.pack
+'
+
+test_expect_success 'tolerate packsizelimit smaller than biggest object' '
+ git config pack.packSizeLimit 1 &&
+ packname_11=$(git pack-objects test-11 <obj-list) &&
+ test 5 = $(ls test-11-*.pack | wc -l)
'
+test_expect_success 'verify resulting packs' '
+ git verify-pack test-11-*.pack
+'
+
+#
+# WARNING!
+#
+# The following test is destructive. Please keep the next
+# two tests at the end of this file.
+#
+
+test_expect_success \
+ 'fake a SHA1 hash collision' \
+ 'test -f .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 &&
+ cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
+ .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67'
+
+test_expect_success \
+ 'make sure index-pack detects the SHA1 collision' \
+ 'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg &&
+ grep "SHA1 COLLISION FOUND" msg'
+
test_done
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 3c6687abec..e2ed13dba2 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -148,6 +148,38 @@ test_expect_success 'gc --prune=<date>' '
'
+test_expect_success 'gc --prune=never' '
+
+ add_blob &&
+ git gc --prune=never &&
+ test -f $BLOB_FILE &&
+ git gc --prune=now &&
+ test ! -f $BLOB_FILE
+
+'
+
+test_expect_success 'gc respects gc.pruneExpire=never' '
+
+ git config gc.pruneExpire never &&
+ add_blob &&
+ git gc &&
+ test -f $BLOB_FILE &&
+ git config gc.pruneExpire now &&
+ git gc &&
+ test ! -f $BLOB_FILE
+
+'
+
+test_expect_success 'prune --expire=never' '
+
+ add_blob &&
+ git prune --expire=never &&
+ test -f $BLOB_FILE &&
+ git prune &&
+ test ! -f $BLOB_FILE
+
+'
+
test_expect_success 'gc: prune old objects after local clone' '
add_blob &&
test-chmtime =-$((2*$week+1)) $BLOB_FILE &&
diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 325714e529..17bcb0b040 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -17,23 +17,22 @@ test_expect_success setup '
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git update-ref refs/heads/tofail $commit1 &&
- git clone ./. victim &&
- GIT_DIR=victim/.git git config receive.denyCurrentBranch warn &&
- GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
+ git clone --bare ./. victim.git &&
+ GIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&
git update-ref refs/heads/master $commit1 &&
git update-ref refs/heads/tofail $commit0
'
-cat >victim/.git/hooks/pre-receive <<'EOF'
+cat >victim.git/hooks/pre-receive <<'EOF'
#!/bin/sh
printf %s "$@" >>$GIT_DIR/pre-receive.args
cat - >$GIT_DIR/pre-receive.stdin
echo STDOUT pre-receive
echo STDERR pre-receive >&2
EOF
-chmod u+x victim/.git/hooks/pre-receive
+chmod u+x victim.git/hooks/pre-receive
-cat >victim/.git/hooks/update <<'EOF'
+cat >victim.git/hooks/update <<'EOF'
#!/bin/sh
echo "$@" >>$GIT_DIR/update.args
read x; printf %s "$x" >$GIT_DIR/update.stdin
@@ -41,77 +40,77 @@ echo STDOUT update $1
echo STDERR update $1 >&2
test "$1" = refs/heads/master || exit
EOF
-chmod u+x victim/.git/hooks/update
+chmod u+x victim.git/hooks/update
-cat >victim/.git/hooks/post-receive <<'EOF'
+cat >victim.git/hooks/post-receive <<'EOF'
#!/bin/sh
printf %s "$@" >>$GIT_DIR/post-receive.args
cat - >$GIT_DIR/post-receive.stdin
echo STDOUT post-receive
echo STDERR post-receive >&2
EOF
-chmod u+x victim/.git/hooks/post-receive
+chmod u+x victim.git/hooks/post-receive
-cat >victim/.git/hooks/post-update <<'EOF'
+cat >victim.git/hooks/post-update <<'EOF'
#!/bin/sh
echo "$@" >>$GIT_DIR/post-update.args
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
+chmod u+x victim.git/hooks/post-update
test_expect_success push '
- test_must_fail git send-pack --force ./victim/.git \
+ test_must_fail git send-pack --force ./victim.git \
master tofail >send.out 2>send.err
'
test_expect_success 'updated as expected' '
- test $(GIT_DIR=victim/.git git rev-parse master) = $commit1 &&
- test $(GIT_DIR=victim/.git git rev-parse tofail) = $commit1
+ test $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&
+ test $(GIT_DIR=victim.git git rev-parse tofail) = $commit1
'
test_expect_success 'hooks ran' '
- test -f victim/.git/pre-receive.args &&
- test -f victim/.git/pre-receive.stdin &&
- test -f victim/.git/update.args &&
- test -f victim/.git/update.stdin &&
- test -f victim/.git/post-receive.args &&
- test -f victim/.git/post-receive.stdin &&
- test -f victim/.git/post-update.args &&
- test -f victim/.git/post-update.stdin
+ test -f victim.git/pre-receive.args &&
+ test -f victim.git/pre-receive.stdin &&
+ test -f victim.git/update.args &&
+ test -f victim.git/update.stdin &&
+ test -f victim.git/post-receive.args &&
+ test -f victim.git/post-receive.stdin &&
+ test -f victim.git/post-update.args &&
+ test -f victim.git/post-update.stdin
'
test_expect_success 'pre-receive hook input' '
(echo $commit0 $commit1 refs/heads/master;
echo $commit1 $commit0 refs/heads/tofail
- ) | test_cmp - victim/.git/pre-receive.stdin
+ ) | test_cmp - victim.git/pre-receive.stdin
'
test_expect_success 'update hook arguments' '
(echo refs/heads/master $commit0 $commit1;
echo refs/heads/tofail $commit1 $commit0
- ) | test_cmp - victim/.git/update.args
+ ) | test_cmp - victim.git/update.args
'
test_expect_success 'post-receive hook input' '
echo $commit0 $commit1 refs/heads/master |
- test_cmp - victim/.git/post-receive.stdin
+ test_cmp - victim.git/post-receive.stdin
'
test_expect_success 'post-update hook arguments' '
echo refs/heads/master |
- test_cmp - victim/.git/post-update.args
+ test_cmp - victim.git/post-update.args
'
test_expect_success 'all hook stdin is /dev/null' '
- ! test -s victim/.git/update.stdin &&
- ! test -s victim/.git/post-update.stdin
+ ! test -s victim.git/update.stdin &&
+ ! test -s victim.git/post-update.stdin
'
test_expect_success 'all *-receive hook args are empty' '
- ! test -s victim/.git/pre-receive.args &&
- ! test -s victim/.git/post-receive.args
+ ! test -s victim.git/pre-receive.args &&
+ ! test -s victim.git/post-receive.args
'
test_expect_success 'send-pack produced no output' '
@@ -119,20 +118,21 @@ test_expect_success 'send-pack produced no output' '
'
cat <<EOF >expect
-STDOUT pre-receive
-STDERR pre-receive
-STDOUT update refs/heads/master
-STDERR update refs/heads/master
-STDOUT update refs/heads/tofail
-STDERR update refs/heads/tofail
-STDOUT post-receive
-STDERR post-receive
-STDOUT post-update
-STDERR post-update
+remote: STDOUT pre-receive
+remote: STDERR pre-receive
+remote: STDOUT update refs/heads/master
+remote: STDERR update refs/heads/master
+remote: STDOUT update refs/heads/tofail
+remote: STDERR update refs/heads/tofail
+remote: error: hook declined to update refs/heads/tofail
+remote: STDOUT post-receive
+remote: STDERR post-receive
+remote: STDOUT post-update
+remote: STDERR post-update
EOF
test_expect_success 'send-pack stderr contains hook messages' '
- grep ^STD send.err >actual &&
- test_cmp - actual <expect
+ grep ^remote: send.err | sed "s/ *\$//" >actual &&
+ test_cmp expect actual
'
test_done
diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh
index f0f91f149d..552da65a61 100755
--- a/t/t5407-post-rewrite-hook.sh
+++ b/t/t5407-post-rewrite-hook.sh
@@ -180,4 +180,20 @@ EOF
verify_hook_input
'
+test_expect_success 'git rebase -i (double edit)' '
+ git reset --hard D &&
+ clear_hook_input &&
+ FAKE_LINES="edit 1 edit 2" git rebase -i B &&
+ git rebase --continue &&
+ echo something > foo &&
+ git add foo &&
+ git rebase --continue &&
+ echo rebase >expected.args &&
+ cat >expected.data <<EOF &&
+$(git rev-parse C) $(git rev-parse HEAD^)
+$(git rev-parse D) $(git rev-parse HEAD)
+EOF
+ verify_hook_input
+'
+
test_done
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 936fe0a1a6..2692050209 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -507,15 +507,15 @@ test_expect_success 'remote prune to cause a dangling symref' '
(
cd seven &&
git remote prune origin
- ) 2>err &&
+ ) >err 2>&1 &&
grep "has become dangling" err &&
- : And the dangling symref will not cause other annoying errors
+ : And the dangling symref will not cause other annoying errors &&
(
cd seven &&
git branch -a
) 2>err &&
- ! grep "points nowhere" err
+ ! grep "points nowhere" err &&
(
cd seven &&
test_must_fail git branch nomore origin
@@ -533,5 +533,219 @@ test_expect_success 'show empty remote' '
)
'
-test_done
+test_expect_success 'new remote' '
+(
+ git remote add someremote foo &&
+ echo foo >expect &&
+ git config --get-all remote.someremote.url >actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url bar' '
+(
+ git remote set-url someremote bar &&
+ echo bar >expect &&
+ git config --get-all remote.someremote.url >actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url baz bar' '
+(
+ git remote set-url someremote baz bar &&
+ echo baz >expect &&
+ git config --get-all remote.someremote.url >actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url zot bar' '
+(
+ test_must_fail git remote set-url someremote zot bar &&
+ echo baz >expect &&
+ git config --get-all remote.someremote.url >actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push zot baz' '
+(
+ test_must_fail git remote set-url --push someremote zot baz &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push zot' '
+(
+ git remote set-url --push someremote zot &&
+ echo zot >expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push qux zot' '
+(
+ git remote set-url --push someremote qux zot &&
+ echo qux >expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push foo qu+x' '
+(
+ git remote set-url --push someremote foo qu+x &&
+ echo foo >expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push --add aaa' '
+(
+ git remote set-url --push --add someremote aaa &&
+ echo foo >expect &&
+ echo aaa >>expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+test_expect_success 'remote set-url --push bar aaa' '
+(
+ git remote set-url --push someremote bar aaa &&
+ echo foo >expect &&
+ echo bar >>expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push --delete bar' '
+(
+ git remote set-url --push --delete someremote bar &&
+ echo foo >expect &&
+ echo "YYY" >>expect &&
+ echo baz >>expect &&
+ git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --push --delete foo' '
+(
+ git remote set-url --push --delete someremote foo &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --add bbb' '
+(
+ git remote set-url --add someremote bbb &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ echo bbb >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --delete .*' '
+(
+ test_must_fail git remote set-url --delete someremote .* &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ echo bbb >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --delete bbb' '
+(
+ git remote set-url --delete someremote bbb &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --delete baz' '
+(
+ test_must_fail git remote set-url --delete someremote baz &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --add ccc' '
+(
+ git remote set-url --add someremote ccc &&
+ echo "YYY" >expect &&
+ echo baz >>expect &&
+ echo ccc >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_expect_success 'remote set-url --delete baz' '
+(
+ git remote set-url --delete someremote baz &&
+ echo "YYY" >expect &&
+ echo ccc >>expect &&
+ test_must_fail git config --get-all remote.someremote.pushurl >actual &&
+ echo "YYY" >>actual &&
+ git config --get-all remote.someremote.url >>actual &&
+ cmp expect actual
+)
+'
+
+test_done
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 169af1edde..721821ec92 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -341,6 +341,13 @@ test_expect_success 'fetch into the current branch with --update-head-ok' '
'
+test_expect_success 'fetch --dry-run' '
+
+ rm -f .git/FETCH_HEAD &&
+ git fetch --dry-run . &&
+ ! test -f .git/FETCH_HEAD
+'
+
test_expect_success "should be able to fetch with duplicate refspecs" '
mkdir dups &&
cd dups &&
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 0f04b2e894..2de98e6561 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -660,4 +660,54 @@ test_expect_success 'push with branches containing #' '
git checkout master
'
+test_expect_success 'push --porcelain' '
+ mk_empty &&
+ echo >.git/foo "To testrepo" &&
+ echo >>.git/foo "* refs/heads/master:refs/remotes/origin/master [new branch]" &&
+ echo >>.git/foo "Done" &&
+ git push >.git/bar --porcelain testrepo refs/heads/master:refs/remotes/origin/master &&
+ (
+ cd testrepo &&
+ r=$(git show-ref -s --verify refs/remotes/origin/master) &&
+ test "z$r" = "z$the_commit" &&
+ test 1 = $(git for-each-ref refs/remotes/origin | wc -l)
+ ) &&
+ test_cmp .git/foo .git/bar
+'
+
+test_expect_success 'push --porcelain bad url' '
+ mk_empty &&
+ test_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&
+ test_must_fail grep -q Done .git/bar
+'
+
+test_expect_success 'push --porcelain rejected' '
+ mk_empty &&
+ git push testrepo refs/heads/master:refs/remotes/origin/master &&
+ (cd testrepo &&
+ git reset --hard origin/master^
+ git config receive.denyCurrentBranch true) &&
+
+ echo >.git/foo "To testrepo" &&
+ echo >>.git/foo "! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)" &&
+
+ test_must_fail git push >.git/bar --porcelain testrepo refs/heads/master:refs/heads/master &&
+ test_cmp .git/foo .git/bar
+'
+
+test_expect_success 'push --porcelain --dry-run rejected' '
+ mk_empty &&
+ git push testrepo refs/heads/master:refs/remotes/origin/master &&
+ (cd testrepo &&
+ git reset --hard origin/master
+ git config receive.denyCurrentBranch true) &&
+
+ echo >.git/foo "To testrepo" &&
+ echo >>.git/foo "! refs/heads/master^:refs/heads/master [rejected] (non-fast-forward)" &&
+ echo >>.git/foo "Done" &&
+
+ test_must_fail git push >.git/bar --porcelain --dry-run testrepo refs/heads/master^:refs/heads/master &&
+ test_cmp .git/foo .git/bar
+'
+
test_done
diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh
index 83e2e8ab80..1b06691bb4 100755
--- a/t/t5521-pull-options.sh
+++ b/t/t5521-pull-options.sh
@@ -4,8 +4,6 @@ test_description='pull options'
. ./test-lib.sh
-D=`pwd`
-
test_expect_success 'setup' '
mkdir parent &&
(cd parent && git init &&
@@ -13,48 +11,83 @@ test_expect_success 'setup' '
git commit -m one)
'
-cd "$D"
-
test_expect_success 'git pull -q' '
mkdir clonedq &&
- cd clonedq &&
- git pull -q "$D/parent" >out 2>err &&
- test ! -s out
+ (cd clonedq && git init &&
+ git pull -q "../parent" >out 2>err &&
+ test ! -s err &&
+ test ! -s out)
'
-cd "$D"
-
test_expect_success 'git pull' '
mkdir cloned &&
- cd cloned &&
- git pull "$D/parent" >out 2>err &&
- test -s out
+ (cd cloned && git init &&
+ git pull "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
'
-cd "$D"
test_expect_success 'git pull -v' '
mkdir clonedv &&
- cd clonedv &&
- git pull -v "$D/parent" >out 2>err &&
- test -s out
+ (cd clonedv && git init &&
+ git pull -v "../parent" >out 2>err &&
+ test -s err &&
+ test ! -s out)
'
-cd "$D"
-
test_expect_success 'git pull -v -q' '
mkdir clonedvq &&
- cd clonedvq &&
- git pull -v -q "$D/parent" >out 2>err &&
- test ! -s out
+ (cd clonedvq && git init &&
+ git pull -v -q "../parent" >out 2>err &&
+ test ! -s out &&
+ test ! -s err)
'
-cd "$D"
-
test_expect_success 'git pull -q -v' '
mkdir clonedqv &&
- cd clonedqv &&
- git pull -q -v "$D/parent" >out 2>err &&
- test -s out
+ (cd clonedqv && git init &&
+ git pull -q -v "../parent" >out 2>err &&
+ test ! -s out &&
+ test -s err)
+'
+
+test_expect_success 'git pull --force' '
+ mkdir clonedoldstyle &&
+ (cd clonedoldstyle && git init &&
+ cat >>.git/config <<-\EOF &&
+ [remote "one"]
+ url = ../parent
+ fetch = refs/heads/master:refs/heads/mirror
+ [remote "two"]
+ url = ../parent
+ fetch = refs/heads/master:refs/heads/origin
+ [branch "master"]
+ remote = two
+ merge = refs/heads/master
+ EOF
+ git pull two &&
+ test_commit A &&
+ git branch -f origin &&
+ git pull --all --force
+ )
+'
+
+test_expect_success 'git pull --all' '
+ mkdir clonedmulti &&
+ (cd clonedmulti && git init &&
+ cat >>.git/config <<-\EOF &&
+ [remote "one"]
+ url = ../parent
+ fetch = refs/heads/*:refs/remotes/one/*
+ [remote "two"]
+ url = ../parent
+ fetch = refs/heads/*:refs/remotes/two/*
+ [branch "master"]
+ remote = one
+ merge = refs/heads/master
+ EOF
+ git pull --all
+ )
'
test_done
diff --git a/t/t5524-pull-msg.sh b/t/t5524-pull-msg.sh
new file mode 100755
index 0000000000..8cccecc2fc
--- /dev/null
+++ b/t/t5524-pull-msg.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+test_description='git pull message generation'
+
+. ./test-lib.sh
+
+dollar='$Dollar'
+
+test_expect_success setup '
+ test_commit initial afile original &&
+ git clone . cloned &&
+ (
+ cd cloned &&
+ echo added >bfile &&
+ git add bfile &&
+ test_tick &&
+ git commit -m "add bfile"
+ ) &&
+ test_tick && test_tick &&
+ echo "original $dollar" >afile &&
+ git add afile &&
+ git commit -m "do not clobber $dollar signs"
+'
+
+test_expect_success pull '
+(
+ cd cloned &&
+ git pull --log &&
+ git log -2 &&
+ git cat-file commit HEAD >result &&
+ grep Dollar result
+)
+'
+
+test_done
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index bb18f8bfc4..37fe875411 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -137,6 +137,9 @@ test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '
'
+test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
+ "$ROOT_PATH"/test_repo_clone master
+
stop_httpd
test_done
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 83a8e14c6c..795dc2bcdf 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -88,28 +88,8 @@ test_expect_success 'used receive-pack service' '
test_cmp exp act
'
-test_expect_success 'non-fast-forward push fails' '
- cd "$ROOT_PATH"/test_repo_clone &&
- git checkout master &&
- echo "changed" > path2 &&
- git commit -a -m path2 --amend &&
-
- HEAD=$(git rev-parse --verify HEAD) &&
- !(git push -v origin >output 2>&1) &&
- (cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
- test $HEAD != $(git rev-parse --verify HEAD))
-'
-
-test_expect_success 'non-fast-forward push show ref status' '
- grep "^ ! \[rejected\][ ]*master -> master (non-fast-forward)$" output
-'
-
-test_expect_success 'non-fast-forward push shows help message' '
- grep \
-"To prevent you from losing history, non-fast-forward updates were rejected
-Merge the remote changes before pushing again. See the '"'non-fast-forward'"'
-section of '"'git push --help'"' for details." output
-'
+test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
+ "$ROOT_PATH"/test_repo_clone master
test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
# create a dissimilarly-named remote ref so that git is unable to match the
@@ -126,10 +106,8 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
- grep \
-"To prevent you from losing history, non-fast-forward updates were rejected
-Merge the remote changes before pushing again. See the '"'non-fast-forward'"'
-section of '"'git push --help'"' for details." output
+ grep "To prevent you from losing history, non-fast-forward updates were rejected" \
+ output
'
stop_httpd
diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
index 9f52154cac..adfaae8c5b 100755
--- a/t/t5705-clone-2gb.sh
+++ b/t/t5705-clone-2gb.sh
@@ -31,7 +31,7 @@ test_expect_success 'setup' '
echo "data 5" &&
echo ">2gb" &&
cat commit) |
- git fast-import &&
+ git fast-import --big-file-threshold=2 &&
test ! -f exit-status
'
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index f55627b641..985d517a1c 100755..100644
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
@@ -1,3 +1,5 @@
+: included from 6002 and others
+
[ -d .git/refs/tags ] || mkdir -p .git/refs/tags
:> sed.script
diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
index 510bb9679f..af34a1e817 100755
--- a/t/t6012-rev-list-simplify.sh
+++ b/t/t6012-rev-list-simplify.sh
@@ -8,9 +8,6 @@ note () {
git tag "$1"
}
-_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"
-
unnote () {
git name-rev --tags --stdin | sed -e "s|$_x40 (tags/\([^)]*\)) |\1 |g"
}
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index 7dcf391914..5034dd1352 100755
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
@@ -64,6 +64,10 @@ cp new1.txt test.txt
test_expect_success "merge without conflict" \
"git merge-file test.txt orig.txt new2.txt"
+cp new1.txt test.txt
+test_expect_success "merge without conflict (--quiet)" \
+ "git merge-file --quiet test.txt orig.txt new2.txt"
+
cp new1.txt test2.txt
test_expect_success "merge without conflict (missing LF at EOF)" \
"git merge-file test2.txt orig.txt new2.txt"
@@ -146,8 +150,8 @@ test_expect_success 'binary files cannot be merged' '
grep "Cannot merge binary files" merge.err
'
-sed -e "s/deerit.$/deerit;/" -e "s/me;$/me./" < new5.txt > new6.txt
-sed -e "s/deerit.$/deerit,/" -e "s/me;$/me,/" < new5.txt > new7.txt
+sed -e "s/deerit.\$/deerit;/" -e "s/me;\$/me./" < new5.txt > new6.txt
+sed -e "s/deerit.\$/deerit,/" -e "s/me;\$/me,/" < new5.txt > new7.txt
test_expect_success 'MERGE_ZEALOUS simplifies non-conflicts' '
@@ -211,4 +215,41 @@ test_expect_success '"diff3 -m" style output (2)' '
test_cmp expect actual
'
+cat >expect <<\EOF
+Dominus regit me,
+<<<<<<<<<< new8.txt
+et nihil mihi deerit;
+
+
+
+
+In loco pascuae ibi me collocavit;
+super aquam refectionis educavit me.
+||||||||||
+et nihil mihi deerit.
+In loco pascuae ibi me collocavit,
+super aquam refectionis educavit me;
+==========
+et nihil mihi deerit,
+
+
+
+
+In loco pascuae ibi me collocavit --
+super aquam refectionis educavit me,
+>>>>>>>>>> new9.txt
+animam meam convertit,
+deduxit me super semitas jusitiae,
+propter nomen suum.
+Nam et si ambulavero in medio umbrae mortis,
+non timebo mala, quoniam TU mecum es:
+virga tua et baculus tuus ipsa me consolata sunt.
+EOF
+
+test_expect_success 'marker size' '
+ test_must_fail git merge-file -p --marker-size=10 \
+ new8.txt new5.txt new9.txt >actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index c51865fdbc..3b042aacd6 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -567,6 +567,11 @@ test_expect_success 'skipping away from skipped commit' '
test "$para3" = "$PARA_HASH3"
'
+test_expect_success 'erroring out when using bad path parameters' '
+ test_must_fail git bisect start $PARA_HASH7 $HASH1 -- foobar 2> error.txt &&
+ grep "bad path parameters" error.txt
+'
+
#
#
test_done
diff --git a/t/t6033-merge-crlf.sh b/t/t6033-merge-crlf.sh
index 75d9602de4..e8d65eefb5 100755
--- a/t/t6033-merge-crlf.sh
+++ b/t/t6033-merge-crlf.sh
@@ -1,13 +1,5 @@
#!/bin/sh
-append_cr () {
- sed -e 's/$/Q/' | tr Q '\015'
-}
-
-remove_cr () {
- tr '\015' Q | sed -e 's/Q$//'
-}
-
test_description='merge conflict in crlf repo
b---M
diff --git a/t/t6035-merge-dir-to-symlink.sh b/t/t6035-merge-dir-to-symlink.sh
index 5b96fb0b37..3202e1de6d 100755
--- a/t/t6035-merge-dir-to-symlink.sh
+++ b/t/t6035-merge-dir-to-symlink.sh
@@ -74,7 +74,7 @@ test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '
git tag test2
'
-test_expect_failure 'merge should not have conflicts (resolve)' '
+test_expect_success 'merge should not have conflicts (resolve)' '
git reset --hard &&
git checkout baseline^0 &&
git merge -s resolve test2 &&
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
index 664b0f8052..1785e178a4 100755
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
@@ -89,4 +89,25 @@ test_expect_success 'status when tracking annotated tags' '
grep "set up to track" actual &&
git checkout heavytrack
'
+
+test_expect_success 'setup tracking with branch --set-upstream on existing branch' '
+ git branch from-master master &&
+ test_must_fail git config branch.from-master.merge > actual &&
+ git branch --set-upstream from-master master &&
+ git config branch.from-master.merge > actual &&
+ grep -q "^refs/heads/master$" actual
+'
+
+test_expect_success '--set-upstream does not change branch' '
+ git branch from-master2 master &&
+ test_must_fail git config branch.from-master2.merge > actual &&
+ git rev-list from-master2 &&
+ git update-ref refs/heads/from-master2 from-master2^ &&
+ git rev-parse from-master2 >expect2 &&
+ git branch --set-upstream from-master2 master &&
+ git config branch.from-master.merge > actual &&
+ git rev-parse from-master2 >actual2 &&
+ grep -q "^refs/heads/master$" actual &&
+ cmp expect2 actual2
+'
test_done
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 7eceb086be..e249c3ed41 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -291,6 +291,14 @@ y:y yy
z:zzz
EOF
+test_expect_success 'grep -q, silently report matches' '
+ >empty &&
+ git grep -q mmap >actual &&
+ test_cmp empty actual &&
+ test_must_fail git grep -q qfwfq >actual &&
+ test_cmp empty actual
+'
+
# Create 1024 file names that sort between "y" and "z" to make sure
# the two files are handled by different calls to an external grep.
# This depends on MAXARGS in builtin-grep.c being 1024 or less.
@@ -345,7 +353,7 @@ test_expect_success 'log grep (4)' '
'
test_expect_success 'log grep (5)' '
- git log --author=Thor -F --grep=Thu --pretty=tformat:%s >actual &&
+ git log --author=Thor -F --pretty=tformat:%s >actual &&
( echo third ; echo initial ) >expect &&
test_cmp expect actual
'
@@ -356,6 +364,14 @@ test_expect_success 'log grep (6)' '
test_cmp expect actual
'
+test_expect_success 'log --grep --author implicitly uses all-match' '
+ # grep matches initial and second but not third
+ # author matches only initial and third
+ git log --author="A U Thor" --grep=s --grep=l --format=%s >actual &&
+ echo initial >expect &&
+ test_cmp expect actual
+'
+
test_expect_success 'grep with CE_VALID file' '
git update-index --assume-unchanged t/t &&
rm t/t &&
@@ -478,4 +494,37 @@ test_expect_success 'inside git repository but with --no-index' '
)
'
+test_expect_success 'setup double-dash tests' '
+cat >double-dash <<EOF &&
+--
+->
+other
+EOF
+git add double-dash
+'
+
+cat >expected <<EOF
+double-dash:->
+EOF
+test_expect_success 'grep -- pattern' '
+ git grep -- "->" >actual &&
+ test_cmp expected actual
+'
+test_expect_success 'grep -- pattern -- pathspec' '
+ git grep -- "->" -- double-dash >actual &&
+ test_cmp expected actual
+'
+test_expect_success 'grep -e pattern -- path' '
+ git grep -e "->" -- double-dash >actual &&
+ test_cmp expected actual
+'
+
+cat >expected <<EOF
+double-dash:--
+EOF
+test_expect_success 'grep -e -- -- path' '
+ git grep -e -- -- double-dash >actual &&
+ test_cmp expected actual
+'
+
test_done
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 9503875e97..0da13a8d6b 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -306,4 +306,43 @@ test_expect_success '--remap-to-ancestor with filename filters' '
test $orig_invariant = $(git rev-parse invariant)
'
+test_expect_success 'setup submodule' '
+ rm -fr ?* .git &&
+ git init &&
+ test_commit file &&
+ mkdir submod &&
+ submodurl="$PWD/submod" &&
+ ( cd submod &&
+ git init &&
+ test_commit file-in-submod ) &&
+ git submodule add "$submodurl" &&
+ git commit -m "added submodule" &&
+ test_commit add-file &&
+ ( cd submod && test_commit add-in-submodule ) &&
+ git add submod &&
+ git commit -m "changed submodule" &&
+ git branch original HEAD
+'
+
+orig_head=`git show-ref --hash --head HEAD`
+
+test_expect_success 'rewrite submodule with another content' '
+ git filter-branch --tree-filter "test -d submod && {
+ rm -rf submod &&
+ git rm -rf --quiet submod &&
+ mkdir submod &&
+ : > submod/file
+ } || :" HEAD &&
+ test $orig_head != `git show-ref --hash --head HEAD`
+'
+
+test_expect_success 'replace submodule revision' '
+ git reset --hard original &&
+ git filter-branch -f --tree-filter \
+ "if git ls-files --error-unmatch -- submod > /dev/null 2>&1
+ then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
+ fi" HEAD &&
+ test $orig_head != `git show-ref --hash --head HEAD`
+'
+
test_done
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
new file mode 100755
index 0000000000..d9202d5af5
--- /dev/null
+++ b/t/t7006-pager.sh
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+test_description='Test automatic use of a pager.'
+
+. ./test-lib.sh
+
+rm -f stdout_is_tty
+test_expect_success 'set up terminal for tests' '
+ if test -t 1
+ then
+ : > stdout_is_tty
+ elif
+ test_have_prereq PERL &&
+ "$PERL_PATH" "$TEST_DIRECTORY"/t7006/test-terminal.perl \
+ sh -c "test -t 1"
+ then
+ : > test_terminal_works
+ fi
+'
+
+if test -e stdout_is_tty
+then
+ test_terminal() { "$@"; }
+ test_set_prereq TTY
+elif test -e test_terminal_works
+then
+ test_terminal() {
+ "$PERL_PATH" "$TEST_DIRECTORY"/t7006/test-terminal.perl "$@"
+ }
+ test_set_prereq TTY
+else
+ say no usable terminal, so skipping some tests
+fi
+
+unset GIT_PAGER GIT_PAGER_IN_USE
+git config --unset core.pager
+PAGER='cat > paginated.out'
+export PAGER
+
+test_expect_success 'setup' '
+ test_commit initial
+'
+
+rm -f paginated.out
+test_expect_success TTY 'some commands use a pager' '
+ test_terminal git log &&
+ test -e paginated.out
+'
+
+rm -f paginated.out
+test_expect_success TTY 'some commands do not use a pager' '
+ test_terminal git rev-list HEAD &&
+ ! test -e paginated.out
+'
+
+rm -f paginated.out
+test_expect_success 'no pager when stdout is a pipe' '
+ git log | cat &&
+ ! test -e paginated.out
+'
+
+rm -f paginated.out
+test_expect_success 'no pager when stdout is a regular file' '
+ git log > file &&
+ ! test -e paginated.out
+'
+
+rm -f paginated.out
+test_expect_success TTY 'git --paginate rev-list uses a pager' '
+ test_terminal git --paginate rev-list HEAD &&
+ test -e paginated.out
+'
+
+rm -f file paginated.out
+test_expect_success 'no pager even with --paginate when stdout is a pipe' '
+ git --paginate log | cat &&
+ ! test -e paginated.out
+'
+
+rm -f paginated.out
+test_expect_success TTY 'no pager with --no-pager' '
+ test_terminal git --no-pager log &&
+ ! test -e paginated.out
+'
+
+# A colored commit log will begin with an appropriate ANSI escape
+# for the first color; the text "commit" comes later.
+colorful() {
+ read firstline < $1
+ ! expr "$firstline" : "^[a-zA-Z]" >/dev/null
+}
+
+rm -f colorful.log colorless.log
+test_expect_success 'tests can detect color' '
+ git log --no-color > colorless.log &&
+ git log --color > colorful.log &&
+ ! colorful colorless.log &&
+ colorful colorful.log
+'
+
+rm -f colorless.log
+git config color.ui auto
+test_expect_success 'no color when stdout is a regular file' '
+ git log > colorless.log &&
+ ! colorful colorless.log
+'
+
+rm -f paginated.out
+git config color.ui auto
+test_expect_success TTY 'color when writing to a pager' '
+ TERM=vt100 test_terminal git log &&
+ colorful paginated.out
+'
+
+rm -f colorful.log
+git config color.ui auto
+test_expect_success 'color when writing to a file intended for a pager' '
+ TERM=vt100 GIT_PAGER_IN_USE=true git log > colorful.log &&
+ colorful colorful.log
+'
+
+unset PAGER GIT_PAGER
+git config --unset core.pager
+test_expect_success 'determine default pager' '
+ less=$(git var GIT_PAGER) &&
+ test -n "$less"
+'
+
+if expr "$less" : '^[a-z]*$' > /dev/null && test_have_prereq TTY
+then
+ test_set_prereq SIMPLEPAGER
+fi
+
+unset PAGER GIT_PAGER
+git config --unset core.pager
+rm -f default_pager_used
+test_expect_success SIMPLEPAGER 'default pager is used by default' '
+ cat > $less <<-EOF &&
+ #!$SHELL_PATH
+ wc > default_pager_used
+ EOF
+ chmod +x $less &&
+ PATH=.:$PATH test_terminal git log &&
+ test -e default_pager_used
+'
+
+unset GIT_PAGER
+git config --unset core.pager
+rm -f PAGER_used
+test_expect_success TTY 'PAGER overrides default pager' '
+ PAGER="wc > PAGER_used" &&
+ export PAGER &&
+ test_terminal git log &&
+ test -e PAGER_used
+'
+
+unset GIT_PAGER
+rm -f core.pager_used
+test_expect_success TTY 'core.pager overrides PAGER' '
+ PAGER=wc &&
+ export PAGER &&
+ git config core.pager "wc > core.pager_used" &&
+ test_terminal git log &&
+ test -e core.pager_used
+'
+
+rm -f GIT_PAGER_used
+test_expect_success TTY 'GIT_PAGER overrides core.pager' '
+ git config core.pager wc &&
+ GIT_PAGER="wc > GIT_PAGER_used" &&
+ export GIT_PAGER &&
+ test_terminal git log &&
+ test -e GIT_PAGER_used
+'
+
+test_done
diff --git a/t/t7006/test-terminal.perl b/t/t7006/test-terminal.perl
new file mode 100755
index 0000000000..73ff809371
--- /dev/null
+++ b/t/t7006/test-terminal.perl
@@ -0,0 +1,58 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use IO::Pty;
+use File::Copy;
+
+# Run @$argv in the background with stdout redirected to $out.
+sub start_child {
+ my ($argv, $out) = @_;
+ my $pid = fork;
+ if (not defined $pid) {
+ die "fork failed: $!"
+ } elsif ($pid == 0) {
+ open STDOUT, ">&", $out;
+ close $out;
+ exec(@$argv) or die "cannot exec '$argv->[0]': $!"
+ }
+ return $pid;
+}
+
+# Wait for $pid to finish.
+sub finish_child {
+ # Simplified from wait_or_whine() in run-command.c.
+ my ($pid) = @_;
+
+ my $waiting = waitpid($pid, 0);
+ if ($waiting < 0) {
+ die "waitpid failed: $!";
+ } elsif ($? & 127) {
+ my $code = $? & 127;
+ warn "died of signal $code";
+ return $code - 128;
+ } else {
+ return $? >> 8;
+ }
+}
+
+sub xsendfile {
+ my ($out, $in) = @_;
+
+ # Note: the real sendfile() cannot read from a terminal.
+
+ # It is unspecified by POSIX whether reads
+ # from a disconnected terminal will return
+ # EIO (as in AIX 4.x, IRIX, and Linux) or
+ # end-of-file. Either is fine.
+ copy($in, $out, 4096) or $!{EIO} or die "cannot copy from child: $!";
+}
+
+if ($#ARGV < 1) {
+ die "usage: test-terminal program args";
+}
+my $master = new IO::Pty;
+my $slave = $master->slave;
+my $pid = start_child(\@ARGV, $slave);
+close $slave;
+xsendfile(\*STDOUT, $master);
+exit(finish_child($pid));
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index afb55b3a46..1eef93c2b2 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -11,21 +11,26 @@ test_expect_success 'setup non-bare' '
git commit -a -m two
'
-test_expect_success 'hard reset requires a worktree' '
+test_expect_success '"hard" reset requires a worktree' '
(cd .git &&
test_must_fail git reset --hard)
'
-test_expect_success 'merge reset requires a worktree' '
+test_expect_success '"merge" reset requires a worktree' '
(cd .git &&
test_must_fail git reset --merge)
'
-test_expect_success 'mixed reset is ok' '
+test_expect_success '"keep" reset requires a worktree' '
+ (cd .git &&
+ test_must_fail git reset --keep)
+'
+
+test_expect_success '"mixed" reset is ok' '
(cd .git && git reset)
'
-test_expect_success 'soft reset is ok' '
+test_expect_success '"soft" reset is ok' '
(cd .git && git reset --soft)
'
@@ -40,19 +45,23 @@ test_expect_success 'setup bare' '
cd bare.git
'
-test_expect_success 'hard reset is not allowed in bare' '
+test_expect_success '"hard" reset is not allowed in bare' '
test_must_fail git reset --hard HEAD^
'
-test_expect_success 'merge reset is not allowed in bare' '
+test_expect_success '"merge" reset is not allowed in bare' '
test_must_fail git reset --merge HEAD^
'
-test_expect_success 'mixed reset is not allowed in bare' '
+test_expect_success '"keep" reset is not allowed in bare' '
+ test_must_fail git reset --keep HEAD^
+'
+
+test_expect_success '"mixed" reset is not allowed in bare' '
test_must_fail git reset --mixed HEAD^
'
-test_expect_success 'soft reset is allowed in bare' '
+test_expect_success '"soft" reset is allowed in bare' '
git reset --soft HEAD^ &&
test "`git show --pretty=format:%s | head -n 1`" = "one"
'
diff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh
index 8704d00196..70cdd8e618 100755
--- a/t/t7110-reset-merge.sh
+++ b/t/t7110-reset-merge.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2009 Christian Couder
#
-test_description='Tests for "git reset --merge"'
+test_description='Tests for "git reset" with "--merge" and "--keep" options'
. ./test-lib.sh
@@ -47,6 +47,30 @@ test_expect_success 'reset --merge is ok when switching back' '
#
# working index HEAD target working index HEAD
# ----------------------------------------------------
+# file1: C C C D --keep D D D
+# file2: C D D D --keep C D D
+test_expect_success 'reset --keep is ok with changes in file it does not touch' '
+ git reset --hard second &&
+ cat file1 >file2 &&
+ git reset --keep HEAD^ &&
+ ! grep 4 file1 &&
+ grep 4 file2 &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
+ test -z "$(git diff --cached)"
+'
+
+test_expect_success 'reset --keep is ok when switching back' '
+ git reset --keep second &&
+ grep 4 file1 &&
+ grep 4 file2 &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
+ test -z "$(git diff --cached)"
+'
+
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
# file1: B B C D --merge D D D
# file2: C D D D --merge C D D
test_expect_success 'reset --merge discards changes added to index (1)' '
@@ -78,6 +102,18 @@ test_expect_success 'reset --merge is ok again when switching back (1)' '
#
# working index HEAD target working index HEAD
# ----------------------------------------------------
+# file1: B B C D --keep (disallowed)
+test_expect_success 'reset --keep fails with changes in index in files it touches' '
+ git reset --hard second &&
+ echo "line 5" >> file1 &&
+ git add file1 &&
+ test_must_fail git reset --keep HEAD^
+'
+
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
# file1: C C C D --merge D D D
# file2: C C D D --merge D D D
test_expect_success 'reset --merge discards changes added to index (2)' '
@@ -104,6 +140,30 @@ test_expect_success 'reset --merge is ok again when switching back (2)' '
#
# working index HEAD target working index HEAD
# ----------------------------------------------------
+# file1: C C C D --keep D D D
+# file2: C C D D --keep C D D
+test_expect_success 'reset --keep keeps changes it does not touch' '
+ git reset --hard second &&
+ echo "line 4" >> file2 &&
+ git add file2 &&
+ git reset --keep HEAD^ &&
+ grep 4 file2 &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
+ test -z "$(git diff --cached)"
+'
+
+test_expect_success 'reset --keep keeps changes when switching back' '
+ git reset --keep second &&
+ grep 4 file2 &&
+ grep 4 file1 &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
+ test -z "$(git diff --cached)"
+'
+
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
# file1: A B B C --merge (disallowed)
test_expect_success 'reset --merge fails with changes in file it touches' '
git reset --hard second &&
@@ -116,6 +176,22 @@ test_expect_success 'reset --merge fails with changes in file it touches' '
grep file1 err.log | grep "not uptodate"
'
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
+# file1: A B B C --keep (disallowed)
+test_expect_success 'reset --keep fails with changes in file it touches' '
+ git reset --hard second &&
+ echo "line 5" >> file1 &&
+ test_tick &&
+ git commit -m "add line 5" file1 &&
+ sed -e "s/line 1/changed line 1/" <file1 >file3 &&
+ mv file3 file1 &&
+ test_must_fail git reset --keep HEAD^ 2>err.log &&
+ grep file1 err.log | grep "not uptodate"
+'
+
test_expect_success 'setup 3 different branches' '
git reset --hard second &&
git branch branch1 &&
@@ -156,6 +232,18 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
#
# working index HEAD target working index HEAD
# ----------------------------------------------------
+# file1: X U B C --keep (disallowed)
+test_expect_success '"reset --keep HEAD^" fails with pending merge' '
+ git reset --hard third &&
+ test_must_fail git merge branch1 &&
+ test_must_fail git reset --keep HEAD^ 2>err.log &&
+ grep "middle of a merge" err.log
+'
+
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
# file1: X U B B --merge B B B
test_expect_success '"reset --merge HEAD" is ok with pending merge' '
git reset --hard third &&
@@ -166,7 +254,19 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
test -z "$(git diff)"
'
-test_expect_success '--merge with added/deleted' '
+# The next test will test the following:
+#
+# working index HEAD target working index HEAD
+# ----------------------------------------------------
+# file1: X U B B --keep (disallowed)
+test_expect_success '"reset --keep HEAD" fails with pending merge' '
+ git reset --hard third &&
+ test_must_fail git merge branch1 &&
+ test_must_fail git reset --keep HEAD 2>err.log &&
+ grep "middle of a merge" err.log
+'
+
+test_expect_success '--merge is ok with added/deleted merge' '
git reset --hard third &&
rm -f file2 &&
test_must_fail git merge branch3 &&
@@ -180,4 +280,16 @@ test_expect_success '--merge with added/deleted' '
git diff --exit-code --cached
'
+test_expect_success '--keep fails with added/deleted merge' '
+ git reset --hard third &&
+ rm -f file2 &&
+ test_must_fail git merge branch3 &&
+ ! test -f file2 &&
+ test -f file3 &&
+ git diff --exit-code file3 &&
+ git diff --exit-code branch3 file3 &&
+ test_must_fail git reset --keep HEAD 2>err.log &&
+ grep "middle of a merge" err.log
+'
+
test_done
diff --git a/t/t7111-reset-table.sh b/t/t7111-reset-table.sh
index de896c948d..ce421ad5ac 100755
--- a/t/t7111-reset-table.sh
+++ b/t/t7111-reset-table.sh
@@ -44,26 +44,32 @@ A B C D soft A B D
A B C D mixed A D D
A B C D hard D D D
A B C D merge XXXXX
+A B C D keep XXXXX
A B C C soft A B C
A B C C mixed A C C
A B C C hard C C C
A B C C merge XXXXX
+A B C C keep A C C
B B C D soft B B D
B B C D mixed B D D
B B C D hard D D D
B B C D merge D D D
+B B C D keep XXXXX
B B C C soft B B C
B B C C mixed B C C
B B C C hard C C C
B B C C merge C C C
+B B C C keep B C C
B C C D soft B C D
B C C D mixed B D D
B C C D hard D D D
B C C D merge XXXXX
+B C C D keep XXXXX
B C C C soft B C C
B C C C mixed B C C
B C C C hard C C C
B C C C merge B C C
+B C C C keep B C C
EOF
test_expect_success 'setting up branches to test with unmerged entries' '
@@ -104,10 +110,12 @@ X U B C soft XXXXX
X U B C mixed X C C
X U B C hard C C C
X U B C merge C C C
+X U B C keep XXXXX
X U B B soft XXXXX
X U B B mixed X B B
X U B B hard B B B
X U B B merge B B B
+X U B B keep XXXXX
EOF
test_done
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 6442f710be..d20ed61b48 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -166,19 +166,31 @@ test_expect_success 'checkout -m with merge conflict' '
! test -s current
'
-test_expect_success 'checkout to detach HEAD' '
+test_expect_success 'checkout to detach HEAD (with advice declined)' '
+ git config advice.detachedHead false &&
git checkout -f renamer && git clean -f &&
git checkout renamer^ 2>messages &&
- (cat >messages.expect <<EOF
-Note: moving to '\''renamer^'\'' which isn'\''t a local branch
-If you want to create a new branch from this checkout, you may do so
-(now or later) by using -b with the checkout command again. Example:
- git checkout -b <new_branch_name>
-HEAD is now at 7329388... Initial A one, A two
-EOF
-) &&
- test_cmp messages.expect messages &&
+ grep "HEAD is now at 7329388" messages &&
+ test 1 -eq $(wc -l <messages) &&
+ 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' '
+ git config advice.detachedHead true &&
+ git checkout -f renamer && git clean -f &&
+ git checkout renamer^ 2>messages &&
+ grep "HEAD is now at 7329388" messages &&
+ test 1 -lt $(wc -l <messages) &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 6cc16c39fe..cee319da0a 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -213,7 +213,7 @@ EOF
test_expect_success '--for-status' "
git submodule summary --for-status HEAD^ >actual &&
test_cmp actual - <<EOF
-# Modified submodules:
+# Submodule changes to be committed:
#
# * sm1 $head6...0000000:
#
@@ -227,4 +227,11 @@ test_expect_success 'fail when using --files together with --cached' "
test_must_fail git submodule summary --files --cached
"
+test_expect_success 'should not fail in an empty repo' "
+ git init xyzzy &&
+ cd xyzzy &&
+ git submodule summary >output 2>&1 &&
+ test_cmp output /dev/null
+"
+
test_done
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 8e2449d244..1382a8e58a 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -28,6 +28,8 @@ test_expect_success 'setup a submodule tree' '
git commit -m upstream
git clone . super &&
git clone super submodule &&
+ git clone super rebasing &&
+ git clone super merging &&
(cd super &&
git submodule add ../submodule submodule &&
test_tick &&
@@ -45,6 +47,16 @@ test_expect_success 'setup a submodule tree' '
) &&
git add submodule &&
git commit -m "submodule update"
+ ) &&
+ (cd super &&
+ git submodule add ../rebasing rebasing &&
+ test_tick &&
+ git commit -m "rebasing"
+ ) &&
+ (cd super &&
+ git submodule add ../merging merging &&
+ test_tick &&
+ git commit -m "rebasing"
)
'
@@ -177,21 +189,17 @@ test_expect_success 'submodule update - checkout in .git/config' '
test_expect_success 'submodule init picks up rebase' '
(cd super &&
- git config submodule.rebasing.url git://non-existing/git &&
- git config submodule.rebasing.path does-not-matter &&
- git config submodule.rebasing.update rebase &&
+ git config -f .gitmodules submodule.rebasing.update rebase &&
git submodule init rebasing &&
- test "rebase" = $(git config submodule.rebasing.update)
+ test "rebase" = "$(git config submodule.rebasing.update)"
)
'
test_expect_success 'submodule init picks up merge' '
(cd super &&
- git config submodule.merging.url git://non-existing/git &&
- git config submodule.merging.path does-not-matter &&
- git config submodule.merging.update merge &&
+ git config -f .gitmodules submodule.merging.update merge &&
git submodule init merging &&
- test "merge" = $(git config submodule.merging.update)
+ test "merge" = "$(git config submodule.merging.update)"
)
'
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 8eec0fa9bc..9f5c3edb03 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -150,7 +150,7 @@ EOF
test_expect_success '--signoff' '
echo "yet another content *narf*" >> foo &&
echo "zort" | git commit -s -F - foo &&
- git cat-file commit HEAD | sed "1,/^$/d" > output &&
+ git cat-file commit HEAD | sed "1,/^\$/d" > output &&
test_cmp expect output
'
diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh
index 3ca17abad1..aeec1f6142 100755
--- a/t/t7506-status-submodule.sh
+++ b/t/t7506-status-submodule.sh
@@ -5,34 +5,170 @@ test_description='git status for submodule'
. ./test-lib.sh
test_expect_success 'setup' '
- test_create_repo sub
- cd sub &&
- : >bar &&
- git add bar &&
- git commit -m " Add bar" &&
- cd .. &&
- git add sub &&
+ test_create_repo sub &&
+ (
+ cd sub &&
+ : >bar &&
+ git add bar &&
+ git commit -m " Add bar" &&
+ : >foo &&
+ git add foo &&
+ git commit -m " Add foo"
+ ) &&
+ echo output > .gitignore &&
+ git add sub .gitignore &&
git commit -m "Add submodule sub"
'
test_expect_success 'status clean' '
- git status |
- grep "nothing to commit"
+ git status >output &&
+ grep "nothing to commit" output
'
+
test_expect_success 'commit --dry-run -a clean' '
- git commit --dry-run -a |
- grep "nothing to commit"
+ test_must_fail git commit --dry-run -a >output &&
+ grep "nothing to commit" output
+'
+
+test_expect_success 'status with modified file in submodule' '
+ (cd sub && git reset --hard) &&
+ echo "changed" >sub/foo &&
+ git status >output &&
+ grep "modified: sub (modified content)" output
+'
+
+test_expect_success 'status with modified file in submodule (porcelain)' '
+ (cd sub && git reset --hard) &&
+ echo "changed" >sub/foo &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with added file in submodule' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ git status >output &&
+ grep "modified: sub (modified content)" output
+'
+
+test_expect_success 'status with added file in submodule (porcelain)' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with untracked file in submodule' '
+ (cd sub && git reset --hard) &&
+ echo "content" >sub/new-file &&
+ git status >output &&
+ grep "modified: sub (untracked content)" output
+'
+
+test_expect_success 'status -uno with untracked file in submodule' '
+ git status -uno >output &&
+ grep "^nothing to commit" output
+'
+
+test_expect_success 'status with untracked file in submodule (porcelain)' '
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with added and untracked file in submodule' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ echo "content" >sub/new-file &&
+ git status >output &&
+ grep "modified: sub (modified content, untracked content)" output
+'
+
+test_expect_success 'status with added and untracked file in submodule (porcelain)' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ echo "content" >sub/new-file &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
'
+
+test_expect_success 'status with modified file in modified submodule' '
+ (cd sub && git reset --hard) &&
+ rm sub/new-file &&
+ (cd sub && echo "next change" >foo && git commit -m "next change" foo) &&
+ echo "changed" >sub/foo &&
+ git status >output &&
+ grep "modified: sub (new commits, modified content)" output
+'
+
+test_expect_success 'status with modified file in modified submodule (porcelain)' '
+ (cd sub && git reset --hard) &&
+ echo "changed" >sub/foo &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with added file in modified submodule' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ git status >output &&
+ grep "modified: sub (new commits, modified content)" output
+'
+
+test_expect_success 'status with added file in modified submodule (porcelain)' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with untracked file in modified submodule' '
+ (cd sub && git reset --hard) &&
+ echo "content" >sub/new-file &&
+ git status >output &&
+ grep "modified: sub (new commits, untracked content)" output
+'
+
+test_expect_success 'status with untracked file in modified submodule (porcelain)' '
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
+test_expect_success 'status with added and untracked file in modified submodule' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ echo "content" >sub/new-file &&
+ git status >output &&
+ grep "modified: sub (new commits, modified content, untracked content)" output
+'
+
+test_expect_success 'status with added and untracked file in modified submodule (porcelain)' '
+ (cd sub && git reset --hard && echo >foo && git add foo) &&
+ echo "content" >sub/new-file &&
+ git status --porcelain >output &&
+ diff output - <<-\EOF
+ M sub
+ EOF
+'
+
test_expect_success 'rm submodule contents' '
rm -rf sub/* sub/.git
'
+
test_expect_success 'status clean (empty submodule dir)' '
- git status |
- grep "nothing to commit"
+ git status >output &&
+ grep "nothing to commit" output
'
+
test_expect_success 'status -a clean (empty submodule dir)' '
- git commit --dry-run -a |
- grep "nothing to commit"
+ test_must_fail git commit --dry-run -a >output &&
+ grep "nothing to commit" output
'
test_done
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index cf67fe3a4a..556d0faa77 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -579,7 +579,7 @@ cat >expect <<EOF
#
# modified: dir1/modified
#
-# Modified submodules:
+# Submodule changes to be committed:
#
# * sm 0000000...$head (1):
# > Add foo
@@ -672,7 +672,7 @@ cat >expect <<EOF
#
# modified: dir1/modified
#
-# Modified submodules:
+# Submodule changes to be committed:
#
# * sm 0000000...$head (1):
# > Add foo
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index fad5472257..1de83ef98f 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -27,6 +27,7 @@ remove_config_vars()
git config --unset difftool.prompt
git config --unset merge.tool
git config --unset mergetool.test-tool.cmd
+ git config --unset mergetool.prompt
return 0
}
@@ -91,6 +92,15 @@ test_expect_success 'difftool honors --gui' '
restore_test_defaults
'
+test_expect_success 'difftool --gui works without configured diff.guitool' '
+ git config diff.tool test-tool &&
+
+ diff=$(git difftool --no-prompt --gui branch) &&
+ test "$diff" = "branch" &&
+
+ restore_test_defaults
+'
+
# Specify the diff tool using $GIT_DIFF_TOOL
test_expect_success 'GIT_DIFF_TOOL variable' '
git config --unset diff.tool
@@ -159,6 +169,17 @@ test_expect_success 'difftool.prompt config variable is false' '
restore_test_defaults
'
+# Test that we don't have to pass --no-prompt when mergetool.prompt is false
+test_expect_success 'difftool merge.prompt = false' '
+ git config --unset difftool.prompt
+ git config mergetool.prompt false &&
+
+ diff=$(git difftool branch) &&
+ test "$diff" = "branch" &&
+
+ restore_test_defaults
+'
+
# Test that the -y flag can override difftool.prompt = true
test_expect_success 'difftool.prompt can overridden with -y' '
git config difftool.prompt true &&
diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh
index ad834f200a..230143cf31 100755
--- a/t/t8003-blame.sh
+++ b/t/t8003-blame.sh
@@ -11,7 +11,15 @@ test_expect_success setup '
echo B B B B B >two &&
echo C C C C C >tres &&
echo ABC >mouse &&
- git add one two tres mouse &&
+ for i in 1 2 3 4 5 6 7 8 9
+ do
+ echo $i
+ done >nine_lines &&
+ for i in 1 2 3 4 5 6 7 8 9 a
+ do
+ echo $i
+ done >ten_lines &&
+ git add one two tres mouse nine_lines ten_lines &&
test_tick &&
GIT_AUTHOR_NAME=Initial git commit -m Initial &&
@@ -157,4 +165,24 @@ EOF
git --no-pager blame $COMMIT -- uno >/dev/null
'
+test_expect_success 'blame -L with invalid start' '
+ test_must_fail git blame -L5 tres 2>errors &&
+ grep "has only 2 lines" errors
+'
+
+test_expect_success 'blame -L with invalid end' '
+ test_must_fail git blame -L1,5 tres 2>errors &&
+ grep "has only 2 lines" errors
+'
+
+test_expect_success 'indent of line numbers, nine lines' '
+ git blame nine_lines >actual &&
+ test $(grep -c " " actual) = 0
+'
+
+test_expect_success 'indent of line numbers, ten lines' '
+ git blame ten_lines >actual &&
+ test $(grep -c " " actual) = 9
+'
+
test_done
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 752adaac85..640b3d2bb4 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -186,8 +186,8 @@ test_expect_success 'Prompting works' '
--smtp-server="$(pwd)/fake.sendmail" \
$patches \
2>errors &&
- grep "^From: Example <from@example.com>$" msgtxt1 &&
- grep "^To: to@example.com$" msgtxt1
+ grep "^From: Example <from@example.com>\$" msgtxt1 &&
+ grep "^To: to@example.com\$" msgtxt1
'
test_expect_success 'cccmd works' '
@@ -236,7 +236,7 @@ test_expect_success 'Author From: in message body' '
--to=nobody@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches &&
- sed "1,/^$/d" < msgtxt1 > msgbody1
+ sed "1,/^\$/d" < msgtxt1 > msgbody1
grep "From: A <author@example.com>" msgbody1
'
@@ -247,7 +247,7 @@ test_expect_success 'Author From: not in message body' '
--to=nobody@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches &&
- sed "1,/^$/d" < msgtxt1 > msgbody1
+ sed "1,/^\$/d" < msgtxt1 > msgbody1
! grep "From: A <author@example.com>" msgbody1
'
@@ -852,4 +852,70 @@ test_expect_success 'no warning with sendemail.chainreplyto = true' '
! grep "no-chain-reply-to" errors
'
+test_expect_success 'sendemail.to works' '
+ git config --replace-all sendemail.to "Somebody <somebody@ex.com>" &&
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ $patches $patches >stdout &&
+ grep "To: Somebody <somebody@ex.com>" stdout
+'
+
+test_expect_success '--no-to overrides sendemail.to' '
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --no-to \
+ --to=nobody@example.com \
+ $patches $patches >stdout &&
+ grep "To: nobody@example.com" stdout &&
+ ! grep "To: Somebody <somebody@ex.com>" stdout
+'
+
+test_expect_success 'sendemail.cc works' '
+ git config --replace-all sendemail.cc "Somebody <somebody@ex.com>" &&
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ $patches $patches >stdout &&
+ grep "Cc: Somebody <somebody@ex.com>" stdout
+'
+
+test_expect_success '--no-cc overrides sendemail.cc' '
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --no-cc \
+ --cc=bodies@example.com \
+ --to=nobody@example.com \
+ $patches $patches >stdout &&
+ grep "Cc: bodies@example.com" stdout &&
+ ! grep "Cc: Somebody <somebody@ex.com>" stdout
+'
+
+test_expect_success 'sendemail.bcc works' '
+ git config --replace-all sendemail.bcc "Other <other@ex.com>" &&
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server relay.example.com \
+ $patches $patches >stdout &&
+ grep "RCPT TO:<other@ex.com>" stdout
+'
+
+test_expect_success '--no-bcc overrides sendemail.bcc' '
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --no-bcc \
+ --bcc=bodies@example.com \
+ --to=nobody@example.com \
+ --smtp-server relay.example.com \
+ $patches $patches >stdout &&
+ grep "RCPT TO:<bodies@example.com>" stdout &&
+ ! grep "RCPT TO:<other@ex.com>" stdout
+'
+
test_done
diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh
index 95741cbbac..a9a558d292 100755
--- a/t/t9119-git-svn-info.sh
+++ b/t/t9119-git-svn-info.sh
@@ -7,9 +7,10 @@ test_description='git svn info'
. ./lib-git-svn.sh
# Tested with: svn, version 1.4.4 (r25188)
+# Tested with: svn, version 1.6.[12345689]
v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'`
case $v in
-1.[45].*)
+1.[456].*)
;;
*)
say "skipping svn-info test (SVN version: $v not supported)"
diff --git a/t/t9150-svk-mergetickets.sh b/t/t9150-svk-mergetickets.sh
index 53581425c4..24c2421bfc 100755
--- a/t/t9150-svk-mergetickets.sh
+++ b/t/t9150-svk-mergetickets.sh
@@ -11,6 +11,7 @@ test_expect_success 'load svk depot' "
svnadmin load -q '$rawsvnrepo' \
< '$TEST_DIRECTORY/t9150/svk-merge.dump' &&
git svn init --minimize-url -R svkmerge \
+ --rewrite-root=http://svn.example.org \
-T trunk -b branches '$svnrepo' &&
git svn fetch --all
"
diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh
index 359eeaa738..250c651eae 100755
--- a/t/t9151-svn-mergeinfo.sh
+++ b/t/t9151-svn-mergeinfo.sh
@@ -11,6 +11,7 @@ test_expect_success 'load svn dump' "
svnadmin load -q '$rawsvnrepo' \
< '$TEST_DIRECTORY/t9151/svn-mergeinfo.dump' &&
git svn init --minimize-url -R svnmerge \
+ --rewrite-root=http://svn.example.org \
-T trunk -b branches '$svnrepo' &&
git svn fetch --all
"
@@ -33,7 +34,22 @@ test_expect_success 'svn non-merge merge commits did not become git merge commit
[ -z "$bad_non_merges" ]
'
-test_expect_success 'everything got merged in the end' '
+test_expect_success 'commit made to merged branch is reachable from the merge' '
+ before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2")
+ merge_commit=$(git rev-list --all --grep="Merge trunk to b2")
+ not_reachable=$(git rev-list -1 $before_commit --not $merge_commit)
+ [ -z "$not_reachable" ]
+ '
+
+test_expect_success 'merging two branches in one commit is detected correctly' '
+ f1_commit=$(git rev-list --all --grep="make f1 branch from trunk")
+ f2_commit=$(git rev-list --all --grep="make f2 branch from trunk")
+ merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk")
+ not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit)
+ [ -z "$not_reachable" ]
+ '
+
+test_expect_failure 'everything got merged in the end' '
unmerged=$(git rev-list --all --not master)
[ -z "$unmerged" ]
'
diff --git a/t/t9151/make-svnmerge-dump b/t/t9151/make-svnmerge-dump
index d917717cf3..e1e138cb1a 100644
--- a/t/t9151/make-svnmerge-dump
+++ b/t/t9151/make-svnmerge-dump
@@ -26,8 +26,9 @@ i=0
cd foo
mkdir trunk
mkdir branches
-svn add trunk branches
-i=$(commit $i "Setup trunk and branches")
+mkdir tags
+svn add trunk branches tags
+i=$(commit $i "Setup trunk, branches, and tags")
git cat-file blob 6683463e:Makefile > trunk/Makefile
svn add trunk/Makefile
@@ -155,6 +156,149 @@ svn merge ../branches/right --accept postpone
i=$(commit $i "non-merge right to trunk 2")
cd ..
+say "Branching b1 from trunk"
+svn update
+svn cp trunk branches/b1
+i=$(commit $i "make b1 branch from trunk")
+
+say "Branching b2 from trunk"
+svn update
+svn cp trunk branches/b2
+i=$(commit $i "make b2 branch from trunk")
+
+say "Make a commit to b2"
+svn update
+cd branches/b2
+echo "b2" > b2file
+svn add b2file
+i=$(commit $i "b2 update 1")
+cd ../..
+
+say "Make a commit to b1"
+svn update
+cd branches/b1
+echo "b1" > b1file
+svn add b1file
+i=$(commit $i "b1 update 1")
+cd ../..
+
+say "Merge b1 to trunk"
+svn update
+cd trunk
+svn merge ../branches/b1/ --accept postpone
+i=$(commit $i "Merge b1 to trunk")
+cd ..
+
+say "Make a commit to trunk before merging trunk to b2"
+svn update
+cd trunk
+echo "trunk" > trunkfile
+svn add trunkfile
+i=$(commit $i "trunk commit before merging trunk to b2")
+cd ..
+
+say "Merge trunk to b2"
+svn update
+cd branches/b2
+svn merge ../../trunk/ --accept postpone
+i=$(commit $i "Merge trunk to b2")
+cd ../..
+
+say "Merge b2 to trunk"
+svn update
+cd trunk
+svn merge ../branches/b2/ --accept postpone
+svn resolved b1file
+svn resolved trunkfile
+i=$(commit $i "Merge b2 to trunk")
+cd ..
+
+say "Creating f1 from trunk with a new file"
+svn update
+svn cp trunk branches/f1
+cd branches/f1
+echo "f1" > f1file
+svn add f1file
+cd ../..
+i=$(commit $i "make f1 branch from trunk with a new file")
+
+say "Creating f2 from trunk with a new file"
+svn update
+svn cp trunk branches/f2
+cd branches/f2
+echo "f2" > f2file
+svn add f2file
+cd ../..
+i=$(commit $i "make f2 branch from trunk with a new file")
+
+say "Merge f1 and f2 to trunk in one go"
+svn update
+cd trunk
+svn merge ../branches/f1/ --accept postpone
+svn merge ../branches/f2/ --accept postpone
+i=$(commit $i "Merge f1 and f2 to trunk")
+cd ..
+
+say "Adding subdirectory to LEFT"
+svn update
+cd branches/left
+mkdir subdir
+echo "Yeehaw" > subdir/cowboy
+svn add subdir
+i=$(commit $i "add subdirectory to left branch")
+cd ../../
+
+say "Merging LEFT to TRUNK"
+svn update
+cd trunk
+svn merge ../branches/left --accept postpone
+i=$(commit $i "merge left to trunk")
+cd ..
+
+say "Make PARTIAL branch"
+svn update
+svn cp trunk/subdir branches/partial
+i=$(commit $i "make partial branch")
+
+say "Make a commit to PARTIAL"
+svn update
+cd branches/partial
+echo "racecar" > palindromes
+svn add palindromes
+i=$(commit $i "partial update")
+cd ../../
+
+say "Merge PARTIAL to TRUNK"
+svn update
+cd trunk/subdir
+svn merge ../../branches/partial --accept postpone
+i=$(commit $i "merge partial to trunk")
+cd ../../
+
+say "Tagging trunk"
+svn update
+svn cp trunk tags/v1.0
+i=$(commit $i "tagging v1.0")
+
+say "Branching BUGFIX from v1.0"
+svn update
+svn cp tags/v1.0 branches/bugfix
+i=$(commit $i "make bugfix branch from tag")
+
+say "Make a commit to BUGFIX"
+svn update
+cd branches/bugfix/
+echo "kayak" >> subdir/palindromes
+i=$(commit $i "commit to bugfix")
+cd ../../
+
+say "Merge BUGFIX to TRUNK"
+svn update
+cd trunk
+svn merge ../branches/bugfix/ --accept postpone
+i=$(commit $i "Merge BUGFIX to TRUNK")
+cd ..
+
cd ..
svnadmin dump foo.svn > svn-mergeinfo.dump
diff --git a/t/t9151/svn-mergeinfo.dump b/t/t9151/svn-mergeinfo.dump
index 9543e31c96..47cafcf528 100644
--- a/t/t9151/svn-mergeinfo.dump
+++ b/t/t9151/svn-mergeinfo.dump
@@ -1,6 +1,6 @@
SVN-fs-dump-format-version: 2
-UUID: 64142547-0943-4db2-836a-d1e1eb2f9924
+UUID: d6191530-2693-4a8e-98e7-b194d4c3edd8
Revision-number: 0
Prop-content-length: 56
@@ -9,25 +9,25 @@ Content-length: 56
K 8
svn:date
V 27
-2009-12-19T16:17:51.232640Z
+2010-01-19T04:14:02.832406Z
PROPS-END
Revision-number: 1
-Prop-content-length: 128
-Content-length: 128
+Prop-content-length: 134
+Content-length: 134
K 7
svn:log
-V 29
-(r1) Setup trunk and branches
+V 36
+(r1) Setup trunk, branches, and tags
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:51.831965Z
+2010-01-19T04:14:03.055172Z
PROPS-END
Node-path: branches
@@ -39,6 +39,15 @@ Content-length: 10
PROPS-END
+Node-path: tags
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
Node-path: trunk
Node-kind: dir
Node-action: add
@@ -49,8 +58,8 @@ PROPS-END
Revision-number: 2
-Prop-content-length: 112
-Content-length: 112
+Prop-content-length: 111
+Content-length: 111
K 7
svn:log
@@ -58,12 +67,12 @@ V 13
(r2) ancestor
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:52.300075Z
+2010-01-19T04:14:04.064506Z
PROPS-END
Node-path: trunk/Makefile
@@ -156,8 +165,8 @@ backup: clean
Revision-number: 3
-Prop-content-length: 120
-Content-length: 120
+Prop-content-length: 119
+Content-length: 119
K 7
svn:log
@@ -165,12 +174,12 @@ V 21
(r3) make left branch
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:52.768800Z
+2010-01-19T04:14:06.040389Z
PROPS-END
Node-path: branches/left
@@ -190,8 +199,8 @@ Text-copy-source-sha1: 103205ce331f7d64086dba497574734f78439590
Revision-number: 4
-Prop-content-length: 121
-Content-length: 121
+Prop-content-length: 120
+Content-length: 120
K 7
svn:log
@@ -199,12 +208,12 @@ V 22
(r4) make right branch
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:53.177879Z
+2010-01-19T04:14:08.040905Z
PROPS-END
Node-path: branches/right
@@ -224,8 +233,8 @@ Text-copy-source-sha1: 103205ce331f7d64086dba497574734f78439590
Revision-number: 5
-Prop-content-length: 117
-Content-length: 117
+Prop-content-length: 116
+Content-length: 116
K 7
svn:log
@@ -233,12 +242,12 @@ V 18
(r5) left update 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:53.604691Z
+2010-01-19T04:14:09.049169Z
PROPS-END
Node-path: branches/left/Makefile
@@ -329,8 +338,8 @@ backup: clean
Revision-number: 6
-Prop-content-length: 118
-Content-length: 118
+Prop-content-length: 117
+Content-length: 117
K 7
svn:log
@@ -338,12 +347,12 @@ V 19
(r6) right update 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:54.063555Z
+2010-01-19T04:14:10.049350Z
PROPS-END
Node-path: branches/right/Makefile
@@ -437,8 +446,8 @@ backup: clean
Revision-number: 7
-Prop-content-length: 117
-Content-length: 117
+Prop-content-length: 116
+Content-length: 116
K 7
svn:log
@@ -446,12 +455,12 @@ V 18
(r7) left update 2
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:54.523904Z
+2010-01-19T04:14:11.049209Z
PROPS-END
Node-path: branches/left/Makefile
@@ -542,8 +551,8 @@ backup: clean
Revision-number: 8
-Prop-content-length: 117
-Content-length: 117
+Prop-content-length: 116
+Content-length: 116
K 7
svn:log
@@ -551,12 +560,12 @@ V 18
(r8) left update 3
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:54.975970Z
+2010-01-19T04:14:12.049234Z
PROPS-END
Node-path: branches/left/Makefile
@@ -647,8 +656,8 @@ backup: clean
Revision-number: 9
-Prop-content-length: 124
-Content-length: 124
+Prop-content-length: 123
+Content-length: 123
K 7
svn:log
@@ -656,12 +665,12 @@ V 25
(r9) make left sub-branch
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:55.459904Z
+2010-01-19T04:14:14.040894Z
PROPS-END
Node-path: branches/left-sub
@@ -687,8 +696,8 @@ Text-copy-source-sha1: a13de8e23f1483efca3e57b2b64b0ae6f740ce10
Revision-number: 10
-Prop-content-length: 129
-Content-length: 129
+Prop-content-length: 128
+Content-length: 128
K 7
svn:log
@@ -696,12 +705,12 @@ V 30
(r10) left sub-branch update 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:55.862113Z
+2010-01-19T04:14:15.049935Z
PROPS-END
Node-path: branches/left-sub/README
@@ -718,8 +727,8 @@ crunch
Revision-number: 11
-Prop-content-length: 126
-Content-length: 126
+Prop-content-length: 125
+Content-length: 125
K 7
svn:log
@@ -727,12 +736,12 @@ V 27
(r11) Merge left to trunk 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:56.413416Z
+2010-01-19T04:14:18.056594Z
PROPS-END
Node-path: trunk
@@ -836,8 +845,8 @@ backup: clean
Revision-number: 12
-Prop-content-length: 118
-Content-length: 118
+Prop-content-length: 117
+Content-length: 117
K 7
svn:log
@@ -845,12 +854,12 @@ V 19
(r12) left update 4
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:56.831014Z
+2010-01-19T04:14:19.049620Z
PROPS-END
Node-path: branches/left/zlonk
@@ -867,8 +876,8 @@ touche
Revision-number: 13
-Prop-content-length: 119
-Content-length: 119
+Prop-content-length: 118
+Content-length: 118
K 7
svn:log
@@ -876,12 +885,12 @@ V 20
(r13) right update 2
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:57.341143Z
+2010-01-19T04:14:20.049659Z
PROPS-END
Node-path: branches/right/bang
@@ -898,8 +907,8 @@ thwacke
Revision-number: 14
-Prop-content-length: 141
-Content-length: 141
+Prop-content-length: 140
+Content-length: 140
K 7
svn:log
@@ -907,12 +916,12 @@ V 42
(r14) Cherry-pick right 2 commits to trunk
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:57.841851Z
+2010-01-19T04:14:23.041991Z
PROPS-END
Node-path: trunk
@@ -1029,8 +1038,8 @@ Text-copy-source-sha1: 0bc5bb345c0e71d28f784f12e0bd2d384c283062
Revision-number: 15
-Prop-content-length: 127
-Content-length: 127
+Prop-content-length: 126
+Content-length: 126
K 7
svn:log
@@ -1038,12 +1047,12 @@ V 28
(r15) Merge right to trunk 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:58.368520Z
+2010-01-19T04:14:26.054456Z
PROPS-END
Node-path: trunk
@@ -1061,8 +1070,8 @@ PROPS-END
Revision-number: 16
-Prop-content-length: 119
-Content-length: 119
+Prop-content-length: 118
+Content-length: 118
K 7
svn:log
@@ -1070,12 +1079,12 @@ V 20
(r16) right update 3
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:58.779056Z
+2010-01-19T04:14:27.049955Z
PROPS-END
Node-path: branches/right/urkkk
@@ -1092,8 +1101,8 @@ whamm
Revision-number: 17
-Prop-content-length: 119
-Content-length: 119
+Prop-content-length: 118
+Content-length: 118
K 7
svn:log
@@ -1101,12 +1110,12 @@ V 20
(r17) trunk update 1
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:59.221851Z
+2010-01-19T04:14:28.049615Z
PROPS-END
Node-path: trunk/vronk
@@ -1123,8 +1132,8 @@ pow
Revision-number: 18
-Prop-content-length: 135
-Content-length: 135
+Prop-content-length: 134
+Content-length: 134
K 7
svn:log
@@ -1132,12 +1141,12 @@ V 36
(r18) Merge right to left sub-branch
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:17:59.781666Z
+2010-01-19T04:14:31.061460Z
PROPS-END
Node-path: branches/left-sub
@@ -1262,8 +1271,8 @@ Text-copy-source-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302
Revision-number: 19
-Prop-content-length: 129
-Content-length: 129
+Prop-content-length: 128
+Content-length: 128
K 7
svn:log
@@ -1271,12 +1280,12 @@ V 30
(r19) left sub-branch update 2
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:00.200531Z
+2010-01-19T04:14:32.049244Z
PROPS-END
Node-path: branches/left-sub/wham_eth
@@ -1293,8 +1302,8 @@ zowie
Revision-number: 20
-Prop-content-length: 118
-Content-length: 118
+Prop-content-length: 117
+Content-length: 117
K 7
svn:log
@@ -1302,12 +1311,12 @@ V 19
(r20) left update 5
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:00.659636Z
+2010-01-19T04:14:33.049332Z
PROPS-END
Node-path: branches/left/glurpp
@@ -1324,8 +1333,8 @@ eee_yow
Revision-number: 21
-Prop-content-length: 147
-Content-length: 147
+Prop-content-length: 146
+Content-length: 146
K 7
svn:log
@@ -1333,12 +1342,12 @@ V 48
(r21) Cherry-pick left sub-branch commit to left
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:01.194402Z
+2010-01-19T04:14:36.041839Z
PROPS-END
Node-path: branches/left
@@ -1364,8 +1373,8 @@ Text-copy-source-sha1: b165019b005c199237ba822c4404e771e93b654a
Revision-number: 22
-Prop-content-length: 134
-Content-length: 134
+Prop-content-length: 133
+Content-length: 133
K 7
svn:log
@@ -1373,12 +1382,12 @@ V 35
(r22) Merge left sub-branch to left
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:01.679218Z
+2010-01-19T04:14:39.045014Z
PROPS-END
Node-path: branches/left
@@ -1513,8 +1522,8 @@ Text-copy-source-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302
Revision-number: 23
-Prop-content-length: 126
-Content-length: 126
+Prop-content-length: 125
+Content-length: 125
K 7
svn:log
@@ -1522,12 +1531,12 @@ V 27
(r23) Merge left to trunk 2
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:02.212349Z
+2010-01-19T04:14:42.052798Z
PROPS-END
Node-path: trunk
@@ -1591,8 +1600,8 @@ Text-copy-source-sha1: 9716527ebd70a75c27625cacbeb2d897c6e86178
Revision-number: 24
-Prop-content-length: 131
-Content-length: 131
+Prop-content-length: 130
+Content-length: 130
K 7
svn:log
@@ -1600,12 +1609,12 @@ V 32
(r24) non-merge right to trunk 2
K 10
svn:author
-V 4
-samv
+V 3
+adm
K 8
svn:date
V 27
-2009-12-19T16:18:02.672148Z
+2010-01-19T04:14:44.038434Z
PROPS-END
Node-path: trunk
@@ -1623,3 +1632,757 @@ V 64
PROPS-END
+Revision-number: 25
+Prop-content-length: 129
+Content-length: 129
+
+K 7
+svn:log
+V 31
+(r25) make b1 branch from trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:18:56.084589Z
+PROPS-END
+
+Node-path: branches/b1
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 24
+Node-copyfrom-path: trunk
+
+
+Revision-number: 26
+Prop-content-length: 129
+Content-length: 129
+
+K 7
+svn:log
+V 31
+(r26) make b2 branch from trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:18:59.076940Z
+PROPS-END
+
+Node-path: branches/b2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 25
+Node-copyfrom-path: trunk
+
+
+Revision-number: 27
+Prop-content-length: 115
+Content-length: 115
+
+K 7
+svn:log
+V 17
+(r27) b2 update 1
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:01.095762Z
+PROPS-END
+
+Node-path: branches/b2/b2file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 3
+Text-content-md5: 5edbdd57cba621eb3c6e601bf563b4dc
+Text-content-sha1: 9d4b38049776bd0a2074d67cad23f8eaed35a3b3
+Content-length: 13
+
+PROPS-END
+b2
+
+
+Revision-number: 28
+Prop-content-length: 115
+Content-length: 115
+
+K 7
+svn:log
+V 17
+(r28) b1 update 1
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:03.097465Z
+PROPS-END
+
+Node-path: branches/b1/b1file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 3
+Text-content-md5: 08778dfd9ac4f603231896aba7aad523
+Text-content-sha1: b551771aa4ad5b14123fc3bd98d89db2bc0edd4f
+Content-length: 13
+
+PROPS-END
+b1
+
+
+Revision-number: 29
+Prop-content-length: 121
+Content-length: 121
+
+K 7
+svn:log
+V 23
+(r29) Merge b1 to trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:06.073175Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: change
+Prop-content-length: 118
+Content-length: 118
+
+K 13
+svn:mergeinfo
+V 83
+/branches/b1:25-28
+/branches/left:2-22
+/branches/left-sub:4-19
+/branches/right:2-22
+PROPS-END
+
+
+Node-path: trunk/b1file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 28
+Node-copyfrom-path: branches/b1/b1file
+Text-copy-source-md5: 08778dfd9ac4f603231896aba7aad523
+Text-copy-source-sha1: b551771aa4ad5b14123fc3bd98d89db2bc0edd4f
+
+
+Revision-number: 30
+Prop-content-length: 143
+Content-length: 143
+
+K 7
+svn:log
+V 45
+(r30) trunk commit before merging trunk to b2
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:08.096353Z
+PROPS-END
+
+Node-path: trunk/trunkfile
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 6
+Text-content-md5: edf45fe5c98c5367733b39bbb2bb20d9
+Text-content-sha1: 7361d1685e5c86dfc523620cfaf598f196f86239
+Content-length: 16
+
+PROPS-END
+trunk
+
+
+Revision-number: 31
+Prop-content-length: 121
+Content-length: 121
+
+K 7
+svn:log
+V 23
+(r31) Merge trunk to b2
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:11.081541Z
+PROPS-END
+
+Node-path: branches/b2
+Node-kind: dir
+Node-action: change
+Prop-content-length: 131
+Content-length: 131
+
+K 13
+svn:mergeinfo
+V 96
+/branches/b1:25-28
+/branches/left:2-22
+/branches/left-sub:4-19
+/branches/right:2-22
+/trunk:26-30
+PROPS-END
+
+
+Node-path: branches/b2/b1file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 30
+Node-copyfrom-path: trunk/b1file
+Text-copy-source-md5: 08778dfd9ac4f603231896aba7aad523
+Text-copy-source-sha1: b551771aa4ad5b14123fc3bd98d89db2bc0edd4f
+
+
+Node-path: branches/b2/trunkfile
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 30
+Node-copyfrom-path: trunk/trunkfile
+Text-copy-source-md5: edf45fe5c98c5367733b39bbb2bb20d9
+Text-copy-source-sha1: 7361d1685e5c86dfc523620cfaf598f196f86239
+
+
+Revision-number: 32
+Prop-content-length: 121
+Content-length: 121
+
+K 7
+svn:log
+V 23
+(r32) Merge b2 to trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:14.117939Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: change
+Prop-content-length: 138
+Content-length: 138
+
+K 13
+svn:mergeinfo
+V 102
+/branches/b1:25-28
+/branches/b2:26-31
+/branches/left:2-22
+/branches/left-sub:4-19
+/branches/right:2-22
+PROPS-END
+
+
+Node-path: trunk/b2file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 31
+Node-copyfrom-path: branches/b2/b2file
+Text-copy-source-md5: 5edbdd57cba621eb3c6e601bf563b4dc
+Text-copy-source-sha1: 9d4b38049776bd0a2074d67cad23f8eaed35a3b3
+
+
+Revision-number: 33
+Prop-content-length: 145
+Content-length: 145
+
+K 7
+svn:log
+V 47
+(r33) make f1 branch from trunk with a new file
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:17.105832Z
+PROPS-END
+
+Node-path: branches/f1
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 32
+Node-copyfrom-path: trunk
+
+
+Node-path: branches/f1/f1file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 3
+Text-content-md5: 2b1abc6b6c5c0018851f9f8e6475563b
+Text-content-sha1: aece6dfba588900e00d95601d22b4408d49580af
+Content-length: 13
+
+PROPS-END
+f1
+
+
+Revision-number: 34
+Prop-content-length: 145
+Content-length: 145
+
+K 7
+svn:log
+V 47
+(r34) make f2 branch from trunk with a new file
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:20.110057Z
+PROPS-END
+
+Node-path: branches/f2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 33
+Node-copyfrom-path: trunk
+
+
+Node-path: branches/f2/f2file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 3
+Text-content-md5: 575c5638d60271457e54ab7d07309502
+Text-content-sha1: 1c49a440c352f3473efa9512255033b94dc7def0
+Content-length: 13
+
+PROPS-END
+f2
+
+
+Revision-number: 35
+Prop-content-length: 128
+Content-length: 128
+
+K 7
+svn:log
+V 30
+(r35) Merge f1 and f2 to trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:24.081490Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: change
+Prop-content-length: 173
+Content-length: 173
+
+K 13
+svn:mergeinfo
+V 137
+/branches/b1:25-28
+/branches/b2:26-31
+/branches/f1:33-34
+/branches/f2:34
+/branches/left:2-22
+/branches/left-sub:4-19
+/branches/right:2-22
+PROPS-END
+
+
+Node-path: trunk/f1file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 34
+Node-copyfrom-path: branches/f1/f1file
+Text-copy-source-md5: 2b1abc6b6c5c0018851f9f8e6475563b
+Text-copy-source-sha1: aece6dfba588900e00d95601d22b4408d49580af
+
+
+Node-path: trunk/f2file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 34
+Node-copyfrom-path: branches/f2/f2file
+Text-copy-source-md5: 575c5638d60271457e54ab7d07309502
+Text-copy-source-sha1: 1c49a440c352f3473efa9512255033b94dc7def0
+
+
+Revision-number: 36
+Prop-content-length: 135
+Content-length: 135
+
+K 7
+svn:log
+V 37
+(r36) add subdirectory to left branch
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:26.113516Z
+PROPS-END
+
+Node-path: branches/left/subdir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: branches/left/subdir/cowboy
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 7
+Text-content-md5: f1d6530278ad409e68cc675476ad995f
+Text-content-sha1: 732d9e3e5c391ffd767a98b45ddcc848de778cea
+Content-length: 17
+
+PROPS-END
+Yeehaw
+
+
+Revision-number: 37
+Prop-content-length: 123
+Content-length: 123
+
+K 7
+svn:log
+V 25
+(r37) merge left to trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:29.073699Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: change
+Prop-content-length: 173
+Content-length: 173
+
+K 13
+svn:mergeinfo
+V 137
+/branches/b1:25-28
+/branches/b2:26-31
+/branches/f1:33-34
+/branches/f2:34
+/branches/left:2-36
+/branches/left-sub:4-19
+/branches/right:2-22
+PROPS-END
+
+
+Node-path: trunk/subdir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 36
+Node-copyfrom-path: branches/left/subdir
+
+
+Revision-number: 38
+Prop-content-length: 123
+Content-length: 123
+
+K 7
+svn:log
+V 25
+(r38) make partial branch
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:32.072243Z
+PROPS-END
+
+Node-path: branches/partial
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 37
+Node-copyfrom-path: trunk/subdir
+
+
+Revision-number: 39
+Prop-content-length: 118
+Content-length: 118
+
+K 7
+svn:log
+V 20
+(r39) partial update
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:34.097961Z
+PROPS-END
+
+Node-path: branches/partial/palindromes
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 8
+Text-content-md5: 5d1c2024fb5efc4eef812856df1b080c
+Text-content-sha1: 5f8509ddd14c91a52864dd1447344e706f9bbc69
+Content-length: 18
+
+PROPS-END
+racecar
+
+
+Revision-number: 40
+Prop-content-length: 126
+Content-length: 126
+
+K 7
+svn:log
+V 28
+(r40) merge partial to trunk
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:37.080211Z
+PROPS-END
+
+Node-path: trunk/subdir
+Node-kind: dir
+Node-action: change
+Prop-content-length: 246
+Content-length: 246
+
+K 13
+svn:mergeinfo
+V 210
+/branches/b1/subdir:25-28
+/branches/b2/subdir:26-31
+/branches/f1/subdir:33-34
+/branches/f2/subdir:34
+/branches/left/subdir:2-36
+/branches/left-sub/subdir:4-19
+/branches/partial:38-39
+/branches/right/subdir:2-22
+PROPS-END
+
+
+Node-path: trunk/subdir/palindromes
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 39
+Node-copyfrom-path: branches/partial/palindromes
+Text-copy-source-md5: 5d1c2024fb5efc4eef812856df1b080c
+Text-copy-source-sha1: 5f8509ddd14c91a52864dd1447344e706f9bbc69
+
+
+Revision-number: 41
+Prop-content-length: 116
+Content-length: 116
+
+K 7
+svn:log
+V 18
+(r41) tagging v1.0
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:40.083460Z
+PROPS-END
+
+Node-path: tags/v1.0
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 40
+Node-copyfrom-path: trunk
+
+
+Revision-number: 42
+Prop-content-length: 131
+Content-length: 131
+
+K 7
+svn:log
+V 33
+(r42) make bugfix branch from tag
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:43.118075Z
+PROPS-END
+
+Node-path: branches/bugfix
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 41
+Node-copyfrom-path: tags/v1.0
+
+
+Revision-number: 43
+Prop-content-length: 120
+Content-length: 120
+
+K 7
+svn:log
+V 22
+(r43) commit to bugfix
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:45.079536Z
+PROPS-END
+
+Node-path: branches/bugfix/subdir/palindromes
+Node-kind: file
+Node-action: change
+Text-content-length: 14
+Text-content-md5: 3b12d98578a3f4320ba97e66da54fe5f
+Text-content-sha1: 672931c9e8ac2c408209efab2f015638b6d64042
+Content-length: 14
+
+racecar
+kayak
+
+
+Revision-number: 44
+Prop-content-length: 125
+Content-length: 125
+
+K 7
+svn:log
+V 27
+(r44) Merge BUGFIX to TRUNK
+K 10
+svn:author
+V 3
+adm
+K 8
+svn:date
+V 27
+2010-02-22T06:19:48.078914Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: change
+Prop-content-length: 210
+Content-length: 210
+
+K 13
+svn:mergeinfo
+V 174
+/branches/b1:25-28
+/branches/b2:26-31
+/branches/bugfix:42-43
+/branches/f1:33-34
+/branches/f2:34
+/branches/left:2-36
+/branches/left-sub:4-19
+/branches/right:2-22
+/tags/v1.0:41
+PROPS-END
+
+
+Node-path: trunk/subdir
+Node-kind: dir
+Node-action: change
+Prop-content-length: 297
+Content-length: 297
+
+K 13
+svn:mergeinfo
+V 261
+/branches/b1/subdir:25-28
+/branches/b2/subdir:26-31
+/branches/bugfix/subdir:42-43
+/branches/f1/subdir:33-34
+/branches/f2/subdir:34
+/branches/left/subdir:2-36
+/branches/left-sub/subdir:4-19
+/branches/partial:38-39
+/branches/right/subdir:2-22
+/tags/v1.0/subdir:41
+PROPS-END
+
+
+Node-path: trunk/subdir/palindromes
+Node-kind: file
+Node-action: change
+Text-content-length: 14
+Text-content-md5: 3b12d98578a3f4320ba97e66da54fe5f
+Text-content-sha1: 672931c9e8ac2c408209efab2f015638b6d64042
+Content-length: 14
+
+racecar
+kayak
+
+
diff --git a/t/t9153-git-svn-rewrite-uuid.sh b/t/t9153-git-svn-rewrite-uuid.sh
new file mode 100755
index 0000000000..88a2cfa233
--- /dev/null
+++ b/t/t9153-git-svn-rewrite-uuid.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Jay Soffian
+#
+
+test_description='git svn --rewrite-uuid test'
+
+. ./lib-git-svn.sh
+
+uuid=6cc8ada4-5932-4b4a-8242-3534ed8a3232
+
+test_expect_success 'load svn repo' "
+ svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9153/svn.dump' &&
+ git svn init --minimize-url --rewrite-uuid='$uuid' '$svnrepo' &&
+ git svn fetch
+ "
+
+test_expect_success 'verify uuid' "
+ git cat-file commit refs/remotes/git-svn~0 | \
+ grep '^${git_svn_id}: .*@2 $uuid$' &&
+ git cat-file commit refs/remotes/git-svn~1 | \
+ grep '^${git_svn_id}: .*@1 $uuid$'
+ "
+
+test_done
diff --git a/t/t9153/svn.dump b/t/t9153/svn.dump
new file mode 100644
index 0000000000..0ddfe7025d
--- /dev/null
+++ b/t/t9153/svn.dump
@@ -0,0 +1,75 @@
+SVN-fs-dump-format-version: 2
+
+UUID: b4885626-c94f-4a6c-b179-00c030fc68e8
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2010-01-23T06:41:03.908576Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 109
+Content-length: 109
+
+K 7
+svn:log
+V 11
+initial foo
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T06:41:48.353776Z
+PROPS-END
+
+Node-path: foo
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 4
+Text-content-md5: d3b07384d113edec49eaa6238ad5ff00
+Text-content-sha1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
+Content-length: 14
+
+PROPS-END
+foo
+
+
+Revision-number: 2
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 12
+now with bar
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T06:42:14.214640Z
+PROPS-END
+
+Node-path: foo
+Node-kind: file
+Node-action: change
+Text-content-length: 8
+Text-content-md5: f47c75614087a8dd938ba4acff252494
+Text-content-sha1: 4e48e2c9a3d2ca8a708cb0cc545700544efb5021
+Content-length: 8
+
+foo
+bar
+
+
diff --git a/t/t9154-git-svn-fancy-glob.sh b/t/t9154-git-svn-fancy-glob.sh
new file mode 100755
index 0000000000..a6a56a6cb9
--- /dev/null
+++ b/t/t9154-git-svn-fancy-glob.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Copyright (c) 2010 Jay Soffian
+#
+
+test_description='git svn fancy glob test'
+
+. ./lib-git-svn.sh
+
+test_expect_success 'load svn repo' "
+ svnadmin load -q '$rawsvnrepo' < '$TEST_DIRECTORY/t9154/svn.dump' &&
+ git svn init --minimize-url -T trunk '$svnrepo' &&
+ git svn fetch
+ "
+
+test_expect_success 'add red branch' "
+ git config svn-remote.svn.branches 'branches/{red}:refs/remotes/*' &&
+ git svn fetch &&
+ git rev-parse refs/remotes/red &&
+ test_must_fail git rev-parse refs/remotes/green &&
+ test_must_fail git rev-parse refs/remotes/blue
+ "
+
+test_expect_success 'add green branch' "
+ GIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev &&
+ git config svn-remote.svn.branches 'branches/{red,green}:refs/remotes/*' &&
+ git svn fetch &&
+ git rev-parse refs/remotes/red &&
+ git rev-parse refs/remotes/green &&
+ test_must_fail git rev-parse refs/remotes/blue
+ "
+
+test_expect_success 'add all branches' "
+ GIT_CONFIG=.git/svn/.metadata git config --unset svn-remote.svn.branches-maxRev &&
+ git config svn-remote.svn.branches 'branches/*:refs/remotes/*' &&
+ git svn fetch &&
+ git rev-parse refs/remotes/red &&
+ git rev-parse refs/remotes/green &&
+ git rev-parse refs/remotes/blue
+ "
+
+test_done
diff --git a/t/t9154/svn.dump b/t/t9154/svn.dump
new file mode 100644
index 0000000000..3dfabb67db
--- /dev/null
+++ b/t/t9154/svn.dump
@@ -0,0 +1,222 @@
+SVN-fs-dump-format-version: 2
+
+UUID: a18093a0-5f0b-44e0-8d88-8911ac7078db
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2010-01-23T07:40:25.660053Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 104
+Content-length: 104
+
+K 7
+svn:log
+V 7
+initial
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:41:33.636365Z
+PROPS-END
+
+Node-path: trunk
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/foo
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 4
+Text-content-md5: d3b07384d113edec49eaa6238ad5ff00
+Text-content-sha1: f1d2d2f924e986ac86fdf7b36c94bcdf32beec15
+Content-length: 14
+
+PROPS-END
+foo
+
+
+Revision-number: 2
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 12
+add branches
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:42:37.290694Z
+PROPS-END
+
+Node-path: branches
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: branches/blue
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: trunk
+
+
+Node-path: branches/green
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: trunk
+
+
+Node-path: branches/red
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: trunk
+
+
+Revision-number: 3
+Prop-content-length: 108
+Content-length: 108
+
+K 7
+svn:log
+V 10
+red change
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:43:02.208918Z
+PROPS-END
+
+Node-path: branches/red/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 8
+Text-content-md5: 64c3c8cf7d0233ab7627623a68888bd1
+Text-content-sha1: 95a0492027876adfd3891ec71ee37b79ee44d640
+Content-length: 8
+
+foo
+red
+
+
+Revision-number: 4
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 12
+green change
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:43:15.746586Z
+PROPS-END
+
+Node-path: branches/green/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 10
+Text-content-md5: 0209b6450891abc033d5eaaa9d3a8023
+Text-content-sha1: 87fc3bef9faeec48c0cd61dfc9851db377fdccf7
+Content-length: 10
+
+foo
+green
+
+
+Revision-number: 5
+Prop-content-length: 109
+Content-length: 109
+
+K 7
+svn:log
+V 11
+blue change
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:43:29.364811Z
+PROPS-END
+
+Node-path: branches/blue/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 9
+Text-content-md5: 9fbe4c13d0bae86386ae5209b2e6b275
+Text-content-sha1: cc4575083459a16f9aaef796c4a2456d64691ba0
+Content-length: 9
+
+foo
+blue
+
+
+Revision-number: 6
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 12
+trunk change
+K 10
+svn:author
+V 3
+jay
+K 8
+svn:date
+V 27
+2010-01-23T07:44:01.313130Z
+PROPS-END
+
+Node-path: trunk/foo
+Node-kind: file
+Node-action: change
+Text-content-length: 10
+Text-content-md5: 1c4db977d7a57c3bae582aab87948516
+Text-content-sha1: 469c08df449e702cf2a1fe746244a9ef3f837fad
+Content-length: 10
+
+foo
+trunk
+
+
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 60d6f5d1ba..131f032988 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1536,4 +1536,50 @@ test_expect_success 'R: ignore non-git options' '
git fast-import <input
'
+##
+## R: very large blobs
+##
+blobsize=$((2*1024*1024 + 53))
+test-genrandom bar $blobsize >expect
+cat >input <<INPUT_END
+commit refs/heads/big-file
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data <<COMMIT
+R - big file
+COMMIT
+
+M 644 inline big1
+data $blobsize
+INPUT_END
+cat expect >>input
+cat >>input <<INPUT_END
+M 644 inline big2
+data $blobsize
+INPUT_END
+cat expect >>input
+echo >>input
+
+test_expect_success \
+ 'R: blob bigger than threshold' \
+ 'test_create_repo R &&
+ git --git-dir=R/.git fast-import --big-file-threshold=1 <input'
+test_expect_success \
+ 'R: verify created pack' \
+ ': >verify &&
+ for p in R/.git/objects/pack/*.pack;
+ do
+ git verify-pack -v $p >>verify || exit;
+ done'
+test_expect_success \
+ 'R: verify written objects' \
+ 'git --git-dir=R/.git cat-file blob big-file:big1 >actual &&
+ test_cmp expect actual &&
+ a=$(git --git-dir=R/.git rev-parse big-file:big1) &&
+ b=$(git --git-dir=R/.git rev-parse big-file:big2) &&
+ test $a = $b'
+test_expect_success \
+ 'R: blob appears only once' \
+ 'n=$(grep $a verify | wc -l) &&
+ test 1 = $n'
+
test_done
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 356964e53a..d43f37ccaf 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -150,20 +150,22 @@ test_expect_success 'setup submodule' '
git checkout -f master &&
mkdir sub &&
- cd sub &&
- git init &&
- echo test file > file &&
- git add file &&
- git commit -m sub_initial &&
- cd .. &&
+ (
+ cd sub &&
+ git init &&
+ echo test file > file &&
+ git add file &&
+ git commit -m sub_initial
+ ) &&
git submodule add "`pwd`/sub" sub &&
git commit -m initial &&
test_tick &&
- cd sub &&
- echo more data >> file &&
- git add file &&
- git commit -m sub_second &&
- cd .. &&
+ (
+ cd sub &&
+ echo more data >> file &&
+ git add file &&
+ git commit -m sub_second
+ ) &&
git add sub &&
git commit -m second
@@ -264,19 +266,20 @@ test_expect_success 'cope with tagger-less tags' '
test_expect_success 'setup for limiting exports by PATH' '
mkdir limit-by-paths &&
- cd limit-by-paths &&
- git init &&
- echo hi > there &&
- git add there &&
- git commit -m "First file" &&
- echo foo > bar &&
- git add bar &&
- git commit -m "Second file" &&
- git tag -a -m msg mytag &&
- echo morefoo >> bar &&
- git add bar &&
- git commit -m "Change to second file" &&
- cd ..
+ (
+ cd limit-by-paths &&
+ git init &&
+ echo hi > there &&
+ git add there &&
+ git commit -m "First file" &&
+ echo foo > bar &&
+ git add bar &&
+ git commit -m "Second file" &&
+ git tag -a -m msg mytag &&
+ echo morefoo >> bar &&
+ git add bar &&
+ git commit -m "Change to second file"
+ )
'
cat > limit-by-paths/expected << EOF
@@ -297,10 +300,11 @@ M 100644 :1 there
EOF
test_expect_success 'dropping tag of filtered out object' '
+(
cd limit-by-paths &&
git fast-export --tag-of-filtered-object=drop mytag -- there > output &&
- test_cmp output expected &&
- cd ..
+ test_cmp output expected
+)
'
cat >> limit-by-paths/expected << EOF
@@ -313,10 +317,11 @@ msg
EOF
test_expect_success 'rewriting tag of filtered out object' '
+(
cd limit-by-paths &&
git fast-export --tag-of-filtered-object=rewrite mytag -- there > output &&
- test_cmp output expected &&
- cd ..
+ test_cmp output expected
+)
'
cat > limit-by-paths/expected << EOF
@@ -343,13 +348,13 @@ M 100644 :2 there
EOF
test_expect_failure 'no exact-ref revisions included' '
- cd limit-by-paths &&
- git fast-export master~2..master~1 > output &&
- test_cmp output expected &&
- cd ..
+ (
+ cd limit-by-paths &&
+ git fast-export master~2..master~1 > output &&
+ test_cmp output expected
+ )
'
-
test_expect_success 'set-up a few more tags for tag export tests' '
git checkout -f master &&
HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index c2ec3cb4bd..daef2d6c23 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -96,7 +96,7 @@ EOF
test_expect_success 'pserver authentication' \
'cat request-anonymous | git-cvsserver pserver >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
test_expect_success 'pserver authentication failure (non-anonymous user)' \
'if cat request-git | git-cvsserver pserver >log 2>&1
@@ -105,11 +105,11 @@ test_expect_success 'pserver authentication failure (non-anonymous user)' \
else
true
fi &&
- sed -ne \$p log | grep "^I HATE YOU$"'
+ sed -ne \$p log | grep "^I HATE YOU\$"'
test_expect_success 'pserver authentication (login)' \
'cat login-anonymous | git-cvsserver pserver >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
test_expect_success 'pserver authentication failure (login/non-anonymous user)' \
'if cat login-git | git-cvsserver pserver >log 2>&1
@@ -118,7 +118,7 @@ test_expect_success 'pserver authentication failure (login/non-anonymous user)'
else
true
fi &&
- sed -ne \$p log | grep "^I HATE YOU$"'
+ sed -ne \$p log | grep "^I HATE YOU\$"'
# misuse pserver authentication for testing of req_Root
@@ -156,7 +156,7 @@ test_expect_success 'req_Root failure (conflicting roots)' \
test_expect_success 'req_Root (strict paths)' \
'cat request-anonymous | git-cvsserver --strict-paths pserver "$SERVERDIR" >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
test_expect_success 'req_Root failure (strict-paths)' '
! cat request-anonymous |
@@ -165,7 +165,7 @@ test_expect_success 'req_Root failure (strict-paths)' '
test_expect_success 'req_Root (w/o strict-paths)' \
'cat request-anonymous | git-cvsserver pserver "$WORKDIR/" >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
test_expect_success 'req_Root failure (w/o strict-paths)' '
! cat request-anonymous |
@@ -183,7 +183,7 @@ EOF
test_expect_success 'req_Root (base-path)' \
'cat request-base | git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
test_expect_success 'req_Root failure (base-path)' '
! cat request-anonymous |
@@ -194,14 +194,14 @@ GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1
test_expect_success 'req_Root (export-all)' \
'cat request-anonymous | git-cvsserver --export-all pserver "$WORKDIR" >log 2>&1 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
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 &&
- sed -ne \$p log | grep "^I LOVE YOU$"'
+ sed -ne \$p log | grep "^I LOVE YOU\$"'
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true || exit 1
@@ -226,7 +226,7 @@ test_expect_success 'gitcvs.ext.enabled = true' \
'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled true &&
GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false &&
GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
- diff -q cvswork cvswork2'
+ test_cmp cvswork cvswork2'
rm -fr cvswork2
test_expect_success 'gitcvs.ext.enabled = false' \
@@ -247,7 +247,7 @@ test_expect_success 'gitcvs.dbname' \
'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled true &&
GIT_DIR="$SERVERDIR" git config gitcvs.dbname %Ggitcvs.%a.%m.sqlite &&
GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
- diff -q cvswork cvswork2 &&
+ test_cmp cvswork cvswork2 &&
test -f "$SERVERDIR/gitcvs.ext.master.sqlite" &&
cmp "$SERVERDIR/gitcvs.master.sqlite" "$SERVERDIR/gitcvs.ext.master.sqlite"'
@@ -257,7 +257,7 @@ test_expect_success 'gitcvs.ext.dbname' \
GIT_DIR="$SERVERDIR" git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
GIT_DIR="$SERVERDIR" git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
- diff -q cvswork cvswork2 &&
+ test_cmp cvswork cvswork2 &&
test -f "$SERVERDIR/gitcvs1.ext.master.sqlite" &&
test ! -f "$SERVERDIR/gitcvs2.ext.master.sqlite" &&
cmp "$SERVERDIR/gitcvs.master.sqlite" "$SERVERDIR/gitcvs1.ext.master.sqlite"'
@@ -282,7 +282,7 @@ test_expect_success 'cvs update (create new file)' \
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.1/" &&
- diff -q testfile1 ../testfile1'
+ test_cmp testfile1 ../testfile1'
cd "$WORKDIR"
test_expect_success 'cvs update (update existing file)' \
@@ -293,7 +293,7 @@ test_expect_success 'cvs update (update existing file)' \
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.2/" &&
- diff -q testfile1 ../testfile1'
+ test_cmp testfile1 ../testfile1'
cd "$WORKDIR"
#TODO: cvsserver doesn't support update w/o -d
@@ -322,7 +322,7 @@ test_expect_success 'cvs update (subdirectories)' \
(for dir in A A/B A/B/C A/D E; do
filename="file_in_$(echo $dir|sed -e "s#/# #g")" &&
if test "$(echo $(grep -v ^D $dir/CVS/Entries|cut -d/ -f2,3,5))" = "$filename/1.1/" &&
- diff -q "$dir/$filename" "../$dir/$filename"; then
+ test_cmp "$dir/$filename" "../$dir/$filename"; then
:
else
echo >failure
@@ -349,7 +349,7 @@ test_expect_success 'cvs update (re-add deleted file)' \
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.4/" &&
- diff -q testfile1 ../testfile1'
+ test_cmp testfile1 ../testfile1'
cd "$WORKDIR"
test_expect_success 'cvs update (merge)' \
@@ -366,7 +366,7 @@ test_expect_success 'cvs update (merge)' \
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
test "$(echo $(grep merge CVS/Entries|cut -d/ -f2,3,5))" = "merge/1.1/" &&
- diff -q merge ../merge &&
+ test_cmp merge ../merge &&
( echo Line 0; cat merge ) >merge.tmp &&
mv merge.tmp merge &&
cd "$WORKDIR" &&
@@ -377,7 +377,7 @@ test_expect_success 'cvs update (merge)' \
cd cvswork &&
sleep 1 && touch merge &&
GIT_CONFIG="$git_config" cvs -Q update &&
- diff -q merge ../expected'
+ test_cmp merge ../expected'
cd "$WORKDIR"
@@ -402,13 +402,13 @@ test_expect_success 'cvs update (conflict merge)' \
git push gitcvs.git >/dev/null &&
cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update &&
- diff -q merge ../expected.C'
+ test_cmp merge ../expected.C'
cd "$WORKDIR"
test_expect_success 'cvs update (-C)' \
'cd cvswork &&
GIT_CONFIG="$git_config" cvs -Q update -C &&
- diff -q merge ../merge'
+ test_cmp merge ../merge'
cd "$WORKDIR"
test_expect_success 'cvs update (merge no-op)' \
@@ -420,7 +420,7 @@ test_expect_success 'cvs update (merge no-op)' \
cd cvswork &&
sleep 1 && touch merge &&
GIT_CONFIG="$git_config" cvs -Q update &&
- diff -q merge ../merge'
+ test_cmp merge ../merge'
cd "$WORKDIR"
test_expect_success 'cvs update (-p)' '
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index 40637d6782..ed7b513f3e 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -11,14 +11,6 @@ repository using cvs CLI client via git-cvsserver server'
. ./test-lib.sh
-q_to_nul () {
- perl -pe 'y/Q/\000/'
-}
-
-q_to_cr () {
- tr Q '\015'
-}
-
marked_as () {
foundEntry="$(grep "^/$2/" "$1/CVS/Entries")"
if [ x"$foundEntry" = x"" ] ; then
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 2fc7fdb124..63b6b060e6 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -591,14 +591,22 @@ test_debug 'cat gitweb.log'
# ----------------------------------------------------------------------
# gitweb config and repo config
-cat >>gitweb_config.perl <<EOF
-
-\$feature{'blame'}{'override'} = 1;
-\$feature{'snapshot'}{'override'} = 1;
-\$feature{'avatar'}{'override'} = 1;
+cat >>gitweb_config.perl <<\EOF
+
+# turn on override for each overridable feature
+foreach my $key (keys %feature) {
+ if ($feature{$key}{'sub'}) {
+ $feature{$key}{'override'} = 1;
+ }
+}
EOF
test_expect_success \
+ 'config override: projects list (implicit)' \
+ 'gitweb_run'
+test_debug 'cat gitweb.log'
+
+test_expect_success \
'config override: tree view, features not overridden in repo config' \
'gitweb_run "p=.git;a=tree"'
test_debug 'cat gitweb.log'
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
index 0688a57e1d..2487da1296 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -15,9 +15,10 @@ code and message.'
# ----------------------------------------------------------------------
# snapshot settings
-test_commit \
- 'SnapshotTests' \
- 'i can has snapshot?'
+test_expect_success 'setup' "
+ test_commit 'SnapshotTests' 'i can has snapshot?'
+"
+
cat >>gitweb_config.perl <<\EOF
$feature{'snapshot'}{'override'} = 0;
@@ -33,7 +34,6 @@ test_expect_success \
grep "403 - Snapshot format not allowed" gitweb.output &&
gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
grep "403 - Unsupported snapshot format" gitweb.output'
-test_debug 'cat gitweb.output'
cat >>gitweb_config.perl <<\EOF
@@ -50,7 +50,6 @@ test_expect_success \
grep "403 - Snapshot format not allowed" gitweb.output &&
gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
grep "Status: 200 OK" gitweb.output'
-test_debug 'cat gitweb.output'
cat >>gitweb_config.perl <<\EOF
@@ -72,7 +71,7 @@ test_expect_success \
'snapshots: tgz explicitly enabled' \
'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
grep "Status: 200 OK" gitweb.output'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
# ----------------------------------------------------------------------
@@ -82,7 +81,7 @@ test_expect_success 'snapshots: good tree-ish id' '
gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
grep "Status: 200 OK" gitweb.output
'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
test_expect_success 'snapshots: bad tree-ish id' '
gitweb_run "p=.git;a=snapshot;h=frizzumFrazzum;sf=tgz" &&
@@ -105,7 +104,7 @@ test_expect_success 'snapshots: good object id' '
gitweb_run "p=.git;a=snapshot;h=$ID;sf=tgz" &&
grep "Status: 200 OK" gitweb.output
'
-test_debug 'cat gitweb.output'
+test_debug 'cat gitweb.headers'
test_expect_success 'snapshots: bad object id' '
gitweb_run "p=.git;a=snapshot;h=abcdef01234;sf=tgz" &&
@@ -114,4 +113,26 @@ test_expect_success 'snapshots: bad object id' '
test_debug 'cat gitweb.output'
+# ----------------------------------------------------------------------
+# load checking
+
+# always hit the load limit
+cat >>gitweb_config.perl <<\EOF
+our $maxload = -1;
+EOF
+
+test_expect_success 'load checking: load too high (default action)' '
+ gitweb_run "p=.git" &&
+ grep "Status: 503 Service Unavailable" gitweb.headers &&
+ grep "503 - The load average on the server is too high" gitweb.body
+'
+test_debug 'cat gitweb.log' # just in case
+test_debug 'cat gitweb.headers'
+
+# turn off load checking
+cat >>gitweb_config.perl <<\EOF
+our $maxload = undef;
+EOF
+
+
test_done
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 363345faef..b572ce3ab7 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -47,13 +47,20 @@ EOF
test_expect_success 'import a trivial module' '
- git cvsimport -a -z 0 -C module-git module &&
+ git cvsimport -a -R -z 0 -C module-git module &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
test_expect_success 'pack refs' 'cd module-git && git gc && cd ..'
+test_expect_success 'initial import has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+'
+
test_expect_success 'update cvs module' '
cd module-cvs &&
@@ -86,13 +93,21 @@ EOF
test_expect_success 'update git module' '
cd module-git &&
- git cvsimport -a -z 0 module &&
+ git cvsimport -a -R -z 0 module &&
git merge origin &&
cd .. &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
'
+test_expect_success 'update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
+ git log --format="o_fortuna 1.2 %H" -1 HEAD) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+'
+
test_expect_success 'update cvs module' '
cd module-cvs &&
@@ -107,13 +122,22 @@ test_expect_success 'cvsimport.module config works' '
cd module-git &&
git config cvsimport.module module &&
- git cvsimport -a -z0 &&
+ git cvsimport -a -R -z0 &&
git merge origin &&
cd .. &&
test_cmp module-cvs/tick module-git/tick
'
+test_expect_success 'second update has correct .git/cvs-revisions' '
+
+ (cd module-git &&
+ git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
+ git log --format="o_fortuna 1.2 %H" -1 HEAD^
+ git log --format="tick 1.1 %H" -1 HEAD) > expected &&
+ test_cmp expected module-git/.git/cvs-revisions
+'
+
test_expect_success 'import from a CVS working tree' '
$CVS co -d import-from-wt module &&
@@ -126,6 +150,12 @@ test_expect_success 'import from a CVS working tree' '
'
+test_expect_success 'no .git/cvs-revisions created by default' '
+
+ ! test -e import-from-wt/.git/cvs-revisions
+
+'
+
test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 806b83292f..c582964b0d 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -69,6 +69,8 @@ GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
# CDPATH into the environment
unset CDPATH
+unset GREP_OPTIONS
+
case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
1|2|true)
echo "* warning: Some tests will not work if GIT_TRACE" \
@@ -78,6 +80,12 @@ case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
;;
esac
+# Convenience
+#
+# A regexp to match 5 and 40 hexdigits
+_x05='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
+_x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
+
# Each test should start with something like this, after copyright notices:
#
# test_description='Description of this test...
@@ -228,6 +236,22 @@ test_decode_color () {
-e 's/.\[m/<RESET>/g'
}
+q_to_nul () {
+ perl -pe 'y/Q/\000/'
+}
+
+q_to_cr () {
+ tr Q '\015'
+}
+
+append_cr () {
+ sed -e 's/$/Q/' | tr Q '\015'
+}
+
+remove_cr () {
+ tr '\015' Q | sed -e 's/Q$//'
+}
+
test_tick () {
if test -z "${test_tick+set}"
then
diff --git a/test-chmtime.c b/test-chmtime.c
index fe476cb618..92713d16da 100644
--- a/test-chmtime.c
+++ b/test-chmtime.c
@@ -1,7 +1,7 @@
/*
* This program can either change modification time of the given
* file(s) or just print it. The program does not change atime nor
- * ctime (their values are explicitely preserved).
+ * ctime (their values are explicitly preserved).
*
* The mtime can be changed to an absolute value:
*
diff --git a/transport-helper.c b/transport-helper.c
index 107742891f..2638781c5b 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -171,7 +171,7 @@ static struct child_process *get_helper(struct transport *transport)
} else if (!strcmp(capname, "connect")) {
data->connect = 1;
} else if (mandatory) {
- die("Unknown madatory capability %s. This remote "
+ die("Unknown mandatory capability %s. This remote "
"helper probably needs newer version of Git.\n",
capname);
}
@@ -279,9 +279,8 @@ static void standard_options(struct transport *t)
char buf[16];
int n;
int v = t->verbose;
- int no_progress = v < 0 || (!t->progress && !isatty(2));
- set_helper_option(t, "progress", !no_progress ? "true" : "false");
+ set_helper_option(t, "progress", t->progress ? "true" : "false");
n = snprintf(buf, sizeof(buf), "%d", v + 1);
if (n >= sizeof(buf))
@@ -576,7 +575,6 @@ static int push_refs(struct transport *transport,
if (buf.len == 0)
return 0;
- transport->verbose = flags & TRANSPORT_PUSH_VERBOSE ? 1 : 0;
standard_options(transport);
if (flags & TRANSPORT_PUSH_DRY_RUN) {
diff --git a/transport.c b/transport.c
index 7714fdb6c6..8ce39364a1 100644
--- a/transport.c
+++ b/transport.c
@@ -526,7 +526,7 @@ static int fetch_refs_via_pack(struct transport *transport,
args.include_tag = data->options.followtags;
args.verbose = (transport->verbose > 0);
args.quiet = (transport->verbose < 0);
- args.no_progress = args.quiet || (!transport->progress && !isatty(2));
+ args.no_progress = !transport->progress;
args.depth = data->options.depth;
for (i = 0; i < nr_heads; i++)
@@ -573,7 +573,7 @@ static int push_had_errors(struct ref *ref)
return 0;
}
-static int refs_pushed(struct ref *ref)
+int transport_refs_pushed(struct ref *ref)
{
for (; ref; ref = ref->next) {
switch(ref->status) {
@@ -587,7 +587,7 @@ static int refs_pushed(struct ref *ref)
return 0;
}
-static void update_tracking_ref(struct remote *remote, struct ref *ref, int verbose)
+void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose)
{
struct refspec rs;
@@ -609,8 +609,6 @@ static void update_tracking_ref(struct remote *remote, struct ref *ref, int verb
}
}
-#define SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
-
static void print_ref_status(char flag, const char *summary, struct ref *to, struct ref *from, const char *msg, int porcelain)
{
if (porcelain) {
@@ -623,7 +621,7 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str
else
fprintf(stdout, "%s\n", summary);
} else {
- fprintf(stderr, " %c %-*s ", flag, SUMMARY_WIDTH, summary);
+ fprintf(stderr, " %c %-*s ", flag, TRANSPORT_SUMMARY_WIDTH, summary);
if (from)
fprintf(stderr, "%s -> %s", prettify_refname(from->name), prettify_refname(to->name));
else
@@ -675,7 +673,7 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)
{
if (!count)
- fprintf(stderr, "To %s\n", dest);
+ fprintf(porcelain ? stdout : stderr, "To %s\n", dest);
switch(ref->status) {
case REF_STATUS_NONE:
@@ -711,8 +709,8 @@ static int print_one_push_status(struct ref *ref, const char *dest, int count, i
return 1;
}
-static void print_push_status(const char *dest, struct ref *refs,
- int verbose, int porcelain, int * nonfastforward)
+void transport_print_push_status(const char *dest, struct ref *refs,
+ int verbose, int porcelain, int *nonfastforward)
{
struct ref *ref;
int n = 0;
@@ -738,7 +736,7 @@ static void print_push_status(const char *dest, struct ref *refs,
}
}
-static void verify_remote_names(int nr_heads, const char **heads)
+void transport_verify_remote_names(int nr_heads, const char **heads)
{
int i;
@@ -788,9 +786,10 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
args.send_mirror = !!(flags & TRANSPORT_PUSH_MIRROR);
args.force_update = !!(flags & TRANSPORT_PUSH_FORCE);
args.use_thin_pack = data->options.thin;
- args.verbose = !!(flags & TRANSPORT_PUSH_VERBOSE);
- args.quiet = !!(flags & TRANSPORT_PUSH_QUIET);
+ args.verbose = (transport->verbose > 0);
+ args.quiet = (transport->verbose < 0);
args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
+ args.porcelain = !!(flags & TRANSPORT_PUSH_PORCELAIN);
ret = send_pack(&args, data->fd, data->conn, remote_refs,
&data->extra_have);
@@ -872,6 +871,21 @@ static int is_file(const char *url)
return S_ISREG(buf.st_mode);
}
+static int isurlschemechar(int first_flag, int ch)
+{
+ /*
+ * The set of valid URL schemes, as per STD66 (RFC3986) is
+ * '[A-Za-z][A-Za-z0-9+.-]*'. But use sightly looser check
+ * of '[A-Za-z0-9][A-Za-z0-9+.-]*' because earlier version
+ * of check used '[A-Za-z0-9]+' so not to break any remote
+ * helpers.
+ */
+ int alphanumeric, special;
+ alphanumeric = ch > 0 && isalnum(ch);
+ special = ch == '+' || ch == '-' || ch == '.';
+ return alphanumeric || (!first_flag && special);
+}
+
static int is_url(const char *url)
{
const char *url2, *first_slash;
@@ -896,7 +910,7 @@ static int is_url(const char *url)
*/
url2 = url;
while (url2 < first_slash - 1) {
- if (!isalnum((unsigned char)*url2))
+ if (!isurlschemechar(url2 == url, (unsigned char)*url2))
return 0;
url2++;
}
@@ -912,32 +926,34 @@ static int external_specification_len(const char *url)
struct transport *transport_get(struct remote *remote, const char *url)
{
+ const char *helper;
struct transport *ret = xcalloc(1, sizeof(*ret));
+ ret->progress = isatty(2);
+
if (!remote)
die("No remote provided to transport_get()");
+ ret->got_remote_refs = 0;
ret->remote = remote;
+ helper = remote->foreign_vcs;
- if (!url && remote && remote->url)
+ if (!url && remote->url)
url = remote->url[0];
ret->url = url;
- /* In case previous URL had helper forced, reset it. */
- remote->foreign_vcs = NULL;
-
/* maybe it is a foreign URL? */
if (url) {
const char *p = url;
- while (isalnum(*p))
+ while (isurlschemechar(p == url, *p))
p++;
if (!prefixcmp(p, "::"))
- remote->foreign_vcs = xstrndup(url, p - url);
+ helper = xstrndup(url, p - url);
}
- if (remote && remote->foreign_vcs) {
- transport_helper_init(ret, remote->foreign_vcs);
+ if (helper) {
+ transport_helper_init(ret, helper);
} else if (!prefixcmp(url, "rsync:")) {
ret->get_refs_list = get_refs_via_rsync;
ret->fetch = fetch_objs_via_rsync;
@@ -1014,12 +1030,31 @@ int transport_set_option(struct transport *transport,
return 1;
}
+void transport_set_verbosity(struct transport *transport, int verbosity,
+ int force_progress)
+{
+ if (verbosity >= 2)
+ transport->verbose = verbosity <= 3 ? verbosity : 3;
+ if (verbosity < 0)
+ transport->verbose = -1;
+
+ /**
+ * Rules used to determine whether to report progress (processing aborts
+ * when a rule is satisfied):
+ *
+ * 1. Report progress, if force_progress is 1 (ie. --progress).
+ * 2. Don't report progress, if verbosity < 0 (ie. -q/--quiet ).
+ * 3. Report progress if isatty(2) is 1.
+ **/
+ transport->progress = force_progress || (verbosity >= 0 && isatty(2));
+}
+
int transport_push(struct transport *transport,
int refspec_nr, const char **refspec, int flags,
int *nonfastforward)
{
*nonfastforward = 0;
- verify_remote_names(refspec_nr, refspec);
+ transport_verify_remote_names(refspec_nr, refspec);
if (transport->push) {
/* Maybe FIXME. But no important transport uses this case. */
@@ -1032,11 +1067,11 @@ int transport_push(struct transport *transport,
transport->get_refs_list(transport, 1);
struct ref *local_refs = get_local_heads();
int match_flags = MATCH_REFS_NONE;
- int verbose = flags & TRANSPORT_PUSH_VERBOSE;
- int quiet = flags & TRANSPORT_PUSH_QUIET;
+ int verbose = (transport->verbose > 0);
+ int quiet = (transport->verbose < 0);
int porcelain = flags & TRANSPORT_PUSH_PORCELAIN;
int pretend = flags & TRANSPORT_PUSH_DRY_RUN;
- int ret, err;
+ int push_ret, ret, err;
if (flags & TRANSPORT_PUSH_ALL)
match_flags |= MATCH_REFS_ALL;
@@ -1052,13 +1087,12 @@ int transport_push(struct transport *transport,
flags & TRANSPORT_PUSH_MIRROR,
flags & TRANSPORT_PUSH_FORCE);
- ret = transport->push_refs(transport, remote_refs, flags);
+ push_ret = transport->push_refs(transport, remote_refs, flags);
err = push_had_errors(remote_refs);
-
- ret |= err;
+ ret = push_ret | err;
if (!quiet || err)
- print_push_status(transport->url, remote_refs,
+ transport_print_push_status(transport->url, remote_refs,
verbose | porcelain, porcelain,
nonfastforward);
@@ -1068,11 +1102,14 @@ int transport_push(struct transport *transport,
if (!(flags & TRANSPORT_PUSH_DRY_RUN)) {
struct ref *ref;
for (ref = remote_refs; ref; ref = ref->next)
- update_tracking_ref(transport->remote, ref, verbose);
+ transport_update_tracking_ref(transport->remote, ref, verbose);
}
- if (!quiet && !ret && !refs_pushed(remote_refs))
+ if (porcelain && !push_ret)
+ puts("Done");
+ else if (!quiet && !ret && !transport_refs_pushed(remote_refs))
fprintf(stderr, "Everything up-to-date\n");
+
return ret;
}
return 1;
@@ -1080,8 +1117,10 @@ int transport_push(struct transport *transport,
const struct ref *transport_get_remote_refs(struct transport *transport)
{
- if (!transport->remote_refs)
+ if (!transport->got_remote_refs) {
transport->remote_refs = transport->get_refs_list(transport, 0);
+ transport->got_remote_refs = 1;
+ }
return transport->remote_refs;
}
diff --git a/transport.h b/transport.h
index 7cea5cc723..c59d97388e 100644
--- a/transport.h
+++ b/transport.h
@@ -20,6 +20,12 @@ struct transport {
const struct ref *remote_refs;
/**
+ * Indicates whether we already called get_refs_list(); set by
+ * transport.c::transport_get_remote_refs().
+ */
+ unsigned got_remote_refs : 1;
+
+ /**
* Returns 0 if successful, positive if the option is not
* recognized or is inapplicable, and negative if the option
* is applicable but the value is invalid.
@@ -74,7 +80,12 @@ struct transport {
int (*disconnect)(struct transport *connection);
char *pack_lockfile;
signed verbose : 3;
- /* Force progress even if stderr is not a tty */
+ /**
+ * Transports should not set this directly, and should use this
+ * value without having to check isatty(2), -q/--quiet
+ * (transport->verbose < 0), etc. - checking has already been done
+ * in transport_set_verbosity().
+ **/
unsigned progress : 1;
/*
* If transport is at least potentially smart, this points to
@@ -88,10 +99,10 @@ struct transport {
#define TRANSPORT_PUSH_FORCE 2
#define TRANSPORT_PUSH_DRY_RUN 4
#define TRANSPORT_PUSH_MIRROR 8
-#define TRANSPORT_PUSH_VERBOSE 16
-#define TRANSPORT_PUSH_PORCELAIN 32
-#define TRANSPORT_PUSH_QUIET 64
-#define TRANSPORT_PUSH_SET_UPSTREAM 128
+#define TRANSPORT_PUSH_PORCELAIN 16
+#define TRANSPORT_PUSH_SET_UPSTREAM 32
+
+#define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
/* Returns a transport suitable for the url */
struct transport *transport_get(struct remote *, const char *);
@@ -122,6 +133,8 @@ struct transport *transport_get(struct remote *, const char *);
**/
int transport_set_option(struct transport *transport, const char *name,
const char *value);
+void transport_set_verbosity(struct transport *transport, int verbosity,
+ int force_progress);
int transport_push(struct transport *connection,
int refspec_nr, const char **refspec, int flags,
@@ -142,4 +155,14 @@ int transport_connect(struct transport *transport, const char *name,
/* Transport methods defined outside transport.c */
int transport_helper_init(struct transport *transport, const char *name);
+/* common methods used by transport.c and builtin-send-pack.c */
+void transport_verify_remote_names(int nr_heads, const char **heads);
+
+void transport_update_tracking_ref(struct remote *remote, struct ref *ref, int verbose);
+
+int transport_refs_pushed(struct ref *ref);
+
+void transport_print_push_status(const char *dest, struct ref *refs,
+ int verbose, int porcelain, int *nonfastforward);
+
#endif
diff --git a/tree-diff.c b/tree-diff.c
index 7d745b4406..fe9f52c479 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -68,7 +68,7 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
newbase[baselen + pathlen1] = 0;
opt->change(opt, mode1, mode2,
- sha1, sha2, newbase);
+ sha1, sha2, newbase, 0, 0);
newbase[baselen + pathlen1] = '/';
}
retval = diff_tree_sha1(sha1, sha2, newbase, opt);
@@ -77,7 +77,7 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const
}
fullname = malloc_fullname(base, baselen, path1, pathlen1);
- opt->change(opt, mode1, mode2, sha1, sha2, fullname);
+ opt->change(opt, mode1, mode2, sha1, sha2, fullname, 0, 0);
free(fullname);
return 0;
}
@@ -241,7 +241,7 @@ static void show_entry(struct diff_options *opt, const char *prefix, struct tree
if (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE)) {
newbase[baselen + pathlen] = 0;
- opt->add_remove(opt, *prefix, mode, sha1, newbase);
+ opt->add_remove(opt, *prefix, mode, sha1, newbase, 0);
newbase[baselen + pathlen] = '/';
}
@@ -252,7 +252,7 @@ static void show_entry(struct diff_options *opt, const char *prefix, struct tree
free(newbase);
} else {
char *fullname = malloc_fullname(base, baselen, path, pathlen);
- opt->add_remove(opt, prefix[0], mode, sha1, fullname);
+ opt->add_remove(opt, prefix[0], mode, sha1, fullname, 0);
free(fullname);
}
}
diff --git a/tree-walk.c b/tree-walk.c
index 02e2aed773..67a9a0c5a5 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -60,13 +60,6 @@ void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1)
return buf;
}
-static int entry_compare(struct name_entry *a, struct name_entry *b)
-{
- return df_name_compare(
- a->path, tree_entry_len(a->path, a->sha1), a->mode,
- b->path, tree_entry_len(b->path, b->sha1), b->mode);
-}
-
static void entry_clear(struct name_entry *a)
{
memset(a, 0, sizeof(*a));
@@ -138,66 +131,264 @@ char *make_traverse_path(char *path, const struct traverse_info *info, const str
return path;
}
+struct tree_desc_skip {
+ struct tree_desc_skip *prev;
+ const void *ptr;
+};
+
+struct tree_desc_x {
+ struct tree_desc d;
+ struct tree_desc_skip *skip;
+};
+
+static int name_compare(const char *a, int a_len,
+ const char *b, int b_len)
+{
+ int len = (a_len < b_len) ? a_len : b_len;
+ int cmp = memcmp(a, b, len);
+ if (cmp)
+ return cmp;
+ return (a_len - b_len);
+}
+
+static int check_entry_match(const char *a, int a_len, const char *b, int b_len)
+{
+ /*
+ * The caller wants to pick *a* from a tree or nothing.
+ * We are looking at *b* in a tree.
+ *
+ * (0) If a and b are the same name, we are trivially happy.
+ *
+ * There are three possibilities where *a* could be hiding
+ * behind *b*.
+ *
+ * (1) *a* == "t", *b* == "ab" i.e. *b* sorts earlier than *a* no
+ * matter what.
+ * (2) *a* == "t", *b* == "t-2" and "t" is a subtree in the tree;
+ * (3) *a* == "t-2", *b* == "t" and "t-2" is a blob in the tree.
+ *
+ * Otherwise we know *a* won't appear in the tree without
+ * scanning further.
+ */
+
+ int cmp = name_compare(a, a_len, b, b_len);
+
+ /* Most common case first -- reading sync'd trees */
+ if (!cmp)
+ return cmp;
+
+ if (0 < cmp) {
+ /* a comes after b; it does not matter if it is case (3)
+ if (b_len < a_len && !memcmp(a, b, b_len) && a[b_len] < '/')
+ return 1;
+ */
+ return 1; /* keep looking */
+ }
+
+ /* b comes after a; are we looking at case (2)? */
+ if (a_len < b_len && !memcmp(a, b, a_len) && b[a_len] < '/')
+ return 1; /* keep looking */
+
+ return -1; /* a cannot appear in the tree */
+}
+
+/*
+ * From the extended tree_desc, extract the first name entry, while
+ * paying attention to the candidate "first" name. Most importantly,
+ * when looking for an entry, if there are entries that sorts earlier
+ * in the tree object representation than that name, skip them and
+ * process the named entry first. We will remember that we haven't
+ * processed the first entry yet, and in the later call skip the
+ * entry we processed early when update_extended_entry() is called.
+ *
+ * E.g. if the underlying tree object has these entries:
+ *
+ * blob "t-1"
+ * blob "t-2"
+ * tree "t"
+ * blob "t=1"
+ *
+ * and the "first" asks for "t", remember that we still need to
+ * process "t-1" and "t-2" but extract "t". After processing the
+ * entry "t" from this call, the caller will let us know by calling
+ * update_extended_entry() that we can remember "t" has been processed
+ * already.
+ */
+
+static void extended_entry_extract(struct tree_desc_x *t,
+ struct name_entry *a,
+ const char *first,
+ int first_len)
+{
+ const char *path;
+ int len;
+ struct tree_desc probe;
+ struct tree_desc_skip *skip;
+
+ /*
+ * Extract the first entry from the tree_desc, but skip the
+ * ones that we already returned in earlier rounds.
+ */
+ while (1) {
+ if (!t->d.size) {
+ entry_clear(a);
+ break; /* not found */
+ }
+ entry_extract(&t->d, a);
+ for (skip = t->skip; skip; skip = skip->prev)
+ if (a->path == skip->ptr)
+ break; /* found */
+ if (!skip)
+ break;
+ /* We have processed this entry already. */
+ update_tree_entry(&t->d);
+ }
+
+ if (!first || !a->path)
+ return;
+
+ /*
+ * The caller wants "first" from this tree, or nothing.
+ */
+ path = a->path;
+ len = tree_entry_len(a->path, a->sha1);
+ switch (check_entry_match(first, first_len, path, len)) {
+ case -1:
+ entry_clear(a);
+ case 0:
+ return;
+ default:
+ break;
+ }
+
+ /*
+ * We need to look-ahead -- we suspect that a subtree whose
+ * name is "first" may be hiding behind the current entry "path".
+ */
+ probe = t->d;
+ while (probe.size) {
+ entry_extract(&probe, a);
+ path = a->path;
+ len = tree_entry_len(a->path, a->sha1);
+ switch (check_entry_match(first, first_len, path, len)) {
+ case -1:
+ entry_clear(a);
+ case 0:
+ return;
+ default:
+ update_tree_entry(&probe);
+ break;
+ }
+ /* keep looking */
+ }
+ entry_clear(a);
+}
+
+static void update_extended_entry(struct tree_desc_x *t, struct name_entry *a)
+{
+ if (t->d.entry.path == a->path) {
+ update_tree_entry(&t->d);
+ } else {
+ /* we have returned this entry early */
+ struct tree_desc_skip *skip = xmalloc(sizeof(*skip));
+ skip->ptr = a->path;
+ skip->prev = t->skip;
+ t->skip = skip;
+ }
+}
+
+static void free_extended_entry(struct tree_desc_x *t)
+{
+ struct tree_desc_skip *p, *s;
+
+ for (s = t->skip; s; s = p) {
+ p = s->prev;
+ free(s);
+ }
+}
+
int traverse_trees(int n, struct tree_desc *t, struct traverse_info *info)
{
int ret = 0;
struct name_entry *entry = xmalloc(n*sizeof(*entry));
+ int i;
+ struct tree_desc_x *tx = xcalloc(n, sizeof(*tx));
+
+ for (i = 0; i < n; i++)
+ tx[i].d = t[i];
for (;;) {
- unsigned long mask = 0;
- unsigned long dirmask = 0;
- int i, last;
+ unsigned long mask, dirmask;
+ const char *first = NULL;
+ int first_len = 0;
+ struct name_entry *e;
+ int len;
- last = -1;
for (i = 0; i < n; i++) {
- if (!t[i].size)
+ e = entry + i;
+ extended_entry_extract(tx + i, e, NULL, 0);
+ }
+
+ /*
+ * A tree may have "t-2" at the current location even
+ * though it may have "t" that is a subtree behind it,
+ * and another tree may return "t". We want to grab
+ * all "t" from all trees to match in such a case.
+ */
+ for (i = 0; i < n; i++) {
+ e = entry + i;
+ if (!e->path)
continue;
- entry_extract(t+i, entry+i);
- if (last >= 0) {
- int cmp = entry_compare(entry+i, entry+last);
-
- /*
- * Is the new name bigger than the old one?
- * Ignore it
- */
- if (cmp > 0)
+ len = tree_entry_len(e->path, e->sha1);
+ if (!first) {
+ first = e->path;
+ first_len = len;
+ continue;
+ }
+ if (name_compare(e->path, len, first, first_len) < 0) {
+ first = e->path;
+ first_len = len;
+ }
+ }
+
+ if (first) {
+ for (i = 0; i < n; i++) {
+ e = entry + i;
+ extended_entry_extract(tx + i, e, first, first_len);
+ /* Cull the ones that are not the earliest */
+ if (!e->path)
continue;
- /*
- * Is the new name smaller than the old one?
- * Ignore all old ones
- */
- if (cmp < 0)
- mask = 0;
+ len = tree_entry_len(e->path, e->sha1);
+ if (name_compare(e->path, len, first, first_len))
+ entry_clear(e);
}
+ }
+
+ /* Now we have in entry[i] the earliest name from the trees */
+ mask = 0;
+ dirmask = 0;
+ for (i = 0; i < n; i++) {
+ if (!entry[i].path)
+ continue;
mask |= 1ul << i;
if (S_ISDIR(entry[i].mode))
dirmask |= 1ul << i;
- last = i;
}
if (!mask)
break;
- dirmask &= mask;
-
- /*
- * Clear all the unused name-entries.
- */
- for (i = 0; i < n; i++) {
- if (mask & (1ul << i))
- continue;
- entry_clear(entry + i);
- }
ret = info->fn(n, mask, dirmask, entry, info);
if (ret < 0)
break;
- if (ret)
- mask &= ret;
+ mask &= ret;
ret = 0;
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n; i++)
if (mask & (1ul << i))
- update_tree_entry(t + i);
- }
+ update_extended_entry(tx + i, entry + i);
}
free(entry);
+ for (i = 0; i < n; i++)
+ free_extended_entry(tx + i);
+ free(tx);
return ret;
}
@@ -250,6 +441,7 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch
if (name[0] == '\0') {
hashcpy(sha1, root);
+ free(tree);
return 0;
}
diff --git a/unpack-trees.c b/unpack-trees.c
index 0ddbef3e63..75f54cac97 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -198,23 +198,142 @@ static inline int call_unpack_fn(struct cache_entry **src, struct unpack_trees_o
return ret;
}
-static int unpack_index_entry(struct cache_entry *ce, struct unpack_trees_options *o)
+static void mark_ce_used(struct cache_entry *ce, struct unpack_trees_options *o)
+{
+ ce->ce_flags |= CE_UNPACKED;
+
+ if (o->cache_bottom < o->src_index->cache_nr &&
+ o->src_index->cache[o->cache_bottom] == ce) {
+ int bottom = o->cache_bottom;
+ while (bottom < o->src_index->cache_nr &&
+ o->src_index->cache[bottom]->ce_flags & CE_UNPACKED)
+ bottom++;
+ o->cache_bottom = bottom;
+ }
+}
+
+static void mark_all_ce_unused(struct index_state *index)
+{
+ int i;
+ for (i = 0; i < index->cache_nr; i++)
+ index->cache[i]->ce_flags &= ~CE_UNPACKED;
+}
+
+static int locate_in_src_index(struct cache_entry *ce,
+ struct unpack_trees_options *o)
+{
+ struct index_state *index = o->src_index;
+ int len = ce_namelen(ce);
+ int pos = index_name_pos(index, ce->name, len);
+ if (pos < 0)
+ pos = -1 - pos;
+ return pos;
+}
+
+/*
+ * We call unpack_index_entry() with an unmerged cache entry
+ * only in diff-index, and it wants a single callback. Skip
+ * the other unmerged entry with the same name.
+ */
+static void mark_ce_used_same_name(struct cache_entry *ce,
+ struct unpack_trees_options *o)
+{
+ struct index_state *index = o->src_index;
+ int len = ce_namelen(ce);
+ int pos;
+
+ for (pos = locate_in_src_index(ce, o); pos < index->cache_nr; pos++) {
+ struct cache_entry *next = index->cache[pos];
+ if (len != ce_namelen(next) ||
+ memcmp(ce->name, next->name, len))
+ break;
+ mark_ce_used(next, o);
+ }
+}
+
+static struct cache_entry *next_cache_entry(struct unpack_trees_options *o)
+{
+ const struct index_state *index = o->src_index;
+ int pos = o->cache_bottom;
+
+ while (pos < index->cache_nr) {
+ struct cache_entry *ce = index->cache[pos];
+ if (!(ce->ce_flags & CE_UNPACKED))
+ return ce;
+ pos++;
+ }
+ return NULL;
+}
+
+static void add_same_unmerged(struct cache_entry *ce,
+ struct unpack_trees_options *o)
+{
+ struct index_state *index = o->src_index;
+ int len = ce_namelen(ce);
+ int pos = index_name_pos(index, ce->name, len);
+
+ if (0 <= pos)
+ die("programming error in a caller of mark_ce_used_same_name");
+ for (pos = -pos - 1; pos < index->cache_nr; pos++) {
+ struct cache_entry *next = index->cache[pos];
+ if (len != ce_namelen(next) ||
+ memcmp(ce->name, next->name, len))
+ break;
+ add_entry(o, next, 0, 0);
+ mark_ce_used(next, o);
+ }
+}
+
+static int unpack_index_entry(struct cache_entry *ce,
+ struct unpack_trees_options *o)
{
struct cache_entry *src[5] = { ce, NULL, };
+ int ret;
- o->pos++;
+ mark_ce_used(ce, o);
if (ce_stage(ce)) {
if (o->skip_unmerged) {
add_entry(o, ce, 0, 0);
return 0;
}
}
- return call_unpack_fn(src, o);
+ ret = call_unpack_fn(src, o);
+ if (ce_stage(ce))
+ mark_ce_used_same_name(ce, o);
+ return ret;
+}
+
+static int find_cache_pos(struct traverse_info *, const struct name_entry *);
+
+static void restore_cache_bottom(struct traverse_info *info, int bottom)
+{
+ struct unpack_trees_options *o = info->data;
+
+ if (o->diff_index_cached)
+ return;
+ o->cache_bottom = bottom;
+}
+
+static int switch_cache_bottom(struct traverse_info *info)
+{
+ struct unpack_trees_options *o = info->data;
+ int ret, pos;
+
+ if (o->diff_index_cached)
+ return 0;
+ ret = o->cache_bottom;
+ pos = find_cache_pos(info->prev, &info->name);
+
+ if (pos < -1)
+ o->cache_bottom = -2 - pos;
+ else if (pos < 0)
+ o->cache_bottom = o->src_index->cache_nr;
+ return ret;
}
static int traverse_trees_recursive(int n, unsigned long dirmask, unsigned long df_conflicts, struct name_entry *names, struct traverse_info *info)
{
- int i;
+ int i, ret, bottom;
struct tree_desc t[MAX_UNPACK_TREES];
struct traverse_info newinfo;
struct name_entry *p;
@@ -235,7 +354,11 @@ static int traverse_trees_recursive(int n, unsigned long dirmask, unsigned long
sha1 = names[i].sha1;
fill_tree_descriptor(t+i, sha1);
}
- return traverse_trees(n, t, &newinfo);
+
+ bottom = switch_cache_bottom(&newinfo);
+ ret = traverse_trees(n, t, &newinfo);
+ restore_cache_bottom(&newinfo, bottom);
+ return ret;
}
/*
@@ -284,6 +407,20 @@ static int compare_entry(const struct cache_entry *ce, const struct traverse_inf
return ce_namelen(ce) > traverse_path_len(info, n);
}
+static int ce_in_traverse_path(const struct cache_entry *ce,
+ const struct traverse_info *info)
+{
+ if (!info->prev)
+ return 1;
+ if (do_compare_entry(ce, info->prev, &info->name))
+ return 0;
+ /*
+ * If ce (blob) is the same name as the path (which is a tree
+ * we will be descending into), it won't be inside it.
+ */
+ return (info->pathlen < ce_namelen(ce));
+}
+
static struct cache_entry *create_ce_entry(const struct traverse_info *info, const struct name_entry *n, int stage)
{
int len = traverse_path_len(info, n);
@@ -360,6 +497,114 @@ static int unpack_failed(struct unpack_trees_options *o, const char *message)
return -1;
}
+/* NEEDSWORK: give this a better name and share with tree-walk.c */
+static int name_compare(const char *a, int a_len,
+ const char *b, int b_len)
+{
+ int len = (a_len < b_len) ? a_len : b_len;
+ int cmp = memcmp(a, b, len);
+ if (cmp)
+ return cmp;
+ return (a_len - b_len);
+}
+
+/*
+ * The tree traversal is looking at name p. If we have a matching entry,
+ * return it. If name p is a directory in the index, do not return
+ * anything, as we will want to match it when the traversal descends into
+ * the directory.
+ */
+static int find_cache_pos(struct traverse_info *info,
+ const struct name_entry *p)
+{
+ int pos;
+ struct unpack_trees_options *o = info->data;
+ struct index_state *index = o->src_index;
+ int pfxlen = info->pathlen;
+ int p_len = tree_entry_len(p->path, p->sha1);
+
+ for (pos = o->cache_bottom; pos < index->cache_nr; pos++) {
+ struct cache_entry *ce = index->cache[pos];
+ const char *ce_name, *ce_slash;
+ int cmp, ce_len;
+
+ if (!ce_in_traverse_path(ce, info))
+ continue;
+ if (ce->ce_flags & CE_UNPACKED)
+ continue;
+ ce_name = ce->name + pfxlen;
+ ce_slash = strchr(ce_name, '/');
+ if (ce_slash)
+ ce_len = ce_slash - ce_name;
+ else
+ ce_len = ce_namelen(ce) - pfxlen;
+ cmp = name_compare(p->path, p_len, ce_name, ce_len);
+ /*
+ * Exact match; if we have a directory we need to
+ * delay returning it.
+ */
+ if (!cmp)
+ return ce_slash ? -2 - pos : pos;
+ if (0 < cmp)
+ continue; /* keep looking */
+ /*
+ * ce_name sorts after p->path; could it be that we
+ * have files under p->path directory in the index?
+ * E.g. ce_name == "t-i", and p->path == "t"; we may
+ * have "t/a" in the index.
+ */
+ if (p_len < ce_len && !memcmp(ce_name, p->path, p_len) &&
+ ce_name[p_len] < '/')
+ continue; /* keep looking */
+ break;
+ }
+ return -1;
+}
+
+static struct cache_entry *find_cache_entry(struct traverse_info *info,
+ const struct name_entry *p)
+{
+ int pos = find_cache_pos(info, p);
+ struct unpack_trees_options *o = info->data;
+
+ if (0 <= pos)
+ return o->src_index->cache[pos];
+ else
+ return NULL;
+}
+
+static void debug_path(struct traverse_info *info)
+{
+ if (info->prev) {
+ debug_path(info->prev);
+ if (*info->prev->name.path)
+ putchar('/');
+ }
+ printf("%s", info->name.path);
+}
+
+static void debug_name_entry(int i, struct name_entry *n)
+{
+ printf("ent#%d %06o %s\n", i,
+ n->path ? n->mode : 0,
+ n->path ? n->path : "(missing)");
+}
+
+static void debug_unpack_callback(int n,
+ unsigned long mask,
+ unsigned long dirmask,
+ struct name_entry *names,
+ struct traverse_info *info)
+{
+ int i;
+ printf("* unpack mask %lu, dirmask %lu, cnt %d ",
+ mask, dirmask, n);
+ debug_path(info);
+ putchar('\n');
+ for (i = 0; i < n; i++)
+ debug_name_entry(i, names + i);
+}
+
static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *names, struct traverse_info *info)
{
struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, };
@@ -370,25 +615,38 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
while (!p->mode)
p++;
+ if (o->debug_unpack)
+ debug_unpack_callback(n, mask, dirmask, names, info);
+
/* Are we supposed to look at the index too? */
if (o->merge) {
- while (o->pos < o->src_index->cache_nr) {
- struct cache_entry *ce = o->src_index->cache[o->pos];
- int cmp = compare_entry(ce, info, p);
+ while (1) {
+ int cmp;
+ struct cache_entry *ce;
+
+ if (o->diff_index_cached)
+ ce = next_cache_entry(o);
+ else
+ ce = find_cache_entry(info, p);
+
+ if (!ce)
+ break;
+ cmp = compare_entry(ce, info, p);
if (cmp < 0) {
if (unpack_index_entry(ce, o) < 0)
return unpack_failed(o, NULL);
continue;
}
if (!cmp) {
- o->pos++;
if (ce_stage(ce)) {
/*
- * If we skip unmerged index entries, we'll skip this
- * entry *and* the tree entries associated with it!
+ * If we skip unmerged index
+ * entries, we'll skip this
+ * entry *and* the tree
+ * entries associated with it!
*/
if (o->skip_unmerged) {
- add_entry(o, ce, 0, 0);
+ add_same_unmerged(ce, o);
return mask;
}
}
@@ -401,6 +659,13 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
if (unpack_nondirectories(n, mask, dirmask, src, names, info) < 0)
return -1;
+ if (src[0]) {
+ if (ce_stage(src[0]))
+ mark_ce_used_same_name(src[0], o);
+ else
+ mark_ce_used(src[0], o);
+ }
+
/* Now handle any directories.. */
if (dirmask) {
unsigned long conflicts = mask & ~dirmask;
@@ -417,11 +682,13 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str
matches = cache_tree_matches_traversal(o->src_index->cache_tree,
names, info);
/*
- * Everything under the name matches. Adjust o->pos to
- * skip the entire hierarchy.
+ * Everything under the name matches; skip the
+ * entire hierarchy. diff_index_cached codepath
+ * special cases D/F conflicts in such a way that
+ * it does not do any look-ahead, so this is safe.
*/
if (matches) {
- o->pos += matches;
+ o->cache_bottom += matches;
return mask;
}
}
@@ -465,11 +732,10 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
memset(&o->result, 0, sizeof(o->result));
o->result.initialized = 1;
- if (o->src_index) {
- o->result.timestamp.sec = o->src_index->timestamp.sec;
- o->result.timestamp.nsec = o->src_index->timestamp.nsec;
- }
+ o->result.timestamp.sec = o->src_index->timestamp.sec;
+ o->result.timestamp.nsec = o->src_index->timestamp.nsec;
o->merge_size = len;
+ mark_all_ce_unused(o->src_index);
if (!dfc)
dfc = xcalloc(1, cache_entry_size(0));
@@ -483,22 +749,38 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
info.fn = unpack_callback;
info.data = o;
- if (traverse_trees(len, t, &info) < 0) {
- ret = unpack_failed(o, NULL);
- goto done;
+ if (o->prefix) {
+ /*
+ * Unpack existing index entries that sort before the
+ * prefix the tree is spliced into. Note that o->merge
+ * is always true in this case.
+ */
+ while (1) {
+ struct cache_entry *ce = next_cache_entry(o);
+ if (!ce)
+ break;
+ if (ce_in_traverse_path(ce, &info))
+ break;
+ if (unpack_index_entry(ce, o) < 0)
+ goto return_failed;
+ }
}
+
+ if (traverse_trees(len, t, &info) < 0)
+ goto return_failed;
}
/* Any left-over entries in the index? */
if (o->merge) {
- while (o->pos < o->src_index->cache_nr) {
- struct cache_entry *ce = o->src_index->cache[o->pos];
- if (unpack_index_entry(ce, o) < 0) {
- ret = unpack_failed(o, NULL);
- goto done;
- }
+ while (1) {
+ struct cache_entry *ce = next_cache_entry(o);
+ if (!ce)
+ break;
+ if (unpack_index_entry(ce, o) < 0)
+ goto return_failed;
}
}
+ mark_all_ce_unused(o->src_index);
if (o->trivial_merges_only && o->nontrivial_merge) {
ret = unpack_failed(o, "Merge requires file-level merging");
@@ -543,6 +825,11 @@ done:
free(el.excludes);
return ret;
+
+return_failed:
+ mark_all_ce_unused(o->src_index);
+ ret = unpack_failed(o, NULL);
+ goto done;
}
/* Here come the merge functions */
@@ -661,7 +948,9 @@ static int verify_clean_subdirectory(struct cache_entry *ce, const char *action,
* in that directory.
*/
namelen = strlen(ce->name);
- for (i = o->pos; i < o->src_index->cache_nr; i++) {
+ for (i = locate_in_src_index(ce, o);
+ i < o->src_index->cache_nr;
+ i++) {
struct cache_entry *ce2 = o->src_index->cache[i];
int len = ce_namelen(ce2);
if (len < namelen ||
@@ -669,12 +958,14 @@ static int verify_clean_subdirectory(struct cache_entry *ce, const char *action,
ce2->name[namelen] != '/')
break;
/*
- * ce2->name is an entry in the subdirectory.
+ * ce2->name is an entry in the subdirectory to be
+ * removed.
*/
if (!ce_stage(ce2)) {
if (verify_uptodate(ce2, o))
return -1;
add_entry(o, ce2, CE_REMOVE, 0);
+ mark_ce_used(ce2, o);
}
cnt++;
}
@@ -731,7 +1022,6 @@ static int verify_absent_1(struct cache_entry *ce, const char *action,
return 0;
if (!lstat(ce->name, &st)) {
- int ret;
int dtype = ce_to_dtype(ce);
struct cache_entry *result;
@@ -759,28 +1049,8 @@ static int verify_absent_1(struct cache_entry *ce, const char *action,
* files that are in "foo/" we would lose
* them.
*/
- ret = verify_clean_subdirectory(ce, action, o);
- if (ret < 0)
- return ret;
-
- /*
- * If this removed entries from the index,
- * what that means is:
- *
- * (1) the caller unpack_callback() saw path/foo
- * in the index, and it has not removed it because
- * it thinks it is handling 'path' as blob with
- * D/F conflict;
- * (2) we will return "ok, we placed a merged entry
- * in the index" which would cause o->pos to be
- * incremented by one;
- * (3) however, original o->pos now has 'path/foo'
- * marked with "to be removed".
- *
- * We need to increment it by the number of
- * deleted entries here.
- */
- o->pos += ret;
+ if (verify_clean_subdirectory(ce, action, o) < 0)
+ return -1;
return 0;
}
@@ -927,7 +1197,8 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o)
remote = NULL;
}
- /* First, if there's a #16 situation, note that to prevent #13
+ /*
+ * First, if there's a #16 situation, note that to prevent #13
* and #14.
*/
if (!same(remote, head)) {
@@ -941,7 +1212,8 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o)
}
}
- /* We start with cases where the index is allowed to match
+ /*
+ * We start with cases where the index is allowed to match
* something other than the head: #14(ALT) and #2ALT, where it
* is permitted to match the result instead.
*/
@@ -971,12 +1243,13 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o)
if (!head && !remote && any_anc_missing)
return 0;
- /* Under the new "aggressive" rule, we resolve mostly trivial
+ /*
+ * Under the "aggressive" rule, we resolve mostly trivial
* cases that we historically had git-merge-one-file resolve.
*/
if (o->aggressive) {
- int head_deleted = !head && !df_conflict_head;
- int remote_deleted = !remote && !df_conflict_remote;
+ int head_deleted = !head;
+ int remote_deleted = !remote;
struct cache_entry *ce = NULL;
if (index)
diff --git a/unpack-trees.h b/unpack-trees.h
index 95ff36c824..ef70eab390 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -31,10 +31,11 @@ struct unpack_trees_options {
skip_unmerged,
initial_checkout,
diff_index_cached,
+ debug_unpack,
skip_sparse_checkout,
gently;
const char *prefix;
- int pos;
+ int cache_bottom;
struct dir_struct *dir;
merge_fn_t fn;
struct unpack_trees_error_msgs msgs;
diff --git a/upload-pack.c b/upload-pack.c
index df151813f9..dc464d78b3 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -105,12 +105,12 @@ static void show_edge(struct commit *commit)
fprintf(pack_pipe, "-%s\n", sha1_to_hex(commit->object.sha1));
}
-static int do_rev_list(int fd, void *create_full_pack)
+static int do_rev_list(int in, int out, void *create_full_pack)
{
int i;
struct rev_info revs;
- pack_pipe = xfdopen(fd, "w");
+ pack_pipe = xfdopen(out, "w");
init_revisions(&revs, NULL);
revs.tag_objects = 1;
revs.tree_objects = 1;
@@ -162,8 +162,9 @@ static void create_pack_file(void)
int arg = 0;
if (shallow_nr) {
+ memset(&rev_list, 0, sizeof(rev_list));
rev_list.proc = do_rev_list;
- rev_list.data = 0;
+ rev_list.out = -1;
if (start_async(&rev_list))
die("git upload-pack: unable to fork git-rev-list");
argv[arg++] = "pack-objects";
diff --git a/utf8.c b/utf8.c
index ab326ac83e..84cfc72e6d 100644
--- a/utf8.c
+++ b/utf8.c
@@ -280,22 +280,11 @@ int is_utf8(const char *text)
return 1;
}
-static inline void strbuf_write(struct strbuf *sb, const char *buf, int len)
+static void strbuf_addchars(struct strbuf *sb, int c, size_t n)
{
- if (sb)
- strbuf_insert(sb, sb->len, buf, len);
- else
- fwrite(buf, len, 1, stdout);
-}
-
-static void print_spaces(struct strbuf *buf, int count)
-{
- static const char s[] = " ";
- while (count >= sizeof(s)) {
- strbuf_write(buf, s, sizeof(s) - 1);
- count -= sizeof(s) - 1;
- }
- strbuf_write(buf, s, count);
+ strbuf_grow(sb, n);
+ memset(sb->buf + sb->len, c, n);
+ strbuf_setlen(sb, sb->len + n);
}
static void strbuf_add_indented_text(struct strbuf *buf, const char *text,
@@ -307,8 +296,8 @@ static void strbuf_add_indented_text(struct strbuf *buf, const char *text,
const char *eol = strchrnul(text, '\n');
if (*eol == '\n')
eol++;
- print_spaces(buf, indent);
- strbuf_write(buf, text, eol - text);
+ strbuf_addchars(buf, ' ', indent);
+ strbuf_add(buf, text, eol - text);
text = eol;
indent = indent2;
}
@@ -335,16 +324,21 @@ static size_t display_mode_esc_sequence_len(const char *s)
* consumed (and no extra indent is necessary for the first line).
*/
int strbuf_add_wrapped_text(struct strbuf *buf,
- const char *text, int indent, int indent2, int width)
+ const char *text, int indent1, int indent2, int width)
{
- int w = indent, assume_utf8 = is_utf8(text);
- const char *bol = text, *space = NULL;
+ int indent, w, assume_utf8 = 1;
+ const char *bol, *space, *start = text;
+ size_t orig_len = buf->len;
if (width <= 0) {
- strbuf_add_indented_text(buf, text, indent, indent2);
+ strbuf_add_indented_text(buf, text, indent1, indent2);
return 1;
}
+retry:
+ bol = text;
+ w = indent = indent1;
+ space = NULL;
if (indent < 0) {
w = -indent;
space = text;
@@ -366,8 +360,8 @@ int strbuf_add_wrapped_text(struct strbuf *buf,
if (space)
start = space;
else
- print_spaces(buf, indent);
- strbuf_write(buf, start, text - start);
+ strbuf_addchars(buf, ' ', indent);
+ strbuf_add(buf, start, text - start);
if (!c)
return w;
space = text;
@@ -376,40 +370,41 @@ int strbuf_add_wrapped_text(struct strbuf *buf,
else if (c == '\n') {
space++;
if (*space == '\n') {
- strbuf_write(buf, "\n", 1);
+ strbuf_addch(buf, '\n');
goto new_line;
}
else if (!isalnum(*space))
goto new_line;
else
- strbuf_write(buf, " ", 1);
+ strbuf_addch(buf, ' ');
}
w++;
text++;
}
else {
new_line:
- strbuf_write(buf, "\n", 1);
+ strbuf_addch(buf, '\n');
text = bol = space + isspace(*space);
space = NULL;
w = indent = indent2;
}
continue;
}
- if (assume_utf8)
+ if (assume_utf8) {
w += utf8_width(&text, NULL);
- else {
+ if (!text) {
+ assume_utf8 = 0;
+ text = start;
+ strbuf_setlen(buf, orig_len);
+ goto retry;
+ }
+ } else {
w++;
text++;
}
}
}
-int print_wrapped_text(const char *text, int indent, int indent2, int width)
-{
- return strbuf_add_wrapped_text(NULL, text, indent, indent2, width);
-}
-
int is_encoding_utf8(const char *name)
{
if (!name)
diff --git a/utf8.h b/utf8.h
index c9738d83d9..ebc4d2fa85 100644
--- a/utf8.h
+++ b/utf8.h
@@ -8,7 +8,6 @@ int utf8_strwidth(const char *string);
int is_utf8(const char *text);
int is_encoding_utf8(const char *name);
-int print_wrapped_text(const char *text, int indent, int indent2, int len);
int strbuf_add_wrapped_text(struct strbuf *buf,
const char *text, int indent, int indent2, int width);
diff --git a/walker.h b/walker.h
index 8a149e1108..95e5765484 100644
--- a/walker.h
+++ b/walker.h
@@ -34,6 +34,6 @@ int walker_fetch(struct walker *impl, int targets, char **target,
void walker_free(struct walker *walker);
-struct walker *get_http_walker(const char *url, struct remote *remote);
+struct walker *get_http_walker(const char *url);
#endif /* WALKER_H */
diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh
index c5075c9c61..09feb1f737 100644
--- a/wrap-for-bin.sh
+++ b/wrap-for-bin.sh
@@ -7,9 +7,15 @@
# @@BUILD_DIR@@ and @@PROG@@.
GIT_EXEC_PATH='@@BUILD_DIR@@'
-GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
+if test -n "$NO_SET_GIT_TEMPLATE_DIR"
+then
+ unset GIT_TEMPLATE_DIR
+else
+ GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
+ export GIT_TEMPLATE_DIR
+fi
GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
-export GIT_EXEC_PATH GIT_TEMPLATE_DIR GITPERLLIB PATH
+export GIT_EXEC_PATH GITPERLLIB PATH
exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
diff --git a/wrapper.c b/wrapper.c
index c9be1400c0..9c71b21242 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -34,6 +34,16 @@ void *xmalloc(size_t size)
return ret;
}
+void *xmallocz(size_t size)
+{
+ void *ret;
+ if (size + 1 < size)
+ die("Data too large to fit into virtual memory space.");
+ ret = xmalloc(size + 1);
+ ((char*)ret)[size] = 0;
+ return ret;
+}
+
/*
* xmemdupz() allocates (len + 1) bytes of memory, duplicates "len" bytes of
* "data" to the allocated memory, zero terminates the allocated memory,
@@ -42,10 +52,7 @@ void *xmalloc(size_t size)
*/
void *xmemdupz(const void *data, size_t len)
{
- char *p = xmalloc(len + 1);
- memcpy(p, data, len);
- p[len] = '\0';
- return p;
+ return memcpy(xmallocz(len), data, len);
}
char *xstrndup(const char *str, size_t len)
@@ -197,6 +204,16 @@ int xmkstemp(char *template)
return fd;
}
+int xmkstemp_mode(char *template, int mode)
+{
+ int fd;
+
+ fd = git_mkstemp_mode(template, mode);
+ if (fd < 0)
+ die_errno("Unable to create temporary file");
+ return fd;
+}
+
/*
* zlib wrappers to make sure we don't silently miss errors
* at init time.
@@ -260,10 +277,14 @@ int git_inflate(z_streamp strm, int flush)
int odb_mkstemp(char *template, size_t limit, const char *pattern)
{
int fd;
-
+ /*
+ * we let the umask do its job, don't try to be more
+ * restrictive except to remove write permission.
+ */
+ int mode = 0444;
snprintf(template, limit, "%s/%s",
get_object_directory(), pattern);
- fd = mkstemp(template);
+ fd = git_mkstemp_mode(template, mode);
if (0 <= fd)
return fd;
@@ -272,7 +293,7 @@ int odb_mkstemp(char *template, size_t limit, const char *pattern)
snprintf(template, limit, "%s/%s",
get_object_directory(), pattern);
safe_create_leading_directories(template);
- return xmkstemp(template);
+ return xmkstemp_mode(template, mode);
}
int odb_pack_keep(char *name, size_t namesz, unsigned char *sha1)
diff --git a/wt-status.c b/wt-status.c
index 65feb29f2e..8ca59a2d2a 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -78,7 +78,8 @@ static void wt_status_print_cached_header(struct wt_status *s)
}
static void wt_status_print_dirty_header(struct wt_status *s,
- int has_deleted)
+ int has_deleted,
+ int has_dirty_submodules)
{
const char *c = color(WT_STATUS_HEADER, s);
@@ -90,6 +91,8 @@ static void wt_status_print_dirty_header(struct wt_status *s,
else
color_fprintf_ln(s->fp, c, "# (use \"git add/rm <file>...\" to update what will be committed)");
color_fprintf_ln(s->fp, c, "# (use \"git checkout -- <file>...\" to discard changes in working directory)");
+ if (has_dirty_submodules)
+ color_fprintf_ln(s->fp, c, "# (commit or discard the untracked or modified content in submodules)");
color_fprintf_ln(s->fp, c, "#");
}
@@ -144,6 +147,7 @@ static void wt_status_print_change_data(struct wt_status *s,
char *two_name;
const char *one, *two;
struct strbuf onebuf = STRBUF_INIT, twobuf = STRBUF_INIT;
+ struct strbuf extra = STRBUF_INIT;
one_name = two_name = it->string;
switch (change_type) {
@@ -153,6 +157,17 @@ static void wt_status_print_change_data(struct wt_status *s,
one_name = d->head_path;
break;
case WT_STATUS_CHANGED:
+ if (d->new_submodule_commits || d->dirty_submodule) {
+ strbuf_addstr(&extra, " (");
+ if (d->new_submodule_commits)
+ strbuf_addf(&extra, "new commits, ");
+ if (d->dirty_submodule & DIRTY_SUBMODULE_MODIFIED)
+ strbuf_addf(&extra, "modified content, ");
+ if (d->dirty_submodule & DIRTY_SUBMODULE_UNTRACKED)
+ strbuf_addf(&extra, "untracked content, ");
+ strbuf_setlen(&extra, extra.len - 2);
+ strbuf_addch(&extra, ')');
+ }
status = d->worktree_status;
break;
}
@@ -189,6 +204,10 @@ static void wt_status_print_change_data(struct wt_status *s,
default:
die("bug: unhandled diff status %c", status);
}
+ if (extra.len) {
+ color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "%s", extra.buf);
+ strbuf_release(&extra);
+ }
fprintf(s->fp, "\n");
strbuf_release(&onebuf);
strbuf_release(&twobuf);
@@ -218,6 +237,9 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
}
if (!d->worktree_status)
d->worktree_status = p->status;
+ d->dirty_submodule = p->two->dirty_submodule;
+ if (S_ISGITLINK(p->two->mode))
+ d->new_submodule_commits = !!hashcmp(p->one->sha1, p->two->sha1);
}
}
@@ -281,6 +303,9 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
init_revisions(&rev, NULL);
setup_revisions(0, NULL, &rev, NULL);
rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
+ DIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);
+ if (!s->show_untracked_files)
+ DIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);
rev.diffopt.format_callback = wt_status_collect_changed_cb;
rev.diffopt.format_callback_data = s;
rev.prune_data = s->pathspec;
@@ -290,10 +315,13 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
static void wt_status_collect_changes_index(struct wt_status *s)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
init_revisions(&rev, NULL);
- setup_revisions(0, NULL, &rev,
- s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference);
+ memset(&opt, 0, sizeof(opt));
+ opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
+ setup_revisions(0, NULL, &rev, &opt);
+
rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
rev.diffopt.format_callback = wt_status_collect_updated_cb;
rev.diffopt.format_callback_data = s;
@@ -418,33 +446,39 @@ static void wt_status_print_updated(struct wt_status *s)
* 0 : no change
* 1 : some change but no delete
*/
-static int wt_status_check_worktree_changes(struct wt_status *s)
+static int wt_status_check_worktree_changes(struct wt_status *s,
+ int *dirty_submodules)
{
int i;
int changes = 0;
+ *dirty_submodules = 0;
+
for (i = 0; i < s->change.nr; i++) {
struct wt_status_change_data *d;
d = s->change.items[i].util;
if (!d->worktree_status ||
d->worktree_status == DIFF_STATUS_UNMERGED)
continue;
- changes = 1;
+ if (!changes)
+ changes = 1;
+ if (d->dirty_submodule)
+ *dirty_submodules = 1;
if (d->worktree_status == DIFF_STATUS_DELETED)
- return -1;
+ changes = -1;
}
return changes;
}
static void wt_status_print_changed(struct wt_status *s)
{
- int i;
- int worktree_changes = wt_status_check_worktree_changes(s);
+ int i, dirty_submodules;
+ int worktree_changes = wt_status_check_worktree_changes(s, &dirty_submodules);
if (!worktree_changes)
return;
- wt_status_print_dirty_header(s, worktree_changes < 0);
+ wt_status_print_dirty_header(s, worktree_changes < 0, dirty_submodules);
for (i = 0; i < s->change.nr; i++) {
struct wt_status_change_data *d;
@@ -459,7 +493,7 @@ static void wt_status_print_changed(struct wt_status *s)
wt_status_print_trailer(s);
}
-static void wt_status_print_submodule_summary(struct wt_status *s)
+static void wt_status_print_submodule_summary(struct wt_status *s, int uncommitted)
{
struct child_process sm_summary;
char summary_limit[64];
@@ -468,11 +502,11 @@ static void wt_status_print_submodule_summary(struct wt_status *s)
const char *argv[] = {
"submodule",
"summary",
- "--cached",
+ uncommitted ? "--files" : "--cached",
"--for-status",
"--summary-limit",
summary_limit,
- s->amend ? "HEAD^" : "HEAD",
+ uncommitted ? NULL : (s->amend ? "HEAD^" : "HEAD"),
NULL
};
@@ -512,11 +546,15 @@ static void wt_status_print_untracked(struct wt_status *s)
static void wt_status_print_verbose(struct wt_status *s)
{
struct rev_info rev;
+ struct setup_revision_opt opt;
init_revisions(&rev, NULL);
DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
- setup_revisions(0, NULL, &rev,
- s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference);
+
+ memset(&opt, 0, sizeof(opt));
+ opt.def = s->is_initial ? EMPTY_TREE_SHA1_HEX : s->reference;
+ setup_revisions(0, NULL, &rev, &opt);
+
rev.diffopt.output_format |= DIFF_FORMAT_PATCH;
rev.diffopt.detect_rename = 1;
rev.diffopt.file = s->fp;
@@ -580,8 +618,10 @@ void wt_status_print(struct wt_status *s)
wt_status_print_updated(s);
wt_status_print_unmerged(s);
wt_status_print_changed(s);
- if (s->submodule_summary)
- wt_status_print_submodule_summary(s);
+ if (s->submodule_summary) {
+ wt_status_print_submodule_summary(s, 0); /* staged */
+ wt_status_print_submodule_summary(s, 1); /* unstaged */
+ }
if (s->show_untracked_files)
wt_status_print_untracked(s);
else if (s->commitable)
diff --git a/wt-status.h b/wt-status.h
index c60f40a34a..91206739f3 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -25,6 +25,8 @@ struct wt_status_change_data {
int index_status;
int stagemask;
char *head_path;
+ unsigned dirty_submodule : 2;
+ unsigned new_submodule_commits : 1;
};
struct wt_status {
diff --git a/xdiff-interface.c b/xdiff-interface.c
index 01f14fb50f..ca5e3fbae8 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -218,6 +218,23 @@ int read_mmfile(mmfile_t *ptr, const char *filename)
return 0;
}
+void read_mmblob(mmfile_t *ptr, const unsigned char *sha1)
+{
+ unsigned long size;
+ enum object_type type;
+
+ if (!hashcmp(sha1, null_sha1)) {
+ ptr->ptr = xstrdup("");
+ ptr->size = 0;
+ return;
+ }
+
+ ptr->ptr = read_sha1_file(sha1, &type, &size);
+ if (!ptr->ptr || type != OBJ_BLOB)
+ die("unable to read blob object %s", sha1_to_hex(sha1));
+ ptr->size = size;
+}
+
#define FIRST_FEW_BYTES 8000
int buffer_is_binary(const char *ptr, unsigned long size)
{
diff --git a/xdiff-interface.h b/xdiff-interface.h
index 55572c39a1..abba70c16b 100644
--- a/xdiff-interface.h
+++ b/xdiff-interface.h
@@ -18,6 +18,7 @@ int parse_hunk_header(char *line, int len,
int *ob, int *on,
int *nb, int *nn);
int read_mmfile(mmfile_t *ptr, const char *filename);
+void read_mmblob(mmfile_t *ptr, const unsigned char *sha1);
int buffer_is_binary(const char *ptr, unsigned long size);
extern void xdiff_set_find_func(xdemitconf_t *xecfg, const char *line, int cflags);
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
index 3f6229edbe..a71763ade8 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -56,17 +56,14 @@ extern "C" {
#define XDL_MERGE_EAGER 1
#define XDL_MERGE_ZEALOUS 2
#define XDL_MERGE_ZEALOUS_ALNUM 3
-#define XDL_MERGE_LEVEL_MASK 0x0f
/* merge favor modes */
#define XDL_MERGE_FAVOR_OURS 1
#define XDL_MERGE_FAVOR_THEIRS 2
-#define XDL_MERGE_FAVOR(flags) (((flags)>>4) & 3)
-#define XDL_MERGE_FLAGS(level, style, favor) ((level)|(style)|((favor)<<4))
+#define XDL_MERGE_FAVOR_UNION 3
/* merge output styles */
-#define XDL_MERGE_DIFF3 0x8000
-#define XDL_MERGE_STYLE_MASK 0x8000
+#define XDL_MERGE_DIFF3 1
typedef struct s_mmfile {
char *ptr;
@@ -117,13 +114,16 @@ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
typedef struct s_xmparam {
xpparam_t xpp;
int marker_size;
+ int level;
+ int favor;
+ int style;
} xmparam_t;
#define DEFAULT_CONFLICT_MARKER_SIZE 7
int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1,
mmfile_t *mf2, const char *name2,
- xmparam_t const *xmp, int flags, mmbuffer_t *result);
+ xmparam_t const *xmp, mmbuffer_t *result);
#ifdef __cplusplus
}
diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
index 8cbe45e675..87cafa7021 100644
--- a/xdiff/xmerge.c
+++ b/xdiff/xmerge.c
@@ -28,6 +28,7 @@ typedef struct s_xdmerge {
* 0 = conflict,
* 1 = no conflict, take first,
* 2 = no conflict, take second.
+ * 3 = no conflict, take both.
*/
int mode;
/*
@@ -230,14 +231,19 @@ static int xdl_fill_merge_buffer(xdfenv_t *xe1, const char *name1,
size = fill_conflict_hunk(xe1, name1, xe2, name2,
size, i, style, m, dest,
marker_size);
- else if (m->mode == 1)
- size += xdl_recs_copy(xe1, i, m->i1 + m->chg1 - i, 0,
+ else if (m->mode & 3) {
+ /* Before conflicting part */
+ size += xdl_recs_copy(xe1, i, m->i1 - i, 0,
dest ? dest + size : NULL);
- else if (m->mode == 2)
- size += xdl_recs_copy(xe2, m->i2 - m->i1 + i,
- m->i1 + m->chg2 - i, 0,
- dest ? dest + size : NULL);
- else
+ /* Postimage from side #1 */
+ if (m->mode & 1)
+ size += xdl_recs_copy(xe1, m->i1, m->chg1, 1,
+ dest ? dest + size : NULL);
+ /* Postimage from side #2 */
+ if (m->mode & 2)
+ size += xdl_recs_copy(xe2, m->i2, m->chg2, 1,
+ dest ? dest + size : NULL);
+ } else
continue;
i = m->i1 + m->chg1;
}
@@ -394,13 +400,13 @@ static int xdl_simplify_non_conflicts(xdfenv_t *xe1, xdmerge_t *m,
*/
static int xdl_do_merge(xdfenv_t *xe1, xdchange_t *xscr1, const char *name1,
xdfenv_t *xe2, xdchange_t *xscr2, const char *name2,
- int flags, xmparam_t const *xmp, mmbuffer_t *result) {
+ xmparam_t const *xmp, mmbuffer_t *result) {
xdmerge_t *changes, *c;
xpparam_t const *xpp = &xmp->xpp;
int i0, i1, i2, chg0, chg1, chg2;
- int level = flags & XDL_MERGE_LEVEL_MASK;
- int style = flags & XDL_MERGE_STYLE_MASK;
- int favor = XDL_MERGE_FAVOR(flags);
+ int level = xmp->level;
+ int style = xmp->style;
+ int favor = xmp->favor;
if (style == XDL_MERGE_DIFF3) {
/*
@@ -550,7 +556,7 @@ static int xdl_do_merge(xdfenv_t *xe1, xdchange_t *xscr1, const char *name1,
int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1,
mmfile_t *mf2, const char *name2,
- xmparam_t const *xmp, int flags, mmbuffer_t *result) {
+ xmparam_t const *xmp, mmbuffer_t *result) {
xdchange_t *xscr1, *xscr2;
xdfenv_t xe1, xe2;
int status;
@@ -587,7 +593,7 @@ int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1,
} else {
status = xdl_do_merge(&xe1, xscr1, name1,
&xe2, xscr2, name2,
- flags, xmp, result);
+ xmp, result);
}
xdl_free_script(xscr1);
xdl_free_script(xscr2);