summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.mailmap1
-rw-r--r--Documentation/CodingGuidelines25
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/RelNotes/2.3.0.txt300
-rw-r--r--Documentation/RelNotes/2.3.1.txt52
-rw-r--r--Documentation/RelNotes/2.3.2.txt79
-rw-r--r--Documentation/RelNotes/2.3.3.txt39
-rw-r--r--Documentation/RelNotes/2.3.4.txt32
-rw-r--r--Documentation/RelNotes/2.3.5.txt44
-rw-r--r--Documentation/RelNotes/2.3.6.txt13
-rw-r--r--Documentation/SubmittingPatches27
-rw-r--r--Documentation/config.txt191
-rw-r--r--Documentation/diff-format.txt3
-rw-r--r--Documentation/git-add.txt2
-rw-r--r--Documentation/git-am.txt14
-rw-r--r--Documentation/git-apply.txt12
-rw-r--r--Documentation/git-check-ignore.txt3
-rw-r--r--Documentation/git-cherry-pick.txt3
-rw-r--r--Documentation/git-clean.txt8
-rw-r--r--Documentation/git-clone.txt11
-rw-r--r--Documentation/git-fast-import.txt4
-rw-r--r--Documentation/git-imap-send.txt28
-rw-r--r--Documentation/git-mailinfo.txt5
-rw-r--r--Documentation/git-notes.txt12
-rw-r--r--Documentation/git-pack-objects.txt7
-rw-r--r--Documentation/git-pull.txt5
-rw-r--r--Documentation/git-push.txt32
-rw-r--r--Documentation/git-rebase.txt4
-rw-r--r--Documentation/git-remote.txt23
-rw-r--r--Documentation/git-rev-list.txt3
-rw-r--r--Documentation/git-send-email.txt28
-rw-r--r--Documentation/git-stripspace.txt1
-rw-r--r--Documentation/git-submodule.txt66
-rw-r--r--Documentation/git-update-index.txt18
-rw-r--r--Documentation/git.txt55
-rw-r--r--Documentation/gitignore.txt4
-rw-r--r--Documentation/gitmodules.txt21
-rw-r--r--Documentation/gitweb.conf.txt2
-rw-r--r--Documentation/howto/recover-corrupted-object-harder.txt237
-rw-r--r--Documentation/rev-list-options.txt19
-rw-r--r--Documentation/technical/api-credentials.txt5
-rw-r--r--Documentation/technical/api-string-list.txt4
-rw-r--r--Documentation/technical/index-format.txt2
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--INSTALL15
-rw-r--r--Makefile40
l---------RelNotes2
-rw-r--r--archive-zip.c2
-rw-r--r--archive.c34
-rw-r--r--bisect.c2
-rw-r--r--builtin/apply.c192
-rw-r--r--builtin/blame.c17
-rw-r--r--builtin/branch.c13
-rw-r--r--builtin/cat-file.c6
-rw-r--r--builtin/checkout-index.c16
-rw-r--r--builtin/checkout.c8
-rw-r--r--builtin/clone.c31
-rw-r--r--builtin/commit-tree.c4
-rw-r--r--builtin/commit.c90
-rw-r--r--builtin/config.c7
-rw-r--r--builtin/fetch.c1
-rw-r--r--builtin/fmt-merge-msg.c3
-rw-r--r--builtin/for-each-ref.c20
-rw-r--r--builtin/grep.c4
-rw-r--r--builtin/help.c9
-rw-r--r--builtin/index-pack.c5
-rw-r--r--builtin/init-db.c17
-rw-r--r--builtin/log.c8
-rw-r--r--builtin/ls-files.c43
-rw-r--r--builtin/ls-tree.c20
-rw-r--r--builtin/mailinfo.c22
-rw-r--r--builtin/merge-base.c4
-rw-r--r--builtin/merge-file.c3
-rw-r--r--builtin/merge.c27
-rw-r--r--builtin/notes.c258
-rw-r--r--builtin/pack-objects.c9
-rw-r--r--builtin/prune.c1
-rw-r--r--builtin/push.c2
-rw-r--r--builtin/receive-pack.c95
-rw-r--r--builtin/remote.c73
-rw-r--r--builtin/repack.c57
-rw-r--r--builtin/rev-parse.c2
-rw-r--r--builtin/show-branch.c5
-rw-r--r--builtin/tag.c4
-rw-r--r--builtin/unpack-objects.c2
-rw-r--r--builtin/update-ref.c14
-rw-r--r--bulk-checkin.c1
-rw-r--r--cache.h27
-rw-r--r--color.c173
-rw-r--r--color.h8
-rw-r--r--commit.c75
-rw-r--r--commit.h10
-rw-r--r--compat/stat.c48
-rw-r--r--config.c13
-rw-r--r--config.mak.uname1
-rw-r--r--configure.ac62
-rw-r--r--connect.c34
-rw-r--r--contrib/completion/git-completion.bash35
-rw-r--r--contrib/completion/git-completion.zsh2
-rw-r--r--contrib/completion/git-prompt.sh38
-rw-r--r--contrib/credential/wincred/git-credential-wincred.c25
-rw-r--r--contrib/diff-highlight/README41
-rwxr-xr-xcontrib/diff-highlight/diff-highlight71
-rw-r--r--contrib/subtree/git-subtree.txt194
-rwxr-xr-xcontrib/workdir/git-new-workdir53
-rw-r--r--credential.c5
-rw-r--r--credential.h1
-rw-r--r--csum-file.c10
-rw-r--r--csum-file.h11
-rw-r--r--ctype.c2
-rw-r--r--daemon.c137
-rw-r--r--diff.c3
-rw-r--r--diffcore-break.c7
-rw-r--r--diffcore-rename.c44
-rw-r--r--dir.c43
-rw-r--r--dir.h1
-rw-r--r--environment.c1
-rw-r--r--ewah/ewok.h3
-rw-r--r--exec_cmd.c7
-rw-r--r--exec_cmd.h2
-rw-r--r--fast-import.c9
-rw-r--r--fetch-pack.c14
-rw-r--r--fsck.c3
-rwxr-xr-xgit-add--interactive.perl6
-rwxr-xr-xgit-am.sh21
-rwxr-xr-xgit-bisect.sh11
-rw-r--r--git-compat-util.h60
-rwxr-xr-xgit-difftool--helper.sh2
-rw-r--r--git-mergetool--lib.sh20
-rwxr-xr-xgit-mergetool.sh16
-rw-r--r--git-rebase--interactive.sh22
-rwxr-xr-xgit-remote-testgit.sh8
-rwxr-xr-xgit-send-email.perl118
-rw-r--r--git-sh-setup.sh2
-rwxr-xr-xgit-submodule.sh2
-rwxr-xr-xgit-svn.perl55
-rw-r--r--git.c45
-rw-r--r--grep.c4
-rw-r--r--hex.c2
-rw-r--r--http-push.c4
-rw-r--r--http.c12
-rw-r--r--imap-send.c219
-rw-r--r--kwset.c8
-rw-r--r--kwset.h2
-rw-r--r--list-objects.c4
-rw-r--r--lockfile.c14
-rw-r--r--log-tree.c1
-rw-r--r--mailmap.c20
-rw-r--r--merge-recursive.c17
-rw-r--r--mergetools/diffmerge1
-rw-r--r--mergetools/emerge1
-rw-r--r--mergetools/kdiff31
-rw-r--r--notes-merge.c2
-rw-r--r--notes-utils.c3
-rw-r--r--notes.c7
-rw-r--r--pack-bitmap-write.c8
-rw-r--r--pack-bitmap.c22
-rw-r--r--pack-bitmap.h6
-rw-r--r--pager.c8
-rw-r--r--parse-options.h3
-rw-r--r--path.c11
-rw-r--r--perl/Git.pm4
-rw-r--r--perl/Git/SVN.pm5
-rw-r--r--perl/Git/SVN/Editor.pm38
-rw-r--r--perl/Git/SVN/Fetcher.pm8
-rw-r--r--perl/Git/SVN/Ra.pm3
-rw-r--r--pkt-line.c37
-rw-r--r--po/ca.po3425
-rw-r--r--po/de.po1880
-rw-r--r--po/fr.po1813
-rw-r--r--po/git.pot1771
-rw-r--r--po/sv.po1815
-rw-r--r--po/vi.po2139
-rw-r--r--po/zh_CN.po1902
-rw-r--r--pretty.c2
-rw-r--r--prompt.c16
-rw-r--r--quote.c21
-rw-r--r--quote.h2
-rw-r--r--read-cache.c50
-rw-r--r--refs.c121
-rw-r--r--refs.h10
-rw-r--r--remote-curl.c3
-rw-r--r--remote.c44
-rw-r--r--rerere.c16
-rw-r--r--revision.c10
-rw-r--r--revision.h1
-rw-r--r--run-command.c17
-rw-r--r--run-command.h4
-rw-r--r--send-pack.c26
-rw-r--r--sequencer.c34
-rw-r--r--sequencer.h1
-rw-r--r--server-info.c2
-rw-r--r--sha1_file.c47
-rw-r--r--sha1_name.c12
-rw-r--r--shallow.c2
-rw-r--r--strbuf.c3
-rw-r--r--string-list.c12
-rw-r--r--string-list.h14
-rw-r--r--submodule.c2
-rw-r--r--t/README3
-rw-r--r--t/diff-lib.sh2
-rw-r--r--t/diff-lib/COPYING361
-rw-r--r--t/diff-lib/README46
-rwxr-xr-xt/lib-gpg.sh39
-rw-r--r--t/lib-gpg/keyring.gpg142
-rw-r--r--t/lib-gpg/ownertrust4
-rw-r--r--t/lib-gpg/pubring.gpgbin2359 -> 0 bytes
-rw-r--r--t/lib-gpg/random_seedbin600 -> 0 bytes
-rw-r--r--t/lib-gpg/secring.gpgbin3734 -> 0 bytes
-rw-r--r--t/lib-gpg/trustdb.gpgbin1360 -> 0 bytes
-rw-r--r--t/lib-httpd.sh3
-rw-r--r--t/lib-httpd/apache.conf2
-rwxr-xr-xt/t0027-auto-crlf.sh82
-rwxr-xr-xt/t0030-stripspace.sh6
-rwxr-xr-xt/t0050-filesystem.sh2
-rwxr-xr-xt/t0056-git-C.sh10
-rwxr-xr-xt/t0061-run-command.sh2
-rwxr-xr-xt/t0090-cache-tree.sh2
-rwxr-xr-xt/t0300-credentials.sh9
-rwxr-xr-xt/t1050-large.sh12
-rwxr-xr-xt/t1301-shared-repo.sh11
-rwxr-xr-xt/t1307-config-blob.sh9
-rwxr-xr-xt/t1400-update-ref.sh92
-rwxr-xr-xt/t1450-fsck.sh8
-rwxr-xr-xt/t1509-root-worktree.sh17
-rwxr-xr-xt/t1700-split-index.sh15
-rwxr-xr-xt/t2004-checkout-cache-temp.sh400
-rwxr-xr-xt/t2024-checkout-dwim.sh18
-rwxr-xr-xt/t2107-update-index-basic.sh15
-rwxr-xr-xt/t3102-ls-tree-wildcards.sh22
-rwxr-xr-xt/t3200-branch.sh14
-rwxr-xr-xt/t3301-notes.sh1341
-rwxr-xr-xt/t3404-rebase-interactive.sh16
-rwxr-xr-xt/t3507-cherry-pick-conflict.sh42
-rwxr-xr-xt/t4003-diff-rename-1.sh4
-rwxr-xr-xt/t4005-diff-rename-2.sh4
-rwxr-xr-xt/t4007-rename-3.sh2
-rwxr-xr-xt/t4008-diff-break-rewrite.sh292
-rwxr-xr-xt/t4009-diff-rename-4.sh4
-rwxr-xr-xt/t4010-diff-pathspec.sh2
-rwxr-xr-xt/t4023-diff-rename-typechange.sh3
-rwxr-xr-xt/t4026-color.sh19
-rwxr-xr-xt/t4047-diff-dirstat.sh14
-rwxr-xr-xt/t4058-diff-duplicates.sh79
-rwxr-xr-xt/t4122-apply-symlink-inside.sh106
-rwxr-xr-xt/t4138-apply-ws-expansion.sh121
-rwxr-xr-xt/t4139-apply-escape.sh141
-rwxr-xr-xt/t4150-am.sh23
-rwxr-xr-xt/t4207-log-decoration-colors.sh16
-rwxr-xr-xt/t4255-am-submodule.sh72
-rwxr-xr-xt/t5000-tar-tree.sh2
-rwxr-xr-xt/t5100-mailinfo.sh4
-rw-r--r--t/t5100/info0012--message-id5
-rw-r--r--t/t5100/msg0012--message-id8
-rw-r--r--t/t5100/patch0012--message-id30
-rwxr-xr-xt/t5304-prune.sh8
-rwxr-xr-xt/t5312-prune-corruption.sh114
-rwxr-xr-xt/t5400-send-pack.sh16
-rwxr-xr-xt/t5505-remote.sh5
-rwxr-xr-xt/t5516-fetch-push.sh119
-rwxr-xr-xt/t5527-fetch-odd-refs.sh33
-rwxr-xr-xt/t5541-http-push-smart.sh6
-rwxr-xr-xt/t5550-http-fetch-dumb.sh18
-rwxr-xr-xt/t5551-http-fetch-smart.sh30
-rwxr-xr-xt/t5570-git-daemon.sh27
-rwxr-xr-xt/t5700-clone-reference.sh17
-rwxr-xr-xt/t5801-remote-helpers.sh24
-rwxr-xr-xt/t6023-merge-file.sh3
-rwxr-xr-xt/t6030-bisect-porcelain.sh9
-rwxr-xr-xt/t6300-for-each-ref.sh13
-rwxr-xr-xt/t7004-tag.sh14
-rwxr-xr-xt/t7400-submodule-basic.sh17
-rwxr-xr-xt/t7510-signed-commit.sh4
-rwxr-xr-xt/t7513-interpret-trailers.sh34
-rwxr-xr-xt/t9001-send-email.sh654
-rwxr-xr-xt/t9148-git-svn-propset.sh95
-rwxr-xr-xt/t9300-fast-import.sh4
-rwxr-xr-xt/t9902-completion.sh19
-rwxr-xr-xt/t9903-bash-prompt.sh117
-rw-r--r--t/test-lib-functions.sh4
-rw-r--r--t/test-lib.sh137
-rwxr-xr-xtemplates/hooks--pre-push.sample1
-rw-r--r--test-hashmap.c2
-rw-r--r--trace.c6
-rw-r--r--trailer.c33
-rw-r--r--transport-helper.c16
-rw-r--r--transport.c14
-rw-r--r--tree.c16
-rw-r--r--tree.h3
-rw-r--r--unpack-trees.c2
-rwxr-xr-xupdate_unicode.sh17
-rw-r--r--upload-pack.c20
-rw-r--r--userdiff.c1
-rw-r--r--walker.c2
-rw-r--r--wt-status.c19
-rw-r--r--zlib.c2
296 files changed, 15045 insertions, 10277 deletions
diff --git a/.mailmap b/.mailmap
index bb6f52e..ece2951 100644
--- a/.mailmap
+++ b/.mailmap
@@ -13,6 +13,7 @@ Alex Riesen <raa.lkml@gmail.com> <raa@limbo.localdomain>
Alex Riesen <raa.lkml@gmail.com> <raa@steel.home>
Alex Vandiver <alex@chmrr.net> <alexmv@MIT.EDU>
Alexander Gavrilov <angavrilov@gmail.com>
+Alexander Kuleshov <kuleshovmail@gmail.com>
Alexey Shumkin <alex.crezoff@gmail.com> <zapped@mail.ru>
Alexey Shumkin <alex.crezoff@gmail.com> <Alex.Crezoff@gmail.com>
Anders Kaseorg <andersk@MIT.EDU> <andersk@ksplice.com>
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 894546d..2dd35bd 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -1,5 +1,5 @@
Like other projects, we also have some guidelines to keep to the
-code. For Git in general, three rough rules are:
+code. For Git in general, a few rough rules are:
- Most importantly, we never say "It's in POSIX; we'll happily
ignore your needs should your system not conform to it."
@@ -413,6 +413,29 @@ Error Messages
- Say what the error is first ("cannot open %s", not "%s: cannot open")
+Externally Visible Names
+
+ - For configuration variable names, follow the existing convention:
+
+ . The section name indicates the affected subsystem.
+
+ . The subsection name, if any, indicates which of an unbounded set
+ of things to set the value for.
+
+ . The variable name describes the effect of tweaking this knob.
+
+ The section and variable names that consist of multiple words are
+ formed by concatenating the words without punctuations (e.g. `-`),
+ and are broken using bumpyCaps in documentation as a hint to the
+ reader.
+
+ When choosing the variable namespace, do not use variable name for
+ specifying possibly unbounded set of things, most notably anything
+ an end user can freely come up with (e.g. branch names). Instead,
+ use subsection names or variable values, like the existing variable
+ branch.<name>.description does.
+
+
Writing Documentation:
Most (if not all) of the documentation pages are written in the
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2f6b6aa..3e39e28 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -103,7 +103,7 @@ ASCIIDOC_HTML = xhtml11
ASCIIDOC_DOCBOOK = docbook
ASCIIDOC_CONF = -f asciidoc.conf
ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
- -agit-version=$(GIT_VERSION)
+ -agit_version=$(GIT_VERSION)
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
MANPAGE_XSL = manpage-normal.xsl
diff --git a/Documentation/RelNotes/2.3.0.txt b/Documentation/RelNotes/2.3.0.txt
new file mode 100644
index 0000000..e3c639c
--- /dev/null
+++ b/Documentation/RelNotes/2.3.0.txt
@@ -0,0 +1,300 @@
+Git v2.3 Release Notes
+======================
+
+This one ended up to be a release with lots of small corrections and
+improvements without big uncomfortably exciting features. The recent
+security fix that went to 2.2.1 and older maintenance tracks is also
+contained in this update.
+
+
+Updates since v2.2
+------------------
+
+Ports
+
+ * Recent gcc toolchain on Cygwin started throwing compilation warning,
+ which has been squelched.
+
+ * A few updates to build on platforms that lack tv_nsec,
+ clock_gettime, CLOCK_MONOTONIC and HMAC_CTX_cleanup (e.g. older
+ RHEL) have been added.
+
+
+UI, Workflows & Features
+
+ * It was cumbersome to use "GIT_SSH" mechanism when the user wanted
+ to pass an extra set of arguments to the underlying ssh. A new
+ environment variable GIT_SSH_COMMAND can be used for this.
+
+ * A request to store an empty note via "git notes" meant to remove
+ note from the object but with --allow-empty we will store a
+ (surprise!) note that is empty.
+
+ * "git interpret-trailers" learned to properly handle the
+ "Conflicts:" block at the end.
+
+ * "git am" learned "--message-id" option to copy the message ID of
+ the incoming e-mail to the log message of resulting commit.
+
+ * "git clone --reference=<over there>" learned the "--dissociate"
+ option to go with it; it borrows objects from the reference object
+ store while cloning only to reduce network traffic and then
+ dissociates the resulting clone from the reference by performing
+ local copies of borrowed objects.
+
+ * "git send-email" learned "--transfer-encoding" option to force a
+ non-fault Content-Transfer-Encoding header (e.g. base64).
+
+ * "git send-email" normally identifies itself via X-Mailer: header in
+ the message it sends out. A new command line flag --no-xmailer
+ allows the user to squelch the header.
+
+ * "git push" into a repository with a working tree normally refuses
+ to modify the branch that is checked out. The command learned to
+ optionally do an equivalent of "git reset --hard" only when there
+ is no change to the working tree and the index instead, which would
+ be useful to "deploy" by pushing into a repository.
+
+ * "git new-workdir" (in contrib/) can be used to populate an empty
+ and existing directory now.
+
+ * Credential helpers are asked in turn until one of them give
+ positive response, which is cumbersome to turn off when you need to
+ run Git in an automated setting. The credential helper interface
+ learned to allow a helper to say "stop, don't ask other helpers."
+ Also GIT_TERMINAL_PROMPT environment can be set to false to disable
+ our built-in prompt mechanism for passwords.
+
+ * "git branch -d" (delete) and "git branch -m" (move) learned to
+ honor "-f" (force) flag; unlike many other subcommands, the way to
+ force these have been with separate "-D/-M" options, which was
+ inconsistent.
+
+ * "diff-highlight" filter (in contrib/) allows its color output to be
+ customized via configuration variables.
+
+ * "git imap-send" learned to take "-v" (verbose) and "-q" (quiet)
+ command line options.
+
+ * "git remote add $name $URL" is now allowed when "url.$URL.insteadOf"
+ is already defined.
+
+ * "git imap-send" now can be built to use cURL library to talk to
+ IMAP servers (if the library is recent enough, of course).
+ This allows you to use authenticate method other than CRAM-MD5,
+ among other things.
+
+ * "git imap-send" now allows GIT_CURL_VERBOSE environment variable to
+ control the verbosity when talking via the cURL library.
+
+ * The prompt script (in contrib/) learned to optionally hide prompt
+ when in an ignored directory by setting GIT_PS1_HIDE_IF_PWD_IGNORED
+ shell variable.
+
+
+Performance, Internal Implementation, Development Support etc.
+
+ * Earlier we made "rev-list --object-edge" more aggressively list the
+ objects at the edge commits, in order to reduce number of objects 
+ fetched into a shallow repository, but the change affected cases
+ other than "fetching into a shallow repository" and made it
+ unusably slow (e.g. fetching into a normal repository should not
+ have to suffer the overhead from extra processing). Limit it to a
+ more specific case by introducing --objects-edge-aggressive, a new
+ option to rev-list.
+
+ * Squelched useless compiler warnings on Mac OS X regarding the
+ crypto API.
+
+ * The procedure to generate unicode table has been simplified.
+
+ * Some filesystems assign filemodes in a strange way, fooling then
+ automatic "filemode trustability" check done during a new
+ repository creation. The initialization codepath has been hardened
+ against this issue.
+
+ * The codepath in "git remote update --prune" to drop many refs has
+ been optimized.
+
+ * The API into get_merge_bases*() family of functions was easy to
+ misuse, which has been corrected to make it harder to do so.
+
+ * Long overdue departure from the assumption that S_IFMT is shared by
+ everybody made in 2005, which was necessary to port to z/OS.
+
+ * "git push" and "git fetch" did not communicate an overlong refname
+ correctly. Now it uses 64kB sideband to accommodate longer ones.
+
+ * Recent GPG changes the keyring format and drops support for RFC1991
+ formatted signatures, breaking our existing tests.
+
+ * "git-prompt" (in contrib/) used a variable from the global scope,
+ possibly contaminating end-user's namespace.
+
+
+Also contains various documentation updates and code clean-ups.
+
+
+Fixes since v2.2
+----------------
+
+Unless otherwise noted, all the fixes since v2.2 in the maintenance
+track are contained in this release (see the maintenance releases'
+notes for details).
+
+ * "git http-push" over WebDAV (aka dumb http-push) was broken in
+ v2.2.2 when parsing a symbolic ref, resulting in a bogus request
+ that gets rejected by recent versions of cURL library.
+ (merge f6786c8 jk/http-push-symref-fix later to maint).
+
+ * The logic in "git bisect bad HEAD" etc. to avoid forcing the test
+ of the common ancestor of bad and good commits was broken.
+ (merge 07913d5 cc/bisect-rev-parsing later to maint).
+
+ * "git checkout-index --temp=$target $path" did not work correctly
+ for paths outside the current subdirectory in the project.
+ (merge 74c4de5 es/checkout-index-temp later to maint).
+
+ * The report from "git checkout" on a branch that builds on another
+ local branch by setting its branch.*.merge to branch name (not a
+ full refname) incorrectly said that the upstream is gone.
+ (merge 05e7368 jc/checkout-local-track-report later to maint).
+
+ * With The git-prompt support (in contrib/), using the exit status of
+ the last command in the prompt, e.g. PS1='$(__git_ps1) $? ', did
+ not work well, because the helper function stomped on the exit
+ status.
+ (merge 6babe76 tf/prompt-preserve-exit-status later to maint).
+
+ * Recent update to "git commit" broke amending an existing commit
+ with bogus author/committer lines without a valid e-mail address.
+ (merge c83a509 jk/commit-date-approxidate later to maint).
+
+ * The lockfile API used to get confused which file to clean up when
+ the process moved the $cwd after creating a lockfile.
+ (merge fa137f6 nd/lockfile-absolute later to maint).
+
+ * Traditionally we tried to avoid interpreting date strings given by
+ the user as future dates, e.g. GIT_COMMITTER_DATE=2014-12-10 when
+ used early November 2014 was taken as "October 12, 2014" because it
+ is likely that a date in the future, December 10, is a mistake.
+ This heuristics has been loosened to allow people to express future
+ dates (most notably, --until=<date> may want to be far in the
+ future) and we no longer tiebreak by future-ness of the date when
+
+ (1) ISO-like format is used, and
+ (2) the string can make sense interpreted as both y-m-d and y-d-m.
+
+ Git may still have to use the heuristics to tiebreak between dd/mm/yy
+ and mm/dd/yy, though.
+ (merge d372395 jk/approxidate-avoid-y-d-m-over-future-dates later to maint).
+
+ * Git did not correctly read an overlong refname from a packed refs
+ file.
+ (merge ea41783 jk/read-packed-refs-without-path-max later to maint).
+
+ * "git apply" was described in the documentation to take --ignore-date
+ option, which it does not.
+ (merge 0cef4e7 rw/apply-does-not-take-ignore-date later to maint).
+
+ * "git add -i" did not notice when the interactive command input
+ stream went away and kept asking the same question.
+ (merge a8bec7a jk/add-i-read-error later to maint).
+
+ * "git send-email" did not handle RFC 2047 encoded headers quite
+ right.
+ (merge ab47e2a rd/send-email-2047-fix later to maint).
+
+ * New tag object format validation added in 2.2 showed garbage after
+ a tagname it reported in its error message.
+ (merge a1e920a js/fsck-tag-validation later to maint).
+
+ * The code that reads the reflog from the newer to the older entries
+ did not handle an entry that crosses a boundary of block it uses to
+ read them correctly.
+ (merge 69216bf jk/for-each-reflog-ent-reverse later to maint).
+
+ * "git diff -B -M" after making a new copy B out of an existing file
+ A and then editing A extensively ought to report that B was created
+ by copying A and A was modified, which is what "git diff -C"
+ reports, but it instead said A was renamed to B and A was edited
+ heavily in place. This was not just incoherent but also failed to
+ apply with "git apply". The report has been corrected to match what
+ "git diff -C" produces for this case.
+ (merge 6936b58 jc/diff-b-m later to maint).
+
+ * In files we pre-populate for the user to edit with commented hints,
+ a line of hint that is indented with a tab used to show as '#' (or
+ any comment char), ' ' (space), and then the hint text that began
+ with the tab, which some editors flag as an indentation error (tab
+ following space). We now omit the space after the comment char in
+ such a case.
+ (merge d55aeb7 jc/strbuf-add-lines-avoid-sp-ht-sequence later to maint).
+
+ * "git ls-tree" does not support path selection based on negative
+ pathspecs, but did not error out when negative pathspecs are given.
+ (merge f1f6224 nd/ls-tree-pathspec later to maint).
+
+ * The function sometimes returned a non-freeable memory and some
+ other times returned a piece of memory that must be freed, leading
+ to inevitable leaks.
+ (merge 59362e5 jc/exec-cmd-system-path-leak-fix later to maint).
+
+ * The code to abbreviate an object name to its short unique prefix
+ has been optimized when no abbreviation was requested.
+ (merge 61e704e mh/find-uniq-abbrev later to maint).
+
+ * "git add --ignore-errors ..." did not ignore an error to
+ give a file that did not exist.
+ (merge 1d31e5a mg/add-ignore-errors later to maint).
+
+ * "git checkout $treeish $path", when $path in the index and the
+ working tree already matched what is in $treeish at the $path,
+ still overwrote the $path unnecessarily.
+ (merge c5326bd jk/checkout-from-tree later to maint).
+
+ * "git config --get-color" did not parse its command line arguments
+ carefully.
+ (merge cb35722 jk/colors-fix later to maint).
+
+ * open() emulated on Windows platforms did not give EISDIR upon
+ an attempt to open a directory for writing.
+ (merge ba6fad0 js/windows-open-eisdir-error later to maint).
+
+ * A few code paths used abs() when they should have used labs() on
+ long integers.
+ (merge 83915ba rs/maint-config-use-labs later to maint).
+ (merge 31a8aa1 rs/receive-pack-use-labs later to maint).
+
+ * "gitweb" used to depend on a behaviour recent CGI.pm deprecated.
+ (merge 13dbf46 jk/gitweb-with-newer-cgi-multi-param later to maint).
+
+ * "git init" (hence "git clone") initialized the per-repository
+ configuration file .git/config with x-bit by mistake.
+ (merge 1f32ecf mh/config-flip-xbit-back-after-checking later to maint).
+
+ * Recent update in Git 2.2 started creating objects/info/packs and
+ info/refs files with permission bits tighter than user's umask.
+ (merge d91175b jk/prune-packed-server-info later to maint).
+
+ * Git 2.0 was supposed to make the "simple" mode for the default of
+ "git push", but it didn't.
+ (merge 00a6fa0 jk/push-simple later to maint).
+
+ * "Everyday" document had a broken link.
+ (merge 366c8d4 po/everyday-doc later to maint).
+
+ * A few test fixes.
+ (merge 880ef58 jk/no-perl-tests later to maint).
+
+ * The build procedure did not bother fixing perl and python scripts
+ when NO_PERL and NO_PYTHON build-time configuration changed.
+ (merge ca2051d jk/rebuild-perl-scripts-with-no-perl-seting-change later to maint).
+
+ * The usage string of "git log" command was marked incorrectly for
+ l10n.
+ (merge e66dc0c km/log-usage-string-i18n later to maint).
+
+ * "git for-each-ref" mishandled --format="%(upstream:track)" when a
+ branch is marked to have forked from a non-existing branch.
+ (merge b6160d9 rc/for-each-ref-tracking later to maint).
diff --git a/Documentation/RelNotes/2.3.1.txt b/Documentation/RelNotes/2.3.1.txt
new file mode 100644
index 0000000..cf96186
--- /dev/null
+++ b/Documentation/RelNotes/2.3.1.txt
@@ -0,0 +1,52 @@
+Git v2.3.1 Release Notes
+========================
+
+Fixes since v2.3
+----------------
+
+ * The interactive "show a list and let the user choose from it"
+ interface "add -i" used showed and prompted to the user even when
+ the candidate list was empty, against which the only "choice" the
+ user could have made was to choose nothing.
+
+ * "git apply --whitespace=fix" used to under-allocate the memory
+ when the fix resulted in a longer text than the original patch.
+
+ * "git log --help" used to show rev-list options that are irrelevant
+ to the "log" command.
+
+ * The error message from "git commit", when a non-existing author
+ name was given as value to the "--author=" parameter, has been
+ reworded to avoid misunderstanding.
+
+ * A broken pack .idx file in the receiving repository prevented the
+ dumb http transport from fetching a good copy of it from the other
+ side.
+
+ * The documentation incorrectly said that C(opy) and R(ename) are the
+ only ones that can be followed by the score number in the output in
+ the --raw format.
+
+ * Fix a misspelled conditional that is always true.
+
+ * Code to read branch name from various files in .git/ directory
+ would have misbehaved if the code to write them left an empty file.
+
+ * The "git push" documentation made the "--repo=<there>" option
+ easily misunderstood.
+
+ * After attempting and failing a password-less authentication
+ (e.g. kerberos), libcURL refuses to fall back to password based
+ Basic authentication without a bit of help/encouragement.
+
+ * Setting diff.submodule to 'log' made "git format-patch" produce
+ broken patches.
+
+ * "git rerere" (invoked internally from many mergy operations) did
+ not correctly signal errors when told to update the working tree
+ files and failed to do so for whatever reason.
+
+ * "git blame HEAD -- missing" failed to correctly say "HEAD" when it
+ tried to say "No such path 'missing' in HEAD".
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.2.txt b/Documentation/RelNotes/2.3.2.txt
new file mode 100644
index 0000000..93462e4
--- /dev/null
+++ b/Documentation/RelNotes/2.3.2.txt
@@ -0,0 +1,79 @@
+Git v2.3.2 Release Notes
+========================
+
+Fixes since v2.3.1
+------------------
+
+ * "update-index --refresh" used to leak when an entry cannot be
+ refreshed for whatever reason.
+
+ * "git fast-import" used to crash when it could not close and
+ conclude the resulting packfile cleanly.
+
+ * "git blame" died, trying to free an uninitialized piece of memory.
+
+ * "git merge-file" did not work correctly in a subdirectory.
+
+ * "git submodule add" failed to squash "path/to/././submodule" to
+ "path/to/submodule".
+
+ * In v2.2.0, we broke "git prune" that runs in a repository that
+ borrows from an alternate object store.
+
+ * Certain older vintages of cURL give irregular output from
+ "curl-config --vernum", which confused our build system.
+
+ * An earlier workaround to squelch unhelpful deprecation warnings
+ from the compiler on Mac OSX unnecessarily set minimum required
+ version of the OS, which the user might want to raise (or lower)
+ for other reasons.
+
+ * Longstanding configuration variable naming rules has been added to
+ the documentation.
+
+ * The credential helper for Windows (in contrib/) used to mishandle
+ a user name with an at-sign in it.
+
+ * Older GnuPG implementations may not correctly import the keyring
+ material we prepare for the tests to use.
+
+ * Clarify in the documentation that "remote.<nick>.pushURL" and
+ "remote.<nick>.URL" are there to name the same repository accessed
+ via different transports, not two separate repositories.
+
+ * The pack bitmap support did not build with older versions of GCC.
+
+ * Reading configuration from a blob object, when it ends with a lone
+ CR, use to confuse the configuration parser.
+
+ * We didn't format an integer that wouldn't fit in "int" but in
+ "uintmax_t" correctly.
+
+ * "git push --signed" gave an incorrectly worded error message when
+ the other side did not support the capability.
+
+ * "git fetch" over a remote-helper that cannot respond to "list"
+ command could not fetch from a symbolic reference e.g. HEAD.
+
+ * The insn sheet "git rebase -i" creates did not fully honor
+ core.abbrev settings.
+
+ * The tests that wanted to see that file becomes unreadable after
+ running "chmod a-r file", and the tests that wanted to make sure it
+ is not run as root, we used "can we write into the / directory?" as
+ a cheap substitute, but on some platforms that is not a good
+ heuristics. The tests and their prerequisites have been updated to
+ check what they really require.
+
+ * The configuration variable 'mailinfo.scissors' was hard to
+ discover in the documentation.
+
+ * Correct a breakage to git-svn around v2.2 era that triggers
+ premature closing of FileHandle.
+
+ * Even though we officially haven't dropped Perl 5.8 support, the
+ Getopt::Long package that came with it does not support "--no-"
+ prefix to negate a boolean option; manually add support to help
+ people with older Getopt::Long package.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.3.txt b/Documentation/RelNotes/2.3.3.txt
new file mode 100644
index 0000000..5ef1264
--- /dev/null
+++ b/Documentation/RelNotes/2.3.3.txt
@@ -0,0 +1,39 @@
+Git v2.3.3 Release Notes
+========================
+
+Fixes since v2.3.2
+------------------
+
+ * A corrupt input to "git diff -M" used cause us to segfault.
+
+ * The borrowed code in kwset API did not follow our usual convention
+ to use "unsigned char" to store values that range from 0-255.
+
+ * Description given by "grep -h" for its --exclude-standard option
+ was phrased poorly.
+
+ * Documentaton for "git remote add" mentioned "--tags" and
+ "--no-tags" and it was not clear that fetch from the remote in
+ the future will use the default behaviour when neither is given
+ to override it.
+
+ * "git diff --shortstat --dirstat=changes" showed a dirstat based on
+ lines that was never asked by the end user in addition to the
+ dirstat that the user asked for.
+
+ * The interaction between "git submodule update" and the
+ submodule.*.update configuration was not clearly documented.
+
+ * "git apply" was not very careful about reading from, removing,
+ updating and creating paths outside the working tree (under
+ --index/--cached) or the current directory (when used as a
+ replacement for GNU patch).
+
+ * "git daemon" looked up the hostname even when "%CH" and "%IP"
+ interpolations are not requested, which was unnecessary.
+
+ * The "interpolated-path" option of "git daemon" inserted any string
+ client declared on the "host=" capability request without checking.
+ Sanitize and limit %H and %CH to a saner and a valid DNS name.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.4.txt b/Documentation/RelNotes/2.3.4.txt
new file mode 100644
index 0000000..094c7b8
--- /dev/null
+++ b/Documentation/RelNotes/2.3.4.txt
@@ -0,0 +1,32 @@
+Git v2.3.4 Release Notes
+========================
+
+Fixes since v2.3.3
+------------------
+
+ * The 'color.status.unmerged' configuration was not described.
+
+ * "git log --decorate" did not reset colors correctly around the
+ branch names.
+
+ * "git -C '' subcmd" refused to work in the current directory, unlike
+ "cd ''" which silently behaves as a no-op.
+
+ * "git imap-send" learned to optionally talk with an IMAP server via
+ libcURL; because there is no other option when Git is built with
+ NO_OPENSSL option, use that codepath by default under such
+ configuration.
+
+ * A workaround for certain build of GPG that triggered false breakage
+ in a test has been added.
+
+ * "git rebase -i" recently started to include the number of
+ commits in the insn sheet to be processed, but on a platform
+ that prepends leading whitespaces to "wc -l" output, the numbers
+ are shown with extra whitespaces that aren't necessary.
+
+ * We did not parse username followed by literal IPv6 address in SSH
+ transport URLs, e.g. ssh://user@[2001:db8::1]:22/repo.git
+ correctly.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.5.txt b/Documentation/RelNotes/2.3.5.txt
new file mode 100644
index 0000000..5b309db
--- /dev/null
+++ b/Documentation/RelNotes/2.3.5.txt
@@ -0,0 +1,44 @@
+Git v2.3.5 Release Notes
+========================
+
+Fixes since v2.3.4
+------------------
+
+ * The prompt script (in contrib/) did not show the untracked sign
+ when working in a subdirectory without any untracked files.
+
+ * Even though "git grep --quiet" is run merely to ask for the exit
+ status, we spawned the pager regardless. Stop doing that.
+
+ * Recommend format-patch and send-email for those who want to submit
+ patches to this project.
+
+ * An failure early in the "git clone" that started creating the
+ working tree and repository could have resulted in some directories
+ and files left without getting cleaned up.
+
+ * "git fetch" that fetches a commit using the allow-tip-sha1-in-want
+ extension could have failed to fetch all the requested refs.
+
+ * The split-index mode introduced at v2.3.0-rc0~41 was broken in the
+ codepath to protect us against a broken reimplementation of Git
+ that writes an invalid index with duplicated index entries, etc.
+
+ * "git prune" used to largely ignore broken refs when deciding which
+ objects are still being used, which could spread an existing small
+ damage and make it a larger one.
+
+ * "git tag -h" used to show the "--column" and "--sort" options
+ that are about listing in a wrong section.
+
+ * The transfer.hiderefs support did not quite work for smart-http
+ transport.
+
+ * The code that reads from the ctags file in the completion script
+ (in contrib/) did not spell ${param/pattern/string} substitution
+ correctly, which happened to work with bash but not with zsh.
+
+ * The explanation on "rebase --preserve-merges", "pull --rebase=preserve",
+ and "push --force-with-lease" in the documentation was unclear.
+
+Also contains typofixes, documentation updates and trivial code clean-ups.
diff --git a/Documentation/RelNotes/2.3.6.txt b/Documentation/RelNotes/2.3.6.txt
new file mode 100644
index 0000000..432f770
--- /dev/null
+++ b/Documentation/RelNotes/2.3.6.txt
@@ -0,0 +1,13 @@
+Git v2.3.6 Release Notes
+========================
+
+Fixes since v2.3.5
+------------------
+
+ * "diff-highlight" (in contrib/) used to show byte-by-byte
+ differences, which meant that multi-byte characters can be chopped
+ in the middle. It learned to pay attention to character boundaries
+ (assuming the UTF-8 payload).
+
+Also contains typofixes, documentation updates and trivial code
+clean-ups.
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index fa71b5f..98fc4cc 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -57,7 +57,8 @@ change, the approach taken by the change, and if relevant how this
differs substantially from the prior version, are all good things
to have.
-Make sure that you have tests for the bug you are fixing.
+Make sure that you have tests for the bug you are fixing. See
+t/README for guidance.
When adding a new feature, make sure that you have new tests to show
the feature triggers the new behaviour when it should, and to show the
@@ -135,6 +136,11 @@ that is fine, but please mark it as such.
(4) Sending your patches.
+Learn to use format-patch and send-email if possible. These commands
+are optimized for the workflow of sending patches, avoiding many ways
+your existing e-mail client that is optimized for "multipart/*" mime
+type e-mails to corrupt and render your patches unusable.
+
People on the Git mailing list need to be able to read and
comment on the changes you are submitting. It is important for
a developer to be able to "quote" your changes, using standard
@@ -175,8 +181,11 @@ message starts, you can put a "From: " line to name that person.
You often want to add additional explanation about the patch,
other than the commit message itself. Place such "cover letter"
-material between the three dash lines and the diffstat. Git-notes
-can also be inserted using the `--notes` option.
+material between the three-dash line and the diffstat. For
+patches requiring multiple iterations of review and discussion,
+an explanation of changes between each iteration can be kept in
+Git-notes and inserted automatically following the three-dash
+line via `git format-patch --notes`.
Do not attach the patch as a MIME attachment, compressed or not.
Do not let your e-mail client send quoted-printable. Do not let
@@ -254,15 +263,15 @@ pretty simple: if you can certify the below:
person who certified (a), (b) or (c) and I have not modified
it.
- (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
+ (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
then you just add a line saying
- Signed-off-by: Random J Developer <random@developer.example.org>
+ Signed-off-by: Random J Developer <random@developer.example.org>
This line can be automatically added by Git if you run the git-commit
command with the -s option.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 9335ff2..1a8ddb4 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -14,7 +14,8 @@ the fully qualified variable name of the variable itself is the last
dot-separated segment and the section name is everything before the last
dot. The variable names are case-insensitive, allow only alphanumeric
characters and `-`, and must start with an alphabetic character. Some
-variables may appear multiple times.
+variables may appear multiple times; we say then that the variable is
+multivalued.
Syntax
~~~~~~
@@ -25,7 +26,7 @@ blank lines are ignored.
The file consists of sections and variables. A section begins with
the name of the section in square brackets and continues until the next
-section begins. Section names are not case sensitive. Only alphanumeric
+section begins. Section names are case-insensitive. Only alphanumeric
characters, `-` and `.` are allowed in section names. Each variable
must belong to some section, which means that there must be a section
header before the first setting of a variable.
@@ -40,8 +41,8 @@ in the section header, like in the example below:
--------
Subsection names are case sensitive and can contain any characters except
-newline (doublequote `"` and backslash have to be escaped as `\"` and `\\`,
-respectively). Section headers cannot span multiple
+newline (doublequote `"` and backslash can be included by escaping them
+as `\"` and `\\`, respectively). Section headers cannot span multiple
lines. Variables may belong directly to a section or to a given subsection.
You can have `[section]` if you have `[section "subsection"]`, but you
don't need to.
@@ -53,38 +54,27 @@ restrictions as section names.
All the other lines (and the remainder of the line after the section
header) are recognized as setting variables, in the form
-'name = value'. If there is no equal sign on the line, the entire line
-is taken as 'name' and the variable is recognized as boolean "true".
+'name = value' (or just 'name', which is a short-hand to say that
+the variable is the boolean "true").
The variable names are case-insensitive, allow only alphanumeric characters
-and `-`, and must start with an alphabetic character. There can be more
-than one value for a given variable; we say then that the variable is
-multivalued.
+and `-`, and must start with an alphabetic character.
-Leading and trailing whitespace in a variable value is discarded.
-Internal whitespace within a variable value is retained verbatim.
+A line that defines a value can be continued to the next line by
+ending it with a `\`; the backquote and the end-of-line are
+stripped. Leading whitespaces after 'name =', the remainder of the
+line after the first comment character '#' or ';', and trailing
+whitespaces of the line are discarded unless they are enclosed in
+double quotes. Internal whitespaces within the value are retained
+verbatim.
-The values following the equals sign in variable assign are all either
-a string, an integer, or a boolean. Boolean values may be given as yes/no,
-1/0, true/false or on/off. Case is not significant in boolean values, when
-converting value to the canonical form using '--bool' type specifier;
-'git config' will ensure that the output is "true" or "false".
-
-String values may be entirely or partially enclosed in double quotes.
-You need to enclose variable values in double quotes if you want to
-preserve leading or trailing whitespace, or if the variable value contains
-comment characters (i.e. it contains '#' or ';').
-Double quote `"` and backslash `\` characters in variable values must
-be escaped: use `\"` for `"` and `\\` for `\`.
+Inside double quotes, double quote `"` and backslash `\` characters
+must be escaped: use `\"` for `"` and `\\` for `\`.
The following escape sequences (beside `\"` and `\\`) are recognized:
`\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB)
and `\b` for backspace (BS). Other char escape sequences (including octal
escape sequences) are invalid.
-Variable values ending in a `\` are continued on the next line in the
-customary UNIX fashion.
-
-Some variables may require a special value format.
Includes
~~~~~~~~
@@ -126,6 +116,61 @@ Example
path = foo ; expand "foo" relative to the current file
path = ~/foo ; expand "foo" in your $HOME directory
+
+Values
+~~~~~~
+
+Values of many variables are treated as a simple string, but there
+are variables that take values of specific types and there are rules
+as to how to spell them.
+
+boolean::
+
+ When a variable is said to take a boolean value, many
+ synonyms are accepted for 'true' and 'false'; these are all
+ case-insensitive.
+
+ true;; Boolean true can be spelled as `yes`, `on`, `true`,
+ or `1`. Also, a variable defined without `= <value>`
+ is taken as true.
+
+ false;; Boolean false can be spelled as `no`, `off`,
+ `false`, or `0`.
++
+When converting value to the canonical form using '--bool' type
+specifier; 'git config' will ensure that the output is "true" or
+"false" (spelled in lowercase).
+
+integer::
+ The value for many variables that specify various sizes can
+ be suffixed with `k`, `M`,... to mean "scale the number by
+ 1024", "by 1024x1024", etc.
+
+color::
+ The value for a variables that takes a color is a list of
+ colors (at most two) and attributes (at most one), separated
+ by spaces. The colors accepted are `normal`, `black`,
+ `red`, `green`, `yellow`, `blue`, `magenta`, `cyan` and
+ `white`; the attributes are `bold`, `dim`, `ul`, `blink` and
+ `reverse`. The first color given is the foreground; the
+ second is the background. The position of the attribute, if
+ any, doesn't matter. Attributes may be turned off
+ specifically by prefixing them with `no` (e.g., `noreverse`,
+ `noul`, etc).
++
+Colors (foreground and background) may also be given as numbers between
+0 and 255; these use ANSI 256-color mode (but note that not all
+terminals may support this). If your terminal supports it, you may also
+specify 24-bit RGB values as hex, like `#ff0ab3`.
++
+The attributes are meant to be reset at the beginning of each item
+in the colored output, so setting color.decorate.branch to `black`
+will paint that branch name in a plain `black`, even if the previous
+thing on the same output line (e.g. opening parenthesis before the
+list of branch names in `log --decorate` output) is set to be
+painted with `bold` or some other attribute.
+
+
Variables
~~~~~~~~~
@@ -375,14 +420,19 @@ This is useful for excluding servers inside a firewall from
proxy use, while defaulting to a common proxy for external domains.
core.ignoreStat::
- If true, commands which modify both the working tree and the index
- will mark the updated paths with the "assume unchanged" bit in the
- index. These marked files are then assumed to stay unchanged in the
- working tree, until you mark them otherwise manually - Git will not
- detect the file changes by lstat() calls. This is useful on systems
- where those are very slow, such as Microsoft Windows.
- See linkgit:git-update-index[1].
- False by default.
+ If true, Git will avoid using lstat() calls to detect if files have
+ changed by setting the "assume-unchanged" bit for those tracked files
+ which it has updated identically in both the index and working tree.
++
+When files are modified outside of Git, the user will need to stage
+the modified files explicitly (e.g. see 'Examples' section in
+linkgit:git-update-index[1]).
+Git will not normally detect changes to those files.
++
+This is useful on systems where lstat() calls are very slow, such as
+CIFS/Microsoft Windows.
++
+False by default.
core.preferSymlinkRefs::
Instead of the default "symref" format for HEAD
@@ -678,14 +728,13 @@ core.abbrev::
for abbreviated object names to stay unique for sufficiently long
time.
-add.ignore-errors::
add.ignoreErrors::
+add.ignore-errors (deprecated)::
Tells 'git add' to continue adding files when some files cannot be
added due to indexing errors. Equivalent to the '--ignore-errors'
- option of linkgit:git-add[1]. Older versions of Git accept only
- `add.ignore-errors`, which does not follow the usual naming
- convention for configuration variables. Newer versions of Git
- honor `add.ignoreErrors` as well.
+ option of linkgit:git-add[1]. `add.ignore-errors` is deprecated,
+ as it does not follow the usual naming convention for configuration
+ variables.
alias.*::
Command aliases for the linkgit:git[1] command wrapper - e.g.
@@ -842,18 +891,6 @@ color.branch.<slot>::
`remote` (a remote-tracking branch in refs/remotes/),
`upstream` (upstream tracking branch), `plain` (other
refs).
-+
-The value for these configuration variables is a list of colors (at most
-two) and attributes (at most one), separated by spaces. The colors
-accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`,
-`magenta`, `cyan` and `white`; the attributes are `bold`, `dim`, `ul`,
-`blink` and `reverse`. The first color given is the foreground; the
-second is the background. The position of the attribute, if any,
-doesn't matter.
-+
-Colors (foreground and background) may also be given as numbers between
-0 and 255; these use ANSI 256-color mode (but note that not all
-terminals may support this).
color.diff::
Whether to use ANSI escape sequences to add color to patches.
@@ -873,8 +910,7 @@ color.diff.<slot>::
of `plain` (context text), `meta` (metainformation), `frag`
(hunk header), 'func' (function in hunk header), `old` (removed lines),
`new` (added lines), `commit` (commit headers), or `whitespace`
- (highlighting whitespace errors). The values of these variables may be
- specified as in color.branch.<slot>.
+ (highlighting whitespace errors).
color.decorate.<slot>::
Use customized color for 'git log --decorate' output. `<slot>` is one
@@ -911,8 +947,6 @@ color.grep.<slot>::
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
@@ -925,8 +959,7 @@ color.interactive.<slot>::
Use customized color for 'git add --interactive' and 'git clean
--interactive' output. `<slot>` may be `prompt`, `header`, `help`
or `error`, for four distinct types of normal output from
- interactive commands. The values of these variables may be
- specified as in color.branch.<slot>.
+ interactive commands.
color.pager::
A boolean to enable/disable colored output when the pager is in
@@ -950,10 +983,10 @@ color.status.<slot>::
`added` or `updated` (files which are added but not committed),
`changed` (files which are changed but not added in the index),
`untracked` (files which are not tracked by Git),
- `branch` (the current branch), or
+ `branch` (the current branch),
`nobranch` (the color the 'no branch' warning is shown in, defaulting
- to red). The values of these variables may be specified as in
- color.branch.<slot>.
+ to red), or
+ `unmerged` (files which have unmerged changes).
color.ui::
This variable determines the default value for variables such
@@ -1733,6 +1766,13 @@ log.mailmap::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1] assume `--use-mailmap`.
+mailinfo.scissors::
+ If true, makes linkgit:git-mailinfo[1] (and therefore
+ linkgit:git-am[1]) act by default as if the --scissors option
+ was provided on the command-line. When active, this features
+ removes everything from the message body before a scissors
+ line (i.e. consisting mainly of ">8", "8<" and "-").
+
mailmap.file::
The location of an augmenting mailmap file. The default
mailmap, located in the root of the repository, is loaded
@@ -1953,7 +1993,7 @@ pack.useBitmaps::
true. You should not generally need to turn this off unless
you are debugging pack bitmaps.
-pack.writebitmaps::
+pack.writebitmaps (deprecated)::
This is a deprecated synonym for `repack.writeBitmaps`.
pack.writeBitmapHashCache::
@@ -2144,6 +2184,13 @@ receive.denyCurrentBranch::
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 "refuse".
++
+Another option is "updateInstead" which will update the working
+directory (must be clean) if pushing into the current branch. This option is
+intended for synchronizing working directories when one side is not easily
+accessible via interactive ssh (e.g. a live web site, hence the requirement
+that the working directory be clean). This mode also comes in handy when
+developing inside a VM to test and fix code on different Operating Systems.
receive.denyNonFastForwards::
If set to true, git-receive-pack will deny a ref update which is
@@ -2283,7 +2330,7 @@ sendemail.smtpencryption::
See linkgit:git-send-email[1] for description. Note that this
setting is not subject to the 'identity' mechanism.
-sendemail.smtpssl::
+sendemail.smtpssl (deprecated)::
Deprecated alias for 'sendemail.smtpencryption = ssl'.
sendemail.smtpsslcertpath::
@@ -2318,10 +2365,12 @@ sendemail.smtpserverport::
sendemail.smtpserveroption::
sendemail.smtpuser::
sendemail.thread::
+sendemail.transferencoding::
sendemail.validate::
+sendemail.xmailer::
See linkgit:git-send-email[1] for description.
-sendemail.signedoffcc::
+sendemail.signedoffcc (deprecated)::
Deprecated alias for 'sendemail.signedoffbycc'.
showbranch.default::
@@ -2386,12 +2435,16 @@ status.submodulesummary::
submodule.<name>.path::
submodule.<name>.url::
+ The path within this project and URL for a submodule. These
+ variables are initially populated by 'git submodule init'. See
+ linkgit:git-submodule[1] and linkgit:gitmodules[5] for
+ details.
+
submodule.<name>.update::
- The path within this project, URL, and the updating strategy
- for a submodule. These variables are initially populated
- by 'git submodule init'; edit them to override the
- URL and other values found in the `.gitmodules` file. See
- linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
+ The default update procedure for a submodule. This variable
+ is populated by `git submodule init` from the
+ linkgit:gitmodules[5] file. See description of 'update'
+ command in linkgit:git-submodule[1].
submodule.<name>.branch::
The remote branch name for a submodule, used by `git submodule
diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
index 15c7e79..85b0890 100644
--- a/Documentation/diff-format.txt
+++ b/Documentation/diff-format.txt
@@ -66,7 +66,8 @@ be committed)
Status letters C and R are always followed by a score (denoting the
percentage of similarity between the source and target of the move or
-copy), and are the only ones to be so.
+copy). Status letter M may be followed by a score (denoting the
+percentage of dissimilarity) for file rewrites.
<sha1> is shown as all 0's if a file is new on the filesystem
and it is out of sync with the index.
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 9631526..1c74907 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -8,7 +8,7 @@ git-add - Add file contents to the index
SYNOPSIS
--------
[verse]
-'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
+'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
[--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
[--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
[--] [<pathspec>...]
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index d4ef16c..0d8ba48 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -52,11 +52,23 @@ OPTIONS
-c::
--scissors::
Remove everything in body before a scissors line (see
- linkgit:git-mailinfo[1]).
+ linkgit:git-mailinfo[1]). Can be activated by default using
+ the `mailinfo.scissors` configuration variable.
--no-scissors::
Ignore scissors lines (see linkgit:git-mailinfo[1]).
+-m::
+--message-id::
+ Pass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]),
+ so that the Message-ID header is added to the commit message.
+ The `am.messageid` configuration variable can be used to specify
+ the default behaviour.
+
+--no-message-id::
+ Do not add the Message-ID header to the commit message.
+ `no-message-id` is useful to override `am.messageid`.
+
-q::
--quiet::
Be quiet. Only print error messages.
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index f605327..9489664 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -16,7 +16,7 @@ SYNOPSIS
[--ignore-space-change | --ignore-whitespace ]
[--whitespace=(nowarn|warn|fix|error|error-all)]
[--exclude=<path>] [--include=<path>] [--directory=<root>]
- [--verbose] [<patch>...]
+ [--verbose] [--unsafe-paths] [<patch>...]
DESCRIPTION
-----------
@@ -229,6 +229,16 @@ For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh`
can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by
running `git apply --directory=modules/git-gui`.
+--unsafe-paths::
+ By default, a patch that affects outside the working area
+ (either a Git controlled working tree, or the current working
+ directory when "git apply" is used as a replacement of GNU
+ patch) is rejected as a mistake (or a mischief).
++
+When `git apply` is used as a "better GNU patch", the user can pass
+the `--unsafe-paths` option to override this safety check. This option
+has no effect when `--index` or `--cached` is in use.
+
Configuration
-------------
diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt
index ee2e091..788a011 100644
--- a/Documentation/git-check-ignore.txt
+++ b/Documentation/git-check-ignore.txt
@@ -21,6 +21,9 @@ the exclude mechanism) that decides if the pathname is excluded or
included. Later patterns within a file take precedence over earlier
ones.
+By default, tracked files are not shown at all since they are not
+subject to exclude rules; but see `--no-index'.
+
OPTIONS
-------
-q, --quiet::
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 1c03c79..1147c71 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -131,7 +131,8 @@ effect to your index in a row.
--keep-redundant-commits::
If a commit being cherry picked duplicates a commit already in the
current history, it will become empty. By default these
- redundant commits are ignored. This option overrides that behavior and
+ redundant commits cause `cherry-pick` to stop so the user can
+ examine the commit. This option overrides that behavior and
creates an empty commit object. Implies `--allow-empty`.
--strategy=<strategy>::
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 94b6d19..641681f 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -34,8 +34,12 @@ OPTIONS
-f::
--force::
If the Git configuration variable clean.requireForce is not set
- to false, 'git clean' will refuse to run unless given -f, -n or
- -i.
+ to false, 'git clean' will refuse to delete files or directories
+ unless given -f, -n or -i. Git will refuse to delete directories
+ with .git sub directory or file unless a second -f
+ is given. This affects also git submodules where the storage area
+ of the removed submodule under .git/modules/ is not removed until
+ -f is given twice.
-i::
--interactive::
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 0363d00..f1f2a3f 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -12,7 +12,7 @@ SYNOPSIS
'git clone' [--template=<template_directory>]
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
[-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
- [--separate-git-dir <git dir>]
+ [--dissociate] [--separate-git-dir <git dir>]
[--depth <depth>] [--[no-]single-branch]
[--recursive | --recurse-submodules] [--] <repository>
[<directory>]
@@ -98,7 +98,14 @@ objects from the source repository into a pack in the cloned repository.
require fewer objects to be copied from the repository
being cloned, reducing network and local storage costs.
+
-*NOTE*: see the NOTE for the `--shared` option.
+*NOTE*: see the NOTE for the `--shared` option, and also the
+`--dissociate` option.
+
+--dissociate::
+ Borrow the objects from reference repositories specified
+ with the `--reference` options only to reduce network
+ transfer and stop borrowing from them after a clone is made
+ by making necessary local copies of borrowed objects.
--quiet::
-q::
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index f71fb01..690fed3 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -507,10 +507,6 @@ omitted when creating a new branch, the first `merge` commit will be
the first ancestor of the current commit, and the branch will start
out with no files. An unlimited number of `merge` commands per
commit are permitted by fast-import, thereby establishing an n-way merge.
-However Git's other tools never create commits with more than 15
-additional ancestors (forming a 16-way merge). For this reason
-it is suggested that frontends do not use more than 15 `merge`
-commands per commit; 16, if starting a new, empty branch.
Here `<commit-ish>` is any of the commit specification expressions
also accepted by `from` (see above).
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index c7c0d21..5d1e4c8 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -9,7 +9,7 @@ git-imap-send - Send a collection of patches from stdin to an IMAP folder
SYNOPSIS
--------
[verse]
-'git imap-send'
+'git imap-send' [-v] [-q] [--[no-]curl]
DESCRIPTION
@@ -26,6 +26,28 @@ Typical usage is something like:
git format-patch --signoff --stdout --attach origin | git imap-send
+OPTIONS
+-------
+
+-v::
+--verbose::
+ Be verbose.
+
+-q::
+--quiet::
+ Be quiet.
+
+--curl::
+ Use libcurl to communicate with the IMAP server, unless tunneling
+ into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
+ option set.
+
+--no-curl::
+ Talk to the IMAP server using git's own IMAP routines instead of
+ using libcurl. Ignored if Git was built with the NO_OPENSSL option
+ set.
+
+
CONFIGURATION
-------------
@@ -75,7 +97,9 @@ imap.preformattedHTML::
imap.authMethod::
Specify authenticate method for authentication with IMAP server.
- Current supported method is 'CRAM-MD5' only. If this is not set
+ If Git was built with the NO_CURL option, or if your curl version is older
+ than 7.34.0, or if you're running git-imap-send with the `--no-curl`
+ option, the only supported method is 'CRAM-MD5'. If this is not set
then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
Examples
diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt
index 164a3c6..0947084 100644
--- a/Documentation/git-mailinfo.txt
+++ b/Documentation/git-mailinfo.txt
@@ -66,6 +66,11 @@ conversion, even with this flag.
-n::
Disable all charset re-coding of the metadata.
+-m::
+--message-id::
+ Copy the Message-ID header at the end of the commit message. This
+ is useful in order to associate commits with mailing list discussions.
+
--scissors::
Remove everything in body before a scissors line. A line that
mainly consists of scissors (either ">8" or "8<") and perforation
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 310f0a5..851518d 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -9,10 +9,10 @@ SYNOPSIS
--------
[verse]
'git notes' [list [<object>]]
-'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' add [-f] [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
'git notes' copy [-f] ( --stdin | <from-object> <to-object> )
-'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
-'git notes' edit [<object>]
+'git notes' append [--allow-empty] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
+'git notes' edit [--allow-empty] [<object>]
'git notes' show [<object>]
'git notes' merge [-v | -q] [-s <strategy> ] <notes-ref>
'git notes' merge --commit [-v | -q]
@@ -155,6 +155,10 @@ OPTIONS
Like '-C', but with '-c' the editor is invoked, so that
the user can further edit the note message.
+--allow-empty::
+ Allow an empty note object to be stored. The default behavior is
+ to automatically remove empty notes.
+
--ref <ref>::
Manipulate the notes tree in <ref>. This overrides
'GIT_NOTES_REF' and the "core.notesRef" configuration. The ref
@@ -287,7 +291,7 @@ arbitrary files using 'git hash-object':
------------
$ cc *.c
$ blob=$(git hash-object -w a.out)
-$ git notes --ref=built add -C "$blob" HEAD
+$ git notes --ref=built add --allow-empty -C "$blob" HEAD
------------
(You cannot simply use `git notes --ref=built add -F a.out HEAD`
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index d2d8f47..c2f76fb 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -13,7 +13,7 @@ SYNOPSIS
[--no-reuse-delta] [--delta-base-offset] [--non-empty]
[--local] [--incremental] [--window=<n>] [--depth=<n>]
[--revs [--unpacked | --all]] [--stdout | base-name]
- [--keep-true-parents] < object-list
+ [--shallow] [--keep-true-parents] < object-list
DESCRIPTION
@@ -190,6 +190,11 @@ 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.
+--shallow::
+ Optimize a pack that will be provided to a client with a shallow
+ repository. This option, combined with \--thin, can result in a
+ smaller pack at the cost of speed.
+
--delta-base-offset::
A packed archive can express the base object of a delta as
either a 20-byte object name or as an offset in the
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 200eb22..4064452 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -111,9 +111,8 @@ include::merge-options.txt[]
was rebased since last fetched, the rebase uses that information
to avoid rebasing non-local changes.
+
-When preserve, also rebase the current branch on top of the upstream
-branch, but pass `--preserve-merges` along to `git rebase` so that
-locally created merge commits will not be flattened.
+When set to preserve, rebase with the `--preserve-merges` option passed
+to `git rebase` so that locally created merge commits will not be flattened.
+
When false, merge the current branch into the upstream branch.
+
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index b17283a..3593774 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -149,9 +149,8 @@ already exists on the remote side.
Usually, "git push" refuses to update a remote ref that is
not an ancestor of the local ref used to overwrite it.
+
-This option bypasses the check, but instead requires that the
-current value of the ref to be the expected value. "git push"
-fails otherwise.
+This option overrides this restriction if the current value of the
+remote ref is the expected value. "git push" fails otherwise.
+
Imagine that you have to rebase what you have already published.
You will have to bypass the "must fast-forward" rule in order to
@@ -163,15 +162,14 @@ commit, and blindly pushing with `--force` will lose her work.
This option allows you to say that you expect the history you are
updating is what you rebased and want to replace. If the remote ref
still points at the commit you specified, you can be sure that no
-other people did anything to the ref (it is like taking a "lease" on
-the ref without explicitly locking it, and you update the ref while
-making sure that your earlier "lease" is still valid).
+other people did anything to the ref. It is like taking a "lease" on
+the ref without explicitly locking it, and the remote ref is updated
+only if the "lease" is still valid.
+
`--force-with-lease` alone, without specifying the details, will protect
all remote refs that are going to be updated by requiring their
current value to be the same as the remote-tracking branch we have
-for them, unless specified with a `--force-with-lease=<refname>:<expect>`
-option that explicitly states what the expected value is.
+for them.
+
`--force-with-lease=<refname>`, without specifying the expected value, will
protect the named ref (alone), if it is going to be updated, by
@@ -214,22 +212,8 @@ origin +master` to force a push to the `master` branch). See the
`<refspec>...` section above for details.
--repo=<repository>::
- This option is only relevant if no <repository> argument is
- passed in the invocation. In this case, 'git push' derives the
- remote name from the current branch: If it tracks a remote
- branch, then that remote repository is pushed to. Otherwise,
- 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
-+
---------------------------
-git push public #1
-git push --repo=public #2
---------------------------
-+
-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'.
+ This option is equivalent to the <repository> argument. If both
+ are specified, the command-line argument takes precedence.
-u::
--set-upstream::
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 924827d..c8ab48d 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -362,7 +362,9 @@ default is `--no-fork-point`, otherwise the default is `--fork-point`.
-p::
--preserve-merges::
- Instead of ignoring merges, try to recreate them.
+ Recreate merge commits instead of flattening the history by replaying
+ commits a merge commit introduces. Merge conflict resolutions or manual
+ amendments to merge commits are not preserved.
+
This uses the `--interactive` machinery internally, but combining it
with the `--interactive` option explicitly is generally not a good
diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt
index cb103c8..4c6d6de 100644
--- a/Documentation/git-remote.txt
+++ b/Documentation/git-remote.txt
@@ -58,6 +58,9 @@ remote repository.
With `--no-tags` option, `git fetch <name>` does not import tags from
the remote repository.
+
+By default, only tags on fetched branches are imported
+(see linkgit:git-fetch[1]).
++
With `-t <branch>` option, instead of the default glob
refspec for the remote to track all branches under
the `refs/remotes/<name>/` namespace, a refspec to track only `<branch>`
@@ -130,17 +133,25 @@ branches, adds to that list.
'set-url'::
-Changes URL remote points to. Sets first URL remote points to matching
+Changes URLs for the remote. Sets first URL for remote <name> that matches
regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If
-<oldurl> doesn't match any URL, error occurs and nothing is changed.
+<oldurl> doesn't match any URL, an 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 '--add', instead of changing existing URLs, new URL is added.
++
+With '--delete', instead of changing existing URLs, all URLs matching
+regex <url> are deleted for remote <name>. Trying to delete all
+non-push URLs is an error.
+
-With '--delete', instead of changing some URL, all URLs matching
-regex <url> are deleted. Trying to delete all non-push URLs is an
-error.
+Note that the push URL and the fetch URL, even though they can
+be set differently, must still refer to the same place. What you
+pushed to the push URL should be what you would see if you
+immediately fetched from the fetch URL. If you are trying to
+fetch from one place (e.g. your upstream) and push to another (e.g.
+your publishing repository), use two separate remotes.
+
'show'::
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index fd7f8b5..5b11922 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -46,7 +46,8 @@ SYNOPSIS
[ \--extended-regexp | -E ]
[ \--fixed-strings | -F ]
[ \--date=(local|relative|default|iso|iso-strict|rfc|short) ]
- [ [\--objects | \--objects-edge] [ \--unpacked ] ]
+ [ [ \--objects | \--objects-edge | \--objects-edge-aggressive ]
+ [ \--unpacked ] ]
[ \--pretty | \--header ]
[ \--bisect ]
[ \--bisect-vars ]
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index a60776e..f248a86 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -131,6 +131,21 @@ Note that no attempts whatsoever are made to validate the encoding.
Specify encoding of compose message. Default is the value of the
'sendemail.composeencoding'; if that is unspecified, UTF-8 is assumed.
+--transfer-encoding=(7bit|8bit|quoted-printable|base64)::
+ Specify the transfer encoding to be used to send the message over SMTP.
+ 7bit will fail upon encountering a non-ASCII message. quoted-printable
+ can be useful when the repository contains files that contain carriage
+ returns, but makes the raw patch email file (as saved from a MUA) much
+ harder to inspect manually. base64 is even more fool proof, but also
+ even more opaque. Default is the value of the 'sendemail.transferEncoding'
+ configuration value; if that is unspecified, git will use 8bit and not
+ add a Content-Transfer-Encoding header.
+
+--xmailer::
+--no-xmailer::
+ Add (or prevent adding) the "X-Mailer:" header. By default,
+ the header is added, but it can be turned off by setting the
+ `sendemail.xmailer` configuration variable to `false`.
Sending
~~~~~~~
@@ -199,10 +214,15 @@ must be used for each option.
Legacy alias for '--smtp-encryption ssl'.
--smtp-ssl-cert-path::
- Path to ca-certificates (either a directory or a single file).
- Set it to an empty string to disable certificate verification.
- Defaults to the value set to the 'sendemail.smtpsslcertpath'
- configuration variable, if set, or `/etc/ssl/certs` otherwise.
+ Path to a store of trusted CA certificates for SMTP SSL/TLS
+ certificate validation (either a directory that has been processed
+ by 'c_rehash', or a single file containing one or more PEM format
+ certificates concatenated together: see verify(1) -CAfile and
+ -CApath for more information on these). Set it to an empty string
+ to disable certificate verification. Defaults to the value of the
+ 'sendemail.smtpsslcertpath' configuration variable, if set, or the
+ backing SSL library's compiled-in default otherwise (which should
+ be the best choice on most platforms).
--smtp-user=<user>::
Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser';
diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index c87bfcb..6c6e989 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -10,6 +10,7 @@ SYNOPSIS
--------
[verse]
'git stripspace' [-s | --strip-comments] < input
+'git stripspace' [-c | --comment-lines] < input
DESCRIPTION
-----------
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 8e6af65..2c25916 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -154,27 +154,51 @@ If `--force` is specified, the submodule's work tree will be removed even if
it contains local modifications.
update::
- Update the registered submodules, i.e. clone missing submodules and
- checkout the commit specified in the index of the containing repository.
- This will make the submodules HEAD be detached unless `--rebase` or
- `--merge` is specified or the key `submodule.$name.update` is set to
- `rebase`, `merge` or `none`. `none` can be overridden by specifying
- `--checkout`. Setting the key `submodule.$name.update` to `!command`
- will cause `command` to be run. `command` can be any arbitrary shell
- command that takes a single argument, namely the sha1 to update to.
+
+--
+Update the registered submodules to match what the superproject
+expects by cloning missing submodules and updating the working tree of
+the submodules. The "updating" can be done in several ways depending
+on command line options and the value of `submodule.<name>.update`
+configuration variable. Supported update procedures are:
+
+ checkout;; the commit recorded in the superproject will be
+ checked out in the submodule on a detached HEAD. This is
+ done when `--checkout` option is given, or no option is
+ given, and `submodule.<name>.update` is unset, or if it is
+ set to 'checkout'.
++
+If `--force` is specified, the submodule will be checked out (using
+`git checkout --force` if appropriate), even if the commit specified
+in the index of the containing repository already matches the commit
+checked out in the submodule.
+
+ rebase;; the current branch of the submodule will be rebased
+ onto the commit recorded in the superproject. This is done
+ when `--rebase` option is given, or no option is given, and
+ `submodule.<name>.update` is set to 'rebase'.
+
+ merge;; the commit recorded in the superproject will be merged
+ into the current branch in the submodule. This is done
+ when `--merge` option is given, or no option is given, and
+ `submodule.<name>.update` is set to 'merge'.
+
+ custom command;; arbitrary shell command that takes a single
+ argument (the sha1 of the commit recorded in the
+ superproject) is executed. This is done when no option is
+ given, and `submodule.<name>.update` has the form of
+ '!command'.
+
+When no option is given and `submodule.<name>.update` is set to 'none',
+the submodule is not updated.
+
If the submodule is not yet initialized, and you just want to use the
setting as stored in .gitmodules, you can automatically initialize the
submodule with the `--init` option.
-+
+
If `--recursive` is specified, this command will recurse into the
registered submodules, and update any nested submodules within.
-+
-If `--force` is specified, the submodule will be checked out (using
-`git checkout --force` if appropriate), even if the commit specified in the
-index of the containing repository already matches the commit checked out in
-the submodule.
-
+--
summary::
Show commit summary between the given commit (defaults to HEAD) and
working tree/index. For a submodule in question, a series of commits
@@ -238,10 +262,12 @@ OPTIONS
When running add, allow adding an otherwise ignored submodule path.
When running deinit the submodule work trees will be removed even if
they contain local changes.
- When running update, throw away local changes in submodules when
- switching to a different commit; and always run a checkout operation
- in the submodule, even if the commit listed in the index of the
- containing repository matches the commit checked out in the submodule.
+ When running update (only effective with the checkout procedure),
+ throw away local changes in submodules when switching to a
+ different commit; and always run a checkout operation in the
+ submodule, even if the commit listed in the index of the
+ containing repository matches the commit checked out in the
+ submodule.
--cached::
This option is only valid for status and summary commands. These
@@ -302,7 +328,7 @@ the submodule itself.
Checkout the commit recorded in the superproject on a detached HEAD
in the submodule. This is the default behavior, the main use of
this option is to override `submodule.$name.update` when set to
- `merge`, `rebase` or `none`.
+ a value other than `checkout`.
If the key `submodule.$name.update` is either not explicitly set or
set to `checkout`, this option is implicit.
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 929869b..aff0179 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -82,20 +82,18 @@ OPTIONS
Set the execute permissions on the updated files.
--[no-]assume-unchanged::
- When these flags are specified, the object names recorded
- for the paths are not updated. Instead, these options
- set and unset the "assume unchanged" bit for the
- paths. When the "assume unchanged" bit is on, Git stops
- checking the working tree files for possible
- modifications, so you need to manually unset the bit to
- tell Git when you change the working tree file. This is
+ When this flag is specified, the object names recorded
+ for the paths are not updated. Instead, this option
+ sets/unsets the "assume unchanged" bit for the
+ paths. When the "assume unchanged" bit is on, the user
+ promises not to change the file and allows Git to assume
+ that the working tree file matches what is recorded in
+ the index. If you want to change the working tree file,
+ you need to unset the bit to tell Git. This is
sometimes helpful when working with a big project on a
filesystem that has very slow lstat(2) system call
(e.g. cifs).
+
-This option can be also used as a coarse file-level mechanism
-to ignore uncommitted changes in tracked files (akin to what
-`.gitignore` does for untracked files).
Git will fail (gracefully) in case it needs to modify this file
in the index e.g. when merging in a commit;
thus, in case the assumed-untracked file is changed upstream,
diff --git a/Documentation/git.txt b/Documentation/git.txt
index edceb50..085bc34 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,6 +43,17 @@ unreleased) version of Git, that is available from the 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
+* link:v2.3.6/git.html[documentation for release 2.3.6]
+
+* release notes for
+ link:RelNotes/2.3.6.txt[2.3.6],
+ link:RelNotes/2.3.5.txt[2.3.5],
+ link:RelNotes/2.3.4.txt[2.3.4],
+ link:RelNotes/2.3.3.txt[2.3.3],
+ link:RelNotes/2.3.2.txt[2.3.2],
+ link:RelNotes/2.3.1.txt[2.3.1],
+ link:RelNotes/2.3.0.txt[2.3].
+
* link:v2.2.2/git.html[documentation for release 2.2.2]
* release notes for
@@ -760,7 +771,8 @@ Git so take care if using Cogito etc.
'GIT_INDEX_VERSION'::
This environment variable allows the specification of an index
version for new repositories. It won't affect existing index
- files. By default index file version [23] is used.
+ files. By default index file version 2 or 3 is used. See
+ linkgit:git-update-index[1] for more information.
'GIT_OBJECT_DIRECTORY'::
If the object storage directory is specified via this
@@ -887,19 +899,21 @@ other
and the `core.editor` option in linkgit:git-config[1].
'GIT_SSH'::
- If this environment variable is set then 'git fetch'
- and 'git push' will use this command instead
- of 'ssh' when they need to connect to a remote system.
- The '$GIT_SSH' command will be given exactly two or
- four arguments: the 'username@host' (or just 'host')
- from the URL and the shell command to execute on that
- remote system, optionally preceded by '-p' (literally) and
- the 'port' from the URL when it specifies something other
- than the default SSH port.
+'GIT_SSH_COMMAND'::
+ If either of these environment variables is set then 'git fetch'
+ and 'git push' will use the specified command instead of 'ssh'
+ when they need to connect to a remote system.
+ The command will be given exactly two or four arguments: the
+ 'username@host' (or just 'host') from the URL and the shell
+ command to execute on that remote system, optionally preceded by
+ '-p' (literally) and the 'port' from the URL when it specifies
+ something other than the default SSH port.
+
-To pass options to the program that you want to list in GIT_SSH
-you will need to wrap the program and options into a shell script,
-then set GIT_SSH to refer to the shell script.
+`$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
+by the shell, which allows additional arguments to be included.
+`$GIT_SSH` on the other hand must be just the path to a program
+(which can be a wrapper shell script, if additional arguments are
+needed).
+
Usually it is easier to configure any desired options through your
personal `.ssh/config` file. Please consult your ssh documentation
@@ -912,6 +926,10 @@ for further details.
and read the password from its STDOUT. See also the 'core.askpass'
option in linkgit:git-config[1].
+'GIT_TERMINAL_PROMPT'::
+ If this environment variable is set to `0`, git will not prompt
+ on the terminal (e.g., when asking for HTTP authentication).
+
'GIT_CONFIG_NOSYSTEM'::
Whether to skip reading settings from the system-wide
`$(prefix)/etc/gitconfig` file. This environment variable can
@@ -1012,6 +1030,17 @@ GIT_ICASE_PATHSPECS::
variable when it is invoked as the top level command by the
end user, to be recorded in the body of the reflog.
+`GIT_REF_PARANOIA`::
+ If set to `1`, include broken or badly named refs when iterating
+ over lists of refs. In a normal, non-corrupted repository, this
+ does nothing. However, enabling it may help git to detect and
+ abort some operations in the presence of broken refs. Git sets
+ this variable automatically when performing destructive
+ operations like linkgit:git-prune[1]. You should not need to set
+ it yourself unless you want to be paranoid about making sure
+ an operation has touched every ref (e.g., because you are
+ cloning a repository to make a backup).
+
Discussion[[Discussion]]
------------------------
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 09e82c3..4fd0442 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -138,9 +138,6 @@ NOTES
The purpose of gitignore files is to ensure that certain files
not tracked by Git remain untracked.
-To ignore uncommitted changes in a file that is already tracked,
-use 'git update-index {litdd}assume-unchanged'.
-
To stop tracking a file that is currently tracked, use
'git rm --cached'.
@@ -203,7 +200,6 @@ everything within `foo/bar`):
SEE ALSO
--------
linkgit:git-rm[1],
-linkgit:git-update-index[1],
linkgit:gitrepository-layout[5],
linkgit:git-check-ignore[1]
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index f6c0dfd..ac70eca 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -38,18 +38,15 @@ submodule.<name>.url::
In addition, there are a number of optional keys:
submodule.<name>.update::
- Defines what to do when the submodule is updated by the superproject.
- If 'checkout' (the default), the new commit specified in the
- superproject will be checked out in the submodule on a detached HEAD.
- If 'rebase', the current branch of the submodule will be rebased onto
- the commit specified in the superproject. If 'merge', the commit
- specified in the superproject will be merged into the current branch
- in the submodule.
- If 'none', the submodule with name `$name` will not be updated
- by default.
-
- This config option is overridden if 'git submodule update' is given
- the '--merge', '--rebase' or '--checkout' options.
+ Defines the default update procedure for the named submodule,
+ i.e. how the submodule is updated by "git submodule update"
+ command in the superproject. This is only used by `git
+ submodule init` to initialize the configuration variable of
+ the same name. Allowed values here are 'checkout', 'rebase',
+ 'merge' or 'none'. See description of 'update' command in
+ linkgit:git-submodule[1] for their meaning. Note that the
+ '!command' form is intentionally ignored here for security
+ reasons.
submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.
diff --git a/Documentation/gitweb.conf.txt b/Documentation/gitweb.conf.txt
index ebe7a6c..b96ac72 100644
--- a/Documentation/gitweb.conf.txt
+++ b/Documentation/gitweb.conf.txt
@@ -482,7 +482,7 @@ project config. Per-repository configuration takes precedence over value
composed from `@git_base_url_list` elements and project name.
+
You can setup one single value (single entry/item in this list) at build
-time by setting the `GITWEB_BASE_URL` built-time configuration variable.
+time by setting the `GITWEB_BASE_URL` build-time configuration variable.
By default it is set to (), i.e. an empty list. This means that gitweb
would not try to create project URL (to fetch) from project name.
diff --git a/Documentation/howto/recover-corrupted-object-harder.txt b/Documentation/howto/recover-corrupted-object-harder.txt
index 23e685d..9c4cd09 100644
--- a/Documentation/howto/recover-corrupted-object-harder.txt
+++ b/Documentation/howto/recover-corrupted-object-harder.txt
@@ -240,3 +240,240 @@ But more importantly, git's hashing and checksumming noticed a problem
that easily could have gone undetected in another system. The result
still compiled, but would have caused an interesting bug (that would
have been blamed on some random commit).
+
+
+The adventure continues...
+--------------------------
+
+I ended up doing this again! Same entity, new hardware. The assumption
+at this point is that the old disk corrupted the packfile, and then the
+corruption was migrated to the new hardware (because it was done by
+rsync or similar, and no fsck was done at the time of migration).
+
+This time, the affected blob was over 20 megabytes, which was far too
+large to do a brute-force on. I followed the instructions above to
+create the `zlib` file. I then used the `inflate` program below to pull
+the corrupted data from that. Examining that output gave me a hint about
+where in the file the corruption was. But now I was working with the
+file itself, not the zlib contents. So knowing the sha1 of the object
+and the approximate area of the corruption, I used the `sha1-munge`
+program below to brute-force the correct byte.
+
+Here's the inflate program (it's essentially `gunzip` but without the
+`.gz` header processing):
+
+--------------------------
+#include <stdio.h>
+#include <string.h>
+#include <zlib.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+ /*
+ * oversized so we can read the whole buffer in;
+ * this could actually be switched to streaming
+ * to avoid any memory limitations
+ */
+ static unsigned char buf[25 * 1024 * 1024];
+ static unsigned char out[25 * 1024 * 1024];
+ int len;
+ z_stream z;
+ int ret;
+
+ len = read(0, buf, sizeof(buf));
+ memset(&z, 0, sizeof(z));
+ inflateInit(&z);
+
+ z.next_in = buf;
+ z.avail_in = len;
+ z.next_out = out;
+ z.avail_out = sizeof(out);
+
+ ret = inflate(&z, 0);
+ if (ret != Z_OK && ret != Z_STREAM_END)
+ fprintf(stderr, "initial inflate failed (%d)\n", ret);
+
+ fprintf(stderr, "outputting %lu bytes", z.total_out);
+ fwrite(out, 1, z.total_out, stdout);
+ return 0;
+}
+--------------------------
+
+And here is the `sha1-munge` program:
+
+--------------------------
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+#include <openssl/sha.h>
+#include <stdlib.h>
+
+/* eye candy */
+static int counter = 0;
+static void progress(int sig)
+{
+ fprintf(stderr, "\r%d", counter);
+ alarm(1);
+}
+
+static const signed char hexval_table[256] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 00-07 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 08-0f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 10-17 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 18-1f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 20-27 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 28-2f */
+ 0, 1, 2, 3, 4, 5, 6, 7, /* 30-37 */
+ 8, 9, -1, -1, -1, -1, -1, -1, /* 38-3f */
+ -1, 10, 11, 12, 13, 14, 15, -1, /* 40-47 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 48-4f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 50-57 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 58-5f */
+ -1, 10, 11, 12, 13, 14, 15, -1, /* 60-67 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 68-67 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 70-77 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 78-7f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 80-87 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 88-8f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 90-97 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 98-9f */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* a0-a7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* a8-af */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* b0-b7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* b8-bf */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* c0-c7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* c8-cf */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* d0-d7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* d8-df */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* e0-e7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* e8-ef */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* f0-f7 */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* f8-ff */
+};
+
+static inline unsigned int hexval(unsigned char c)
+{
+return hexval_table[c];
+}
+
+static int get_sha1_hex(const char *hex, unsigned char *sha1)
+{
+ int i;
+ for (i = 0; i < 20; i++) {
+ unsigned int val;
+ /*
+ * hex[1]=='\0' is caught when val is checked below,
+ * but if hex[0] is NUL we have to avoid reading
+ * past the end of the string:
+ */
+ if (!hex[0])
+ return -1;
+ val = (hexval(hex[0]) << 4) | hexval(hex[1]);
+ if (val & ~0xff)
+ return -1;
+ *sha1++ = val;
+ hex += 2;
+ }
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ /* oversized so we can read the whole buffer in */
+ static unsigned char buf[25 * 1024 * 1024];
+ char header[32];
+ int header_len;
+ unsigned char have[20], want[20];
+ int start, len;
+ SHA_CTX orig;
+ unsigned i, j;
+
+ if (!argv[1] || get_sha1_hex(argv[1], want)) {
+ fprintf(stderr, "usage: sha1-munge <sha1> [start] <file.in\n");
+ return 1;
+ }
+
+ if (argv[2])
+ start = atoi(argv[2]);
+ else
+ start = 0;
+
+ len = read(0, buf, sizeof(buf));
+ header_len = sprintf(header, "blob %d", len) + 1;
+ fprintf(stderr, "using header: %s\n", header);
+
+ /*
+ * We keep a running sha1 so that if you are munging
+ * near the end of the file, we do not have to re-sha1
+ * the unchanged earlier bytes
+ */
+ SHA1_Init(&orig);
+ SHA1_Update(&orig, header, header_len);
+ if (start)
+ SHA1_Update(&orig, buf, start);
+
+ signal(SIGALRM, progress);
+ alarm(1);
+
+ for (i = start; i < len; i++) {
+ unsigned char c;
+ SHA_CTX x;
+
+#if 0
+ /*
+ * deletion -- this would not actually work in practice,
+ * I think, because we've already committed to a
+ * particular size in the header. Ditto for addition
+ * below. In those cases, you'd have to do the whole
+ * sha1 from scratch, or possibly keep three running
+ * "orig" sha1 computations going.
+ */
+ memcpy(&x, &orig, sizeof(x));
+ SHA1_Update(&x, buf + i + 1, len - i - 1);
+ SHA1_Final(have, &x);
+ if (!memcmp(have, want, 20))
+ printf("i=%d, deletion\n", i);
+#endif
+
+ /*
+ * replacement -- note that this tries each of the 256
+ * possible bytes. If you suspect a single-bit flip,
+ * it would be much shorter to just try the 8
+ * bit-flipped variants.
+ */
+ c = buf[i];
+ for (j = 0; j <= 0xff; j++) {
+ buf[i] = j;
+
+ memcpy(&x, &orig, sizeof(x));
+ SHA1_Update(&x, buf + i, len - i);
+ SHA1_Final(have, &x);
+ if (!memcmp(have, want, 20))
+ printf("i=%d, j=%02x\n", i, j);
+ }
+ buf[i] = c;
+
+#if 0
+ /* addition */
+ for (j = 0; j <= 0xff; j++) {
+ unsigned char extra = j;
+ memcpy(&x, &orig, sizeof(x));
+ SHA1_Update(&x, &extra, 1);
+ SHA1_Update(&x, buf + i, len - i);
+ SHA1_Final(have, &x);
+ if (!memcmp(have, want, 20))
+ printf("i=%d, addition=%02x", i, j);
+ }
+#endif
+
+ SHA1_Update(&orig, buf + i, 1);
+ counter++;
+ }
+
+ alarm(0);
+ fprintf(stderr, "\r%d\n", counter);
+ return 0;
+}
+--------------------------
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index afccfdc..97ef2e8 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -172,11 +172,6 @@ explicitly.
Pretend as if all objects mentioned by reflogs are listed on the
command line as `<commit>`.
---indexed-objects::
- Pretend as if all trees and blobs used by the index are listed
- on the command line. Note that you probably want to use
- `--objects`, too.
-
--ignore-missing::
Upon seeing an invalid object name in the input, pretend as if
the bad input was not given.
@@ -644,6 +639,7 @@ Object Traversal
These options are mostly targeted for packing of Git repositories.
+ifdef::git-rev-list[]
--objects::
Print the object IDs of any object referenced by the listed
commits. `--objects foo ^bar` thus means ``send me
@@ -653,13 +649,24 @@ These options are mostly targeted for packing of Git repositories.
--objects-edge::
Similar to `--objects`, but also print the IDs of excluded
commits prefixed with a ``-'' character. This is used by
- linkgit:git-pack-objects[1] to build ``thin'' pack, which records
+ linkgit:git-pack-objects[1] to build a ``thin'' pack, which records
objects in deltified form based on objects contained in these
excluded commits to reduce network traffic.
+--objects-edge-aggressive::
+ Similar to `--objects-edge`, but it tries harder to find excluded
+ commits at the cost of increased time. This is used instead of
+ `--objects-edge` to build ``thin'' packs for shallow repositories.
+
+--indexed-objects::
+ Pretend as if all trees and blobs used by the index are listed
+ on the command line. Note that you probably want to use
+ `--objects`, too.
+
--unpacked::
Only useful with `--objects`; print the object IDs that are not
in packs.
+endif::git-rev-list[]
--no-walk[=(sorted|unsorted)]::
Only show the given commits, but do not traverse their ancestors.
diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt
index c1b42a4..e44426d 100644
--- a/Documentation/technical/api-credentials.txt
+++ b/Documentation/technical/api-credentials.txt
@@ -248,7 +248,10 @@ FORMAT` in linkgit:git-credential[7] for a detailed specification).
For a `get` operation, the helper should produce a list of attributes
on stdout in the same format. A helper is free to produce a subset, or
even no values at all if it has nothing useful to provide. Any provided
-attributes will overwrite those already known about by Git.
+attributes will overwrite those already known about by Git. If a helper
+outputs a `quit` attribute with a value of `true` or `1`, no further
+helpers will be consulted, nor will the user be prompted (if no
+credential has been provided, the operation will then fail).
For a `store` or `erase` operation, the helper's output is ignored.
If it fails to perform the requested operation, it may complain to
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index d51a657..c08402b 100644
--- a/Documentation/technical/api-string-list.txt
+++ b/Documentation/technical/api-string-list.txt
@@ -29,7 +29,7 @@ member (you need this if you add things later) and you should set the
`unsorted_string_list_has_string` and get it from the list using
`string_list_lookup` for sorted lists.
-. Can sort an unsorted list using `sort_string_list`.
+. Can sort an unsorted list using `string_list_sort`.
. Can remove duplicate items from a sorted list using
`string_list_remove_duplicates`.
@@ -146,7 +146,7 @@ write `string_list_insert(...)->util = ...;`.
ownership of a malloc()ed string to a `string_list` that has
`strdup_string` set.
-`sort_string_list`::
+`string_list_sort`::
Sort the list's entries by string value in `strcmp()` order.
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 1250b5c..35112e4 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -207,7 +207,7 @@ Git index format
in a separate file. This extension records the changes to be made on
top of that to produce the final index.
- The signature for this extension is { 'l', 'i, 'n', 'k' }.
+ The signature for this extension is { 'l', 'i', 'n', 'k' }.
The extension consists of:
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index f9f8f32..3baaa9d 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.2.2
+DEF_VER=v2.3.6
LF='
'
diff --git a/INSTALL b/INSTALL
index 6ec7a24..ffb071e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -108,18 +108,21 @@ Issues of note:
so you might need to install additional packages other than Perl
itself, e.g. Time::HiRes.
- - "openssl" library is used by git-imap-send to use IMAP over SSL.
- If you don't need it, use NO_OPENSSL.
+ - git-imap-send needs the OpenSSL library to talk IMAP over SSL if
+ you are using libcurl older than 7.34.0. Otherwise you can use
+ NO_OPENSSL without losing git-imap-send.
By default, git uses OpenSSL for SHA1 but it will use its own
library (inspired by Mozilla's) with either NO_OPENSSL or
BLK_SHA1. Also included is a version optimized for PowerPC
(PPC_SHA1).
- - "libcurl" library is used by git-http-fetch and git-fetch. You
- might also want the "curl" executable for debugging purposes.
- If you do not use http:// or https:// repositories, you do not
- have to have them (use NO_CURL).
+ - "libcurl" library is used by git-http-fetch, git-fetch, and, if
+ the curl version >= 7.34.0, for git-imap-send. You might also
+ want the "curl" executable for debugging purposes. If you do not
+ use http:// or https:// repositories, and do not want to put
+ patches into an IMAP mailbox, you do not have to have them
+ (use NO_CURL).
- "expat" library; git-http-push uses it for remote lock
management over DAV. Similar to "curl" above, this is optional
diff --git a/Makefile b/Makefile
index 7482a4d..20058f1 100644
--- a/Makefile
+++ b/Makefile
@@ -191,6 +191,10 @@ all::
# Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support
# the executable mode bit, but doesn't really do so.
#
+# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type
+# bits in mode values (e.g. z/OS defines I_SFMT to 0xFF000000 as opposed to the
+# usual 0xF000).
+#
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
#
# Define NO_UNIX_SOCKETS if your system does not offer unix sockets.
@@ -339,6 +343,11 @@ all::
# return NULL when it receives a bogus time_t.
#
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
+#
+# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.
+#
+# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to
+# cleanup the HMAC context with the older HMAC_cleanup function.
GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -995,6 +1004,9 @@ ifdef HAVE_ALLOCA_H
BASIC_CFLAGS += -DHAVE_ALLOCA_H
endif
+IMAP_SEND_BUILDDEPS =
+IMAP_SEND_LDFLAGS = $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
+
ifdef NO_CURL
BASIC_CFLAGS += -DNO_CURL
REMOTE_CURL_PRIMARY =
@@ -1023,12 +1035,21 @@ else
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
PROGRAM_OBJS += http-fetch.o
PROGRAMS += $(REMOTE_CURL_NAMES)
- curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
+ curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "070908"
ifndef NO_EXPAT
PROGRAM_OBJS += http-push.o
endif
endif
+ curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
+ ifeq "$(curl_check)" "072200"
+ USE_CURL_FOR_IMAP_SEND = YesPlease
+ endif
+ ifdef USE_CURL_FOR_IMAP_SEND
+ BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND
+ IMAP_SEND_BUILDDEPS = http.o
+ IMAP_SEND_LDFLAGS += $(CURL_LIBCURL)
+ endif
ifndef NO_EXPAT
ifdef EXPATDIR
BASIC_CFLAGS += -I$(EXPATDIR)/include
@@ -1059,6 +1080,9 @@ ifndef NO_OPENSSL
ifdef NEEDS_CRYPTO_WITH_SSL
OPENSSL_LIBSSL += -lcrypto
endif
+ ifdef NO_HMAC_CTX_CLEANUP
+ BASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP
+ endif
else
BASIC_CFLAGS += -DNO_OPENSSL
BLK_SHA1 = 1
@@ -1230,6 +1254,10 @@ endif
ifdef NO_TRUSTABLE_FILEMODE
BASIC_CFLAGS += -DNO_TRUSTABLE_FILEMODE
endif
+ifdef NEEDS_MODE_TRANSLATION
+ COMPAT_CFLAGS += -DNEEDS_MODE_TRANSLATION
+ COMPAT_OBJS += compat/stat.o
+endif
ifdef NO_IPV6
BASIC_CFLAGS += -DNO_IPV6
endif
@@ -1382,6 +1410,10 @@ ifdef HAVE_CLOCK_GETTIME
EXTLIBS += -lrt
endif
+ifdef HAVE_CLOCK_MONOTONIC
+ BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC
+endif
+
ifeq ($(TCLTK_PATH),)
NO_TCLTK = NoThanks
endif
@@ -1880,7 +1912,7 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX
gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \
-DGIT_LOCALE_PATH='"$(localedir_SQ)"'
-http-push.sp http.sp http-walker.sp remote-curl.sp: SPARSE_FLAGS += \
+http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \
-DCURL_DISABLE_TYPECHECK
ifdef NO_EXPAT
@@ -1901,9 +1933,9 @@ endif
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
-git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS)
+git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
- $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
+ $(LIBS) $(IMAP_SEND_LDFLAGS)
git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
diff --git a/RelNotes b/RelNotes
index c5fa3ef..d92e7b8 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.2.2.txt \ No newline at end of file
+Documentation/RelNotes/2.3.6.txt \ No newline at end of file
diff --git a/archive-zip.c b/archive-zip.c
index 4bde019..1a54e1b 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -120,7 +120,6 @@ static void *zlib_deflate_raw(void *data, unsigned long size,
void *buffer;
int result;
- memset(&stream, 0, sizeof(stream));
git_deflate_init_raw(&stream, compression_level);
maxsize = git_deflate_bound(&stream, size);
buffer = xmalloc(maxsize);
@@ -349,7 +348,6 @@ static int write_zip_entry(struct archiver_args *args,
size_t out_len;
unsigned char compressed[STREAM_BUFFER_SIZE * 2];
- memset(&zstream, 0, sizeof(zstream));
git_deflate_init_raw(&zstream, args->compression_level);
compressed_size = 0;
diff --git a/archive.c b/archive.c
index 94a9981..9e30246 100644
--- a/archive.c
+++ b/archive.c
@@ -157,18 +157,26 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
return write_entry(args, sha1, path.buf, path.len, mode);
}
+static int write_archive_entry_buf(const unsigned char *sha1, struct strbuf *base,
+ const char *filename, unsigned mode, int stage,
+ void *context)
+{
+ return write_archive_entry(sha1, base->buf, base->len,
+ filename, mode, stage, context);
+}
+
static void queue_directory(const unsigned char *sha1,
- const char *base, int baselen, const char *filename,
+ struct strbuf *base, const char *filename,
unsigned mode, int stage, struct archiver_context *c)
{
struct directory *d;
- d = xmallocz(sizeof(*d) + baselen + 1 + strlen(filename));
+ d = xmallocz(sizeof(*d) + base->len + 1 + strlen(filename));
d->up = c->bottom;
- d->baselen = baselen;
+ d->baselen = base->len;
d->mode = mode;
d->stage = stage;
c->bottom = d;
- d->len = sprintf(d->path, "%.*s%s/", baselen, base, filename);
+ d->len = sprintf(d->path, "%.*s%s/", (int)base->len, base->buf, filename);
hashcpy(d->sha1, sha1);
}
@@ -191,28 +199,28 @@ static int write_directory(struct archiver_context *c)
}
static int queue_or_write_archive_entry(const unsigned char *sha1,
- const char *base, int baselen, const char *filename,
+ struct strbuf *base, const char *filename,
unsigned mode, int stage, void *context)
{
struct archiver_context *c = context;
while (c->bottom &&
- !(baselen >= c->bottom->len &&
- !strncmp(base, c->bottom->path, c->bottom->len))) {
+ !(base->len >= c->bottom->len &&
+ !strncmp(base->buf, c->bottom->path, c->bottom->len))) {
struct directory *next = c->bottom->up;
free(c->bottom);
c->bottom = next;
}
if (S_ISDIR(mode)) {
- queue_directory(sha1, base, baselen, filename,
+ queue_directory(sha1, base, filename,
mode, stage, c);
return READ_TREE_RECURSIVE;
}
if (write_directory(c))
return -1;
- return write_archive_entry(sha1, base, baselen, filename, mode,
+ return write_archive_entry(sha1, base->buf, base->len, filename, mode,
stage, context);
}
@@ -260,7 +268,7 @@ int write_archive_entries(struct archiver_args *args,
err = read_tree_recursive(args->tree, "", 0, 0, &args->pathspec,
args->pathspec.has_wildcard ?
queue_or_write_archive_entry :
- write_archive_entry,
+ write_archive_entry_buf,
&context);
if (err == READ_TREE_RECURSIVE)
err = 0;
@@ -286,14 +294,14 @@ static const struct archiver *lookup_archiver(const char *name)
return NULL;
}
-static int reject_entry(const unsigned char *sha1, const char *base,
- int baselen, const char *filename, unsigned mode,
+static int reject_entry(const unsigned char *sha1, struct strbuf *base,
+ const char *filename, unsigned mode,
int stage, void *context)
{
int ret = -1;
if (S_ISDIR(mode)) {
struct strbuf sb = STRBUF_INIT;
- strbuf_addstr(&sb, base);
+ strbuf_addbuf(&sb, base);
strbuf_addstr(&sb, filename);
if (!match_pathspec(context, sb.buf, sb.len, 0, NULL, 1))
ret = READ_TREE_RECURSIVE;
diff --git a/bisect.c b/bisect.c
index df09cbc..8c6d843 100644
--- a/bisect.c
+++ b/bisect.c
@@ -777,7 +777,7 @@ static void check_merge_bases(int no_checkout)
int rev_nr;
struct commit **rev = get_bad_and_good_commits(&rev_nr);
- result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1, 0);
+ result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1);
for (; result; result = result->next) {
const unsigned char *mb = result->item->object.sha1;
diff --git a/builtin/apply.c b/builtin/apply.c
index 6696ea4..0ca687f 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -51,6 +51,7 @@ static int apply_verbosely;
static int allow_overlap;
static int no_add;
static int threeway;
+static int unsafe_paths;
static const char *fake_ancestor;
static int line_termination = '\n';
static unsigned int p_context = UINT_MAX;
@@ -657,11 +658,6 @@ static size_t diff_timestamp_len(const char *line, size_t len)
return line + len - end;
}
-static char *null_strdup(const char *s)
-{
- return s ? xstrdup(s) : NULL;
-}
-
static char *find_name_common(const char *line, const char *def,
int p_value, const char *end, int terminate)
{
@@ -684,10 +680,10 @@ static char *find_name_common(const char *line, const char *def,
start = line;
}
if (!start)
- return squash_slash(null_strdup(def));
+ return squash_slash(xstrdup_or_null(def));
len = line - start;
if (!len)
- return squash_slash(null_strdup(def));
+ return squash_slash(xstrdup_or_null(def));
/*
* Generally we prefer the shorter name, especially
@@ -909,7 +905,7 @@ static void parse_traditional_patch(const char *first, const char *second, struc
patch->old_name = name;
} else {
patch->old_name = name;
- patch->new_name = null_strdup(name);
+ patch->new_name = xstrdup_or_null(name);
}
}
if (!name)
@@ -998,7 +994,7 @@ static int gitdiff_delete(const char *line, struct patch *patch)
{
patch->is_delete = 1;
free(patch->old_name);
- patch->old_name = null_strdup(patch->def_name);
+ patch->old_name = xstrdup_or_null(patch->def_name);
return gitdiff_oldmode(line, patch);
}
@@ -1006,7 +1002,7 @@ static int gitdiff_newfile(const char *line, struct patch *patch)
{
patch->is_new = 1;
free(patch->new_name);
- patch->new_name = null_strdup(patch->def_name);
+ patch->new_name = xstrdup_or_null(patch->def_name);
return gitdiff_newmode(line, patch);
}
@@ -2235,6 +2231,12 @@ static void update_pre_post_images(struct image *preimage,
ctx++;
}
+ if (postlen
+ ? postlen < new - postimage->buf
+ : postimage->len < new - postimage->buf)
+ die("BUG: caller miscounted postlen: asked %d, orig = %d, used = %d",
+ (int)postlen, (int) postimage->len, (int)(new - postimage->buf));
+
/* Fix the length of the whole thing */
postimage->len = new - postimage->buf;
postimage->nr -= reduced;
@@ -2390,10 +2392,27 @@ static int match_fragment(struct image *img,
/*
* The hunk does not apply byte-by-byte, but the hash says
- * it might with whitespace fuzz. We haven't been asked to
+ * it might with whitespace fuzz. We weren't asked to
* ignore whitespace, we were asked to correct whitespace
* errors, so let's try matching after whitespace correction.
*
+ * While checking the preimage against the target, whitespace
+ * errors in both fixed, we count how large the corresponding
+ * postimage needs to be. The postimage prepared by
+ * apply_one_fragment() has whitespace errors fixed on added
+ * lines already, but the common lines were propagated as-is,
+ * which may become longer when their whitespace errors are
+ * fixed.
+ */
+
+ /* First count added lines in postimage */
+ postlen = 0;
+ for (i = 0; i < postimage->nr; i++) {
+ if (!(postimage->line[i].flag & LINE_COMMON))
+ postlen += postimage->line[i].len;
+ }
+
+ /*
* 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.
@@ -2401,7 +2420,6 @@ static int match_fragment(struct image *img,
strbuf_init(&fixed, preimage->len + 1);
orig = preimage->buf;
target = img->buf + try;
- postlen = 0;
for (i = 0; i < preimage_limit; i++) {
size_t oldlen = preimage->line[i].len;
size_t tgtlen = img->line[try_lno + i].len;
@@ -2429,7 +2447,10 @@ static int match_fragment(struct image *img,
match = (tgtfix.len == fixed.len - fixstart &&
!memcmp(tgtfix.buf, fixed.buf + fixstart,
fixed.len - fixstart));
- postlen += tgtfix.len;
+
+ /* Add the length if this is common with the postimage */
+ if (preimage->line[i].flag & LINE_COMMON)
+ postlen += tgtfix.len;
strbuf_release(&tgtfix);
if (!match)
@@ -3201,7 +3222,7 @@ static int load_patch_target(struct strbuf *buf,
const char *name,
unsigned expected_mode)
{
- if (cached) {
+ if (cached || check_index) {
if (read_file_or_gitlink(ce, buf))
return error(_("read of %s failed"), name);
} else if (name) {
@@ -3210,6 +3231,8 @@ static int load_patch_target(struct strbuf *buf,
return read_file_or_gitlink(ce, buf);
else
return SUBMODULE_PATCH_WITHOUT_INDEX;
+ } else if (has_symlink_leading_path(name, strlen(name))) {
+ return error(_("reading from '%s' beyond a symbolic link"), name);
} else {
if (read_old_data(st, name, buf))
return error(_("read of %s failed"), name);
@@ -3550,6 +3573,121 @@ static int check_to_create(const char *new_name, int ok_if_exists)
}
/*
+ * We need to keep track of how symlinks in the preimage are
+ * manipulated by the patches. A patch to add a/b/c where a/b
+ * is a symlink should not be allowed to affect the directory
+ * the symlink points at, but if the same patch removes a/b,
+ * it is perfectly fine, as the patch removes a/b to make room
+ * to create a directory a/b so that a/b/c can be created.
+ */
+static struct string_list symlink_changes;
+#define SYMLINK_GOES_AWAY 01
+#define SYMLINK_IN_RESULT 02
+
+static uintptr_t register_symlink_changes(const char *path, uintptr_t what)
+{
+ struct string_list_item *ent;
+
+ ent = string_list_lookup(&symlink_changes, path);
+ if (!ent) {
+ ent = string_list_insert(&symlink_changes, path);
+ ent->util = (void *)0;
+ }
+ ent->util = (void *)(what | ((uintptr_t)ent->util));
+ return (uintptr_t)ent->util;
+}
+
+static uintptr_t check_symlink_changes(const char *path)
+{
+ struct string_list_item *ent;
+
+ ent = string_list_lookup(&symlink_changes, path);
+ if (!ent)
+ return 0;
+ return (uintptr_t)ent->util;
+}
+
+static void prepare_symlink_changes(struct patch *patch)
+{
+ for ( ; patch; patch = patch->next) {
+ if ((patch->old_name && S_ISLNK(patch->old_mode)) &&
+ (patch->is_rename || patch->is_delete))
+ /* the symlink at patch->old_name is removed */
+ register_symlink_changes(patch->old_name, SYMLINK_GOES_AWAY);
+
+ if (patch->new_name && S_ISLNK(patch->new_mode))
+ /* the symlink at patch->new_name is created or remains */
+ register_symlink_changes(patch->new_name, SYMLINK_IN_RESULT);
+ }
+}
+
+static int path_is_beyond_symlink_1(struct strbuf *name)
+{
+ do {
+ unsigned int change;
+
+ while (--name->len && name->buf[name->len] != '/')
+ ; /* scan backwards */
+ if (!name->len)
+ break;
+ name->buf[name->len] = '\0';
+ change = check_symlink_changes(name->buf);
+ if (change & SYMLINK_IN_RESULT)
+ return 1;
+ if (change & SYMLINK_GOES_AWAY)
+ /*
+ * This cannot be "return 0", because we may
+ * see a new one created at a higher level.
+ */
+ continue;
+
+ /* otherwise, check the preimage */
+ if (check_index) {
+ struct cache_entry *ce;
+
+ ce = cache_file_exists(name->buf, name->len, ignore_case);
+ if (ce && S_ISLNK(ce->ce_mode))
+ return 1;
+ } else {
+ struct stat st;
+ if (!lstat(name->buf, &st) && S_ISLNK(st.st_mode))
+ return 1;
+ }
+ } while (1);
+ return 0;
+}
+
+static int path_is_beyond_symlink(const char *name_)
+{
+ int ret;
+ struct strbuf name = STRBUF_INIT;
+
+ assert(*name_ != '\0');
+ strbuf_addstr(&name, name_);
+ ret = path_is_beyond_symlink_1(&name);
+ strbuf_release(&name);
+
+ return ret;
+}
+
+static void die_on_unsafe_path(struct patch *patch)
+{
+ const char *old_name = NULL;
+ const char *new_name = NULL;
+ if (patch->is_delete)
+ old_name = patch->old_name;
+ else if (!patch->is_new && !patch->is_copy)
+ old_name = patch->old_name;
+ if (!patch->is_delete)
+ new_name = patch->new_name;
+
+ if (old_name && !verify_path(old_name))
+ die(_("invalid path '%s'"), old_name);
+ if (new_name && !verify_path(new_name))
+ die(_("invalid path '%s'"), new_name);
+}
+
+/*
* Check and apply the patch in-core; leave the result in patch->result
* for the caller to write it out to the final destination.
*/
@@ -3636,6 +3774,22 @@ static int check_patch(struct patch *patch)
}
}
+ if (!unsafe_paths)
+ die_on_unsafe_path(patch);
+
+ /*
+ * An attempt to read from or delete a path that is beyond a
+ * symbolic link will be prevented by load_patch_target() that
+ * is called at the beginning of apply_data() so we do not
+ * have to worry about a patch marked with "is_delete" bit
+ * here. We however need to make sure that the patch result
+ * is not deposited to a path that is beyond a symbolic link
+ * here.
+ */
+ if (!patch->is_delete && path_is_beyond_symlink(patch->new_name))
+ return error(_("affected file '%s' is beyond a symbolic link"),
+ patch->new_name);
+
if (apply_data(patch, &st, ce) < 0)
return error(_("%s: patch does not apply"), name);
patch->rejected = 0;
@@ -3646,6 +3800,7 @@ static int check_patch_list(struct patch *patch)
{
int err = 0;
+ prepare_symlink_changes(patch);
prepare_fn_table(patch);
while (patch) {
if (apply_verbosely)
@@ -3728,7 +3883,7 @@ static void build_fake_ancestor(struct patch *list, const char *filename)
if (!preimage_sha1_in_gitlink_patch(patch, sha1))
; /* ok, the textual part looks sane */
else
- die("sha1 information is lacking or useless for submoule %s",
+ die("sha1 information is lacking or useless for submodule %s",
name);
} else if (!get_sha1_blob(patch->old_sha1_prefix, sha1)) {
; /* ok */
@@ -4180,7 +4335,7 @@ static int write_out_results(struct patch *list)
if (cpath.nr) {
struct string_list_item *item;
- sort_string_list(&cpath);
+ string_list_sort(&cpath);
for_each_string_list_item(item, &cpath)
fprintf(stderr, "U %s\n", item->string);
string_list_clear(&cpath, 0);
@@ -4384,6 +4539,8 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
N_("make sure the patch is applicable to the current index")),
OPT_BOOL(0, "cached", &cached,
N_("apply a patch without touching the working tree")),
+ OPT_BOOL(0, "unsafe-paths", &unsafe_paths,
+ N_("accept a patch that touches outside the working area")),
OPT_BOOL(0, "apply", &force_apply,
N_("also apply the patch (use with --stat/--summary/--check)")),
OPT_BOOL('3', "3way", &threeway,
@@ -4456,6 +4613,9 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
die(_("--cached outside a repository"));
check_index = 1;
}
+ if (check_index)
+ unsafe_paths = 0;
+
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
int fd;
diff --git a/builtin/blame.c b/builtin/blame.c
index 303e217..2b1f9dd 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2085,7 +2085,6 @@ static void find_alignment(struct scoreboard *sb, int *option)
for (e = sb->ent; e; e = e->next) {
struct origin *suspect = e->suspect;
- struct commit_info ci;
int num;
if (compute_auto_abbrev)
@@ -2096,6 +2095,7 @@ static void find_alignment(struct scoreboard *sb, int *option)
if (longest_file < num)
longest_file = num;
if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
+ struct commit_info ci;
suspect->commit->object.flags |= METAINFO_SHOWN;
get_commit_info(suspect->commit, &ci, 1);
if (*option & OUTPUT_SHOW_EMAIL)
@@ -2104,6 +2104,7 @@ static void find_alignment(struct scoreboard *sb, int *option)
num = utf8_strwidth(ci.author.buf);
if (longest_author < num)
longest_author = num;
+ commit_info_destroy(&ci);
}
num = e->s_lno + e->num_lines;
if (longest_src_lines < num)
@@ -2113,8 +2114,6 @@ static void find_alignment(struct scoreboard *sb, int *option)
longest_dst_lines = num;
if (largest_score < ent_score(sb, e))
largest_score = ent_score(sb, e);
-
- commit_info_destroy(&ci);
}
max_orig_digits = decimal_width(longest_src_lines);
max_digits = decimal_width(longest_dst_lines);
@@ -2390,7 +2389,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
return commit;
}
-static const char *prepare_final(struct scoreboard *sb)
+static char *prepare_final(struct scoreboard *sb)
{
int i;
const char *final_commit_name = NULL;
@@ -2415,10 +2414,10 @@ static const char *prepare_final(struct scoreboard *sb)
sb->final = (struct commit *) obj;
final_commit_name = revs->pending.objects[i].name;
}
- return final_commit_name;
+ return xstrdup_or_null(final_commit_name);
}
-static const char *prepare_initial(struct scoreboard *sb)
+static char *prepare_initial(struct scoreboard *sb)
{
int i;
const char *final_commit_name = NULL;
@@ -2445,7 +2444,7 @@ static const char *prepare_initial(struct scoreboard *sb)
}
if (!final_commit_name)
die("No commit to dig down to?");
- return final_commit_name;
+ return xstrdup(final_commit_name);
}
static int blame_copy_callback(const struct option *option, const char *arg, int unset)
@@ -2489,7 +2488,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
struct origin *o;
struct blame_entry *ent = NULL;
long dashdash_pos, lno;
- const char *final_commit_name = NULL;
+ char *final_commit_name = NULL;
enum object_type type;
static struct string_list range_list;
@@ -2786,6 +2785,8 @@ parse_done:
assign_blame(&sb, opt);
+ free(final_commit_name);
+
if (incremental)
return 0;
diff --git a/builtin/branch.c b/builtin/branch.c
index 3b79c50..dc6f0b2 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -800,7 +800,7 @@ static int edit_branch_description(const char *branch_name)
int cmd_branch(int argc, const char **argv, const char *prefix)
{
- int delete = 0, rename = 0, force_create = 0, list = 0;
+ int delete = 0, rename = 0, force = 0, list = 0;
int verbose = 0, abbrev = -1, detached = 0;
int reflog = 0, edit_description = 0;
int quiet = 0, unset_upstream = 0;
@@ -848,7 +848,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
OPT_BOOL(0, "edit-description", &edit_description,
N_("edit the description for the branch")),
- OPT__FORCE(&force_create, N_("force creation (when already exists)")),
+ OPT__FORCE(&force, N_("force creation, move/rename, deletion")),
{
OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref,
N_("commit"), N_("print only not merged branches"),
@@ -891,7 +891,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
if (with_commit || merge_filter != NO_FILTER)
list = 1;
- if (!!delete + !!rename + !!force_create + !!new_upstream +
+ if (!!delete + !!rename + !!new_upstream +
list + unset_upstream > 1)
usage_with_options(builtin_branch_usage, options);
@@ -904,6 +904,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
colopts = 0;
}
+ if (force) {
+ delete *= 2;
+ rename *= 2;
+ }
+
if (delete) {
if (!argc)
die(_("branch name required"));
@@ -1020,7 +1025,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
branch_existed = ref_exists(branch->refname);
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
- force_create, reflog, 0, quiet, track);
+ force, reflog, 0, quiet, track);
/*
* We only show the instructions if the user gave us
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index f8d8129..31b133b 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -4,12 +4,8 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
-#include "exec_cmd.h"
-#include "tag.h"
-#include "tree.h"
#include "builtin.h"
#include "parse-options.h"
-#include "diff.h"
#include "userdiff.h"
#include "streaming.h"
@@ -79,8 +75,6 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
if (type_from_string(exp_type) == OBJ_BLOB) {
unsigned char blob_sha1[20];
if (sha1_object_info(sha1, NULL) == OBJ_TAG) {
- enum object_type type;
- unsigned long size;
char *buffer = read_sha1_file(sha1, &type, &size);
const char *target;
if (!skip_prefix(buffer, "object ", &target) ||
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 383dccf..031780f 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -18,7 +18,7 @@ static char topath[4][TEMPORARY_FILENAME_LENGTH + 1];
static struct checkout state;
-static void write_tempfile_record(const char *name, int prefix_length)
+static void write_tempfile_record(const char *name, const char *prefix)
{
int i;
@@ -35,14 +35,14 @@ static void write_tempfile_record(const char *name, int prefix_length)
fputs(topath[checkout_stage], stdout);
putchar('\t');
- write_name_quoted(name + prefix_length, stdout, line_termination);
+ write_name_quoted_relative(name, prefix, stdout, line_termination);
for (i = 0; i < 4; i++) {
topath[i][0] = 0;
}
}
-static int checkout_file(const char *name, int prefix_length)
+static int checkout_file(const char *name, const char *prefix)
{
int namelen = strlen(name);
int pos = cache_name_pos(name, namelen);
@@ -71,7 +71,7 @@ static int checkout_file(const char *name, int prefix_length)
if (did_checkout) {
if (to_tempfile)
- write_tempfile_record(name, prefix_length);
+ write_tempfile_record(name, prefix);
return errs > 0 ? -1 : 0;
}
@@ -106,7 +106,7 @@ static void checkout_all(const char *prefix, int prefix_length)
if (last_ce && to_tempfile) {
if (ce_namelen(last_ce) != ce_namelen(ce)
|| memcmp(last_ce->name, ce->name, ce_namelen(ce)))
- write_tempfile_record(last_ce->name, prefix_length);
+ write_tempfile_record(last_ce->name, prefix);
}
if (checkout_entry(ce, &state,
to_tempfile ? topath[ce_stage(ce)] : NULL) < 0)
@@ -114,7 +114,7 @@ static void checkout_all(const char *prefix, int prefix_length)
last_ce = ce;
}
if (last_ce && to_tempfile)
- write_tempfile_record(last_ce->name, prefix_length);
+ write_tempfile_record(last_ce->name, prefix);
if (errs)
/* we have already done our error reporting.
* exit with the same code as die().
@@ -248,7 +248,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
if (read_from_stdin)
die("git checkout-index: don't mix '--stdin' and explicit filenames");
p = prefix_path(prefix, prefix_length, arg);
- checkout_file(p, prefix_length);
+ checkout_file(p, prefix);
if (p < arg || p > arg + strlen(arg))
free((char *)p);
}
@@ -268,7 +268,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
strbuf_swap(&buf, &nbuf);
}
p = prefix_path(prefix, prefix_length, buf.buf);
- checkout_file(p, prefix_length);
+ checkout_file(p, prefix);
if (p < buf.buf || p > buf.buf + buf.len)
free((char *)p);
}
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 5a78758..52d6cbb 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -62,7 +62,7 @@ static int post_checkout_hook(struct commit *old, struct commit *new,
}
-static int update_some(const unsigned char *sha1, const char *base, int baselen,
+static int update_some(const unsigned char *sha1, struct strbuf *base,
const char *pathname, unsigned mode, int stage, void *context)
{
int len;
@@ -72,11 +72,11 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
if (S_ISDIR(mode))
return READ_TREE_RECURSIVE;
- len = baselen + strlen(pathname);
+ len = base->len + strlen(pathname);
ce = xcalloc(1, cache_entry_size(len));
hashcpy(ce->sha1, sha1);
- memcpy(ce->name, base, baselen);
- memcpy(ce->name + baselen, pathname, len - baselen);
+ memcpy(ce->name, base->buf, base->len);
+ memcpy(ce->name + base->len, pathname, len - base->len);
ce->ce_flags = create_ce_flags(0) | CE_UPDATE;
ce->ce_namelen = len;
ce->ce_mode = create_ce_mode(mode);
diff --git a/builtin/clone.c b/builtin/clone.c
index d5e7532..2d77a2d 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -49,6 +49,7 @@ static int option_verbosity;
static int option_progress = -1;
static struct string_list option_config;
static struct string_list option_reference;
+static int option_dissociate;
static int opt_parse_reference(const struct option *opt, const char *arg, int unset)
{
@@ -94,6 +95,8 @@ static struct option builtin_clone_options[] = {
N_("create a shallow clone of that depth")),
OPT_BOOL(0, "single-branch", &option_single_branch,
N_("clone only one branch, HEAD or --branch")),
+ OPT_BOOL(0, "dissociate", &option_dissociate,
+ N_("use --reference only while cloning")),
OPT_STRING(0, "separate-git-dir", &real_git_dir, N_("gitdir"),
N_("separate git dir from working tree")),
OPT_STRING_LIST('c', "config", &option_config, N_("key=value"),
@@ -735,6 +738,16 @@ static void write_refspec_config(const char *src_ref_prefix,
strbuf_release(&value);
}
+static void dissociate_from_references(void)
+{
+ static const char* argv[] = { "repack", "-a", "-d", NULL };
+
+ if (run_command_v_opt(argv, RUN_GIT_CMD|RUN_COMMAND_NO_STDIN))
+ die(_("cannot repack to clean up"));
+ if (unlink(git_path("objects/info/alternates")) && errno != ENOENT)
+ die_errno(_("cannot unlink temporary alternates file"));
+}
+
int cmd_clone(int argc, const char **argv, const char *prefix)
{
int is_bundle = 0, is_local;
@@ -829,20 +842,21 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
git_dir = mkpathdup("%s/.git", dir);
}
+ atexit(remove_junk);
+ sigchain_push_common(remove_junk_on_signal);
+
if (!option_bare) {
- junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
die_errno(_("could not create leading directories of '%s'"),
work_tree);
if (!dest_exists && mkdir(work_tree, 0777))
- die_errno(_("could not create work tree dir '%s'."),
+ die_errno(_("could not create work tree dir '%s'"),
work_tree);
+ junk_work_tree = work_tree;
set_git_work_tree(work_tree);
}
- junk_git_dir = git_dir;
- atexit(remove_junk);
- sigchain_push_common(remove_junk_on_signal);
+ junk_git_dir = git_dir;
if (safe_create_leading_directories_const(git_dir) < 0)
die(_("could not create leading directories of '%s'"), git_dir);
@@ -880,6 +894,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (option_reference.nr)
setup_reference();
+ else if (option_dissociate) {
+ warning(_("--dissociate given, but there is no --reference"));
+ option_dissociate = 0;
+ }
fetch_pattern = value.buf;
refspec = parse_fetch_refspec(1, &fetch_pattern);
@@ -993,6 +1011,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
transport_unlock_pack(transport);
transport_disconnect(transport);
+ if (option_dissociate)
+ dissociate_from_references();
+
junk_mode = JUNK_LEAVE_REPO;
err = checkout();
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 8a66c74..25aa2cd 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -66,10 +66,8 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
continue;
}
- if (!memcmp(arg, "-S", 2)) {
- sign_commit = arg + 2;
+ if (skip_prefix(arg, "-S", &sign_commit))
continue;
- }
if (!strcmp(arg, "--no-gpg-sign")) {
sign_commit = NULL;
diff --git a/builtin/commit.c b/builtin/commit.c
index e108c53..714638c 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -522,6 +522,12 @@ static int is_a_merge(const struct commit *current_head)
return !!(current_head->parents && current_head->parents->next);
}
+static void assert_split_ident(struct ident_split *id, const struct strbuf *buf)
+{
+ if (split_ident_line(id, buf->buf, buf->len) || !id->date_begin)
+ die("BUG: unable to parse our own ident: %s", buf->buf);
+}
+
static void export_one(const char *var, const char *s, const char *e, int hack)
{
struct strbuf buf = STRBUF_INIT;
@@ -532,20 +538,6 @@ static void export_one(const char *var, const char *s, const char *e, int hack)
strbuf_release(&buf);
}
-static int sane_ident_split(struct ident_split *person)
-{
- if (!person->name_begin || !person->name_end ||
- person->name_begin == person->name_end)
- return 0; /* no human readable name */
- if (!person->mail_begin || !person->mail_end ||
- person->mail_begin == person->mail_end)
- return 0; /* no usable mail */
- if (!person->date_begin || !person->date_end ||
- !person->tz_begin || !person->tz_end)
- return 0;
- return 1;
-}
-
static int parse_force_date(const char *in, struct strbuf *out)
{
strbuf_addch(out, '@');
@@ -567,20 +559,14 @@ static void set_ident_var(char **buf, char *val)
*buf = val;
}
-static char *envdup(const char *var)
-{
- const char *val = getenv(var);
- return val ? xstrdup(val) : NULL;
-}
-
static void determine_author_info(struct strbuf *author_ident)
{
char *name, *email, *date;
struct ident_split author;
- name = envdup("GIT_AUTHOR_NAME");
- email = envdup("GIT_AUTHOR_EMAIL");
- date = envdup("GIT_AUTHOR_DATE");
+ name = xstrdup_or_null(getenv("GIT_AUTHOR_NAME"));
+ email = xstrdup_or_null(getenv("GIT_AUTHOR_EMAIL"));
+ date = xstrdup_or_null(getenv("GIT_AUTHOR_DATE"));
if (author_message) {
struct ident_split ident;
@@ -623,25 +609,15 @@ static void determine_author_info(struct strbuf *author_ident)
}
strbuf_addstr(author_ident, fmt_ident(name, email, date, IDENT_STRICT));
- if (!split_ident_line(&author, author_ident->buf, author_ident->len) &&
- sane_ident_split(&author)) {
- export_one("GIT_AUTHOR_NAME", author.name_begin, author.name_end, 0);
- export_one("GIT_AUTHOR_EMAIL", author.mail_begin, author.mail_end, 0);
- export_one("GIT_AUTHOR_DATE", author.date_begin, author.tz_end, '@');
- }
-
+ assert_split_ident(&author, author_ident);
+ export_one("GIT_AUTHOR_NAME", author.name_begin, author.name_end, 0);
+ export_one("GIT_AUTHOR_EMAIL", author.mail_begin, author.mail_end, 0);
+ export_one("GIT_AUTHOR_DATE", author.date_begin, author.tz_end, '@');
free(name);
free(email);
free(date);
}
-static void split_ident_or_die(struct ident_split *id, const struct strbuf *buf)
-{
- if (split_ident_line(id, buf->buf, buf->len) ||
- !sane_ident_split(id))
- die(_("Malformed ident string: '%s'"), buf->buf);
-}
-
static int author_date_is_interesting(void)
{
return author_message || force_date;
@@ -800,32 +776,8 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
if (clean_message_contents)
stripspace(&sb, 0);
- if (signoff) {
- /*
- * See if we have a Conflicts: block at the end. If yes, count
- * its size, so we can ignore it.
- */
- int ignore_footer = 0;
- int i, eol, previous = 0;
- const char *nl;
-
- for (i = 0; i < sb.len; i++) {
- nl = memchr(sb.buf + i, '\n', sb.len - i);
- if (nl)
- eol = nl - sb.buf;
- else
- eol = sb.len;
- if (starts_with(sb.buf + previous, "\nConflicts:\n")) {
- ignore_footer = sb.len - previous;
- break;
- }
- while (i < eol)
- i++;
- previous = eol;
- }
-
- append_signoff(&sb, ignore_footer, 0);
- }
+ if (signoff)
+ append_signoff(&sb, ignore_non_trailer(&sb), 0);
if (fwrite(sb.buf, 1, sb.len, s->fp) < sb.len)
die_errno(_("could not write commit template"));
@@ -880,8 +832,14 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
status_printf_ln(s, GIT_COLOR_NORMAL,
"%s", only_include_assumed);
- split_ident_or_die(&ai, author_ident);
- split_ident_or_die(&ci, &committer_ident);
+ /*
+ * These should never fail because they come from our own
+ * fmt_ident. They may fail the sane_ident test, but we know
+ * that the name and mail pointers will at least be valid,
+ * which is enough for our tests and printing here.
+ */
+ assert_split_ident(&ai, author_ident);
+ assert_split_ident(&ci, &committer_ident);
if (ident_cmp(&ai, &ci))
status_printf_ln(s, GIT_COLOR_NORMAL,
@@ -1092,7 +1050,7 @@ static const char *find_author_by_nickname(const char *name)
clear_mailmap(&mailmap);
return strbuf_detach(&buf, NULL);
}
- die(_("No existing author found with '%s'"), name);
+ die(_("--author '%s' is not 'Name <email>' and matches no existing author"), name);
}
diff --git a/builtin/config.c b/builtin/config.c
index fddafbb..15a7bea 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -565,8 +565,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
}
}
else if (actions == ACTION_EDIT) {
- const char *config_file = given_config_source.file ?
- given_config_source.file : git_path("config");
+ char *config_file;
+
check_argc(argc, 0, 0);
if (!given_config_source.file && nongit)
die("not in a git directory");
@@ -575,6 +575,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
if (given_config_source.blob)
die("editing blobs is not supported");
git_config(git_default_config, NULL);
+ config_file = xstrdup(given_config_source.file ?
+ given_config_source.file : git_path("config"));
if (use_global_config) {
int fd = open(config_file, O_CREAT | O_EXCL | O_WRONLY, 0666);
if (fd) {
@@ -587,6 +589,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
die_errno(_("cannot create configuration file %s"), config_file);
}
launch_editor(config_file, NULL, NULL);
+ free(config_file);
}
else if (actions == ACTION_SET) {
int ret;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 7b84d35..75a55e5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -11,7 +11,6 @@
#include "run-command.h"
#include "parse-options.h"
#include "sigchain.h"
-#include "transport.h"
#include "submodule.h"
#include "connected.h"
#include "argv-array.h"
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 37177c6..af7919e 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -216,8 +216,7 @@ static void add_branch_desc(struct strbuf *out, const char *name)
strbuf_addf(out, " : %.*s", (int)(ep - bp), bp);
bp = ep;
}
- if (out->buf[out->len - 1] != '\n')
- strbuf_addch(out, '\n');
+ strbuf_complete_line(out);
}
strbuf_release(&desc);
}
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 603a90e..008513c 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -178,11 +178,10 @@ static const char *find_next(const char *cp)
static int verify_format(const char *format)
{
const char *cp, *sp;
- static const char color_reset[] = "color:reset";
need_color_reset_at_eol = 0;
for (cp = format; *cp && (sp = find_next(cp)); ) {
- const char *ep = strchr(sp, ')');
+ const char *color, *ep = strchr(sp, ')');
int at;
if (!ep)
@@ -191,8 +190,8 @@ static int verify_format(const char *format)
at = parse_atom(sp + 2, ep);
cp = ep + 1;
- if (starts_with(used_atom[at], "color:"))
- need_color_reset_at_eol = !!strcmp(used_atom[at], color_reset);
+ if (skip_prefix(used_atom[at], "color:", &color))
+ need_color_reset_at_eol = !!strcmp(color, "reset");
}
return 0;
}
@@ -717,7 +716,10 @@ static void populate_value(struct refinfo *ref)
starts_with(name, "upstream")) {
char buf[40];
- stat_tracking_info(branch, &num_ours, &num_theirs);
+ if (stat_tracking_info(branch, &num_ours,
+ &num_theirs) != 1)
+ continue;
+
if (!num_ours && !num_theirs)
v->s = "";
else if (!num_ours) {
@@ -735,7 +737,11 @@ static void populate_value(struct refinfo *ref)
} else if (!strcmp(formatp, "trackshort") &&
starts_with(name, "upstream")) {
assert(branch);
- stat_tracking_info(branch, &num_ours, &num_theirs);
+
+ if (stat_tracking_info(branch, &num_ours,
+ &num_theirs) != 1)
+ continue;
+
if (!num_ours && !num_theirs)
v->s = "=";
else if (!num_ours)
@@ -1075,7 +1081,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
OPT_BIT(0 , "python", &quote_style,
N_("quote placeholders suitably for python"), QUOTE_PYTHON),
OPT_BIT(0 , "tcl", &quote_style,
- N_("quote placeholders suitably for tcl"), QUOTE_TCL),
+ N_("quote placeholders suitably for Tcl"), QUOTE_TCL),
OPT_GROUP(""),
OPT_INTEGER( 0 , "count", &maxcount, N_("show only <n> matched refs")),
diff --git a/builtin/grep.c b/builtin/grep.c
index 4063882..fe7b9fd 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -641,7 +641,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "untracked", &untracked,
N_("search in both tracked and untracked files")),
OPT_SET_INT(0, "exclude-standard", &opt_exclude,
- N_("search also in ignored files"), 1),
+ N_("ignore files specified via '.gitignore'"), 1),
OPT_GROUP(""),
OPT_BOOL('v', "invert-match", &opt.invert,
N_("show non-matching lines")),
@@ -885,7 +885,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
}
}
- if (!show_in_pager)
+ if (!show_in_pager && !opt.status_only)
setup_pager();
if (!use_index && (untracked || cached))
diff --git a/builtin/help.c b/builtin/help.c
index b3c818e..e78c135 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -321,16 +321,18 @@ static void setup_man_path(void)
{
struct strbuf new_path = STRBUF_INIT;
const char *old_path = getenv("MANPATH");
+ char *git_man_path = system_path(GIT_MAN_PATH);
/* We should always put ':' after our path. If there is no
* old_path, the ':' at the end will let 'man' to try
* system-wide paths after ours to find the manual page. If
* there is old_path, we need ':' as delimiter. */
- strbuf_addstr(&new_path, system_path(GIT_MAN_PATH));
+ strbuf_addstr(&new_path, git_man_path);
strbuf_addch(&new_path, ':');
if (old_path)
strbuf_addstr(&new_path, old_path);
+ free(git_man_path);
setenv("MANPATH", new_path.buf, 1);
strbuf_release(&new_path);
@@ -380,8 +382,10 @@ static void show_info_page(const char *git_cmd)
static void get_html_page_path(struct strbuf *page_path, const char *page)
{
struct stat st;
+ char *to_free = NULL;
+
if (!html_path)
- html_path = system_path(GIT_HTML_PATH);
+ html_path = to_free = system_path(GIT_HTML_PATH);
/* Check that we have a git documentation directory. */
if (!strstr(html_path, "://")) {
@@ -392,6 +396,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)
strbuf_init(page_path, 0);
strbuf_addf(page_path, "%s/%s.html", html_path, page);
+ free(to_free);
}
/*
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index a369f55..cf654df 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -447,7 +447,7 @@ static void *unpack_entry_data(unsigned long offset, unsigned long size,
if (type == OBJ_BLOB && size > big_file_threshold)
buf = fixed_buf;
else
- buf = xmalloc(size);
+ buf = xmallocz(size);
memset(&stream, 0, sizeof(stream));
git_inflate_init(&stream);
@@ -552,7 +552,7 @@ static void *unpack_data(struct object_entry *obj,
git_zstream stream;
int status;
- data = xmalloc(consume ? 64*1024 : obj->size);
+ data = xmallocz(consume ? 64*1024 : obj->size);
inbuf = xmalloc((len < 64*1024) ? len : 64*1024);
memset(&stream, 0, sizeof(stream));
@@ -1204,7 +1204,6 @@ static int write_compressed(struct sha1file *f, void *in, unsigned int size)
int status;
unsigned char outbuf[4096];
- memset(&stream, 0, sizeof(stream));
git_deflate_init(&stream, zlib_compression_level);
stream.next_in = in;
stream.avail_in = size;
diff --git a/builtin/init-db.c b/builtin/init-db.c
index aab44d2..9966522 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -119,15 +119,18 @@ static void copy_templates(const char *template_dir)
DIR *dir;
const char *git_dir = get_git_dir();
int len = strlen(git_dir);
+ char *to_free = NULL;
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])
+ template_dir = to_free = system_path(DEFAULT_GIT_TEMPLATE_DIR);
+ if (!template_dir[0]) {
+ free(to_free);
return;
+ }
template_len = strlen(template_dir);
if (PATH_MAX <= (template_len+strlen("/config")))
die(_("insanely long template path %s"), template_dir);
@@ -139,7 +142,7 @@ static void copy_templates(const char *template_dir)
dir = opendir(template_path);
if (!dir) {
warning(_("templates not found %s"), template_dir);
- return;
+ goto free_return;
}
/* Make sure that template is from the correct vintage */
@@ -155,8 +158,7 @@ static void copy_templates(const char *template_dir)
"a wrong format version %d from '%s'"),
repository_format_version,
template_dir);
- closedir(dir);
- return;
+ goto close_free_return;
}
memcpy(path, git_dir, len);
@@ -166,7 +168,10 @@ static void copy_templates(const char *template_dir)
copy_templates_1(path, len,
template_path, template_len,
dir);
+close_free_return:
closedir(dir);
+free_return:
+ free(to_free);
}
static int git_init_db_config(const char *k, const char *v, void *cb)
@@ -256,6 +261,8 @@ static int create_default_files(const char *template_path)
!lstat(path, &st2) &&
st1.st_mode != st2.st_mode &&
!chmod(path, st1.st_mode));
+ if (filemode && !reinit && (st1.st_mode & S_IXUSR))
+ filemode = 0;
}
git_config_set("core.filemode", filemode ? "true" : "false");
diff --git a/builtin/log.c b/builtin/log.c
index 734aab3..a131992 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -38,8 +38,8 @@ static const char *fmt_patch_subject_prefix = "PATCH";
static const char *fmt_pretty;
static const char * const builtin_log_usage[] = {
- N_("git log [<options>] [<revision range>] [[--] <path>...]\n")
- N_(" or: git show [options] <object>..."),
+ N_("git log [<options>] [<revision range>] [[--] <path>...]"),
+ N_("git show [options] <object>..."),
NULL
};
@@ -489,7 +489,7 @@ static int show_tag_object(const unsigned char *sha1, struct rev_info *rev)
}
static int show_tree_object(const unsigned char *sha1,
- const char *base, int baselen,
+ struct strbuf *base,
const char *pathname, unsigned mode, int stage, void *context)
{
printf("%s%s\n", pathname, S_ISDIR(mode) ? "/" : "");
@@ -705,7 +705,7 @@ static int git_format_config(const char *var, const char *value, void *cb)
return 0;
}
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff") ||
- !strcmp(var, "color.ui")) {
+ !strcmp(var, "color.ui") || !strcmp(var, "diff.submodule")) {
return 0;
}
if (!strcmp(var, "format.numbered")) {
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 99cee20..19063eb 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -354,49 +354,6 @@ void overlay_tree_on_cache(const char *tree_name, const char *prefix)
}
}
-int report_path_error(const char *ps_matched,
- const struct pathspec *pathspec,
- const char *prefix)
-{
- /*
- * Make sure all pathspec matched; otherwise it is an error.
- */
- struct strbuf sb = STRBUF_INIT;
- int num, errors = 0;
- for (num = 0; num < pathspec->nr; num++) {
- int other, found_dup;
-
- if (ps_matched[num])
- continue;
- /*
- * The caller might have fed identical pathspec
- * twice. Do not barf on such a mistake.
- * FIXME: parse_pathspec should have eliminated
- * duplicate pathspec.
- */
- for (found_dup = other = 0;
- !found_dup && other < pathspec->nr;
- other++) {
- if (other == num || !ps_matched[other])
- continue;
- if (!strcmp(pathspec->items[other].original,
- pathspec->items[num].original))
- /*
- * Ok, we have a match already.
- */
- found_dup = 1;
- }
- if (found_dup)
- continue;
-
- error("pathspec '%s' did not match any file(s) known to git.",
- pathspec->items[num].original);
- errors++;
- }
- strbuf_release(&sb);
- return errors;
-}
-
static const char * const ls_files_usage[] = {
N_("git ls-files [options] [<file>...]"),
NULL
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 51184df..3b04a0f 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -61,10 +61,11 @@ static int show_recursive(const char *base, int baselen, const char *pathname)
}
}
-static int show_tree(const unsigned char *sha1, const char *base, int baselen,
+static int show_tree(const unsigned char *sha1, struct strbuf *base,
const char *pathname, unsigned mode, int stage, void *context)
{
int retval = 0;
+ int baselen;
const char *type = blob_type;
if (S_ISGITLINK(mode)) {
@@ -79,7 +80,7 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
*/
type = commit_type;
} else if (S_ISDIR(mode)) {
- if (show_recursive(base, baselen, pathname)) {
+ if (show_recursive(base->buf, base->len, pathname)) {
retval = READ_TREE_RECURSIVE;
if (!(ls_options & LS_SHOW_TREES))
return retval;
@@ -89,10 +90,6 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
else if (ls_options & LS_TREE_ONLY)
return 0;
- if (chomp_prefix &&
- (baselen < chomp_prefix || memcmp(ls_tree_prefix, base, chomp_prefix)))
- return 0;
-
if (!(ls_options & LS_NAME_ONLY)) {
if (ls_options & LS_SHOW_SIZE) {
char size_text[24];
@@ -112,8 +109,12 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
printf("%06o %s %s\t", mode, type,
find_unique_abbrev(sha1, abbrev));
}
- write_name_quotedpfx(base + chomp_prefix, baselen - chomp_prefix,
- pathname, stdout, line_termination);
+ baselen = base->len;
+ strbuf_addstr(base, pathname);
+ write_name_quoted_relative(base->buf,
+ chomp_prefix ? ls_tree_prefix : NULL,
+ stdout, line_termination);
+ strbuf_setlen(base, baselen);
return retval;
}
@@ -173,7 +174,8 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
* cannot be lifted until it is converted to use
* match_pathspec() or tree_entry_interesting()
*/
- parse_pathspec(&pathspec, PATHSPEC_GLOB | PATHSPEC_ICASE,
+ parse_pathspec(&pathspec, PATHSPEC_GLOB | PATHSPEC_ICASE |
+ PATHSPEC_EXCLUDE,
PATHSPEC_PREFER_CWD,
prefix, argv + 1);
for (i = 0; i < pathspec.nr; i++)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 6a14d29..c8a47c1 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -15,6 +15,7 @@ static const char *metainfo_charset;
static struct strbuf line = STRBUF_INIT;
static struct strbuf name = STRBUF_INIT;
static struct strbuf email = STRBUF_INIT;
+static char *message_id;
static enum {
TE_DONTCARE, TE_QP, TE_BASE64
@@ -24,6 +25,7 @@ static struct strbuf charset = STRBUF_INIT;
static int patch_lines;
static struct strbuf **p_hdr_data, **s_hdr_data;
static int use_scissors;
+static int add_message_id;
static int use_inbody_headers = 1;
#define MAX_HDR_PARSED 10
@@ -198,6 +200,12 @@ static void handle_content_type(struct strbuf *line)
}
}
+static void handle_message_id(const struct strbuf *line)
+{
+ if (add_message_id)
+ message_id = strdup(line->buf);
+}
+
static void handle_content_transfer_encoding(const struct strbuf *line)
{
if (strcasestr(line->buf, "base64"))
@@ -342,6 +350,14 @@ static int check_header(const struct strbuf *line,
ret = 1;
goto check_header_out;
}
+ if (cmp_header(line, "Message-Id")) {
+ len = strlen("Message-Id: ");
+ strbuf_add(&sb, line->buf + len, line->len - len);
+ decode_header(&sb);
+ handle_message_id(&sb);
+ ret = 1;
+ goto check_header_out;
+ }
/* for inbody stuff */
if (starts_with(line->buf, ">From") && isspace(line->buf[5])) {
@@ -816,6 +832,8 @@ static int handle_commit_msg(struct strbuf *line)
}
if (patchbreak(line)) {
+ if (message_id)
+ fprintf(cmitmsg, "Message-Id: %s\n", message_id);
fclose(cmitmsg);
cmitmsg = NULL;
return 1;
@@ -1013,7 +1031,7 @@ static int git_mailinfo_config(const char *var, const char *value, void *unused)
}
static const char mailinfo_usage[] =
- "git mailinfo [-k|-b] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch < mail >info";
+ "git mailinfo [-k|-b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] msg patch < mail >info";
int cmd_mailinfo(int argc, const char **argv, const char *prefix)
{
@@ -1032,6 +1050,8 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix)
keep_subject = 1;
else if (!strcmp(argv[1], "-b"))
keep_non_patch_brackets_in_subject = 1;
+ else if (!strcmp(argv[1], "-m") || !strcmp(argv[1], "--message-id"))
+ add_message_id = 1;
else if (!strcmp(argv[1], "-u"))
metainfo_charset = def_charset;
else if (!strcmp(argv[1], "-n"))
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 0ecde8d..fdebef6 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -10,7 +10,7 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
{
struct commit_list *result;
- result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1, 0);
+ result = get_merge_bases_many_dirty(rev[0], rev_nr - 1, rev + 1);
if (!result)
return 1;
@@ -176,7 +176,7 @@ static int handle_fork_point(int argc, const char **argv)
for (i = 0; i < revs.nr; i++)
revs.commit[i]->object.flags &= ~TMP_MARK;
- bases = get_merge_bases_many(derived, revs.nr, revs.commit, 0);
+ bases = get_merge_bases_many_dirty(derived, revs.nr, revs.commit);
/*
* There should be one and only one merge base, when we found
diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 844f84f..232b768 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -90,7 +90,8 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
if (ret >= 0) {
const char *filename = argv[0];
- FILE *f = to_stdout ? stdout : fopen(filename, "wb");
+ const char *fpath = prefix_filename(prefix, prefixlen, argv[0]);
+ FILE *f = to_stdout ? stdout : fopen(fpath, "wb");
if (!f)
ret = error("Could not open %s for writing", filename);
diff --git a/builtin/merge.c b/builtin/merge.c
index bebbe5b..c638fd5 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -29,6 +29,7 @@
#include "remote.h"
#include "fmt-merge-msg.h"
#include "gpg-interface.h"
+#include "sequencer.h"
#define DEFAULT_TWOHEAD (1<<0)
#define DEFAULT_OCTOPUS (1<<1)
@@ -880,28 +881,20 @@ static int finish_automerge(struct commit *head,
return 0;
}
-static int suggest_conflicts(int renormalizing)
+static int suggest_conflicts(void)
{
const char *filename;
FILE *fp;
- int pos;
+ struct strbuf msgbuf = STRBUF_INIT;
filename = git_path("MERGE_MSG");
fp = fopen(filename, "a");
if (!fp)
die_errno(_("Could not open '%s' for writing"), filename);
- fprintf(fp, "\nConflicts:\n");
- for (pos = 0; pos < active_nr; pos++) {
- const struct cache_entry *ce = active_cache[pos];
-
- if (ce_stage(ce)) {
- fprintf(fp, "\t%s\n", ce->name);
- while (pos + 1 < active_nr &&
- !strcmp(ce->name,
- active_cache[pos + 1]->name))
- pos++;
- }
- }
+
+ append_conflicts_hint(&msgbuf);
+ fputs(msgbuf.buf, fp);
+ strbuf_release(&msgbuf);
fclose(fp);
rerere(allow_rerere_auto);
printf(_("Automatic merge failed; "
@@ -1320,7 +1313,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
if (!remoteheads)
; /* already up-to-date */
else if (!remoteheads->next)
- common = get_merge_bases(head_commit, remoteheads->item, 1);
+ common = get_merge_bases(head_commit, remoteheads->item);
else {
struct commit_list *list = remoteheads;
commit_list_insert(head_commit, &list);
@@ -1417,7 +1410,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* merge_bases again, otherwise "git merge HEAD^
* HEAD^^" would be missed.
*/
- common_one = get_merge_bases(head_commit, j->item, 1);
+ common_one = get_merge_bases(head_commit, j->item);
if (hashcmp(common_one->item->object.sha1,
j->item->object.sha1)) {
up_to_date = 0;
@@ -1550,7 +1543,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
fprintf(stderr, _("Automatic merge went well; "
"stopped before committing as requested\n"));
else
- ret = suggest_conflicts(option_renormalize);
+ ret = suggest_conflicts();
done:
free(branch_to_free);
diff --git a/builtin/notes.c b/builtin/notes.c
index 68b6cd8..a9f37d0 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -22,10 +22,10 @@
static const char * const git_notes_usage[] = {
N_("git notes [--ref <notes_ref>] [list [<object>]]"),
- N_("git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes_ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
N_("git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"),
- N_("git notes [--ref <notes_ref>] append [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
- N_("git notes [--ref <notes_ref>] edit [<object>]"),
+ N_("git notes [--ref <notes_ref>] append [--allow-empty] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
+ N_("git notes [--ref <notes_ref>] edit [--allow-empty] [<object>]"),
N_("git notes [--ref <notes_ref>] show [<object>]"),
N_("git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>"),
N_("git notes merge --commit [-v | -q]"),
@@ -92,12 +92,22 @@ static const char * const git_notes_get_ref_usage[] = {
static const char note_template[] =
"\nWrite/edit the notes for the following object:\n";
-struct msg_arg {
+struct note_data {
int given;
int use_editor;
+ char *edit_path;
struct strbuf buf;
};
+static void free_note_data(struct note_data *d)
+{
+ if (d->edit_path) {
+ unlink_or_warn(d->edit_path);
+ free(d->edit_path);
+ }
+ strbuf_release(&d->buf);
+}
+
static int list_each_note(const unsigned char *object_sha1,
const unsigned char *note_sha1, char *note_path,
void *cb_data)
@@ -106,7 +116,7 @@ static int list_each_note(const unsigned char *object_sha1,
return 0;
}
-static void write_note_data(int fd, const unsigned char *sha1)
+static void copy_obj_to_fd(int fd, const unsigned char *sha1)
{
unsigned long size;
enum object_type type;
@@ -149,26 +159,23 @@ static void write_commented_object(int fd, const unsigned char *object)
sha1_to_hex(object));
}
-static void create_note(const unsigned char *object, struct msg_arg *msg,
- int append_only, const unsigned char *prev,
- unsigned char *result)
+static void prepare_note_data(const unsigned char *object, struct note_data *d,
+ const unsigned char *old_note)
{
- char *path = NULL;
-
- if (msg->use_editor || !msg->given) {
+ if (d->use_editor || !d->given) {
int fd;
struct strbuf buf = STRBUF_INIT;
/* write the template message before editing: */
- path = git_pathdup("NOTES_EDITMSG");
- fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+ d->edit_path = git_pathdup("NOTES_EDITMSG");
+ fd = open(d->edit_path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)
- die_errno(_("could not create file '%s'"), path);
+ die_errno(_("could not create file '%s'"), d->edit_path);
- if (msg->given)
- write_or_die(fd, msg->buf.buf, msg->buf.len);
- else if (prev && !append_only)
- write_note_data(fd, prev);
+ if (d->given)
+ write_or_die(fd, d->buf.buf, d->buf.len);
+ else if (old_note)
+ copy_obj_to_fd(fd, old_note);
strbuf_addch(&buf, '\n');
strbuf_add_commented_lines(&buf, note_template, strlen(note_template));
@@ -179,94 +186,71 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
close(fd);
strbuf_release(&buf);
- strbuf_reset(&(msg->buf));
-
- if (launch_editor(path, &(msg->buf), NULL)) {
- die(_("Please supply the note contents using either -m" \
- " or -F option"));
- }
- stripspace(&(msg->buf), 1);
- }
-
- if (prev && append_only) {
- /* Append buf to previous note contents */
- unsigned long size;
- enum object_type type;
- char *prev_buf = read_sha1_file(prev, &type, &size);
+ strbuf_reset(&d->buf);
- strbuf_grow(&(msg->buf), size + 1);
- if (msg->buf.len && prev_buf && size)
- strbuf_insert(&(msg->buf), 0, "\n", 1);
- if (prev_buf && size)
- strbuf_insert(&(msg->buf), 0, prev_buf, size);
- free(prev_buf);
- }
-
- if (!msg->buf.len) {
- fprintf(stderr, _("Removing note for object %s\n"),
- sha1_to_hex(object));
- hashclr(result);
- } else {
- if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
- error(_("unable to write note object"));
- if (path)
- error(_("The note contents have been left in %s"),
- path);
- exit(128);
+ if (launch_editor(d->edit_path, &d->buf, NULL)) {
+ die(_("Please supply the note contents using either -m or -F option"));
}
+ stripspace(&d->buf, 1);
}
+}
- if (path) {
- unlink_or_warn(path);
- free(path);
+static void write_note_data(struct note_data *d, unsigned char *sha1)
+{
+ if (write_sha1_file(d->buf.buf, d->buf.len, blob_type, sha1)) {
+ error(_("unable to write note object"));
+ if (d->edit_path)
+ error(_("The note contents have been left in %s"),
+ d->edit_path);
+ exit(128);
}
}
static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
{
- struct msg_arg *msg = opt->value;
+ struct note_data *d = opt->value;
- strbuf_grow(&(msg->buf), strlen(arg) + 2);
- if (msg->buf.len)
- strbuf_addch(&(msg->buf), '\n');
- strbuf_addstr(&(msg->buf), arg);
- stripspace(&(msg->buf), 0);
+ strbuf_grow(&d->buf, strlen(arg) + 2);
+ if (d->buf.len)
+ strbuf_addch(&d->buf, '\n');
+ strbuf_addstr(&d->buf, arg);
+ stripspace(&d->buf, 0);
- msg->given = 1;
+ d->given = 1;
return 0;
}
static int parse_file_arg(const struct option *opt, const char *arg, int unset)
{
- struct msg_arg *msg = opt->value;
+ struct note_data *d = opt->value;
- if (msg->buf.len)
- strbuf_addch(&(msg->buf), '\n');
+ if (d->buf.len)
+ strbuf_addch(&d->buf, '\n');
if (!strcmp(arg, "-")) {
- if (strbuf_read(&(msg->buf), 0, 1024) < 0)
+ if (strbuf_read(&d->buf, 0, 1024) < 0)
die_errno(_("cannot read '%s'"), arg);
- } else if (strbuf_read_file(&(msg->buf), arg, 1024) < 0)
+ } else if (strbuf_read_file(&d->buf, arg, 1024) < 0)
die_errno(_("could not open or read '%s'"), arg);
- stripspace(&(msg->buf), 0);
+ stripspace(&d->buf, 0);
- msg->given = 1;
+ d->given = 1;
return 0;
}
static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
{
- struct msg_arg *msg = opt->value;
+ struct note_data *d = opt->value;
char *buf;
unsigned char object[20];
enum object_type type;
unsigned long len;
- if (msg->buf.len)
- strbuf_addch(&(msg->buf), '\n');
+ if (d->buf.len)
+ strbuf_addch(&d->buf, '\n');
if (get_sha1(arg, object))
die(_("Failed to resolve '%s' as a valid ref."), arg);
- if (!(buf = read_sha1_file(object, &type, &len)) || !len) {
+ if (!(buf = read_sha1_file(object, &type, &len))) {
free(buf);
die(_("Failed to read object '%s'."), arg);
}
@@ -274,17 +258,17 @@ static int parse_reuse_arg(const struct option *opt, const char *arg, int unset)
free(buf);
die(_("Cannot read note data from non-blob object '%s'."), arg);
}
- strbuf_add(&(msg->buf), buf, len);
+ strbuf_add(&d->buf, buf, len);
free(buf);
- msg->given = 1;
+ d->given = 1;
return 0;
}
static int parse_reedit_arg(const struct option *opt, const char *arg, int unset)
{
- struct msg_arg *msg = opt->value;
- msg->use_editor = 1;
+ struct note_data *d = opt->value;
+ d->use_editor = 1;
return parse_reuse_arg(opt, arg, unset);
}
@@ -397,26 +381,27 @@ static int append_edit(int argc, const char **argv, const char *prefix);
static int add(int argc, const char **argv, const char *prefix)
{
- int retval = 0, force = 0;
+ int force = 0, allow_empty = 0;
const char *object_ref;
struct notes_tree *t;
unsigned char object[20], new_note[20];
- char logmsg[100];
const unsigned char *note;
- struct msg_arg msg = { 0, 0, STRBUF_INIT };
+ struct note_data d = { 0, 0, NULL, STRBUF_INIT };
struct option options[] = {
- { OPTION_CALLBACK, 'm', "message", &msg, N_("message"),
+ { OPTION_CALLBACK, 'm', "message", &d, N_("message"),
N_("note contents as a string"), PARSE_OPT_NONEG,
parse_msg_arg},
- { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
+ { OPTION_CALLBACK, 'F', "file", &d, N_("file"),
N_("note contents in a file"), PARSE_OPT_NONEG,
parse_file_arg},
- { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
+ { OPTION_CALLBACK, 'c', "reedit-message", &d, N_("object"),
N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
parse_reedit_arg},
- { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
+ { OPTION_CALLBACK, 'C', "reuse-message", &d, N_("object"),
N_("reuse specified note object"), PARSE_OPT_NONEG,
parse_reuse_arg},
+ OPT_BOOL(0, "allow-empty", &allow_empty,
+ N_("allow storing empty note")),
OPT__FORCE(&force, N_("replace existing notes")),
OPT_END()
};
@@ -439,41 +424,44 @@ static int add(int argc, const char **argv, const char *prefix)
if (note) {
if (!force) {
- if (!msg.given) {
- /*
- * Redirect to "edit" subcommand.
- *
- * We only end up here if none of -m/-F/-c/-C
- * or -f are given. The original args are
- * therefore still in argv[0-1].
- */
- argv[0] = "edit";
- free_notes(t);
- return append_edit(argc, argv, prefix);
+ free_notes(t);
+ if (d.given) {
+ free_note_data(&d);
+ return error(_("Cannot add notes. "
+ "Found existing notes for object %s. "
+ "Use '-f' to overwrite existing notes"),
+ sha1_to_hex(object));
}
- retval = error(_("Cannot add notes. Found existing notes "
- "for object %s. Use '-f' to overwrite "
- "existing notes"), sha1_to_hex(object));
- goto out;
+ /*
+ * Redirect to "edit" subcommand.
+ *
+ * We only end up here if none of -m/-F/-c/-C or -f are
+ * given. The original args are therefore still in
+ * argv[0-1].
+ */
+ argv[0] = "edit";
+ return append_edit(argc, argv, prefix);
}
fprintf(stderr, _("Overwriting existing notes for object %s\n"),
sha1_to_hex(object));
}
- create_note(object, &msg, 0, note, new_note);
-
- if (is_null_sha1(new_note))
+ prepare_note_data(object, &d, note);
+ if (d.buf.len || allow_empty) {
+ write_note_data(&d, new_note);
+ if (add_note(t, object, new_note, combine_notes_overwrite))
+ die("BUG: combine_notes_overwrite failed");
+ commit_notes(t, "Notes added by 'git notes add'");
+ } else {
+ fprintf(stderr, _("Removing note for object %s\n"),
+ sha1_to_hex(object));
remove_note(t, object);
- else if (add_note(t, object, new_note, combine_notes_overwrite))
- die("BUG: combine_notes_overwrite failed");
+ commit_notes(t, "Notes removed by 'git notes add'");
+ }
- snprintf(logmsg, sizeof(logmsg), "Notes %s by 'git notes %s'",
- is_null_sha1(new_note) ? "removed" : "added", "add");
- commit_notes(t, logmsg);
-out:
+ free_note_data(&d);
free_notes(t);
- strbuf_release(&(msg.buf));
- return retval;
+ return 0;
}
static int copy(int argc, const char **argv, const char *prefix)
@@ -554,26 +542,29 @@ out:
static int append_edit(int argc, const char **argv, const char *prefix)
{
+ int allow_empty = 0;
const char *object_ref;
struct notes_tree *t;
unsigned char object[20], new_note[20];
const unsigned char *note;
char logmsg[100];
const char * const *usage;
- struct msg_arg msg = { 0, 0, STRBUF_INIT };
+ struct note_data d = { 0, 0, NULL, STRBUF_INIT };
struct option options[] = {
- { OPTION_CALLBACK, 'm', "message", &msg, N_("message"),
+ { OPTION_CALLBACK, 'm', "message", &d, N_("message"),
N_("note contents as a string"), PARSE_OPT_NONEG,
parse_msg_arg},
- { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
+ { OPTION_CALLBACK, 'F', "file", &d, N_("file"),
N_("note contents in a file"), PARSE_OPT_NONEG,
parse_file_arg},
- { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
+ { OPTION_CALLBACK, 'c', "reedit-message", &d, N_("object"),
N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
parse_reedit_arg},
- { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
+ { OPTION_CALLBACK, 'C', "reuse-message", &d, N_("object"),
N_("reuse specified note object"), PARSE_OPT_NONEG,
parse_reuse_arg},
+ OPT_BOOL(0, "allow-empty", &allow_empty,
+ N_("allow storing empty note")),
OPT_END()
};
int edit = !strcmp(argv[0], "edit");
@@ -587,7 +578,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
usage_with_options(usage, options);
}
- if (msg.given && edit)
+ if (d.given && edit)
fprintf(stderr, _("The -m/-F/-c/-C options have been deprecated "
"for the 'edit' subcommand.\n"
"Please use 'git notes add -f -m/-F/-c/-C' instead.\n"));
@@ -600,18 +591,39 @@ static int append_edit(int argc, const char **argv, const char *prefix)
t = init_notes_check(argv[0]);
note = get_note(t, object);
- create_note(object, &msg, !edit, note, new_note);
+ prepare_note_data(object, &d, edit ? note : NULL);
- if (is_null_sha1(new_note))
- remove_note(t, object);
- else if (add_note(t, object, new_note, combine_notes_overwrite))
- die("BUG: combine_notes_overwrite failed");
+ if (note && !edit) {
+ /* Append buf to previous note contents */
+ unsigned long size;
+ enum object_type type;
+ char *prev_buf = read_sha1_file(note, &type, &size);
+
+ strbuf_grow(&d.buf, size + 1);
+ if (d.buf.len && prev_buf && size)
+ strbuf_insert(&d.buf, 0, "\n", 1);
+ if (prev_buf && size)
+ strbuf_insert(&d.buf, 0, prev_buf, size);
+ free(prev_buf);
+ }
- snprintf(logmsg, sizeof(logmsg), "Notes %s by 'git notes %s'",
- is_null_sha1(new_note) ? "removed" : "added", argv[0]);
+ if (d.buf.len || allow_empty) {
+ write_note_data(&d, new_note);
+ if (add_note(t, object, new_note, combine_notes_overwrite))
+ die("BUG: combine_notes_overwrite failed");
+ snprintf(logmsg, sizeof(logmsg), "Notes added by 'git notes %s'",
+ argv[0]);
+ } else {
+ fprintf(stderr, _("Removing note for object %s\n"),
+ sha1_to_hex(object));
+ remove_note(t, object);
+ snprintf(logmsg, sizeof(logmsg), "Notes removed by 'git notes %s'",
+ argv[0]);
+ }
commit_notes(t, logmsg);
+
+ free_note_data(&d);
free_notes(t);
- strbuf_release(&(msg.buf));
return 0;
}
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 3f9f5c7..c3a7516 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -125,7 +125,6 @@ static unsigned long do_compress(void **pptr, unsigned long size)
void *in, *out;
unsigned long maxsize;
- memset(&stream, 0, sizeof(stream));
git_deflate_init(&stream, pack_compression_level);
maxsize = git_deflate_bound(&stream, size);
@@ -153,7 +152,6 @@ static unsigned long write_large_blob_data(struct git_istream *st, struct sha1fi
unsigned char obuf[1024 * 16];
unsigned long olen = 0;
- memset(&stream, 0, sizeof(stream));
git_deflate_init(&stream, pack_compression_level);
for (;;) {
@@ -2613,6 +2611,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
{
int use_internal_rev_list = 0;
int thin = 0;
+ int shallow = 0;
int all_progress_implied = 0;
struct argv_array rp = ARGV_ARRAY_INIT;
int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
@@ -2677,6 +2676,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
PARSE_OPT_OPTARG, option_parse_unpack_unreachable },
OPT_BOOL(0, "thin", &thin,
N_("create thin packs")),
+ OPT_BOOL(0, "shallow", &shallow,
+ N_("create packs suitable for shallow fetches")),
OPT_BOOL(0, "honor-pack-keep", &ignore_packed_keep,
N_("ignore packs that have companion .keep file")),
OPT_INTEGER(0, "compression", &pack_compression_level,
@@ -2711,7 +2712,9 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
argv_array_push(&rp, "pack-objects");
if (thin) {
use_internal_rev_list = 1;
- argv_array_push(&rp, "--objects-edge");
+ argv_array_push(&rp, shallow
+ ? "--objects-edge-aggressive"
+ : "--objects-edge");
} else
argv_array_push(&rp, "--objects");
diff --git a/builtin/prune.c b/builtin/prune.c
index 04d3b12..17094ad 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -115,6 +115,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
expire = ULONG_MAX;
save_commit_buffer = 0;
check_replace_refs = 0;
+ ref_paranoia = 1;
init_revisions(&revs, prefix);
argc = parse_options(argc, argv, prefix, options, prune_usage, 0);
diff --git a/builtin/push.c b/builtin/push.c
index 7aedf6f..12f5e69 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -503,7 +503,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
0, CAS_OPT_NAME, &cas, N_("refname>:<expect"),
N_("require old value of ref to be at this value"),
PARSE_OPT_OPTARG, parseopt_push_cas_option },
- { OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
+ { OPTION_CALLBACK, 0, "recurse-submodules", &flags, "check|on-demand",
N_("control recursive pushing of submodules"),
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index e908d07..8266c1f 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -26,7 +26,8 @@ enum deny_action {
DENY_UNCONFIGURED,
DENY_IGNORE,
DENY_WARN,
- DENY_REFUSE
+ DENY_REFUSE,
+ DENY_UPDATE_INSTEAD
};
static int deny_deletes;
@@ -76,6 +77,8 @@ static enum deny_action parse_deny_action(const char *var, const char *value)
return DENY_WARN;
if (!strcasecmp(value, "refuse"))
return DENY_REFUSE;
+ if (!strcasecmp(value, "updateinstead"))
+ return DENY_UPDATE_INSTEAD;
}
if (git_config_bool(var, value))
return DENY_REFUSE;
@@ -730,11 +733,89 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
return 0;
}
+static const char *update_worktree(unsigned char *sha1)
+{
+ const char *update_refresh[] = {
+ "update-index", "-q", "--ignore-submodules", "--refresh", NULL
+ };
+ const char *diff_files[] = {
+ "diff-files", "--quiet", "--ignore-submodules", "--", NULL
+ };
+ const char *diff_index[] = {
+ "diff-index", "--quiet", "--cached", "--ignore-submodules",
+ "HEAD", "--", NULL
+ };
+ const char *read_tree[] = {
+ "read-tree", "-u", "-m", NULL, NULL
+ };
+ const char *work_tree = git_work_tree_cfg ? git_work_tree_cfg : "..";
+ struct argv_array env = ARGV_ARRAY_INIT;
+ struct child_process child = CHILD_PROCESS_INIT;
+
+ if (is_bare_repository())
+ return "denyCurrentBranch = updateInstead needs a worktree";
+
+ argv_array_pushf(&env, "GIT_DIR=%s", absolute_path(get_git_dir()));
+
+ child.argv = update_refresh;
+ child.env = env.argv;
+ child.dir = work_tree;
+ child.no_stdin = 1;
+ child.stdout_to_stderr = 1;
+ child.git_cmd = 1;
+ if (run_command(&child)) {
+ argv_array_clear(&env);
+ return "Up-to-date check failed";
+ }
+
+ /* run_command() does not clean up completely; reinitialize */
+ child_process_init(&child);
+ child.argv = diff_files;
+ child.env = env.argv;
+ child.dir = work_tree;
+ child.no_stdin = 1;
+ child.stdout_to_stderr = 1;
+ child.git_cmd = 1;
+ if (run_command(&child)) {
+ argv_array_clear(&env);
+ return "Working directory has unstaged changes";
+ }
+
+ child_process_init(&child);
+ child.argv = diff_index;
+ child.env = env.argv;
+ child.no_stdin = 1;
+ child.no_stdout = 1;
+ child.stdout_to_stderr = 0;
+ child.git_cmd = 1;
+ if (run_command(&child)) {
+ argv_array_clear(&env);
+ return "Working directory has staged changes";
+ }
+
+ read_tree[3] = sha1_to_hex(sha1);
+ child_process_init(&child);
+ child.argv = read_tree;
+ child.env = env.argv;
+ child.dir = work_tree;
+ child.no_stdin = 1;
+ child.no_stdout = 1;
+ child.stdout_to_stderr = 0;
+ child.git_cmd = 1;
+ if (run_command(&child)) {
+ argv_array_clear(&env);
+ return "Could not update working tree to new HEAD";
+ }
+
+ argv_array_clear(&env);
+ return NULL;
+}
+
static const char *update(struct command *cmd, struct shallow_info *si)
{
const char *name = cmd->ref_name;
struct strbuf namespaced_name_buf = STRBUF_INIT;
- const char *namespaced_name;
+ const char *namespaced_name, *ret;
unsigned char *old_sha1 = cmd->old_sha1;
unsigned char *new_sha1 = cmd->new_sha1;
@@ -760,6 +841,11 @@ static const char *update(struct command *cmd, struct shallow_info *si)
if (deny_current_branch == DENY_UNCONFIGURED)
refuse_unconfigured_deny();
return "branch is currently checked out";
+ case DENY_UPDATE_INSTEAD:
+ ret = update_worktree(new_sha1);
+ if (ret)
+ return ret;
+ break;
}
}
@@ -784,10 +870,13 @@ static const char *update(struct command *cmd, struct shallow_info *si)
break;
case DENY_REFUSE:
case DENY_UNCONFIGURED:
+ case DENY_UPDATE_INSTEAD:
if (deny_delete_current == DENY_UNCONFIGURED)
refuse_unconfigured_deny_delete_current();
rp_error("refusing to delete the current branch: %s", name);
return "deletion of the current branch prohibited";
+ default:
+ return "Invalid denyDeleteCurrent setting";
}
}
}
@@ -964,7 +1053,7 @@ static void check_aliased_updates(struct command *commands)
string_list_append(&ref_list, cmd->ref_name);
item->util = (void *)cmd;
}
- sort_string_list(&ref_list);
+ string_list_sort(&ref_list);
for (cmd = commands; cmd; cmd = cmd->next) {
if (!cmd->error_string)
diff --git a/builtin/remote.c b/builtin/remote.c
index 7f28f92..b4ff468 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -180,7 +180,9 @@ static int add(int argc, const char **argv)
url = argv[1];
remote = remote_get(name);
- if (remote && (remote->url_nr > 1 || strcmp(name, remote->url[0]) ||
+ if (remote && (remote->url_nr > 1 ||
+ (strcmp(name, remote->url[0]) &&
+ strcmp(url, remote->url[0])) ||
remote->fetch_refspec_nr))
die(_("remote %s already exists."), name);
@@ -352,9 +354,9 @@ static int get_ref_states(const struct ref *remote_refs, struct ref_states *stat
free_refs(stale_refs);
free_refs(fetch_map);
- sort_string_list(&states->new);
- sort_string_list(&states->tracked);
- sort_string_list(&states->stale);
+ string_list_sort(&states->new);
+ string_list_sort(&states->tracked);
+ string_list_sort(&states->stale);
return 0;
}
@@ -750,16 +752,11 @@ static int mv(int argc, const char **argv)
static int remove_branches(struct string_list *branches)
{
struct strbuf err = STRBUF_INIT;
- const char **branch_names;
int i, result = 0;
- branch_names = xmalloc(branches->nr * sizeof(*branch_names));
- for (i = 0; i < branches->nr; i++)
- branch_names[i] = branches->items[i].string;
- if (repack_without_refs(branch_names, branches->nr, &err))
+ if (repack_without_refs(branches, &err))
result |= error("%s", err.buf);
strbuf_release(&err);
- free(branch_names);
for (i = 0; i < branches->nr; i++) {
struct string_list_item *item = branches->items + i;
@@ -914,7 +911,7 @@ static int get_remote_ref_states(const char *name,
get_push_ref_states(remote_refs, states);
} else {
for_each_ref(append_ref_to_tracked_list, states);
- sort_string_list(&states->tracked);
+ string_list_sort(&states->tracked);
get_push_ref_states_noquery(states);
}
@@ -1133,7 +1130,7 @@ static int show_all(void)
if (!result) {
int i;
- sort_string_list(&list);
+ string_list_sort(&list);
for (i = 0; i < list.nr; i++) {
struct string_list_item *item = list.items + i;
if (verbose)
@@ -1314,10 +1311,10 @@ static int set_head(int argc, const char **argv)
static int prune_remote(const char *remote, int dry_run)
{
- int result = 0, i;
+ int result = 0;
struct ref_states states;
- struct string_list delete_refs_list = STRING_LIST_INIT_NODUP;
- const char **delete_refs;
+ struct string_list refs_to_prune = STRING_LIST_INIT_NODUP;
+ struct string_list_item *item;
const char *dangling_msg = dry_run
? _(" %s will become dangling!")
: _(" %s has become dangling!");
@@ -1325,30 +1322,30 @@ static int prune_remote(const char *remote, int dry_run)
memset(&states, 0, sizeof(states));
get_remote_ref_states(remote, &states, GET_REF_STATES);
- if (states.stale.nr) {
- printf_ln(_("Pruning %s"), remote);
- printf_ln(_("URL: %s"),
- states.remote->url_nr
- ? states.remote->url[0]
- : _("(no URL)"));
-
- delete_refs = xmalloc(states.stale.nr * sizeof(*delete_refs));
- for (i = 0; i < states.stale.nr; i++)
- delete_refs[i] = states.stale.items[i].util;
- if (!dry_run) {
- struct strbuf err = STRBUF_INIT;
- if (repack_without_refs(delete_refs, states.stale.nr,
- &err))
- result |= error("%s", err.buf);
- strbuf_release(&err);
- }
- free(delete_refs);
+ if (!states.stale.nr) {
+ free_remote_ref_states(&states);
+ return 0;
}
- for (i = 0; i < states.stale.nr; i++) {
- const char *refname = states.stale.items[i].util;
+ printf_ln(_("Pruning %s"), remote);
+ printf_ln(_("URL: %s"),
+ states.remote->url_nr
+ ? states.remote->url[0]
+ : _("(no URL)"));
+
+ for_each_string_list_item(item, &states.stale)
+ string_list_append(&refs_to_prune, item->util);
+ string_list_sort(&refs_to_prune);
+
+ if (!dry_run) {
+ struct strbuf err = STRBUF_INIT;
+ if (repack_without_refs(&refs_to_prune, &err))
+ result |= error("%s", err.buf);
+ strbuf_release(&err);
+ }
- string_list_insert(&delete_refs_list, refname);
+ for_each_string_list_item(item, &states.stale) {
+ const char *refname = item->util;
if (!dry_run)
result |= delete_ref(refname, NULL, 0);
@@ -1361,9 +1358,9 @@ static int prune_remote(const char *remote, int dry_run)
abbrev_ref(refname, "refs/remotes/"));
}
- warn_dangling_symrefs(stdout, dangling_msg, &delete_refs_list);
- string_list_clear(&delete_refs_list, 0);
+ warn_dangling_symrefs(stdout, dangling_msg, &refs_to_prune);
+ string_list_clear(&refs_to_prune, 0);
free_remote_ref_states(&states);
return result;
}
diff --git a/builtin/repack.c b/builtin/repack.c
index 2845620..2fe1b30 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -135,7 +135,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
};
struct child_process cmd = CHILD_PROCESS_INIT;
struct string_list_item *item;
- struct argv_array cmd_args = ARGV_ARRAY_INIT;
struct string_list names = STRING_LIST_INIT_DUP;
struct string_list rollback = STRING_LIST_INIT_NODUP;
struct string_list existing_packs = STRING_LIST_INIT_DUP;
@@ -202,56 +201,59 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
sigchain_push_common(remove_pack_on_signal);
- argv_array_push(&cmd_args, "pack-objects");
- argv_array_push(&cmd_args, "--keep-true-parents");
+ argv_array_push(&cmd.args, "pack-objects");
+ argv_array_push(&cmd.args, "--keep-true-parents");
if (!pack_kept_objects)
- argv_array_push(&cmd_args, "--honor-pack-keep");
- argv_array_push(&cmd_args, "--non-empty");
- argv_array_push(&cmd_args, "--all");
- argv_array_push(&cmd_args, "--reflog");
- argv_array_push(&cmd_args, "--indexed-objects");
+ argv_array_push(&cmd.args, "--honor-pack-keep");
+ argv_array_push(&cmd.args, "--non-empty");
+ argv_array_push(&cmd.args, "--all");
+ argv_array_push(&cmd.args, "--reflog");
+ argv_array_push(&cmd.args, "--indexed-objects");
if (window)
- argv_array_pushf(&cmd_args, "--window=%s", window);
+ argv_array_pushf(&cmd.args, "--window=%s", window);
if (window_memory)
- argv_array_pushf(&cmd_args, "--window-memory=%s", window_memory);
+ argv_array_pushf(&cmd.args, "--window-memory=%s", window_memory);
if (depth)
- argv_array_pushf(&cmd_args, "--depth=%s", depth);
+ argv_array_pushf(&cmd.args, "--depth=%s", depth);
if (max_pack_size)
- argv_array_pushf(&cmd_args, "--max-pack-size=%s", max_pack_size);
+ argv_array_pushf(&cmd.args, "--max-pack-size=%s", max_pack_size);
if (no_reuse_delta)
- argv_array_pushf(&cmd_args, "--no-reuse-delta");
+ argv_array_pushf(&cmd.args, "--no-reuse-delta");
if (no_reuse_object)
- argv_array_pushf(&cmd_args, "--no-reuse-object");
+ argv_array_pushf(&cmd.args, "--no-reuse-object");
if (write_bitmaps)
- argv_array_push(&cmd_args, "--write-bitmap-index");
+ argv_array_push(&cmd.args, "--write-bitmap-index");
if (pack_everything & ALL_INTO_ONE) {
get_non_kept_pack_filenames(&existing_packs);
if (existing_packs.nr && delete_redundant) {
- if (unpack_unreachable)
- argv_array_pushf(&cmd_args,
+ if (unpack_unreachable) {
+ argv_array_pushf(&cmd.args,
"--unpack-unreachable=%s",
unpack_unreachable);
- else if (pack_everything & LOOSEN_UNREACHABLE)
- argv_array_push(&cmd_args,
+ argv_array_push(&cmd.env_array, "GIT_REF_PARANOIA=1");
+ } else if (pack_everything & LOOSEN_UNREACHABLE) {
+ argv_array_push(&cmd.args,
"--unpack-unreachable");
+ } else {
+ argv_array_push(&cmd.env_array, "GIT_REF_PARANOIA=1");
+ }
}
} else {
- argv_array_push(&cmd_args, "--unpacked");
- argv_array_push(&cmd_args, "--incremental");
+ argv_array_push(&cmd.args, "--unpacked");
+ argv_array_push(&cmd.args, "--incremental");
}
if (local)
- argv_array_push(&cmd_args, "--local");
+ argv_array_push(&cmd.args, "--local");
if (quiet)
- argv_array_push(&cmd_args, "--quiet");
+ argv_array_push(&cmd.args, "--quiet");
if (delta_base_offset)
- argv_array_push(&cmd_args, "--delta-base-offset");
+ argv_array_push(&cmd.args, "--delta-base-offset");
- argv_array_push(&cmd_args, packtmp);
+ argv_array_push(&cmd.args, packtmp);
- cmd.argv = cmd_args.argv;
cmd.git_cmd = 1;
cmd.out = -1;
cmd.no_stdin = 1;
@@ -270,7 +272,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
ret = finish_command(&cmd);
if (ret)
return ret;
- argv_array_clear(&cmd_args);
if (!names.nr && !quiet)
printf("Nothing new to pack.\n");
@@ -379,7 +380,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
if (delete_redundant) {
int opts = 0;
- sort_string_list(&names);
+ string_list_sort(&names);
for_each_string_list_item(item, &existing_packs) {
char *sha1;
size_t len = strlen(item->string);
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 35d3c43..95328b8 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -279,7 +279,7 @@ static int try_difference(const char *arg)
struct commit *a, *b;
a = lookup_commit_reference(sha1);
b = lookup_commit_reference(end);
- exclude = get_merge_bases(a, b, 1);
+ exclude = get_merge_bases(a, b);
while (exclude) {
struct commit_list *n = exclude->next;
show_rev(REVERSED,
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 270e39c..365228a 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -6,7 +6,10 @@
#include "parse-options.h"
static const char* show_branch_usage[] = {
- N_("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>)...]"),
+ N_("git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order]\n"
+ " [--current] [--color[=<when>] | --no-color] [--sparse]\n"
+ " [--more=<n> | --list | --independent | --merge-base]\n"
+ " [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...]"),
N_("git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]"),
NULL
};
diff --git a/builtin/tag.c b/builtin/tag.c
index e633f4e..d315827 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -605,13 +605,13 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
OPT_STRING('u', "local-user", &keyid, N_("key-id"),
N_("use another key to sign the tag")),
OPT__FORCE(&force, N_("replace the tag if exists")),
+
+ OPT_GROUP(N_("Tag listing options")),
OPT_COLUMN(0, "column", &colopts, N_("show tag list in columns")),
{
OPTION_CALLBACK, 0, "sort", &tag_sort, N_("type"), N_("sort tags"),
PARSE_OPT_NONEG, parse_opt_sort
},
-
- OPT_GROUP(N_("Tag listing options")),
{
OPTION_CALLBACK, 0, "contains", &with_commit, N_("commit"),
N_("print only tags that contain the commit"),
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 855d94b..ac66672 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -91,7 +91,7 @@ static void use(int bytes)
static void *get_data(unsigned long size)
{
git_zstream stream;
- void *buf = xmalloc(size);
+ void *buf = xmallocz(size);
memset(&stream, 0, sizeof(stream));
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 6c9be05..1993529 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -282,26 +282,22 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,
char *refname;
unsigned char new_sha1[20];
unsigned char old_sha1[20];
- int have_old;
refname = parse_refname(input, &next);
if (!refname)
die("verify: missing <ref>");
if (parse_next_sha1(input, &next, old_sha1, "verify", refname,
- PARSE_SHA1_OLD)) {
- hashclr(new_sha1);
- have_old = 0;
- } else {
- hashcpy(new_sha1, old_sha1);
- have_old = 1;
- }
+ PARSE_SHA1_OLD))
+ hashclr(old_sha1);
+
+ hashcpy(new_sha1, old_sha1);
if (*next != line_termination)
die("verify %s: extra input: %s", refname, next);
if (ref_transaction_update(transaction, refname, new_sha1, old_sha1,
- update_flags, have_old, msg, &err))
+ update_flags, 1, msg, &err))
die("%s", err.buf);
update_flags = 0;
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 0c4b8a7..8d157eb 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -105,7 +105,6 @@ static int stream_to_pack(struct bulk_checkin_state *state,
int write_object = (flags & HASH_WRITE_OBJECT);
off_t offset = 0;
- memset(&s, 0, sizeof(s));
git_deflate_init(&s, pack_compression_level);
hdrlen = encode_in_pack_object_header(type, size, obuf);
diff --git a/cache.h b/cache.h
index 22b7b81..28d769f 100644
--- a/cache.h
+++ b/cache.h
@@ -65,13 +65,6 @@ unsigned long git_deflate_bound(git_zstream *, unsigned long);
*
* The value 0160000 is not normally a valid mode, and
* also just happens to be S_IFDIR + S_IFLNK
- *
- * NOTE! We *really* shouldn't depend on the S_IFxxx macros
- * always having the same values everywhere. We should use
- * our internal git values for these things, and then we can
- * translate that to the OS-specific value. It just so
- * happens that everybody shares the same bit representation
- * in the UNIX world (and apparently wider too..)
*/
#define S_IFGITLINK 0160000
#define S_ISGITLINK(m) (((m) & S_IFMT) == S_IFGITLINK)
@@ -621,6 +614,14 @@ extern int protect_hfs;
extern int protect_ntfs;
/*
+ * Include broken refs in all ref iterations, which will
+ * generally choke dangerous operations rather than letting
+ * them silently proceed without taking the broken ref into
+ * account.
+ */
+extern int ref_paranoia;
+
+/*
* The character that begins a commented line in user-editable file
* that is subject to stripspace.
*/
@@ -1261,6 +1262,10 @@ extern int unpack_object_header(struct packed_git *, struct pack_window **, off_
*
* Any callback that is NULL will be ignored. Callbacks returning non-zero
* will end the iteration.
+ *
+ * In the "buf" variant, "path" is a strbuf which will also be used as a
+ * scratch buffer, but restored to its original contents before
+ * the function returns.
*/
typedef int each_loose_object_fn(const unsigned char *sha1,
const char *path,
@@ -1276,6 +1281,11 @@ int for_each_loose_file_in_objdir(const char *path,
each_loose_cruft_fn cruft_cb,
each_loose_subdir_fn subdir_cb,
void *data);
+int for_each_loose_file_in_objdir_buf(struct strbuf *path,
+ each_loose_object_fn obj_cb,
+ each_loose_cruft_fn cruft_cb,
+ each_loose_subdir_fn subdir_cb,
+ void *data);
/*
* Iterate over loose and packed objects in both the local
@@ -1505,7 +1515,7 @@ extern const char *pager_program;
extern int pager_in_use(void);
extern int pager_use_color;
extern int term_columns(void);
-extern int decimal_width(int);
+extern int decimal_width(uintmax_t);
extern int check_pager_config(const char *cmd);
extern const char *editor_program;
@@ -1567,7 +1577,6 @@ extern int ws_blank_line(const char *line, int len, unsigned ws_rule);
#define ws_tab_width(rule) ((rule) & WS_TAB_WIDTH_MASK)
/* ls-files */
-int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
void overlay_tree_on_cache(const char *tree_name, const char *prefix);
char *alias_lookup(const char *alias);
diff --git a/color.c b/color.c
index 7941e93..9027352 100644
--- a/color.c
+++ b/color.c
@@ -26,30 +26,110 @@ const char *column_colors_ansi[] = {
/* Ignore the RESET at the end when giving the size */
const int column_colors_ansi_max = ARRAY_SIZE(column_colors_ansi) - 1;
-static int parse_color(const char *name, int len)
+/* An individual foreground or background color. */
+struct color {
+ enum {
+ COLOR_UNSPECIFIED = 0,
+ COLOR_NORMAL,
+ COLOR_ANSI, /* basic 0-7 ANSI colors */
+ COLOR_256,
+ COLOR_RGB
+ } type;
+ /* The numeric value for ANSI and 256-color modes */
+ unsigned char value;
+ /* 24-bit RGB color values */
+ unsigned char red, green, blue;
+};
+
+/*
+ * "word" is a buffer of length "len"; does it match the NUL-terminated
+ * "match" exactly?
+ */
+static int match_word(const char *word, int len, const char *match)
{
+ return !strncasecmp(word, match, len) && !match[len];
+}
+
+static int get_hex_color(const char *in, unsigned char *out)
+{
+ unsigned int val;
+ val = (hexval(in[0]) << 4) | hexval(in[1]);
+ if (val & ~0xff)
+ return -1;
+ *out = val;
+ return 0;
+}
+
+static int parse_color(struct color *out, const char *name, int len)
+{
+ /* Positions in array must match ANSI color codes */
static const char * const color_names[] = {
- "normal", "black", "red", "green", "yellow",
+ "black", "red", "green", "yellow",
"blue", "magenta", "cyan", "white"
};
char *end;
int i;
+ long val;
+
+ /* First try the special word "normal"... */
+ if (match_word(name, len, "normal")) {
+ out->type = COLOR_NORMAL;
+ return 0;
+ }
+
+ /* Try a 24-bit RGB value */
+ if (len == 7 && name[0] == '#') {
+ if (!get_hex_color(name + 1, &out->red) &&
+ !get_hex_color(name + 3, &out->green) &&
+ !get_hex_color(name + 5, &out->blue)) {
+ out->type = COLOR_RGB;
+ return 0;
+ }
+ }
+
+ /* Then pick from our human-readable color names... */
for (i = 0; i < ARRAY_SIZE(color_names); i++) {
- const char *str = color_names[i];
- if (!strncasecmp(name, str, len) && !str[len])
- return i - 1;
+ if (match_word(name, len, color_names[i])) {
+ out->type = COLOR_ANSI;
+ out->value = i;
+ return 0;
+ }
}
- i = strtol(name, &end, 10);
- if (end - name == len && i >= -1 && i <= 255)
- return i;
- return -2;
+
+ /* And finally try a literal 256-color-mode number */
+ val = strtol(name, &end, 10);
+ if (end - name == len) {
+ /*
+ * Allow "-1" as an alias for "normal", but other negative
+ * numbers are bogus.
+ */
+ if (val < -1)
+ ; /* fall through to error */
+ else if (val < 0) {
+ out->type = COLOR_NORMAL;
+ return 0;
+ /* Rewrite low numbers as more-portable standard colors. */
+ } else if (val < 8) {
+ out->type = COLOR_ANSI;
+ out->value = val;
+ return 0;
+ } else if (val < 256) {
+ out->type = COLOR_256;
+ out->value = val;
+ return 0;
+ }
+ }
+
+ return -1;
}
static int parse_attr(const char *name, int len)
{
- static const int attr_values[] = { 1, 2, 4, 5, 7 };
+ static const int attr_values[] = { 1, 2, 4, 5, 7,
+ 22, 22, 24, 25, 27 };
static const char * const attr_names[] = {
- "bold", "dim", "ul", "blink", "reverse"
+ "bold", "dim", "ul", "blink", "reverse",
+ "nobold", "nodim", "noul", "noblink", "noreverse"
};
int i;
for (i = 0; i < ARRAY_SIZE(attr_names); i++) {
@@ -65,13 +145,44 @@ int color_parse(const char *value, char *dst)
return color_parse_mem(value, strlen(value), dst);
}
+/*
+ * Write the ANSI color codes for "c" to "out"; the string should
+ * already have the ANSI escape code in it. "out" should have enough
+ * space in it to fit any color.
+ */
+static char *color_output(char *out, const struct color *c, char type)
+{
+ switch (c->type) {
+ case COLOR_UNSPECIFIED:
+ case COLOR_NORMAL:
+ break;
+ case COLOR_ANSI:
+ *out++ = type;
+ *out++ = '0' + c->value;
+ break;
+ case COLOR_256:
+ out += sprintf(out, "%c8;5;%d", type, c->value);
+ break;
+ case COLOR_RGB:
+ out += sprintf(out, "%c8;2;%d;%d;%d", type,
+ c->red, c->green, c->blue);
+ break;
+ }
+ return out;
+}
+
+static int color_empty(const struct color *c)
+{
+ return c->type <= COLOR_NORMAL;
+}
+
int color_parse_mem(const char *value, int value_len, char *dst)
{
const char *ptr = value;
int len = value_len;
unsigned int attr = 0;
- int fg = -2;
- int bg = -2;
+ struct color fg = { COLOR_UNSPECIFIED };
+ struct color bg = { COLOR_UNSPECIFIED };
if (!strncasecmp(value, "reset", len)) {
strcpy(dst, GIT_COLOR_RESET);
@@ -81,6 +192,7 @@ int color_parse_mem(const char *value, int value_len, char *dst)
/* [fg [bg]] [attr]... */
while (len > 0) {
const char *word = ptr;
+ struct color c;
int val, wordlen = 0;
while (len > 0 && !isspace(word[wordlen])) {
@@ -94,14 +206,13 @@ int color_parse_mem(const char *value, int value_len, char *dst)
len--;
}
- val = parse_color(word, wordlen);
- if (val >= -1) {
- if (fg == -2) {
- fg = val;
+ if (!parse_color(&c, word, wordlen)) {
+ if (fg.type == COLOR_UNSPECIFIED) {
+ fg = c;
continue;
}
- if (bg == -2) {
- bg = val;
+ if (bg.type == COLOR_UNSPECIFIED) {
+ bg = c;
continue;
}
goto bad;
@@ -113,7 +224,7 @@ int color_parse_mem(const char *value, int value_len, char *dst)
goto bad;
}
- if (attr || fg >= 0 || bg >= 0) {
+ if (attr || !color_empty(&fg) || !color_empty(&bg)) {
int sep = 0;
int i;
@@ -127,27 +238,19 @@ int color_parse_mem(const char *value, int value_len, char *dst)
attr &= ~bit;
if (sep++)
*dst++ = ';';
- *dst++ = '0' + i;
+ dst += sprintf(dst, "%d", i);
}
- if (fg >= 0) {
+ if (!color_empty(&fg)) {
if (sep++)
*dst++ = ';';
- if (fg < 8) {
- *dst++ = '3';
- *dst++ = '0' + fg;
- } else {
- dst += sprintf(dst, "38;5;%d", fg);
- }
+ /* foreground colors are all in the 3x range */
+ dst = color_output(dst, &fg, '3');
}
- if (bg >= 0) {
+ if (!color_empty(&bg)) {
if (sep++)
*dst++ = ';';
- if (bg < 8) {
- *dst++ = '4';
- *dst++ = '0' + bg;
- } else {
- dst += sprintf(dst, "48;5;%d", bg);
- }
+ /* background colors are all in the 4x range */
+ dst = color_output(dst, &bg, '4');
}
*dst++ = 'm';
}
diff --git a/color.h b/color.h
index f5beab1..7fe77fb 100644
--- a/color.h
+++ b/color.h
@@ -8,15 +8,15 @@ struct strbuf;
/*
* 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;")
+ * - attr + ';' 3 * 10 (e.g. "1;")
+ * - fg color + ';' 17 (e.g. "38;2;255;255;255;")
+ * - bg color + ';' 17 (e.g. "48;2;255;255;255;")
* - 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
+#define COLOR_MAXLEN 70
/*
* IMPORTANT: Due to the way these color codes are emulated on Windows,
diff --git a/commit.c b/commit.c
index 19cf8f9..a8c7577 100644
--- a/commit.c
+++ b/commit.c
@@ -867,7 +867,7 @@ struct commit_list *get_octopus_merge_bases(struct commit_list *in)
for (j = ret; j; j = j->next) {
struct commit_list *bases;
- bases = get_merge_bases(i->item, j->item, 1);
+ bases = get_merge_bases(i->item, j->item);
if (!new)
new = bases;
else
@@ -936,10 +936,10 @@ static int remove_redundant(struct commit **array, int cnt)
return filled;
}
-struct commit_list *get_merge_bases_many(struct commit *one,
- int n,
- struct commit **twos,
- int cleanup)
+static struct commit_list *get_merge_bases_many_0(struct commit *one,
+ int n,
+ struct commit **twos,
+ int cleanup)
{
struct commit_list *list;
struct commit **rslt;
@@ -977,10 +977,23 @@ struct commit_list *get_merge_bases_many(struct commit *one,
return result;
}
-struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
- int cleanup)
+struct commit_list *get_merge_bases_many(struct commit *one,
+ int n,
+ struct commit **twos)
{
- return get_merge_bases_many(one, 1, &two, cleanup);
+ return get_merge_bases_many_0(one, n, twos, 1);
+}
+
+struct commit_list *get_merge_bases_many_dirty(struct commit *one,
+ int n,
+ struct commit **twos)
+{
+ return get_merge_bases_many_0(one, n, twos, 0);
+}
+
+struct commit_list *get_merge_bases(struct commit *one, struct commit *two)
+{
+ return get_merge_bases_many_0(one, 1, &two, 1);
}
/*
@@ -1640,3 +1653,49 @@ const char *find_commit_header(const char *msg, const char *key, size_t *out_len
}
return NULL;
}
+
+/*
+ * Inspect sb and determine the true "end" of the log message, in
+ * order to find where to put a new Signed-off-by: line. Ignored are
+ * trailing comment lines and blank lines, and also the traditional
+ * "Conflicts:" block that is not commented out, so that we can use
+ * "git commit -s --amend" on an existing commit that forgot to remove
+ * it.
+ *
+ * Returns the number of bytes from the tail to ignore, to be fed as
+ * the second parameter to append_signoff().
+ */
+int ignore_non_trailer(struct strbuf *sb)
+{
+ int boc = 0;
+ int bol = 0;
+ int in_old_conflicts_block = 0;
+
+ while (bol < sb->len) {
+ char *next_line;
+
+ if (!(next_line = memchr(sb->buf + bol, '\n', sb->len - bol)))
+ next_line = sb->buf + sb->len;
+ else
+ next_line++;
+
+ if (sb->buf[bol] == comment_line_char || sb->buf[bol] == '\n') {
+ /* is this the first of the run of comments? */
+ if (!boc)
+ boc = bol;
+ /* otherwise, it is just continuing */
+ } else if (starts_with(sb->buf + bol, "Conflicts:\n")) {
+ in_old_conflicts_block = 1;
+ if (!boc)
+ boc = bol;
+ } else if (in_old_conflicts_block && sb->buf[bol] == '\t') {
+ ; /* a pathname in the conflicts block */
+ } else if (boc) {
+ /* the previous was not trailing comment */
+ boc = 0;
+ in_old_conflicts_block = 0;
+ }
+ bol = next_line - sb->buf;
+ }
+ return boc ? sb->len - boc : 0;
+}
diff --git a/commit.h b/commit.h
index bc68ccb..5cc1e7e 100644
--- a/commit.h
+++ b/commit.h
@@ -236,10 +236,13 @@ struct commit_graft *read_graft_line(char *buf, int len);
int register_commit_graft(struct commit_graft *, int);
struct commit_graft *lookup_commit_graft(const unsigned char *sha1);
-extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2, int cleanup);
-extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
+extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2);
+extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
+/* To be used only when object flags after this call no longer matter */
+extern struct commit_list *get_merge_bases_many_dirty(struct commit *one, int n, struct commit **twos);
+
/* largest positive number a signed 32-bit integer can contain */
#define INFINITE_DEPTH 0x7fffffff
@@ -337,6 +340,9 @@ extern void free_commit_extra_headers(struct commit_extra_header *extra);
extern const char *find_commit_header(const char *msg, const char *key,
size_t *out_len);
+/* Find the end of the log message, the right place for a new trailer. */
+extern int ignore_non_trailer(struct strbuf *sb);
+
typedef void (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
void *cb_data);
diff --git a/compat/stat.c b/compat/stat.c
new file mode 100644
index 0000000..a2d3931
--- /dev/null
+++ b/compat/stat.c
@@ -0,0 +1,48 @@
+#define _POSIX_C_SOURCE 200112L
+#include <sys/stat.h> /* *stat, S_IS* */
+#include <sys/types.h> /* mode_t */
+
+static inline mode_t mode_native_to_git(mode_t native_mode)
+{
+ mode_t perm_bits = native_mode & 07777;
+ if (S_ISREG(native_mode))
+ return 0100000 | perm_bits;
+ if (S_ISDIR(native_mode))
+ return 0040000 | perm_bits;
+ if (S_ISLNK(native_mode))
+ return 0120000 | perm_bits;
+ if (S_ISBLK(native_mode))
+ return 0060000 | perm_bits;
+ if (S_ISCHR(native_mode))
+ return 0020000 | perm_bits;
+ if (S_ISFIFO(native_mode))
+ return 0010000 | perm_bits;
+ if (S_ISSOCK(native_mode))
+ return 0140000 | perm_bits;
+ /* Non-standard type bits were given. */
+ return perm_bits;
+}
+
+int git_stat(const char *path, struct stat *buf)
+{
+ int rc = stat(path, buf);
+ if (rc == 0)
+ buf->st_mode = mode_native_to_git(buf->st_mode);
+ return rc;
+}
+
+int git_fstat(int fd, struct stat *buf)
+{
+ int rc = fstat(fd, buf);
+ if (rc == 0)
+ buf->st_mode = mode_native_to_git(buf->st_mode);
+ return rc;
+}
+
+int git_lstat(const char *path, struct stat *buf)
+{
+ int rc = lstat(path, buf);
+ if (rc == 0)
+ buf->st_mode = mode_native_to_git(buf->st_mode);
+ return rc;
+}
diff --git a/config.c b/config.c
index 752e2e2..66c0a51 100644
--- a/config.c
+++ b/config.c
@@ -73,8 +73,12 @@ static int config_buf_fgetc(struct config_source *conf)
static int config_buf_ungetc(int c, struct config_source *conf)
{
- if (conf->u.buf.pos > 0)
- return conf->u.buf.buf[--conf->u.buf.pos];
+ if (conf->u.buf.pos > 0) {
+ conf->u.buf.pos--;
+ if (conf->u.buf.buf[conf->u.buf.pos] != c)
+ die("BUG: config_buf can only ungetc the same character");
+ return c;
+ }
return EOF;
}
@@ -235,7 +239,8 @@ static int get_next_char(void)
/* DOS like systems */
c = cf->do_fgetc(cf);
if (c != '\n') {
- cf->do_ungetc(c, cf);
+ if (c != EOF)
+ cf->do_ungetc(c, cf);
c = '\r';
}
}
@@ -1340,7 +1345,7 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha
string_list_init(&e->value_list, 1);
hashmap_add(&cs->config_hash, e);
}
- si = string_list_append_nodup(&e->value_list, value ? xstrdup(value) : NULL);
+ si = string_list_append_nodup(&e->value_list, xstrdup_or_null(value));
ALLOC_GROW(cs->list.items, cs->list.nr + 1, cs->list.alloc);
l_item = &cs->list.items[cs->list.nr++];
diff --git a/config.mak.uname b/config.mak.uname
index f3c93f2..b64b63c 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -35,6 +35,7 @@ ifeq ($(uname_S),Linux)
LIBC_CONTAINS_LIBINTL = YesPlease
HAVE_DEV_TTY = YesPlease
HAVE_CLOCK_GETTIME = YesPlease
+ HAVE_CLOCK_MONOTONIC = YesPlease
endif
ifeq ($(uname_S),GNU/kFreeBSD)
HAVE_ALLOCA_H = YesPlease
diff --git a/configure.ac b/configure.ac
index 6af9647..55e5a9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],
[#include <sys/time.h>])
GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
#
+# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.
+# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor
+# stat.st_mtimespec.tv_nsec exists.
+AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec])
+AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])
+if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes; then
+ USE_ST_TIMESPEC=YesPlease
+ GIT_CONF_SUBST([USE_ST_TIMESPEC])
+elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes; then
+ NO_NSEC=YesPlease
+ GIT_CONF_SUBST([NO_NSEC])
+fi
+#
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
AC_CHECK_MEMBER(struct dirent.d_ino,
[NO_D_INO_IN_DIRENT=],
@@ -873,6 +886,29 @@ else
SNPRINTF_RETURNS_BOGUS=
fi
GIT_CONF_SUBST([SNPRINTF_RETURNS_BOGUS])
+#
+# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type
+# bits in mode values.
+AC_CACHE_CHECK([whether the platform uses typical file type bits],
+ [ac_cv_sane_mode_bits], [
+AC_EGREP_CPP(yippeeyeswehaveit,
+ AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+[#if S_IFMT == 0170000 && \
+ S_IFREG == 0100000 && S_IFDIR == 0040000 && S_IFLNK == 0120000 && \
+ S_IFBLK == 0060000 && S_IFCHR == 0020000 && \
+ S_IFIFO == 0010000 && S_IFSOCK == 0140000
+yippeeyeswehaveit
+#endif
+]),
+ [ac_cv_sane_mode_bits=yes],
+ [ac_cv_sane_mode_bits=no])
+])
+if test $ac_cv_sane_mode_bits = yes; then
+ NEEDS_MODE_TRANSLATION=
+else
+ NEEDS_MODE_TRANSLATION=UnfortunatelyYes
+fi
+GIT_CONF_SUBST([NEEDS_MODE_TRANSLATION])
## Checks for library functions.
@@ -911,6 +947,32 @@ AC_CHECK_LIB([iconv], [locale_charset],
[CHARSET_LIB=-lcharset])])
GIT_CONF_SUBST([CHARSET_LIB])
#
+# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.
+AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup],
+ [], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])])
+#
+# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
+GIT_CHECK_FUNC(clock_gettime,
+ [HAVE_CLOCK_GETTIME=YesPlease],
+ [HAVE_CLOCK_GETTIME=])
+GIT_CONF_SUBST([HAVE_CLOCK_GETTIME])
+
+AC_DEFUN([CLOCK_MONOTONIC_SRC], [
+AC_LANG_PROGRAM([[
+#include <time.h>
+clockid_t id = CLOCK_MONOTONIC;
+]])])
+
+#
+# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.
+AC_MSG_CHECKING([for CLOCK_MONOTONIC])
+AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC],
+ [AC_MSG_RESULT([yes])
+ HAVE_CLOCK_MONOTONIC=YesPlease],
+ [AC_MSG_RESULT([no])
+ HAVE_CLOCK_MONOTONIC=])
+GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
+#
# Define NO_SETITIMER if you don't have setitimer.
GIT_CHECK_FUNC(setitimer,
[NO_SETITIMER=],
diff --git a/connect.c b/connect.c
index dc31b79..14c924b 100644
--- a/connect.c
+++ b/connect.c
@@ -93,7 +93,7 @@ static void annotate_refs_with_symref_info(struct ref *ref)
parse_one_symref_info(&symref, val, len);
feature_list = val + 1;
}
- sort_string_list(&symref);
+ string_list_sort(&symref);
for (; ref; ref = ref->next) {
struct string_list_item *item;
@@ -157,8 +157,7 @@ struct ref **get_remote_heads(int in, char *src_buf, size_t src_len,
server_capabilities = xstrdup(name + name_len + 1);
}
- if (extra_have &&
- name_len == 5 && !memcmp(".have", name, 5)) {
+ if (extra_have && !strcmp(name, ".have")) {
sha1_array_append(extra_have, old_sha1);
continue;
}
@@ -684,10 +683,20 @@ struct child_process *git_connect(int fd[2], const char *url,
printf("Diag: path=%s\n", path ? path : "NULL");
conn = NULL;
} else if (protocol == PROTO_GIT) {
+ /*
+ * Set up virtual host information based on where we will
+ * connect, unless the user has overridden us in
+ * the environment.
+ */
+ char *target_host = getenv("GIT_OVERRIDE_VIRTUAL_HOST");
+ if (target_host)
+ target_host = xstrdup(target_host);
+ else
+ target_host = xstrdup(hostandport);
+
/* These underlying connection commands die() if they
* cannot connect.
*/
- char *target_host = xstrdup(hostandport);
if (git_use_proxy(hostandport))
conn = git_proxy_connect(fd, hostandport);
else
@@ -714,13 +723,15 @@ struct child_process *git_connect(int fd[2], const char *url,
conn->in = conn->out = -1;
if (protocol == PROTO_SSH) {
- const char *ssh = getenv("GIT_SSH");
- int putty = ssh && strcasestr(ssh, "plink");
+ const char *ssh;
+ int putty;
char *ssh_host = hostandport;
const char *port = NULL;
get_host_and_port(&ssh_host, &port);
+
if (!port)
port = get_port(ssh_host);
+
if (flags & CONNECT_DIAG_URL) {
printf("Diag: url=%s\n", url ? url : "NULL");
printf("Diag: protocol=%s\n", prot_name(protocol));
@@ -732,7 +743,16 @@ struct child_process *git_connect(int fd[2], const char *url,
free(path);
return NULL;
} else {
- if (!ssh) ssh = "ssh";
+ ssh = getenv("GIT_SSH_COMMAND");
+ if (ssh) {
+ conn->use_shell = 1;
+ putty = 0;
+ } else {
+ ssh = getenv("GIT_SSH");
+ if (!ssh)
+ ssh = "ssh";
+ putty = !!strcasestr(ssh, "plink");
+ }
argv_array_push(&conn->args, ssh);
if (putty && !strcasestr(ssh, "tortoiseplink"))
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 2fece98..1620546 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -16,9 +16,9 @@
#
# To use these routines:
#
-# 1) Copy this file to somewhere (e.g. ~/.git-completion.sh).
+# 1) Copy this file to somewhere (e.g. ~/.git-completion.bash).
# 2) Add the following line to your .bashrc/.zshrc:
-# source ~/.git-completion.sh
+# source ~/.git-completion.bash
# 3) Consider changing your PS1 to also show the current branch,
# see git-prompt.sh for details.
#
@@ -186,7 +186,7 @@ fi
__gitcompappend ()
{
- local i=${#COMPREPLY[@]}
+ local x i=${#COMPREPLY[@]}
for x in $1; do
if [[ "$x" == "$3"* ]]; then
COMPREPLY[i++]="$2$x$4"
@@ -411,12 +411,9 @@ __git_refs_remotes ()
__git_remotes ()
{
- local i IFS=$'\n' d="$(__gitdir)"
+ local d="$(__gitdir)"
test -d "$d/remotes" && ls -1 "$d/remotes"
- for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do
- i="${i#remote.}"
- echo "${i/.url*/}"
- done
+ git --git-dir="$d" remote
}
__git_list_merge_strategies ()
@@ -980,7 +977,7 @@ _git_branch ()
case "$cur" in
--set-upstream-to=*)
- __gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
+ __gitcomp_nl "$(__git_refs)" "" "${cur##--set-upstream-to=}"
;;
--*)
__gitcomp "
@@ -1048,7 +1045,7 @@ _git_checkout ()
_git_cherry ()
{
- __gitcomp "$(__git_refs)"
+ __gitcomp_nl "$(__git_refs)"
}
_git_cherry_pick ()
@@ -1305,7 +1302,7 @@ _git_gitk ()
}
__git_match_ctag() {
- awk "/^${1////\\/}/ { print \$1 }" "$2"
+ awk "/^${1//\//\\/}/ { print \$1 }" "$2"
}
_git_grep ()
@@ -1693,6 +1690,7 @@ _git_rebase ()
--committer-date-is-author-date --ignore-date
--ignore-whitespace --whitespace=
--autosquash --fork-point --no-fork-point
+ --autostash
"
return
@@ -1875,6 +1873,10 @@ _git_config ()
__gitcomp "$__git_send_email_suppresscc_options"
return
;;
+ sendemail.transferencoding)
+ __gitcomp "7bit 8bit quoted-printable base64"
+ return
+ ;;
--get|--get-all|--unset|--unset-all)
__gitcomp_nl "$(__git_config_get_set_variables)"
return
@@ -2009,6 +2011,7 @@ _git_config ()
color.status.changed
color.status.header
color.status.nobranch
+ color.status.unmerged
color.status.untracked
color.status.updated
color.ui
@@ -2548,6 +2551,16 @@ _git_tag ()
__gitcomp_nl "$(__git_refs)"
;;
esac
+
+ case "$cur" in
+ --*)
+ __gitcomp "
+ --list --delete --verify --annotate --message --file
+ --sign --cleanup --local-user --force --column --sort
+ --contains --points-at
+ "
+ ;;
+ esac
}
_git_whatchanged ()
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 9f6f0fa..e255413 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -9,7 +9,7 @@
#
# If your script is somewhere else, you can configure it on your ~/.zshrc:
#
-# zstyle ':completion:*:*:git:*' script ~/.git-completion.sh
+# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
#
# The recommended way to install this script is to copy to '~/.zsh/_git', and
# then add the following to your ~/.zshrc file:
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index c5473dc..f18aedc 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -84,6 +84,11 @@
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
# the colored output of "git status -sb" and are available only when
# using __git_ps1 for PROMPT_COMMAND or precmd.
+#
+# If you would like __git_ps1 to do nothing in the case when the current
+# directory is set up to be ignored by git, then set
+# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the
+# repository level by setting bash.hideIfPwdIgnored to "false".
# check whether printf supports -v
__git_printf_supports_v=
@@ -270,7 +275,7 @@ __git_ps1_colorize_gitstring ()
__git_eread ()
{
- f="$1"
+ local f="$1"
shift
test -r "$f" && read "$@" <"$f"
}
@@ -288,6 +293,8 @@ __git_eread ()
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
__git_ps1 ()
{
+ # preserve exit status
+ local exit=$?
local pcmode=no
local detached=no
local ps1pc_start='\u@\h:\w '
@@ -299,10 +306,14 @@ __git_ps1 ()
ps1pc_start="$1"
ps1pc_end="$2"
printf_format="${3:-$printf_format}"
+ # set PS1 to a plain prompt so that we can
+ # simply return early if the prompt should not
+ # be decorated
+ PS1="$ps1pc_start$ps1pc_end"
;;
0|1) printf_format="${1:-$printf_format}"
;;
- *) return
+ *) return $exit
;;
esac
@@ -350,11 +361,7 @@ __git_ps1 ()
rev_parse_exit_code="$?"
if [ -z "$repo_info" ]; then
- if [ $pcmode = yes ]; then
- #In PC mode PS1 always needs to be set
- PS1="$ps1pc_start$ps1pc_end"
- fi
- return
+ return $exit
fi
local short_sha
@@ -369,6 +376,14 @@ __git_ps1 ()
local inside_gitdir="${repo_info##*$'\n'}"
local g="${repo_info%$'\n'*}"
+ if [ "true" = "$inside_worktree" ] &&
+ [ -n "${GIT_PS1_HIDE_IF_PWD_IGNORED-}" ] &&
+ [ "$(git config --bool bash.hideIfPwdIgnored)" != "false" ] &&
+ git check-ignore -q .
+ then
+ return $exit
+ fi
+
local r=""
local b=""
local step=""
@@ -412,10 +427,7 @@ __git_ps1 ()
else
local head=""
if ! __git_eread "$g/HEAD" head; then
- if [ $pcmode = yes ]; then
- PS1="$ps1pc_start$ps1pc_end"
- fi
- return
+ return $exit
fi
# is it a symbolic ref?
b="${head#ref: }"
@@ -475,7 +487,7 @@ __git_ps1 ()
if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
[ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
- git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
+ git ls-files --others --exclude-standard --error-unmatch -- ':/*' >/dev/null 2>/dev/null
then
u="%${ZSH_VERSION+%}"
fi
@@ -511,4 +523,6 @@ __git_ps1 ()
else
printf -- "$printf_format" "$gitstring"
fi
+
+ return $exit
}
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index a1d38f0..0061340 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -111,14 +111,23 @@ static void write_item(const char *what, LPCWSTR wbuf, int wlen)
* Match an (optional) expected string and a delimiter in the target string,
* consuming the matched text by updating the target pointer.
*/
-static int match_part(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
+
+static LPCWSTR wcsstr_last(LPCWSTR str, LPCWSTR find)
+{
+ LPCWSTR res = NULL, pos;
+ for (pos = wcsstr(str, find); pos; pos = wcsstr(pos + 1, find))
+ res = pos;
+ return res;
+}
+
+static int match_part_with_last(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim, int last)
{
LPCWSTR delim_pos, start = *ptarget;
int len;
/* find start of delimiter (or end-of-string if delim is empty) */
if (*delim)
- delim_pos = wcsstr(start, delim);
+ delim_pos = last ? wcsstr_last(start, delim) : wcsstr(start, delim);
else
delim_pos = start + wcslen(start);
@@ -138,6 +147,16 @@ static int match_part(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
return !want || (!wcsncmp(want, start, len) && !want[len]);
}
+static int match_part(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
+{
+ return match_part_with_last(ptarget, want, delim, 0);
+}
+
+static int match_part_last(LPCWSTR *ptarget, LPCWSTR want, LPCWSTR delim)
+{
+ return match_part_with_last(ptarget, want, delim, 1);
+}
+
static int match_cred(const CREDENTIALW *cred)
{
LPCWSTR target = cred->TargetName;
@@ -146,7 +165,7 @@ static int match_cred(const CREDENTIALW *cred)
return match_part(&target, L"git", L":") &&
match_part(&target, protocol, L"://") &&
- match_part(&target, wusername, L"@") &&
+ match_part_last(&target, wusername, L"@") &&
match_part(&target, host, L"/") &&
match_part(&target, path, L"");
}
diff --git a/contrib/diff-highlight/README b/contrib/diff-highlight/README
index 502e03b..836b97a 100644
--- a/contrib/diff-highlight/README
+++ b/contrib/diff-highlight/README
@@ -58,6 +58,47 @@ following in your git configuration:
diff = diff-highlight | less
---------------------------------------------
+
+Color Config
+------------
+
+You can configure the highlight colors and attributes using git's
+config. The colors for "old" and "new" lines can be specified
+independently. There are two "modes" of configuration:
+
+ 1. You can specify a "highlight" color and a matching "reset" color.
+ This will retain any existing colors in the diff, and apply the
+ "highlight" and "reset" colors before and after the highlighted
+ portion.
+
+ 2. You can specify a "normal" color and a "highlight" color. In this
+ case, existing colors are dropped from that line. The non-highlighted
+ bits of the line get the "normal" color, and the highlights get the
+ "highlight" color.
+
+If no "new" colors are specified, they default to the "old" colors. If
+no "old" colors are specified, the default is to reverse the foreground
+and background for highlighted portions.
+
+Examples:
+
+---------------------------------------------
+# Underline highlighted portions
+[color "diff-highlight"]
+oldHighlight = ul
+oldReset = noul
+---------------------------------------------
+
+---------------------------------------------
+# Varying background intensities
+[color "diff-highlight"]
+oldNormal = "black #f8cbcb"
+oldHighlight = "black #ffaaaa"
+newNormal = "black #cbeecb"
+newHighlight = "black #aaffaa"
+---------------------------------------------
+
+
Bugs
----
diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
index 69a652e..ffefc31 100755
--- a/contrib/diff-highlight/diff-highlight
+++ b/contrib/diff-highlight/diff-highlight
@@ -1,12 +1,23 @@
#!/usr/bin/perl
+use 5.008;
use warnings FATAL => 'all';
use strict;
# Highlight by reversing foreground and background. You could do
# other things like bold or underline if you prefer.
-my $HIGHLIGHT = "\x1b[7m";
-my $UNHIGHLIGHT = "\x1b[27m";
+my @OLD_HIGHLIGHT = (
+ color_config('color.diff-highlight.oldnormal'),
+ color_config('color.diff-highlight.oldhighlight', "\x1b[7m"),
+ color_config('color.diff-highlight.oldreset', "\x1b[27m")
+);
+my @NEW_HIGHLIGHT = (
+ color_config('color.diff-highlight.newnormal', $OLD_HIGHLIGHT[0]),
+ color_config('color.diff-highlight.newhighlight', $OLD_HIGHLIGHT[1]),
+ color_config('color.diff-highlight.newreset', $OLD_HIGHLIGHT[2])
+);
+
+my $RESET = "\x1b[m";
my $COLOR = qr/\x1b\[[0-9;]*m/;
my $BORING = qr/$COLOR|\s/;
@@ -57,6 +68,17 @@ show_hunk(\@removed, \@added);
exit 0;
+# Ideally we would feed the default as a human-readable color to
+# git-config as the fallback value. But diff-highlight does
+# not otherwise depend on git at all, and there are reports
+# of it being used in other settings. Let's handle our own
+# fallback, which means we will work even if git can't be run.
+sub color_config {
+ my ($key, $default) = @_;
+ my $s = `git config --get-color $key 2>/dev/null`;
+ return length($s) ? $s : $default;
+}
+
sub show_hunk {
my ($a, $b) = @_;
@@ -132,8 +154,8 @@ sub highlight_pair {
}
if (is_pair_interesting(\@a, $pa, $sa, \@b, $pb, $sb)) {
- return highlight_line(\@a, $pa, $sa),
- highlight_line(\@b, $pb, $sb);
+ return highlight_line(\@a, $pa, $sa, \@OLD_HIGHLIGHT),
+ highlight_line(\@b, $pb, $sb, \@NEW_HIGHLIGHT);
}
else {
return join('', @a),
@@ -143,20 +165,39 @@ sub highlight_pair {
sub split_line {
local $_ = shift;
- return map { /$COLOR/ ? $_ : (split //) }
- split /($COLOR*)/;
+ return utf8::decode($_) ?
+ map { utf8::encode($_); $_ }
+ map { /$COLOR/ ? $_ : (split //) }
+ split /($COLOR+)/ :
+ map { /$COLOR/ ? $_ : (split //) }
+ split /($COLOR+)/;
}
sub highlight_line {
- my ($line, $prefix, $suffix) = @_;
-
- return join('',
- @{$line}[0..($prefix-1)],
- $HIGHLIGHT,
- @{$line}[$prefix..$suffix],
- $UNHIGHLIGHT,
- @{$line}[($suffix+1)..$#$line]
- );
+ my ($line, $prefix, $suffix, $theme) = @_;
+
+ my $start = join('', @{$line}[0..($prefix-1)]);
+ my $mid = join('', @{$line}[$prefix..$suffix]);
+ my $end = join('', @{$line}[($suffix+1)..$#$line]);
+
+ # If we have a "normal" color specified, then take over the whole line.
+ # Otherwise, we try to just manipulate the highlighted bits.
+ if (defined $theme->[0]) {
+ s/$COLOR//g for ($start, $mid, $end);
+ chomp $end;
+ return join('',
+ $theme->[0], $start, $RESET,
+ $theme->[1], $mid, $RESET,
+ $theme->[0], $end, $RESET,
+ "\n"
+ );
+ } else {
+ return join('',
+ $start,
+ $theme->[1], $mid, $theme->[2],
+ $end
+ );
+ }
}
# Pairs are interesting to highlight only if we are going to end up
diff --git a/contrib/subtree/git-subtree.txt b/contrib/subtree/git-subtree.txt
index 8272100..54e4b4a 100644
--- a/contrib/subtree/git-subtree.txt
+++ b/contrib/subtree/git-subtree.txt
@@ -81,12 +81,11 @@ merge::
changes into the latest <commit>. With '--squash',
creates only one commit that contains all the changes,
rather than merging in the entire history.
-
- If you use '--squash', the merge direction doesn't
- always have to be forward; you can use this command to
- go back in time from v2.5 to v2.4, for example. If your
- merge introduces a conflict, you can resolve it in the
- usual ways.
++
+If you use '--squash', the merge direction doesn't always have to be
+forward; you can use this command to go back in time from v2.5 to v2.4,
+for example. If your merge introduces a conflict, you can resolve it in
+the usual ways.
pull::
Exactly like 'merge', but parallels 'git pull' in that
@@ -107,21 +106,19 @@ split::
contents of <prefix> at the root of the project instead
of in a subdirectory. Thus, the newly created history
is suitable for export as a separate git repository.
-
- After splitting successfully, a single commit id is
- printed to stdout. This corresponds to the HEAD of the
- newly created tree, which you can manipulate however you
- want.
-
- Repeated splits of exactly the same history are
- guaranteed to be identical (i.e. to produce the same
- commit ids). Because of this, if you add new commits
- and then re-split, the new commits will be attached as
- commits on top of the history you generated last time,
- so 'git merge' and friends will work as expected.
-
- Note that if you use '--squash' when you merge, you
- should usually not just '--rejoin' when you split.
++
+After splitting successfully, a single commit id is printed to stdout.
+This corresponds to the HEAD of the newly created tree, which you can
+manipulate however you want.
++
+Repeated splits of exactly the same history are guaranteed to be
+identical (i.e. to produce the same commit ids). Because of this, if
+you add new commits and then re-split, the new commits will be attached
+as commits on top of the history you generated last time, so 'git merge'
+and friends will work as expected.
++
+Note that if you use '--squash' when you merge, you should usually not
+just '--rejoin' when you split.
OPTIONS
@@ -151,109 +148,96 @@ OPTIONS FOR add, merge, push, pull
--squash::
This option is only valid for add, merge, push and pull
commands.
-
- Instead of merging the entire history from the subtree
- project, produce only a single commit that contains all
- the differences you want to merge, and then merge that
- new commit into your project.
-
- Using this option helps to reduce log clutter. People
- rarely want to see every change that happened between
- v1.0 and v1.1 of the library they're using, since none of the
- interim versions were ever included in their application.
-
- Using '--squash' also helps avoid problems when the same
- subproject is included multiple times in the same
- project, or is removed and then re-added. In such a
- case, it doesn't make sense to combine the histories
- anyway, since it's unclear which part of the history
- belongs to which subtree.
-
- Furthermore, with '--squash', you can switch back and
- forth between different versions of a subtree, rather
- than strictly forward. 'git subtree merge --squash'
- always adjusts the subtree to match the exactly
- specified commit, even if getting to that commit would
- require undoing some changes that were added earlier.
-
- Whether or not you use '--squash', changes made in your
- local repository remain intact and can be later split
- and send upstream to the subproject.
++
+Instead of merging the entire history from the subtree project, produce
+only a single commit that contains all the differences you want to
+merge, and then merge that new commit into your project.
++
+Using this option helps to reduce log clutter. People rarely want to see
+every change that happened between v1.0 and v1.1 of the library they're
+using, since none of the interim versions were ever included in their
+application.
++
+Using '--squash' also helps avoid problems when the same subproject is
+included multiple times in the same project, or is removed and then
+re-added. In such a case, it doesn't make sense to combine the
+histories anyway, since it's unclear which part of the history belongs
+to which subtree.
++
+Furthermore, with '--squash', you can switch back and forth between
+different versions of a subtree, rather than strictly forward. 'git
+subtree merge --squash' always adjusts the subtree to match the exactly
+specified commit, even if getting to that commit would require undoing
+some changes that were added earlier.
++
+Whether or not you use '--squash', changes made in your local repository
+remain intact and can be later split and send upstream to the
+subproject.
OPTIONS FOR split
-----------------
--annotate=<annotation>::
This option is only valid for the split command.
-
- When generating synthetic history, add <annotation> as a
- prefix to each commit message. Since we're creating new
- commits with the same commit message, but possibly
- different content, from the original commits, this can help
- to differentiate them and avoid confusion.
-
- Whenever you split, you need to use the same
- <annotation>, or else you don't have a guarantee that
- the new re-created history will be identical to the old
- one. That will prevent merging from working correctly.
- git subtree tries to make it work anyway, particularly
- if you use --rejoin, but it may not always be effective.
++
+When generating synthetic history, add <annotation> as a prefix to each
+commit message. Since we're creating new commits with the same commit
+message, but possibly different content, from the original commits, this
+can help to differentiate them and avoid confusion.
++
+Whenever you split, you need to use the same <annotation>, or else you
+don't have a guarantee that the new re-created history will be identical
+to the old one. That will prevent merging from working correctly. git
+subtree tries to make it work anyway, particularly if you use --rejoin,
+but it may not always be effective.
-b <branch>::
--branch=<branch>::
This option is only valid for the split command.
-
- After generating the synthetic history, create a new
- branch called <branch> that contains the new history.
- This is suitable for immediate pushing upstream.
- <branch> must not already exist.
++
+After generating the synthetic history, create a new branch called
+<branch> that contains the new history. This is suitable for immediate
+pushing upstream. <branch> must not already exist.
--ignore-joins::
This option is only valid for the split command.
-
- If you use '--rejoin', git subtree attempts to optimize
- its history reconstruction to generate only the new
- commits since the last '--rejoin'. '--ignore-join'
- disables this behaviour, forcing it to regenerate the
- entire history. In a large project, this can take a
- long time.
++
+If you use '--rejoin', git subtree attempts to optimize its history
+reconstruction to generate only the new commits since the last
+'--rejoin'. '--ignore-join' disables this behaviour, forcing it to
+regenerate the entire history. In a large project, this can take a long
+time.
--onto=<onto>::
This option is only valid for the split command.
-
- If your subtree was originally imported using something
- other than git subtree, its history may not match what
- git subtree is expecting. In that case, you can specify
- the commit id <onto> that corresponds to the first
- revision of the subproject's history that was imported
- into your project, and git subtree will attempt to build
- its history from there.
-
- If you used 'git subtree add', you should never need
- this option.
++
+If your subtree was originally imported using something other than git
+subtree, its history may not match what git subtree is expecting. In
+that case, you can specify the commit id <onto> that corresponds to the
+first revision of the subproject's history that was imported into your
+project, and git subtree will attempt to build its history from there.
++
+If you used 'git subtree add', you should never need this option.
--rejoin::
This option is only valid for the split command.
-
- After splitting, merge the newly created synthetic
- history back into your main project. That way, future
- splits can search only the part of history that has
- been added since the most recent --rejoin.
-
- If your split commits end up merged into the upstream
- subproject, and then you want to get the latest upstream
- version, this will allow git's merge algorithm to more
- intelligently avoid conflicts (since it knows these
- synthetic commits are already part of the upstream
- repository).
-
- Unfortunately, using this option results in 'git log'
- showing an extra copy of every new commit that was
- created (the original, and the synthetic one).
-
- If you do all your merges with '--squash', don't use
- '--rejoin' when you split, because you don't want the
- subproject's history to be part of your project anyway.
++
+After splitting, merge the newly created synthetic history back into
+your main project. That way, future splits can search only the part of
+history that has been added since the most recent --rejoin.
++
+If your split commits end up merged into the upstream subproject, and
+then you want to get the latest upstream version, this will allow git's
+merge algorithm to more intelligently avoid conflicts (since it knows
+these synthetic commits are already part of the upstream repository).
++
+Unfortunately, using this option results in 'git log' showing an extra
+copy of every new commit that was created (the original, and the
+synthetic one).
++
+If you do all your merges with '--squash', don't use '--rejoin' when you
+split, because you don't want the subproject's history to be part of
+your project anyway.
EXAMPLE 1. Add command
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index 75e8b25..888c34a 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -10,6 +10,10 @@ die () {
exit 128
}
+failed () {
+ die "unable to create new workdir '$new_workdir'!"
+}
+
if test $# -lt 2 || test $# -gt 3
then
usage "$0 <repository> <new_workdir> [<branch>]"
@@ -35,7 +39,7 @@ esac
# don't link to a configured bare repository
isbare=$(git --git-dir="$git_dir" config --bool --get core.bare)
-if test ztrue = z$isbare
+if test ztrue = "z$isbare"
then
die "\"$git_dir\" has core.bare set to true," \
" remove from \"$git_dir/config\" to use $0"
@@ -48,35 +52,54 @@ then
"a complete repository."
fi
-# don't recreate a workdir over an existing repository
-if test -e "$new_workdir"
+# make sure the links in the workdir have full paths to the original repo
+git_dir=$(cd "$git_dir" && pwd) || exit 1
+
+# don't recreate a workdir over an existing directory, unless it's empty
+if test -d "$new_workdir"
then
- die "destination directory '$new_workdir' already exists."
+ if test $(ls -a1 "$new_workdir/." | wc -l) -ne 2
+ then
+ die "destination directory '$new_workdir' is not empty."
+ fi
+ cleandir="$new_workdir/.git"
+else
+ cleandir="$new_workdir"
fi
-# make sure the links use full paths
-git_dir=$(cd "$git_dir"; pwd)
+mkdir -p "$new_workdir/.git" || failed
+cleandir=$(cd "$cleandir" && pwd) || failed
-# create the workdir
-mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
+cleanup () {
+ rm -rf "$cleandir"
+}
+siglist="0 1 2 15"
+trap cleanup $siglist
# create the links to the original repo. explicitly exclude index, HEAD and
# logs/HEAD from the list since they are purely related to the current working
# directory, and should not be shared.
for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
do
+ # create a containing directory if needed
case $x in
*/*)
- mkdir -p "$(dirname "$new_workdir/.git/$x")"
+ mkdir -p "$new_workdir/.git/${x%/*}"
;;
esac
- ln -s "$git_dir/$x" "$new_workdir/.git/$x"
+
+ ln -s "$git_dir/$x" "$new_workdir/.git/$x" || failed
done
-# now setup the workdir
-cd "$new_workdir"
+# commands below this are run in the context of the new workdir
+cd "$new_workdir" || failed
+
# copy the HEAD from the original repository as a default branch
-cp "$git_dir/HEAD" .git/HEAD
-# checkout the branch (either the same as HEAD from the original repository, or
-# the one that was asked for)
+cp "$git_dir/HEAD" .git/HEAD || failed
+
+# the workdir is set up. if the checkout fails, the user can fix it.
+trap - $siglist
+
+# checkout the branch (either the same as HEAD from the original repository,
+# or the one that was asked for)
git checkout -f $branch
diff --git a/credential.c b/credential.c
index 1886ea5..b146ad8 100644
--- a/credential.c
+++ b/credential.c
@@ -173,6 +173,8 @@ int credential_read(struct credential *c, FILE *fp)
c->path = xstrdup(value);
} else if (!strcmp(key, "url")) {
credential_from_url(c, value);
+ } else if (!strcmp(key, "quit")) {
+ c->quit = !!git_config_bool("quit", value);
}
/*
* Ignore other lines; we don't know what they mean, but
@@ -274,6 +276,9 @@ void credential_fill(struct credential *c)
credential_do(c, c->helpers.items[i].string, "get");
if (c->username && c->password)
return;
+ if (c->quit)
+ die("credential helper '%s' told us to quit",
+ c->helpers.items[i].string);
}
credential_getpass(c);
diff --git a/credential.h b/credential.h
index 0c3e85e..6b0cd16 100644
--- a/credential.h
+++ b/credential.h
@@ -7,6 +7,7 @@ struct credential {
struct string_list helpers;
unsigned approved:1,
configured:1,
+ quit:1,
use_http_path:1;
char *username;
diff --git a/csum-file.c b/csum-file.c
index b00b215..a172199 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -130,14 +130,10 @@ struct sha1file *sha1fd_check(const char *name)
sink = open("/dev/null", O_WRONLY);
if (sink < 0)
- return NULL;
+ die_errno("unable to open /dev/null");
check = open(name, O_RDONLY);
- if (check < 0) {
- int saved_errno = errno;
- close(sink);
- errno = saved_errno;
- return NULL;
- }
+ if (check < 0)
+ die_errno("unable to open '%s'", name);
f = sha1fd(sink, name);
f->check_fd = check;
return f;
diff --git a/csum-file.h b/csum-file.h
index bb543d5..7530927 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -39,4 +39,15 @@ extern void sha1flush(struct sha1file *f);
extern void crc32_begin(struct sha1file *);
extern uint32_t crc32_end(struct sha1file *);
+static inline void sha1write_u8(struct sha1file *f, uint8_t data)
+{
+ sha1write(f, &data, sizeof(data));
+}
+
+static inline void sha1write_be32(struct sha1file *f, uint32_t data)
+{
+ data = htonl(data);
+ sha1write(f, &data, sizeof(data));
+}
+
#endif
diff --git a/ctype.c b/ctype.c
index 0bfebb4..fc0225c 100644
--- a/ctype.c
+++ b/ctype.c
@@ -30,7 +30,7 @@ const unsigned char sane_ctype[256] = {
};
/* For case-insensitive kwset */
-const char tolower_trans_tbl[256] = {
+const unsigned char tolower_trans_tbl[256] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/daemon.c b/daemon.c
index 54a03bd..c3edd96 100644
--- a/daemon.c
+++ b/daemon.c
@@ -61,6 +61,22 @@ static char *canon_hostname;
static char *ip_address;
static char *tcp_port;
+static int hostname_lookup_done;
+
+static void lookup_hostname(void);
+
+static const char *get_canon_hostname(void)
+{
+ lookup_hostname();
+ return canon_hostname;
+}
+
+static const char *get_ip_address(void)
+{
+ lookup_hostname();
+ return ip_address;
+}
+
static void logreport(int priority, const char *err, va_list params)
{
if (log_syslog) {
@@ -106,6 +122,46 @@ static void NORETURN daemon_die(const char *err, va_list params)
exit(1);
}
+static void strbuf_addstr_or_null(struct strbuf *sb, const char *s)
+{
+ if (s)
+ strbuf_addstr(sb, s);
+}
+
+struct expand_path_context {
+ const char *directory;
+};
+
+static size_t expand_path(struct strbuf *sb, const char *placeholder, void *ctx)
+{
+ struct expand_path_context *context = ctx;
+
+ switch (placeholder[0]) {
+ case 'H':
+ strbuf_addstr_or_null(sb, hostname);
+ return 1;
+ case 'C':
+ if (placeholder[1] == 'H') {
+ strbuf_addstr_or_null(sb, get_canon_hostname());
+ return 2;
+ }
+ break;
+ case 'I':
+ if (placeholder[1] == 'P') {
+ strbuf_addstr_or_null(sb, get_ip_address());
+ return 2;
+ }
+ break;
+ case 'P':
+ strbuf_addstr_or_null(sb, tcp_port);
+ return 1;
+ case 'D':
+ strbuf_addstr(sb, context->directory);
+ return 1;
+ }
+ return 0;
+}
+
static const char *path_ok(const char *directory)
{
static char rpath[PATH_MAX];
@@ -144,14 +200,10 @@ static const char *path_ok(const char *directory)
}
else if (interpolated_path && saw_extended_args) {
struct strbuf expanded_path = STRBUF_INIT;
- struct strbuf_expand_dict_entry dict[6];
-
- dict[0].placeholder = "H"; dict[0].value = hostname;
- dict[1].placeholder = "CH"; dict[1].value = canon_hostname;
- dict[2].placeholder = "IP"; dict[2].value = ip_address;
- dict[3].placeholder = "P"; dict[3].value = tcp_port;
- dict[4].placeholder = "D"; dict[4].value = directory;
- dict[5].placeholder = NULL; dict[5].value = NULL;
+ struct expand_path_context context;
+
+ context.directory = directory;
+
if (*dir != '/') {
/* Allow only absolute */
logerror("'%s': Non-absolute path denied (interpolated-path active)", dir);
@@ -159,7 +211,7 @@ static const char *path_ok(const char *directory)
}
strbuf_expand(&expanded_path, interpolated_path,
- strbuf_expand_dict_cb, &dict);
+ expand_path, &context);
strlcpy(interp_path, expanded_path.buf, PATH_MAX);
strbuf_release(&expanded_path);
loginfo("Interpolated dir '%s'", interp_path);
@@ -254,8 +306,8 @@ static int run_access_hook(struct daemon_service *service, const char *dir, cons
*arg++ = service->name;
*arg++ = path;
*arg++ = STRARG(hostname);
- *arg++ = STRARG(canon_hostname);
- *arg++ = STRARG(ip_address);
+ *arg++ = STRARG(get_canon_hostname());
+ *arg++ = STRARG(get_ip_address());
*arg++ = STRARG(tcp_port);
*arg = NULL;
#undef STRARG
@@ -485,6 +537,45 @@ static void parse_host_and_port(char *hostport, char **host,
}
/*
+ * Sanitize a string from the client so that it's OK to be inserted into a
+ * filesystem path. Specifically, we disallow slashes, runs of "..", and
+ * trailing and leading dots, which means that the client cannot escape
+ * our base path via ".." traversal.
+ */
+static void sanitize_client_strbuf(struct strbuf *out, const char *in)
+{
+ for (; *in; in++) {
+ if (*in == '/')
+ continue;
+ if (*in == '.' && (!out->len || out->buf[out->len - 1] == '.'))
+ continue;
+ strbuf_addch(out, *in);
+ }
+
+ while (out->len && out->buf[out->len - 1] == '.')
+ strbuf_setlen(out, out->len - 1);
+}
+
+static char *sanitize_client(const char *in)
+{
+ struct strbuf out = STRBUF_INIT;
+ sanitize_client_strbuf(&out, in);
+ return strbuf_detach(&out, NULL);
+}
+
+/*
+ * Like sanitize_client, but we also perform any canonicalization
+ * to make life easier on the admin.
+ */
+static char *canonicalize_client(const char *in)
+{
+ struct strbuf out = STRBUF_INIT;
+ sanitize_client_strbuf(&out, in);
+ strbuf_tolower(&out);
+ return strbuf_detach(&out, NULL);
+}
+
+/*
* Read the host as supplied by the client connection.
*/
static void parse_host_arg(char *extra_args, int buflen)
@@ -505,10 +596,11 @@ static void parse_host_arg(char *extra_args, int buflen)
parse_host_and_port(val, &host, &port);
if (port) {
free(tcp_port);
- tcp_port = xstrdup(port);
+ tcp_port = sanitize_client(port);
}
free(hostname);
- hostname = xstrdup_tolower(host);
+ hostname = canonicalize_client(host);
+ hostname_lookup_done = 0;
}
/* On to the next one */
@@ -517,11 +609,14 @@ static void parse_host_arg(char *extra_args, int buflen)
if (extra_args < end && *extra_args)
die("Invalid request");
}
+}
- /*
- * Locate canonical hostname and its IP address.
- */
- if (hostname) {
+/*
+ * Locate canonical hostname and its IP address.
+ */
+static void lookup_hostname(void)
+{
+ if (!hostname_lookup_done && hostname) {
#ifndef NO_IPV6
struct addrinfo hints;
struct addrinfo *ai;
@@ -541,8 +636,9 @@ static void parse_host_arg(char *extra_args, int buflen)
ip_address = xstrdup(addrbuf);
free(canon_hostname);
- canon_hostname = xstrdup(ai->ai_canonname ?
- ai->ai_canonname : ip_address);
+ canon_hostname = ai->ai_canonname ?
+ sanitize_client(ai->ai_canonname) :
+ xstrdup(ip_address);
freeaddrinfo(ai);
}
@@ -564,11 +660,12 @@ static void parse_host_arg(char *extra_args, int buflen)
addrbuf, sizeof(addrbuf));
free(canon_hostname);
- canon_hostname = xstrdup(hent->h_name);
+ canon_hostname = sanitize_client(hent->h_name);
free(ip_address);
ip_address = xstrdup(addrbuf);
}
#endif
+ hostname_lookup_done = 1;
}
}
diff --git a/diff.c b/diff.c
index d1bd534..7500c55 100644
--- a/diff.c
+++ b/diff.c
@@ -2093,7 +2093,6 @@ static unsigned char *deflate_it(char *data,
unsigned char *deflated;
git_zstream stream;
- memset(&stream, 0, sizeof(stream));
git_deflate_init(&stream, zlib_compression_level);
bound = git_deflate_bound(&stream, size);
deflated = xmalloc(bound);
@@ -4541,7 +4540,7 @@ void diff_flush(struct diff_options *options)
show_stats(&diffstat, options);
if (output_format & DIFF_FORMAT_SHORTSTAT)
show_shortstats(&diffstat, options);
- if (output_format & DIFF_FORMAT_DIRSTAT)
+ if (output_format & DIFF_FORMAT_DIRSTAT && dirstat_by_line)
show_dirstat_by_line(&diffstat, options);
free_diffstat_info(&diffstat);
separator++;
diff --git a/diffcore-break.c b/diffcore-break.c
index 1d9e530..5473493 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -246,6 +246,13 @@ static void merge_broken(struct diff_filepair *p,
dp = diff_queue(outq, d->one, c->two);
dp->score = p->score;
+ /*
+ * We will be one extra user of the same src side of the
+ * broken pair, if it was used as the rename source for other
+ * paths elsewhere. Increment to mark that the path stays
+ * in the resulting tree.
+ */
+ d->one->rename_used++;
diff_free_filespec_data(d->two);
diff_free_filespec_data(c->one);
free(d);
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 4e132f1..af1fe08 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -15,8 +15,7 @@ static struct diff_rename_dst {
} *rename_dst;
static int rename_dst_nr, rename_dst_alloc;
-static struct diff_rename_dst *locate_rename_dst(struct diff_filespec *two,
- int insert_ok)
+static int find_rename_dst(struct diff_filespec *two)
{
int first, last;
@@ -27,16 +26,33 @@ static struct diff_rename_dst *locate_rename_dst(struct diff_filespec *two,
struct diff_rename_dst *dst = &(rename_dst[next]);
int cmp = strcmp(two->path, dst->two->path);
if (!cmp)
- return dst;
+ return next;
if (cmp < 0) {
last = next;
continue;
}
first = next+1;
}
- /* not found */
- if (!insert_ok)
- return NULL;
+ return -first - 1;
+}
+
+static struct diff_rename_dst *locate_rename_dst(struct diff_filespec *two)
+{
+ int ofs = find_rename_dst(two);
+ return ofs < 0 ? NULL : &rename_dst[ofs];
+}
+
+/*
+ * Returns 0 on success, -1 if we found a duplicate.
+ */
+static int add_rename_dst(struct diff_filespec *two)
+{
+ int first = find_rename_dst(two);
+
+ if (first >= 0)
+ return -1;
+ first = -first - 1;
+
/* insert to make it at "first" */
ALLOC_GROW(rename_dst, rename_dst_nr + 1, rename_dst_alloc);
rename_dst_nr++;
@@ -46,7 +62,7 @@ static struct diff_rename_dst *locate_rename_dst(struct diff_filespec *two,
rename_dst[first].two = alloc_filespec(two->path);
fill_filespec(rename_dst[first].two, two->sha1, two->sha1_valid, two->mode);
rename_dst[first].pair = NULL;
- return &(rename_dst[first]);
+ return 0;
}
/* Table of rename/copy src files */
@@ -450,8 +466,12 @@ void diffcore_rename(struct diff_options *options)
else if (!DIFF_OPT_TST(options, RENAME_EMPTY) &&
is_empty_blob_sha1(p->two->sha1))
continue;
- else
- locate_rename_dst(p->two, 1);
+ else if (add_rename_dst(p->two) < 0) {
+ warning("skipping rename detection, detected"
+ " duplicate destination '%s'",
+ p->two->path);
+ goto cleanup;
+ }
}
else if (!DIFF_OPT_TST(options, RENAME_EMPTY) &&
is_empty_blob_sha1(p->one->sha1))
@@ -582,8 +602,7 @@ void diffcore_rename(struct diff_options *options)
* We would output this create record if it has
* not been turned into a rename/copy already.
*/
- struct diff_rename_dst *dst =
- locate_rename_dst(p->two, 0);
+ struct diff_rename_dst *dst = locate_rename_dst(p->two);
if (dst && dst->pair) {
diff_q(&outq, dst->pair);
pair_to_free = p;
@@ -613,8 +632,7 @@ void diffcore_rename(struct diff_options *options)
*/
if (DIFF_PAIR_BROKEN(p)) {
/* broken delete */
- struct diff_rename_dst *dst =
- locate_rename_dst(p->one, 0);
+ struct diff_rename_dst *dst = locate_rename_dst(p->one);
if (dst && dst->pair)
/* counterpart is now rename/copy */
pair_to_free = p;
diff --git a/dir.c b/dir.c
index 3f7a025..0943a81 100644
--- a/dir.c
+++ b/dir.c
@@ -377,6 +377,49 @@ int match_pathspec(const struct pathspec *ps,
return negative ? 0 : positive;
}
+int report_path_error(const char *ps_matched,
+ const struct pathspec *pathspec,
+ const char *prefix)
+{
+ /*
+ * Make sure all pathspec matched; otherwise it is an error.
+ */
+ struct strbuf sb = STRBUF_INIT;
+ int num, errors = 0;
+ for (num = 0; num < pathspec->nr; num++) {
+ int other, found_dup;
+
+ if (ps_matched[num])
+ continue;
+ /*
+ * The caller might have fed identical pathspec
+ * twice. Do not barf on such a mistake.
+ * FIXME: parse_pathspec should have eliminated
+ * duplicate pathspec.
+ */
+ for (found_dup = other = 0;
+ !found_dup && other < pathspec->nr;
+ other++) {
+ if (other == num || !ps_matched[other])
+ continue;
+ if (!strcmp(pathspec->items[other].original,
+ pathspec->items[num].original))
+ /*
+ * Ok, we have a match already.
+ */
+ found_dup = 1;
+ }
+ if (found_dup)
+ continue;
+
+ error("pathspec '%s' did not match any file(s) known to git.",
+ pathspec->items[num].original);
+ errors++;
+ }
+ strbuf_release(&sb);
+ return errors;
+}
+
/*
* Return the length of the "simple" part of a path match limiter.
*/
diff --git a/dir.h b/dir.h
index 6c45e9d..72b73c6 100644
--- a/dir.h
+++ b/dir.h
@@ -137,6 +137,7 @@ extern char *common_prefix(const struct pathspec *pathspec);
extern int match_pathspec(const struct pathspec *pathspec,
const char *name, int namelen,
int prefix, char *seen, int is_dir);
+extern int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
extern int within_depth(const char *name, int namelen, int depth, int max_depth);
extern int fill_directory(struct dir_struct *dir, const struct pathspec *pathspec);
diff --git a/environment.c b/environment.c
index 1ade5c9..a40044c 100644
--- a/environment.c
+++ b/environment.c
@@ -24,6 +24,7 @@ int is_bare_repository_cfg = -1; /* unspecified */
int log_all_ref_updates = -1; /* unspecified */
int warn_ambiguous_refs = 1;
int warn_on_object_refname_ambiguity = 1;
+int ref_paranoia = -1;
int repository_format_version;
const char *git_commit_encoding;
const char *git_log_output_encoding;
diff --git a/ewah/ewok.h b/ewah/ewok.h
index f6ad190..13c6e20 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -47,7 +47,8 @@ static inline uint32_t ewah_bit_popcount64(uint64_t x)
return (x * 0x0101010101010101ULL) >> 56;
}
-#ifdef __GNUC__
+/* __builtin_ctzll was not available until 3.4.0 */
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 3))
#define ewah_bit_ctz64(x) __builtin_ctzll(x)
#else
static inline int ewah_bit_ctz64(uint64_t x)
diff --git a/exec_cmd.c b/exec_cmd.c
index 698e752..8ab37b5 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -6,7 +6,7 @@
static const char *argv_exec_path;
static const char *argv0_path;
-const char *system_path(const char *path)
+char *system_path(const char *path)
{
#ifdef RUNTIME_PREFIX
static const char *prefix;
@@ -16,7 +16,7 @@ const char *system_path(const char *path)
struct strbuf d = STRBUF_INIT;
if (is_absolute_path(path))
- return path;
+ return xstrdup(path);
#ifdef RUNTIME_PREFIX
assert(argv0_path);
@@ -34,8 +34,7 @@ const char *system_path(const char *path)
#endif
strbuf_addf(&d, "%s/%s", prefix, path);
- path = strbuf_detach(&d, NULL);
- return path;
+ return strbuf_detach(&d, NULL);
}
const char *git_extract_argv0_path(const char *argv0)
diff --git a/exec_cmd.h b/exec_cmd.h
index e4c9702..93b0c02 100644
--- a/exec_cmd.h
+++ b/exec_cmd.h
@@ -9,6 +9,6 @@ extern const char **prepare_git_cmd(const char **argv);
extern int execv_git_cmd(const char **argv); /* NULL terminated */
LAST_ARG_MUST_BE_NULL
extern int execl_git_cmd(const char *cmd, ...);
-extern const char *system_path(const char *path);
+extern char *system_path(const char *path);
#endif /* GIT_EXEC_CMD_H */
diff --git a/fast-import.c b/fast-import.c
index d0bd285..77fb2ff 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -947,9 +947,12 @@ static void unkeep_all_packs(void)
static void end_packfile(void)
{
- if (!pack_data)
+ static int running;
+
+ if (running || !pack_data)
return;
+ running = 1;
clear_delta_base_cache();
if (object_count) {
struct packed_git *new_p;
@@ -999,6 +1002,7 @@ static void end_packfile(void)
}
free(pack_data);
pack_data = NULL;
+ running = 0;
/* We can't carry a delta across packfiles. */
strbuf_release(&last_blob.data);
@@ -1058,7 +1062,6 @@ static int store_object(
} else
delta = NULL;
- memset(&s, 0, sizeof(s));
git_deflate_init(&s, pack_compression_level);
if (delta) {
s.next_in = delta;
@@ -1086,7 +1089,6 @@ static int store_object(
free(delta);
delta = NULL;
- memset(&s, 0, sizeof(s));
git_deflate_init(&s, pack_compression_level);
s.next_in = (void *)dat->buf;
s.avail_in = dat->len;
@@ -1186,7 +1188,6 @@ static void stream_blob(uintmax_t len, unsigned char *sha1out, uintmax_t mark)
crc32_begin(pack_file);
- memset(&s, 0, sizeof(s));
git_deflate_init(&s, pack_compression_level);
hdrlen = encode_in_pack_object_header(OBJ_BLOB, len, out_buf);
diff --git a/fetch-pack.c b/fetch-pack.c
index 655ee64..48526aa 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -544,16 +544,19 @@ static void filter_refs(struct fetch_pack_args *args,
/* Append unmatched requests to the list */
if (allow_tip_sha1_in_want) {
for (i = 0; i < nr_sought; i++) {
+ unsigned char sha1[20];
+
ref = sought[i];
if (ref->matched)
continue;
- if (get_sha1_hex(ref->name, ref->old_sha1))
+ if (get_sha1_hex(ref->name, sha1) ||
+ ref->name[40] != '\0' ||
+ hashcmp(sha1, ref->old_sha1))
continue;
ref->matched = 1;
- *newtail = ref;
- ref->next = NULL;
- newtail = &ref->next;
+ *newtail = copy_ref(ref);
+ newtail = &(*newtail)->next;
}
}
*refs = newlist;
@@ -625,7 +628,6 @@ static int everything_local(struct fetch_pack_args *args,
for (retval = 1, ref = *refs; ref ; ref = ref->next) {
const unsigned char *remote = ref->old_sha1;
- unsigned char local[20];
struct object *o;
o = lookup_object(remote);
@@ -638,8 +640,6 @@ static int everything_local(struct fetch_pack_args *args,
ref->name);
continue;
}
-
- hashcpy(ref->new_sha1, local);
if (!args->verbose)
continue;
fprintf(stderr,
diff --git a/fsck.c b/fsck.c
index 0324194..10bcb65 100644
--- a/fsck.c
+++ b/fsck.c
@@ -426,7 +426,8 @@ static int fsck_tag_buffer(struct tag *tag, const char *data,
}
strbuf_addf(&sb, "refs/tags/%.*s", (int)(eol - buffer), buffer);
if (check_refname_format(sb.buf, 0))
- error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %s", buffer);
+ error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %.*s",
+ (int)(eol - buffer), buffer);
buffer = eol + 1;
if (!skip_prefix(buffer, "tagger ", &buffer))
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 1fadd69..77876d4 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -515,6 +515,9 @@ sub error_msg {
sub list_and_choose {
my ($opts, @stuff) = @_;
my (@chosen, @return);
+ if (!@stuff) {
+ return @return;
+ }
my $i;
my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY};
@@ -725,6 +728,8 @@ sub add_untracked_cmd {
if (@add) {
system(qw(git update-index --add --), @add);
say_n_paths('added', @add);
+ } else {
+ print "No untracked files.\n";
}
print "\n";
}
@@ -1356,6 +1361,7 @@ sub patch_update_file {
$patch_mode_flavour{TARGET},
" [y,n,q,a,d,/$other,?]? ";
my $line = prompt_single_character;
+ last unless defined $line;
if ($line) {
if ($line =~ /^y/i) {
$hunk[$ix]{USE} = 1;
diff --git a/git-am.sh b/git-am.sh
index ee61a77..a67d0f9 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -17,6 +17,7 @@ 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-non-patch pass -b flag to git-mailinfo
+m,message-id pass -m 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
@@ -371,13 +372,18 @@ split_patches () {
prec=4
dotest="$GIT_DIR/rebase-apply"
sign= utf8=t keep= keepcr= skip= interactive= resolved= rebasing= abort=
-resolvemsg= resume= scissors= no_inbody_headers=
+messageid= resolvemsg= resume= scissors= no_inbody_headers=
git_apply_opt=
committer_date_is_author_date=
ignore_date=
allow_rerere_autoupdate=
gpg_sign_opt=
+if test "$(git config --bool --get am.messageid)" = true
+then
+ messageid=t
+fi
+
if test "$(git config --bool --get am.keepcr)" = true
then
keepcr=t
@@ -400,6 +406,10 @@ it will be removed. Please do not use it anymore."
utf8=t ;; # this is now default
--no-utf8)
utf8= ;;
+ -m|--message-id)
+ messageid=t ;;
+ --no-message-id)
+ messageid=f ;;
-k|--keep)
keep=t ;;
--keep-non-patch)
@@ -567,6 +577,7 @@ Use \"git am --abort\" to remove it.")"
echo "$sign" >"$dotest/sign"
echo "$utf8" >"$dotest/utf8"
echo "$keep" >"$dotest/keep"
+ echo "$messageid" >"$dotest/messageid"
echo "$scissors" >"$dotest/scissors"
echo "$no_inbody_headers" >"$dotest/no_inbody_headers"
echo "$GIT_QUIET" >"$dotest/quiet"
@@ -621,6 +632,12 @@ b)
*)
keep= ;;
esac
+case "$(cat "$dotest/messageid")" in
+t)
+ messageid=-m ;;
+f)
+ messageid= ;;
+esac
case "$(cat "$dotest/scissors")" in
t)
scissors=--scissors ;;
@@ -692,7 +709,7 @@ do
get_author_ident_from_commit "$commit" >"$dotest/author-script"
git diff-tree --root --binary --full-index "$commit" >"$dotest/patch"
else
- git mailinfo $keep $no_inbody_headers $scissors $utf8 "$dotest/msg" "$dotest/patch" \
+ git mailinfo $keep $no_inbody_headers $messageid $scissors $utf8 "$dotest/msg" "$dotest/patch" \
<"$dotest/$msgnum" >"$dotest/info" ||
stop_here $this
diff --git a/git-bisect.sh b/git-bisect.sh
index 6cda2b5..2fc07ac 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -237,15 +237,18 @@ bisect_state() {
check_expected_revs "$rev" ;;
2,bad|*,good|*,skip)
shift
- eval=''
+ hash_list=''
for rev in "$@"
do
sha=$(git rev-parse --verify "$rev^{commit}") ||
die "$(eval_gettext "Bad rev input: \$rev")"
- eval="$eval bisect_write '$state' '$sha'; "
+ hash_list="$hash_list $sha"
done
- eval "$eval"
- check_expected_revs "$@" ;;
+ for rev in $hash_list
+ do
+ bisect_write "$state" "$rev"
+ done
+ check_expected_revs $hash_list ;;
*,bad)
die "$(gettext "'git bisect bad' can take only one argument.")" ;;
*)
diff --git a/git-compat-util.h b/git-compat-util.h
index 400e921..35b3fe0 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -75,7 +75,8 @@
# endif
#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
!defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \
- !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__)
+ !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \
+ !defined(__CYGWIN__)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
#endif
@@ -163,16 +164,10 @@
typedef long intptr_t;
typedef unsigned long uintptr_t;
#endif
-#if defined(__CYGWIN__)
-#undef _XOPEN_SOURCE
-#include <grp.h>
-#define _XOPEN_SOURCE 600
-#else
#undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
#include <grp.h>
#define _ALL_SOURCE 1
#endif
-#endif
/* used on Mac OS X */
#ifdef PRECOMPOSE_UNICODE
@@ -211,8 +206,18 @@ extern char *gitbasename(char *);
#endif
#ifndef NO_OPENSSL
+#ifdef __APPLE__
+#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
+#include <AvailabilityMacros.h>
+#undef DEPRECATED_ATTRIBUTE
+#define DEPRECATED_ATTRIBUTE
+#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
+#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
+#ifdef NO_HMAC_CTX_CLEANUP
+#define HMAC_CTX_cleanup HMAC_cleanup
+#endif
#endif
/* On most systems <netdb.h> would have given us this, but
@@ -474,6 +479,40 @@ extern int git_munmap(void *start, size_t length);
#define on_disk_bytes(st) ((st).st_blocks * 512)
#endif
+#ifdef NEEDS_MODE_TRANSLATION
+#undef S_IFMT
+#undef S_IFREG
+#undef S_IFDIR
+#undef S_IFLNK
+#undef S_IFBLK
+#undef S_IFCHR
+#undef S_IFIFO
+#undef S_IFSOCK
+#define S_IFMT 0170000
+#define S_IFREG 0100000
+#define S_IFDIR 0040000
+#define S_IFLNK 0120000
+#define S_IFBLK 0060000
+#define S_IFCHR 0020000
+#define S_IFIFO 0010000
+#define S_IFSOCK 0140000
+#ifdef stat
+#undef stat
+#endif
+#define stat(path, buf) git_stat(path, buf)
+extern int git_stat(const char *, struct stat *);
+#ifdef fstat
+#undef fstat
+#endif
+#define fstat(fd, buf) git_fstat(fd, buf)
+extern int git_fstat(int, struct stat *);
+#ifdef lstat
+#undef lstat
+#endif
+#define lstat(path, buf) git_lstat(path, buf)
+extern int git_lstat(const char *, struct stat *);
+#endif
+
#define DEFAULT_PACKED_GIT_LIMIT \
((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
@@ -636,6 +675,11 @@ extern char *xgetcwd(void);
#define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x)))
+static inline char *xstrdup_or_null(const char *str)
+{
+ return str ? xstrdup(str) : NULL;
+}
+
static inline size_t xsize_t(off_t len)
{
if (len > (size_t) len)
@@ -644,7 +688,7 @@ static inline size_t xsize_t(off_t len)
}
/* in ctype.c, for kwset users */
-extern const char tolower_trans_tbl[256];
+extern const unsigned char tolower_trans_tbl[256];
/* Sane ctype - no locale, and works with signed chars */
#undef isascii
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index d4fb6df..2b11b1d 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -94,3 +94,5 @@ else
shift 7
done
fi
+
+exit 0
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 2b66351..fe61e89 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -92,7 +92,7 @@ translate_merge_tool_path () {
check_unchanged () {
if test "$MERGED" -nt "$BACKUP"
then
- status=0
+ return 0
else
while true
do
@@ -100,8 +100,8 @@ check_unchanged () {
printf "Was the merge successful? [y/n] "
read answer || return 1
case "$answer" in
- y*|Y*) status=0; break ;;
- n*|N*) status=1; break ;;
+ y*|Y*) return 0 ;;
+ n*|N*) return 1 ;;
esac
done
fi
@@ -119,8 +119,6 @@ setup_user_tool () {
diff_cmd () {
( eval $merge_tool_cmd )
- status=$?
- return $status
}
merge_cmd () {
@@ -130,13 +128,10 @@ setup_user_tool () {
then
touch "$BACKUP"
( eval $merge_tool_cmd )
- status=$?
check_unchanged
else
( eval $merge_tool_cmd )
- status=$?
fi
- return $status
}
}
@@ -153,13 +148,11 @@ setup_tool () {
}
diff_cmd () {
- status=1
- return $status
+ return 1
}
merge_cmd () {
- status=1
- return $status
+ return 1
}
translate_merge_tool_path () {
@@ -210,7 +203,6 @@ run_merge_tool () {
merge_tool_path=$(get_merge_tool_path "$1") || exit
base_present="$2"
- status=0
# Bring tool-specific functions into scope
setup_tool "$1" || return 1
@@ -221,8 +213,6 @@ run_merge_tool () {
else
run_diff_cmd "$1"
fi
- status=$?
- return $status
}
# Run a either a configured or built-in diff tool
diff --git a/git-mergetool.sh b/git-mergetool.sh
index ff050e5..d20581c 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -426,8 +426,6 @@ fi
merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
-last_status=0
-rollup_status=0
files=
if test $# -eq 0
@@ -455,19 +453,15 @@ printf "%s\n" "$files"
IFS='
'
+rc=0
for i in $files
do
- if test $last_status -ne 0
- then
- prompt_after_failed_merge || exit 1
- fi
printf "\n"
- merge_file "$i"
- last_status=$?
- if test $last_status -ne 0
+ if ! merge_file "$i"
then
- rollup_status=1
+ rc=1
+ prompt_after_failed_merge || exit 1
fi
done
-exit $rollup_status
+exit $rc
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b64dd28..f7deeb0 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -961,14 +961,13 @@ else
revisions=$onto...$orig_head
shortrevisions=$shorthead
fi
-git rev-list $merges_option --pretty=oneline --abbrev-commit \
- --abbrev=7 --reverse --left-right --topo-order \
+git rev-list $merges_option --pretty=oneline --reverse --left-right --topo-order \
$revisions ${restrict_revision+^$restrict_revision} | \
sed -n "s/^>//p" |
-while read -r shortsha1 rest
+while read -r sha1 rest
do
- if test -z "$keep_empty" && is_empty_commit $shortsha1 && ! is_merge_commit $shortsha1
+ if test -z "$keep_empty" && is_empty_commit $sha1 && ! is_merge_commit $sha1
then
comment_out="$comment_char "
else
@@ -977,9 +976,8 @@ do
if test t != "$preserve_merges"
then
- printf '%s\n' "${comment_out}pick $shortsha1 $rest" >>"$todo"
+ printf '%s\n' "${comment_out}pick $sha1 $rest" >>"$todo"
else
- sha1=$(git rev-parse $shortsha1)
if test -z "$rebase_root"
then
preserve=t
@@ -996,7 +994,7 @@ do
if test f = "$preserve"
then
touch "$rewritten"/$sha1
- printf '%s\n' "${comment_out}pick $shortsha1 $rest" >>"$todo"
+ printf '%s\n' "${comment_out}pick $sha1 $rest" >>"$todo"
fi
fi
done
@@ -1020,8 +1018,8 @@ then
# just the history of its first-parent for others that will
# be rebasing on top of it
git rev-list --parents -1 $rev | cut -d' ' -s -f2 > "$dropped"/$rev
- short=$(git rev-list -1 --abbrev-commit --abbrev=7 $rev)
- sane_grep -v "^[a-z][a-z]* $short" <"$todo" > "${todo}2" ; mv "${todo}2" "$todo"
+ sha1=$(git rev-list -1 $rev)
+ sane_grep -v "^[a-z][a-z]* $sha1" <"$todo" > "${todo}2" ; mv "${todo}2" "$todo"
rm "$rewritten"/$rev
fi
done
@@ -1031,9 +1029,12 @@ test -s "$todo" || echo noop >> "$todo"
test -n "$autosquash" && rearrange_squash "$todo"
test -n "$cmd" && add_exec_commands "$todo"
+todocount=$(git stripspace --strip-comments <"$todo" | wc -l)
+todocount=${todocount##* }
+
cat >>"$todo" <<EOF
-$comment_char Rebase $shortrevisions onto $shortonto
+$comment_char Rebase $shortrevisions onto $shortonto ($todocount command(s))
EOF
append_todo_help
git stripspace --comment-lines >>"$todo" <<\EOF
@@ -1052,6 +1053,7 @@ has_action "$todo" ||
return 2
cp "$todo" "$todo".backup
+collapse_todo_ids
git_sequence_editor "$todo" ||
die_abort "Could not execute editor"
diff --git a/git-remote-testgit.sh b/git-remote-testgit.sh
index a9c75a2..752c763 100755
--- a/git-remote-testgit.sh
+++ b/git-remote-testgit.sh
@@ -1,7 +1,13 @@
#!/bin/sh
# Copyright (c) 2012 Felipe Contreras
-alias=$1
+# The first argument can be a url when the fetch/push command was a url
+# instead of a configured remote. In this case, use a generic alias.
+if test "$1" = "testgit::$2"; then
+ alias=_
+else
+ alias=$1
+fi
url=$2
dir="$GIT_DIR/testgit/$alias"
diff --git a/git-send-email.perl b/git-send-email.perl
index 9949db0..a18a795 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -54,10 +54,12 @@ git send-email [options] <file | directory | rev-list options >
--[no-]bcc <str> * Email Bcc:
--subject <str> * Email "Subject:"
--in-reply-to <str> * Email "In-Reply-To:"
+ --[no-]xmailer * Add "X-Mailer:" header (default).
--[no-]annotate * Review each patch that will be sent in an editor.
--compose * Open an editor for introduction.
--compose-encoding <str> * Encoding to assume for introduction.
--8bit-encoding <str> * Encoding to assume 8bit mails if undeclared
+ --transfer-encoding <str> * Transfer encoding to use (quoted-printable, 8bit, base64)
Sending:
--envelope-sender <str> * Email envelope sender.
@@ -145,10 +147,15 @@ my $have_mail_address = eval { require Mail::Address; 1 };
my $smtp;
my $auth;
+# Regexes for RFC 2047 productions.
+my $re_token = qr/[^][()<>@,;:\\"\/?.= \000-\037\177-\377]+/;
+my $re_encoded_text = qr/[^? \000-\037\177-\377]+/;
+my $re_encoded_word = qr/=\?($re_token)\?($re_token)\?($re_encoded_text)\?=/;
+
# Variables we fill in automatically, or via prompting:
my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
$initial_reply_to,$initial_subject,@files,
- $author,$sender,$smtp_authpass,$annotate,$compose,$time);
+ $author,$sender,$smtp_authpass,$annotate,$use_xmailer,$compose,$time);
my $envelope_sender;
@@ -206,6 +213,7 @@ my ($validate, $confirm);
my (@suppress_cc);
my ($auto_8bit_encoding);
my ($compose_encoding);
+my ($target_xfer_encoding);
my ($debug_net_smtp) = 0; # Net::SMTP, see send_message()
@@ -219,7 +227,8 @@ my %config_bool_settings = (
"signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated
"validate" => [\$validate, 1],
"multiedit" => [\$multiedit, undef],
- "annotate" => [\$annotate, undef]
+ "annotate" => [\$annotate, undef],
+ "xmailer" => [\$use_xmailer, 1]
);
my %config_settings = (
@@ -242,6 +251,7 @@ my %config_settings = (
"from" => \$sender,
"assume8bitencoding" => \$auto_8bit_encoding,
"composeencoding" => \$compose_encoding,
+ "transferencoding" => \$target_xfer_encoding,
);
my %config_path_settings = (
@@ -289,6 +299,7 @@ my $rc = GetOptions("h" => \$help,
"bcc=s" => \@bcclist,
"no-bcc" => \$no_bcc,
"chain-reply-to!" => \$chain_reply_to,
+ "no-chain-reply-to" => sub {$chain_reply_to = 0},
"smtp-server=s" => \$smtp_server,
"smtp-server-option=s" => \@smtp_server_options,
"smtp-server-port=s" => \$smtp_server_port,
@@ -301,23 +312,34 @@ my $rc = GetOptions("h" => \$help,
"smtp-domain:s" => \$smtp_domain,
"identity=s" => \$identity,
"annotate!" => \$annotate,
+ "no-annotate" => sub {$annotate = 0},
"compose" => \$compose,
"quiet" => \$quiet,
"cc-cmd=s" => \$cc_cmd,
"suppress-from!" => \$suppress_from,
+ "no-suppress-from" => sub {$suppress_from = 0},
"suppress-cc=s" => \@suppress_cc,
"signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
+ "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0},
"cc-cover|cc-cover!" => \$cover_cc,
+ "no-cc-cover" => sub {$cover_cc = 0},
"to-cover|to-cover!" => \$cover_to,
+ "no-to-cover" => sub {$cover_to = 0},
"confirm=s" => \$confirm,
"dry-run" => \$dry_run,
"envelope-sender=s" => \$envelope_sender,
"thread!" => \$thread,
+ "no-thread" => sub {$thread = 0},
"validate!" => \$validate,
+ "no-validate" => sub {$validate = 0},
+ "transfer-encoding=s" => \$target_xfer_encoding,
"format-patch!" => \$format_patch,
+ "no-format-patch" => sub {$format_patch = 0},
"8bit-encoding=s" => \$auto_8bit_encoding,
"compose-encoding=s" => \$compose_encoding,
"force" => \$force,
+ "xmailer!" => \$use_xmailer,
+ "no-xmailer" => sub {$use_xmailer = 0},
);
usage() if $help;
@@ -913,15 +935,26 @@ $time = time - scalar $#files;
sub unquote_rfc2047 {
local ($_) = @_;
- my $encoding;
- s{=\?([^?]+)\?q\?(.*?)\?=}{
- $encoding = $1;
- my $e = $2;
- $e =~ s/_/ /g;
- $e =~ s/=([0-9A-F]{2})/chr(hex($1))/eg;
- $e;
+ my $charset;
+ my $sep = qr/[ \t]+/;
+ s{$re_encoded_word(?:$sep$re_encoded_word)*}{
+ my @words = split $sep, $&;
+ foreach (@words) {
+ m/$re_encoded_word/;
+ $charset = $1;
+ my $encoding = $2;
+ my $text = $3;
+ if ($encoding eq 'q' || $encoding eq 'Q') {
+ $_ = $text;
+ s/_/ /g;
+ s/=([0-9A-F]{2})/chr(hex($1))/egi;
+ } else {
+ # other encodings not supported yet
+ }
+ }
+ join '', @words;
}eg;
- return wantarray ? ($_, $encoding) : $_;
+ return wantarray ? ($_, $charset) : $_;
}
sub quote_rfc2047 {
@@ -934,10 +967,8 @@ sub quote_rfc2047 {
sub is_rfc2047_quoted {
my $s = shift;
- my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
- my $encoded_text = qr/[!->@-~]+/;
length($s) <= 75 &&
- $s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
+ $s =~ m/^(?:"[[:ascii:]]*"|$re_encoded_word)$/o;
}
sub subject_needs_rfc2047_quoting {
@@ -1163,8 +1194,10 @@ To: $to${ccline}
Subject: $subject
Date: $date
Message-Id: $message_id
-X-Mailer: git-send-email $gitversion
";
+ if ($use_xmailer) {
+ $header .= "X-Mailer: git-send-email $gitversion\n";
+ }
if ($reply_to) {
$header .= "In-Reply-To: $reply_to\n";
@@ -1324,6 +1357,8 @@ foreach my $t (@files) {
my $author_encoding;
my $has_content_type;
my $body_encoding;
+ my $xfer_encoding;
+ my $has_mime_version;
@to = ();
@cc = ();
@xh = ();
@@ -1394,9 +1429,16 @@ foreach my $t (@files) {
}
push @xh, $_;
}
+ elsif (/^MIME-Version/i) {
+ $has_mime_version = 1;
+ push @xh, $_;
+ }
elsif (/^Message-Id: (.*)/i) {
$message_id = $1;
}
+ elsif (/^Content-Transfer-Encoding: (.*)/i) {
+ $xfer_encoding = $1 if not defined $xfer_encoding;
+ }
elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
push @xh, $_;
}
@@ -1444,10 +1486,9 @@ foreach my $t (@files) {
if defined $cc_cmd && !$suppress_cc{'cccmd'};
if ($broken_encoding{$t} && !$has_content_type) {
+ $xfer_encoding = '8bit' if not defined $xfer_encoding;
$has_content_type = 1;
- push @xh, "MIME-Version: 1.0",
- "Content-Type: text/plain; charset=$auto_8bit_encoding",
- "Content-Transfer-Encoding: 8bit";
+ push @xh, "Content-Type: text/plain; charset=$auto_8bit_encoding";
$body_encoding = $auto_8bit_encoding;
}
@@ -1467,14 +1508,25 @@ foreach my $t (@files) {
}
}
else {
+ $xfer_encoding = '8bit' if not defined $xfer_encoding;
$has_content_type = 1;
push @xh,
- 'MIME-Version: 1.0',
- "Content-Type: text/plain; charset=$author_encoding",
- 'Content-Transfer-Encoding: 8bit';
+ "Content-Type: text/plain; charset=$author_encoding";
}
}
}
+ if (defined $target_xfer_encoding) {
+ $xfer_encoding = '8bit' if not defined $xfer_encoding;
+ $message = apply_transfer_encoding(
+ $message, $xfer_encoding, $target_xfer_encoding);
+ $xfer_encoding = $target_xfer_encoding;
+ }
+ if (defined $xfer_encoding) {
+ push @xh, "Content-Transfer-Encoding: $xfer_encoding";
+ }
+ if (defined $xfer_encoding or $has_content_type) {
+ unshift @xh, 'MIME-Version: 1.0' unless $has_mime_version;
+ }
$needs_confirm = (
$confirm eq "always" or
@@ -1543,6 +1595,32 @@ sub cleanup_compose_files {
$smtp->quit if $smtp;
+sub apply_transfer_encoding {
+ my $message = shift;
+ my $from = shift;
+ my $to = shift;
+
+ return $message if ($from eq $to and $from ne '7bit');
+
+ require MIME::QuotedPrint;
+ require MIME::Base64;
+
+ $message = MIME::QuotedPrint::decode($message)
+ if ($from eq 'quoted-printable');
+ $message = MIME::Base64::decode($message)
+ if ($from eq 'base64');
+
+ die "cannot send message as 7bit"
+ if ($to eq '7bit' and $message =~ /[^[:ascii:]]/);
+ return $message
+ if ($to eq '7bit' or $to eq '8bit');
+ return MIME::QuotedPrint::encode($message, "\n", 0)
+ if ($to eq 'quoted-printable');
+ return MIME::Base64::encode($message, "\n")
+ if ($to eq 'base64');
+ die "invalid transfer encoding";
+}
+
sub unique_email_list {
my %seen;
my @emails;
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index d968760..c42c6e6 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -81,7 +81,7 @@ if test -n "$OPTIONS_SPEC"; then
echo exit $?
)"
else
- dashless=$(basename "$0" | sed -e 's/-/ /')
+ dashless=$(basename -- "$0" | sed -e 's/-/ /')
usage() {
die "usage: $dashless $USAGE"
}
diff --git a/git-submodule.sh b/git-submodule.sh
index 9245abf..36797c3 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -423,7 +423,7 @@ cmd_add()
sed -e '
s|//*|/|g
s|^\(\./\)*||
- s|/\./|/|g
+ s|/\(\./\)*|/|g
:start
s|\([^/]*\)/\.\./||
tstart
diff --git a/git-svn.perl b/git-svn.perl
index b6e2186..32d109e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -115,7 +115,7 @@ my ($_stdin, $_help, $_edit,
$_before, $_after,
$_merge, $_strategy, $_preserve_merges, $_dry_run, $_parents, $_local,
$_prefix, $_no_checkout, $_url, $_verbose,
- $_commit_url, $_tag, $_merge_info, $_interactive);
+ $_commit_url, $_tag, $_merge_info, $_interactive, $_set_svn_props);
# This is a refactoring artifact so Git::SVN can get at this git-svn switch.
sub opt_prefix { return $_prefix || '' }
@@ -193,6 +193,7 @@ my %cmd = (
'dry-run|n' => \$_dry_run,
'fetch-all|all' => \$_fetch_all,
'commit-url=s' => \$_commit_url,
+ 'set-svn-props=s' => \$_set_svn_props,
'revision|r=i' => \$_revision,
'no-rebase' => \$_no_rebase,
'mergeinfo=s' => \$_merge_info,
@@ -228,6 +229,9 @@ my %cmd = (
'propget' => [ \&cmd_propget,
'Print the value of a property on a file or directory',
{ 'revision|r=i' => \$_revision } ],
+ 'propset' => [ \&cmd_propset,
+ 'Set the value of a property on a file or directory - will be set on commit',
+ {} ],
'proplist' => [ \&cmd_proplist,
'List all properties of a file or directory',
{ 'revision|r=i' => \$_revision } ],
@@ -333,6 +337,12 @@ for (my $i = 0; $i < @ARGV; $i++) {
# make sure we're always running at the top-level working directory
if ($cmd && $cmd =~ /(?:clone|init|multi-init)$/) {
$ENV{GIT_DIR} ||= ".git";
+ # catch the submodule case
+ if (-f $ENV{GIT_DIR}) {
+ open(my $fh, '<', $ENV{GIT_DIR}) or
+ die "failed to open $ENV{GIT_DIR}: $!\n";
+ $ENV{GIT_DIR} = $1 if <$fh> =~ /^gitdir: (.+)$/;
+ }
} else {
my ($git_dir, $cdup);
git_cmd_try {
@@ -1376,6 +1386,49 @@ sub cmd_propget {
print $props->{$prop} . "\n";
}
+# cmd_propset (PROPNAME, PROPVAL, PATH)
+# ------------------------
+# Adjust the SVN property PROPNAME to PROPVAL for PATH.
+sub cmd_propset {
+ my ($propname, $propval, $path) = @_;
+ $path = '.' if not defined $path;
+ $path = $cmd_dir_prefix . $path;
+ usage(1) if not defined $propname;
+ usage(1) if not defined $propval;
+ my $file = basename($path);
+ my $dn = dirname($path);
+ my $cur_props = Git::SVN::Editor::check_attr( "svn-properties", $path );
+ my @new_props;
+ if (!$cur_props || $cur_props eq "unset" || $cur_props eq "" || $cur_props eq "set") {
+ push @new_props, "$propname=$propval";
+ } else {
+ # TODO: handle combining properties better
+ my @props = split(/;/, $cur_props);
+ my $replaced_prop;
+ foreach my $prop (@props) {
+ # Parse 'name=value' syntax and set the property.
+ if ($prop =~ /([^=]+)=(.*)/) {
+ my ($n,$v) = ($1,$2);
+ if ($n eq $propname) {
+ $v = $propval;
+ $replaced_prop = 1;
+ }
+ push @new_props, "$n=$v";
+ }
+ }
+ if (!$replaced_prop) {
+ push @new_props, "$propname=$propval";
+ }
+ }
+ my $attrfile = "$dn/.gitattributes";
+ open my $attrfh, '>>', $attrfile or die "Can't open $attrfile: $!\n";
+ # TODO: don't simply append here if $file already has svn-properties
+ my $new_props = join(';', @new_props);
+ print $attrfh "$file svn-properties=$new_props\n" or
+ die "write to $attrfile: $!\n";
+ close $attrfh or die "close $attrfile: $!\n";
+}
+
# cmd_proplist (PATH)
# -------------------
# Print the list of SVN properties for PATH.
diff --git a/git.c b/git.c
index 18fbf79..6a25583 100644
--- a/git.c
+++ b/git.c
@@ -1,10 +1,7 @@
#include "builtin.h"
-#include "cache.h"
#include "exec_cmd.h"
#include "help.h"
-#include "quote.h"
#include "run-command.h"
-#include "commit.h"
const char git_usage_string[] =
"git [--version] [--help] [-C <path>] [-c name=value]\n"
@@ -207,10 +204,12 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
fprintf(stderr, "No directory given for -C.\n" );
usage(git_usage_string);
}
- if (chdir((*argv)[1]))
- die_errno("Cannot change to '%s'", (*argv)[1]);
- if (envchanged)
- *envchanged = 1;
+ if ((*argv)[1][0]) {
+ if (chdir((*argv)[1]))
+ die_errno("Cannot change to '%s'", (*argv)[1]);
+ if (envchanged)
+ *envchanged = 1;
+ }
(*argv)++;
(*argc)--;
} else {
@@ -487,15 +486,20 @@ static struct cmd_struct commands[] = {
{ "write-tree", cmd_write_tree, RUN_SETUP },
};
-int is_builtin(const char *s)
+static struct cmd_struct *get_builtin(const char *s)
{
int i;
for (i = 0; i < ARRAY_SIZE(commands); i++) {
- struct cmd_struct *p = commands+i;
+ struct cmd_struct *p = commands + i;
if (!strcmp(s, p->cmd))
- return 1;
+ return p;
}
- return 0;
+ return NULL;
+}
+
+int is_builtin(const char *s)
+{
+ return !!get_builtin(s);
}
static void handle_builtin(int argc, const char **argv)
@@ -503,6 +507,7 @@ static void handle_builtin(int argc, const char **argv)
const char *cmd = argv[0];
int i;
static const char ext[] = STRIP_EXTENSION;
+ struct cmd_struct *builtin;
if (sizeof(ext) > 1) {
i = strlen(argv[0]) - strlen(ext);
@@ -519,15 +524,12 @@ static void handle_builtin(int argc, const char **argv)
argv[0] = cmd = "help";
}
- for (i = 0; i < ARRAY_SIZE(commands); i++) {
- struct cmd_struct *p = commands+i;
- if (strcmp(p->cmd, cmd))
- continue;
- if (saved_environment && (p->option & NO_SETUP)) {
+ builtin = get_builtin(cmd);
+ if (builtin) {
+ if (saved_environment && (builtin->option & NO_SETUP))
restore_env();
- break;
- }
- exit(run_builtin(p, argc, argv));
+ else
+ exit(run_builtin(builtin, argc, argv));
}
}
@@ -618,6 +620,7 @@ int main(int argc, char **av)
{
const char **argv = (const char **) av;
const char *cmd;
+ int done_help = 0;
startup_info = &git_startup_info;
@@ -680,9 +683,7 @@ int main(int argc, char **av)
setup_path();
while (1) {
- static int done_help = 0;
- static int was_alias = 0;
- was_alias = run_argv(&argc, &argv);
+ int was_alias = run_argv(&argc, &argv);
if (errno != ENOENT)
break;
if (was_alias) {
diff --git a/grep.c b/grep.c
index 6e085f8..b58c7c6 100644
--- a/grep.c
+++ b/grep.c
@@ -1661,8 +1661,8 @@ void grep_source_init(struct grep_source *gs, enum grep_source_type type,
const void *identifier)
{
gs->type = type;
- gs->name = name ? xstrdup(name) : NULL;
- gs->path = path ? xstrdup(path) : NULL;
+ gs->name = xstrdup_or_null(name);
+ gs->path = xstrdup_or_null(path);
gs->buf = NULL;
gs->size = 0;
gs->driver = NULL;
diff --git a/hex.c b/hex.c
index 9ebc050..cfd9d72 100644
--- a/hex.c
+++ b/hex.c
@@ -59,7 +59,7 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
char *sha1_to_hex(const unsigned char *sha1)
{
static int bufno;
- static char hexbuffer[4][50];
+ static char hexbuffer[4][41];
static const char hex[] = "0123456789abcdef";
char *buffer = hexbuffer[3 & ++bufno], *buf = buffer;
int i;
diff --git a/http-push.c b/http-push.c
index 952f8ed..bfb1c96 100644
--- a/http-push.c
+++ b/http-push.c
@@ -365,7 +365,6 @@ static void start_put(struct transfer_request *request)
hdrlen = sprintf(hdr, "%s %lu", typename(type), len) + 1;
/* Set it up */
- memset(&stream, 0, sizeof(stream));
git_deflate_init(&stream, zlib_compression_level);
size = git_deflate_bound(&stream, len + hdrlen);
strbuf_init(&request->buffer.buf, size);
@@ -1577,6 +1576,9 @@ static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
if (buffer.len == 0)
return;
+ /* Cut off trailing newline. */
+ strbuf_rtrim(&buffer);
+
/* If it's a symref, set the refname; otherwise try for a sha1 */
if (skip_prefix(buffer.buf, "ref: ", &name)) {
*symref = xmemdupz(name, buffer.len - (name - buffer.buf));
diff --git a/http.c b/http.c
index 040f362..6798620 100644
--- a/http.c
+++ b/http.c
@@ -62,6 +62,9 @@ static const char *user_agent;
static struct credential cert_auth = CREDENTIAL_INIT;
static int ssl_cert_password_required;
+#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
+static unsigned long http_auth_methods = CURLAUTH_ANY;
+#endif
static struct curl_slist *pragma_header;
static struct curl_slist *no_pragma_header;
@@ -580,6 +583,9 @@ struct active_request_slot *get_active_slot(void)
curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1);
+#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods);
+#endif
if (http_auth.password)
init_curl_http_auth(slot->curl);
@@ -870,6 +876,9 @@ int handle_curl_result(struct slot_results *results)
credential_reject(&http_auth);
return HTTP_NOAUTH;
} else {
+#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
+ http_auth_methods &= ~CURLAUTH_GSSNEGOTIATE;
+#endif
return HTTP_REAUTH;
}
} else {
@@ -986,6 +995,7 @@ static void extract_content_type(struct strbuf *raw, struct strbuf *type,
strbuf_addstr(charset, "ISO-8859-1");
}
+
/* http_request() targets */
#define HTTP_REQUEST_STRBUF 0
#define HTTP_REQUEST_FILE 1
@@ -1240,7 +1250,7 @@ static int fetch_and_setup_pack_index(struct packed_git **packs_head,
int ret;
if (has_pack_index(sha1)) {
- new_pack = parse_pack_index(sha1, NULL);
+ new_pack = parse_pack_index(sha1, sha1_pack_index_name(sha1));
if (!new_pack)
return -1; /* parse_pack_index() already issued error message */
goto add_pack;
diff --git a/imap-send.c b/imap-send.c
index 70bcc7a..37ac4aa 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -26,11 +26,32 @@
#include "credential.h"
#include "exec_cmd.h"
#include "run-command.h"
+#include "parse-options.h"
#ifdef NO_OPENSSL
typedef void *SSL;
#endif
+#ifdef USE_CURL_FOR_IMAP_SEND
+#include "http.h"
+#endif
+
+#if defined(USE_CURL_FOR_IMAP_SEND) && defined(NO_OPENSSL)
+/* only available option */
+#define USE_CURL_DEFAULT 1
+#else
+/* strictly opt in */
+#define USE_CURL_DEFAULT 0
+#endif
-static const char imap_send_usage[] = "git imap-send < <mbox>";
+static int verbosity;
+static int use_curl = USE_CURL_DEFAULT;
+
+static const char * const imap_send_usage[] = { "git imap-send [-v] [-q] [--[no-]curl] < <mbox>", NULL };
+
+static struct option imap_send_options[] = {
+ OPT__VERBOSITY(&verbosity),
+ OPT_BOOL(0, "curl", &use_curl, "use libcurl to communicate with the IMAP server"),
+ OPT_END()
+};
#undef DRV_OK
#define DRV_OK 0
@@ -38,8 +59,6 @@ static const char imap_send_usage[] = "git imap-send < <mbox>";
#define DRV_BOX_BAD -2
#define DRV_STORE_BAD -3
-static int Verbose, Quiet;
-
__attribute__((format (printf, 1, 2)))
static void imap_info(const char *, ...);
__attribute__((format (printf, 1, 2)))
@@ -418,7 +437,7 @@ static int buffer_gets(struct imap_buffer *b, char **s)
if (b->buf[b->offset + 1] == '\n') {
b->buf[b->offset] = 0; /* terminate the string */
b->offset += 2; /* next line */
- if (Verbose)
+ if (0 < verbosity)
puts(*s);
return 0;
}
@@ -433,7 +452,7 @@ static void imap_info(const char *msg, ...)
{
va_list va;
- if (!Quiet) {
+ if (0 <= verbosity) {
va_start(va, msg);
vprintf(msg, va);
va_end(va);
@@ -445,7 +464,7 @@ static void imap_warn(const char *msg, ...)
{
va_list va;
- if (Quiet < 2) {
+ if (-2 < verbosity) {
va_start(va, msg);
vfprintf(stderr, msg, va);
va_end(va);
@@ -522,7 +541,7 @@ static struct imap_cmd *issue_imap_cmd(struct imap_store *ctx,
cmd->tag, cmd->cmd, cmd->cb.dlen,
CAP(LITERALPLUS) ? "+" : "");
- if (Verbose) {
+ if (0 < verbosity) {
if (imap->num_in_progress)
printf("(%d in progress) ", imap->num_in_progress);
if (!starts_with(cmd->cmd, "LOGIN"))
@@ -1338,26 +1357,171 @@ static void git_imap_config(void)
git_config_get_string("imap.authmethod", &server.auth_method);
}
-int main(int argc, char **argv)
+static int append_msgs_to_imap(struct imap_server_conf *server,
+ struct strbuf* all_msgs, int total)
{
- struct strbuf all_msgs = STRBUF_INIT;
struct strbuf msg = STRBUF_INIT;
struct imap_store *ctx = NULL;
int ofs = 0;
int r;
- int total, n = 0;
+ int n = 0;
+
+ ctx = imap_open_store(server, server->folder);
+ if (!ctx) {
+ fprintf(stderr, "failed to open store\n");
+ return 1;
+ }
+ ctx->name = server->folder;
+
+ fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+ while (1) {
+ unsigned percent = n * 100 / total;
+
+ fprintf(stderr, "%4u%% (%d/%d) done\r", percent, n, total);
+
+ if (!split_msg(all_msgs, &msg, &ofs))
+ break;
+ if (server->use_html)
+ wrap_in_html(&msg);
+ r = imap_store_msg(ctx, &msg);
+ if (r != DRV_OK)
+ break;
+ n++;
+ }
+ fprintf(stderr, "\n");
+
+ imap_close_store(ctx);
+
+ return 0;
+}
+
+#ifdef USE_CURL_FOR_IMAP_SEND
+static CURL *setup_curl(struct imap_server_conf *srvc)
+{
+ CURL *curl;
+ struct strbuf path = STRBUF_INIT;
+
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
+ die("curl_global_init failed");
+
+ curl = curl_easy_init();
+
+ if (!curl)
+ die("curl_easy_init failed");
+
+ curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
+
+ strbuf_addstr(&path, server.host);
+ if (!path.len || path.buf[path.len - 1] != '/')
+ strbuf_addch(&path, '/');
+ strbuf_addstr(&path, server.folder);
+
+ curl_easy_setopt(curl, CURLOPT_URL, path.buf);
+ strbuf_release(&path);
+ curl_easy_setopt(curl, CURLOPT_PORT, server.port);
+
+ if (server.auth_method) {
+ struct strbuf auth = STRBUF_INIT;
+ strbuf_addstr(&auth, "AUTH=");
+ strbuf_addstr(&auth, server.auth_method);
+ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf);
+ strbuf_release(&auth);
+ }
+
+ if (!server.use_ssl)
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, server.ssl_verify);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, server.ssl_verify);
+
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
+
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ if (0 < verbosity || getenv("GIT_CURL_VERBOSE"))
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ return curl;
+}
+
+static int curl_append_msgs_to_imap(struct imap_server_conf *server,
+ struct strbuf* all_msgs, int total) {
+ int ofs = 0;
+ int n = 0;
+ struct buffer msgbuf = { STRBUF_INIT, 0 };
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = setup_curl(server);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &msgbuf);
+
+ fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
+ while (1) {
+ unsigned percent = n * 100 / total;
+ int prev_len;
+
+ fprintf(stderr, "%4u%% (%d/%d) done\r", percent, n, total);
+
+ prev_len = msgbuf.buf.len;
+ if (!split_msg(all_msgs, &msgbuf.buf, &ofs))
+ break;
+ if (server->use_html)
+ wrap_in_html(&msgbuf.buf);
+ lf_to_crlf(&msgbuf.buf);
+
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)(msgbuf.buf.len-prev_len));
+
+ res = curl_easy_perform(curl);
+
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ break;
+ }
+
+ n++;
+ }
+ fprintf(stderr, "\n");
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
+#endif
+
+int main(int argc, char **argv)
+{
+ struct strbuf all_msgs = STRBUF_INIT;
+ int total;
int nongit_ok;
git_extract_argv0_path(argv[0]);
git_setup_gettext();
- if (argc != 1)
- usage(imap_send_usage);
-
setup_git_directory_gently(&nongit_ok);
git_imap_config();
+ argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0);
+
+ if (argc)
+ usage_with_options(imap_send_usage, imap_send_options);
+
+#ifndef USE_CURL_FOR_IMAP_SEND
+ if (use_curl) {
+ warning("--curl not supported in this build");
+ use_curl = 0;
+ }
+#elif defined(NO_OPENSSL)
+ if (!use_curl) {
+ warning("--no-curl not supported in this build");
+ use_curl = 1;
+ }
+#endif
+
if (!server.port)
server.port = server.use_ssl ? 993 : 143;
@@ -1391,29 +1555,14 @@ int main(int argc, char **argv)
}
/* write it to the imap server */
- ctx = imap_open_store(&server, server.folder);
- if (!ctx) {
- fprintf(stderr, "failed to open store\n");
- return 1;
- }
- fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
- while (1) {
- unsigned percent = n * 100 / total;
+ if (server.tunnel)
+ return append_msgs_to_imap(&server, &all_msgs, total);
- fprintf(stderr, "%4u%% (%d/%d) done\r", percent, n, total);
- if (!split_msg(&all_msgs, &msg, &ofs))
- break;
- if (server.use_html)
- wrap_in_html(&msg);
- r = imap_store_msg(ctx, &msg);
- if (r != DRV_OK)
- break;
- n++;
- }
- fprintf(stderr, "\n");
-
- imap_close_store(ctx);
+#ifdef USE_CURL_FOR_IMAP_SEND
+ if (use_curl)
+ return curl_append_msgs_to_imap(&server, &all_msgs, total);
+#endif
- return 0;
+ return append_msgs_to_imap(&server, &all_msgs, total);
}
diff --git a/kwset.c b/kwset.c
index a0f49b3..e6236a0 100644
--- a/kwset.c
+++ b/kwset.c
@@ -80,13 +80,13 @@ struct kwset
struct trie *next[NCHAR]; /* Table of children of the root. */
char *target; /* Target string if there's only one. */
int mind2; /* Used in Boyer-Moore search for one string. */
- char const *trans; /* Character translation table. */
+ unsigned char const *trans; /* Character translation table. */
};
/* Allocate and initialize a keyword set object, returning an opaque
pointer to it. Return NULL if memory is not available. */
kwset_t
-kwsalloc (char const *trans)
+kwsalloc (unsigned char const *trans)
{
struct kwset *kwset;
@@ -381,7 +381,7 @@ kwsprep (kwset_t kws)
register struct kwset *kwset;
register int i;
register struct trie *curr;
- register char const *trans;
+ register unsigned char const *trans;
unsigned char delta[NCHAR];
kwset = (struct kwset *) kws;
@@ -590,7 +590,7 @@ cwexec (kwset_t kws, char const *text, size_t len, struct kwsmatch *kwsmatch)
register int d;
register char const *end, *qlim;
register struct tree const *tree;
- register char const *trans;
+ register unsigned char const *trans;
accept = NULL;
diff --git a/kwset.h b/kwset.h
index a21b2ea..61a134f 100644
--- a/kwset.h
+++ b/kwset.h
@@ -39,7 +39,7 @@ typedef struct kwset_t* kwset_t;
if enough memory cannot be obtained. The argument if non-NULL
specifies a table of character translations to be applied to all
pattern and search text. */
-extern kwset_t kwsalloc(char const *);
+extern kwset_t kwsalloc(unsigned char const *);
/* Incrementally extend the keyword set to include the given string.
Return NULL for success, or an error message. Remember an index
diff --git a/list-objects.c b/list-objects.c
index 2910bec..2a139b6 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -157,7 +157,7 @@ void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge)
if (commit->object.flags & UNINTERESTING) {
mark_tree_uninteresting(commit->tree);
- if (revs->edge_hint && !(commit->object.flags & SHOWN)) {
+ if (revs->edge_hint_aggressive && !(commit->object.flags & SHOWN)) {
commit->object.flags |= SHOWN;
show_edge(commit);
}
@@ -165,7 +165,7 @@ void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge)
}
mark_edge_parents_uninteresting(commit, revs, show_edge);
}
- if (revs->edge_hint) {
+ if (revs->edge_hint_aggressive) {
for (i = 0; i < revs->cmdline.nr; i++) {
struct object *obj = revs->cmdline.rev[i].item;
struct commit *commit = (struct commit *)obj;
diff --git a/lockfile.c b/lockfile.c
index 4f16ee7..9889277 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -128,9 +128,17 @@ static int lock_file(struct lock_file *lk, const char *path, int flags)
path);
}
- strbuf_add(&lk->filename, path, pathlen);
- if (!(flags & LOCK_NO_DEREF))
- resolve_symlink(&lk->filename);
+ if (flags & LOCK_NO_DEREF) {
+ strbuf_add_absolute_path(&lk->filename, path);
+ } else {
+ struct strbuf resolved_path = STRBUF_INIT;
+
+ strbuf_add(&resolved_path, path, pathlen);
+ resolve_symlink(&resolved_path);
+ strbuf_add_absolute_path(&lk->filename, resolved_path.buf);
+ strbuf_release(&resolved_path);
+ }
+
strbuf_addstr(&lk->filename, LOCK_SUFFIX);
lk->fd = open(lk->filename.buf, O_RDWR | O_CREAT | O_EXCL, 0666);
if (lk->fd < 0) {
diff --git a/log-tree.c b/log-tree.c
index 7f0890e..53bb526 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -195,6 +195,7 @@ void format_decorations_extended(struct strbuf *sb,
while (decoration) {
strbuf_addstr(sb, color_commit);
strbuf_addstr(sb, prefix);
+ strbuf_addstr(sb, color_reset);
strbuf_addstr(sb, decorate_get_color(use_color, decoration->type));
if (decoration->type == DECORATION_REF_TAG)
strbuf_addstr(sb, "tag: ");
diff --git a/mailmap.c b/mailmap.c
index 81890a6..9e95897 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -71,22 +71,17 @@ static void add_mapping(struct string_list *map,
char *old_name, char *old_email)
{
struct mailmap_entry *me;
- int index;
+ struct string_list_item *item;
if (old_email == NULL) {
old_email = new_email;
new_email = NULL;
}
- if ((index = string_list_find_insert_index(map, old_email, 1)) < 0) {
- /* mailmap entry exists, invert index value */
- index = -1 - index;
- me = (struct mailmap_entry *)map->items[index].util;
+ item = string_list_insert(map, old_email);
+ if (item->util) {
+ me = (struct mailmap_entry *)item->util;
} else {
- /* create mailmap entry */
- struct string_list_item *item;
-
- item = string_list_insert_at_index(map, index, old_email);
me = xcalloc(1, sizeof(struct mailmap_entry));
me->namemap.strdup_strings = 1;
me->namemap.cmp = namemap_cmp;
@@ -94,8 +89,8 @@ static void add_mapping(struct string_list *map,
}
if (old_name == NULL) {
- debug_mm("mailmap: adding (simple) entry for %s at index %d\n",
- old_email, index);
+ debug_mm("mailmap: adding (simple) entry for '%s'\n", old_email);
+
/* Replace current name and new email for simple entry */
if (new_name) {
free(me->name);
@@ -107,8 +102,7 @@ static void add_mapping(struct string_list *map,
}
} else {
struct mailmap_info *mi = xcalloc(1, sizeof(struct mailmap_info));
- debug_mm("mailmap: adding (complex) entry for %s at index %d\n",
- old_email, index);
+ debug_mm("mailmap: adding (complex) entry for '%s'\n", old_email);
if (new_name)
mi->name = xstrdup(new_name);
if (new_email)
diff --git a/merge-recursive.c b/merge-recursive.c
index fdb7d0f..771f5e2 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -275,23 +275,20 @@ struct tree *write_tree_from_memory(struct merge_options *o)
}
static int save_files_dirs(const unsigned char *sha1,
- const char *base, int baselen, const char *path,
+ struct strbuf *base, const char *path,
unsigned int mode, int stage, void *context)
{
- int len = strlen(path);
- char *newpath = xmalloc(baselen + len + 1);
+ int baselen = base->len;
struct merge_options *o = context;
- memcpy(newpath, base, baselen);
- memcpy(newpath + baselen, path, len);
- newpath[baselen + len] = '\0';
+ strbuf_addstr(base, path);
if (S_ISDIR(mode))
- string_list_insert(&o->current_directory_set, newpath);
+ string_list_insert(&o->current_directory_set, base->buf);
else
- string_list_insert(&o->current_file_set, newpath);
- free(newpath);
+ string_list_insert(&o->current_file_set, base->buf);
+ strbuf_setlen(base, baselen);
return (S_ISDIR(mode) ? READ_TREE_RECURSIVE : 0);
}
@@ -1904,7 +1901,7 @@ int merge_recursive(struct merge_options *o,
}
if (!ca) {
- ca = get_merge_bases(h1, h2, 1);
+ ca = get_merge_bases(h1, h2);
ca = reverse_commit_list(ca);
}
diff --git a/mergetools/diffmerge b/mergetools/diffmerge
index 85ac720..f138cb4 100644
--- a/mergetools/diffmerge
+++ b/mergetools/diffmerge
@@ -11,5 +11,4 @@ merge_cmd () {
"$merge_tool_path" --merge \
--result="$MERGED" "$LOCAL" "$REMOTE"
fi
- status=$?
}
diff --git a/mergetools/emerge b/mergetools/emerge
index f96d9e5..7b895fd 100644
--- a/mergetools/emerge
+++ b/mergetools/emerge
@@ -15,7 +15,6 @@ merge_cmd () {
"$LOCAL" "$REMOTE" \
"$(basename "$MERGED")"
fi
- status=$?
}
translate_merge_tool_path() {
diff --git a/mergetools/kdiff3 b/mergetools/kdiff3
index a30034f..793d129 100644
--- a/mergetools/kdiff3
+++ b/mergetools/kdiff3
@@ -20,5 +20,4 @@ merge_cmd () {
-o "$MERGED" "$LOCAL" "$REMOTE" \
>/dev/null 2>&1
fi
- status=$?
}
diff --git a/notes-merge.c b/notes-merge.c
index 7eb9d7a..109ff4e 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -594,7 +594,7 @@ int notes_merge(struct notes_merge_options *o,
assert(local && remote);
/* Find merge bases */
- bases = get_merge_bases(local, remote, 1);
+ bases = get_merge_bases(local, remote);
if (!bases) {
base_sha1 = null_sha1;
base_tree_sha1 = EMPTY_TREE_SHA1_BIN;
diff --git a/notes-utils.c b/notes-utils.c
index b64dc1b..ccbf073 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -44,8 +44,7 @@ void commit_notes(struct notes_tree *t, const char *msg)
/* Prepare commit message and reflog message */
strbuf_addstr(&buf, msg);
- if (buf.buf[buf.len - 1] != '\n')
- strbuf_addch(&buf, '\n'); /* Make sure msg ends with newline */
+ strbuf_complete_line(&buf);
create_notes_commit(t, NULL, buf.buf, buf.len, commit_sha1);
strbuf_insert(&buf, 0, "notes: ", 7); /* commit message starts at index 7 */
diff --git a/notes.c b/notes.c
index 5fe691d..2be4d7f 100644
--- a/notes.c
+++ b/notes.c
@@ -902,7 +902,7 @@ int combine_notes_cat_sort_uniq(unsigned char *cur_sha1,
if (string_list_add_note_lines(&sort_uniq_list, new_sha1))
goto out;
string_list_remove_empty_items(&sort_uniq_list, 0);
- sort_string_list(&sort_uniq_list);
+ string_list_sort(&sort_uniq_list);
string_list_remove_duplicates(&sort_uniq_list, 0);
/* create a new blob object from sort_uniq_list */
@@ -1006,7 +1006,7 @@ void init_notes(struct notes_tree *t, const char *notes_ref,
t->root = (struct int_node *) xcalloc(1, sizeof(struct int_node));
t->first_non_note = NULL;
t->prev_non_note = NULL;
- t->ref = notes_ref ? xstrdup(notes_ref) : NULL;
+ t->ref = xstrdup_or_null(notes_ref);
t->combine_notes = combine_notes;
t->initialized = 1;
t->dirty = 0;
@@ -1218,8 +1218,7 @@ static void format_note(struct notes_tree *t, const unsigned char *object_sha1,
if (!sha1)
return;
- if (!(msg = read_sha1_file(sha1, &type, &msglen)) || !msglen ||
- type != OBJ_BLOB) {
+ if (!(msg = read_sha1_file(sha1, &type, &msglen)) || type != OBJ_BLOB) {
free(msg);
return;
}
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 8029ae3..c05d138 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -472,7 +472,6 @@ static void write_selected_commits_v1(struct sha1file *f,
for (i = 0; i < writer.selected_nr; ++i) {
struct bitmapped_commit *stored = &writer.selected[i];
- struct bitmap_disk_entry on_disk;
int commit_pos =
sha1_pos(stored->commit->object.sha1, index, index_nr, sha1_access);
@@ -480,11 +479,10 @@ static void write_selected_commits_v1(struct sha1file *f,
if (commit_pos < 0)
die("BUG: trying to write commit not in index");
- on_disk.object_pos = htonl(commit_pos);
- on_disk.xor_offset = stored->xor_offset;
- on_disk.flags = stored->flags;
+ sha1write_be32(f, commit_pos);
+ sha1write_u8(f, stored->xor_offset);
+ sha1write_u8(f, stored->flags);
- sha1write(f, &on_disk, sizeof(on_disk));
dump_bitmap(f, stored->write_as);
}
}
diff --git a/pack-bitmap.c b/pack-bitmap.c
index a1f3c0d..6a81841 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -197,13 +197,24 @@ static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
return stored;
}
+static inline uint32_t read_be32(const unsigned char *buffer, size_t *pos)
+{
+ uint32_t result = get_be32(buffer + *pos);
+ (*pos) += sizeof(result);
+ return result;
+}
+
+static inline uint8_t read_u8(const unsigned char *buffer, size_t *pos)
+{
+ return buffer[(*pos)++];
+}
+
static int load_bitmap_entries_v1(struct bitmap_index *index)
{
static const size_t MAX_XOR_OFFSET = 160;
uint32_t i;
struct stored_bitmap **recent_bitmaps;
- struct bitmap_disk_entry *entry;
recent_bitmaps = xcalloc(MAX_XOR_OFFSET, sizeof(struct stored_bitmap));
@@ -214,15 +225,12 @@ static int load_bitmap_entries_v1(struct bitmap_index *index)
uint32_t commit_idx_pos;
const unsigned char *sha1;
- entry = (struct bitmap_disk_entry *)(index->map + index->map_pos);
- index->map_pos += sizeof(struct bitmap_disk_entry);
+ commit_idx_pos = read_be32(index->map, &index->map_pos);
+ xor_offset = read_u8(index->map, &index->map_pos);
+ flags = read_u8(index->map, &index->map_pos);
- commit_idx_pos = ntohl(entry->object_pos);
sha1 = nth_packed_object_sha1(index->pack, commit_idx_pos);
- xor_offset = (int)entry->xor_offset;
- flags = (int)entry->flags;
-
bitmap = read_bitmap_1(index);
if (!bitmap)
return -1;
diff --git a/pack-bitmap.h b/pack-bitmap.h
index 8b7f4e9..487600b 100644
--- a/pack-bitmap.h
+++ b/pack-bitmap.h
@@ -5,12 +5,6 @@
#include "khash.h"
#include "pack-objects.h"
-struct bitmap_disk_entry {
- uint32_t object_pos;
- uint8_t xor_offset;
- uint8_t flags;
-} __attribute__((packed));
-
struct bitmap_disk_header {
char magic[4];
uint16_t version;
diff --git a/pager.c b/pager.c
index f6e8c33..98b2682 100644
--- a/pager.c
+++ b/pager.c
@@ -133,12 +133,12 @@ int term_columns(void)
/*
* How many columns do we need to show this number in decimal?
*/
-int decimal_width(int number)
+int decimal_width(uintmax_t number)
{
- int i, width;
+ int width;
- for (width = 1, i = 10; i <= number; width++)
- i *= 10;
+ for (width = 1; number >= 10; width++)
+ number /= 10;
return width;
}
diff --git a/parse-options.h b/parse-options.h
index 7940bc7..c71e9da 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -95,8 +95,7 @@ typedef int parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,
*
* `defval`::
* default value to fill (*->value) with for PARSE_OPT_OPTARG.
- * OPTION_{BIT,SET_INT} store the {mask,integer,pointer} to put in
- * the value when met.
+ * OPTION_{BIT,SET_INT} store the {mask,integer} to put in the value when met.
* CALLBACKS can use it like they want.
*/
struct option {
diff --git a/path.c b/path.c
index e608993..595da81 100644
--- a/path.c
+++ b/path.c
@@ -303,14 +303,9 @@ return_null:
* (3) "relative/path" to mean cwd relative directory; or
* (4) "/absolute/path" to mean absolute directory.
*
- * Unless "strict" is given, we try access() for existence of "%s.git/.git",
- * "%s/.git", "%s.git", "%s" in this order. The first one that exists is
- * what we try.
- *
- * Second, we try chdir() to that. Upon failure, we return NULL.
- *
- * Then, we try if the current directory is a valid git repository.
- * Upon failure, we return NULL.
+ * Unless "strict" is given, we check "%s/.git", "%s", "%s.git/.git", "%s.git"
+ * in this order. We select the first one that is a valid git repository, and
+ * chdir() to it. If none match, or we fail to chdir, we return NULL.
*
* If all goes well, we return the directory we used to chdir() (but
* before ~user is expanded), avoiding getcwd() resolving symbolic
diff --git a/perl/Git.pm b/perl/Git.pm
index b5905ee..9026a7b 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -695,7 +695,7 @@ Retrieve the integer configuration C<VARIABLE>. The return value
is simple decimal number. An optional value suffix of 'k', 'm',
or 'g' in the config file will cause the value to be multiplied
by 1024, 1048576 (1024^2), or 1073741824 (1024^3) prior to output.
-It would return C<undef> if configuration variable is not defined,
+It would return C<undef> if configuration variable is not defined.
=cut
@@ -704,7 +704,7 @@ sub config_int {
}
# Common subroutine to implement bulk of what the config* family of methods
-# do. This curently wraps command('config') so it is not so fast.
+# do. This currently wraps command('config') so it is not so fast.
sub _config_common {
my ($opts) = shift @_;
my ($self, $var) = _maybe_self(@_);
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index d9a52a5..f243726 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -14,6 +14,7 @@ use IPC::Open3;
use Memoize; # core since 5.8.0, Jul 2002
use Memoize::Storable;
use POSIX qw(:signal_h);
+use Time::Local;
use Git qw(
command
@@ -1332,7 +1333,7 @@ sub parse_svn_date {
$ENV{TZ} = 'UTC';
my $epoch_in_UTC =
- POSIX::strftime('%s', $S, $M, $H, $d, $m - 1, $Y - 1900);
+ Time::Local::timelocal($S, $M, $H, $d, $m - 1, $Y - 1900);
# Determine our local timezone (including DST) at the
# time of $epoch_in_UTC. $Git::SVN::Log::TZ stored the
@@ -2365,7 +2366,7 @@ sub _new {
# Older repos imported by us used $GIT_DIR/svn/foo instead of
# $GIT_DIR/svn/refs/remotes/foo when tracking refs/remotes/foo
- if ($ref_id =~ m{^refs/remotes/(.*)}) {
+ if ($ref_id =~ m{^refs/remotes/(.+)}) {
my $old_dir = "$ENV{GIT_DIR}/svn/$1";
if (-d $old_dir && ! -d $dir) {
$dir = $old_dir;
diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm
index 34e8af9..4088f13 100644
--- a/perl/Git/SVN/Editor.pm
+++ b/perl/Git/SVN/Editor.pm
@@ -288,6 +288,40 @@ sub apply_autoprops {
}
}
+sub check_attr {
+ my ($attr,$path) = @_;
+ my $val = command_oneline("check-attr", $attr, "--", $path);
+ if ($val) { $val =~ s/^[^:]*:\s*[^:]*:\s*(.*)\s*$/$1/; }
+ return $val;
+}
+
+sub apply_manualprops {
+ my ($self, $file, $fbat) = @_;
+ my $pending_properties = check_attr( "svn-properties", $file );
+ if ($pending_properties eq "") { return; }
+ # Parse the list of properties to set.
+ my @props = split(/;/, $pending_properties);
+ # TODO: get existing properties to compare to
+ # - this fails for add so currently not done
+ # my $existing_props = ::get_svnprops($file);
+ my $existing_props = {};
+ # TODO: caching svn properties or storing them in .gitattributes
+ # would make that faster
+ foreach my $prop (@props) {
+ # Parse 'name=value' syntax and set the property.
+ if ($prop =~ /([^=]+)=(.*)/) {
+ my ($n,$v) = ($1,$2);
+ for ($n, $v) {
+ s/^\s+//; s/\s+$//;
+ }
+ my $existing = $existing_props->{$n};
+ if (!defined($existing) || $existing ne $v) {
+ $self->change_file_prop($fbat, $n, $v);
+ }
+ }
+ }
+}
+
sub A {
my ($self, $m, $deletions) = @_;
my ($dir, $file) = split_path($m->{file_b});
@@ -296,6 +330,7 @@ sub A {
undef, -1);
print "\tA\t$m->{file_b}\n" unless $::_q;
$self->apply_autoprops($file, $fbat);
+ $self->apply_manualprops($m->{file_b}, $fbat);
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
}
@@ -311,6 +346,7 @@ sub C {
my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
$upa, $self->{r});
print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
+ $self->apply_manualprops($m->{file_b}, $fbat);
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
}
@@ -333,6 +369,7 @@ sub R {
$upa, $self->{r});
print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
$self->apply_autoprops($file, $fbat);
+ $self->apply_manualprops($m->{file_b}, $fbat);
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
@@ -348,6 +385,7 @@ sub M {
my $fbat = $self->open_file($self->repo_path($m->{file_b}),
$pbat,$self->{r},$self->{pool});
print "\t$m->{chg}\t$m->{file_b}\n" unless $::_q;
+ $self->apply_manualprops($m->{file_b}, $fbat);
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
}
diff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm
index 10edb27..613055a 100644
--- a/perl/Git/SVN/Fetcher.pm
+++ b/perl/Git/SVN/Fetcher.pm
@@ -322,6 +322,14 @@ sub apply_textdelta {
# (but $base does not,) so dup() it for reading in close_file
open my $dup, '<&', $fh or croak $!;
my $base = $::_repository->temp_acquire("git_blob_${$}_$suffix");
+ # close_file may call temp_acquire on 'svn_hash', but because of the
+ # call chain, if the temp_acquire call from close_file ends up being the
+ # call that first creates the 'svn_hash' temp file, then the FileHandle
+ # that's created as a result will end up in an SVN::Pool that we clear
+ # in SVN::Ra::gs_fetch_loop_common. Avoid that by making sure the
+ # 'svn_hash' FileHandle is already created before close_file is called.
+ my $tmp_fh = $::_repository->temp_acquire('svn_hash');
+ $::_repository->temp_release($tmp_fh, 1);
if ($fb->{blob}) {
my ($base_is_link, $size);
diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index 622535e..32e2f19 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -391,6 +391,9 @@ sub longest_common_path {
sub gs_fetch_loop_common {
my ($self, $base, $head, $gsv, $globs) = @_;
return if ($base > $head);
+ # Make sure the cat_blob open2 FileHandle is created before calling
+ # SVN::Pool::new_default so that it does not incorrectly end up in the pool.
+ $::_repository->_open_cat_blob_if_needed;
my $gpool = SVN::Pool->new_default;
my $ra_url = $self->url;
my $reload_ra = sub {
diff --git a/pkt-line.c b/pkt-line.c
index 8bc89b1..187a229 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -64,44 +64,45 @@ void packet_buf_flush(struct strbuf *buf)
}
#define hex(a) (hexchar[(a) & 15])
-static char buffer[1000];
-static unsigned format_packet(const char *fmt, va_list args)
+static void format_packet(struct strbuf *out, const char *fmt, va_list args)
{
static char hexchar[] = "0123456789abcdef";
- unsigned n;
+ size_t orig_len, n;
- n = vsnprintf(buffer + 4, sizeof(buffer) - 4, fmt, args);
- if (n >= sizeof(buffer)-4)
+ orig_len = out->len;
+ strbuf_addstr(out, "0000");
+ strbuf_vaddf(out, fmt, args);
+ n = out->len - orig_len;
+
+ if (n > LARGE_PACKET_MAX)
die("protocol error: impossibly long line");
- n += 4;
- buffer[0] = hex(n >> 12);
- buffer[1] = hex(n >> 8);
- buffer[2] = hex(n >> 4);
- buffer[3] = hex(n);
- packet_trace(buffer+4, n-4, 1);
- return n;
+
+ out->buf[orig_len + 0] = hex(n >> 12);
+ out->buf[orig_len + 1] = hex(n >> 8);
+ out->buf[orig_len + 2] = hex(n >> 4);
+ out->buf[orig_len + 3] = hex(n);
+ packet_trace(out->buf + orig_len + 4, n - 4, 1);
}
void packet_write(int fd, const char *fmt, ...)
{
+ static struct strbuf buf = STRBUF_INIT;
va_list args;
- unsigned n;
+ strbuf_reset(&buf);
va_start(args, fmt);
- n = format_packet(fmt, args);
+ format_packet(&buf, fmt, args);
va_end(args);
- write_or_die(fd, buffer, n);
+ write_or_die(fd, buf.buf, buf.len);
}
void packet_buf_write(struct strbuf *buf, const char *fmt, ...)
{
va_list args;
- unsigned n;
va_start(args, fmt);
- n = format_packet(fmt, args);
+ format_packet(buf, fmt, args);
va_end(args);
- strbuf_add(buf, buffer, n);
}
static int get_packet_data(int fd, char **src_buf, size_t *src_size,
diff --git a/po/ca.po b/po/ca.po
index 1fea047..a649508 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Git\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-11-20 09:42+0800\n"
-"PO-Revision-Date: 2014-11-20 16:10+0800\n"
+"POT-Creation-Date: 2015-01-18 11:24+0800\n"
+"PO-Revision-Date: 2015-01-30 15:01-0700\n"
"Last-Translator: Alex Henrie <alexhenrie24@gmail.com>\n"
"Language-Team: Catalan\n"
"Language: ca\n"
@@ -16,12 +16,12 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 1.6.10\n"
+"X-Generator: Poedit 1.7.3\n"
#: advice.c:55
#, c-format
msgid "hint: %.*s\n"
-msgstr "indirecta: %.*s\n"
+msgstr "pista: %.*s\n"
#: advice.c:88
msgid ""
@@ -34,7 +34,7 @@ msgstr ""
#: archive.c:11
msgid "git archive [options] <tree-ish> [<path>...]"
-msgstr "git archive [opcions] <arbre> [<ruta>...]"
+msgstr "git archive [opcions] <arbre> [<camí>...]"
#: archive.c:12
msgid "git archive --list"
@@ -44,140 +44,144 @@ msgstr "git archive --list"
msgid ""
"git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"
msgstr ""
-"git archive --remote <dipòsit> [--exec <ordre>] [opcions] <arbre> [<ruta>...]"
+"git archive --remote <dipòsit> [--exec <ordre>] [opcions] <arbre> [<camí>...]"
#: archive.c:14
msgid "git archive --remote <repo> [--exec <cmd>] --list"
msgstr "git archive --remote <dipòsit> [--exec <ordre>] --list"
-#: archive.c:334 builtin/add.c:137 builtin/add.c:427 builtin/rm.c:328
+#: archive.c:342 builtin/add.c:137 builtin/add.c:427 builtin/rm.c:328
#, c-format
msgid "pathspec '%s' did not match any files"
-msgstr "L'especificació de ruta '%s' no ha concordat amb cap fitxer"
+msgstr "L'especificació de camí '%s' no ha coincidit amb cap fitxer"
-#: archive.c:419
+#: archive.c:427
msgid "fmt"
msgstr "format"
-#: archive.c:419
+#: archive.c:427
msgid "archive format"
msgstr "format d'arxiu"
-#: archive.c:420 builtin/log.c:1204
+#: archive.c:428 builtin/log.c:1204
msgid "prefix"
msgstr "prefix"
-#: archive.c:421
+#: archive.c:429
msgid "prepend prefix to each pathname in the archive"
-msgstr "anteposa el prefix a cada nom de ruta en l'arxiu"
+msgstr "anteposa el prefix a cada nom de camí en l'arxiu"
-#: archive.c:422 builtin/archive.c:88 builtin/blame.c:2517
+#: archive.c:430 builtin/archive.c:88 builtin/blame.c:2517
#: builtin/blame.c:2518 builtin/config.c:57 builtin/fast-export.c:986
#: builtin/fast-export.c:988 builtin/grep.c:712 builtin/hash-object.c:101
-#: builtin/ls-files.c:489 builtin/ls-files.c:492 builtin/notes.c:411
-#: builtin/notes.c:568 builtin/read-tree.c:109 parse-options.h:151
+#: builtin/ls-files.c:489 builtin/ls-files.c:492 builtin/notes.c:394
+#: builtin/notes.c:557 builtin/read-tree.c:109 parse-options.h:151
msgid "file"
msgstr "fitxer"
-#: archive.c:423 builtin/archive.c:89
+#: archive.c:431 builtin/archive.c:89
msgid "write the archive to this file"
msgstr "escriu l'arxiu a aquest fitxer"
-#: archive.c:425
+#: archive.c:433
msgid "read .gitattributes in working directory"
msgstr "llegeix .gitattributes en el directori de treball"
-#: archive.c:426
+#: archive.c:434
msgid "report archived files on stderr"
msgstr "informa de fitxers arxivats en stderr"
-#: archive.c:427
+#: archive.c:435
msgid "store only"
msgstr "només emmagatzemar"
-#: archive.c:428
+#: archive.c:436
msgid "compress faster"
msgstr "comprimeix més ràpid"
-#: archive.c:436
+#: archive.c:444
msgid "compress better"
msgstr "comprimeix millor"
-#: archive.c:439
+#: archive.c:447
msgid "list supported archive formats"
-msgstr "allista els formats d'arxiu suportats"
+msgstr "allista els formats d'arxiu admesos"
-#: archive.c:441 builtin/archive.c:90 builtin/clone.c:85
+#: archive.c:449 builtin/archive.c:90 builtin/clone.c:86
msgid "repo"
msgstr "dipòsit"
-#: archive.c:442 builtin/archive.c:91
+#: archive.c:450 builtin/archive.c:91
msgid "retrieve the archive from remote repository <repo>"
msgstr "recupera l'arxiu del dipòsit remot <dipòsit>"
-#: archive.c:443 builtin/archive.c:92 builtin/notes.c:490
+#: archive.c:451 builtin/archive.c:92 builtin/notes.c:478
msgid "command"
msgstr "ordre"
-#: archive.c:444 builtin/archive.c:93
+#: archive.c:452 builtin/archive.c:93
msgid "path to the remote git-upload-archive command"
-msgstr "ruta a l'ordre git-upload-archive remot"
+msgstr "camí a l'ordre git-upload-archive remot"
#: attr.c:258
msgid ""
"Negative patterns are ignored in git attributes\n"
"Use '\\!' for literal leading exclamation."
msgstr ""
-"Els patrons negatius s'ignoren en els atributes de git\n"
+"Els patrons negatius s'ignoren en els atributs de git\n"
"Useu '\\!' per exclamació capdavantera literal."
#: branch.c:60
#, c-format
msgid "Not setting branch %s as its own upstream."
-msgstr "No establint la rama %s com a la seva pròpia font."
+msgstr "No establint la branca %s com a la seva pròpia font."
#: branch.c:83
#, c-format
msgid "Branch %s set up to track remote branch %s from %s by rebasing."
msgstr ""
-"La rama %s està configurada per a seguir la rama remota %s de %s per rebasar."
+"La branca %s està configurada per a seguir la branca remota %s de %s per "
+"rebasar."
#: branch.c:84
#, c-format
msgid "Branch %s set up to track remote branch %s from %s."
-msgstr "La rama %s està configurada per a seguir la rama remota %s de %s."
+msgstr "La branca %s està configurada per a seguir la branca remota %s de %s."
#: branch.c:88
#, c-format
msgid "Branch %s set up to track local branch %s by rebasing."
-msgstr "La rama %s està configurada per a seguir la rama local %s per rebasar."
+msgstr ""
+"La branca %s està configurada per a seguir la branca local %s per rebasar."
#: branch.c:89
#, c-format
msgid "Branch %s set up to track local branch %s."
-msgstr "La rama %s està configurada per a seguir la rama local %s."
+msgstr "La branca %s està configurada per a seguir la branca local %s."
#: branch.c:94
#, c-format
msgid "Branch %s set up to track remote ref %s by rebasing."
msgstr ""
-"La rama %s està configurada per a seguir la referència remota %s per rebasar."
+"La branca %s està configurada per a seguir la referència remota %s per "
+"rebasar."
#: branch.c:95
#, c-format
msgid "Branch %s set up to track remote ref %s."
-msgstr "La rama %s està configurada per a seguir la referència remota %s."
+msgstr "La branca %s està configurada per a seguir la referència remota %s."
#: branch.c:99
#, c-format
msgid "Branch %s set up to track local ref %s by rebasing."
msgstr ""
-"La rama %s està configurada per a seguir la referència local %s per rebasar."
+"La branca %s està configurada per a seguir la referència local %s per "
+"rebasar."
#: branch.c:100
#, c-format
msgid "Branch %s set up to track local ref %s."
-msgstr "La rama %s està configurada per a seguir la referència local %s."
+msgstr "La branca %s està configurada per a seguir la referència local %s."
#: branch.c:133
#, c-format
@@ -187,28 +191,28 @@ msgstr "No seguint: informació ambigua per a la referència %s"
#: branch.c:162
#, c-format
msgid "'%s' is not a valid branch name."
-msgstr "'%s' no és un nom de rama vàlid."
+msgstr "'%s' no és un nom de branca vàlid."
#: branch.c:167
#, c-format
msgid "A branch named '%s' already exists."
-msgstr "Una rama amb nom '%s' ja existeix."
+msgstr "Una branca amb nom '%s' ja existeix."
#: branch.c:175
msgid "Cannot force update the current branch."
-msgstr "No es pot actualitzar la rama actual a la força."
+msgstr "No es pot actualitzar la branca actual a la força."
#: branch.c:195
#, c-format
msgid "Cannot setup tracking information; starting point '%s' is not a branch."
msgstr ""
"No es pot configurar la informació de seguiment; el punt inicial '%s' no és "
-"una rama."
+"una branca."
#: branch.c:197
#, c-format
msgid "the requested upstream branch '%s' does not exist"
-msgstr "la rama font demanada '%s' no existeix"
+msgstr "la branca font demanada '%s' no existeix"
#: branch.c:199
msgid ""
@@ -222,14 +226,14 @@ msgid ""
"\"git push -u\" to set the upstream config as you push."
msgstr ""
"\n"
-"Si planeu basar el teu treball en una rama font que ja\n"
-"existeix al remot, pot que necessiteu executar\n"
-"\"git fetch\" per a obtenir-la.\n"
+"Si teniu pensat basar el vostre treball en una branca\n"
+"font que ja existeix al remot, pot ser que necessiteu\n"
+"executar \"git fetch\" per a obtenir-la.\n"
"\n"
-"Si planeu pujar una rama local nova que seguirà la seva\n"
-"contrapart remota, pot que voleu usar\n"
-"\"git push -u\" per establir la configuració font mentre\n"
-"pugeu."
+"Si teniu pensat pujar una branca local nova que seguirà\n"
+"la seva contrapart remota, pot ser que vulgueu usar\n"
+"\"git push -u\" per a establir la configuració font\n"
+"mentre pugeu."
#: branch.c:243
#, c-format
@@ -249,14 +253,14 @@ msgstr "No és un punt de ramificació vàlid: '%s'."
#: bundle.c:34
#, c-format
msgid "'%s' does not look like a v2 bundle file"
-msgstr "'%s' no sembla a un fitxer d'embolic v2"
+msgstr "'%s' no sembla un fitxer de farcell v2"
#: bundle.c:61
#, c-format
msgid "unrecognized header: %s%s (%d)"
msgstr "capçalera no reconeguda: %s%s (%d)"
-#: bundle.c:87 builtin/commit.c:788
+#: bundle.c:87 builtin/commit.c:770
#, c-format
msgid "could not open '%s'"
msgstr "no s'ha pogut obrir '%s'"
@@ -265,9 +269,9 @@ msgstr "no s'ha pogut obrir '%s'"
msgid "Repository lacks these prerequisite commits:"
msgstr "Al dipòsit li manquen aquestes comissions prerequisits:"
-#: bundle.c:163 sequencer.c:641 sequencer.c:1096 builtin/blame.c:2706
-#: builtin/branch.c:652 builtin/commit.c:1085 builtin/log.c:330
-#: builtin/log.c:823 builtin/log.c:1432 builtin/log.c:1669 builtin/merge.c:357
+#: bundle.c:163 sequencer.c:645 sequencer.c:1100 builtin/blame.c:2706
+#: builtin/branch.c:652 builtin/commit.c:1049 builtin/log.c:330
+#: builtin/log.c:823 builtin/log.c:1432 builtin/log.c:1669 builtin/merge.c:358
#: builtin/shortlog.c:158
msgid "revision walk setup failed"
msgstr "la configuració del passeig per revisions ha fallat"
@@ -276,19 +280,19 @@ msgstr "la configuració del passeig per revisions ha fallat"
#, c-format
msgid "The bundle contains this ref:"
msgid_plural "The bundle contains these %d refs:"
-msgstr[0] "L'embolic conté aquesta referència:"
-msgstr[1] "L'embolic conté aquestes %d referències:"
+msgstr[0] "El farcell conté aquesta referència:"
+msgstr[1] "El farcell conté aquestes %d referències:"
#: bundle.c:192
msgid "The bundle records a complete history."
-msgstr "L'embolic registra una història completa."
+msgstr "El farcell registra una història completa."
#: bundle.c:194
#, c-format
msgid "The bundle requires this ref:"
msgid_plural "The bundle requires these %d refs:"
-msgstr[0] "L'embolic requereix aquesta referència:"
-msgstr[1] "L'embolic requereix aquestes %d referències:"
+msgstr[0] "El farcell requereix aquesta referència:"
+msgstr[1] "El farcell requereix aquestes %d referències:"
#: bundle.c:251
msgid "Could not spawn pack-objects"
@@ -314,7 +318,7 @@ msgstr "paràmetre no reconegut: %s"
#: bundle.c:444
msgid "Refusing to create empty bundle."
-msgstr "Refusant crear un embolic buit."
+msgstr "Refusant crear un farcell buit."
#: bundle.c:454
#, c-format
@@ -325,10 +329,10 @@ msgstr "no es pot crear '%s'"
msgid "index-pack died"
msgstr "L'index-pack s'ha mort"
-#: color.c:157
+#: color.c:259
#, c-format
msgid "invalid color value: %.*s"
-msgstr "valor de color invàlid: %.*s"
+msgstr "valor de color no vàlid: %.*s"
#: commit.c:40
#, c-format
@@ -372,28 +376,27 @@ msgstr "nivell de compressió de zlib dolent %d"
#: config.c:885
#, c-format
msgid "invalid mode for object creation: %s"
-msgstr "mode de creació d'objecte invàlid: %s"
+msgstr "mode de creació d'objecte no vàlid: %s"
-#: config.c:1201
+#: config.c:1211
msgid "unable to parse command-line config"
-msgstr "incapaç de analitzar la configuració de la línia d'ordres"
+msgstr "no s'ha pogut analitzar la configuració de la línia d'ordres"
-#: config.c:1262
+#: config.c:1272
msgid "unknown error occured while reading the configuration files"
-msgstr ""
-"s'ha ocorregut un error desconegut en llegir els fitxers de configuració"
+msgstr "ha ocorregut un error desconegut en llegir els fitxers de configuració"
-#: config.c:1586
+#: config.c:1596
#, c-format
msgid "unable to parse '%s' from command-line config"
-msgstr "incapaç d'analitzar '%s' de la configuració de la línia d'ordres"
+msgstr "no s'ha pogut analitzar '%s' de la configuració de la línia d'ordres"
-#: config.c:1588
+#: config.c:1598
#, c-format
msgid "bad config variable '%s' in file '%s' at line %d"
-msgstr "variable de configuració dolent '%s' en el fitxer '%s' a la línia %d"
+msgstr "variable de configuració dolenta '%s' en el fitxer '%s' a la línia %d"
-#: config.c:1647
+#: config.c:1657
#, c-format
msgid "%s has multiple values"
msgstr "%s té múltiples valors"
@@ -470,8 +473,8 @@ msgstr[1] "%lu anys"
#, c-format
msgid "%s, %lu month ago"
msgid_plural "%s, %lu months ago"
-msgstr[0] "%s, fa %lu mes"
-msgstr[1] "%s, fa %lu mesos"
+msgstr[0] "fa %s i %lu mes"
+msgstr[1] "fa %s i %lu mesos"
#: date.c:154 date.c:159
#, c-format
@@ -487,7 +490,7 @@ msgstr "s'ha fallat en llegir el fitxer d'ordres '%s'"
#: diffcore-rename.c:516
msgid "Performing inexact rename detection"
-msgstr "Realitzant detecció inexacte de canvis de nom"
+msgstr "Realitzant detecció inexacta de canvis de nom"
#: diff.c:114
#, c-format
@@ -503,7 +506,7 @@ msgstr " Paràmetre de dirstat desconegut '%s'\n"
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr ""
-"Valor desconegut del variable de configuració de 'diff.submodule': '%s'"
+"Valor desconegut de la variable de configuració de 'diff.submodule': '%s'"
#: diff.c:266
#, c-format
@@ -511,7 +514,7 @@ msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
"%s"
msgstr ""
-"Errors trobat en el variable de configuració 'diff.dirstat':\n"
+"Errors trobats en la variable de configuració 'diff.dirstat':\n"
"%s"
#: diff.c:2957
@@ -521,7 +524,7 @@ msgstr "El diff external s'ha mort, aturant a %s"
#: diff.c:3352
msgid "--follow requires exactly one pathspec"
-msgstr "--follow requereix exactament una especificació de ruta"
+msgstr "--follow requereix exactament una especificació de camí"
#: diff.c:3515
#, c-format
@@ -562,7 +565,7 @@ msgstr "s'ha fallat en escriure la firma separada a '%s': %s"
#: grep.c:1718
#, c-format
msgid "'%s': unable to read %s"
-msgstr "'%s': incapaç de llegir %s"
+msgstr "'%s': no s'ha pogut llegir %s"
#: grep.c:1735
#, c-format
@@ -581,11 +584,11 @@ msgstr "ordres de git disponibles en '%s'"
#: help.c:214
msgid "git commands available from elsewhere on your $PATH"
-msgstr "ordres de git disponibles d'altres llocs en la vostra $PATH"
+msgstr "ordres de git disponibles d'altres llocs en el vostre $PATH"
#: help.c:230
msgid "The most commonly used git commands are:"
-msgstr "Els ordres de git més freqüentment usats són:"
+msgstr "Les ordres de git més freqüentment usades són:"
#: help.c:289
#, c-format
@@ -593,8 +596,8 @@ msgid ""
"'%s' appears to be a git command, but we were not\n"
"able to execute it. Maybe git-%s is broken?"
msgstr ""
-"'%s' sembla un ordre git, però no hem pogut\n"
-"executar-lo. Pot ser que git-%s està estropejat?"
+"'%s' sembla una ordre git, però no hem pogut\n"
+"executar-la. Pot ser que git-%s estigui estropejat?"
#: help.c:346
msgid "Uh oh. Your system reports no Git commands at all."
@@ -606,8 +609,8 @@ msgid ""
"WARNING: You called a Git command named '%s', which does not exist.\n"
"Continuing under the assumption that you meant '%s'"
msgstr ""
-"AVÍS: Heu invocat un ordre de Git amb nom '%s', el qual no existeix.\n"
-"Continuant baix l'assumpció que volíeu dir '%s'"
+"AVÍS: Heu invocat una ordre de Git amb nom '%s', la qual no existeix.\n"
+"Continuant sota l'assumpció que volíeu dir '%s'"
#: help.c:373
#, c-format
@@ -617,7 +620,7 @@ msgstr "en %0.1f segons automàticament..."
#: help.c:380
#, c-format
msgid "git: '%s' is not a git command. See 'git --help'."
-msgstr "git: '%s' no és un ordre de git. Veu 'git --help'."
+msgstr "git: '%s' no és una ordre de git. Vegeu 'git --help'."
#: help.c:384 help.c:444
msgid ""
@@ -638,11 +641,11 @@ msgstr[1] ""
msgid "%s: %s - %s"
msgstr "%s: %s - %s"
-#: lockfile.c:275
+#: lockfile.c:283
msgid "BUG: reopen a lockfile that is still open"
msgstr "BUG: reobrir un fitxer de bloqueig que encara està obert"
-#: lockfile.c:277
+#: lockfile.c:285
msgid "BUG: reopen a lockfile that has been committed"
msgstr "BUG: reobrir un fitxer de bloqueig que s'ha comès"
@@ -650,10 +653,10 @@ msgstr "BUG: reobrir un fitxer de bloqueig que s'ha comès"
msgid "failed to read the cache"
msgstr "s'ha fallat en llegir la memòria cau"
-#: merge.c:94 builtin/checkout.c:356 builtin/checkout.c:562
-#: builtin/clone.c:659
+#: merge.c:94 builtin/checkout.c:374 builtin/checkout.c:580
+#: builtin/clone.c:662
msgid "unable to write new index file"
-msgstr "incapaç d'escriure un fitxer d'índex nou"
+msgstr "no s'ha pogut escriure un fitxer d'índex nou"
#: merge-recursive.c:189
#, c-format
@@ -663,70 +666,70 @@ msgstr "(comissió dolenta)\n"
#: merge-recursive.c:209
#, c-format
msgid "addinfo_cache failed for path '%s'"
-msgstr "addinfo_cache ha fallat per a la ruta '%s'"
+msgstr "addinfo_cache ha fallat per al camí '%s'"
#: merge-recursive.c:270
msgid "error building trees"
msgstr "error en construir arbres"
-#: merge-recursive.c:691
+#: merge-recursive.c:688
#, c-format
msgid "failed to create path '%s'%s"
-msgstr "s'ha fallat en crear la ruta '%s' %s"
+msgstr "s'ha fallat en crear el camí '%s' %s"
-#: merge-recursive.c:702
+#: merge-recursive.c:699
#, c-format
msgid "Removing %s to make room for subdirectory\n"
-msgstr "Traient %s per a fer espai per al subdirectori\n"
+msgstr "Eliminant %s per a fer espai per al subdirectori\n"
-#: merge-recursive.c:716 merge-recursive.c:737
+#: merge-recursive.c:713 merge-recursive.c:734
msgid ": perhaps a D/F conflict?"
msgstr ": potser un conflicte D/F?"
-#: merge-recursive.c:727
+#: merge-recursive.c:724
#, c-format
msgid "refusing to lose untracked file at '%s'"
msgstr "refusant perdre el fitxer no seguit a '%s'"
-#: merge-recursive.c:767
+#: merge-recursive.c:764
#, c-format
msgid "cannot read object %s '%s'"
msgstr "no es pot llegir l'objecte %s '%s'"
-#: merge-recursive.c:769
+#: merge-recursive.c:766
#, c-format
msgid "blob expected for %s '%s'"
msgstr "blob esperat per a %s '%s'"
-#: merge-recursive.c:792 builtin/clone.c:318
+#: merge-recursive.c:789 builtin/clone.c:321
#, c-format
msgid "failed to open '%s'"
msgstr "s'ha fallat en obrir '%s'"
-#: merge-recursive.c:800
+#: merge-recursive.c:797
#, c-format
msgid "failed to symlink '%s'"
msgstr "s'ha fallat en fer l'enllaç simbòlic '%s'"
-#: merge-recursive.c:803
+#: merge-recursive.c:800
#, c-format
msgid "do not know what to do with %06o %s '%s'"
msgstr "no es sap què fer amb %06o %s '%s'"
-#: merge-recursive.c:941
+#: merge-recursive.c:938
msgid "Failed to execute internal merge"
msgstr "S'ha fallat en executar la fusió interna"
-#: merge-recursive.c:945
+#: merge-recursive.c:942
#, c-format
msgid "Unable to add %s to database"
-msgstr "Incapaç d'afegir %s a la base de dades"
+msgstr "no s'ha pogut afegir %s a la base de dades"
-#: merge-recursive.c:961
+#: merge-recursive.c:958
msgid "unsupported object type in the tree"
-msgstr "tipus d'objecte no suportat en l'arbre"
+msgstr "tipus d'objecte no compatible en l'arbre"
-#: merge-recursive.c:1036 merge-recursive.c:1050
+#: merge-recursive.c:1033 merge-recursive.c:1047
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
@@ -735,7 +738,7 @@ msgstr ""
"CONFLICTE: (%s/supressió): %s suprimit en %s i %s en %s. La versió %s de %s "
"s'ha deixat en l'arbre."
-#: merge-recursive.c:1042 merge-recursive.c:1055
+#: merge-recursive.c:1039 merge-recursive.c:1052
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
@@ -744,188 +747,188 @@ msgstr ""
"CONFLICTE: (%s/supressió): %s suprimit en %s i %s en %s. La versió %s de %s "
"s'ha deixat en l'arbre a %s."
-#: merge-recursive.c:1096
+#: merge-recursive.c:1093
msgid "rename"
msgstr "canvia de nom"
-#: merge-recursive.c:1096
+#: merge-recursive.c:1093
msgid "renamed"
msgstr "canviat de nom"
-#: merge-recursive.c:1152
+#: merge-recursive.c:1149
#, c-format
msgid "%s is a directory in %s adding as %s instead"
msgstr "%s és un directori en %s; afegint com a %s en lloc"
-#: merge-recursive.c:1174
+#: merge-recursive.c:1171
#, c-format
msgid ""
"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s"
"\"->\"%s\" in \"%s\"%s"
msgstr ""
"CONFLICTE (canvi de nom/canvi de nom): Canvi de nom \"%s\"->\"%s\" en la "
-"rama \"%s\" canvi de nom \"%s\"->\"%s\" en \"%s\"%s"
+"branca \"%s\" canvi de nom \"%s\"->\"%s\" en \"%s\"%s"
-#: merge-recursive.c:1179
+#: merge-recursive.c:1176
msgid " (left unresolved)"
msgstr " (deixat sense resolució)"
-#: merge-recursive.c:1233
+#: merge-recursive.c:1230
#, c-format
msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
msgstr ""
"CONFLICTE (canvi de nom/canvi de nom): Canvi de nom %s->%s en %s. Canvi de "
"nom %s->%s en %s"
-#: merge-recursive.c:1263
+#: merge-recursive.c:1260
#, c-format
msgid "Renaming %s to %s and %s to %s instead"
-msgstr "Canviant el nom de %s a %s i %s a %s en lloc"
+msgstr "Canviant el nom de %s a %s i %s a %s en lloc d'això"
-#: merge-recursive.c:1462
+#: merge-recursive.c:1459
#, c-format
msgid "CONFLICT (rename/add): Rename %s->%s in %s. %s added in %s"
msgstr ""
"CONFLICTE (supressió/afegiment): Canvi de nom %s->%s en %s. %s afegit en %s"
-#: merge-recursive.c:1472
+#: merge-recursive.c:1469
#, c-format
msgid "Adding merged %s"
msgstr "Afegint %s fusionat"
-#: merge-recursive.c:1477 merge-recursive.c:1675
+#: merge-recursive.c:1474 merge-recursive.c:1672
#, c-format
msgid "Adding as %s instead"
-msgstr "Afegint com a %s en lloc"
+msgstr "Afegint com a %s en lloc d'això"
-#: merge-recursive.c:1528
+#: merge-recursive.c:1525
#, c-format
msgid "cannot read object %s"
msgstr "no es pot llegir l'objecte %s"
-#: merge-recursive.c:1531
+#: merge-recursive.c:1528
#, c-format
msgid "object %s is not a blob"
msgstr "L'objecte %s no és un blob"
-#: merge-recursive.c:1579
+#: merge-recursive.c:1576
msgid "modify"
msgstr "modifica"
-#: merge-recursive.c:1579
+#: merge-recursive.c:1576
msgid "modified"
msgstr "modificat"
-#: merge-recursive.c:1589
+#: merge-recursive.c:1586
msgid "content"
msgstr "contingut"
-#: merge-recursive.c:1596
+#: merge-recursive.c:1593
msgid "add/add"
msgstr "afegiment/afegiment"
-#: merge-recursive.c:1630
+#: merge-recursive.c:1627
#, c-format
msgid "Skipped %s (merged same as existing)"
msgstr "%s saltat (el fusionat és igual a l'existent)"
-#: merge-recursive.c:1644
+#: merge-recursive.c:1641
#, c-format
msgid "Auto-merging %s"
msgstr "Autofusionant %s"
-#: merge-recursive.c:1648 git-submodule.sh:1150
+#: merge-recursive.c:1645 git-submodule.sh:1150
msgid "submodule"
msgstr "submòdul"
-#: merge-recursive.c:1649
+#: merge-recursive.c:1646
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
msgstr "CONFLICTE (%s): Conflicte de fusió en %s"
-#: merge-recursive.c:1735
+#: merge-recursive.c:1732
#, c-format
msgid "Removing %s"
-msgstr "Traient %s"
+msgstr "Eliminant %s"
-#: merge-recursive.c:1760
+#: merge-recursive.c:1757
msgid "file/directory"
msgstr "fitxer/directori"
-#: merge-recursive.c:1766
+#: merge-recursive.c:1763
msgid "directory/file"
msgstr "directori/fitxer"
-#: merge-recursive.c:1771
+#: merge-recursive.c:1768
#, c-format
msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
msgstr ""
-"CONFLICTE (%s=: Hi ha un directori amb nom %s en %s. Afegint %s com a %s"
+"CONFLICTE (%s): Hi ha un directori amb nom %s en %s. Afegint %s com a %s"
-#: merge-recursive.c:1781
+#: merge-recursive.c:1778
#, c-format
msgid "Adding %s"
msgstr "Afegint %s"
-#: merge-recursive.c:1798
+#: merge-recursive.c:1795
msgid "Fatal merge failure, shouldn't happen."
msgstr "Fallat de fusió fatal; això no ha de passar."
-#: merge-recursive.c:1817
+#: merge-recursive.c:1814
msgid "Already up-to-date!"
msgstr "Ja al dia!"
-#: merge-recursive.c:1826
+#: merge-recursive.c:1823
#, c-format
msgid "merging of trees %s and %s failed"
msgstr "la fusió dels arbres %s i %s ha fallat"
-#: merge-recursive.c:1856
+#: merge-recursive.c:1853
#, c-format
msgid "Unprocessed path??? %s"
-msgstr "Ruta no processat??? %s"
+msgstr "Camí no processat??? %s"
-#: merge-recursive.c:1901
+#: merge-recursive.c:1898
msgid "Merging:"
msgstr "Fusionant:"
-#: merge-recursive.c:1914
+#: merge-recursive.c:1911
#, c-format
msgid "found %u common ancestor:"
msgid_plural "found %u common ancestors:"
msgstr[0] "s'ha trobat %u avantpassat:"
msgstr[1] "s'han trobat %u avantpassats:"
-#: merge-recursive.c:1951
+#: merge-recursive.c:1948
msgid "merge returned no commit"
msgstr "la fusió no ha retornat cap comissió"
-#: merge-recursive.c:2008
+#: merge-recursive.c:2005
#, c-format
msgid "Could not parse object '%s'"
msgstr "No s'ha pogut analitzar l'objecte '%s'"
-#: merge-recursive.c:2019 builtin/merge.c:666
+#: merge-recursive.c:2016 builtin/merge.c:667
msgid "Unable to write index."
-msgstr "Incapaç d'escriure l'índex."
+msgstr "No s'ha pogut escriure l'índex."
#: notes-utils.c:41
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr "No es pot cometre un arbre de notes no inicialitzat / no referenciat"
-#: notes-utils.c:83
+#: notes-utils.c:82
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
msgstr "Valor de notes.rewriteMode dolent: '%s'"
-#: notes-utils.c:93
+#: notes-utils.c:92
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr "Refusant reescriure les notes en %s (fora de refs/notes/)"
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: notes-utils.c:120
+#: notes-utils.c:119
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Valor dolent de %s: '%s'"
@@ -933,7 +936,7 @@ msgstr "Valor dolent de %s: '%s'"
#: object.c:241
#, c-format
msgid "unable to parse object: %s"
-msgstr "incapaç d'analitzar l'objecte: %s"
+msgstr "no s'ha pogut analitzar l'objecte: %s"
#: parse-options.c:546
msgid "..."
@@ -949,7 +952,7 @@ msgstr "ús: %s"
#: parse-options.c:568
#, c-format
msgid " or: %s"
-msgstr " o: %s"
+msgstr " o: %s"
#: parse-options.c:571
#, c-format
@@ -963,7 +966,7 @@ msgstr "-NUM"
#: pathspec.c:133
msgid "global 'glob' and 'noglob' pathspec settings are incompatible"
msgstr ""
-"els ajusts d'especificació de ruta 'glob' i 'noglob' globals són "
+"els ajusts d'especificació de camí 'glob' i 'noglob' globals són "
"incompatibles"
#: pathspec.c:143
@@ -971,27 +974,27 @@ msgid ""
"global 'literal' pathspec setting is incompatible with all other global "
"pathspec settings"
msgstr ""
-"l'ajust d'especificació de ruta 'literal' global és incompatible amb tots "
-"els altres ajusts d'especificació de ruta globals"
+"l'ajust d'especificació de camí 'literal' global és incompatible amb tots "
+"els altres ajusts d'especificació de camí globals"
#: pathspec.c:177
msgid "invalid parameter for pathspec magic 'prefix'"
-msgstr "paràmetre invàlid per a la màgica d'especificació de ruta 'prefix'"
+msgstr "paràmetre no vàlid per a la màgia d'especificació de camí 'prefix'"
#: pathspec.c:183
#, c-format
msgid "Invalid pathspec magic '%.*s' in '%s'"
-msgstr "Màgica d'especificació de ruta invàlida '%.*s' en '%s'"
+msgstr "Màgia d'especificació de camí no vàlida '%.*s' en '%s'"
#: pathspec.c:187
#, c-format
msgid "Missing ')' at the end of pathspec magic in '%s'"
-msgstr "')' mancant al final de la màgica d'especificació de ruta en '%s'"
+msgstr "')' mancant al final de la màgia d'especificació de camí en '%s'"
#: pathspec.c:205
#, c-format
msgid "Unimplemented pathspec magic '%c' in '%s'"
-msgstr "Màgica d'especificació de ruta no implementada '%c' en '%s'"
+msgstr "Màgia d'especificació de camí no implementada '%c' en '%s'"
#: pathspec.c:230
#, c-format
@@ -1011,12 +1014,13 @@ msgstr "L'especificació '%s' és en el submòdul '%.*s'"
#: pathspec.c:353
#, c-format
msgid "%s: pathspec magic not supported by this command: %s"
-msgstr "%s: aquest ordre no suporta la màgica d'especificació de ruta: %s"
+msgstr ""
+"%s: aquesta ordre no és compatible amb la màgia d'especificació de camí: %s"
#: pathspec.c:432
#, c-format
msgid "pathspec '%s' is beyond a symbolic link"
-msgstr "l'especificació de ruta '%s' és més allà d'un enllaç simbòlic"
+msgstr "l'especificació de camí '%s' és més enllà d'un enllaç simbòlic"
#: pathspec.c:441
msgid ""
@@ -1028,34 +1032,34 @@ msgstr ""
#: pretty.c:968
msgid "unable to parse --pretty format"
-msgstr "incapaç d'analitzar el format --pretty"
+msgstr "no s'ha pogut analitzar el format --pretty"
#: progress.c:225
msgid "done"
msgstr "fet"
-#: read-cache.c:1261
+#: read-cache.c:1267
#, c-format
msgid ""
"index.version set, but the value is invalid.\n"
"Using version %i"
msgstr ""
-"index.version establert, però el valor és invàlid.\n"
+"index.version establert, però el valor no és vàlid.\n"
"Usant la versió %i"
-#: read-cache.c:1271
+#: read-cache.c:1277
#, c-format
msgid ""
"GIT_INDEX_VERSION set, but the value is invalid.\n"
"Using version %i"
msgstr ""
-"GIT_INDEX_VERSION establert, però el valor és invàlid.\n"
+"GIT_INDEX_VERSION establert, però el valor no és vàlid.\n"
"Usant la versió %i"
#: remote.c:782
#, c-format
msgid "Cannot fetch both %s and %s to %s"
-msgstr "No és pot obtenir ambdós %s i %s a %s"
+msgstr "No es pot obtenir ambdós %s i %s a %s"
#: remote.c:786
#, c-format
@@ -1071,48 +1075,48 @@ msgstr "%s segueix ambdós %s i %s"
msgid "Internal error"
msgstr "Error intern"
-#: remote.c:1968
+#: remote.c:1980
#, c-format
msgid "Your branch is based on '%s', but the upstream is gone.\n"
-msgstr "La teva rama està basada en '%s', però la font no és.\n"
+msgstr "La vostra branca està basada en '%s', però la font no hi és.\n"
-#: remote.c:1972
+#: remote.c:1984
msgid " (use \"git branch --unset-upstream\" to fixup)\n"
msgstr " (useu \"git branch --unset-upstream\" per a arreglar)\n"
-#: remote.c:1975
+#: remote.c:1987
#, c-format
msgid "Your branch is up-to-date with '%s'.\n"
-msgstr "La vostra rama està al dia amb '%s'.\n"
+msgstr "La vostra branca està al dia amb '%s'.\n"
-#: remote.c:1979
+#: remote.c:1991
#, c-format
msgid "Your branch is ahead of '%s' by %d commit.\n"
msgid_plural "Your branch is ahead of '%s' by %d commits.\n"
-msgstr[0] "La vostra rama està davant de '%s' per %d comissions.\n"
-msgstr[1] "La vostra rama està davant de '%s' per %d comissions.\n"
+msgstr[0] "La vostra branca està davant de '%s' per %d comissió.\n"
+msgstr[1] "La vostra branca està davant de '%s' per %d comissions.\n"
-#: remote.c:1985
+#: remote.c:1997
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (useu \"git push\" per a publicar les vostres comissions locals)\n"
-#: remote.c:1988
+#: remote.c:2000
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
"Your branch is behind '%s' by %d commits, and can be fast-forwarded.\n"
msgstr[0] ""
-"La vostra rama està darrere de '%s' per %d comissió, i pot avançar-se "
+"La vostra branca està darrere de '%s' per %d comissió, i pot avançar-se "
"ràpidament.\n"
msgstr[1] ""
-"La vostra rama està darrere de '%s' per %d comissions, i pot avançar-se "
+"La vostra branca està darrere de '%s' per %d comissions, i pot avançar-se "
"ràpidament.\n"
-#: remote.c:1996
+#: remote.c:2008
msgid " (use \"git pull\" to update your local branch)\n"
-msgstr " (useu \"git pull\" per a actualitzar la vostra rama local)\n"
+msgstr " (useu \"git pull\" per a actualitzar la vostra branca local)\n"
-#: remote.c:1999
+#: remote.c:2011
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -1121,15 +1125,15 @@ msgid_plural ""
"Your branch and '%s' have diverged,\n"
"and have %d and %d different commits each, respectively.\n"
msgstr[0] ""
-"La vostra rama i '%s' s'han divergit,\n"
+"La vostra branca i '%s' s'han divergit,\n"
"i tenen %d i %d comissió distinta cada una, respectivament.\n"
msgstr[1] ""
-"La vostra rama i '%s' s'han divergit,\n"
+"La vostra branca i '%s' s'han divergit,\n"
"i tenen %d i %d comissions distintes cada una, respectivament.\n"
-#: remote.c:2009
+#: remote.c:2021
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
-msgstr " (useu \"git pull\" per a fusionar la rama remota a la vostra)\n"
+msgstr " (useu \"git pull\" per a fusionar la branca remota a la vostra)\n"
#: run-command.c:87
msgid "open /dev/null failed"
@@ -1140,22 +1144,22 @@ msgstr "s'ha fallat en obrir /dev/null"
msgid "dup2(%d,%d) failed"
msgstr "dup2(%d,%d) ha fallat"
-#: send-pack.c:265
+#: send-pack.c:268
msgid "failed to sign the push certificate"
msgstr "s'ha fallat en firmar el certificat de pujada"
-#: send-pack.c:322
+#: send-pack.c:325
msgid "the receiving end does not support --signed push"
-msgstr "el destí rebent no suporta el pujar --signed"
+msgstr "el destí receptor no admet pujar --signed"
-#: sequencer.c:172 builtin/merge.c:781 builtin/merge.c:892
-#: builtin/merge.c:1002 builtin/merge.c:1012
+#: sequencer.c:172 builtin/merge.c:782 builtin/merge.c:893 builtin/merge.c:995
+#: builtin/merge.c:1005
#, c-format
msgid "Could not open '%s' for writing"
msgstr "No s'ha pogut obrir '%s' per a escriptura"
-#: sequencer.c:174 builtin/merge.c:343 builtin/merge.c:784
-#: builtin/merge.c:1004 builtin/merge.c:1017
+#: sequencer.c:174 builtin/merge.c:344 builtin/merge.c:785 builtin/merge.c:997
+#: builtin/merge.c:1010
#, c-format
msgid "Could not write to '%s'"
msgstr "No s'ha pogut escriure al '%s'"
@@ -1165,8 +1169,8 @@ msgid ""
"after resolving the conflicts, mark the corrected paths\n"
"with 'git add <paths>' or 'git rm <paths>'"
msgstr ""
-"després de resoldre els conflictes, marqueu les rutes\n"
-"corregides amb 'git add <rutes>' o 'git rm <rutes>'"
+"després de resoldre els conflictes, marqueu els camins\n"
+"corregits amb 'git add <camins>' o 'git rm <camins>'"
#: sequencer.c:198
msgid ""
@@ -1174,11 +1178,11 @@ msgid ""
"with 'git add <paths>' or 'git rm <paths>'\n"
"and commit the result with 'git commit'"
msgstr ""
-"després de resoldre els conflictes, marqueu les rutes\n"
-"corregides amb 'git add <rutes>' o 'git rm <rutes>'\n"
+"després de resoldre els conflictes, marqueu els camins\n"
+"corregits amb 'git add <camins>' o 'git rm <camins>'\n"
"i cometeu el resultat amb 'git commit'"
-#: sequencer.c:211 sequencer.c:852 sequencer.c:935
+#: sequencer.c:211 sequencer.c:856 sequencer.c:939
#, c-format
msgid "Could not write to %s"
msgstr "No s'ha pogut escriure a %s"
@@ -1186,7 +1190,7 @@ msgstr "No s'ha pogut escriure a %s"
#: sequencer.c:214
#, c-format
msgid "Error wrapping up %s"
-msgstr "Error en terminar %s"
+msgstr "Error en finalitzar %s"
#: sequencer.c:229
msgid "Your local changes would be overwritten by cherry-pick."
@@ -1201,44 +1205,44 @@ msgid "Commit your changes or stash them to proceed."
msgstr "Cometeu els vostres canvis o emmagatzemeu-los per a procedir."
#. TRANSLATORS: %s will be "revert" or "cherry-pick"
-#: sequencer.c:304
+#: sequencer.c:321
#, c-format
msgid "%s: Unable to write new index file"
-msgstr "%s: Incapaç d'escriure un fitxer d'índex nou"
+msgstr "%s: No s'ha pogut escriure un fitxer d'índex nou"
-#: sequencer.c:335
+#: sequencer.c:339
msgid "Could not resolve HEAD commit\n"
msgstr "No s'ha pogut resoldre la comissió HEAD\n"
-#: sequencer.c:355
+#: sequencer.c:359
msgid "Unable to update cache tree\n"
-msgstr "Incapaç d'actualitzar l'arbre cau\n"
+msgstr "No s'ha pogut actualitzar l'arbre cau\n"
-#: sequencer.c:402
+#: sequencer.c:406
#, c-format
msgid "Could not parse commit %s\n"
msgstr "No s'ha pogut analitzar la comissió %s\n"
-#: sequencer.c:407
+#: sequencer.c:411
#, c-format
msgid "Could not parse parent commit %s\n"
-msgstr "No s'ha pogut analitzar la comissió pare %s\n"
+msgstr "No s'ha pogut analitzar la comissió mare %s\n"
-#: sequencer.c:473
+#: sequencer.c:477
msgid "Your index file is unmerged."
msgstr "El vostre fitxer d'índex està sense fusionar."
-#: sequencer.c:492
+#: sequencer.c:496
#, c-format
msgid "Commit %s is a merge but no -m option was given."
-msgstr "La comissió %s és una fusió però cap opció -m s'ha donat."
+msgstr "La comissió %s és una fusió però no s'ha donat cap opció -m."
-#: sequencer.c:500
+#: sequencer.c:504
#, c-format
msgid "Commit %s does not have parent %d"
-msgstr "La comissió %s no té pare %d"
+msgstr "La comissió %s no té mare %d"
-#: sequencer.c:504
+#: sequencer.c:508
#, c-format
msgid "Mainline was specified but commit %s is not a merge."
msgstr ""
@@ -1246,154 +1250,154 @@ msgstr ""
#. TRANSLATORS: The first %s will be "revert" or
#. "cherry-pick", the second %s a SHA1
-#: sequencer.c:517
+#: sequencer.c:521
#, c-format
msgid "%s: cannot parse parent commit %s"
-msgstr "%s: no es pot analitzar la comissió pare %s"
+msgstr "%s: no es pot analitzar la comissió mare %s"
-#: sequencer.c:521
+#: sequencer.c:525
#, c-format
msgid "Cannot get commit message for %s"
msgstr "No es pot obtenir el missatge de comissió de %s"
-#: sequencer.c:607
+#: sequencer.c:611
#, c-format
msgid "could not revert %s... %s"
msgstr "no s'ha pogut revertir %s...%s"
-#: sequencer.c:608
+#: sequencer.c:612
#, c-format
msgid "could not apply %s... %s"
msgstr "no s'ha pogut aplicar %s...%s"
-#: sequencer.c:644
+#: sequencer.c:648
msgid "empty commit set passed"
msgstr "conjunt de comissions buit passat"
-#: sequencer.c:652
+#: sequencer.c:656
#, c-format
msgid "git %s: failed to read the index"
msgstr "git %s: s'ha fallat en llegir l'índex"
-#: sequencer.c:656
+#: sequencer.c:660
#, c-format
msgid "git %s: failed to refresh the index"
msgstr "git %s: s'ha fallat en actualitzar l'índex"
-#: sequencer.c:716
+#: sequencer.c:720
#, c-format
msgid "Cannot %s during a %s"
msgstr "No es pot %s durant un %s"
-#: sequencer.c:738
+#: sequencer.c:742
#, c-format
msgid "Could not parse line %d."
msgstr "No s'ha pogut analitzar la línia %d."
-#: sequencer.c:743
+#: sequencer.c:747
msgid "No commits parsed."
msgstr "Cap comissió analitzada."
-#: sequencer.c:756
+#: sequencer.c:760
#, c-format
msgid "Could not open %s"
msgstr "No s'ha pogut obrir %s"
-#: sequencer.c:760
+#: sequencer.c:764
#, c-format
msgid "Could not read %s."
msgstr "No s'ha pogut llegir %s."
-#: sequencer.c:767
+#: sequencer.c:771
#, c-format
msgid "Unusable instruction sheet: %s"
msgstr "Full d'instruccions inusable: %s"
-#: sequencer.c:797
+#: sequencer.c:801
#, c-format
msgid "Invalid key: %s"
-msgstr "Clau invàlid: %s"
+msgstr "Clau no vàlida: %s"
-#: sequencer.c:800
+#: sequencer.c:804
#, c-format
msgid "Invalid value for %s: %s"
-msgstr "Valor invàlid per a %s: %s"
+msgstr "Valor no vàlid per a %s: %s"
-#: sequencer.c:812
+#: sequencer.c:816
#, c-format
msgid "Malformed options sheet: %s"
-msgstr "Full d'opcions malformat: %s"
+msgstr "Full d'opcions mal format: %s"
-#: sequencer.c:833
+#: sequencer.c:837
msgid "a cherry-pick or revert is already in progress"
msgstr "un recull de cireres o una reversió ja està en curs"
-#: sequencer.c:834
+#: sequencer.c:838
msgid "try \"git cherry-pick (--continue | --quit | --abort)\""
msgstr "intenteu \"git cherry-pick (--continue | --quit | --abort)\""
-#: sequencer.c:838
+#: sequencer.c:842
#, c-format
msgid "Could not create sequencer directory %s"
msgstr "No s'ha pogut crear el directori de seqüenciador %s"
-#: sequencer.c:854 sequencer.c:939
+#: sequencer.c:858 sequencer.c:943
#, c-format
msgid "Error wrapping up %s."
-msgstr "Error en terminar %s."
+msgstr "Error en finalitzar %s."
-#: sequencer.c:873 sequencer.c:1009
+#: sequencer.c:877 sequencer.c:1013
msgid "no cherry-pick or revert in progress"
-msgstr "ni recull de cireres ni una reversió està en curs"
+msgstr "ni hi ha cap recull de cireres ni cap reversió en curs"
-#: sequencer.c:875
+#: sequencer.c:879
msgid "cannot resolve HEAD"
msgstr "no es pot resoldre HEAD"
-#: sequencer.c:877
+#: sequencer.c:881
msgid "cannot abort from a branch yet to be born"
-msgstr "no es pot avortar des d'una rama que encara ha de nàixer"
+msgstr "no es pot avortar des d'una branca que encara ha de nàixer"
-#: sequencer.c:899 builtin/apply.c:4128
+#: sequencer.c:903 builtin/apply.c:4128
#, c-format
msgid "cannot open %s: %s"
msgstr "no es pot obrir %s: %s"
-#: sequencer.c:902
+#: sequencer.c:906
#, c-format
msgid "cannot read %s: %s"
msgstr "no es pot llegir %s: %s"
-#: sequencer.c:903
+#: sequencer.c:907
msgid "unexpected end of file"
-msgstr "fin de fitxer inesperat"
+msgstr "final de fitxer inesperat"
-#: sequencer.c:909
+#: sequencer.c:913
#, c-format
msgid "stored pre-cherry-pick HEAD file '%s' is corrupt"
msgstr ""
-"el fitxer HEAD emmagatzemat abans del recull de cirers '%s' és corrupte"
+"el fitxer HEAD emmagatzemat abans del recull de cireres '%s' és corrupte"
-#: sequencer.c:932
+#: sequencer.c:936
#, c-format
msgid "Could not format %s."
msgstr "No s'ha pogut formatar %s."
-#: sequencer.c:1077
+#: sequencer.c:1081
#, c-format
msgid "%s: can't cherry-pick a %s"
-msgstr "%s: no es pot recollir com cirera un %s"
+msgstr "%s: no es pot recollir com a cirera un %s"
-#: sequencer.c:1080
+#: sequencer.c:1084
#, c-format
msgid "%s: bad revision"
msgstr "%s: revisió dolenta"
-#: sequencer.c:1114
+#: sequencer.c:1118
msgid "Can't revert as initial commit"
msgstr "No es pot revertir com a comissió inicial"
-#: sequencer.c:1115
+#: sequencer.c:1119
msgid "Can't cherry-pick into empty head"
msgstr "No es pot recollir cireres en un cap buit"
@@ -1409,36 +1413,37 @@ msgid ""
"examine these refs and maybe delete them. Turn this message off by\n"
"running \"git config advice.objectNameWarning false\""
msgstr ""
-"Git normalment mai crea una referència que termini amb 40 caràcters\n"
+"Git normalment mai crea una referència que acabi amb 40 caràcters\n"
"hexadecimals perquè s'ignorarà quan només especifiqueu 40 caràcters\n"
"hexadecimals. Aquestes referències es poden crear per error. Per\n"
"exemple,\n"
"\n"
" git checkout -b $br $(git rev-parse ...)\n"
"\n"
-"on \"$br\" és de alguna manera buit i una referència de 40 caràcters\n"
+"on \"$br\" és d'alguna manera buit i una referència de 40 caràcters\n"
"hexadecimals. Si us plau, examineu aquests referències i potser\n"
-"suprimiu-les. Desactiva aquest missatge per executar\n"
+"suprimiu-les. Desactiveu aquest missatge executant\n"
"\"git config advice.objectNameWarning false\""
#: sha1_name.c:1068
msgid "HEAD does not point to a branch"
-msgstr "HEAD no assenyala cap rama"
+msgstr "HEAD no assenyala cap branca"
#: sha1_name.c:1071
#, c-format
msgid "No such branch: '%s'"
-msgstr "No hi ha tal rama: '%s'"
+msgstr "No hi ha tal branca: '%s'"
#: sha1_name.c:1073
#, c-format
msgid "No upstream configured for branch '%s'"
-msgstr "Cap font configurada per a la rama '%s'"
+msgstr "Cap font configurada per a la branca '%s'"
#: sha1_name.c:1077
#, c-format
msgid "Upstream branch '%s' not stored as a remote-tracking branch"
-msgstr "La rama font '%s' no s'emmagatzema com a rama que segueixi al remot"
+msgstr ""
+"La branca font '%s' no s'emmagatzema com a branca que segueixi al remot"
#: submodule.c:64 submodule.c:98
msgid "Cannot change unmerged .gitmodules, resolve merge conflicts first"
@@ -1459,13 +1464,13 @@ msgstr "No s'ha pogut actualitzar l'entrada de .gitmodules %s"
#: submodule.c:109
#, c-format
msgid "Could not remove .gitmodules entry for %s"
-msgstr "No s'ha pogut treure l'entrada de .gitmodules per a %s"
+msgstr "No s'ha pogut eliminar l'entrada de .gitmodules per a %s"
#: submodule.c:120
msgid "staging updated .gitmodules failed"
msgstr "L'allistament del .gitmodules actualitzat ha fallat"
-#: submodule.c:1111 builtin/init-db.c:363
+#: submodule.c:1111 builtin/init-db.c:371
#, c-format
msgid "Could not create git link %s"
msgstr "No s'ha pogut crear l'enllaç de git %s"
@@ -1475,28 +1480,28 @@ msgstr "No s'ha pogut crear l'enllaç de git %s"
msgid "Could not set core.worktree in %s"
msgstr "No s'ha pogut establir core.worktree en %s"
-#: trailer.c:499 trailer.c:503 trailer.c:507 trailer.c:561 trailer.c:565
-#: trailer.c:569
+#: trailer.c:500 trailer.c:504 trailer.c:508 trailer.c:562 trailer.c:566
+#: trailer.c:570
#, c-format
msgid "unknown value '%s' for key '%s'"
msgstr "valor desconegut '%s' per a la clau '%s'"
-#: trailer.c:551 trailer.c:556 builtin/remote.c:288
+#: trailer.c:552 trailer.c:557 builtin/remote.c:290
#, c-format
msgid "more than one %s"
msgstr "més d'un %s"
-#: trailer.c:589
+#: trailer.c:590
#, c-format
msgid "empty trailer token in trailer '%.*s'"
msgstr "fitxa de remolc buida en el remolc '%.*s'"
-#: trailer.c:709
+#: trailer.c:710
#, c-format
msgid "could not read input file '%s'"
msgstr "no s'ha pogut llegir el fitxer d'entrada '%s'"
-#: trailer.c:712
+#: trailer.c:713
msgid "could not read from stdin"
msgstr "No s'ha pogut llegir des d'stdin"
@@ -1506,12 +1511,12 @@ msgstr "Agafant fitxers"
#: urlmatch.c:120
msgid "invalid URL scheme name or missing '://' suffix"
-msgstr "l'esquema d'URL és invàlida o li manca el sufix '://'"
+msgstr "l'esquema d'URL no és vàlida o li manca el sufix '://'"
#: urlmatch.c:144 urlmatch.c:297 urlmatch.c:356
#, c-format
msgid "invalid %XX escape sequence"
-msgstr "seqüència d'escapament %XX invàlida"
+msgstr "seqüència d'escapament %XX no vàlida"
#: urlmatch.c:172
msgid "missing host and scheme is not 'file:'"
@@ -1523,30 +1528,30 @@ msgstr "un URL 'file:' no pot tenir número de port"
#: urlmatch.c:199
msgid "invalid characters in host name"
-msgstr "hi ha caràcters invàlids en el nom de host"
+msgstr "hi ha caràcters no vàlids en el nom de host"
#: urlmatch.c:244 urlmatch.c:255
msgid "invalid port number"
-msgstr "número de port invàlid"
+msgstr "número de port no vàlid"
#: urlmatch.c:322
msgid "invalid '..' path segment"
-msgstr "segment de ruta '..' invàlid"
+msgstr "segment de camí '..' no vàlid"
#: wrapper.c:509
#, c-format
msgid "unable to access '%s': %s"
-msgstr "incapaç d'accedir a '%s': %s"
+msgstr "no s'ha pogut accedir a '%s': %s"
#: wrapper.c:530
#, c-format
msgid "unable to access '%s'"
-msgstr "incapaç d'accedir a '%s'"
+msgstr "no s'ha pogut accedir a '%s'"
#: wrapper.c:541
#, c-format
msgid "unable to look up current user in the passwd file: %s"
-msgstr "incapaç de trobar l'usuari actual en el fitxer passwd: %s"
+msgstr "no s'ha pogut trobar l'usuari actual en el fitxer passwd: %s"
#: wrapper.c:542
msgid "no such user"
@@ -1554,11 +1559,11 @@ msgstr "no hi ha tal usuari"
#: wrapper.c:550
msgid "unable to get current working directory"
-msgstr "incapaç d'obtenir el directori de treball actual"
+msgstr "no s'ha pogut obtenir el directori de treball actual"
#: wt-status.c:150
msgid "Unmerged paths:"
-msgstr "Rutes sense fusionar:"
+msgstr "Camins sense fusionar:"
#: wt-status.c:177 wt-status.c:204
#, c-format
@@ -1626,11 +1631,11 @@ msgstr "afegit per nosaltres:"
#: wt-status.c:256
msgid "deleted by them:"
-msgstr "suprimit pels:"
+msgstr "suprimit per ells:"
#: wt-status.c:258
msgid "added by them:"
-msgstr "afegit pels:"
+msgstr "afegit per ells:"
#: wt-status.c:260
msgid "deleted by us:"
@@ -1647,7 +1652,7 @@ msgstr "modificat per ambdós:"
#: wt-status.c:266
#, c-format
msgid "bug: unhandled unmerged status %x"
-msgstr "bug: estat no fusionat no manejat %x"
+msgstr "bug: estat no fusionat no gestionat %x"
#: wt-status.c:274
msgid "new file:"
@@ -1696,245 +1701,245 @@ msgstr "contingut no seguit, "
#: wt-status.c:391
#, c-format
msgid "bug: unhandled diff status %c"
-msgstr "bug: estat de diferència no manejat %c"
+msgstr "bug: estat de diferència no gestionat %c"
-#: wt-status.c:761
+#: wt-status.c:758
msgid "Submodules changed but not updated:"
msgstr "Submòduls canviats però no actualitzats:"
-#: wt-status.c:763
+#: wt-status.c:760
msgid "Submodule changes to be committed:"
msgstr "Canvis de submòdul a cometre:"
-#: wt-status.c:842
+#: wt-status.c:839
msgid ""
"Do not touch the line above.\n"
"Everything below will be removed."
msgstr ""
-"No toqueu la línia amunt.\n"
-"Tot a baix es traurà."
+"No toqueu la línia de sobre.\n"
+"Tot el que hi ha a sota s'eliminarà."
-#: wt-status.c:933
+#: wt-status.c:930
msgid "You have unmerged paths."
-msgstr "Teniu rutes sense fusionar."
+msgstr "Teniu camins sense fusionar."
-#: wt-status.c:936
+#: wt-status.c:933
msgid " (fix conflicts and run \"git commit\")"
msgstr " (arregleu els conflictes i executeu \"git commit\")"
-#: wt-status.c:939
+#: wt-status.c:936
msgid "All conflicts fixed but you are still merging."
msgstr "Tots els conflictes estan arreglats però encara esteu fusionant."
-#: wt-status.c:942
+#: wt-status.c:939
msgid " (use \"git commit\" to conclude merge)"
msgstr " (useu \"git commit\" per a concloure la fusió)"
-#: wt-status.c:952
+#: wt-status.c:949
msgid "You are in the middle of an am session."
-msgstr "Esteu en el medi d'una sessió am."
+msgstr "Esteu enmig d'una sessió am."
-#: wt-status.c:955
+#: wt-status.c:952
msgid "The current patch is empty."
msgstr "El pedaç actual està buit."
-#: wt-status.c:959
+#: wt-status.c:956
msgid " (fix conflicts and then run \"git am --continue\")"
msgstr " (arregleu els conflictes i després executeu \"git am --continue\")"
-#: wt-status.c:961
+#: wt-status.c:958
msgid " (use \"git am --skip\" to skip this patch)"
-msgstr " (useu \"git am --skip\" per a saltar aquest pedaç)"
+msgstr " (useu \"git am --skip\" per a ometre aquest pedaç)"
-#: wt-status.c:963
+#: wt-status.c:960
msgid " (use \"git am --abort\" to restore the original branch)"
-msgstr " (useu \"git am --abort\" per a restaurar la rama original)"
+msgstr " (useu \"git am --abort\" per a restaurar la branca original)"
-#: wt-status.c:1023 wt-status.c:1040
+#: wt-status.c:1020 wt-status.c:1037
#, c-format
msgid "You are currently rebasing branch '%s' on '%s'."
-msgstr "Actualment esteu rebasant la rama '%s' en '%s'."
+msgstr "Actualment esteu rebasant la branca '%s' en '%s'."
-#: wt-status.c:1028 wt-status.c:1045
+#: wt-status.c:1025 wt-status.c:1042
msgid "You are currently rebasing."
msgstr "Actualment esteu rebasant."
-#: wt-status.c:1031
+#: wt-status.c:1028
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr ""
" (arregleu els conflictes i després executeu \"git rebase --continue\")"
-#: wt-status.c:1033
+#: wt-status.c:1030
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (useu \"git rebase --skip\" per a saltar aquest pedaç)"
-#: wt-status.c:1035
+#: wt-status.c:1032
msgid " (use \"git rebase --abort\" to check out the original branch)"
-msgstr " (useu \"git rebase --abort\" per a agafar la rama original)"
+msgstr " (useu \"git rebase --abort\" per a agafar la branca original)"
-#: wt-status.c:1048
+#: wt-status.c:1045
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (tots els conflictes arreglats: executeu \"git rebase --continue\")"
-#: wt-status.c:1052
+#: wt-status.c:1049
#, c-format
msgid ""
"You are currently splitting a commit while rebasing branch '%s' on '%s'."
msgstr ""
-"Actualment esteu dividint una comissió mentre rebasant la rama '%s' en '%s'."
+"Actualment esteu dividint una comissió mentre rebaseu la branca '%s' en '%s'."
-#: wt-status.c:1057
+#: wt-status.c:1054
msgid "You are currently splitting a commit during a rebase."
msgstr "Actualment esteu dividint una comissió durant una rebase."
-#: wt-status.c:1060
+#: wt-status.c:1057
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
" (Una vegada que el vostre directori de treball sigui net, executeu \"git "
"rebase --continue\")"
-#: wt-status.c:1064
+#: wt-status.c:1061
#, c-format
msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
msgstr ""
-"Actualment esteu editant una comissió mentre rebasant la rama '%s' en '%s'."
+"Actualment esteu editant una comissió mentre rebaseu la branca '%s' en '%s'."
-#: wt-status.c:1069
+#: wt-status.c:1066
msgid "You are currently editing a commit during a rebase."
msgstr "Actualment esteu editant una comissió durant una rebase."
-#: wt-status.c:1072
+#: wt-status.c:1069
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr " (useu \"git commit --amend\" per a esmenar la comissió actual)"
-#: wt-status.c:1074
+#: wt-status.c:1071
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr ""
" (useu \"git rebase --continue\" una vegada que esteu satisfet amb els "
"vostres canvis)"
-#: wt-status.c:1084
+#: wt-status.c:1081
#, c-format
msgid "You are currently cherry-picking commit %s."
-msgstr "Actualment esteu recollint com cirera la comissió %s."
+msgstr "Actualment esteu recollint com a cirera la comissió %s."
-#: wt-status.c:1089
+#: wt-status.c:1086
msgid " (fix conflicts and run \"git cherry-pick --continue\")"
msgstr " (arregleu els conflictes i executeu \"git cherry-pick --continue\")"
-#: wt-status.c:1092
+#: wt-status.c:1089
msgid " (all conflicts fixed: run \"git cherry-pick --continue\")"
msgstr ""
" (tots els conflictes arreglats: executeu \"git cherry-pick --continue\")"
-#: wt-status.c:1094
+#: wt-status.c:1091
msgid " (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"
msgstr ""
" (useu \"git cherry-pick --abort\" per a cancel·lar l'operació de recull de "
"cireres)"
-#: wt-status.c:1103
+#: wt-status.c:1100
#, c-format
msgid "You are currently reverting commit %s."
msgstr "Actualment esteu revertint la comissió %s."
-#: wt-status.c:1108
+#: wt-status.c:1105
msgid " (fix conflicts and run \"git revert --continue\")"
msgstr " (arregleu els conflictes i executeu \"git revert --continue\")"
-#: wt-status.c:1111
+#: wt-status.c:1108
msgid " (all conflicts fixed: run \"git revert --continue\")"
msgstr ""
" (tots els conflictes estan arreglats: executeu \"git revert --continue\")"
-#: wt-status.c:1113
+#: wt-status.c:1110
msgid " (use \"git revert --abort\" to cancel the revert operation)"
msgstr ""
" (useu \"git revert --abort\" per a cancel·lar l'operació de reversió)"
-#: wt-status.c:1124
+#: wt-status.c:1121
#, c-format
msgid "You are currently bisecting, started from branch '%s'."
-msgstr "Actualment esteu bisecant, heu començat des de la rama '%s'."
+msgstr "Actualment esteu bisecant, heu començat des de la branca '%s'."
-#: wt-status.c:1128
+#: wt-status.c:1125
msgid "You are currently bisecting."
msgstr "Actualment esteu bisecant."
-#: wt-status.c:1131
+#: wt-status.c:1128
msgid " (use \"git bisect reset\" to get back to the original branch)"
-msgstr " (useu \"git bisect reset\" per a tornar a la rama original)"
+msgstr " (useu \"git bisect reset\" per a tornar a la branca original)"
-#: wt-status.c:1306
+#: wt-status.c:1303
msgid "On branch "
-msgstr "En la rama "
+msgstr "En la branca "
-#: wt-status.c:1313
+#: wt-status.c:1310
msgid "rebase in progress; onto "
msgstr "rebase en progrés; en "
-#: wt-status.c:1320
+#: wt-status.c:1317
msgid "HEAD detached at "
-msgstr "HEAD separat a"
+msgstr "HEAD separat a "
-#: wt-status.c:1322
+#: wt-status.c:1319
msgid "HEAD detached from "
-msgstr "HEAD separat de"
+msgstr "HEAD separat de "
-#: wt-status.c:1325
+#: wt-status.c:1322
msgid "Not currently on any branch."
-msgstr "Actualment no en cap rama."
+msgstr "Actualment no en cap branca."
-#: wt-status.c:1342
+#: wt-status.c:1339
msgid "Initial commit"
msgstr "Comissió inicial"
-#: wt-status.c:1356
+#: wt-status.c:1353
msgid "Untracked files"
msgstr "Fitxers no seguits"
-#: wt-status.c:1358
+#: wt-status.c:1355
msgid "Ignored files"
msgstr "Fitxers ignorats"
-#: wt-status.c:1362
+#: wt-status.c:1359
#, c-format
msgid ""
"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
"may speed it up, but you have to be careful not to forget to add\n"
"new files yourself (see 'git help status')."
msgstr ""
-"Ha trigat %.2f segons en enumerar fitxers no seguits.\n"
-"'status -uno' pot accelerar-ho, però heu de tenir cuidat de no\n"
-"oblidar afegir fitxers nous per vós mateix (veu\n"
+"S'ha trigat %.2f segons a enumerar fitxers no seguits.\n"
+"'status -uno' pot accelerar-ho, però heu d'anar amb compte de no\n"
+"oblidar-vos d'afegir fitxers nous per vós mateix (vegeu\n"
"'git help status')."
-#: wt-status.c:1368
+#: wt-status.c:1365
#, c-format
msgid "Untracked files not listed%s"
msgstr "Els fitxers no seguits no estan llistats%s"
-#: wt-status.c:1370
+#: wt-status.c:1367
msgid " (use -u option to show untracked files)"
msgstr " (useu l'opció -u per a mostrar els fitxers no seguits)"
-#: wt-status.c:1376
+#: wt-status.c:1373
msgid "No changes"
msgstr "Sense canvis"
-#: wt-status.c:1381
+#: wt-status.c:1378
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
"no hi ha canvis afegits a cometre (useu \"git add\" o \"git commit -a\")\n"
-#: wt-status.c:1384
+#: wt-status.c:1381
#, c-format
msgid "no changes added to commit\n"
msgstr "no hi ha canvis afegits a cometre\n"
-#: wt-status.c:1387
+#: wt-status.c:1384
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
@@ -1943,58 +1948,58 @@ msgstr ""
"no hi ha res afegit a cometre però fitxers no seguits estan presents (useu "
"\"git add\" per a seguir-los)\n"
-#: wt-status.c:1390
+#: wt-status.c:1387
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr "no hi ha res afegit a cometre però fitxers no seguits estan presents\n"
-#: wt-status.c:1393
+#: wt-status.c:1390
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr ""
"no hi ha res a cometre (creeu/copieu fitxers i useu \"git add\" per a seguir-"
"los)\n"
-#: wt-status.c:1396 wt-status.c:1401
+#: wt-status.c:1393 wt-status.c:1398
#, c-format
msgid "nothing to commit\n"
msgstr "no hi ha res a cometre\n"
-#: wt-status.c:1399
+#: wt-status.c:1396
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr ""
"no hi ha res a cometre (useu -u per a mostrar els fitxers no seguits)\n"
-#: wt-status.c:1403
+#: wt-status.c:1400
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "no hi ha res a cometre, directori de treball net\n"
-#: wt-status.c:1512
+#: wt-status.c:1509
msgid "HEAD (no branch)"
-msgstr "HEAD (sense rama)"
+msgstr "HEAD (sense branca)"
-#: wt-status.c:1518
+#: wt-status.c:1515
msgid "Initial commit on "
msgstr "Comissió inicial en "
-#: wt-status.c:1550
+#: wt-status.c:1547
msgid "gone"
-msgstr "no és"
+msgstr "no hi és"
-#: wt-status.c:1552 wt-status.c:1560
+#: wt-status.c:1549 wt-status.c:1557
msgid "behind "
msgstr "darrere "
-#: compat/precompose_utf8.c:55 builtin/clone.c:357
+#: compat/precompose_utf8.c:55 builtin/clone.c:360
#, c-format
msgid "failed to unlink '%s'"
msgstr "s'ha fallat en desenllaçar '%s'"
#: builtin/add.c:22
msgid "git add [options] [--] <pathspec>..."
-msgstr "git add [opcions] [--] <especificació-de-ruta>..."
+msgstr "git add [opcions] [--] <especificació-de-camí>..."
#: builtin/add.c:65
#, c-format
@@ -2008,7 +2013,7 @@ msgstr "s'ha fallat en actualitzar els fitxers"
#: builtin/add.c:80
#, c-format
msgid "remove '%s'\n"
-msgstr "treu '%s'\n"
+msgstr "elimina '%s'\n"
#: builtin/add.c:134
msgid "Unstaged changes after refreshing the index:"
@@ -2043,31 +2048,32 @@ msgstr "No s'ha pogut aplicar '%s'"
#: builtin/add.c:231
msgid "The following paths are ignored by one of your .gitignore files:\n"
-msgstr "Les rutes següents s'ignoren per un dels vostres fitxers .gitignore:\n"
+msgstr ""
+"Els camins següents s'ignoren per un dels vostres fitxers .gitignore:\n"
#: builtin/add.c:248 builtin/clean.c:875 builtin/fetch.c:108 builtin/mv.c:110
-#: builtin/prune-packed.c:55 builtin/push.c:499 builtin/remote.c:1375
+#: builtin/prune-packed.c:55 builtin/push.c:499 builtin/remote.c:1372
#: builtin/rm.c:269
msgid "dry run"
msgstr "marxa en sec"
#: builtin/add.c:249 builtin/apply.c:4415 builtin/check-ignore.c:19
-#: builtin/commit.c:1362 builtin/count-objects.c:63 builtin/fsck.c:608
+#: builtin/commit.c:1326 builtin/count-objects.c:63 builtin/fsck.c:608
#: builtin/log.c:1617 builtin/mv.c:109 builtin/read-tree.c:114
msgid "be verbose"
-msgstr "sigues verbós"
+msgstr "sigues detallat"
#: builtin/add.c:251
msgid "interactive picking"
msgstr "recull interactiu"
-#: builtin/add.c:252 builtin/checkout.c:1108 builtin/reset.c:286
+#: builtin/add.c:252 builtin/checkout.c:1126 builtin/reset.c:286
msgid "select hunks interactively"
msgstr "selecciona els trossos interactivament"
#: builtin/add.c:253
msgid "edit current diff and apply"
-msgstr "edita la diferència actual i aplica'l"
+msgstr "edita la diferència actual i aplica-la"
#: builtin/add.c:254
msgid "allow adding otherwise ignored files"
@@ -2079,7 +2085,7 @@ msgstr "actualitza els fitxers seguits"
#: builtin/add.c:256
msgid "record only the fact that the path will be added later"
-msgstr "registra només el fet que la ruta s'afegirà més tard"
+msgstr "registra només el fet que el camí s'afegirà més tard"
#: builtin/add.c:257
msgid "add changes from all tracked and untracked files"
@@ -2087,7 +2093,8 @@ msgstr "afegeix els canvis de tots els fitxers seguits i no seguits"
#: builtin/add.c:260
msgid "ignore paths removed in the working tree (same as --no-all)"
-msgstr "ignora les rutes tretes en l'arbre de treball (el mateix que --no-all)"
+msgstr ""
+"ignora els camins eliminats en l'arbre de treball (el mateix que --no-all)"
#: builtin/add.c:262
msgid "don't add, only refresh the index"
@@ -2095,22 +2102,18 @@ msgstr "no afegeixis, només actualitza l'índex"
#: builtin/add.c:263
msgid "just skip files which cannot be added because of errors"
-msgstr "només salta els fitxers que no es poden afegir a causa d'errors"
+msgstr "només omet els fitxers que no es poden afegir a causa d'errors"
#: builtin/add.c:264
msgid "check if - even missing - files are ignored in dry run"
msgstr ""
-"comproveu si els fitxers - encara els mancants - s'ignoren en marxa en sec"
+"comproveu si els fitxers - fins i tot els absents - s'ignoren en marxa en sec"
#: builtin/add.c:286
#, c-format
msgid "Use -f if you really want to add them.\n"
msgstr "Useu -f si realment els voleu afegir.\n"
-#: builtin/add.c:287
-msgid "no files added"
-msgstr "cap fitxer afegit"
-
#: builtin/add.c:293
msgid "adding files failed"
msgstr "l'afegiment de fitxers ha fallat"
@@ -2140,7 +2143,7 @@ msgstr "fitxer d'índex malmès"
#: builtin/add.c:446 builtin/apply.c:4510 builtin/mv.c:279 builtin/rm.c:431
msgid "Unable to write new index file"
-msgstr "Incapaç d'escriure un fitxer d'índex nou"
+msgstr "no s'ha pogut escriure un fitxer d'índex nou"
#: builtin/apply.c:58
msgid "git apply [options] [<patch>...]"
@@ -2169,7 +2172,7 @@ msgstr "regexec ha retornat %d per l'entrada: %s"
#: builtin/apply.c:916
#, c-format
msgid "unable to find filename in patch at line %d"
-msgstr "incapaç de trobar el nom de fitxer en el pedaç a la línia %d"
+msgstr "no s'ha pogut trobar el nom de fitxer en el pedaç a la línia %d"
#: builtin/apply.c:948
#, c-format
@@ -2213,11 +2216,11 @@ msgid_plural ""
"git diff header lacks filename information when removing %d leading pathname "
"components (line %d)"
msgstr[0] ""
-"a la capçalera de git diff li manca informació de nom de fitxer en treure %d "
-"component de nom de ruta inicial (línia %d)"
+"a la capçalera de git diff li manca informació de nom de fitxer en eliminar "
+"%d component de nom de camí inicial (línia %d)"
msgstr[1] ""
-"a la capçalera de git diff li manca informació de nom de fitxer en treure %d "
-"components de nom de ruta inicial (línia %d)"
+"a la capçalera de git diff li manca informació de nom de fitxer en eliminar "
+"%d components de nom de camí inicial (línia %d)"
#: builtin/apply.c:1657
msgid "new file depends on old contents"
@@ -2245,7 +2248,7 @@ msgstr "el fitxer suprimit %s encara té continguts"
#: builtin/apply.c:1726
#, c-format
msgid "** warning: file %s becomes empty but is not deleted"
-msgstr "** avís: el fitxer %s es buida però no es suprimeix"
+msgstr "** avís: el fitxer %s queda buit però no es suprimeix"
#: builtin/apply.c:1872
#, c-format
@@ -2265,12 +2268,12 @@ msgstr "pedaç amb només escombraries a la línia %d"
#: builtin/apply.c:2142
#, c-format
msgid "unable to read symlink %s"
-msgstr "incapaç de llegir l'enllaç simbòlic %s"
+msgstr "no s'ha pogut llegir l'enllaç simbòlic %s"
#: builtin/apply.c:2146
#, c-format
msgid "unable to open or read %s"
-msgstr "incapaç d'obrir o llegir %s"
+msgstr "no s'ha pogut obrir o llegir %s"
#: builtin/apply.c:2754
#, c-format
@@ -2295,13 +2298,13 @@ msgid ""
"while searching for:\n"
"%.*s"
msgstr ""
-"mentre cercant:\n"
+"tot cercant:\n"
"%.*s"
#: builtin/apply.c:2909
#, c-format
msgid "missing binary patch data for '%s'"
-msgstr "manquen els dades de pedaç binari de '%s'"
+msgstr "manquen les dades de pedaç binari de '%s'"
#: builtin/apply.c:3010
#, c-format
@@ -2332,7 +2335,7 @@ msgstr "la lectura de %s ha fallat"
#: builtin/apply.c:3240 builtin/apply.c:3462
#, c-format
msgid "path %s has been renamed/deleted"
-msgstr "la ruta %s s'ha canviat de nom / s'ha suprimit"
+msgstr "el camí %s s'ha canviat de nom / s'ha suprimit"
#: builtin/apply.c:3321 builtin/apply.c:3476
#, c-format
@@ -2351,7 +2354,7 @@ msgstr "%s: no coincideix amb l'índex"
#: builtin/apply.c:3432
msgid "removal patch leaves file contents"
-msgstr "el pedaç de treta deixa els continguts dels fitxers"
+msgstr "el pedaç de supressió deixa els continguts dels fitxers"
#: builtin/apply.c:3501
#, c-format
@@ -2361,7 +2364,7 @@ msgstr "%s: tipus erroni"
#: builtin/apply.c:3503
#, c-format
msgid "%s has type %o, expected %o"
-msgstr "%s és del tipus %o, %o esperat"
+msgstr "%s és del tipus %o, s'esperava %o"
#: builtin/apply.c:3604
#, c-format
@@ -2393,15 +2396,15 @@ msgstr "%s: el pedaç no aplica"
msgid "Checking patch %s..."
msgstr "Comprovant el pedaç %s..."
-#: builtin/apply.c:3746 builtin/checkout.c:213 builtin/reset.c:135
+#: builtin/apply.c:3746 builtin/checkout.c:231 builtin/reset.c:135
#, c-format
msgid "make_cache_entry failed for path '%s'"
-msgstr "make_cache_entry ha fallat per a la ruta '%s'"
+msgstr "make_cache_entry ha fallat per al camí '%s'"
#: builtin/apply.c:3889
#, c-format
msgid "unable to remove %s from index"
-msgstr "incapaç de treure %s de l'índex"
+msgstr "no s'ha pogut eliminar %s de l'índex"
#: builtin/apply.c:3918
#, c-format
@@ -2411,18 +2414,19 @@ msgstr "pedaç corrupte per al submòdul %s"
#: builtin/apply.c:3922
#, c-format
msgid "unable to stat newly created file '%s'"
-msgstr "incapaç de fer stat al fitxer novament creat '%s'"
+msgstr "no s'ha pogut fer stat al fitxer novament creat '%s'"
#: builtin/apply.c:3927
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr ""
-"incapaç de crear un magatzem de recolzament per al fitxer novament creat %s"
+"no s'ha pogut crear un magatzem de recolzament per al fitxer novament creat "
+"%s"
#: builtin/apply.c:3930 builtin/apply.c:4038
#, c-format
msgid "unable to add cache entry for %s"
-msgstr "incapaç d'afegir una entrada de cau per a %s"
+msgstr "no s'ha pogut afegir una entrada de cau per a %s"
#: builtin/apply.c:3963
#, c-format
@@ -2432,7 +2436,7 @@ msgstr "tancant el fitxer '%s'"
#: builtin/apply.c:4012
#, c-format
msgid "unable to write file '%s' mode %o"
-msgstr "incapaç d'escriure el fitxer '%s' mode %o"
+msgstr "no s'ha pogut escriure el fitxer '%s' mode %o"
#: builtin/apply.c:4099
#, c-format
@@ -2467,24 +2471,24 @@ msgstr "S'ha rebutjat el tros #%d."
#: builtin/apply.c:4234
msgid "unrecognized input"
-msgstr "entrada no reconegut"
+msgstr "entrada no reconeguda"
#: builtin/apply.c:4245
msgid "unable to read index file"
-msgstr "incapaç de llegir el fitxer d'índex"
+msgstr "no es pot llegir el fitxer d'índex"
-#: builtin/apply.c:4362 builtin/apply.c:4365 builtin/clone.c:91
+#: builtin/apply.c:4362 builtin/apply.c:4365 builtin/clone.c:92
#: builtin/fetch.c:93
msgid "path"
-msgstr "ruta"
+msgstr "camí"
#: builtin/apply.c:4363
msgid "don't apply changes matching the given path"
-msgstr "no apliquis els canvis que coincideixin amb la ruta donada"
+msgstr "no apliquis els canvis que coincideixin amb el camí donat"
#: builtin/apply.c:4366
msgid "apply changes matching the given path"
-msgstr "aplica els canvis que coincideixin amb la ruta donada"
+msgstr "aplica els canvis que coincideixin amb el camí donat"
#: builtin/apply.c:4368
msgid "num"
@@ -2493,7 +2497,7 @@ msgstr "número"
#: builtin/apply.c:4369
msgid "remove <num> leading slashes from traditional diff paths"
msgstr ""
-"treu <nombre> barres obliqües inicials de les rutes de diferència "
+"elimina <nombre> barres obliqües inicials dels camins de diferència "
"tradicionals"
#: builtin/apply.c:4372
@@ -2539,11 +2543,11 @@ msgstr "construeix un índex temporal basat en la informació d'índex incrustad
#: builtin/apply.c:4394 builtin/checkout-index.c:198 builtin/ls-files.c:455
msgid "paths are separated with NUL character"
-msgstr "rutes es separen amb el caràcter NUL"
+msgstr "els camins es separen amb el caràcter NUL"
#: builtin/apply.c:4397
msgid "ensure at least <n> lines of context match"
-msgstr "assegura que almenys <n> línies de context coincideixin"
+msgstr "assegura't que almenys <n> línies de context coincideixin"
#: builtin/apply.c:4398
msgid "action"
@@ -2556,7 +2560,7 @@ msgstr ""
#: builtin/apply.c:4402 builtin/apply.c:4405
msgid "ignore changes in whitespace when finding context"
-msgstr "ignora els canvis d'espai en blanc al cercar context"
+msgstr "ignora els canvis d'espai en blanc en cercar context"
#: builtin/apply.c:4408
msgid "apply the patch in reverse"
@@ -2683,7 +2687,8 @@ msgstr "Mostra les entrades de culpa mentre les trobem, incrementalment"
#: builtin/blame.c:2502
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr ""
-"Mostra un SHA-1 blanc peles comissions de frontera (Per defecte: desactivat)"
+"Mostra un SHA-1 en blanc per les comissions de frontera (Per defecte: "
+"desactivat)"
#: builtin/blame.c:2503
msgid "Do not treat root commits as boundaries (Default: off)"
@@ -2743,7 +2748,7 @@ msgstr "Ignora les diferencies d'espai en blanc"
#: builtin/blame.c:2516
msgid "Spend extra cycles to find better match"
-msgstr "Gasta cicles extres per a trobar una coincidència millora"
+msgstr "Gasta cicles extres per a trobar una coincidència millor"
#: builtin/blame.c:2517
msgid "Use revisions from <file> instead of calling git-rev-list"
@@ -2781,7 +2786,7 @@ msgstr "Processa només el rang de línies n,m, comptant des de 1"
#. fewer display columns.
#: builtin/blame.c:2602
msgid "4 years, 11 months ago"
-msgstr "fa 4 anys, 11 mesos"
+msgstr "fa 4 anys i 11 mesos"
#: builtin/branch.c:24
msgid "git branch [options] [-r | -a] [--merged | --no-merged]"
@@ -2789,15 +2794,15 @@ msgstr "git branch [opcions] [-r | -a] [--merged | --no-merged]"
#: builtin/branch.c:25
msgid "git branch [options] [-l] [-f] <branchname> [<start-point>]"
-msgstr "git branch [opcions] [-l] [-f] <nom-de-rama> [<punt-inicial>]"
+msgstr "git branch [opcions] [-l] [-f] <nom-de-branca> [<punt-inicial>]"
#: builtin/branch.c:26
msgid "git branch [options] [-r] (-d | -D) <branchname>..."
-msgstr "git branch [opcions] [-r] (-d | -D) <nom-de-rama>..."
+msgstr "git branch [opcions] [-r] (-d | -D) <nom-de-branca>..."
#: builtin/branch.c:27
msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>"
-msgstr "git branch [opcions] (-m | -M) [<rama-antiga>] <rama-nova>"
+msgstr "git branch [opcions] (-m | -M) [<branca-antiga>] <branca-nova>"
#: builtin/branch.c:152
#, c-format
@@ -2805,7 +2810,7 @@ msgid ""
"deleting branch '%s' that has been merged to\n"
" '%s', but not yet merged to HEAD."
msgstr ""
-"suprimint la rama '%s' que s'ha fusionat a\n"
+"suprimint la branca '%s' que s'ha fusionat a\n"
" '%s', però encara no s'ha fusionat\n"
" a HEAD."
@@ -2815,9 +2820,9 @@ msgid ""
"not deleting branch '%s' that is not yet merged to\n"
" '%s', even though it is merged to HEAD."
msgstr ""
-"no suprimint la rama '%s' que encara no s'ha\n"
-" fusionat a '%s', encara que està fusionat\n"
-" a HEAD."
+"no suprimint la branca '%s' que encara no s'ha\n"
+" fusionat a '%s', encara que està\n"
+" fusionada a HEAD."
#: builtin/branch.c:170
#, c-format
@@ -2830,7 +2835,7 @@ msgid ""
"The branch '%s' is not fully merged.\n"
"If you are sure you want to delete it, run 'git branch -D %s'."
msgstr ""
-"La rama '%s' no està totalment fusionada.\n"
+"La branca '%s' no està totalment fusionada.\n"
"Si esteu segur que la voleu suprimir, executeu 'git branch -D %s'."
#: builtin/branch.c:187
@@ -2848,47 +2853,47 @@ msgstr "No s'ha pogut trobar l'objecte de comissió de HEAD"
#: builtin/branch.c:229
#, c-format
msgid "Cannot delete the branch '%s' which you are currently on."
-msgstr "No es pot suprimir la rama '%s' en que esteu actualment."
+msgstr "No es pot suprimir la branca '%s', en la qual sou actualment."
#: builtin/branch.c:245
#, c-format
msgid "remote branch '%s' not found."
-msgstr "no s'ha trobat la rama remota '%s'."
+msgstr "no s'ha trobat la branca remota '%s'."
#: builtin/branch.c:246
#, c-format
msgid "branch '%s' not found."
-msgstr "no s'ha trobat la rama '%s'."
+msgstr "no s'ha trobat la branca '%s'."
#: builtin/branch.c:260
#, c-format
msgid "Error deleting remote branch '%s'"
-msgstr "Error en suprimir la rama remota '%s'"
+msgstr "Error en suprimir la branca remota '%s'"
#: builtin/branch.c:261
#, c-format
msgid "Error deleting branch '%s'"
-msgstr "Error en suprimir la rama '%s'"
+msgstr "Error en suprimir la branca '%s'"
#: builtin/branch.c:268
#, c-format
msgid "Deleted remote branch %s (was %s).\n"
-msgstr "S'ha suprimit la rama remota %s (ha estat %s).\n"
+msgstr "S'ha suprimit la branca remota %s (ha estat %s).\n"
#: builtin/branch.c:269
#, c-format
msgid "Deleted branch %s (was %s).\n"
-msgstr "S'ha suprimit la rama %s (ha estat %s).\n"
+msgstr "S'ha suprimit la branca %s (ha estat %s).\n"
#: builtin/branch.c:370
#, c-format
msgid "branch '%s' does not point at a commit"
-msgstr "la rama '%s' no assenyala una comissió"
+msgstr "la branca '%s' no assenyala cap comissió"
#: builtin/branch.c:459
#, c-format
msgid "[%s: gone]"
-msgstr "[%s: no és]"
+msgstr "[%s: no hi és]"
#: builtin/branch.c:464
#, c-format
@@ -2927,17 +2932,17 @@ msgstr "[davant %d, darrere %d]"
#: builtin/branch.c:496
msgid " **** invalid ref ****"
-msgstr " **** referència invàlida ****"
+msgstr " **** referència no vàlida ****"
#: builtin/branch.c:587
#, c-format
msgid "(no branch, rebasing %s)"
-msgstr "(cap rama, rebasant %s)"
+msgstr "(cap branca, rebasant %s)"
#: builtin/branch.c:590
#, c-format
msgid "(no branch, bisect started on %s)"
-msgstr "(cap rama, bisecció començada en %s)"
+msgstr "(cap branca, bisecció començada en %s)"
#: builtin/branch.c:593
#, c-format
@@ -2946,7 +2951,7 @@ msgstr "(separat de %s)"
#: builtin/branch.c:596
msgid "(no branch)"
-msgstr "(cap rama)"
+msgstr "(cap branca)"
#: builtin/branch.c:643
#, c-format
@@ -2959,43 +2964,42 @@ msgstr "no s'han pogut llegir algunes referències"
#: builtin/branch.c:704
msgid "cannot rename the current branch while not on any."
-msgstr ""
-"no es pot canviar el nom de la rama actual mentre no estant en ninguna."
+msgstr "no es pot canviar el nom de la branca actual mentre no s'és a cap."
#: builtin/branch.c:714
#, c-format
msgid "Invalid branch name: '%s'"
-msgstr "Nom de rama invàlid: '%s'"
+msgstr "Nom de branca no vàlid: '%s'"
#: builtin/branch.c:729
msgid "Branch rename failed"
-msgstr "El canvi de nom de rama ha fallat"
+msgstr "El canvi de nom de branca ha fallat"
#: builtin/branch.c:733
#, c-format
msgid "Renamed a misnamed branch '%s' away"
-msgstr "S'ha canviat el nom de la rama malanomenada '%s'"
+msgstr "S'ha canviat el nom de la branca malanomenada '%s'"
#: builtin/branch.c:737
#, c-format
msgid "Branch renamed to %s, but HEAD is not updated!"
-msgstr "S'ha canviat el nom de la rama a %s, però HEAD no està actualitzat!"
+msgstr "S'ha canviat el nom de la branca a %s, però HEAD no està actualitzat!"
#: builtin/branch.c:744
msgid "Branch is renamed, but update of config-file failed"
msgstr ""
-"La ramà està canviada de nom, però l'actualització del fitxer de "
+"La branca està canviada de nom, però l'actualització del fitxer de "
"configuració ha fallat"
#: builtin/branch.c:759
#, c-format
msgid "malformed object name %s"
-msgstr "nom d'objecte %s malformat"
+msgstr "nom d'objecte %s mal format"
#: builtin/branch.c:783
#, c-format
msgid "could not write branch description template: %s"
-msgstr "no s'ha pogut escriure la plantilla de descripció de rama: %s"
+msgstr "no s'ha pogut escriure la plantilla de descripció de branca: %s"
#: builtin/branch.c:813
msgid "Generic options"
@@ -3003,7 +3007,7 @@ msgstr "Opcions genèriques"
#: builtin/branch.c:815
msgid "show hash and subject, give twice for upstream branch"
-msgstr "mostra el hash i el tema, doneu dos vegades per la rama font"
+msgstr "mostra el hash i el tema, doneu dues vegades per la branca font"
#: builtin/branch.c:816
msgid "suppress informational messages"
@@ -3011,7 +3015,7 @@ msgstr "omet els missatges informatius"
#: builtin/branch.c:817
msgid "set up tracking mode (see git-pull(1))"
-msgstr "configura el mode de seguiment (veu git-pull(1))"
+msgstr "configura el mode de seguiment (vegeu git-pull(1))"
#: builtin/branch.c:819
msgid "change upstream info"
@@ -3023,18 +3027,18 @@ msgstr "usa sortida colorada"
#: builtin/branch.c:824
msgid "act on remote-tracking branches"
-msgstr "actua en rames amb seguiment remot"
+msgstr "actua en branques amb seguiment remot"
#: builtin/branch.c:827 builtin/branch.c:833 builtin/branch.c:854
-#: builtin/branch.c:860 builtin/commit.c:1622 builtin/commit.c:1623
-#: builtin/commit.c:1624 builtin/commit.c:1625 builtin/tag.c:616
+#: builtin/branch.c:860 builtin/commit.c:1586 builtin/commit.c:1587
+#: builtin/commit.c:1588 builtin/commit.c:1589 builtin/tag.c:616
#: builtin/tag.c:622
msgid "commit"
msgstr "comissió"
#: builtin/branch.c:828 builtin/branch.c:834
msgid "print only branches that contain the commit"
-msgstr "imprimeix només les rames que continguin la comissió"
+msgstr "imprimeix només les branques que continguin la comissió"
#: builtin/branch.c:840
msgid "Specific git-branch actions:"
@@ -3042,142 +3046,144 @@ msgstr "Accions de git-branch específiques:"
#: builtin/branch.c:841
msgid "list both remote-tracking and local branches"
-msgstr "llista ambdós les rames amb seguiment remot i les locals"
+msgstr "llista les branques amb seguiment remot i les locals"
#: builtin/branch.c:843
msgid "delete fully merged branch"
-msgstr "suprimeix la rama si és completament fusionada"
+msgstr "suprimeix la branca si és completament fusionada"
#: builtin/branch.c:844
msgid "delete branch (even if not merged)"
-msgstr "suprimeix la rama (encara que no estigui fusionada)"
+msgstr "suprimeix la branca (encara que no estigui fusionada)"
#: builtin/branch.c:845
msgid "move/rename a branch and its reflog"
-msgstr "mou/canvia de nom una rama i el seu registre de referència"
+msgstr "mou/canvia de nom una branca i el seu registre de referència"
#: builtin/branch.c:846
msgid "move/rename a branch, even if target exists"
-msgstr "mou/canvia de nom una rama, encara que el destí existeixi"
+msgstr "mou/canvia de nom una branca, encara que el destí existeixi"
#: builtin/branch.c:847
msgid "list branch names"
-msgstr "llista els noms de rama"
+msgstr "llista els noms de branca"
#: builtin/branch.c:848
msgid "create the branch's reflog"
-msgstr "crea el registre de referència de la rama"
+msgstr "crea el registre de referència de la branca"
#: builtin/branch.c:850
msgid "edit the description for the branch"
-msgstr "edita la descripció de la rama"
+msgstr "edita la descripció de la branca"
#: builtin/branch.c:851
-msgid "force creation (when already exists)"
-msgstr "força creació (quan ja existeix)"
+msgid "force creation, move/rename, deletion"
+msgstr "força creació, moviment/canvi de nom, supressió"
#: builtin/branch.c:854
msgid "print only not merged branches"
-msgstr "imprimeix només les rames sense fusionar"
+msgstr "imprimeix només les branques sense fusionar"
#: builtin/branch.c:860
msgid "print only merged branches"
-msgstr "imprimeix només les rames fusionades"
+msgstr "imprimeix només les branques fusionades"
#: builtin/branch.c:864
msgid "list branches in columns"
-msgstr "llista les rames en columnes"
+msgstr "llista les branques en columnes"
#: builtin/branch.c:877
msgid "Failed to resolve HEAD as a valid ref."
msgstr "S'ha fallat en resoldre HEAD com a referència vàlida."
-#: builtin/branch.c:881 builtin/clone.c:634
+#: builtin/branch.c:881 builtin/clone.c:637
msgid "HEAD not found below refs/heads!"
-msgstr "HEAD no trobat baix refs/heads!"
+msgstr "HEAD no trobat sota refs/heads!"
#: builtin/branch.c:903
msgid "--column and --verbose are incompatible"
msgstr "--column i --verbose són incompatibles"
-#: builtin/branch.c:909 builtin/branch.c:948
+#: builtin/branch.c:914 builtin/branch.c:953
msgid "branch name required"
-msgstr "cal el nom de rama"
+msgstr "cal el nom de branca"
-#: builtin/branch.c:924
+#: builtin/branch.c:929
msgid "Cannot give description to detached HEAD"
msgstr "No es pot donar descripció a un HEAD separat"
-#: builtin/branch.c:929
+#: builtin/branch.c:934
msgid "cannot edit description of more than one branch"
-msgstr "no es pot editar la descripció de més d'una rama"
+msgstr "no es pot editar la descripció de més d'una branca"
-#: builtin/branch.c:936
+#: builtin/branch.c:941
#, c-format
msgid "No commit on branch '%s' yet."
-msgstr "Encara no hi ha comissió en la rama '%s'."
+msgstr "Encara no hi ha comissió en la branca '%s'."
-#: builtin/branch.c:939
+#: builtin/branch.c:944
#, c-format
msgid "No branch named '%s'."
-msgstr "No hi ha rama amb nom '%s'."
+msgstr "No hi ha branca amb nom '%s'."
-#: builtin/branch.c:954
+#: builtin/branch.c:959
msgid "too many branches for a rename operation"
-msgstr "hi ha massa rames per a una operació de canvi de nom"
+msgstr "hi ha massa branques per a una operació de canvi de nom"
-#: builtin/branch.c:959
+#: builtin/branch.c:964
msgid "too many branches to set new upstream"
-msgstr "hi ha massa rames per a establir una nova font"
+msgstr "hi ha massa branques per a establir una nova font"
-#: builtin/branch.c:963
+#: builtin/branch.c:968
#, c-format
msgid ""
"could not set upstream of HEAD to %s when it does not point to any branch."
msgstr ""
-"no s'ha pogut establir la font de HEAD com a %s quan no assenyala cap rama."
+"no s'ha pogut establir la font de HEAD com a %s quan no assenyala cap branca."
-#: builtin/branch.c:966 builtin/branch.c:988 builtin/branch.c:1009
+#: builtin/branch.c:971 builtin/branch.c:993 builtin/branch.c:1014
#, c-format
msgid "no such branch '%s'"
-msgstr "no hi ha tal rama '%s'"
+msgstr "no hi ha tal branca '%s'"
-#: builtin/branch.c:970
+#: builtin/branch.c:975
#, c-format
msgid "branch '%s' does not exist"
-msgstr "la rama '%s' no existeix"
+msgstr "la branca '%s' no existeix"
-#: builtin/branch.c:982
+#: builtin/branch.c:987
msgid "too many branches to unset upstream"
-msgstr "hi ha massa rames per a desestablir la font"
+msgstr "hi ha massa branques per a desestablir la font"
-#: builtin/branch.c:986
+#: builtin/branch.c:991
msgid "could not unset upstream of HEAD when it does not point to any branch."
-msgstr "no s'ha pogut desestablir la font de HEAD quan no assenyala cap rama."
+msgstr ""
+"no s'ha pogut desestablir la font de HEAD perquè no assenyala cap branca."
-#: builtin/branch.c:992
+#: builtin/branch.c:997
#, c-format
msgid "Branch '%s' has no upstream information"
-msgstr "La rama '%s' no té informació de font"
+msgstr "La branca '%s' no té informació de font"
-#: builtin/branch.c:1006
+#: builtin/branch.c:1011
msgid "it does not make sense to create 'HEAD' manually"
msgstr "no té sentit crear 'HEAD' manualment"
-#: builtin/branch.c:1012
+#: builtin/branch.c:1017
msgid "-a and -r options to 'git branch' do not make sense with a branch name"
-msgstr "les opcions -a i -r a 'git branch' no tenen sentit amb un nom de rama"
+msgstr ""
+"les opcions -a i -r a 'git branch' no tenen sentit amb un nom de branca"
-#: builtin/branch.c:1015
+#: builtin/branch.c:1020
#, c-format
msgid ""
"The --set-upstream flag is deprecated and will be removed. Consider using --"
"track or --set-upstream-to\n"
msgstr ""
-"La bandera --set-upstream està desaprovada i es traurà. Considereu usar --"
+"La bandera --set-upstream està desaprovada i s'eliminarà. Considereu usar --"
"track o --set-upstream-to\n"
-#: builtin/branch.c:1032
+#: builtin/branch.c:1037
#, c-format
msgid ""
"\n"
@@ -3188,12 +3194,12 @@ msgstr ""
"Si volíeu fer '%s' seguir '%s', feu això:\n"
"\n"
-#: builtin/branch.c:1033
+#: builtin/branch.c:1038
#, c-format
msgid " git branch -d %s\n"
msgstr " git branch -d %s\n"
-#: builtin/branch.c:1034
+#: builtin/branch.c:1039
#, c-format
msgid " git branch --set-upstream-to %s\n"
msgstr " git branch --set-upstream-to %s\n"
@@ -3205,61 +3211,61 @@ msgstr "%s està bé\n"
#: builtin/bundle.c:56
msgid "Need a repository to create a bundle."
-msgstr "Cal un dipòsit per a fer un embolic."
+msgstr "Cal un dipòsit per a fer un farcell."
#: builtin/bundle.c:60
msgid "Need a repository to unbundle."
-msgstr "Cal un dipòsit per a desembolicar."
+msgstr "Cal un dipòsit per a desfer un farcell."
-#: builtin/cat-file.c:332
+#: builtin/cat-file.c:328
msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>"
msgstr "git cat-file (-t|-s|-e|-p|<tipus>|--textconv) <objecte>"
-#: builtin/cat-file.c:333
+#: builtin/cat-file.c:329
msgid "git cat-file (--batch|--batch-check) < <list_of_objects>"
msgstr "git cat-file (--batch|--batch-check) < <llista_de_objectes>"
-#: builtin/cat-file.c:370
+#: builtin/cat-file.c:366
msgid "<type> can be one of: blob, tree, commit, tag"
msgstr "<tipus> pot ser un de: blob, tree, commit, tag"
-#: builtin/cat-file.c:371
+#: builtin/cat-file.c:367
msgid "show object type"
msgstr "mostra el tipus de l'objecte"
-#: builtin/cat-file.c:372
+#: builtin/cat-file.c:368
msgid "show object size"
msgstr "mostra la mida de l'objecte"
-#: builtin/cat-file.c:374
+#: builtin/cat-file.c:370
msgid "exit with zero when there's no error"
msgstr "surt amb zero quan no hi ha error"
-#: builtin/cat-file.c:375
+#: builtin/cat-file.c:371
msgid "pretty-print object's content"
-msgstr "imprimeix bellament el contingut de l'objecte "
+msgstr "imprimeix bellament el contingut de l'objecte"
-#: builtin/cat-file.c:377
+#: builtin/cat-file.c:373
msgid "for blob objects, run textconv on object's content"
msgstr "en els objectes de blob, executa textconv en el contingut de l'objecte"
-#: builtin/cat-file.c:379
+#: builtin/cat-file.c:375
msgid "show info and content of objects fed from the standard input"
msgstr ""
"mostra la informació i contingut dels objectes rebuts de l'entrada estàndard"
-#: builtin/cat-file.c:382
+#: builtin/cat-file.c:378
msgid "show info about objects fed from the standard input"
msgstr "mostra informació sobre els objectes rebuts de l'entrada estàndard"
#: builtin/check-attr.c:11
msgid "git check-attr [-a | --all | attr...] [--] pathname..."
-msgstr "git check-attr [-a | --all | atribut...] [--] nom-de-ruta..."
+msgstr "git check-attr [-a | --all | atribut...] [--] nom-de-camí..."
#: builtin/check-attr.c:12
msgid "git check-attr --stdin [-z] [-a | --all | attr...] < <list-of-paths>"
msgstr ""
-"git check-attr --stdin [-z] [-a | --all | atribut...] < <llista-de-rutes>"
+"git check-attr --stdin [-z] [-a | --all | atribut...] < <llista-de-camins>"
#: builtin/check-attr.c:19
msgid "report all attributes set on file"
@@ -3275,23 +3281,23 @@ msgstr "llegeix els noms de fitxer d'stdin"
#: builtin/check-attr.c:23 builtin/check-ignore.c:24
msgid "terminate input and output records by a NUL character"
-msgstr "termina els registres d'entrada i de salida per un caràcter NUL"
+msgstr "acaba els registres d'entrada i de sortida amb un caràcter NUL"
-#: builtin/check-ignore.c:18 builtin/checkout.c:1089 builtin/gc.c:274
+#: builtin/check-ignore.c:18 builtin/checkout.c:1107 builtin/gc.c:274
msgid "suppress progress reporting"
msgstr "omet el reportatge de progrés"
#: builtin/check-ignore.c:26
msgid "show non-matching input paths"
-msgstr "mostra les rutes d'entrada que no coincideixin"
+msgstr "mostra els camins d'entrada que no coincideixin"
#: builtin/check-ignore.c:28
msgid "ignore index when checking"
-msgstr "ignora l'índex al comprovar"
+msgstr "ignora l'índex en comprovar"
#: builtin/check-ignore.c:154
msgid "cannot specify pathnames with --stdin"
-msgstr "no es pot especificar noms de ruta amb --stdin"
+msgstr "no es pot especificar noms de camí amb --stdin"
#: builtin/check-ignore.c:157
msgid "-z only makes sense with --stdin"
@@ -3299,11 +3305,11 @@ msgstr "-z només té sentit amb --stdin"
#: builtin/check-ignore.c:159
msgid "no path specified"
-msgstr "cap ruta especificada"
+msgstr "cap camí especificat"
#: builtin/check-ignore.c:163
msgid "--quiet is only valid with a single pathname"
-msgstr "--quiet només és vàlid amb un nom de ruta solter"
+msgstr "--quiet només és vàlid amb un sol nom de camí"
#: builtin/check-ignore.c:165
msgid "cannot have both --quiet and --verbose"
@@ -3324,7 +3330,7 @@ msgstr "també llegeix els contactes des d'stdin"
#: builtin/check-mailmap.c:24
#, c-format
msgid "unable to parse contact: %s"
-msgstr "incapaç d'analitzar el contacte: %s"
+msgstr "no s'ha pogut analitzar el contacte: %s"
#: builtin/check-mailmap.c:47
msgid "no contacts specified"
@@ -3356,7 +3362,7 @@ msgstr "actualitza la informació d'estadístiques en el fitxer d'índex"
#: builtin/checkout-index.c:201
msgid "read list of paths from the standard input"
-msgstr "llegeix la llista de rutes des de l'entrada estàndard"
+msgstr "llegeix la llista de camins des de l'entrada estàndard"
#: builtin/checkout-index.c:203
msgid "write the content to temporary files"
@@ -3368,7 +3374,7 @@ msgstr "cadena"
#: builtin/checkout-index.c:205
msgid "when creating files, prepend <string>"
-msgstr "al crear fitxers, anteposa <cadena>"
+msgstr "en crear fitxers, anteposa <cadena>"
#: builtin/checkout-index.c:208
msgid "copy out the files from named stage"
@@ -3376,111 +3382,112 @@ msgstr "copia els fitxers des de l'etapa anomenada"
#: builtin/checkout.c:25
msgid "git checkout [options] <branch>"
-msgstr "git checkout [opcions] <rama>"
+msgstr "git checkout [opcions] <branca>"
#: builtin/checkout.c:26
msgid "git checkout [options] [<branch>] -- <file>..."
-msgstr "git checkout [opcions] [<rama>] -- <fitxer>..."
+msgstr "git checkout [opcions] [<branca>] -- <fitxer>..."
-#: builtin/checkout.c:114 builtin/checkout.c:147
+#: builtin/checkout.c:132 builtin/checkout.c:165
#, c-format
msgid "path '%s' does not have our version"
-msgstr "la ruta '%s' no té la versió nostra"
+msgstr "el camí '%s' no té la versió nostra"
-#: builtin/checkout.c:116 builtin/checkout.c:149
+#: builtin/checkout.c:134 builtin/checkout.c:167
#, c-format
msgid "path '%s' does not have their version"
-msgstr "la ruta '%s' no té la versió seva"
+msgstr "el camí '%s' no té la versió seva"
-#: builtin/checkout.c:132
+#: builtin/checkout.c:150
#, c-format
msgid "path '%s' does not have all necessary versions"
-msgstr "la ruta '%s' no té totes les versions necessàries"
+msgstr "el camí '%s' no té totes les versions necessàries"
-#: builtin/checkout.c:176
+#: builtin/checkout.c:194
#, c-format
msgid "path '%s' does not have necessary versions"
-msgstr "la ruta '%s' no té les versions necessàries"
+msgstr "el camí '%s' no té les versions necessàries"
-#: builtin/checkout.c:193
+#: builtin/checkout.c:211
#, c-format
msgid "path '%s': cannot merge"
-msgstr "ruta '%s': no es pot fusionar"
+msgstr "camí '%s': no es pot fusionar"
-#: builtin/checkout.c:210
+#: builtin/checkout.c:228
#, c-format
msgid "Unable to add merge result for '%s'"
-msgstr "Incapaç d'afegir el resultat de fusió per a '%s'"
+msgstr "no s'ha pogut afegir el resultat de fusió per a '%s'"
-#: builtin/checkout.c:231 builtin/checkout.c:234 builtin/checkout.c:237
-#: builtin/checkout.c:240
+#: builtin/checkout.c:249 builtin/checkout.c:252 builtin/checkout.c:255
+#: builtin/checkout.c:258
#, c-format
msgid "'%s' cannot be used with updating paths"
-msgstr "'%s' no es pot usar amb actualització de rutes"
+msgstr "'%s' no es pot usar amb actualització de camins"
-#: builtin/checkout.c:243 builtin/checkout.c:246
+#: builtin/checkout.c:261 builtin/checkout.c:264
#, c-format
msgid "'%s' cannot be used with %s"
msgstr "'%s' no es pot usar amb %s"
-#: builtin/checkout.c:249
+#: builtin/checkout.c:267
#, c-format
msgid "Cannot update paths and switch to branch '%s' at the same time."
-msgstr "No es pot actualitzar les rutes i canviar a la rama '%s' a la vegada."
+msgstr ""
+"No es pot actualitzar els camins i canviar a la branca '%s' a la vegada."
-#: builtin/checkout.c:260 builtin/checkout.c:449
+#: builtin/checkout.c:278 builtin/checkout.c:467
msgid "corrupt index file"
msgstr "fitxer d'índex corrupte"
-#: builtin/checkout.c:320 builtin/checkout.c:327
+#: builtin/checkout.c:338 builtin/checkout.c:345
#, c-format
msgid "path '%s' is unmerged"
-msgstr "la ruta '%s' està sense fusionar"
+msgstr "el camí '%s' està sense fusionar"
-#: builtin/checkout.c:471
+#: builtin/checkout.c:489
msgid "you need to resolve your current index first"
msgstr "heu de resoldre el vostre índex actual primer"
-#: builtin/checkout.c:597
+#: builtin/checkout.c:615
#, c-format
msgid "Can not do reflog for '%s'\n"
msgstr "No es pot fer reflog per a '%s'\n"
-#: builtin/checkout.c:635
+#: builtin/checkout.c:653
msgid "HEAD is now at"
-msgstr "HEAD ara està a"
+msgstr "HEAD ara és a"
-#: builtin/checkout.c:642
+#: builtin/checkout.c:660
#, c-format
msgid "Reset branch '%s'\n"
-msgstr "Restableix la rama '%s'\n"
+msgstr "Restableix la branca '%s'\n"
-#: builtin/checkout.c:645
+#: builtin/checkout.c:663
#, c-format
msgid "Already on '%s'\n"
msgstr "Ja en '%s'\n"
-#: builtin/checkout.c:649
+#: builtin/checkout.c:667
#, c-format
msgid "Switched to and reset branch '%s'\n"
-msgstr "S'ha agafat i restablert la rama '%s'\n"
+msgstr "S'ha agafat i restablert la branca '%s'\n"
-#: builtin/checkout.c:651 builtin/checkout.c:1032
+#: builtin/checkout.c:669 builtin/checkout.c:1050
#, c-format
msgid "Switched to a new branch '%s'\n"
-msgstr "S'ha agafat la rama nova '%s'\n"
+msgstr "S'ha agafat la branca nova '%s'\n"
-#: builtin/checkout.c:653
+#: builtin/checkout.c:671
#, c-format
msgid "Switched to branch '%s'\n"
-msgstr "S'ha agafat la rama '%s'\n"
+msgstr "S'ha agafat la branca '%s'\n"
-#: builtin/checkout.c:705
+#: builtin/checkout.c:723
#, c-format
msgid " ... and %d more.\n"
msgstr " ... i %d més.\n"
-#: builtin/checkout.c:711
+#: builtin/checkout.c:729
#, c-format
msgid ""
"Warning: you are leaving %d commit behind, not connected to\n"
@@ -3493,17 +3500,17 @@ msgid_plural ""
"\n"
"%s\n"
msgstr[0] ""
-"Avís: esteu deixant %d comissió darrere, no connectada a\n"
-"qualsevulla de les vostres rames:\n"
+"Avís: esteu deixant enrere %d comissió, no connectada a\n"
+"cap de les vostres branques:\n"
"\n"
"%s\n"
msgstr[1] ""
-"Avís: esteu deixant %d comissions darrere, no connectada a\n"
-"qualsevulla de les vostres rames:\n"
+"Avís: esteu deixant enrere %d comissions, no connectades a\n"
+"cap de les vostres branques:\n"
"\n"
"%s\n"
-#: builtin/checkout.c:729
+#: builtin/checkout.c:747
#, c-format
msgid ""
"If you want to keep them by creating a new branch, this may be a good time\n"
@@ -3512,181 +3519,181 @@ msgid ""
" git branch new_branch_name %s\n"
"\n"
msgstr ""
-"Si els voleu retenir per a crear una rama nova, ara pot ser una hora bona\n"
-"per a fer això amb:\n"
+"Si els voleu retenir per a crear una branca nova, ara pot ser un bon moment\n"
+"per a fer-ho amb:\n"
"\n"
-" git branch new_branch_name %s\n"
+" git branch nom_de_branca_nova %s\n"
"\n"
-#: builtin/checkout.c:759
+#: builtin/checkout.c:777
msgid "internal error in revision walk"
msgstr "error intern en el passeig per revisions"
-#: builtin/checkout.c:763
+#: builtin/checkout.c:781
msgid "Previous HEAD position was"
-msgstr "La posició de HEAD anterior ha estat"
+msgstr "La posició de HEAD anterior era"
-#: builtin/checkout.c:790 builtin/checkout.c:1027
+#: builtin/checkout.c:808 builtin/checkout.c:1045
msgid "You are on a branch yet to be born"
-msgstr "Esteu en una rama que encara ha de nàixer"
+msgstr "Sou en una branca que encara ha de nàixer"
-#: builtin/checkout.c:934
+#: builtin/checkout.c:952
#, c-format
msgid "only one reference expected, %d given."
msgstr "només una referència esperada, %d donades."
-#: builtin/checkout.c:973
+#: builtin/checkout.c:991
#, c-format
msgid "invalid reference: %s"
-msgstr "referència invàlida: %s"
+msgstr "referència no vàlida: %s"
-#: builtin/checkout.c:1002
+#: builtin/checkout.c:1020
#, c-format
msgid "reference is not a tree: %s"
-msgstr "la referéncia no és un arbre: %s"
+msgstr "la referència no és un arbre: %s"
-#: builtin/checkout.c:1041
+#: builtin/checkout.c:1059
msgid "paths cannot be used with switching branches"
-msgstr "les rutes no es poden usar amb canvi de rama"
+msgstr "els camins no es poden usar amb canvi de branca"
-#: builtin/checkout.c:1044 builtin/checkout.c:1048
+#: builtin/checkout.c:1062 builtin/checkout.c:1066
#, c-format
msgid "'%s' cannot be used with switching branches"
-msgstr "'%s' no es pot usar amb canvi de rama"
+msgstr "'%s' no es pot usar amb canvi de branca"
-#: builtin/checkout.c:1052 builtin/checkout.c:1055 builtin/checkout.c:1060
-#: builtin/checkout.c:1063
+#: builtin/checkout.c:1070 builtin/checkout.c:1073 builtin/checkout.c:1078
+#: builtin/checkout.c:1081
#, c-format
msgid "'%s' cannot be used with '%s'"
msgstr "'%s' no es pot usar amb '%s'"
-#: builtin/checkout.c:1068
+#: builtin/checkout.c:1086
#, c-format
msgid "Cannot switch branch to a non-commit '%s'"
-msgstr "No es pot canviar la rama a un no comissió '%s'"
+msgstr "No es pot canviar la branca a una no comissió '%s'"
-#: builtin/checkout.c:1090 builtin/checkout.c:1092 builtin/clone.c:89
+#: builtin/checkout.c:1108 builtin/checkout.c:1110 builtin/clone.c:90
#: builtin/remote.c:159 builtin/remote.c:161
msgid "branch"
-msgstr "rama"
+msgstr "branca"
-#: builtin/checkout.c:1091
+#: builtin/checkout.c:1109
msgid "create and checkout a new branch"
-msgstr "crea i agafa una rama nova"
+msgstr "crea i agafa una branca nova"
-#: builtin/checkout.c:1093
+#: builtin/checkout.c:1111
msgid "create/reset and checkout a branch"
-msgstr "crea/restableix i agafa una rama"
+msgstr "crea/restableix i agafa una branca"
-#: builtin/checkout.c:1094
+#: builtin/checkout.c:1112
msgid "create reflog for new branch"
-msgstr "crea un registre de referència per a la rama nova"
+msgstr "crea un registre de referència per a la branca nova"
-#: builtin/checkout.c:1095
+#: builtin/checkout.c:1113
msgid "detach the HEAD at named commit"
msgstr "separa el HEAD a la comissió anomenada"
-#: builtin/checkout.c:1096
+#: builtin/checkout.c:1114
msgid "set upstream info for new branch"
-msgstr "estableix la informació de font de la rama nova"
+msgstr "estableix la informació de font de la branca nova"
-#: builtin/checkout.c:1098
+#: builtin/checkout.c:1116
msgid "new-branch"
-msgstr "rama-nova"
+msgstr "branca-nova"
-#: builtin/checkout.c:1098
+#: builtin/checkout.c:1116
msgid "new unparented branch"
-msgstr "rama nova sense pares"
+msgstr "branca nova sense mare"
-#: builtin/checkout.c:1099
+#: builtin/checkout.c:1117
msgid "checkout our version for unmerged files"
msgstr "agafa la versió nostra dels fitxers sense fusionar"
-#: builtin/checkout.c:1101
+#: builtin/checkout.c:1119
msgid "checkout their version for unmerged files"
msgstr "agafa la versió seva dels fitxers sense fusionar"
-#: builtin/checkout.c:1103
+#: builtin/checkout.c:1121
msgid "force checkout (throw away local modifications)"
msgstr "agafa a la força (descarta qualsevulles modificacions locals)"
-#: builtin/checkout.c:1104
+#: builtin/checkout.c:1122
msgid "perform a 3-way merge with the new branch"
-msgstr "realitza una fusió de 3 vies amb la rama nova"
+msgstr "realitza una fusió de 3 vies amb la branca nova"
-#: builtin/checkout.c:1105 builtin/merge.c:226
+#: builtin/checkout.c:1123 builtin/merge.c:227
msgid "update ignored files (default)"
msgstr "actualitza els fitxers ignorats (per defecte)"
-#: builtin/checkout.c:1106 builtin/log.c:1239 parse-options.h:245
+#: builtin/checkout.c:1124 builtin/log.c:1239 parse-options.h:245
msgid "style"
msgstr "estil"
-#: builtin/checkout.c:1107
+#: builtin/checkout.c:1125
msgid "conflict style (merge or diff3)"
msgstr "estil de conflicte (fusió o diff3)"
-#: builtin/checkout.c:1110
+#: builtin/checkout.c:1128
msgid "do not limit pathspecs to sparse entries only"
-msgstr "no limitis les especificacions de ruta a entrades escasses només"
+msgstr "no limitis les especificacions de camí només a entrades escasses"
-#: builtin/checkout.c:1112
+#: builtin/checkout.c:1130
msgid "second guess 'git checkout no-such-branch'"
-msgstr "dubta 'git checkout cap-rama-així'"
+msgstr "dubta 'git checkout cap-branca-així'"
-#: builtin/checkout.c:1135
+#: builtin/checkout.c:1153
msgid "-b, -B and --orphan are mutually exclusive"
msgstr "-b, -B i --orphan són mutualment exclusius"
-#: builtin/checkout.c:1152
+#: builtin/checkout.c:1170
msgid "--track needs a branch name"
-msgstr "--track necessita un nom de rama"
+msgstr "--track necessita un nom de branca"
-#: builtin/checkout.c:1157
+#: builtin/checkout.c:1175
msgid "Missing branch name; try -b"
-msgstr "Manca el nom de rama; proveu -b"
+msgstr "Manca el nom de branca; proveu -b"
-#: builtin/checkout.c:1194
+#: builtin/checkout.c:1212
msgid "invalid path specification"
-msgstr "especificació de ruta invàlida"
+msgstr "especificació de camí no vàlida"
-#: builtin/checkout.c:1201
+#: builtin/checkout.c:1219
#, c-format
msgid ""
"Cannot update paths and switch to branch '%s' at the same time.\n"
"Did you intend to checkout '%s' which can not be resolved as commit?"
msgstr ""
-"No es pot actualitzar rames i canviar a la rama '%s' a la vegada.\n"
-"Volíeu agafar '%s' la qual no es pot resoldre com a comissió?"
+"No es poden actualitzar els camins i canviar a la branca '%s' a la vegada.\n"
+"Volíeu agafar '%s', la qual no es pot resoldre com a comissió?"
-#: builtin/checkout.c:1206
+#: builtin/checkout.c:1224
#, c-format
msgid "git checkout: --detach does not take a path argument '%s'"
-msgstr "git checkout: --detach no accepta un paràmetre de ruta '%s'"
+msgstr "git checkout: --detach no accepta un paràmetre de camí '%s'"
-#: builtin/checkout.c:1210
+#: builtin/checkout.c:1228
msgid ""
"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
"checking out of the index."
msgstr ""
-"git checkout: --ours/--theirs, --force i --merge són incompatibles al\n"
+"git checkout: --ours/--theirs, --force i --merge són incompatibles en\n"
"agafar de l'índex."
#: builtin/clean.c:26
msgid ""
"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..."
msgstr ""
-"git clean [-d] [-f] [-i] [-n] [-q] [-e <patró>] [-x | -X] [--] <rutes>..."
+"git clean [-d] [-f] [-i] [-n] [-q] [-e <patró>] [-x | -X] [--] <camins>..."
#: builtin/clean.c:30
#, c-format
msgid "Removing %s\n"
-msgstr "Traient %s\n"
+msgstr "Eliminant %s\n"
#: builtin/clean.c:31
#, c-format
msgid "Would remove %s\n"
-msgstr "Trauria %s\n"
+msgstr "Eliminaria %s\n"
#: builtin/clean.c:32
#, c-format
@@ -3701,7 +3708,7 @@ msgstr "Saltaria el dipòsit %s\n"
#: builtin/clean.c:34
#, c-format
msgid "failed to remove %s"
-msgstr "s'ha fallat en treure %s"
+msgstr "s'ha fallat en eliminar %s"
#: builtin/clean.c:295
msgid ""
@@ -3713,7 +3720,7 @@ msgstr ""
"Ajuda d'avís:\n"
"1 - selecciona un ítem numerat\n"
"foo - selecciona un ítem basat en un prefix únic\n"
-" - (buit) selecciona res"
+" - (buit) no seleccionis res"
#: builtin/clean.c:299
msgid ""
@@ -3727,13 +3734,13 @@ msgid ""
" - (empty) finish selecting"
msgstr ""
"Ajuda d'avís:\n"
-"1 - selecciona un ítem solter\n"
+"1 - selecciona un sol ítem\n"
"3-5 - selecciona un rang d'ítems\n"
"2-3,6-9 - selecciona múltiples rangs\n"
"foo - selecciona un ítem basat en un prefix únic\n"
"-... - desselecciona els ítems seleccionats\n"
"* - tria tots els ítems\n"
-" - (buit) termina la selecció"
+" - (buit) finalitza la selecció"
#: builtin/clean.c:517
#, c-format
@@ -3757,7 +3764,7 @@ msgstr "Selecciona els ítems a suprimir"
#: builtin/clean.c:757
#, c-format
msgid "remove %s? "
-msgstr "treure %s?"
+msgstr "eliminar %s? "
#: builtin/clean.c:782
msgid "Bye."
@@ -3792,8 +3799,8 @@ msgstr "Què ara"
#: builtin/clean.c:826
msgid "Would remove the following item:"
msgid_plural "Would remove the following items:"
-msgstr[0] "Trauria l'ítem següent:"
-msgstr[1] "Trauria els ítems següents:"
+msgstr[0] "Eliminaria l'ítem següent:"
+msgstr[1] "Eliminaria els ítems següents:"
#: builtin/clean.c:843
msgid "No more files to clean, exiting."
@@ -3801,7 +3808,7 @@ msgstr "No hi ha més fitxers a netejar; sortint."
#: builtin/clean.c:874
msgid "do not print names of files removed"
-msgstr "no imprimeixis els noms dels fitxers trets"
+msgstr "no imprimeixis els noms dels fitxers eliminats"
#: builtin/clean.c:876
msgid "force"
@@ -3813,7 +3820,7 @@ msgstr "neteja interactiva"
#: builtin/clean.c:879
msgid "remove whole directories"
-msgstr "treu directoris enters"
+msgstr "elimina directoris sencers"
#: builtin/clean.c:880 builtin/describe.c:407 builtin/grep.c:714
#: builtin/ls-files.c:486 builtin/name-rev.c:311 builtin/show-ref.c:185
@@ -3826,11 +3833,11 @@ msgstr "afegiu <patró> per a ignorar les regles"
#: builtin/clean.c:882
msgid "remove ignored files, too"
-msgstr "treu els fitxers ignorats, també"
+msgstr "elimina els fitxers ignorats, també"
#: builtin/clean.c:884
msgid "remove only ignored files"
-msgstr "treu només els fitxers ignorats"
+msgstr "elimina només els fitxers ignorats"
#: builtin/clean.c:902
msgid "-x and -X cannot be used together"
@@ -3856,146 +3863,150 @@ msgstr ""
msgid "git clone [options] [--] <repo> [<dir>]"
msgstr "git clone [opcions] [--] <dipòsit> [<directori>]"
-#: builtin/clone.c:65 builtin/fetch.c:112 builtin/merge.c:223
+#: builtin/clone.c:66 builtin/fetch.c:112 builtin/merge.c:224
#: builtin/push.c:514
msgid "force progress reporting"
msgstr "força l'informe de progrés"
-#: builtin/clone.c:67
+#: builtin/clone.c:68
msgid "don't create a checkout"
-msgstr "no fes una agafada"
+msgstr "no facis cap agafada"
-#: builtin/clone.c:68 builtin/clone.c:70 builtin/init-db.c:488
+#: builtin/clone.c:69 builtin/clone.c:71 builtin/init-db.c:496
msgid "create a bare repository"
msgstr "crea un dipòsit nu"
-#: builtin/clone.c:72
+#: builtin/clone.c:73
msgid "create a mirror repository (implies bare)"
msgstr "crea un dipòsit reflectit (implica bare)"
-#: builtin/clone.c:74
+#: builtin/clone.c:75
msgid "to clone from a local repository"
msgstr "per a clonar des d'un dipòsit local"
-#: builtin/clone.c:76
+#: builtin/clone.c:77
msgid "don't use local hardlinks, always copy"
msgstr "no usis enllaços durs locals, sempre copia"
-#: builtin/clone.c:78
+#: builtin/clone.c:79
msgid "setup as shared repository"
msgstr "configura com a dipòsit compartit"
-#: builtin/clone.c:80 builtin/clone.c:82
+#: builtin/clone.c:81 builtin/clone.c:83
msgid "initialize submodules in the clone"
msgstr "initialitza els submòduls en el clon"
-#: builtin/clone.c:83 builtin/init-db.c:485
+#: builtin/clone.c:84 builtin/init-db.c:493
msgid "template-directory"
msgstr "directori-de-plantilla"
-#: builtin/clone.c:84 builtin/init-db.c:486
+#: builtin/clone.c:85 builtin/init-db.c:494
msgid "directory from which templates will be used"
msgstr "directori del qual les plantilles s'usaran"
-#: builtin/clone.c:86
+#: builtin/clone.c:87
msgid "reference repository"
msgstr "dipòsit de referència"
-#: builtin/clone.c:87 builtin/column.c:26 builtin/merge-file.c:44
+#: builtin/clone.c:88 builtin/column.c:26 builtin/merge-file.c:44
msgid "name"
msgstr "nom"
-#: builtin/clone.c:88
+#: builtin/clone.c:89
msgid "use <name> instead of 'origin' to track upstream"
msgstr "usa <nom> en lloc de 'origin' per a seguir la font"
-#: builtin/clone.c:90
+#: builtin/clone.c:91
msgid "checkout <branch> instead of the remote's HEAD"
-msgstr "agafa <rama> en lloc del HEAD del remot"
+msgstr "agafa <branca> en lloc del HEAD del remot"
-#: builtin/clone.c:92
+#: builtin/clone.c:93
msgid "path to git-upload-pack on the remote"
-msgstr "ruta a git-upload-pack en el remot"
+msgstr "camí a git-upload-pack en el remot"
-#: builtin/clone.c:93 builtin/fetch.c:113 builtin/grep.c:659
+#: builtin/clone.c:94 builtin/fetch.c:113 builtin/grep.c:659
msgid "depth"
msgstr "profunditat"
-#: builtin/clone.c:94
+#: builtin/clone.c:95
msgid "create a shallow clone of that depth"
msgstr "crea un clon superficial de tal profunditat"
-#: builtin/clone.c:96
+#: builtin/clone.c:97
msgid "clone only one branch, HEAD or --branch"
-msgstr "clona només una rama, HEAD o --branch"
+msgstr "clona només una branca, HEAD o --branch"
+
+#: builtin/clone.c:99
+msgid "use --reference only while cloning"
+msgstr "usa --reference només en clonar"
-#: builtin/clone.c:97 builtin/init-db.c:494
+#: builtin/clone.c:100 builtin/init-db.c:502
msgid "gitdir"
msgstr "directori de git"
-#: builtin/clone.c:98 builtin/init-db.c:495
+#: builtin/clone.c:101 builtin/init-db.c:503
msgid "separate git dir from working tree"
msgstr "separa el directori de git de l'arbre de treball"
-#: builtin/clone.c:99
+#: builtin/clone.c:102
msgid "key=value"
msgstr "calu=valor"
-#: builtin/clone.c:100
+#: builtin/clone.c:103
msgid "set config inside the new repository"
msgstr "estableix la configuració dins del dipòsit nou"
-#: builtin/clone.c:253
+#: builtin/clone.c:256
#, c-format
msgid "reference repository '%s' is not a local repository."
msgstr "el dipòsit de referència '%s' no és un dipòsit local."
-#: builtin/clone.c:257
+#: builtin/clone.c:260
#, c-format
msgid "reference repository '%s' is shallow"
msgstr "el dipòsit de referència '%s' és superficial"
-#: builtin/clone.c:260
+#: builtin/clone.c:263
#, c-format
msgid "reference repository '%s' is grafted"
msgstr "el dipòsit de referència '%s' és empeltat"
-#: builtin/clone.c:322
+#: builtin/clone.c:325
#, c-format
msgid "failed to create directory '%s'"
msgstr "s'ha fallat en crear el directori '%s'"
-#: builtin/clone.c:324 builtin/diff.c:84
+#: builtin/clone.c:327 builtin/diff.c:84
#, c-format
msgid "failed to stat '%s'"
msgstr "s'ha fallat en fer stat a '%s'"
-#: builtin/clone.c:326
+#: builtin/clone.c:329
#, c-format
msgid "%s exists and is not a directory"
msgstr "%s existeix i no és un directori"
-#: builtin/clone.c:340
+#: builtin/clone.c:343
#, c-format
msgid "failed to stat %s\n"
msgstr "s'ha fallat en fer stat a '%s'\n"
-#: builtin/clone.c:362
+#: builtin/clone.c:365
#, c-format
msgid "failed to create link '%s'"
msgstr "s'ha fallat en crear l'enllaç '%s'"
-#: builtin/clone.c:366
+#: builtin/clone.c:369
#, c-format
msgid "failed to copy file to '%s'"
msgstr "s'ha fallat en copiar el fitxer a '%s'"
-#: builtin/clone.c:389 builtin/clone.c:563
+#: builtin/clone.c:392 builtin/clone.c:566
#, c-format
msgid "done.\n"
msgstr "fet.\n"
-#: builtin/clone.c:401
+#: builtin/clone.c:404
msgid ""
"Clone succeeded, but checkout failed.\n"
"You can inspect what was checked out with 'git status'\n"
@@ -4005,110 +4016,122 @@ msgstr ""
"Podeu inspeccionar què s'ha agafat amb 'git status' i\n"
"tornar a intentar l'agafada amb 'git checkout -f HEAD'\n"
-#: builtin/clone.c:478
+#: builtin/clone.c:481
#, c-format
msgid "Could not find remote branch %s to clone."
-msgstr "No s'ha pogut trobar la rama remota %s per a clonar."
+msgstr "No s'ha pogut trobar la branca remota %s per a clonar."
-#: builtin/clone.c:558
+#: builtin/clone.c:561
#, c-format
msgid "Checking connectivity... "
msgstr "Provant connectivitat... "
-#: builtin/clone.c:561
+#: builtin/clone.c:564
msgid "remote did not send all necessary objects"
msgstr "el remot no ha enviat tots els objectes necessaris"
-#: builtin/clone.c:625
+#: builtin/clone.c:628
msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
msgstr ""
-"el HEAD remot es refereix a una referència que no existeix; incapaç "
-"d'agafar.\n"
+"el HEAD remot es refereix a una referència que no existeix; no s'ha pogut "
+"agafar.\n"
-#: builtin/clone.c:656
+#: builtin/clone.c:659
msgid "unable to checkout working tree"
-msgstr "incapaç d'agafar l'arbre de treball"
+msgstr "no s'ha pogut agafar l'arbre de treball"
-#: builtin/clone.c:765
+#: builtin/clone.c:746
+msgid "cannot repack to clean up"
+msgstr "no es pot reempaquetar per a netejar"
+
+#: builtin/clone.c:748
+msgid "cannot unlink temporary alternates file"
+msgstr "no es pot desenllaçar el fitxer d'alternatives temporal"
+
+#: builtin/clone.c:778
msgid "Too many arguments."
msgstr "Hi ha massa paràmetres."
-#: builtin/clone.c:769
+#: builtin/clone.c:782
msgid "You must specify a repository to clone."
msgstr "Heu d'especificar un dipòsit per a clonar."
-#: builtin/clone.c:780
+#: builtin/clone.c:793
#, c-format
msgid "--bare and --origin %s options are incompatible."
msgstr "les opcions --bare i --origin %s són incompatibles."
-#: builtin/clone.c:783
+#: builtin/clone.c:796
msgid "--bare and --separate-git-dir are incompatible."
msgstr "--bare i --separate-git-dir són incompatibles."
-#: builtin/clone.c:796
+#: builtin/clone.c:809
#, c-format
msgid "repository '%s' does not exist"
msgstr "el dipòsit '%s' no existeix"
-#: builtin/clone.c:802 builtin/fetch.c:1155
+#: builtin/clone.c:815 builtin/fetch.c:1155
#, c-format
msgid "depth %s is not a positive number"
msgstr "la profunditat %s no és nombre positiu"
-#: builtin/clone.c:812
+#: builtin/clone.c:825
#, c-format
msgid "destination path '%s' already exists and is not an empty directory."
-msgstr "la ruta destí '%s' ja existeix i no és un directori buit."
+msgstr "el camí destí '%s' ja existeix i no és un directori buit."
-#: builtin/clone.c:822
+#: builtin/clone.c:835
#, c-format
msgid "working tree '%s' already exists."
msgstr "l'arbre de treball '%s' ja existeix."
-#: builtin/clone.c:835 builtin/clone.c:847
+#: builtin/clone.c:848 builtin/clone.c:860
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "no s'ha pogut crear els directoris inicials de '%s'"
-#: builtin/clone.c:838
+#: builtin/clone.c:851
#, c-format
msgid "could not create work tree dir '%s'."
msgstr "no s'ha pogut crear el directori d'arbre de treball '%s'."
-#: builtin/clone.c:857
+#: builtin/clone.c:870
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "Clonant al dipòsit nu '%s'...\n"
-#: builtin/clone.c:859
+#: builtin/clone.c:872
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "Clonant a '%s'...\n"
-#: builtin/clone.c:895
+#: builtin/clone.c:897
+msgid "--dissociate given, but there is no --reference"
+msgstr "s'ha donat --dissociate, però no hi ha --reference"
+
+#: builtin/clone.c:912
msgid "--depth is ignored in local clones; use file:// instead."
-msgstr "--depth s'ignora en els clons locals; useu file:// en lloc."
+msgstr "--depth s'ignora en els clons locals; useu file:// en lloc d'això."
-#: builtin/clone.c:898
+#: builtin/clone.c:915
msgid "source repository is shallow, ignoring --local"
msgstr "el dipòsit font és superficial, ignorant --local"
-#: builtin/clone.c:903
+#: builtin/clone.c:920
msgid "--local is ignored"
msgstr "--local s'ignora"
-#: builtin/clone.c:907
+#: builtin/clone.c:924
#, c-format
msgid "Don't know how to clone %s"
msgstr "No es sap com clonar %s"
-#: builtin/clone.c:958 builtin/clone.c:966
+#: builtin/clone.c:975 builtin/clone.c:983
#, c-format
msgid "Remote branch %s not found in upstream %s"
-msgstr "La rama remota %s no es troba en la font %s"
+msgstr "La branca remota %s no es troba en la font %s"
-#: builtin/clone.c:969
+#: builtin/clone.c:986
msgid "You appear to have cloned an empty repository."
msgstr "Sembla que heu clonat un dipòsit buit."
@@ -4118,7 +4141,7 @@ msgstr "git column [opcions]"
#: builtin/column.c:26
msgid "lookup config vars"
-msgstr "cerca els variables de configuració"
+msgstr "cerca les variables de configuració"
#: builtin/column.c:27 builtin/column.c:28
msgid "layout to use"
@@ -4146,11 +4169,11 @@ msgstr "--command ha de ser el primer paràmetre"
#: builtin/commit.c:37
msgid "git commit [options] [--] <pathspec>..."
-msgstr "git commit [opcions] [--] <especificació-de-ruta>..."
+msgstr "git commit [opcions] [--] <especificació-de-camí>..."
#: builtin/commit.c:42
msgid "git status [options] [--] <pathspec>..."
-msgstr "git status [opcions] [--] <especificació-de-ruta>..."
+msgstr "git status [opcions] [--] <especificació-de-camí>..."
#: builtin/commit.c:47
msgid ""
@@ -4169,7 +4192,7 @@ msgstr ""
"S'han configurat el vostre nom i adreça de correu electrònic\n"
"automàticament basats en el vostre nom d'usuari i nom de host. Si us\n"
"plau, comproveu que siguin correctes. Podeu suprimir aquest missatge\n"
-"per establir-los explícitament. Executeu l'ordre següent i seguiu les\n"
+"establint-los explícitament. Executeu l'ordre següent i seguiu les\n"
"instruccions en el vostre editor per editar el vostre fitxer de\n"
"configuració:\n"
"\n"
@@ -4195,7 +4218,7 @@ msgstr ""
"S'han configurat el vostre nom i adreça de correu electrònic\n"
"automàticament basats en el vostre nom d'usuari i nom de host. Si us\n"
"plau, comproveu que siguin correctes. Podeu suprimir aquest missatge\n"
-"per establir-los explícitament:\n"
+"establint-los explícitament:\n"
"\n"
" git config --global user.name \"El Vostre Nom\"\n"
" git config --global user.email tu@example.com\n"
@@ -4211,9 +4234,9 @@ msgid ""
"it empty. You can repeat your command with --allow-empty, or you can\n"
"remove the commit entirely with \"git reset HEAD^\".\n"
msgstr ""
-"Heu demanat esmenar la comissió més recent, però fer això la feria\n"
-"buida. Podeu repetir el vostre ordre amb --allow-empty, o podeu\n"
-"treure la comissió per complet amb \"git reset HEAD^\".\n"
+"Heu demanat esmenar la comissió més recent, però fer això la\n"
+"deixaria buida. Podeu repetir la vostra ordre amb --allow-empty, o\n"
+"podeu eliminar la comissió per complet amb \"git reset HEAD^\".\n"
#: builtin/commit.c:77
msgid ""
@@ -4243,12 +4266,12 @@ msgid ""
"Then \"git cherry-pick --continue\" will resume cherry-picking\n"
"the remaining commits.\n"
msgstr ""
-"Si voleu saltar aquesta comissió, useu:\n"
+"Si voleu ometre aquesta comissió, useu:\n"
"\n"
" git reset\n"
"\n"
"Llavors \"git cherry-pick --continue\" reprendrà recollint\n"
-"com cireres les comissions restants.\n"
+"com a cireres les comissions restants.\n"
#: builtin/commit.c:302
msgid "failed to unpack HEAD tree object"
@@ -4256,7 +4279,7 @@ msgstr "s'ha fallat en desempaquetar l'objecte d'arbre HEAD"
#: builtin/commit.c:342
msgid "unable to create temporary index"
-msgstr "incapaç de crear un índex temporal"
+msgstr "no s'ha pogut crear un índex temporal"
#: builtin/commit.c:348
msgid "interactive add failed"
@@ -4264,11 +4287,11 @@ msgstr "l'afegiment interactiu ha fallat"
#: builtin/commit.c:359
msgid "unable to write index file"
-msgstr "incapaç d'escriure el fitxer d'índex"
+msgstr "no s'ha pogut escriure el fitxer d'índex"
#: builtin/commit.c:361
msgid "unable to update temporary index"
-msgstr "incapaç de actualitzar l'índex temporal"
+msgstr "no s'ha pogut actualitzar l'índex temporal"
#: builtin/commit.c:363
msgid "Failed to update main cache tree"
@@ -4276,7 +4299,7 @@ msgstr "S'ha fallat en actualitzar l'arbre principal de memòria cau"
#: builtin/commit.c:387 builtin/commit.c:412 builtin/commit.c:461
msgid "unable to write new_index file"
-msgstr "incapaç d'escriure el fitxer new_index"
+msgstr "no s'ha pogut escriure el fitxer new_index"
#: builtin/commit.c:443
msgid "cannot do a partial commit during a merge."
@@ -4292,77 +4315,72 @@ msgstr "no es pot llegir l'índex"
#: builtin/commit.c:473
msgid "unable to write temporary index file"
-msgstr "incapaç d'escriure un fitxer d'índex temporal"
+msgstr "no s'ha pogut escriure un fitxer d'índex temporal"
-#: builtin/commit.c:592
+#: builtin/commit.c:584
#, c-format
msgid "commit '%s' lacks author header"
msgstr "a la comissió '%s' li manca la capçalera d'autor"
-#: builtin/commit.c:594
+#: builtin/commit.c:586
#, c-format
msgid "commit '%s' has malformed author line"
-msgstr "la comissió '%s' té una línia d'autor malformada"
+msgstr "la comissió '%s' té una línia d'autor mal formada"
-#: builtin/commit.c:613
+#: builtin/commit.c:605
msgid "malformed --author parameter"
-msgstr "paràmetre --author malformat"
+msgstr "paràmetre --author mal format"
-#: builtin/commit.c:621
+#: builtin/commit.c:613
#, c-format
msgid "invalid date format: %s"
-msgstr "format de data invàlid: %s"
+msgstr "format de data no vàlid: %s"
-#: builtin/commit.c:642
-#, c-format
-msgid "Malformed ident string: '%s'"
-msgstr "Cadena d'identificació malformada: '%s'"
-
-#: builtin/commit.c:675
+#: builtin/commit.c:657
msgid ""
"unable to select a comment character that is not used\n"
"in the current commit message"
msgstr ""
-"incapaç de seleccionar un caràcter de comentari que\n"
+"no es pot seleccionar un caràcter de comentari que\n"
"no sigui usat en el missatge de comissió actual"
-#: builtin/commit.c:712 builtin/commit.c:745 builtin/commit.c:1120
+#: builtin/commit.c:694 builtin/commit.c:727 builtin/commit.c:1084
#, c-format
msgid "could not lookup commit %s"
msgstr "no s'ha pogut trobar la comissió %s"
-#: builtin/commit.c:724 builtin/shortlog.c:273
+#: builtin/commit.c:706 builtin/shortlog.c:273
#, c-format
msgid "(reading log message from standard input)\n"
msgstr "(llegint el missatge de registre de l'entrada estàndard)\n"
-#: builtin/commit.c:726
+#: builtin/commit.c:708
msgid "could not read log from standard input"
msgstr "no s'ha pogut llegir de l'entrada estàndard"
-#: builtin/commit.c:730
+#: builtin/commit.c:712
#, c-format
msgid "could not read log file '%s'"
msgstr "no s'ha pogut llegir el fitxer de registre '%s'"
-#: builtin/commit.c:752
+#: builtin/commit.c:734
msgid "could not read MERGE_MSG"
msgstr "no s'ha pogut llegir MERGE_MSG"
-#: builtin/commit.c:756
+#: builtin/commit.c:738
msgid "could not read SQUASH_MSG"
msgstr "no s'ha pogur llegir SQUASH_MSG"
-#: builtin/commit.c:760
+#: builtin/commit.c:742
#, c-format
msgid "could not read '%s'"
msgstr "no s'ha pogut llegir '%s'"
-#: builtin/commit.c:831
+#: builtin/commit.c:789
msgid "could not write commit template"
msgstr "no s'ha pogut escriure la plantilla de comissió"
-#: builtin/commit.c:849
+#: builtin/commit.c:807
#, c-format
msgid ""
"\n"
@@ -4373,11 +4391,11 @@ msgid ""
msgstr ""
"\n"
"Sembla que podeu estar cometent una fusió.\n"
-"Si això no és correcte, si us plau, treu el fitxer\n"
+"Si això no és correcte, si us plau, elimineu el fitxer\n"
"\t%s\n"
-"i intenteu de nou.\n"
+"i intenteu-ho de nou.\n"
-#: builtin/commit.c:854
+#: builtin/commit.c:812
#, c-format
msgid ""
"\n"
@@ -4388,11 +4406,11 @@ msgid ""
msgstr ""
"\n"
"Sembla que podeu estar cometent un recull de cireres.\n"
-"Si això no és correcte, si us plau treu el fitxer\n"
+"Si això no és correcte, si us plau elimineu el fitxer\n"
"\t%s\n"
-"i intenteu de nou.\n"
+"i intenteu-ho de nou.\n"
-#: builtin/commit.c:867
+#: builtin/commit.c:825
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
@@ -4402,7 +4420,7 @@ msgstr ""
"S'ignoraran les línies començant amb '%c', i un missatge de\n"
"comissió buit avorta la comissió.\n"
-#: builtin/commit.c:874
+#: builtin/commit.c:832
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
@@ -4410,149 +4428,149 @@ msgid ""
"An empty message aborts the commit.\n"
msgstr ""
"Si us plau, introduïu el missatge de comissió dels vostres canvis.\n"
-"Es retindran les línies començants amb '%c'; podeu treure'ls per vós\n"
+"Es retindran les línies començants amb '%c'; podeu eliminar-les per vós\n"
"mateix si voleu. Un missatge buit avorta la comissió.\n"
-#: builtin/commit.c:888
+#: builtin/commit.c:852
#, c-format
msgid "%sAuthor: %.*s <%.*s>"
msgstr "%sAutor: %.*s <%.*s>"
-#: builtin/commit.c:896
+#: builtin/commit.c:860
#, c-format
msgid "%sDate: %s"
msgstr "%sData: %s"
-#: builtin/commit.c:903
+#: builtin/commit.c:867
#, c-format
msgid "%sCommitter: %.*s <%.*s>"
msgstr "%sComitent: %.*s <%.*s>"
-#: builtin/commit.c:921
+#: builtin/commit.c:885
msgid "Cannot read index"
msgstr "No es pot llegir l'índex"
-#: builtin/commit.c:978
+#: builtin/commit.c:942
msgid "Error building trees"
msgstr "Error en construir arbres"
-#: builtin/commit.c:993 builtin/tag.c:495
+#: builtin/commit.c:957 builtin/tag.c:495
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "Si us plau, proveïu el missatge per usar o l'opció -m o l'opció -F.\n"
-#: builtin/commit.c:1095
+#: builtin/commit.c:1059
#, c-format
msgid "No existing author found with '%s'"
msgstr "Cap autor existent trobat amb '%s'"
-#: builtin/commit.c:1110 builtin/commit.c:1350
+#: builtin/commit.c:1074 builtin/commit.c:1314
#, c-format
msgid "Invalid untracked files mode '%s'"
-msgstr "Mode de fitxers no seguits invàlid '%s'"
+msgstr "Mode de fitxers no seguits no vàlid '%s'"
-#: builtin/commit.c:1147
+#: builtin/commit.c:1111
msgid "--long and -z are incompatible"
msgstr "--long i -z són incompatibles"
-#: builtin/commit.c:1177
+#: builtin/commit.c:1141
msgid "Using both --reset-author and --author does not make sense"
msgstr "Usar ambdós --reset-author i --author no té sentit"
-#: builtin/commit.c:1186
+#: builtin/commit.c:1150
msgid "You have nothing to amend."
msgstr "No teniu res a esmenar."
-#: builtin/commit.c:1189
+#: builtin/commit.c:1153
msgid "You are in the middle of a merge -- cannot amend."
-msgstr "Esteu en el medi d'una fusió -- no es pot esmenar."
+msgstr "Esteu enmig d'una fusió -- no es pot esmenar."
-#: builtin/commit.c:1191
+#: builtin/commit.c:1155
msgid "You are in the middle of a cherry-pick -- cannot amend."
-msgstr "Esteu en el medi d'un recull de cireres -- no es pot esmenar."
+msgstr "Esteu enmig d'un recull de cireres -- no es pot esmenar."
-#: builtin/commit.c:1194
+#: builtin/commit.c:1158
msgid "Options --squash and --fixup cannot be used together"
-msgstr "Les opcions --squash i --fixup no es poden usar junts"
+msgstr "Les opcions --squash i --fixup no es poden usar juntes"
-#: builtin/commit.c:1204
+#: builtin/commit.c:1168
msgid "Only one of -c/-C/-F/--fixup can be used."
msgstr "Només un de -c/-C/-F/--fixup es pot usar."
-#: builtin/commit.c:1206
+#: builtin/commit.c:1170
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "L'opció -m no es pot combinar amb -c/-C/-F/--fixup."
-#: builtin/commit.c:1214
+#: builtin/commit.c:1178
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr "--reset-author només es pot usar amb -C, -c o --amend."
-#: builtin/commit.c:1231
+#: builtin/commit.c:1195
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr "Només un de --include/--only/--all/--interactive/--patch es pot usar."
-#: builtin/commit.c:1233
+#: builtin/commit.c:1197
msgid "No paths with --include/--only does not make sense."
-msgstr "--include/--only no té sentit sense ruta."
+msgstr "--include/--only no té sentit sense camí."
-#: builtin/commit.c:1235
+#: builtin/commit.c:1199
msgid "Clever... amending the last one with dirty index."
-msgstr "Intel·ligent...esmenant el últim amb índex brut."
+msgstr "Intel·ligent... esmenant l'últim amb índex brut."
-#: builtin/commit.c:1237
+#: builtin/commit.c:1201
msgid "Explicit paths specified without -i or -o; assuming --only paths..."
msgstr ""
-"S'han especificat rutes explícites sense -i o -o; presumint rutes --only..."
+"S'han especificat camins explícits sense -i o -o; presumint camins --only..."
-#: builtin/commit.c:1249 builtin/tag.c:728
+#: builtin/commit.c:1213 builtin/tag.c:728
#, c-format
msgid "Invalid cleanup mode %s"
-msgstr "Mode de neteja invàlid %s"
+msgstr "Mode de neteja no vàlid %s"
-#: builtin/commit.c:1254
+#: builtin/commit.c:1218
msgid "Paths with -a does not make sense."
-msgstr "-a no té sentit amb rutes."
+msgstr "-a no té sentit amb camins."
-#: builtin/commit.c:1364 builtin/commit.c:1644
+#: builtin/commit.c:1328 builtin/commit.c:1608
msgid "show status concisely"
msgstr "mostra l'estat concisament"
-#: builtin/commit.c:1366 builtin/commit.c:1646
+#: builtin/commit.c:1330 builtin/commit.c:1610
msgid "show branch information"
-msgstr "mostra la informació de rama"
+msgstr "mostra la informació de branca"
-#: builtin/commit.c:1368 builtin/commit.c:1648 builtin/push.c:500
+#: builtin/commit.c:1332 builtin/commit.c:1612 builtin/push.c:500
msgid "machine-readable output"
msgstr "sortida llegible per màquina"
-#: builtin/commit.c:1371 builtin/commit.c:1650
+#: builtin/commit.c:1335 builtin/commit.c:1614
msgid "show status in long format (default)"
msgstr "mostra l'estat en format llarg (per defecte)"
-#: builtin/commit.c:1374 builtin/commit.c:1653
+#: builtin/commit.c:1338 builtin/commit.c:1617
msgid "terminate entries with NUL"
-msgstr "termina les entrades amb NUL"
+msgstr "acaba les entrades amb NUL"
-#: builtin/commit.c:1376 builtin/commit.c:1656 builtin/fast-export.c:980
+#: builtin/commit.c:1340 builtin/commit.c:1620 builtin/fast-export.c:980
#: builtin/fast-export.c:983 builtin/tag.c:603
msgid "mode"
msgstr "mode"
-#: builtin/commit.c:1377 builtin/commit.c:1656
+#: builtin/commit.c:1341 builtin/commit.c:1620
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
"mostra els fitxers no seguits, modes opcional: all, normal, no. (Per "
"defecte: all)"
-#: builtin/commit.c:1380
+#: builtin/commit.c:1344
msgid "show ignored files"
msgstr "mostra els fitxers ignorats"
-#: builtin/commit.c:1381 parse-options.h:153
+#: builtin/commit.c:1345 parse-options.h:153
msgid "when"
msgstr "quan"
-#: builtin/commit.c:1382
+#: builtin/commit.c:1346
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
@@ -4560,210 +4578,210 @@ msgstr ""
"ignora els canvis als submòduls, opcional quan: all, dirty, untracked. (Per "
"defecte: all)"
-#: builtin/commit.c:1384
+#: builtin/commit.c:1348
msgid "list untracked files in columns"
msgstr "mostra els fitxers no seguits en columnes"
-#: builtin/commit.c:1471
+#: builtin/commit.c:1435
msgid "couldn't look up newly created commit"
-msgstr "no s'ha pogut trobar la comissió novament creat"
+msgstr "no s'ha pogut trobar la comissió novament creada"
-#: builtin/commit.c:1473
+#: builtin/commit.c:1437
msgid "could not parse newly created commit"
-msgstr "no s'ha pogut analitzar la comissió novament creat"
+msgstr "no s'ha pogut analitzar la comissió novament creada"
-#: builtin/commit.c:1518
+#: builtin/commit.c:1482
msgid "detached HEAD"
msgstr "HEAD separat"
-#: builtin/commit.c:1521
+#: builtin/commit.c:1485
msgid " (root-commit)"
msgstr " (comissió d'arrel)"
-#: builtin/commit.c:1614
+#: builtin/commit.c:1578
msgid "suppress summary after successful commit"
-msgstr "omet el resum després d'una comissió reexita"
+msgstr "omet el resum després d'una comissió reeixida"
-#: builtin/commit.c:1615
+#: builtin/commit.c:1579
msgid "show diff in commit message template"
msgstr "mostra la diferència en la plantilla de missatge de comissió"
-#: builtin/commit.c:1617
+#: builtin/commit.c:1581
msgid "Commit message options"
msgstr "Opcions de missatge de comissió"
-#: builtin/commit.c:1618 builtin/tag.c:601
+#: builtin/commit.c:1582 builtin/tag.c:601
msgid "read message from file"
msgstr "llegiu el missatge des d'un fitxer"
-#: builtin/commit.c:1619
+#: builtin/commit.c:1583
msgid "author"
msgstr "autor"
-#: builtin/commit.c:1619
+#: builtin/commit.c:1583
msgid "override author for commit"
msgstr "autor corregit de la comissió"
-#: builtin/commit.c:1620 builtin/gc.c:275
+#: builtin/commit.c:1584 builtin/gc.c:275
msgid "date"
msgstr "data"
-#: builtin/commit.c:1620
+#: builtin/commit.c:1584
msgid "override date for commit"
msgstr "data corregida de la comissió"
-#: builtin/commit.c:1621 builtin/merge.c:217 builtin/notes.c:408
-#: builtin/notes.c:565 builtin/tag.c:599
+#: builtin/commit.c:1585 builtin/merge.c:218 builtin/notes.c:391
+#: builtin/notes.c:554 builtin/tag.c:599
msgid "message"
msgstr "missatge"
-#: builtin/commit.c:1621
+#: builtin/commit.c:1585
msgid "commit message"
msgstr "missatge de comissió"
-#: builtin/commit.c:1622
+#: builtin/commit.c:1586
msgid "reuse and edit message from specified commit"
msgstr "reusa i edita el missatge de la comissió especificada"
-#: builtin/commit.c:1623
+#: builtin/commit.c:1587
msgid "reuse message from specified commit"
msgstr "reusa el missatge de la comissió especificada"
-#: builtin/commit.c:1624
+#: builtin/commit.c:1588
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
"usa el missatge formatat d'aixafada automàtica per a arreglar la comissió "
"especificada"
-#: builtin/commit.c:1625
+#: builtin/commit.c:1589
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
"usa el missatge formatat d'aixafada automàtica per a aixafar la comissió "
"especificada"
-#: builtin/commit.c:1626
+#: builtin/commit.c:1590
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr "l'autor de la comissió ja sóc jo (usat amb -C/-c/--amend)"
-#: builtin/commit.c:1627 builtin/log.c:1191 builtin/revert.c:86
+#: builtin/commit.c:1591 builtin/log.c:1191 builtin/revert.c:86
msgid "add Signed-off-by:"
msgstr "afegeix Signed-off-by:"
-#: builtin/commit.c:1628
+#: builtin/commit.c:1592
msgid "use specified template file"
msgstr "usa el fitxer de plantilla especificat"
-#: builtin/commit.c:1629
+#: builtin/commit.c:1593
msgid "force edit of commit"
msgstr "força l'edició de la comissió"
-#: builtin/commit.c:1630
+#: builtin/commit.c:1594
msgid "default"
msgstr "per defecte"
-#: builtin/commit.c:1630 builtin/tag.c:604
+#: builtin/commit.c:1594 builtin/tag.c:604
msgid "how to strip spaces and #comments from message"
msgstr "com despullar els espais i #comentaris del missatge"
-#: builtin/commit.c:1631
+#: builtin/commit.c:1595
msgid "include status in commit message template"
msgstr "inclou l'estat en la plantilla de missatge de comissió"
-#: builtin/commit.c:1632 builtin/merge.c:224 builtin/revert.c:92
+#: builtin/commit.c:1596 builtin/merge.c:225 builtin/revert.c:92
#: builtin/tag.c:605
msgid "key-id"
msgstr "ID de clau"
-#: builtin/commit.c:1633 builtin/merge.c:225 builtin/revert.c:93
+#: builtin/commit.c:1597 builtin/merge.c:226 builtin/revert.c:93
msgid "GPG sign commit"
msgstr "firma la comissió amb GPG"
-#: builtin/commit.c:1636
+#: builtin/commit.c:1600
msgid "Commit contents options"
msgstr "Opcions dels continguts de les comissions"
-#: builtin/commit.c:1637
+#: builtin/commit.c:1601
msgid "commit all changed files"
msgstr "comet tots els fitxers canviats"
-#: builtin/commit.c:1638
+#: builtin/commit.c:1602
msgid "add specified files to index for commit"
msgstr "afegeix els fitxers especificats a l'índex per a cometre"
-#: builtin/commit.c:1639
+#: builtin/commit.c:1603
msgid "interactively add files"
msgstr "afegeix els fitxers interactivament"
-#: builtin/commit.c:1640
+#: builtin/commit.c:1604
msgid "interactively add changes"
msgstr "afegeix els canvis interactivament"
-#: builtin/commit.c:1641
+#: builtin/commit.c:1605
msgid "commit only specified files"
msgstr "comet només els fitxers especificats"
-#: builtin/commit.c:1642
+#: builtin/commit.c:1606
msgid "bypass pre-commit hook"
msgstr "evita el ganxo de precomissió"
-#: builtin/commit.c:1643
+#: builtin/commit.c:1607
msgid "show what would be committed"
msgstr "mostra què es cometria"
-#: builtin/commit.c:1654
+#: builtin/commit.c:1618
msgid "amend previous commit"
msgstr "esmena la comissió anterior"
-#: builtin/commit.c:1655
+#: builtin/commit.c:1619
msgid "bypass post-rewrite hook"
msgstr "evita el ganxo de postreescriure"
-#: builtin/commit.c:1660
+#: builtin/commit.c:1624
msgid "ok to record an empty change"
msgstr "està bé registrar un canvi buit"
-#: builtin/commit.c:1662
+#: builtin/commit.c:1626
msgid "ok to record a change with an empty message"
msgstr "està bé registrar un canvi amb missatge buit"
-#: builtin/commit.c:1691
+#: builtin/commit.c:1655
msgid "could not parse HEAD commit"
msgstr "no s'ha pogut analitzar la comissió HEAD"
-#: builtin/commit.c:1730 builtin/merge.c:518
+#: builtin/commit.c:1694 builtin/merge.c:519
#, c-format
msgid "could not open '%s' for reading"
msgstr "no s'ha pogut obrir '%s' per a lectura"
-#: builtin/commit.c:1737
+#: builtin/commit.c:1701
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Fitxer MERGE_HEAD corrupte (%s)"
-#: builtin/commit.c:1744
+#: builtin/commit.c:1708
msgid "could not read MERGE_MODE"
msgstr "no s'ha pogut llegir MERGE_MODE"
-#: builtin/commit.c:1763
+#: builtin/commit.c:1727
#, c-format
msgid "could not read commit message: %s"
msgstr "no s'ha pogut llegir el missatge de comissió: %s"
-#: builtin/commit.c:1774
+#: builtin/commit.c:1738
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr "Avortant la comissió; no heu editat el missatge.\n"
-#: builtin/commit.c:1779
+#: builtin/commit.c:1743
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr "Avortant la comissió a causa d'un missatge de comissió buit.\n"
-#: builtin/commit.c:1794 builtin/merge.c:850 builtin/merge.c:875
+#: builtin/commit.c:1758 builtin/merge.c:851 builtin/merge.c:876
msgid "failed to write commit object"
msgstr "s'ha fallat en escriure l'objecte de comissió"
-#: builtin/commit.c:1827
+#: builtin/commit.c:1791
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full and quota is\n"
@@ -4771,7 +4789,7 @@ msgid ""
msgstr ""
"S'ha actualitzat el dipòsit, però no es pot escriure el\n"
"fitxer new_index. Comproveu que el disc no estigui ple i\n"
-"que la quota no estigui excedit, i després\n"
+"que la quota no estigui excedida, i després\n"
"\"git reset HEAD\" per a recuperar."
#: builtin/config.c:8
@@ -4824,24 +4842,24 @@ msgstr "obtén valors de regexp: regex-de-noms [regex-de-valors]"
#: builtin/config.c:63
msgid "get value specific for the URL: section[.var] URL"
-msgstr "obtén el valor especific al URL: secció[.variable] URL"
+msgstr "obtén el valor especific per a l'URL: secció[.variable] URL"
#: builtin/config.c:64
msgid "replace all matching variables: name value [value_regex]"
msgstr ""
-"reemplaça tots els variables que coincideixen: nom valor [regex_de_valors]"
+"reemplaça totes les variables que coincideixen: nom valor [regex_de_valors]"
#: builtin/config.c:65
msgid "add a new variable: name value"
-msgstr "afegeix un variable nou: nom valor"
+msgstr "afegeix una variable nova: nom valor"
#: builtin/config.c:66
msgid "remove a variable: name [value-regex]"
-msgstr "treu un variable: nom [regex-de-valors]"
+msgstr "elimina una variable: nom [regex-de-valors]"
#: builtin/config.c:67
msgid "remove all matches: name [value-regex]"
-msgstr "treu totes les coincidències: nom [regex-de-valors]"
+msgstr "elimina totes les coincidències: nom [regex-de-valors]"
#: builtin/config.c:68
msgid "rename section: old-name new-name"
@@ -4849,7 +4867,7 @@ msgstr "canvia el nom de secció: nom-antic nom-nou"
#: builtin/config.c:69
msgid "remove a section: name"
-msgstr "treu una secció: nom"
+msgstr "elimina una secció: nom"
#: builtin/config.c:70
msgid "list all"
@@ -4859,17 +4877,13 @@ msgstr "llista tots"
msgid "open an editor"
msgstr "obre un editor"
-#: builtin/config.c:72 builtin/config.c:73
-msgid "slot"
-msgstr "ranura"
-
#: builtin/config.c:72
-msgid "find the color configured: [default]"
-msgstr "troba el color configurat: [per defecte]"
+msgid "find the color configured: slot [default]"
+msgstr "troba el color configurat: ranura [per defecte]"
#: builtin/config.c:73
-msgid "find the color setting: [stdout-is-tty]"
-msgstr "troba l'ajust de color: [stdout-és-tty]"
+msgid "find the color setting: slot [stdout-is-tty]"
+msgstr "troba l'ajust de color: ranura [stdout-és-tty]"
#: builtin/config.c:74
msgid "Type"
@@ -4889,7 +4903,7 @@ msgstr "el valor és --bool o --int"
#: builtin/config.c:78
msgid "value is a path (file or directory name)"
-msgstr "el valor és una ruta (nom de fitxer o directori)"
+msgstr "el valor és un camí (nom de fitxer o directori)"
#: builtin/config.c:79
msgid "Other"
@@ -4897,17 +4911,17 @@ msgstr "Altre"
#: builtin/config.c:80
msgid "terminate values with NUL byte"
-msgstr "termina els valors amb un octet NUL"
+msgstr "acaba els valors amb un octet NUL"
#: builtin/config.c:81
msgid "respect include directives on lookup"
-msgstr "respecta les directives d'inclusió al cercar"
+msgstr "respecta les directives d'inclusió en cercar"
-#: builtin/config.c:315
+#: builtin/config.c:316
msgid "unable to parse default color value"
-msgstr "incapaç d'analitzar el valor de color per defecte"
+msgstr "no s'ha pogut analitzar el valor de color per defecte"
-#: builtin/config.c:455
+#: builtin/config.c:457
#, c-format
msgid ""
"# This is Git's per-user configuration file.\n"
@@ -4916,13 +4930,13 @@ msgid ""
"#\tuser = %s\n"
"#\temail = %s\n"
msgstr ""
-"# Això és el fitxer de configuració del Git del usuari.\n"
+"# Això és el fitxer de configuració del Git de l'usuari.\n"
"[core]\n"
-"# Si us plau, adapteu i descomenteu les línies següentes:\n"
+"# Si us plau, adapteu i descomenteu les línies següents:\n"
"#\tuser = %s\n"
"#\temail = %s\n"
-#: builtin/config.c:590
+#: builtin/config.c:589
#, c-format
msgid "cannot create configuration file %s"
msgstr "no es pot crear el fitxer de configuració '%s'"
@@ -4981,7 +4995,7 @@ msgstr "cercant per a descriure %s\n"
#: builtin/describe.c:319
#, c-format
msgid "finished search at %s\n"
-msgstr "s'ha terminat la cerca a %s\n"
+msgstr "s'ha finalitzat la cerca a %s\n"
#: builtin/describe.c:346
#, c-format
@@ -5029,7 +5043,7 @@ msgstr "usa qualsevulla referència"
#: builtin/describe.c:399
msgid "use any tag, even unannotated"
-msgstr "usa qualsevulla etiqueta, encara les sense anotar"
+msgstr "usa qualsevulla etiqueta, fins i tot aquelles sense anotar"
#: builtin/describe.c:400
msgid "always use long format"
@@ -5037,7 +5051,7 @@ msgstr "sempre usa el format llarg"
#: builtin/describe.c:401
msgid "only follow first parent"
-msgstr "només segueix el primer pare"
+msgstr "només segueix la primera mare"
#: builtin/describe.c:404
msgid "only output exact matches"
@@ -5083,7 +5097,7 @@ msgstr "'%s': no és ni fitxer regular ni enllaç simbòlic"
#: builtin/diff.c:237
#, c-format
msgid "invalid option: %s"
-msgstr "opció invàlida: %s"
+msgstr "opció no vàlida: %s"
#: builtin/diff.c:358
msgid "Not a git repository"
@@ -5092,7 +5106,7 @@ msgstr "No és un dipòsit de git"
#: builtin/diff.c:401
#, c-format
msgid "invalid object '%s' given."
-msgstr "s'ha donat un objecte invàlid '%s'."
+msgstr "s'ha donat un objecte no vàlid '%s'."
#: builtin/diff.c:410
#, c-format
@@ -5102,7 +5116,7 @@ msgstr "s'ha donat més de dos blobs: '%s"
#: builtin/diff.c:417
#, c-format
msgid "unhandled object '%s' given."
-msgstr "s'ha donat l'objecte no manejat '%s'."
+msgstr "s'ha donat l'objecte no gestionat '%s'."
#: builtin/fast-export.c:24
msgid "git fast-export [rev-list-opts]"
@@ -5114,16 +5128,15 @@ msgstr "mostra el progrés després de <n> objectes"
#: builtin/fast-export.c:981
msgid "select handling of signed tags"
-msgstr "selecciona el manejament de les etiquetes firmades"
+msgstr "selecciona la gestió de les etiquetes firmades"
#: builtin/fast-export.c:984
msgid "select handling of tags that tag filtered objects"
-msgstr ""
-"selecciona el manejament de les etiquetes que etiquetin objectes filtrats"
+msgstr "selecciona la gestió de les etiquetes que etiquetin objectes filtrats"
#: builtin/fast-export.c:987
msgid "Dump marks to this file"
-msgstr "Bolcar les marques a aquest fitxer"
+msgstr "Bolca les marques a aquest fitxer"
#: builtin/fast-export.c:989
msgid "Import marks from this file"
@@ -5131,7 +5144,7 @@ msgstr "Importa les marques d'aquest fitxer"
#: builtin/fast-export.c:991
msgid "Fake a tagger when tags lack one"
-msgstr "Fingeix un etiquetador quan un lis manca a les etiquetes"
+msgstr "Fingeix un etiquetador quan els en manca un a les etiquetes"
#: builtin/fast-export.c:993
msgid "Output full tree for each commit"
@@ -5139,7 +5152,7 @@ msgstr "Imprimeix l'arbre complet de cada comissió"
#: builtin/fast-export.c:995
msgid "Use the done feature to terminate the stream"
-msgstr "Usa la característica done per a terminar el corrent"
+msgstr "Usa la característica done per a acabar el corrent"
#: builtin/fast-export.c:996
msgid "Skip output of blob data"
@@ -5183,11 +5196,11 @@ msgstr "annexa a .git/FETCH_HEAD en lloc de sobreescriure"
#: builtin/fetch.c:94
msgid "path to upload pack on remote end"
-msgstr "ruta a que pujar el paquet en el costat remot"
+msgstr "camí al qual pujar el paquet en el costat remot"
#: builtin/fetch.c:95
msgid "force overwrite of local branch"
-msgstr "força la sobreescriptura de la rama local"
+msgstr "força la sobreescriptura de la branca local"
#: builtin/fetch.c:97
msgid "fetch from multiple remotes"
@@ -5195,15 +5208,15 @@ msgstr "obtén de múltiples remots"
#: builtin/fetch.c:99
msgid "fetch all tags and associated objects"
-msgstr "obtén tots les etiquetes i objectes associats"
+msgstr "obtén totes les etiquetes i tots els objectes associats"
#: builtin/fetch.c:101
msgid "do not fetch all tags (--no-tags)"
-msgstr "no obtingues les etiquetes (--no-tags)"
+msgstr "no obtinguis les etiquetes (--no-tags)"
#: builtin/fetch.c:103
msgid "prune remote-tracking branches no longer on remote"
-msgstr "poda les rames amb seguiment remot que ja no estiguin en el remot"
+msgstr "poda les branques amb seguiment remot que ja no estiguin en el remot"
#: builtin/fetch.c:104
msgid "on-demand"
@@ -5235,7 +5248,7 @@ msgstr "directori"
#: builtin/fetch.c:119
msgid "prepend this to submodule path output"
-msgstr "anteposa això a la sortida de ruta del submòdul"
+msgstr "anteposa això a la sortida de camí del submòdul"
#: builtin/fetch.c:122
msgid "default mode for recursion"
@@ -5269,7 +5282,7 @@ msgstr "[al dia]"
#: builtin/fetch.c:473
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
-msgstr "! %-*s %-*s -> %s (no es pot obtenir en la rama actual)"
+msgstr "! %-*s %-*s -> %s (no es pot obtenir en la branca actual)"
#: builtin/fetch.c:474 builtin/fetch.c:560
msgid "[rejected]"
@@ -5281,7 +5294,7 @@ msgstr "[actualització d'etiqueta]"
#: builtin/fetch.c:487 builtin/fetch.c:522 builtin/fetch.c:540
msgid " (unable to update local ref)"
-msgstr " (incapaç d'actualitzar la referència local)"
+msgstr " (no s'ha pogut actualitzar la referència local)"
#: builtin/fetch.c:505
msgid "[new tag]"
@@ -5289,7 +5302,7 @@ msgstr "[etiqueta nova]"
#: builtin/fetch.c:508
msgid "[new branch]"
-msgstr "[rama nova]"
+msgstr "[branca nova]"
#: builtin/fetch.c:511
msgid "[new ref]"
@@ -5297,7 +5310,7 @@ msgstr "[referència nova]"
#: builtin/fetch.c:556
msgid "unable to update local ref"
-msgstr "incapaç d'actualitzar la referència local"
+msgstr "no s'ha pogut actualitzar la referència local"
#: builtin/fetch.c:556
msgid "forced update"
@@ -5310,7 +5323,7 @@ msgstr "(sense avanç ràpid)"
#: builtin/fetch.c:595 builtin/fetch.c:828
#, c-format
msgid "cannot open %s: %s\n"
-msgstr "no és pot obrir %s: %s\n"
+msgstr "no es pot obrir %s: %s\n"
#: builtin/fetch.c:604
#, c-format
@@ -5321,7 +5334,7 @@ msgstr "%s no ha enviat tots els objectes necessaris\n"
#, c-format
msgid "reject %s because shallow roots are not allowed to be updated"
msgstr ""
-"rebutja %s perquè no es permet que els arrels superficials s'actualitzin"
+"rebutja %s perquè no es permet que les arrels superficials s'actualitzin"
#: builtin/fetch.c:710 builtin/fetch.c:793
#, c-format
@@ -5335,8 +5348,8 @@ msgid ""
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
"algunes referències locals no s'han pogut actualitzar;\n"
-" intenteu executar 'git remote prune %s' per a treure\n"
-" qualsevulla rama antiga o conflictiva"
+" intenteu executar 'git remote prune %s' per a eliminar\n"
+" qualsevulla branca antiga o conflictiva"
#: builtin/fetch.c:773
#, c-format
@@ -5352,14 +5365,14 @@ msgstr " (%s s'ha tornat penjant)"
msgid "[deleted]"
msgstr "[suprimit]"
-#: builtin/fetch.c:799 builtin/remote.c:1063
+#: builtin/fetch.c:799 builtin/remote.c:1060
msgid "(none)"
msgstr "(cap)"
#: builtin/fetch.c:818
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
-msgstr "Refusant obtenir en la rama actual %s d'un dipòsit no nu"
+msgstr "Refusant obtenir en la branca actual %s d'un dipòsit no nu"
#: builtin/fetch.c:837
#, c-format
@@ -5428,75 +5441,75 @@ msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]"
msgstr ""
"git fmt-merge-msg [-m <missatge>] [--log[=<n>]|--no-log] [--file <fitxer>]"
-#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:698
-#: builtin/merge.c:197 builtin/repack.c:179 builtin/repack.c:183
-#: builtin/show-branch.c:654 builtin/show-ref.c:178 builtin/tag.c:590
+#: builtin/fmt-merge-msg.c:662 builtin/fmt-merge-msg.c:665 builtin/grep.c:698
+#: builtin/merge.c:198 builtin/repack.c:178 builtin/repack.c:182
+#: builtin/show-branch.c:657 builtin/show-ref.c:178 builtin/tag.c:590
#: parse-options.h:132 parse-options.h:239
msgid "n"
msgstr "n"
-#: builtin/fmt-merge-msg.c:664
+#: builtin/fmt-merge-msg.c:663
msgid "populate log with at most <n> entries from shortlog"
-msgstr "emplena el registre amb al màxim <n> entrades del registre curt"
+msgstr "emplena el registre amb <n> entrades del registre curt com a màxim"
-#: builtin/fmt-merge-msg.c:667
+#: builtin/fmt-merge-msg.c:666
msgid "alias for --log (deprecated)"
msgstr "àlies per --log (desaprovat)"
-#: builtin/fmt-merge-msg.c:670
+#: builtin/fmt-merge-msg.c:669
msgid "text"
msgstr "text"
-#: builtin/fmt-merge-msg.c:671
+#: builtin/fmt-merge-msg.c:670
msgid "use <text> as start of message"
msgstr "usa <text> com a inici de missatge"
-#: builtin/fmt-merge-msg.c:672
+#: builtin/fmt-merge-msg.c:671
msgid "file to read from"
msgstr "fitxer del qual llegir"
#: builtin/for-each-ref.c:676
msgid "unable to parse format"
-msgstr "incapaç d'analitzar el format"
+msgstr "no s'ha pogut analitzar el format"
-#: builtin/for-each-ref.c:1057
+#: builtin/for-each-ref.c:1064
msgid "git for-each-ref [options] [<pattern>]"
msgstr "git for-each-ref [opcions] [<patró>]"
-#: builtin/for-each-ref.c:1072
+#: builtin/for-each-ref.c:1079
msgid "quote placeholders suitably for shells"
msgstr ""
"posa els marcadors de posició entre cometes adequades per als terminals"
-#: builtin/for-each-ref.c:1074
+#: builtin/for-each-ref.c:1081
msgid "quote placeholders suitably for perl"
msgstr "posa els marcadors de posició entre cometes adequades per a perl"
-#: builtin/for-each-ref.c:1076
+#: builtin/for-each-ref.c:1083
msgid "quote placeholders suitably for python"
msgstr "posa els marcadors de posició entre cometes adequades per a python"
-#: builtin/for-each-ref.c:1078
-msgid "quote placeholders suitably for tcl"
-msgstr "posa els marcadors de posició entre cometes adequades per a tcl"
+#: builtin/for-each-ref.c:1085
+msgid "quote placeholders suitably for Tcl"
+msgstr "posa els marcadors de posició entre cometes adequades per a Tcl"
-#: builtin/for-each-ref.c:1081
+#: builtin/for-each-ref.c:1088
msgid "show only <n> matched refs"
msgstr "mostra només <n> referències coincidents"
-#: builtin/for-each-ref.c:1082 builtin/replace.c:438
+#: builtin/for-each-ref.c:1089 builtin/replace.c:438
msgid "format"
msgstr "format"
-#: builtin/for-each-ref.c:1082
+#: builtin/for-each-ref.c:1089
msgid "format to use for the output"
msgstr "format a usar en la sortida"
-#: builtin/for-each-ref.c:1083
+#: builtin/for-each-ref.c:1090
msgid "key"
msgstr "clau"
-#: builtin/for-each-ref.c:1084
+#: builtin/for-each-ref.c:1091
msgid "field name to sort on"
msgstr "nom de camp en el qual ordenar"
@@ -5563,12 +5576,12 @@ msgstr "git gc [opcions]"
#: builtin/gc.c:79
#, c-format
msgid "Invalid gc.pruneexpire: '%s'"
-msgstr "gc.pruneexpire invàlid: %s"
+msgstr "gc.pruneexpire no vàlid: %s"
#: builtin/gc.c:107
#, c-format
msgid "insanely long object directory %.*s"
-msgstr "directori d'objectes increïblement llarga %.*s"
+msgstr "directori d'objectes increïblement llarg %.*s"
#: builtin/gc.c:276
msgid "prune unreferenced objects"
@@ -5576,7 +5589,7 @@ msgstr "poda objectes sense referència"
#: builtin/gc.c:278
msgid "be more thorough (increased runtime)"
-msgstr "siguis més exhaustiu (temps d'execució augmentat)"
+msgstr "sigues més exhaustiu (el temps d'execució augmenta)"
#: builtin/gc.c:279
msgid "enable auto-gc mode"
@@ -5600,7 +5613,7 @@ msgstr "Empaquetant automàticament el dipòsit per rendiment òptim.\n"
#: builtin/gc.c:324
#, c-format
msgid "See \"git help gc\" for manual housekeeping.\n"
-msgstr "Veu \"git help gc\" per neteja manual.\n"
+msgstr "Vegeu \"git help gc\" per neteja manual.\n"
#: builtin/gc.c:342
#, c-format
@@ -5613,12 +5626,12 @@ msgstr ""
msgid ""
"There are too many unreachable loose objects; run 'git prune' to remove them."
msgstr ""
-"Hi ha massa objectes solts inabastables; executeu 'git prune' per a "
-"treure'ls."
+"Hi ha massa objectes solts inabastables; executeu 'git prune' per a eliminar-"
+"los."
#: builtin/grep.c:23
msgid "git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]"
-msgstr "git grep [opcions] [-e] <patró> [<revisió>...] [[--] <ruta>...]"
+msgstr "git grep [opcions] [-e] <patró> [<revisió>...] [[--] <camí>...]"
#: builtin/grep.c:218
#, c-format
@@ -5628,7 +5641,7 @@ msgstr "grep: s'ha fallat en crear fil: %s"
#: builtin/grep.c:441 builtin/grep.c:476
#, c-format
msgid "unable to read tree (%s)"
-msgstr "incapaç de llegir l'arbre (%s)"
+msgstr "no s'ha pogut llegir l'arbre (%s)"
#: builtin/grep.c:491
#, c-format
@@ -5638,7 +5651,7 @@ msgstr "no es pot fer grep des d'un objecte de tipus %s"
#: builtin/grep.c:547
#, c-format
msgid "switch `%c' expects a numerical value"
-msgstr "l'ópcio `%c' espera un valor numèric"
+msgstr "l'opció `%c' espera un valor numèric"
#: builtin/grep.c:564
#, c-format
@@ -5655,7 +5668,7 @@ msgstr "cerca en continguts no gestionats per git"
#: builtin/grep.c:642
msgid "search in both tracked and untracked files"
-msgstr "cerca en ambdós els fitxers seguits i no seguits"
+msgstr "cerca tant en fitxers seguits com en no seguits"
#: builtin/grep.c:644
msgid "search also in ignored files"
@@ -5727,7 +5740,7 @@ msgstr "mostra només els noms de fitxer en lloc de les línies coincidents"
#: builtin/grep.c:684
msgid "synonym for --files-with-matches"
-msgstr "sinònim per --files-with-matches"
+msgstr "sinònim de --files-with-matches"
#: builtin/grep.c:687
msgid "show only the names of files without match"
@@ -5747,7 +5760,7 @@ msgstr "ressalta les coincidències"
#: builtin/grep.c:694
msgid "print empty line between matches from different files"
-msgstr "imprimeix una línia buida entre coincidències de fitxers distintes"
+msgstr "imprimeix una línia buida entre coincidències de fitxers distints"
#: builtin/grep.c:696
msgid "show filename only once above matches from same file"
@@ -5777,7 +5790,7 @@ msgstr "mostra una línia amb el nom de funció abans de les coincidències"
#: builtin/grep.c:710
msgid "show the surrounding function"
-msgstr "mostra la funció alrededor"
+msgstr "mostra la funció circumdant"
#: builtin/grep.c:713
msgid "read patterns from file"
@@ -5855,7 +5868,7 @@ msgstr ""
#: builtin/hash-object.c:83
msgid "git hash-object --stdin-paths < <list-of-paths>"
-msgstr "git hash-object --stdin-paths < <llista-de-rutes>"
+msgstr "git hash-object --stdin-paths < <llista-de-camins>"
#: builtin/hash-object.c:94 builtin/tag.c:610
msgid "type"
@@ -5881,16 +5894,16 @@ msgstr "emmagatzema el fitxer tal com és sense filtres"
msgid ""
"just hash any random garbage to create corrupt objects for debugging Git"
msgstr ""
-"només sumar qualsevulla brossa aleatòria per a crear objectes corruptes per "
-"a depurar al Git"
+"només suma qualsevulla brossa aleatòria per a crear objectes corruptes per a "
+"depurar al Git"
#: builtin/hash-object.c:101
msgid "process file as it were from this path"
-msgstr "processa el fitxer com si fos d'aquesta ruta"
+msgstr "processa el fitxer com si fos d'aquest camí"
#: builtin/help.c:41
msgid "print all available commands"
-msgstr "imprimeix tots els ordres disponibles"
+msgstr "imprimeix totes les ordres disponibles"
#: builtin/help.c:42
msgid "print list of useful guides"
@@ -5923,7 +5936,7 @@ msgstr "S'ha fallat en iniciar emacsclient."
#: builtin/help.c:104
msgid "Failed to parse emacsclient version."
-msgstr "S'ha fallat en analitzar la versió d'emacsclint."
+msgstr "S'ha fallat en analitzar la versió d'emacsclient."
#: builtin/help.c:112
#, c-format
@@ -5941,8 +5954,8 @@ msgid ""
"'%s': path for unsupported man viewer.\n"
"Please consider using 'man.<tool>.cmd' instead."
msgstr ""
-"'%s': ruta a un visualitzador de manuals no suportat.\n"
-"Si us plau, considereu usar 'man.<eine>.cmd' en lloc."
+"'%s': camí a un visualitzador de manuals no compatible.\n"
+"Si us plau, considereu usar 'man.<eina>.cmd' en lloc d'això."
#: builtin/help.c:227
#, c-format
@@ -5950,72 +5963,72 @@ msgid ""
"'%s': cmd for supported man viewer.\n"
"Please consider using 'man.<tool>.path' instead."
msgstr ""
-"'%s': ordre per un visualitzador de manuals suportat.\n"
-"Si us plau, considereu usar 'man.<eine>.path' en lloc."
+"'%s': ordre per a un visualitzador de manuals compatible.\n"
+"Si us plau, considereu usar 'man.<eina>.path' en lloc d'això."
-#: builtin/help.c:352
+#: builtin/help.c:354
#, c-format
msgid "'%s': unknown man viewer."
msgstr "'%s': visualitzador de manuals desconegut"
-#: builtin/help.c:369
+#: builtin/help.c:371
msgid "no man viewer handled the request"
-msgstr "cap visualitzador de manuals ha manejat la sol·licitud"
+msgstr "cap visualitzador de manuals ha gestionat la sol·licitud"
-#: builtin/help.c:377
+#: builtin/help.c:379
msgid "no info viewer handled the request"
-msgstr "cap visualitzador d'informació ha manejat la sol·licitud"
+msgstr "cap visualitzador d'informació ha gestionat la sol·licitud"
-#: builtin/help.c:423
+#: builtin/help.c:428
msgid "Defining attributes per path"
-msgstr "La definició d'atributs per ruta"
+msgstr "La definició d'atributs per camí"
-#: builtin/help.c:424
+#: builtin/help.c:429
msgid "Everyday Git With 20 Commands Or So"
msgstr "Git quotidià amb més o menys 20 ordres"
-#: builtin/help.c:425
+#: builtin/help.c:430
msgid "A Git glossary"
msgstr "Un glossari de Git"
-#: builtin/help.c:426
+#: builtin/help.c:431
msgid "Specifies intentionally untracked files to ignore"
msgstr "Especifica els fitxers intencionalment no seguits a ignorar"
-#: builtin/help.c:427
+#: builtin/help.c:432
msgid "Defining submodule properties"
msgstr "La definició de les propietats de submòduls"
-#: builtin/help.c:428
+#: builtin/help.c:433
msgid "Specifying revisions and ranges for Git"
msgstr "L'especificació de revisions i rangs per al Git"
-#: builtin/help.c:429
+#: builtin/help.c:434
msgid "A tutorial introduction to Git (for version 1.5.1 or newer)"
msgstr "Una introducció tutorial al Git (per a la versió 1.5.1 o més nou)"
-#: builtin/help.c:430
+#: builtin/help.c:435
msgid "An overview of recommended workflows with Git"
msgstr "Una visió de conjunt de fluxos de treball recomanats amb Git"
-#: builtin/help.c:442
+#: builtin/help.c:447
msgid "The common Git guides are:\n"
msgstr "Les guies de Git comunes són:\n"
-#: builtin/help.c:463 builtin/help.c:480
+#: builtin/help.c:468 builtin/help.c:485
#, c-format
msgid "usage: %s%s"
msgstr "ús: %s%s"
-#: builtin/help.c:496
+#: builtin/help.c:501
#, c-format
msgid "`git %s' is aliased to `%s'"
-msgstr "`git %s' és àlies a `%s'"
+msgstr "`git %s' és un àlies de `%s'"
#: builtin/index-pack.c:150
#, c-format
msgid "unable to open %s"
-msgstr "incapaç d'obrir %s"
+msgstr "no s'ha pogut obrir %s"
#: builtin/index-pack.c:200
#, c-format
@@ -6041,7 +6054,7 @@ msgstr[1] "no es pot omplir %d octets"
#: builtin/index-pack.c:275
msgid "early EOF"
-msgstr "EOF aviat"
+msgstr "EOF prematur"
#: builtin/index-pack.c:276
msgid "read error on input"
@@ -6049,7 +6062,7 @@ msgstr "error de lectura d'entrada"
#: builtin/index-pack.c:288
msgid "used more bytes than were available"
-msgstr "s'han usat més octets que estaven disponibles"
+msgstr "s'han usat més octets dels que hi havia disponibles"
#: builtin/index-pack.c:295
msgid "pack too large for current definition of off_t"
@@ -6072,12 +6085,12 @@ msgstr "hi ha una discordança de firma de paquet"
#: builtin/index-pack.c:332
#, c-format
msgid "pack version %<PRIu32> unsupported"
-msgstr "la versió de paquet %<PRIu32> no es suporta"
+msgstr "la versió de paquet %<PRIu32> no és compatible"
#: builtin/index-pack.c:350
#, c-format
msgid "pack has bad object at offset %lu: %s"
-msgstr "el paquet té un objecte dolent a desplaçament %lu: %s"
+msgstr "el paquet té un objecte dolent a la posició %lu: %s"
#: builtin/index-pack.c:471
#, c-format
@@ -6105,12 +6118,12 @@ msgstr "no es pot fer pread en el fitxer de paquet"
#, c-format
msgid "premature end of pack file, %lu byte missing"
msgid_plural "premature end of pack file, %lu bytes missing"
-msgstr[0] "fin prematur de fitxer de paquet, manca %lu octet"
-msgstr[1] "fin prematur de fitxer de paquet, manquen %lu octets"
+msgstr[0] "final prematur de fitxer de paquet, manca %lu octet"
+msgstr[1] "final prematur de fitxer de paquet, manquen %lu octets"
#: builtin/index-pack.c:595
msgid "serious inflate inconsistency"
-msgstr "hi ha una inconsistència seria d'inflació"
+msgstr "hi ha una inconsistència seriosa d'inflació"
#: builtin/index-pack.c:686 builtin/index-pack.c:692 builtin/index-pack.c:715
#: builtin/index-pack.c:749 builtin/index-pack.c:758
@@ -6122,7 +6135,7 @@ msgstr "S'HA TROBAT UNA COL·LISIÓ SHA1 AMB %s !"
#: builtin/pack-objects.c:256
#, c-format
msgid "unable to read %s"
-msgstr "incapaç de llegir %s"
+msgstr "no s'ha pogut llegir %s"
#: builtin/index-pack.c:755
#, c-format
@@ -6132,12 +6145,12 @@ msgstr "no es pot llegir l'objecte existent %s"
#: builtin/index-pack.c:769
#, c-format
msgid "invalid blob object %s"
-msgstr "objecte de blob invàlid %s"
+msgstr "objecte de blob no vàlid %s"
#: builtin/index-pack.c:783
#, c-format
msgid "invalid %s"
-msgstr "%s invàlid"
+msgstr "%s no vàlid"
#: builtin/index-pack.c:787
msgid "Error in object"
@@ -6170,7 +6183,7 @@ msgstr "no es pot fer fstat en el fitxer de paquet"
#: builtin/index-pack.c:1089
msgid "pack has junk at the end"
-msgstr "el paquet té brossa al seu fin"
+msgstr "el paquet té brossa al seu final"
#: builtin/index-pack.c:1100
msgid "confusion beyond insanity in parse_pack_objects()"
@@ -6183,7 +6196,7 @@ msgstr "Resolent les deltes"
#: builtin/index-pack.c:1133
#, c-format
msgid "unable to create thread: %s"
-msgstr "incapaç de crear fil: %s"
+msgstr "no s'ha pogut crear fil: %s"
#: builtin/index-pack.c:1175
msgid "confusion beyond insanity"
@@ -6192,7 +6205,7 @@ msgstr "confusió més enllà de la insanitat"
#: builtin/index-pack.c:1181
#, c-format
msgid "completed with %d local objects"
-msgstr "s'ha terminat amb %d objectes locals"
+msgstr "s'ha completat amb %d objectes locals"
#: builtin/index-pack.c:1191
#, c-format
@@ -6209,7 +6222,7 @@ msgstr[1] "El paquet té %d deltes no resoltes"
#: builtin/index-pack.c:1220
#, c-format
msgid "unable to deflate appended object (%d)"
-msgstr "incapaç de desinflar l'objecte annexat (%d)"
+msgstr "no s'ha pogut desinflar l'objecte annexat (%d)"
#: builtin/index-pack.c:1299
#, c-format
@@ -6246,7 +6259,7 @@ msgstr "pack.indexversion=%<PRIu32> dolent"
#: builtin/index-pack.c:1407
#, c-format
msgid "invalid number of threads specified (%d)"
-msgstr "s'ha especificat un nombre de fils invàlid (%d)"
+msgstr "s'ha especificat un nombre de fils no vàlid (%d)"
#: builtin/index-pack.c:1411 builtin/index-pack.c:1590
#, c-format
@@ -6294,7 +6307,7 @@ msgstr "--fix-thin no es pot usar sense --stdin"
#: builtin/index-pack.c:1639 builtin/index-pack.c:1648
#, c-format
msgid "packfile name '%s' does not end with '.pack'"
-msgstr "el nom de fitxer de paquet '%s' no termina amb '.pack'"
+msgstr "el nom de fitxer de paquet '%s' no acaba amb '.pack'"
#: builtin/index-pack.c:1656
msgid "--verify with no packfile name given"
@@ -6303,12 +6316,12 @@ msgstr "s'ha donat --verify sense nom de fitxer de paquet"
#: builtin/init-db.c:35
#, c-format
msgid "Could not make %s writable by group"
-msgstr "No s'ha pogut fer %s escrivible pel grup"
+msgstr "No s'ha pogut fer %s gravable per al grup"
#: builtin/init-db.c:62
#, c-format
msgid "insanely long template name %s"
-msgstr "nom de plantilla insanament llarg %s"
+msgstr "nom de plantilla increïblement llarg %s"
#: builtin/init-db.c:67
#, c-format
@@ -6333,7 +6346,7 @@ msgstr "no es pot fer readlink en '%s'"
#: builtin/init-db.c:99
#, c-format
msgid "insanely long symlink %s"
-msgstr "enllaç simbòlic insanament llarg %s"
+msgstr "enllaç simbòlic increïblement llarg %s"
#: builtin/init-db.c:102
#, c-format
@@ -6350,62 +6363,62 @@ msgstr "no es pot copiar '%s' a '%s'"
msgid "ignoring template %s"
msgstr "ignorant la plantilla %s"
-#: builtin/init-db.c:133
+#: builtin/init-db.c:136
#, c-format
msgid "insanely long template path %s"
-msgstr "ruta de plantilla insanament llarg %s"
+msgstr "camí de plantilla increïblement llarg %s"
-#: builtin/init-db.c:141
+#: builtin/init-db.c:144
#, c-format
msgid "templates not found %s"
msgstr "no s'han trobat les plantilles %s"
-#: builtin/init-db.c:154
+#: builtin/init-db.c:157
#, c-format
msgid "not copying templates of a wrong format version %d from '%s'"
msgstr "no copiant plantilles d'una versió de format errònia %d de '%s'"
-#: builtin/init-db.c:192
+#: builtin/init-db.c:197
#, c-format
msgid "insane git directory %s"
msgstr "directori de git boig %s"
-#: builtin/init-db.c:323 builtin/init-db.c:326
+#: builtin/init-db.c:331 builtin/init-db.c:334
#, c-format
msgid "%s already exists"
msgstr "%s ja existeix"
-#: builtin/init-db.c:355
+#: builtin/init-db.c:363
#, c-format
msgid "unable to handle file type %d"
-msgstr "incapaç de manejar el tipus de fitxer %d"
+msgstr "no s'ha pogut gestionar el tipus de fitxer %d"
-#: builtin/init-db.c:358
+#: builtin/init-db.c:366
#, c-format
msgid "unable to move %s to %s"
-msgstr "incapaç de moure %s a %s"
+msgstr "no s'ha pogut moure %s a %s"
#. TRANSLATORS: The first '%s' is either "Reinitialized
#. existing" or "Initialized empty", the second " shared" or
#. "", and the last '%s%s' is the verbatim directory name.
-#: builtin/init-db.c:418
+#: builtin/init-db.c:426
#, c-format
msgid "%s%s Git repository in %s%s\n"
-msgstr "%s%s dipòsit de Git en %s%s\n"
+msgstr "%s dipòsit de Git%s a %s%s\n"
-#: builtin/init-db.c:419
+#: builtin/init-db.c:427
msgid "Reinitialized existing"
msgstr "S'ha reinicialitzat un existent"
-#: builtin/init-db.c:419
+#: builtin/init-db.c:427
msgid "Initialized empty"
msgstr "S'ha inicialitzat un buit"
-#: builtin/init-db.c:420
+#: builtin/init-db.c:428
msgid " shared"
msgstr " compartit"
-#: builtin/init-db.c:467
+#: builtin/init-db.c:475
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--"
"shared[=<permissions>]] [directory]"
@@ -6413,29 +6426,29 @@ msgstr ""
"git init [-q | --quiet] [--bare] [--template=<directori-de-plantilla>] [--"
"shared[=<permisos>]] [directori]"
-#: builtin/init-db.c:490
+#: builtin/init-db.c:498
msgid "permissions"
msgstr "permisos"
-#: builtin/init-db.c:491
+#: builtin/init-db.c:499
msgid "specify that the git repository is to be shared amongst several users"
msgstr "especifica que el dipòsit de git es compartirà entre diversos usuaris"
-#: builtin/init-db.c:493 builtin/prune-packed.c:57 builtin/repack.c:172
+#: builtin/init-db.c:501 builtin/prune-packed.c:57 builtin/repack.c:171
msgid "be quiet"
msgstr "calla"
-#: builtin/init-db.c:525 builtin/init-db.c:530
+#: builtin/init-db.c:533 builtin/init-db.c:538
#, c-format
msgid "cannot mkdir %s"
msgstr "no es pot mkdir %s"
-#: builtin/init-db.c:534
+#: builtin/init-db.c:542
#, c-format
msgid "cannot chdir to %s"
msgstr "no es pot chdir a %s"
-#: builtin/init-db.c:555
+#: builtin/init-db.c:563
#, c-format
msgid ""
"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
@@ -6444,10 +6457,10 @@ msgstr ""
"no es permet %s (o --work-tree=<directori>) sense especificar %s (o --git-"
"dir=<directori>)"
-#: builtin/init-db.c:583
+#: builtin/init-db.c:591
#, c-format
msgid "Cannot access work tree '%s'"
-msgstr "No es pot accedir al arbre de treball '%s'"
+msgstr "No es pot accedir a l'arbre de treball '%s'"
#: builtin/interpret-trailers.c:15
msgid ""
@@ -6470,17 +6483,17 @@ msgid "trailer(s) to add"
msgstr "remolcs a afegir"
#: builtin/log.c:41
-msgid "git log [<options>] [<revision range>] [[--] <path>...]\n"
-msgstr "git log [<opcions>] [<rang de revisions>] [[--] <ruta>...]\n"
+msgid "git log [<options>] [<revision range>] [[--] <path>...]"
+msgstr "git log [<opcions>] [<rang de revisions>] [[--] <camí>...]"
#: builtin/log.c:42
-msgid " or: git show [options] <object>..."
-msgstr " o: git show [opcions] <objecte>..."
+msgid "git show [options] <object>..."
+msgstr "git show [opcions] <objecte>..."
#: builtin/log.c:81
#, c-format
msgid "invalid --decorate option: %s"
-msgstr "opció --decorate invàlida: %s"
+msgstr "opció --decorate no vàlida: %s"
#: builtin/log.c:127
msgid "suppress diff output"
@@ -6562,11 +6575,11 @@ msgstr "Dos directoris de sortida?"
#: builtin/log.c:1186
msgid "use [PATCH n/m] even with a single patch"
-msgstr "usa [PATCH n/m] encara amb un pedaç solter"
+msgstr "usa [PATCH n/m] fins i tot amb un sol pedaç"
#: builtin/log.c:1189
msgid "use [PATCH] even with multiple patches"
-msgstr "usa [PATCH] encara amb múltiples pedaços"
+msgstr "usa [PATCH] fins i tot amb múltiples pedaços"
#: builtin/log.c:1193
msgid "print patches to standard out"
@@ -6594,7 +6607,7 @@ msgstr "comença nombrant els pedaços a <n> en lloc d'1"
#: builtin/log.c:1203
msgid "mark the series as Nth re-roll"
-msgstr "marca la sèrie com a la Nª llançada"
+msgstr "marca la sèrie com a l'enèsima llançada"
#: builtin/log.c:1205
msgid "Use [<prefix>] instead of [PATCH]"
@@ -6602,7 +6615,7 @@ msgstr "Usa [<prefix>] en lloc de [PATCH]"
#: builtin/log.c:1208
msgid "store resulting files in <dir>"
-msgstr "emmagatzema els fitxers resultants en <directori>"
+msgstr "emmagatzema els fitxers resultants a <directori>"
#: builtin/log.c:1211
msgid "don't strip/add [PATCH]"
@@ -6652,7 +6665,7 @@ msgstr "identitat"
#: builtin/log.c:1228
msgid "set From address to <ident> (or committer ident if absent)"
msgstr ""
-"estableix l'adreça From a <identitat> (o la identitat del comitent si absent)"
+"estableix l'adreça From a <identitat> (o la identitat del comitent si manca)"
#: builtin/log.c:1230
msgid "message-id"
@@ -6660,7 +6673,7 @@ msgstr "ID de missatge"
#: builtin/log.c:1231
msgid "make first mail a reply to <message-id>"
-msgstr "fes el primer missatge una resposta a <ID de missatge>"
+msgstr "fes del primer missatge una resposta a <ID de missatge>"
#: builtin/log.c:1232 builtin/log.c:1235
msgid "boundary"
@@ -6697,7 +6710,7 @@ msgstr "no imprimeixis els noms de fitxer del pedaç"
#: builtin/log.c:1320
#, c-format
msgid "invalid ident line: %s"
-msgstr "línia d'identitat invàlida: %s"
+msgstr "línia d'identitat no vàlida: %s"
#: builtin/log.c:1335
msgid "-n and -k are mutually exclusive."
@@ -6721,7 +6734,7 @@ msgstr "--check no té sentit"
#: builtin/log.c:1372
msgid "standard output, or directory, which one?"
-msgstr "sortida estàndard, o directori, qual dels dos?"
+msgstr "sortida estàndard o directori, quin dels dos?"
#: builtin/log.c:1374
#, c-format
@@ -6731,7 +6744,7 @@ msgstr "No s'ha pogut crear el directori '%s'"
#: builtin/log.c:1472
#, c-format
msgid "unable to read signature file '%s'"
-msgstr "incapaç de llegir el fitxer de firma '%s'"
+msgstr "no s'ha pogut llegir el fitxer de firma '%s'"
#: builtin/log.c:1535
msgid "Failed to create output files"
@@ -6746,7 +6759,7 @@ msgstr "git cherry [-v] [<font> [<cap> [<límit>]]]"
msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
msgstr ""
-"No s'ha pogut trobar una rama remota seguida, si us plau, especifiqueu "
+"No s'ha pogut trobar una branca remota seguida. Si us plau, especifiqueu "
"<font> manualment.\n"
#: builtin/log.c:1651 builtin/log.c:1653 builtin/log.c:1665
@@ -6768,31 +6781,32 @@ msgstr "usa lletres minúscules per als fitxers 'assume unchanged'"
#: builtin/ls-files.c:462
msgid "show cached files in the output (default)"
-msgstr "mostra els fitxers en cau en la sortida (per defecte)"
+msgstr ""
+"mostra en la sortida els fitxers desats en la memòria cau (per defecte)"
#: builtin/ls-files.c:464
msgid "show deleted files in the output"
-msgstr "mostra els fitxers suprimits en la sortida"
+msgstr "mostra en la sortida els fitxers suprimits"
#: builtin/ls-files.c:466
msgid "show modified files in the output"
-msgstr "mostra els fitxers modificats en la sortida"
+msgstr "mostra en la sortida els fitxers modificats"
#: builtin/ls-files.c:468
msgid "show other files in the output"
-msgstr "mostra els altres fitxers en la sortida"
+msgstr "mostra en la sortida els altres fitxers"
#: builtin/ls-files.c:470
msgid "show ignored files in the output"
-msgstr "mostra els fitxers ignorats en la sortida"
+msgstr "mostra en la sortida els fitxers ignorats"
#: builtin/ls-files.c:473
msgid "show staged contents' object name in the output"
-msgstr "mostra el nom d'objecte dels continguts allistats en la sortida"
+msgstr "mostra en la sortida el nom d'objecte dels continguts allistats"
#: builtin/ls-files.c:475
msgid "show files on the filesystem that need to be removed"
-msgstr "mostra els fitxers en el sistema de fitxers que s'han de treure"
+msgstr "mostra els fitxers en el sistema de fitxers que s'han d'eliminar"
#: builtin/ls-files.c:477
msgid "show 'other' directories' names only"
@@ -6804,7 +6818,7 @@ msgstr "no mostris els directoris buits"
#: builtin/ls-files.c:483
msgid "show unmerged files in the output"
-msgstr "mostra els fitxers sense fusionar en la sortida"
+msgstr "mostra en la sortida els fitxers sense fusionar"
#: builtin/ls-files.c:485
msgid "show resolve-undo information"
@@ -6828,7 +6842,7 @@ msgstr "afegeix les exclusions estàndards de git"
#: builtin/ls-files.c:498
msgid "make the output relative to the project top directory"
-msgstr "fes que la sortida sigui relativa al directori superior del project"
+msgstr "fes que la sortida sigui relativa al directori superior del projecte"
#: builtin/ls-files.c:501
msgid "if any <file> is not in the index, treat this as an error"
@@ -6841,7 +6855,7 @@ msgstr "arbre"
#: builtin/ls-files.c:503
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
-"pretenguis que les rutes tretes després de <arbre> encara estiguin presents"
+"pretén que els camins eliminats després de <arbre> encara estiguin presents"
#: builtin/ls-files.c:505
msgid "show debugging data"
@@ -6849,215 +6863,216 @@ msgstr "mostra les dades de depuració"
#: builtin/ls-tree.c:28
msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
-msgstr "git ls-tree [<opcions>] <arbre> [<ruta>...]"
+msgstr "git ls-tree [<opcions>] <arbre> [<camí>...]"
-#: builtin/ls-tree.c:126
+#: builtin/ls-tree.c:127
msgid "only show trees"
msgstr "mostra només els arbres"
-#: builtin/ls-tree.c:128
+#: builtin/ls-tree.c:129
msgid "recurse into subtrees"
msgstr "recursa als subarbres"
-#: builtin/ls-tree.c:130
+#: builtin/ls-tree.c:131
msgid "show trees when recursing"
-msgstr "mostra els arbres al recursar"
+msgstr "mostra els arbres en recursar"
-#: builtin/ls-tree.c:133
+#: builtin/ls-tree.c:134
msgid "terminate entries with NUL byte"
-msgstr "termina les entrades amb un octet NUL"
+msgstr "acaba les entrades amb un octet NUL"
-#: builtin/ls-tree.c:134
+#: builtin/ls-tree.c:135
msgid "include object size"
msgstr "mida de l'objecte d'inclusió"
-#: builtin/ls-tree.c:136 builtin/ls-tree.c:138
+#: builtin/ls-tree.c:137 builtin/ls-tree.c:139
msgid "list only filenames"
msgstr "llista només els noms de fitxer"
-#: builtin/ls-tree.c:141
+#: builtin/ls-tree.c:142
msgid "use full path names"
-msgstr "usa els noms de ruta complets"
+msgstr "usa els noms de camí complets"
-#: builtin/ls-tree.c:143
+#: builtin/ls-tree.c:144
msgid "list entire tree; not just current directory (implies --full-name)"
-msgstr "llista l'arbre enter; no sol el directori actual (implica --full-name)"
+msgstr ""
+"llista l'arbre sencer; no només el directori actual (implica --full-name)"
-#: builtin/merge.c:44
+#: builtin/merge.c:45
msgid "git merge [options] [<commit>...]"
msgstr "git merge [opcions] [<comissió>...]"
-#: builtin/merge.c:45
+#: builtin/merge.c:46
msgid "git merge [options] <msg> HEAD <commit>"
msgstr "git merge [opcions] <missatge> HEAD <comissió>"
-#: builtin/merge.c:46
+#: builtin/merge.c:47
msgid "git merge --abort"
msgstr "git merge --abort"
-#: builtin/merge.c:99
+#: builtin/merge.c:100
msgid "switch `m' requires a value"
msgstr "l'opció `m' requereix un valor"
-#: builtin/merge.c:136
+#: builtin/merge.c:137
#, c-format
msgid "Could not find merge strategy '%s'.\n"
msgstr "No s'ha pogut trobar l'estratègia de fusió '%s'.\n"
-#: builtin/merge.c:137
+#: builtin/merge.c:138
#, c-format
msgid "Available strategies are:"
msgstr "Les estratègies disponibles són:"
-#: builtin/merge.c:142
+#: builtin/merge.c:143
#, c-format
msgid "Available custom strategies are:"
msgstr "Les estratègies personalitzades disponibles són:"
-#: builtin/merge.c:192
+#: builtin/merge.c:193
msgid "do not show a diffstat at the end of the merge"
msgstr "no mostris les estadístiques de diferència al final de la fusió"
-#: builtin/merge.c:195
+#: builtin/merge.c:196
msgid "show a diffstat at the end of the merge"
msgstr "mostra les estadístiques de diferència al final de la fusió"
-#: builtin/merge.c:196
+#: builtin/merge.c:197
msgid "(synonym to --stat)"
msgstr "(sinònim de --stat)"
-#: builtin/merge.c:198
+#: builtin/merge.c:199
msgid "add (at most <n>) entries from shortlog to merge commit message"
msgstr ""
"afegeix (com a màxim <n>) entrades del registre curt per a fusionar el "
"missatge de comissió"
-#: builtin/merge.c:201
+#: builtin/merge.c:202
msgid "create a single commit instead of doing a merge"
-msgstr "crea una comissió soltera en lloc de fusionar"
+msgstr "crea una única comissió en lloc de fusionar"
-#: builtin/merge.c:203
+#: builtin/merge.c:204
msgid "perform a commit if the merge succeeds (default)"
msgstr "realitza una comissió si la fusió té èxit (per defecte)"
-#: builtin/merge.c:205
+#: builtin/merge.c:206
msgid "edit message before committing"
msgstr "edita el missatge abans de cometre"
-#: builtin/merge.c:206
+#: builtin/merge.c:207
msgid "allow fast-forward (default)"
msgstr "permet l'avanç ràpid (per defecte)"
-#: builtin/merge.c:208
+#: builtin/merge.c:209
msgid "abort if fast-forward is not possible"
msgstr "avorta si l'avanç ràpid no és possible"
-#: builtin/merge.c:212
+#: builtin/merge.c:213
msgid "Verify that the named commit has a valid GPG signature"
msgstr "Verifica que la comissió anomenada tingui una firma GPG vàlida"
-#: builtin/merge.c:213 builtin/notes.c:741 builtin/revert.c:89
+#: builtin/merge.c:214 builtin/notes.c:753 builtin/revert.c:89
msgid "strategy"
msgstr "estratègia"
-#: builtin/merge.c:214
+#: builtin/merge.c:215
msgid "merge strategy to use"
msgstr "estratègia de fusió a usar"
-#: builtin/merge.c:215
+#: builtin/merge.c:216
msgid "option=value"
msgstr "opció=valor"
-#: builtin/merge.c:216
+#: builtin/merge.c:217
msgid "option for selected merge strategy"
msgstr "opció per a l'estratègia de fusió seleccionada"
-#: builtin/merge.c:218
+#: builtin/merge.c:219
msgid "merge commit message (for a non-fast-forward merge)"
-msgstr "missatge de comissió de fusió (per a una fusió no de avanç ràpid)"
+msgstr "missatge de comissió de fusió (per a una fusió no d'avanç ràpid)"
-#: builtin/merge.c:222
+#: builtin/merge.c:223
msgid "abort the current in-progress merge"
msgstr "avorta la fusió en curs actual"
-#: builtin/merge.c:250
+#: builtin/merge.c:251
msgid "could not run stash."
msgstr "no s'ha pogut executar stash."
-#: builtin/merge.c:255
+#: builtin/merge.c:256
msgid "stash failed"
msgstr "L'emmagatzemament ha fallat."
-#: builtin/merge.c:260
+#: builtin/merge.c:261
#, c-format
msgid "not a valid object: %s"
-msgstr "no és objecte vàlid: %s"
+msgstr "no és un objecte vàlid: %s"
-#: builtin/merge.c:279 builtin/merge.c:296
+#: builtin/merge.c:280 builtin/merge.c:297
msgid "read-tree failed"
msgstr "read-tree ha fallat"
-#: builtin/merge.c:326
+#: builtin/merge.c:327
msgid " (nothing to squash)"
msgstr " (res a aixafar)"
-#: builtin/merge.c:339
+#: builtin/merge.c:340
#, c-format
msgid "Squash commit -- not updating HEAD\n"
msgstr "Comissió d'aixafada -- no actualitzant HEAD\n"
-#: builtin/merge.c:371
+#: builtin/merge.c:372
msgid "Writing SQUASH_MSG"
msgstr "Escrivint SQUASH_MSG"
-#: builtin/merge.c:373
+#: builtin/merge.c:374
msgid "Finishing SQUASH_MSG"
-msgstr "Terminant SQUASH_MSG"
+msgstr "Finalitzant SQUASH_MSG"
-#: builtin/merge.c:396
+#: builtin/merge.c:397
#, c-format
msgid "No merge message -- not updating HEAD\n"
msgstr "Cap missatge de fusió -- no actualitzant HEAD\n"
-#: builtin/merge.c:446
+#: builtin/merge.c:447
#, c-format
msgid "'%s' does not point to a commit"
msgstr "'%s' no assenyala una comissió"
-#: builtin/merge.c:558
+#: builtin/merge.c:559
#, c-format
msgid "Bad branch.%s.mergeoptions string: %s"
msgstr "Cadena branch.%s.mergeoptions dolenta: %s"
-#: builtin/merge.c:653
+#: builtin/merge.c:654
msgid "git write-tree failed to write a tree"
msgstr "git write-tree ha fallat en escriure un arbre"
-#: builtin/merge.c:677
+#: builtin/merge.c:678
msgid "Not handling anything other than two heads merge."
-msgstr "No manejant res apart de la fusió de dos caps."
+msgstr "No gestionant res a part de la fusió de dos caps."
-#: builtin/merge.c:691
+#: builtin/merge.c:692
#, c-format
msgid "Unknown option for merge-recursive: -X%s"
msgstr "Opció desconeguda de merge-recursive: -X%s"
-#: builtin/merge.c:704
+#: builtin/merge.c:705
#, c-format
msgid "unable to write %s"
-msgstr "incapaç d'escriure %s"
+msgstr "no s'ha pogut escriure %s"
-#: builtin/merge.c:793
+#: builtin/merge.c:794
#, c-format
msgid "Could not read from '%s'"
msgstr "No s'ha pogut llegir de '%s'"
-#: builtin/merge.c:802
+#: builtin/merge.c:803
#, c-format
msgid "Not committing merge; use 'git commit' to complete the merge.\n"
-msgstr "No comitent la fusió; useu 'git commit' per a terminar la fusió.\n"
+msgstr "No cometent la fusió; useu 'git commit' per a completar la fusió.\n"
-#: builtin/merge.c:808
+#: builtin/merge.c:809
#, c-format
msgid ""
"Please enter a commit message to explain why this merge is necessary,\n"
@@ -7067,175 +7082,176 @@ msgid ""
"the commit.\n"
msgstr ""
"Si us plau, introduïu un missatge de comissió per a explicar per què\n"
-"aquesta fusió és necessari, especialment si fusiona una font\n"
-"actualitzada a una rama temàtica.\n"
+"aquesta fusió és necessària, especialment si fusiona una font\n"
+"actualitzada a una branca temàtica.\n"
"\n"
"S'ignoraran les línies que comencin amb '%c', i un missatge buit\n"
"avorta la comissió.\n"
-#: builtin/merge.c:832
+#: builtin/merge.c:833
msgid "Empty commit message."
msgstr "Missatge de comissió buit."
-#: builtin/merge.c:844
+#: builtin/merge.c:845
#, c-format
msgid "Wonderful.\n"
msgstr "Meravellós.\n"
-#: builtin/merge.c:907
+#: builtin/merge.c:900
#, c-format
msgid "Automatic merge failed; fix conflicts and then commit the result.\n"
msgstr ""
"La fusió automàtica ha fallat; arregleu els conflictes i després cometeu el "
"resultat.\n"
-#: builtin/merge.c:923
+#: builtin/merge.c:916
#, c-format
msgid "'%s' is not a commit"
msgstr "'%s' no és una comissió"
-#: builtin/merge.c:964
+#: builtin/merge.c:957
msgid "No current branch."
-msgstr "Cap rama actual."
+msgstr "Cap branca actual."
-#: builtin/merge.c:966
+#: builtin/merge.c:959
msgid "No remote for the current branch."
-msgstr "Cap remot per a la rama actual."
+msgstr "No hi ha cap remot per a la branca actual."
-#: builtin/merge.c:968
+#: builtin/merge.c:961
msgid "No default upstream defined for the current branch."
-msgstr "Cap font per defecte definida per a la rama actual."
+msgstr "No hi ha cap font per defecte definida per a la branca actual."
-#: builtin/merge.c:973
+#: builtin/merge.c:966
#, c-format
msgid "No remote-tracking branch for %s from %s"
-msgstr "Cap rama de seguiment remot per a %s de %s"
+msgstr "No hi ha cap branca de seguiment remot per a %s de %s"
-#: builtin/merge.c:1129
+#: builtin/merge.c:1122
msgid "There is no merge to abort (MERGE_HEAD missing)."
msgstr "No hi ha fusió a avortar (manca MERGE_HEAD)."
-#: builtin/merge.c:1145
+#: builtin/merge.c:1138
msgid ""
"You have not concluded your merge (MERGE_HEAD exists).\n"
"Please, commit your changes before you merge."
msgstr ""
-"No heu terminat la vostra fusió (MERGE_HEAD existeix).\n"
+"No heu completat la vostra fusió (MERGE_HEAD existeix).\n"
"Si us plau, cometeu els vostres canvis abans de fusionar."
-#: builtin/merge.c:1148 git-pull.sh:34
+#: builtin/merge.c:1141 git-pull.sh:34
msgid "You have not concluded your merge (MERGE_HEAD exists)."
-msgstr "No heu terminat la vostra fusió (MERGE_HEAD existeix)."
+msgstr "No heu completat la vostra fusió (MERGE_HEAD existeix)."
-#: builtin/merge.c:1152
+#: builtin/merge.c:1145
msgid ""
"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
"Please, commit your changes before you merge."
msgstr ""
-"No heu terminat el vostre recull de cireres (CHERRY_PICK_HEAD existeix).\n"
+"No heu completat el vostre recull de cireres (CHERRY_PICK_HEAD existeix).\n"
"Si us plau, cometeu els vostres canvis abans de fusionar."
-#: builtin/merge.c:1155
+#: builtin/merge.c:1148
msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."
msgstr ""
-"No heu terminat el vostre recull de cireres (CHERRY_PICK_HEAD existeix)."
+"No heu completat el vostre recull de cireres (CHERRY_PICK_HEAD existeix)."
-#: builtin/merge.c:1164
+#: builtin/merge.c:1157
msgid "You cannot combine --squash with --no-ff."
msgstr "No podeu combinar --squash amb --no-ff."
-#: builtin/merge.c:1173
+#: builtin/merge.c:1166
msgid "No commit specified and merge.defaultToUpstream not set."
msgstr ""
"No hi ha una comissió especificada i merge.defaultToUpstream no està "
"establert."
-#: builtin/merge.c:1205
+#: builtin/merge.c:1198
msgid "Can merge only exactly one commit into empty head"
msgstr "Es pot fusionar només exactament una comissió a un cap buit"
-#: builtin/merge.c:1208
+#: builtin/merge.c:1201
msgid "Squash commit into empty head not supported yet"
-msgstr "Aixafar una comissió a un cap buit encara no es suporta"
+msgstr "Aixafar una comissió a un cap buit encara no es permet"
-#: builtin/merge.c:1210
+#: builtin/merge.c:1203
msgid "Non-fast-forward commit does not make sense into an empty head"
msgstr "Una comissió no d'avanç ràpid no té sentit a un cap buit"
-#: builtin/merge.c:1215
+#: builtin/merge.c:1208
#, c-format
msgid "%s - not something we can merge"
-msgstr "%s - no és cosa que puguem fusionar"
+msgstr "%s - no és una cosa que puguem fusionar"
-#: builtin/merge.c:1266
+#: builtin/merge.c:1259
#, c-format
msgid "Commit %s has an untrusted GPG signature, allegedly by %s."
-msgstr "La comissió %s té una firma GPG no confiada, suposadament de %s."
+msgstr "La comissió %s té una firma GPG no fiable, suposadament de %s."
-#: builtin/merge.c:1269
+#: builtin/merge.c:1262
#, c-format
msgid "Commit %s has a bad GPG signature allegedly by %s."
msgstr "La comissió %s té una firma GPG dolenta suposadament de %s."
-#: builtin/merge.c:1272
+#: builtin/merge.c:1265
#, c-format
msgid "Commit %s does not have a GPG signature."
msgstr "La comissió %s no té firma GPG."
-#: builtin/merge.c:1275
+#: builtin/merge.c:1268
#, c-format
msgid "Commit %s has a good GPG signature by %s\n"
msgstr "La comissió %s té una firma GPG bona de %s\n"
-#: builtin/merge.c:1356
+#: builtin/merge.c:1349
#, c-format
msgid "Updating %s..%s\n"
msgstr "Actualitzant %s..%s\n"
-#: builtin/merge.c:1395
+#: builtin/merge.c:1388
#, c-format
msgid "Trying really trivial in-index merge...\n"
msgstr "Intentant una fusió molt trivial en l'índex...\n"
-#: builtin/merge.c:1402
+#: builtin/merge.c:1395
#, c-format
msgid "Nope.\n"
msgstr "No.\n"
-#: builtin/merge.c:1434
+#: builtin/merge.c:1427
msgid "Not possible to fast-forward, aborting."
msgstr "No és possible avançar ràpidament, avortant."
-#: builtin/merge.c:1457 builtin/merge.c:1536
+#: builtin/merge.c:1450 builtin/merge.c:1529
#, c-format
msgid "Rewinding the tree to pristine...\n"
msgstr "Rebobinant l'arbre a la pristina...\n"
-#: builtin/merge.c:1461
+#: builtin/merge.c:1454
#, c-format
msgid "Trying merge strategy %s...\n"
msgstr "Intentant l'estratègia de fusió %s...\n"
-#: builtin/merge.c:1527
+#: builtin/merge.c:1520
#, c-format
msgid "No merge strategy handled the merge.\n"
-msgstr "Cap estratègia de fusió ha manejat la fusió.\n"
+msgstr "Cap estratègia de fusió ha gestionat la fusió.\n"
-#: builtin/merge.c:1529
+#: builtin/merge.c:1522
#, c-format
msgid "Merge with strategy %s failed.\n"
msgstr "L'estratègia de fusió %s ha fallat.\n"
-#: builtin/merge.c:1538
+#: builtin/merge.c:1531
#, c-format
msgid "Using the %s to prepare resolving by hand.\n"
msgstr "Usant el %s per a preparar la resolució a mà.\n"
-#: builtin/merge.c:1550
+#: builtin/merge.c:1543
#, c-format
msgid "Automatic merge went well; stopped before committing as requested\n"
msgstr ""
-"La fusió automàtica ha sortit bé; aturat abans de cometre segons demanat\n"
+"La fusió automàtica ha sortit bé; s'ha aturat abans de cometre tal i com "
+"s'havia demanat\n"
#: builtin/merge-base.c:29
msgid "git merge-base [-a|--all] <commit> <commit>..."
@@ -7263,7 +7279,7 @@ msgstr "emet tots els avantpassats comuns"
#: builtin/merge-base.c:216
msgid "find ancestors for a single n-way merge"
-msgstr "troba els avantpassats per a una fusió soltera de n vies"
+msgstr "troba els avantpassats per a una sola fusió de n vies"
#: builtin/merge-base.c:218
msgid "list revs not reachable from others"
@@ -7324,11 +7340,11 @@ msgstr "git mktree [-z] [--missing] [--batch]"
#: builtin/mktree.c:150
msgid "input is NUL terminated"
-msgstr "l'entrada és terminada per NUL"
+msgstr "l'entrada és acabada amb NUL"
#: builtin/mktree.c:151 builtin/write-tree.c:24
msgid "allow missing objects"
-msgstr "permet els objectes mancants"
+msgstr "permet els objectes absents"
#: builtin/mktree.c:152
msgid "allow creation of more than one tree"
@@ -7341,7 +7357,7 @@ msgstr "git mv [opcions] <font>... <destí>"
#: builtin/mv.c:69
#, c-format
msgid "Directory %s is in index and no submodule?"
-msgstr "El directori %s està en l'índex i no hi ha submòdul?"
+msgstr "El directori %s és en l'índex i no hi ha cap submòdul?"
#: builtin/mv.c:71
msgid "Please stage your changes to .gitmodules or stash them to proceed"
@@ -7352,7 +7368,7 @@ msgstr ""
#: builtin/mv.c:89
#, c-format
msgid "%.*s is in index"
-msgstr "%.*s està en l'índex"
+msgstr "%.*s és en l'índex"
#: builtin/mv.c:111
msgid "force move/rename even if target exists"
@@ -7360,7 +7376,7 @@ msgstr "força el moviment / canvi de nom encara que el destí existeixi"
#: builtin/mv.c:112
msgid "skip move/rename errors"
-msgstr "salta els error de moviment / canvi de nom"
+msgstr "omet els errors de moviment / canvi de nom"
#: builtin/mv.c:151
#, c-format
@@ -7378,7 +7394,7 @@ msgstr "font dolenta"
#: builtin/mv.c:169
msgid "can not move directory into itself"
-msgstr "no es pot moure un directori al seu mateix"
+msgstr "no es pot moure un directori a dins d'ell mateix"
#: builtin/mv.c:172
msgid "cannot move directory over file"
@@ -7390,7 +7406,7 @@ msgstr "el directori font està buit"
#: builtin/mv.c:206
msgid "not under version control"
-msgstr "no està baix control de versions"
+msgstr "no està sota control de versions"
#: builtin/mv.c:209
msgid "destination exists"
@@ -7423,7 +7439,7 @@ msgstr "%s, origen=%s, destí=%s"
msgid "Renaming %s to %s\n"
msgstr "Canviant el nom de %s a %s\n"
-#: builtin/mv.c:256 builtin/remote.c:726 builtin/repack.c:358
+#: builtin/mv.c:256 builtin/remote.c:728 builtin/repack.c:355
#, c-format
msgid "renaming '%s' failed"
msgstr "el canvi del nom de '%s' ha fallat"
@@ -7474,11 +7490,11 @@ msgstr "git notes [--ref <referència_de_notes>] [llista [<objecte>]]"
#: builtin/notes.c:25
msgid ""
-"git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) "
-"<object>] [<object>]"
+"git notes [--ref <notes_ref>] add [-f] [--allow-empty] [-m <msg> | -F <file> "
+"| (-c | -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referència_de_notes>] add [-f] [-m <missatge> | -F "
-"<fitxer> | (-c | -C) <objecte>] [<objecte>]"
+"git notes [--ref <referència_de_notes>] add [-f] [--allow-empty] [-m "
+"<missatge> | -F <fitxer> | (-c | -C) <objecte>] [<objecte>]"
#: builtin/notes.c:26
msgid "git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"
@@ -7487,15 +7503,16 @@ msgstr ""
#: builtin/notes.c:27
msgid ""
-"git notes [--ref <notes_ref>] append [-m <msg> | -F <file> | (-c | -C) "
-"<object>] [<object>]"
+"git notes [--ref <notes_ref>] append [--allow-empty] [-m <msg> | -F <file> | "
+"(-c | -C) <object>] [<object>]"
msgstr ""
-"git notes [--ref <referència_de_notes>] append [-m <missatge> | -F <fitxer> "
-"| (-c | -C) <objecte>] [<objecte>]"
+"git notes [--ref <referència_de_notes>] append [--allow-empty] [-m "
+"<missatge> | -F <fitxer> | (-c | -C) <objecte>] [<objecte>]"
#: builtin/notes.c:28
-msgid "git notes [--ref <notes_ref>] edit [<object>]"
-msgstr "git notes [--ref <referència_de_notes>] edit [<objecte>]"
+msgid "git notes [--ref <notes_ref>] edit [--allow-empty] [<object>]"
+msgstr ""
+"git notes [--ref <referència_de_notes>] edit [--allow-empty] [<objecte>]"
#: builtin/notes.c:29
msgid "git notes [--ref <notes_ref>] show [<object>]"
@@ -7580,120 +7597,119 @@ msgstr "git notes prune [<opcions>]"
msgid "git notes get-ref"
msgstr "git notes get-ref"
-#: builtin/notes.c:136
+#: builtin/notes.c:146
#, c-format
msgid "unable to start 'show' for object '%s'"
-msgstr "incapaç d'iniciar 'show' per a l'objecte '%s'"
+msgstr "no s'ha pogut iniciar 'show' per a l'objecte '%s'"
-#: builtin/notes.c:140
+#: builtin/notes.c:150
msgid "could not read 'show' output"
msgstr "no s'ha pogut llegir la sortida de 'show'"
-#: builtin/notes.c:148
+#: builtin/notes.c:158
#, c-format
msgid "failed to finish 'show' for object '%s'"
-msgstr "s'ha fallat en terminar 'show' per a l'objecte '%s'"
+msgstr "s'ha fallat en finalitzar 'show' per a l'objecte '%s'"
-#: builtin/notes.c:166 builtin/tag.c:477
+#: builtin/notes.c:173 builtin/tag.c:477
#, c-format
msgid "could not create file '%s'"
msgstr "no s'ha pogut crear el fitxer '%s'"
-#: builtin/notes.c:185
+#: builtin/notes.c:192
msgid "Please supply the note contents using either -m or -F option"
msgstr ""
-"Si us plau, proveïu els continguts de la nota per usar o l'opció -m o "
+"Si us plau, proveïu els continguts de la nota fent servir l'opció -m o "
"l'opció -F"
-#: builtin/notes.c:206 builtin/notes.c:847
-#, c-format
-msgid "Removing note for object %s\n"
-msgstr "Traient la nota de l'objecte %s\n"
-
-#: builtin/notes.c:211
+#: builtin/notes.c:201
msgid "unable to write note object"
-msgstr "incapaç d'escriure l'objecte de nota"
+msgstr "no s'ha pogut escriure l'objecte de nota"
-#: builtin/notes.c:213
+#: builtin/notes.c:203
#, c-format
msgid "The note contents have been left in %s"
msgstr "Els continguts de la nota s'han deixat en %s"
-#: builtin/notes.c:247 builtin/tag.c:693
+#: builtin/notes.c:231 builtin/tag.c:693
#, c-format
msgid "cannot read '%s'"
msgstr "no es pot llegir '%s'"
-#: builtin/notes.c:249 builtin/tag.c:696
+#: builtin/notes.c:233 builtin/tag.c:696
#, c-format
msgid "could not open or read '%s'"
msgstr "no s'ha pogut obrir ni llegir '%s'"
-#: builtin/notes.c:268 builtin/notes.c:319 builtin/notes.c:321
-#: builtin/notes.c:381 builtin/notes.c:435 builtin/notes.c:518
-#: builtin/notes.c:523 builtin/notes.c:598 builtin/notes.c:640
-#: builtin/notes.c:842 builtin/tag.c:709
+#: builtin/notes.c:252 builtin/notes.c:303 builtin/notes.c:305
+#: builtin/notes.c:365 builtin/notes.c:420 builtin/notes.c:506
+#: builtin/notes.c:511 builtin/notes.c:589 builtin/notes.c:652
+#: builtin/notes.c:854 builtin/tag.c:709
#, c-format
msgid "Failed to resolve '%s' as a valid ref."
msgstr "S'ha fallat en resoldre '%s' com a referència vàlida."
-#: builtin/notes.c:271
+#: builtin/notes.c:255
#, c-format
msgid "Failed to read object '%s'."
msgstr "S'ha fallat en llegir l'objecte '%s'."
-#: builtin/notes.c:275
+#: builtin/notes.c:259
#, c-format
msgid "Cannot read note data from non-blob object '%s'."
msgstr "No es pot llegir les dades de node de l'objecte no de blob '%s'."
-#: builtin/notes.c:315
+#: builtin/notes.c:299
#, c-format
msgid "Malformed input line: '%s'."
-msgstr "Línia d'entrada malformada: '%s'."
+msgstr "Línia d'entrada mal formada: '%s'."
-#: builtin/notes.c:330
+#: builtin/notes.c:314
#, c-format
msgid "Failed to copy notes from '%s' to '%s'"
msgstr "S'ha fallat en copiar les notes de '%s' a '%s'"
-#: builtin/notes.c:374 builtin/notes.c:428 builtin/notes.c:501
-#: builtin/notes.c:513 builtin/notes.c:586 builtin/notes.c:633
-#: builtin/notes.c:907
+#: builtin/notes.c:358 builtin/notes.c:413 builtin/notes.c:489
+#: builtin/notes.c:501 builtin/notes.c:577 builtin/notes.c:645
+#: builtin/notes.c:919
msgid "too many parameters"
msgstr "massa paràmetres"
-#: builtin/notes.c:387 builtin/notes.c:646
+#: builtin/notes.c:371 builtin/notes.c:658
#, c-format
msgid "No note found for object %s."
-msgstr "Cap nota trobada per a l'objecte %s."
+msgstr "No s'ha trobat cap nota per a l'objecte %s."
-#: builtin/notes.c:409 builtin/notes.c:566
+#: builtin/notes.c:392 builtin/notes.c:555
msgid "note contents as a string"
-msgstr "nota els continguts com a cadena"
+msgstr "anota els continguts com a cadena"
-#: builtin/notes.c:412 builtin/notes.c:569
+#: builtin/notes.c:395 builtin/notes.c:558
msgid "note contents in a file"
-msgstr "nota els continguts en un fitxer"
+msgstr "anota els continguts en un fitxer"
-#: builtin/notes.c:414 builtin/notes.c:417 builtin/notes.c:571
-#: builtin/notes.c:574 builtin/tag.c:628
+#: builtin/notes.c:397 builtin/notes.c:400 builtin/notes.c:560
+#: builtin/notes.c:563 builtin/tag.c:628
msgid "object"
msgstr "objecte"
-#: builtin/notes.c:415 builtin/notes.c:572
+#: builtin/notes.c:398 builtin/notes.c:561
msgid "reuse and edit specified note object"
msgstr "reusa i edita l'objecte de nota especificat"
-#: builtin/notes.c:418 builtin/notes.c:575
+#: builtin/notes.c:401 builtin/notes.c:564
msgid "reuse specified note object"
msgstr "reusa l'objecte de nota especificat"
-#: builtin/notes.c:420 builtin/notes.c:488
+#: builtin/notes.c:404 builtin/notes.c:567
+msgid "allow storing empty note"
+msgstr "permet l'emmagatzematge d'una nota buida"
+
+#: builtin/notes.c:405 builtin/notes.c:476
msgid "replace existing notes"
msgstr "reemplaça les notes existents"
-#: builtin/notes.c:454
+#: builtin/notes.c:430
#, c-format
msgid ""
"Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -7702,25 +7718,30 @@ msgstr ""
"No es pot afegir les notes. S'ha trobat notes existents de l'objecte %s. "
"Useu '-f' per a sobreescriure les notes existents."
-#: builtin/notes.c:459 builtin/notes.c:536
+#: builtin/notes.c:445 builtin/notes.c:524
#, c-format
msgid "Overwriting existing notes for object %s\n"
msgstr "Sobreescrivint les notes existents de l'objecte %s\n"
-#: builtin/notes.c:489
+#: builtin/notes.c:456 builtin/notes.c:617 builtin/notes.c:859
+#, c-format
+msgid "Removing note for object %s\n"
+msgstr "Eliminant la nota de l'objecte %s\n"
+
+#: builtin/notes.c:477
msgid "read objects from stdin"
msgstr "llegeix els objectes des d'stdin"
-#: builtin/notes.c:491
+#: builtin/notes.c:479
msgid "load rewriting config for <command> (implies --stdin)"
msgstr ""
"carrega la configuració de reescriptura per a <ordre> (implica --stdin)"
-#: builtin/notes.c:509
+#: builtin/notes.c:497
msgid "too few parameters"
msgstr "hi ha massa pocs paràmetres"
-#: builtin/notes.c:530
+#: builtin/notes.c:518
#, c-format
msgid ""
"Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite "
@@ -7729,74 +7750,74 @@ msgstr ""
"No es pot copiar les notes. S'han trobat notes existents de l'objecte %s. "
"Useu '-f' per a sobreescriure les notes existents."
-#: builtin/notes.c:542
+#: builtin/notes.c:530
#, c-format
msgid "Missing notes on source object %s. Cannot copy."
msgstr "Manquen notes a l'objecte font %s. No es pot copiar."
-#: builtin/notes.c:591
+#: builtin/notes.c:582
#, c-format
msgid ""
"The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n"
"Please use 'git notes add -f -m/-F/-c/-C' instead.\n"
msgstr ""
-"S'han desaprovat les opcions -m/-F/-c/-C del subordre 'edit'.\n"
-"Si us plau, useu 'git notes add -f -m/-F/-c/-C' en lloc.\n"
+"S'han desaprovat les opcions -m/-F/-c/-C en favor de la subordre 'edit'.\n"
+"Si us plau, useu 'git notes add -f -m/-F/-c/-C' en lloc d'això.\n"
-#: builtin/notes.c:738
+#: builtin/notes.c:750
msgid "General options"
msgstr "Opcions generals"
-#: builtin/notes.c:740
+#: builtin/notes.c:752
msgid "Merge options"
msgstr "Opcions de fusió"
-#: builtin/notes.c:742
+#: builtin/notes.c:754
msgid ""
"resolve notes conflicts using the given strategy (manual/ours/theirs/union/"
"cat_sort_uniq)"
msgstr ""
-"resol conflictes de nota per usar l'estratègia donada (manual/ours/theirs/"
+"resol els conflictes de nota usant l'estratègia donada (manual/ours/theirs/"
"union/cat_sort_uniq)"
-#: builtin/notes.c:744
+#: builtin/notes.c:756
msgid "Committing unmerged notes"
msgstr "Cometent les notes sense fusionar"
-#: builtin/notes.c:746
+#: builtin/notes.c:758
msgid "finalize notes merge by committing unmerged notes"
-msgstr "finalitza la fusió de notes per cometre les notes sense fusionar"
+msgstr "finalitza la fusió de notes cometent les notes sense fusionar"
-#: builtin/notes.c:748
+#: builtin/notes.c:760
msgid "Aborting notes merge resolution"
msgstr "Avortant la resolució de fusió de notes"
-#: builtin/notes.c:750
+#: builtin/notes.c:762
msgid "abort notes merge"
msgstr "avorta la fusió de notes"
-#: builtin/notes.c:845
+#: builtin/notes.c:857
#, c-format
msgid "Object %s has no note\n"
msgstr "L'objecte %s no té cap nota\n"
-#: builtin/notes.c:857
+#: builtin/notes.c:869
msgid "attempt to remove non-existent note is not an error"
-msgstr "l'intent de treure una nota no existent no és un error"
+msgstr "l'intent d'eliminar una nota no existent no és un error"
-#: builtin/notes.c:860
+#: builtin/notes.c:872
msgid "read object names from the standard input"
msgstr "llegeix els noms d'objecte des de l'entrada estàndard"
-#: builtin/notes.c:941
+#: builtin/notes.c:953
msgid "notes-ref"
msgstr "referència de notes"
-#: builtin/notes.c:942
+#: builtin/notes.c:954
msgid "use notes from <notes_ref>"
msgstr "usa les notes de <referència de notes>"
-#: builtin/notes.c:977 builtin/remote.c:1624
+#: builtin/notes.c:989 builtin/remote.c:1621
#, c-format
msgid "Unknown subcommand: %s"
msgstr "Subordre desconegut: %s"
@@ -7825,7 +7846,7 @@ msgstr "Escrivint els objectes"
#: builtin/pack-objects.c:1015
msgid "disabling bitmap writing, as some objects are not being packed"
msgstr ""
-"deshabilitant l'escriptura de mapes de bits, perquè alguns objectes no "
+"inhabilitant l'escriptura de mapes de bits, perquè alguns objectes no "
"s'estan empaquetant"
#: builtin/pack-objects.c:2175
@@ -7835,7 +7856,7 @@ msgstr "Comprimint objectes"
#: builtin/pack-objects.c:2572
#, c-format
msgid "unsupported index version %s"
-msgstr "versió d'índex no suportada %s"
+msgstr "versió d'índex no compatible %s"
#: builtin/pack-objects.c:2576
#, c-format
@@ -7850,150 +7871,154 @@ msgstr "l'opció %s no accepta la forma negativa"
#: builtin/pack-objects.c:2603
#, c-format
msgid "unable to parse value '%s' for option %s"
-msgstr "incapaç d'analitzar el valor '%s' per a l'opció %s"
+msgstr "no s'ha pogut analitzar el valor '%s' per a l'opció %s"
-#: builtin/pack-objects.c:2622
+#: builtin/pack-objects.c:2623
msgid "do not show progress meter"
msgstr "no mostris l'indicador de progrés"
-#: builtin/pack-objects.c:2624
+#: builtin/pack-objects.c:2625
msgid "show progress meter"
msgstr "mostra l'indicador de progrés"
-#: builtin/pack-objects.c:2626
+#: builtin/pack-objects.c:2627
msgid "show progress meter during object writing phase"
-msgstr "mostra l'indicador de progrés durant el fase d'escriptura d'objectes"
+msgstr "mostra l'indicador de progrés durant la fase d'escriptura d'objectes"
-#: builtin/pack-objects.c:2629
+#: builtin/pack-objects.c:2630
msgid "similar to --all-progress when progress meter is shown"
msgstr "similar a --all-progress quan l'indicador de progrés es mostra"
-#: builtin/pack-objects.c:2630
+#: builtin/pack-objects.c:2631
msgid "version[,offset]"
msgstr "versió[,desplaçament]"
-#: builtin/pack-objects.c:2631
+#: builtin/pack-objects.c:2632
msgid "write the pack index file in the specified idx format version"
msgstr ""
"escriu el fitxer d'índex de paquet en la versió de format d'índex "
"especificada"
-#: builtin/pack-objects.c:2634
+#: builtin/pack-objects.c:2635
msgid "maximum size of each output pack file"
msgstr "mida màxima de cada fitxer de paquet de sortida"
-#: builtin/pack-objects.c:2636
+#: builtin/pack-objects.c:2637
msgid "ignore borrowed objects from alternate object store"
msgstr ""
"ignora els objectes prestats d'un emmagatzemament d'objectes alternatiu"
-#: builtin/pack-objects.c:2638
+#: builtin/pack-objects.c:2639
msgid "ignore packed objects"
msgstr "ignora els objectes empaquetats"
-#: builtin/pack-objects.c:2640
+#: builtin/pack-objects.c:2641
msgid "limit pack window by objects"
msgstr "limita la finestra d'empaquetament per objectes"
-#: builtin/pack-objects.c:2642
+#: builtin/pack-objects.c:2643
msgid "limit pack window by memory in addition to object limit"
msgstr ""
"limita la finestra d'empaquetament per memòria a més del límit d'objectes"
-#: builtin/pack-objects.c:2644
+#: builtin/pack-objects.c:2645
msgid "maximum length of delta chain allowed in the resulting pack"
-msgstr "longitud màxima de la cadena de deltes permesa en el paquet resultat"
+msgstr "longitud màxima de la cadena de deltes permesa en el paquet resultant"
-#: builtin/pack-objects.c:2646
+#: builtin/pack-objects.c:2647
msgid "reuse existing deltas"
msgstr "reusa les deltes existents"
-#: builtin/pack-objects.c:2648
+#: builtin/pack-objects.c:2649
msgid "reuse existing objects"
msgstr "reusa els objectes existents"
-#: builtin/pack-objects.c:2650
+#: builtin/pack-objects.c:2651
msgid "use OFS_DELTA objects"
msgstr "usa objectes OFS_DELTA"
-#: builtin/pack-objects.c:2652
+#: builtin/pack-objects.c:2653
msgid "use threads when searching for best delta matches"
msgstr "usa fils en cercar les millores coincidències de delta"
-#: builtin/pack-objects.c:2654
+#: builtin/pack-objects.c:2655
msgid "do not create an empty pack output"
msgstr "no creïs una emissió de paquet buida"
-#: builtin/pack-objects.c:2656
+#: builtin/pack-objects.c:2657
msgid "read revision arguments from standard input"
msgstr "llegeix els paràmetres de revisió des de l'entrada estàndard"
-#: builtin/pack-objects.c:2658
+#: builtin/pack-objects.c:2659
msgid "limit the objects to those that are not yet packed"
msgstr "limita els objectes als que encara no s'hagin empaquetat"
-#: builtin/pack-objects.c:2661
+#: builtin/pack-objects.c:2662
msgid "include objects reachable from any reference"
msgstr "inclou els objectes abastables de qualsevulla referència"
-#: builtin/pack-objects.c:2664
+#: builtin/pack-objects.c:2665
msgid "include objects referred by reflog entries"
msgstr ""</