From: Junio C Hamano Date: Fri, 9 Sep 2016 04:49:50 +0000 (-0700) Subject: Merge branch 'sb/submodule-clone-rr' X-Git-Tag: v2.11.0-rc0~172 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/02c6c14d6c304f094b680f583a1dd6e4fe75736c?hp=31224cbdc723d78a310b4cdbbd5abcfcbd44a4e5 Merge branch 'sb/submodule-clone-rr' "git clone --resurse-submodules --reference $path $URL" is a way to reduce network transfer cost by borrowing objects in an existing $path repository when cloning the superproject from $URL; it learned to also peek into $path for presense of corresponding repositories of submodules and borrow objects from there when able. * sb/submodule-clone-rr: clone: recursive and reference option triggers submodule alternates clone: implement optional references clone: clarify option_reference as required clone: factor out checking for an alternate path submodule--helper update-clone: allow multiple references submodule--helper module-clone: allow multiple references t7408: merge short tests, factor out testing method t7408: modernize style --- diff --git a/.mailmap b/.mailmap index a714e69a11..9441a54b0d 100644 --- a/.mailmap +++ b/.mailmap @@ -33,6 +33,7 @@ Cheng Renquan Chris Shoemaker Chris Wright Cord Seele +Christian Couder Christian Stimming Csaba Henk Dan Johnson diff --git a/Documentation/RelNotes/2.10.0.txt b/Documentation/RelNotes/2.10.0.txt index a9fb0736d6..f4da28ab66 100644 --- a/Documentation/RelNotes/2.10.0.txt +++ b/Documentation/RelNotes/2.10.0.txt @@ -71,15 +71,14 @@ UI, Workflows & Features command line option "--no-show-signature" to countermand it. (merge fce04c3 mj/log-show-signature-conf later to maint). - * A couple of "git svn" updates. - * More markings of messages for i18n, with updates to various tests to pass GETTEXT_POISON tests. * "git archive" learned to handle files that are larger than 8GB and commits far in the future than expressible by the traditional US-TAR format. - (merge 5caeeb8 jk/big-and-future-archive-tar later to maint). + (merge 560b0e8 jk/big-and-future-archive-tar later to maint). + * A new configuration variable core.sshCommand has been added to specify what value for GIT_SSH_COMMAND to use per repository. @@ -97,7 +96,6 @@ UI, Workflows & Features * "git status" learned to suggest "merge --abort" during a conflicted merge, just like it already suggests "rebase --abort" during a conflicted rebase. - (merge b0a61ab mm/status-suggest-merge-abort later to maint). * "git jump" script (in contrib/) has been updated a bit. (merge a91e692 jk/git-jump later to maint). @@ -105,6 +103,31 @@ UI, Workflows & Features * "git push" and "git clone" learned to give better progress meters to the end user who is waiting on the terminal. + * An entry "git log --decorate" for the tip of the current branch is + shown as "HEAD -> name" (where "name" is the name of the branch); + the arrow is now painted in the same color as "HEAD", not in the + color for commits. + + * "git format-patch" learned format.from configuration variable to + specify the default settings for its "--from" option. + + * "git am -3" calls "git merge-recursive" when it needs to fall back + to a three-way merge; this call has been turned into an internal + subroutine call instead of spawning a separate subprocess. + + * The command line completion scripts (in contrib/) now knows about + "git branch --delete/--move [--remote]". + (merge 2703c22 vs/completion-branch-fully-spelled-d-m-r later to maint). + + * "git rev-parse --git-path hooks/" learned to take + core.hooksPath configuration variable (introduced during 2.9 cycle) + into account. + (merge 9445b49 ab/hooks later to maint). + + * "git log --show-signature" and other commands that display the + verification status of PGP signature now shows the longer key-id, + as 32-bit key-id is so last century. + Performance, Internal Implementation, Development Support etc. @@ -120,19 +143,19 @@ Performance, Internal Implementation, Development Support etc. * "git upload-pack" command has been updated to use the parse-options API. - * The "git apply" standalone program is being libified; this is the - first step to move many state variables into a structure that can - be explicitly (re)initialized to make the machinery callable more - than once. + * The "git apply" standalone program is being libified; the first + step to move many state variables into a structure that can be + explicitly (re)initialized to make the machinery callable more + than once has been merged. * HTTP transport gained an option to produce more detailed debugging trace. (merge 73e57aa ep/http-curl-trace later to maint). - * Instead of taking advantage of a struct string_list that is - allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind, - initialize them explicitly as such, to document their behaviour - better. + * Instead of taking advantage of the fact that a struct string_list + that is allocated with all NULs happens to be the INIT_NODUP kind, + the users of string_list structures are taught to initialize them + explicitly as such, to document their behaviour better. (merge 2721ce2 jk/string-list-static-init later to maint). * HTTPd tests learned to show the server error log to help diagnosing @@ -157,7 +180,7 @@ Performance, Internal Implementation, Development Support etc. the standard output and the standard error of an external process, which is cumbersome to hand-roll correctly without deadlocking. - The codepath to sign data in a prepared buffer with GPG has been + * The codepath to sign data in a prepared buffer with GPG has been updated to use this API to read from the status-fd to check for errors (instead of relying on GPG's exit status). (merge efee955 jk/gpg-interface-cleanup later to maint). @@ -180,7 +203,6 @@ Performance, Internal Implementation, Development Support etc. * The .c/.h sources are marked as such in our .gitattributes file so that "git diff -W" and friends would work better. - (merge e82675a rs/help-c-source-with-gitattributes later to maint). * Code clean-up to avoid using a variable string that compilers may feel untrustable as printf-style format given to write_file() @@ -193,7 +215,6 @@ Performance, Internal Implementation, Development Support etc. library did not check all the functions from pthread libraries; recent FreeBSD has some functions in libc but not others, and we mistakenly thought linking with libc is enough when it is not. - (merge a9b02de ew/autoconf-pthread later to maint). * When "git fsck" reports a broken link (e.g. a tree object contains a blob that does not exist), both containing object and the object @@ -202,7 +223,6 @@ Performance, Internal Implementation, Development Support etc. the containing object from existing refs (e.g. "HEAD~24^2:file.txt"). * Allow http daemon tests in Travis CI tests. - (merge d9d1426 ls/travis-enable-httpd-tests later to maint). * Makefile assumed that -lrt is always available on platforms that want to use clock_gettime() and CLOCK_MONOTONIC, which is not a @@ -225,6 +245,17 @@ Performance, Internal Implementation, Development Support etc. * The API to iterate over all the refs (i.e. for_each_ref(), etc.) has been revamped. + * The handling of the "text=auto" attribute has been corrected. + $ echo "* text=auto eol=crlf" >.gitattributes + used to have the same effect as + $ echo "* text eol=crlf" >.gitattributes + i.e. declaring all files are text (ignoring "auto"). The + combination has been fixed to be equivalent to doing + $ git config core.autocrlf true + + * Documentation has been updated to show better example usage + of the updated "text=auto" attribute. + * A few tests that specifically target "git rebase -i" have been added. @@ -236,7 +267,6 @@ Performance, Internal Implementation, Development Support etc. to decide the set of supported options dynamically, which makes the code error-prone and hard to read. This has been corrected by tweaking the API to allocate and return a new copy of "struct option" array. - (merge 023ff39 jk/parse-options-concat later to maint). * "git fetch" exchanges batched have/ack messages between the sender and the receiver, initially doubling every time and then falling @@ -246,6 +276,46 @@ Performance, Internal Implementation, Development Support etc. repository. The internal mechanism learned to grow the window size more aggressively when working with the "smart http" transport. + * Tests for "git svn" have been taught to reuse the lib-httpd test + infrastructure when testing the subversion integration that + interacts with subversion repositories served over the http:// + protocol. + (merge a8a5d25 ew/git-svn-http-tests later to maint). + + * "git pack-objects" has a few options that tell it not to pack + objects found in certain packfiles, which require it to scan .idx + files of all available packs. The codepaths involved in these + operations have been optimized for a common case of not having any + non-local pack and/or any .kept pack. + + * The t3700 test about "add --chmod=-x" have been made a bit more + robust and generally cleaned up. + (merge 766cdc4 ib/t3700-add-chmod-x-updates later to maint). + + * The build procedure learned PAGER_ENV knob that lists what default + environment variable settings to export for popular pagers. This + mechanism is used to tweak the default settings to MORE on FreeBSD. + (merge 995bc22 ew/build-time-pager-tweaks later to maint). + + * The http-backend (the server-side component of smart-http + transport) used to trickle the HTTP header one at a time. Now + these write(2)s are batched. + (merge b36045c ew/http-backend-batch-headers later to maint). + + * When "git rebase" tries to compare set of changes on the updated + upstream and our own branch, it computes patch-id for all of these + changes and attempts to find matches. This has been optimized by + lazily computing the full patch-id (which is expensive) to be + compared only for changes that touch the same set of paths. + (merge ba67504 kw/patch-ids-optim later to maint). + + * A handful of tests that were broken under gettext-poison build have + been fixed. + + * The recent i18n patch we added during this cycle did a bit too much + refactoring of the messages to avoid word-legos; the repetition has + been reduced to help translators. + Also contains various documentation updates and code clean-ups. @@ -416,16 +486,13 @@ notes for details). "file" did not appear in the current commit. When "file" was created by renaming an existing file (but the change has not been committed), this restriction was unnecessarily tight. - (merge c66b470 mh/blame-worktree later to maint). * "git add -N dir/file && git write-tree" produced an incorrect tree when there are other paths in the same directory that sorts after "file". - (merge 6d6a782 nd/cache-tree-ita later to maint). * "git fetch http://user:pass@host/repo..." scrubbed the userinfo part, but "git push" didn't. - (merge 68f3c07 jk/push-scrub-url later to maint). * "git merge" with renormalization did not work well with merge-recursive, due to "safer crlf" conversion kicking in when it @@ -434,50 +501,41 @@ notes for details). * The use of strbuf in "git rm" to build filename to remove was a bit suboptimal, which has been fixed. - (merge deb8e15 rs/rm-strbuf-optim later to maint). * An age old bug that caused "git diff --ignore-space-at-eol" misbehave has been fixed. - (merge 044fb19 js/ignore-space-at-eol later to maint). * "git notes merge" had a code to see if a path exists (and fails if it does) and then open the path for writing (when it doesn't). Replace it with open with O_EXCL. - (merge deb9c15 rs/notes-merge-no-toctou later to maint). * "git pack-objects" and "git index-pack" mostly operate with off_t when talking about the offset of objects in a packfile, but there were a handful of places that used "unsigned long" to hold that value, leading to an unintended truncation. - (merge ec9d224 nd/pack-ofs-4gb-limit later to maint). * Recent update to "git daemon" tries to enable the socket-level KEEPALIVE, but when it is spawned via inetd, the standard input file descriptor may not necessarily be connected to a socket. Suppress an ENOTSOCK error from setsockopt(). - (merge fab6027 ew/daemon-socket-keepalive later to maint). * Recent FreeBSD stopped making perl available at /usr/bin/perl; switch the default the built-in path to /usr/local/bin/perl on not too ancient FreeBSD releases. - (merge 259f22a ew/find-perl-on-freebsd-in-local later to maint). * "git commit --help" said "--no-verify" is only about skipping the pre-commit hook, and failed to say that it also skipped the commit-msg hook. - (merge def480f os/no-verify-skips-commit-msg-too later to maint). * "git merge" in Git v2.9 was taught to forbid merging an unrelated lines of history by default, but that is exactly the kind of thing the "--rejoin" mode of "git subtree" (in contrib/) wants to do. "git subtree" has been taught to use the "--allow-unrelated-histories" option to override the default. - (merge 0f12c7d da/subtree-2.9-regression later to maint). * The build procedure for "git persistent-https" helper (in contrib/) has been updated so that it can be built with more recent versions of Go. - (merge accb613 pm/build-persistent-https-with-recent-go later to maint). * There is an optimization used in "git diff $treeA $treeB" to borrow an already checked-out copy in the working tree when it is known to @@ -488,23 +546,130 @@ notes for details). conversion (including the clean filter), which defeats the whole point of the optimization. The optimization has been disabled when the conversion is necessary. - (merge 06dec43 jk/diff-do-not-reuse-wtf-needs-cleaning later to maint). * "git -c grep.patternType=extended log --basic-regexp" misbehaved because the internal API to access the grep machinery was not designed well. - (merge 8465541 jc/grep-commandline-vs-configuration later to maint). + + * Windows port was failing some tests in t4130, due to the lack of + inum in the returned values by its lstat(2) emulation. + + * The reflog output format is documented better, and a new format + --date=unix to report the seconds-since-epoch (without timezone) + has been added. + (merge 442f6fd jk/reflog-date later to maint). + + * "git difftool ..." started in a subdirectory failed to + interpret the paths relative to that directory, which has been + fixed. + + * The characters in the label shown for tags/refs for commits in + "gitweb" output are now properly escaped for proper HTML output. + + * FreeBSD can lie when asked mtime of a directory, which made the + untracked cache code to fall back to a slow-path, which in turn + caused tests in t7063 to fail because it wanted to verify the + behaviour of the fast-path. + + * Squelch compiler warnings for nedmalloc (in compat/) library. + + * A small memory leak in the command line parsing of "git blame" + has been plugged. + + * The API documentation for hashmap was unclear if hashmap_entry + can be safely discarded without any other consideration. State + that it is safe to do so. + + * Not-so-recent rewrite of "git am" that started making internal + calls into the commit machinery had an unintended regression, in + that no matter how many seconds it took to apply many patches, the + resulting committer timestamp for the resulting commits were all + the same. + + * "git push --force-with-lease" already had enough logic to allow + ensuring that such a push results in creation of a ref (i.e. the + receiving end did not have another push from sideways that would be + discarded by our force-pushing), but didn't expose this possibility + to the users. It does so now. + (merge 9eed4f3 jk/push-force-with-lease-creation later to maint). + + * The mechanism to limit the pack window memory size, when packing is + done using multiple threads (which is the default), is per-thread, + but this was not documented clearly. + (merge 954176c ms/document-pack-window-memory-is-per-thread later to maint). + + * "import-tars" fast-import script (in contrib/) used to ignore a + hardlink target and replaced it with an empty file, which has been + corrected to record the same blob as the other file the hardlink is + shared with. + (merge 04e0869 js/import-tars-hardlinks later to maint). + + * "git mv dir non-existing-dir/" did not work in some environments + the same way as existing mainstream platforms. The code now moves + "dir" to "non-existing-dir", without relying on rename("A", "B/") + that strips the trailing slash of '/'. + (merge 189d035 js/mv-dir-to-new-directory later to maint). + + * The "t/" hierarchy is prone to get an unusual pathname; "make test" + has been taught to make sure they do not contain paths that cannot + be checked out on Windows (and the mechanism can be reusable to + catch pathnames that are not portable to other platforms as need + arises). + (merge c2cafd3 js/test-lint-pathname later to maint). + + * When "git merge-recursive" works on history with many criss-cross + merges in "verbose" mode, the names the command assigns to the + virtual merge bases could have overwritten each other by unintended + reuse of the same piece of memory. + (merge 5447a76 rs/pull-signed-tag later to maint). + + * "git checkout --detach " used to give the same advice + message as that is issued when "git checkout " (or anything + that is not a branch name) is given, but asking with "--detach" is + an explicit enough sign that the user knows what is going on. The + advice message has been squelched in this case. + (merge 779b88a sb/checkout-explit-detach-no-advice later to maint). + + * "git difftool" by default ignores the error exit from the backend + commands it spawns, because often they signal that they found + differences by exiting with a non-zero status code just like "diff" + does; the exit status codes 126 and above however are special in + that they are used to signal that the command is not executable, + does not exist, or killed by a signal. "git difftool" has been + taught to notice these exit status codes. + (merge 45a4f5d jk/difftool-command-not-found later to maint). + + * On Windows, help.browser configuration variable used to be ignored, + which has been corrected. + (merge 6db5967 js/no-html-bypass-on-windows later to maint). + + * The "git -c var[=val] cmd" facility to append a configuration + variable definition at the end of the search order was described in + git(1) manual page, but not in git-config(1), which was more likely + place for people to look for when they ask "can I make a one-shot + override, and if so how?" + (merge ae1f709 dg/document-git-c-in-git-config-doc later to maint). + + * The tempfile (hence its user lockfile) API lets the caller to open + a file descriptor to a temporary file, write into it and then + finalize it by first closing the filehandle and then either + removing or renaming the temporary file. When the process spawns a + subprocess after obtaining the file descriptor, and if the + subprocess has not exited when the attempt to remove or rename is + made, the last step fails on Windows, because the subprocess has + the file descriptor still open. Open tempfile with O_CLOEXEC flag + to avoid this (on Windows, this is mapped to O_NOINHERIT). + (merge 05d1ed6 bw/mingw-avoid-inheriting-fd-to-lockfile later to maint). + + * Correct an age-old calco (is that a typo-like word for calc) + in the documentation. + (merge 7841c48 ls/packet-line-protocol-doc-fix later to maint). * Other minor clean-ups and documentation updates - (merge e51b0df pb/commit-editmsg-path later to maint). - (merge b333d0d jk/send-pack-stdio later to maint). - (merge fcf0fe9 lf/sideband-returns-void later to maint). - (merge c2691e2 ah/unpack-trees-advice-messages later to maint). - (merge c61b2af lf/recv-sideband-cleanup later to maint). - (merge 31471ba rs/use-strbuf-addbuf later to maint). - (merge 503e224 nd/test-helpers later to maint). - (merge 16726cf jc/doc-diff-filter-exclude later to maint). - (merge fd2e7da rs/worktree-use-strbuf-absolute-path later to maint). - (merge 406621f sb/submodule-deinit-all later to maint). - (merge 55cbe18 rs/submodule-config-code-cleanup later to maint). - (merge 280abfd sb/pack-protocol-doc-nak later to maint). + (merge 02a8cfa rs/merge-add-strategies-simplification later to maint). + (merge af4941d rs/merge-recursive-string-list-init later to maint). + (merge 1eb47f1 rs/use-strbuf-add-unique-abbrev later to maint). + (merge ddd0bfa jk/tighten-alloc later to maint). + (merge ecf30b2 rs/mailinfo-lib later to maint). + (merge 0eb75ce sg/reflog-past-root later to maint). + (merge 4369523 hv/doc-commit-reference-style later to maint). diff --git a/Documentation/RelNotes/2.3.10.txt b/Documentation/RelNotes/2.3.10.txt index 9d425d814d..20c2d2cacc 100644 --- a/Documentation/RelNotes/2.3.10.txt +++ b/Documentation/RelNotes/2.3.10.txt @@ -7,7 +7,7 @@ Fixes since v2.3.9 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.4.10.txt b/Documentation/RelNotes/2.4.10.txt index 8621199bc6..702d8d4e22 100644 --- a/Documentation/RelNotes/2.4.10.txt +++ b/Documentation/RelNotes/2.4.10.txt @@ -7,7 +7,7 @@ Fixes since v2.4.9 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.5.4.txt b/Documentation/RelNotes/2.5.4.txt index a5e8477a4a..b8a2f93ee7 100644 --- a/Documentation/RelNotes/2.5.4.txt +++ b/Documentation/RelNotes/2.5.4.txt @@ -7,7 +7,7 @@ Fixes since v2.5.4 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.6.1.txt b/Documentation/RelNotes/2.6.1.txt index 1e51363e3c..f37ea89cda 100644 --- a/Documentation/RelNotes/2.6.1.txt +++ b/Documentation/RelNotes/2.6.1.txt @@ -7,7 +7,7 @@ Fixes since v2.6 * xdiff code we use to generate diffs is not prepared to handle extremely large files. It uses "int" in many places, which can overflow if we have a very large number of lines or even bytes in - our input files, for example. Cap the input size to soemwhere + our input files, for example. Cap the input size to somewhere around 1GB for now. * Some protocols (like git-remote-ext) can execute arbitrary code diff --git a/Documentation/RelNotes/2.9.3.txt b/Documentation/RelNotes/2.9.3.txt index 28003a54ef..695b86f612 100644 --- a/Documentation/RelNotes/2.9.3.txt +++ b/Documentation/RelNotes/2.9.3.txt @@ -55,4 +55,116 @@ Fixes since v2.9.2 * A test that unconditionally used "mktemp" learned that the command is not necessarily available everywhere. + * "git blame file" allowed the lineage of lines in the uncommitted, + unadded contents of "file" to be inspected, but it refused when + "file" did not appear in the current commit. When "file" was + created by renaming an existing file (but the change has not been + committed), this restriction was unnecessarily tight. + + * "git add -N dir/file && git write-tree" produced an incorrect tree + when there are other paths in the same directory that sorts after + "file". + + * "git fetch http://user:pass@host/repo..." scrubbed the userinfo + part, but "git push" didn't. + + * An age old bug that caused "git diff --ignore-space-at-eol" + misbehave has been fixed. + + * "git notes merge" had a code to see if a path exists (and fails if + it does) and then open the path for writing (when it doesn't). + Replace it with open with O_EXCL. + + * "git pack-objects" and "git index-pack" mostly operate with off_t + when talking about the offset of objects in a packfile, but there + were a handful of places that used "unsigned long" to hold that + value, leading to an unintended truncation. + + * Recent update to "git daemon" tries to enable the socket-level + KEEPALIVE, but when it is spawned via inetd, the standard input + file descriptor may not necessarily be connected to a socket. + Suppress an ENOTSOCK error from setsockopt(). + + * Recent FreeBSD stopped making perl available at /usr/bin/perl; + switch the default the built-in path to /usr/local/bin/perl on not + too ancient FreeBSD releases. + + * "git status" learned to suggest "merge --abort" during a conflicted + merge, just like it already suggests "rebase --abort" during a + conflicted rebase. + + * The .c/.h sources are marked as such in our .gitattributes file so + that "git diff -W" and friends would work better. + + * Existing autoconf generated test for the need to link with pthread + library did not check all the functions from pthread libraries; + recent FreeBSD has some functions in libc but not others, and we + mistakenly thought linking with libc is enough when it is not. + + * Allow http daemon tests in Travis CI tests. + + * Users of the parse_options_concat() API function need to allocate + extra slots in advance and fill them with OPT_END() when they want + to decide the set of supported options dynamically, which makes the + code error-prone and hard to read. This has been corrected by tweaking + the API to allocate and return a new copy of "struct option" array. + + * The use of strbuf in "git rm" to build filename to remove was a bit + suboptimal, which has been fixed. + + * "git commit --help" said "--no-verify" is only about skipping the + pre-commit hook, and failed to say that it also skipped the + commit-msg hook. + + * "git merge" in Git v2.9 was taught to forbid merging an unrelated + lines of history by default, but that is exactly the kind of thing + the "--rejoin" mode of "git subtree" (in contrib/) wants to do. + "git subtree" has been taught to use the "--allow-unrelated-histories" + option to override the default. + + * The build procedure for "git persistent-https" helper (in contrib/) + has been updated so that it can be built with more recent versions + of Go. + + * There is an optimization used in "git diff $treeA $treeB" to borrow + an already checked-out copy in the working tree when it is known to + be the same as the blob being compared, expecting that open/mmap of + such a file is faster than reading it from the object store, which + involves inflating and applying delta. This however kicked in even + when the checked-out copy needs to go through the convert-to-git + conversion (including the clean filter), which defeats the whole + point of the optimization. The optimization has been disabled when + the conversion is necessary. + + * "git -c grep.patternType=extended log --basic-regexp" misbehaved + because the internal API to access the grep machinery was not + designed well. + + * Windows port was failing some tests in t4130, due to the lack of + inum in the returned values by its lstat(2) emulation. + + * The characters in the label shown for tags/refs for commits in + "gitweb" output are now properly escaped for proper HTML output. + + * FreeBSD can lie when asked mtime of a directory, which made the + untracked cache code to fall back to a slow-path, which in turn + caused tests in t7063 to fail because it wanted to verify the + behaviour of the fast-path. + + * Squelch compiler warnings for netmalloc (in compat/) library. + + * The API documentation for hashmap was unclear if hashmap_entry + can be safely discarded without any other consideration. State + that it is safe to do so. + + * Not-so-recent rewrite of "git am" that started making internal + calls into the commit machinery had an unintended regression, in + that no matter how many seconds it took to apply many patches, the + resulting committer timestamp for the resulting commits were all + the same. + + * "git difftool ..." started in a subdirectory failed to + interpret the paths relative to that directory, which has been + fixed. + Also contains minor documentation updates and code clean-ups. diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index e8ad978824..500230c054 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -121,6 +121,11 @@ its behaviour. Try to make sure your explanation can be understood without external resources. Instead of giving a URL to a mailing list archive, summarize the relevant points of the discussion. +If you want to reference a previous commit in the history of a stable +branch use the format "abbreviated sha1 (subject, date)". So for example +like this: "Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30) +noticed [...]". + (3) Generate your patch using Git tools out of your commits. diff --git a/Documentation/config.txt b/Documentation/config.txt index e2571ea8ea..32f065ca6a 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1253,6 +1253,16 @@ format.attach:: value as the boundary. See the --attach option in linkgit:git-format-patch[1]. +format.from:: + Provides the default value for the `--from` option to format-patch. + Accepts a boolean value, or a name and email address. If false, + format-patch defaults to `--no-from`, using commit authors directly in + the "From:" field of patch mails. If true, format-patch defaults to + `--from`, using your committer identity in the "From:" field of patch + mails and including a "From:" field in the body of the patch mail if + different. If set to a non-boolean value, format-patch uses that + value instead of your committer identity. Defaults to false. + format.numbered:: A boolean which can enable or disable sequence numbers in patch subjects. It defaults to "auto" which enables it only if there @@ -2507,6 +2517,12 @@ receive.unpackLimit:: especially on slow filesystems. If not set, the value of `transfer.unpackLimit` is used instead. +receive.maxInputSize:: + If the size of the incoming pack stream is larger than this + limit, then git-receive-pack will error out, instead of + accepting the pack file. If not set or set to 0, then the size + is unlimited. + receive.denyDeletes:: If set to true, git-receive-pack will deny a ref update that deletes the ref. Use this to prevent such a ref deletion via a push. diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index f163113a6f..83f86b9231 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -263,6 +263,9 @@ The files are read in the order given above, with last value found taking precedence over values read earlier. When multiple values are taken then all values of a key from all files will be used. +You may override individual configuration parameters when running any git +command by using the `-c` option. See linkgit:git[1] for details. + All writing options will per default write to the repository specific configuration file. Note that this also affects options like `--replace-all` and `--unset`. *'git config' will only ever change one file at a time*. diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt index 7a4e055520..1b4b65d665 100644 --- a/Documentation/git-index-pack.txt +++ b/Documentation/git-index-pack.txt @@ -87,6 +87,8 @@ OPTIONS Specifying 0 will cause Git to auto-detect the number of CPU's and use maximum 3 threads. +--max-input-size=:: + Die, if the pack is larger than . Note ---- diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index 078b556665..0d933ac355 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -159,8 +159,7 @@ not accessible in the working tree. + is the attribute that is used when checking out or committing, it is either "", "-text", "text", "text=auto", "text eol=lf", "text eol=crlf". -Note: Currently Git does not support "text=auto eol=lf" or "text=auto eol=crlf", -that may change in the future. +Since Git 2.10 "text=auto eol=lf" and "text=auto eol=crlf" are supported. + Both the in the index ("i/") and in the working tree ("w/") are shown for regular files, diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 19cdcd0341..8973510a41 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -104,8 +104,8 @@ base-name:: out of memory with a large window, but still be able to take advantage of the large window for the smaller objects. The size can be suffixed with "k", "m", or "g". - `--window-memory=0` makes memory usage unlimited, which is the - default. + `--window-memory=0` makes memory usage unlimited. The default + is taken from the `pack.windowMemory` configuration variable. --max-pack-size=:: Maximum size of each output pack file. The size can be suffixed with diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index ec514f6cd5..47b77e693b 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -204,10 +204,11 @@ branch we have for it. + `--force-with-lease=:` will protect the named ref (alone), if it is going to be updated, by requiring its current value to be -the same as the specified value (which is allowed to be +the same as the specified value `` (which is allowed to be different from the remote-tracking branch we have for the refname, or we do not even have to have such a remote-tracking branch when -this form is used). +this form is used). If `` is the empty string, then the named ref +must not already exist. + Note that all forms other than `--force-with-lease=:` that specifies the expected current value of the ref explicitly are diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt index 000ee8dba2..0ccd5fbc78 100644 --- a/Documentation/git-receive-pack.txt +++ b/Documentation/git-receive-pack.txt @@ -33,6 +33,9 @@ post-update hooks found in the Documentation/howto directory. option, which tells it if updates to a ref should be denied if they are not fast-forwards. +A number of other receive.* config options are available to tweak +its behavior, see linkgit:git-config[1]. + OPTIONS ------- :: diff --git a/Documentation/git-remote-fd.txt b/Documentation/git-remote-fd.txt index e700bafa47..80afca866c 100644 --- a/Documentation/git-remote-fd.txt +++ b/Documentation/git-remote-fd.txt @@ -17,7 +17,7 @@ fetch, push or archive. If only is given, it is assumed to be a bidirectional socket connected to remote Git server (git-upload-pack, git-receive-pack or -git-upload-achive). If both and are given, they are assumed +git-upload-archive). If both and are given, they are assumed to be pipes connected to a remote Git server ( being the inbound pipe and being the outbound pipe. diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt index c5975234f4..26afe6ed54 100644 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@ -100,8 +100,10 @@ other objects in that pack they already have locally. out of memory with a large window, but still be able to take advantage of the large window for the smaller objects. The size can be suffixed with "k", "m", or "g". - `--window-memory=0` makes memory usage unlimited, which is the - default. + `--window-memory=0` makes memory usage unlimited. The default + is taken from the `pack.windowMemory` configuration variable. + Note that the actual memory usage will be the limit multiplied + by the number of threads used by linkgit:git-pack-objects[1]. --max-pack-size=:: Maximum size of each output pack file. The size can be suffixed with diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index e1e8f57cdd..725065ef2d 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -32,11 +32,14 @@ OPTIONS --branch:: Show the branch and tracking info even in short-format. ---porcelain:: +--porcelain[=]:: Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details. ++ +The version parameter is used to specify the format version. +This is optional and defaults to the original version 'v1' format. --long:: Give the output in the long-format. This is the default. @@ -96,7 +99,7 @@ configuration variable documented in linkgit:git-config[1]. -z:: Terminate entries with NUL, instead of LF. This implies - the `--porcelain` output format if no other format is given. + the `--porcelain=v1` output format if no other format is given. --column[=]:: --no-column:: @@ -180,12 +183,12 @@ in which case `XY` are `!!`. If -b is used the short-format status is preceded by a line -## branchname tracking info + ## branchname tracking info -Porcelain Format -~~~~~~~~~~~~~~~~ +Porcelain Format Version 1 +~~~~~~~~~~~~~~~~~~~~~~~~~~ -The porcelain format is similar to the short format, but is guaranteed +Version 1 porcelain format is similar to the short format, but is guaranteed not to change in a backwards-incompatible way between Git versions or based on user configuration. This makes it ideal for parsing by scripts. The description of the short format above also describes the porcelain @@ -207,6 +210,124 @@ field from the first filename). Third, filenames containing special characters are not specially formatted; no quoting or backslash-escaping is performed. +Porcelain Format Version 2 +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Version 2 format adds more detailed information about the state of +the worktree and changed items. Version 2 also defines an extensible +set of easy to parse optional headers. + +Header lines start with "#" and are added in response to specific +command line arguments. Parsers should ignore headers they +don't recognize. + +### Branch Headers + +If `--branch` is given, a series of header lines are printed with +information about the current branch. + + Line Notes + ------------------------------------------------------------ + # branch.oid | (initial) Current commit. + # branch.head | (detached) Current branch. + # branch.upstream If upstream is set. + # branch.ab + - If upstream is set and + the commit is present. + ------------------------------------------------------------ + +### Changed Tracked Entries + +Following the headers, a series of lines are printed for tracked +entries. One of three different line formats may be used to describe +an entry depending on the type of change. Tracked entries are printed +in an undefined order; parsers should allow for a mixture of the 3 +line types in any order. + +Ordinary changed entries have the following format: + + 1 + +Renamed or copied entries have the following format: + + 2 + + Field Meaning + -------------------------------------------------------- + A 2 character field containing the staged and + unstaged XY values described in the short format, + with unchanged indicated by a "." rather than + a space. + A 4 character field describing the submodule state. + "N..." when the entry is not a submodule. + "S" when the entry is a submodule. + is "C" if the commit changed; otherwise ".". + is "M" if it has tracked changes; otherwise ".". + is "U" if there are untracked changes; otherwise ".". + The octal file mode in HEAD. + The octal file mode in the index. + The octal file mode in the worktree. + The object name in HEAD. + The object name in the index. + The rename or copy score (denoting the percentage + of similarity between the source and target of the + move or copy). For example "R100" or "C75". + The pathname. In a renamed/copied entry, this + is the path in the index and in the working tree. + When the `-z` option is used, the 2 pathnames are separated + with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) + byte separates them. + The pathname in the commit at HEAD. This is only + present in a renamed/copied entry, and tells + where the renamed/copied contents came from. + -------------------------------------------------------- + +Unmerged entries have the following format; the first character is +a "u" to distinguish from ordinary changed entries. + + u

+ + Field Meaning + -------------------------------------------------------- + A 2 character field describing the conflict type + as described in the short format. + A 4 character field describing the submodule state + as described above. + The octal file mode in stage 1. + The octal file mode in stage 2. + The octal file mode in stage 3. + The octal file mode in the worktree. +

The object name in stage 1. +

The object name in stage 2. +

The object name in stage 3. + The pathname. + -------------------------------------------------------- + +### Other Items + +Following the tracked entries (and if requested), a series of +lines will be printed for untracked and then ignored items +found in the worktree. + +Untracked items have the following format: + + ? + +Ignored items have the following format: + + ! + +### Pathname Format Notes and -z + +When the `-z` option is given, pathnames are printed as is and +without any quoting and lines are terminated with a NUL (ASCII 0x00) +byte. + +Otherwise, all pathnames will be "C-quoted" if they contain any tab, +linefeed, double quote, or backslash characters. In C-quoting, these +characters will be replaced with the corresponding C-style escape +sequences and the resulting pathname will be double quoted. + + CONFIGURATION ------------- diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt index 3e887d1610..b3de50d710 100644 --- a/Documentation/git-unpack-objects.txt +++ b/Documentation/git-unpack-objects.txt @@ -44,6 +44,9 @@ OPTIONS --strict:: Don't write objects with broken content or links. +--max-input-size=:: + Die, if the pack is larger than . + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git.txt b/Documentation/git.txt index f4dfc9d42c..7913fc2513 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,9 +43,15 @@ 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.9.2/git.html[documentation for release 2.9.2] +* link:v2.10.0/git.html[documentation for release 2.10] * release notes for + link:RelNotes/2.10.0.txt[2.10]. + +* link:v2.9.3/git.html[documentation for release 2.9.3] + +* release notes for + link:RelNotes/2.9.3.txt[2.9.3], link:RelNotes/2.9.2.txt[2.9.2], link:RelNotes/2.9.1.txt[2.9.1], link:RelNotes/2.9.0.txt[2.9]. diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index b40068bdfd..7aff940202 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -133,7 +133,7 @@ Set to string value "auto":: When `text` is set to "auto", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its line endings are converted to LF on checkin. - When the file has been commited with CRLF, no conversion is done. + When the file has been committed with CRLF, no conversion is done. Unspecified:: @@ -182,23 +182,6 @@ While Git normally leaves file contents alone, it can be configured to normalize line endings to LF in the repository and, optionally, to convert them to CRLF when files are checked out. -Here is an example that will make Git normalize .txt, .vcproj and .sh -files, ensure that .vcproj files have CRLF and .sh files have LF in -the working directory, and prevent .jpg files from being normalized -regardless of their content. - ------------------------- -* text=auto -*.txt text -*.vcproj text eol=crlf -*.sh text eol=lf -*.jpg -text ------------------------- - -Other source code management systems normalize all text files in their -repositories, and there are two ways to enable similar automatic -normalization in Git. - If you simply want to have CRLF line endings in your working directory regardless of the repository you are working with, you can set the config variable "core.autocrlf" without using any attributes. @@ -208,35 +191,42 @@ config variable "core.autocrlf" without using any attributes. autocrlf = true ------------------------ -This does not force normalization of all text files, but does ensure +This does not force normalization of text files, but does ensure that text files that you introduce to the repository have their line endings normalized to LF when they are added, and that files that are already normalized in the repository stay normalized. -If you want to interoperate with a source code management system that -enforces end-of-line normalization, or you simply want all text files -in your repository to be normalized, you should instead set the `text` -attribute to "auto" for _all_ files. +If you want to ensure that text files that any contributor introduces to +the repository have their line endings normalized, you can set the +`text` attribute to "auto" for _all_ files. ------------------------ * text=auto ------------------------ -This ensures that all files that Git considers to be text will have -normalized (LF) line endings in the repository. The `core.eol` -configuration variable controls which line endings Git will use for -normalized files in your working directory; the default is to use the -native line ending for your platform, or CRLF if `core.autocrlf` is -set. +The attributes allow a fine-grained control, how the line endings +are converted. +Here is an example that will make Git normalize .txt, .vcproj and .sh +files, ensure that .vcproj files have CRLF and .sh files have LF in +the working directory, and prevent .jpg files from being normalized +regardless of their content. + +------------------------ +* text=auto +*.txt text +*.vcproj text eol=crlf +*.sh text eol=lf +*.jpg -text +------------------------ + +NOTE: When `text=auto` conversion is enabled in a cross-platform +project using push and pull to a central repository the text files +containing CRLFs should be normalized. -NOTE: When `text=auto` normalization is enabled in an existing -repository, any text files containing CRLFs should be normalized. If -they are not they will be normalized the next time someone tries to -change them, causing unfortunate misattribution. From a clean working -directory: +From a clean working directory: ------------------------------------------------- -$ echo "* text=auto" >>.gitattributes +$ echo "* text=auto" >.gitattributes $ rm .git/index # Remove the index to force Git to $ git reset # re-scan the working directory $ git status # Show files that will be normalized @@ -377,6 +367,11 @@ substitution. For example: smudge = git-p4-filter --smudge %f ------------------------ +Note that "%f" is the name of the path that is being worked on. Depending +on the version that is being filtered, the corresponding file on disk may +not exist, or may have different contents. So, smudge and clean commands +should not try to access the file on disk, but only act as filters on the +content provided to them on standard input. Interaction between checkin/checkout attributes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Documentation/gitk.txt b/Documentation/gitk.txt index a68d860fa3..e382dd96df 100644 --- a/Documentation/gitk.txt +++ b/Documentation/gitk.txt @@ -70,7 +70,7 @@ linkgit:git-rev-list[1] for a complete list. --left-right:: - Mark which side of a symmetric diff a commit is reachable + Mark which side of a symmetric difference a commit is reachable from. Commits from the left side are prefixed with a `<` symbol and those from the right with a `>` symbol. diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index 07cdd73ab2..10dcc08ff9 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -79,6 +79,11 @@ submodule..ignore:: "--ignore-submodule" option. The 'git submodule' commands are not affected by this setting. +submodule..shallow:: + When set to true, a clone of this submodule will be performed as a + shallow clone unless the user explicitly asks for a non-shallow + clone. + EXAMPLES -------- diff --git a/Documentation/gitrevisions.txt b/Documentation/gitrevisions.txt index e903eb7860..27dec5b91d 100644 --- a/Documentation/gitrevisions.txt +++ b/Documentation/gitrevisions.txt @@ -15,9 +15,9 @@ DESCRIPTION Many Git commands take revision parameters as arguments. Depending on the command, they denote a specific commit or, for commands which -walk the revision graph (such as linkgit:git-log[1]), all commits which can -be reached from that commit. In the latter case one can also specify a -range of revisions explicitly. +walk the revision graph (such as linkgit:git-log[1]), all commits which are +reachable from that commit. For commands that walk the revision graph one can +also specify a range of revisions explicitly. In addition, some Git commands (such as linkgit:git-show[1]) also take revision parameters which denote other objects than commits, e.g. blobs diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 29b19b992f..a942d57f73 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -147,8 +147,14 @@ endif::git-rev-list[] "U" for a good signature with unknown validity and "N" for no signature - '%GS': show the name of the signer for a signed commit - '%GK': show the key used to sign a signed commit -- '%gD': reflog selector, e.g., `refs/stash@{1}` -- '%gd': shortened reflog selector, e.g., `stash@{1}` +- '%gD': reflog selector, e.g., `refs/stash@{1}` or + `refs/stash@{2 minutes ago`}; the format follows the rules described + for the `-g` option. The portion before the `@` is the refname as + given on the command line (so `git log -g refs/heads/master` would + yield `refs/heads/master@{0}`). +- '%gd': shortened reflog selector; same as `%gD`, but the refname + portion is shortened for human readability (so `refs/heads/master` + becomes just `master`). - '%gn': reflog identity name - '%gN': reflog identity name (respecting .mailmap, see linkgit:git-shortlog[1] or linkgit:git-blame[1]) @@ -166,7 +172,7 @@ endif::git-rev-list[] respecting the `auto` settings of the former if we are going to a terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring on the next placeholders until the color is switched again. -- '%m': left, right or boundary mark +- '%m': left (`<`), right (`>`) or boundary (`-`) mark - '%n': newline - '%%': a raw '%' - '%x00': print a byte from a hex code diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index f39cb6d4f5..7e462d3841 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -225,7 +225,7 @@ excluded from the output. --left-only:: --right-only:: - List only commits on the respective side of a symmetric range, + List only commits on the respective side of a symmetric difference, i.e. only those which would be marked `<` resp. `>` by `--left-right`. + @@ -252,10 +252,25 @@ list. + With `--pretty` format other than `oneline` (for obvious reasons), this causes the output to have two extra lines of information -taken from the reflog. By default, 'commit@\{Nth}' notation is -used in the output. When the starting commit is specified as -'commit@\{now}', output also uses 'commit@\{timestamp}' notation -instead. Under `--pretty=oneline`, the commit message is +taken from the reflog. The reflog designator in the output may be shown +as `ref@{Nth}` (where `Nth` is the reverse-chronological index in the +reflog) or as `ref@{timestamp}` (with the timestamp for that entry), +depending on a few rules: ++ +-- +1. If the starting point is specified as `ref@{Nth}`, show the index +format. ++ +2. If the starting point was specified as `ref@{now}`, show the +timestamp format. ++ +3. If neither was used, but `--date` was given on the command line, show +the timestamp in the format requested by `--date`. ++ +4. Otherwise, show the index format. +-- ++ +Under `--pretty=oneline`, the commit message is prefixed with this information on the same line. This option cannot be combined with `--reverse`. See also linkgit:git-reflog[1]. @@ -714,8 +729,8 @@ include::pretty-options.txt[] `iso-local`), the user's local time zone is used instead. + `--date=relative` shows dates relative to the current time, -e.g. ``2 hours ago''. The `-local` option cannot be used with -`--raw` or `--relative`. +e.g. ``2 hours ago''. The `-local` option has no effect for +`--date=relative`. + `--date=local` is an alias for `--date=default-local`. + @@ -735,7 +750,18 @@ format, often found in email messages. + `--date=short` shows only the date, but not the time, in `YYYY-MM-DD` format. + -`--date=raw` shows the date in the internal raw Git format `%s %z` format. +`--date=raw` shows the date as seconds since the epoch (1970-01-01 +00:00:00 UTC), followed by a space, and then the timezone as an offset +from UTC (a `+` or `-` with four digits; the first two are hours, and +the second two are minutes). I.e., as if the timestamp were formatted +with `strftime("%s %z")`). +Note that the `-local` option does not affect the seconds-since-epoch +value (which is always measured in UTC), but does switch the accompanying +timezone value. ++ +`--date=unix` shows the date as a Unix epoch timestamp (seconds since +1970). As with `--raw`, this is always in UTC and therefore `-local` +has no effect. + `--date=format:...` feeds the format `...` to your system `strftime`. Use `--date=format:%c` to show the date in your system locale's @@ -770,7 +796,7 @@ ifdef::git-rev-list[] endif::git-rev-list[] --left-right:: - Mark which side of a symmetric diff a commit is reachable from. + Mark which side of a symmetric difference a commit is reachable from. Commits from the left side are prefixed with `<` and those from the right with `>`. If combined with `--boundary`, those commits are prefixed with `-`. diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index abae363983..4bed5b1ab7 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -237,48 +237,74 @@ SPECIFYING RANGES ----------------- History traversing commands such as `git log` operate on a set -of commits, not just a single commit. To these commands, -specifying a single revision with the notation described in the -previous section means the set of commits reachable from that -commit, following the commit ancestry chain. - -To exclude commits reachable from a commit, a prefix '{caret}' -notation is used. E.g. '{caret}r1 r2' means commits reachable -from 'r2' but exclude the ones reachable from 'r1'. - -This set operation appears so often that there is a shorthand -for it. When you have two commits 'r1' and 'r2' (named according -to the syntax explained in SPECIFYING REVISIONS above), you can ask -for commits that are reachable from r2 excluding those that are reachable -from r1 by '{caret}r1 r2' and it can be written as 'r1..r2'. - -A similar notation 'r1\...r2' is called symmetric difference -of 'r1' and 'r2' and is defined as -'r1 r2 --not $(git merge-base --all r1 r2)'. -It is the set of commits that are reachable from either one of -'r1' or 'r2' but not from both. - -In these two shorthands, you can omit one end and let it default to HEAD. +of commits, not just a single commit. + +For these commands, +specifying a single revision, using the notation described in the +previous section, means the set of commits `reachable` from the given +commit. + +A commit's reachable set is the commit itself and the commits in +its ancestry chain. + + +Commit Exclusions +~~~~~~~~~~~~~~~~~ + +'{caret}' (caret) Notation:: + To exclude commits reachable from a commit, a prefix '{caret}' + notation is used. E.g. '{caret}r1 r2' means commits reachable + from 'r2' but exclude the ones reachable from 'r1' (i.e. 'r1' and + its ancestors). + +Dotted Range Notations +~~~~~~~~~~~~~~~~~~~~~~ + +The '..' (two-dot) Range Notation:: + The '{caret}r1 r2' set operation appears so often that there is a shorthand + for it. When you have two commits 'r1' and 'r2' (named according + to the syntax explained in SPECIFYING REVISIONS above), you can ask + for commits that are reachable from r2 excluding those that are reachable + from r1 by '{caret}r1 r2' and it can be written as 'r1..r2'. + +The '...' (three dot) Symmetric Difference Notation:: + A similar notation 'r1\...r2' is called symmetric difference + of 'r1' and 'r2' and is defined as + 'r1 r2 --not $(git merge-base --all r1 r2)'. + It is the set of commits that are reachable from either one of + 'r1' (left side) or 'r2' (right side) but not from both. + +In these two shorthand notations, you can omit one end and let it default to HEAD. For example, 'origin..' is a shorthand for 'origin..HEAD' and asks "What did I do since I forked from the origin branch?" Similarly, '..origin' is a shorthand for 'HEAD..origin' and asks "What did the origin do since I forked from them?" Note that '..' would mean 'HEAD..HEAD' which is an empty range that is both reachable and unreachable from HEAD. -Two other shorthands for naming a set that is formed by a commit -and its parent commits exist. The 'r1{caret}@' notation means all -parents of 'r1'. 'r1{caret}!' includes commit 'r1' but excludes -all of its parents. +Other {caret} Parent Shorthand Notations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Two other shorthands exist, particularly useful for merge commits, +for naming a set that is formed by a commit and its parent commits. + +The 'r1{caret}@' notation means all parents of 'r1'. + +The 'r1{caret}!' notation includes commit 'r1' but excludes all of its parents. +By itself, this notation denotes the single commit 'r1'. + +While '{caret}' was about specifying a single commit parent, these +two notations consider all its parents. For example you can say +'HEAD{caret}2{caret}@', however you cannot say 'HEAD{caret}@{caret}2'. -To summarize: +Revision Range Summary +---------------------- '':: - Include commits that are reachable from (i.e. ancestors of) - . + Include commits that are reachable from (i.e. and its + ancestors). '{caret}':: - Exclude commits that are reachable from (i.e. ancestors of) - . + Exclude commits that are reachable from (i.e. and its + ancestors). '..':: Include commits that are reachable from but exclude @@ -300,16 +326,27 @@ To summarize: as giving commit '' and then all its parents prefixed with '{caret}' to exclude them (and their ancestors). -Here are a handful of examples: - - D G H D - D F G H I J D F - ^G D H D - ^D B E I J F B - B..C C - B...C G H D E B C - ^D B C E I J F B C - C I J F C - C^@ I J F - C^! C - F^! D G H D F +Here are a handful of examples using the Loeliger illustration above, +with each step in the notation's expansion and selection carefully +spelt out: + + Args Expanded arguments Selected commits + D G H D + D F G H I J D F + ^G D H D + ^D B E I J F B + ^D B C E I J F B C + C I J F C + B..C = ^B C C + B...C = B ^F C G H D E B C + C^@ = C^1 + = F I J F + B^@ = B^1 B^2 B^3 + = D E F D G H E F I J + C^! = C ^C^@ + = C ^C^1 + = C ^F C + B^! = B ^B^@ + = B ^B^1 ^B^2 ^B^3 + = B ^D ^E ^F B + F^! D = F ^I ^J D G H D F diff --git a/Documentation/technical/api-hashmap.txt b/Documentation/technical/api-hashmap.txt index ad7a5bddd2..28f5a8b715 100644 --- a/Documentation/technical/api-hashmap.txt +++ b/Documentation/technical/api-hashmap.txt @@ -104,6 +104,11 @@ If `free_entries` is true, each hashmap_entry in the map is freed as well `entry` points to the entry to initialize. + `hash` is the hash code of the entry. ++ +The hashmap_entry structure does not hold references to external resources, +and it is safe to just discard it once you are done with it (i.e. if +your structure was allocated with xmalloc(), you can just free(3) it, +and if it is on stack, you can just let it go out of scope). `void *hashmap_get(const struct hashmap *map, const void *key, const void *keydata)`:: diff --git a/Documentation/technical/protocol-common.txt b/Documentation/technical/protocol-common.txt index bf30167ae3..ecedb34bba 100644 --- a/Documentation/technical/protocol-common.txt +++ b/Documentation/technical/protocol-common.txt @@ -67,9 +67,9 @@ with non-binary data the same whether or not they contain the trailing LF (stripping the LF if present, and not complaining when it is missing). -The maximum length of a pkt-line's data component is 65520 bytes. -Implementations MUST NOT send pkt-line whose length exceeds 65524 -(65520 bytes of payload + 4 bytes of length data). +The maximum length of a pkt-line's data component is 65516 bytes. +Implementations MUST NOT send pkt-line whose length exceeds 65520 +(65516 bytes of payload + 4 bytes of length data). Implementations SHOULD NOT send an empty pkt-line ("0004"). diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0fe02a6ce2..6754ab076e 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v2.9.0.GIT +DEF_VER=v2.10.0 LF=' ' diff --git a/Makefile b/Makefile index 6a13386c27..d96ecb7141 100644 --- a/Makefile +++ b/Makefile @@ -370,6 +370,14 @@ all:: # Define HAVE_BSD_SYSCTL if your platform has a BSD-compatible sysctl function. # # Define HAVE_GETDELIM if your system has the getdelim() function. +# +# Define PAGER_ENV to a SP separated VAR=VAL pairs to define +# default environment variables to be passed when a pager is spawned, e.g. +# +# PAGER_ENV = LESS=FRX LV=-c +# +# to say "export LESS=FRX (and LV=-c) if the environment variable +# LESS (and LV) is not set, respectively". GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN @@ -755,6 +763,7 @@ LIB_OBJS += merge.o LIB_OBJS += merge-blobs.o LIB_OBJS += merge-recursive.o LIB_OBJS += mergesort.o +LIB_OBJS += mru.o LIB_OBJS += name-hash.o LIB_OBJS += notes.o LIB_OBJS += notes-cache.o @@ -1500,6 +1509,10 @@ ifeq ($(PYTHON_PATH),) NO_PYTHON = NoThanks endif +ifndef PAGER_ENV +PAGER_ENV = LESS=FRX LV=-c +endif + QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir QUIET_SUBDIR1 = @@ -1629,6 +1642,11 @@ ifdef DEFAULT_HELP_FORMAT BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"' endif +PAGER_ENV_SQ = $(subst ','\'',$(PAGER_ENV)) +PAGER_ENV_CQ = "$(subst ",\",$(subst \,\\,$(PAGER_ENV)))" +PAGER_ENV_CQ_SQ = $(subst ','\'',$(PAGER_ENV_CQ)) +BASIC_CFLAGS += -DPAGER_ENV='$(PAGER_ENV_CQ_SQ)' + ALL_CFLAGS += $(BASIC_CFLAGS) ALL_LDFLAGS += $(BASIC_LDFLAGS) @@ -1753,7 +1771,7 @@ common-cmds.h: $(wildcard Documentation/git-*.txt) SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\ $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ - $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP) + $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV) define cmd_munge_script $(RM) $@ $@+ && \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ @@ -1766,6 +1784,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \ -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ -e 's|@@SANE_TEXT_GREP@@|$(SANE_TEXT_GREP)|g' \ + -e 's|@@PAGER_ENV@@|$(PAGER_ENV_SQ)|g' \ $@.sh >$@+ endef @@ -2173,6 +2192,7 @@ GIT-BUILD-OPTIONS: FORCE @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@+ @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@+ @echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@+ + @echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+ ifdef TEST_OUTPUT_DIRECTORY @echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@+ endif diff --git a/archive-tar.c b/archive-tar.c index 55682404d5..380e3aedd2 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -213,9 +213,9 @@ static void prepare_header(struct archiver_args *args, xsnprintf(header->chksum, sizeof(header->chksum), "%07o", ustar_header_chksum(header)); } -static int write_extended_header(struct archiver_args *args, - const unsigned char *sha1, - const void *buffer, unsigned long size) +static void write_extended_header(struct archiver_args *args, + const unsigned char *sha1, + const void *buffer, unsigned long size) { struct ustar_header header; unsigned int mode; @@ -226,7 +226,6 @@ static int write_extended_header(struct archiver_args *args, prepare_header(args, &header, mode, size); write_blocked(&header, sizeof(header)); write_blocked(buffer, size); - return 0; } static int write_tar_entry(struct archiver_args *args, @@ -305,12 +304,8 @@ static int write_tar_entry(struct archiver_args *args, prepare_header(args, &header, mode, size_in_header); if (ext_header.len > 0) { - err = write_extended_header(args, sha1, ext_header.buf, - ext_header.len); - if (err) { - free(buffer); - return err; - } + write_extended_header(args, sha1, ext_header.buf, + ext_header.len); } strbuf_release(&ext_header); write_blocked(&header, sizeof(header)); diff --git a/archive.c b/archive.c index 42df9748d6..dde1ab4c79 100644 --- a/archive.c +++ b/archive.c @@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const char **argv, argc = parse_options(argc, argv, NULL, opts, archive_usage, 0); if (remote) - die("Unexpected option --remote"); + die(_("Unexpected option --remote")); if (exec) - die("Option --exec can only be used together with --remote"); + die(_("Option --exec can only be used together with --remote")); if (output) - die("Unexpected option --output"); + die(_("Unexpected option --output")); if (!base) base = ""; @@ -484,14 +484,14 @@ static int parse_archive_args(int argc, const char **argv, usage_with_options(archive_usage, opts); *ar = lookup_archiver(format); if (!*ar || (is_remote && !((*ar)->flags & ARCHIVER_REMOTE))) - die("Unknown archive format '%s'", format); + die(_("Unknown archive format '%s'"), format); args->compression_level = Z_DEFAULT_COMPRESSION; if (compression_level != -1) { if ((*ar)->flags & ARCHIVER_WANT_COMPRESSION_LEVELS) args->compression_level = compression_level; else { - die("Argument not supported for format '%s': -%d", + die(_("Argument not supported for format '%s': -%d"), format, compression_level); } } diff --git a/builtin/am.c b/builtin/am.c index b77bf11ace..739b34dcf2 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1578,48 +1578,19 @@ static int build_fake_ancestor(const struct am_state *state, const char *index_f return 0; } -/** - * Do the three-way merge using fake ancestor, their tree constructed - * from the fake ancestor and the postimage of the patch, and our - * state. - */ -static int run_fallback_merge_recursive(const struct am_state *state, - unsigned char *orig_tree, - unsigned char *our_tree, - unsigned char *their_tree) -{ - struct child_process cp = CHILD_PROCESS_INIT; - int status; - - cp.git_cmd = 1; - - argv_array_pushf(&cp.env_array, "GITHEAD_%s=%.*s", - sha1_to_hex(their_tree), linelen(state->msg), state->msg); - if (state->quiet) - argv_array_push(&cp.env_array, "GIT_MERGE_VERBOSITY=0"); - - argv_array_push(&cp.args, "merge-recursive"); - argv_array_push(&cp.args, sha1_to_hex(orig_tree)); - argv_array_push(&cp.args, "--"); - argv_array_push(&cp.args, sha1_to_hex(our_tree)); - argv_array_push(&cp.args, sha1_to_hex(their_tree)); - - status = run_command(&cp) ? (-1) : 0; - discard_cache(); - read_cache(); - return status; -} - /** * Attempt a threeway merge, using index_path as the temporary index. */ static int fall_back_threeway(const struct am_state *state, const char *index_path) { - unsigned char orig_tree[GIT_SHA1_RAWSZ], their_tree[GIT_SHA1_RAWSZ], - our_tree[GIT_SHA1_RAWSZ]; + struct object_id orig_tree, their_tree, our_tree; + const struct object_id *bases[1] = { &orig_tree }; + struct merge_options o; + struct commit *result; + char *their_tree_name; - if (get_sha1("HEAD", our_tree) < 0) - hashcpy(our_tree, EMPTY_TREE_SHA1_BIN); + if (get_oid("HEAD", &our_tree) < 0) + hashcpy(our_tree.hash, EMPTY_TREE_SHA1_BIN); if (build_fake_ancestor(state, index_path)) return error("could not build fake ancestor"); @@ -1627,7 +1598,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa discard_cache(); read_cache_from(index_path); - if (write_index_as_tree(orig_tree, &the_index, index_path, 0, NULL)) + if (write_index_as_tree(orig_tree.hash, &the_index, index_path, 0, NULL)) return error(_("Repository lacks necessary blobs to fall back on 3-way merge.")); say(state, stdout, _("Using index info to reconstruct a base tree...")); @@ -1643,7 +1614,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa init_revisions(&rev_info, NULL); rev_info.diffopt.output_format = DIFF_FORMAT_NAME_STATUS; diff_opt_parse(&rev_info.diffopt, &diff_filter_str, 1, rev_info.prefix); - add_pending_sha1(&rev_info, "HEAD", our_tree, 0); + add_pending_sha1(&rev_info, "HEAD", our_tree.hash, 0); diff_setup_done(&rev_info.diffopt); run_diff_index(&rev_info, 1); } @@ -1652,7 +1623,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa return error(_("Did you hand edit your patch?\n" "It does not apply to blobs recorded in its index.")); - if (write_index_as_tree(their_tree, &the_index, index_path, 0, NULL)) + if (write_index_as_tree(their_tree.hash, &the_index, index_path, 0, NULL)) return error("could not write tree"); say(state, stdout, _("Falling back to patching base and 3-way merge...")); @@ -1668,11 +1639,22 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa * changes. */ - if (run_fallback_merge_recursive(state, orig_tree, our_tree, their_tree)) { + init_merge_options(&o); + + o.branch1 = "HEAD"; + their_tree_name = xstrfmt("%.*s", linelen(state->msg), state->msg); + o.branch2 = their_tree_name; + + if (state->quiet) + o.verbosity = 0; + + if (merge_recursive_generic(&o, &our_tree, &their_tree, 1, bases, &result)) { rerere(state->allow_rerere_autoupdate); + free(their_tree_name); return error(_("Failed to merge in the changes.")); } + free(their_tree_name); return 0; } @@ -1840,6 +1822,8 @@ static void am_run(struct am_state *state, int resume) const char *mail = am_path(state, msgnum(state)); int apply_status; + reset_ident_date(); + if (!file_exists(mail)) goto next; diff --git a/builtin/blame.c b/builtin/blame.c index ab66cde2c2..a5bbf91e49 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2244,7 +2244,8 @@ static void verify_working_tree_path(struct commit *work_tree, const char *path) pos = cache_name_pos(path, strlen(path)); if (pos >= 0) ; /* path is in the index */ - else if (!strcmp(active_cache[-1 - pos]->name, path)) + else if (-1 - pos < active_nr && + !strcmp(active_cache[-1 - pos]->name, path)) ; /* path is in the index, unmerged */ else die("no such path '%s' in HEAD", path); @@ -2633,6 +2634,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix) case DATE_RAW: blame_date_width = sizeof("1161298804 -0700"); break; + case DATE_UNIX: + blame_date_width = sizeof("1161298804"); + break; case DATE_SHORT: blame_date_width = sizeof("2006-10-19"); break; @@ -2805,7 +2809,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix) lno = prepare_lines(&sb); if (lno && !range_list.nr) - string_list_append(&range_list, xstrdup("1")); + string_list_append(&range_list, "1"); anchor = 1; range_set_init(&ranges, range_list.nr); diff --git a/builtin/checkout.c b/builtin/checkout.c index 27c1a05246..8672d0724f 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -567,10 +567,13 @@ static int merge_working_tree(const struct checkout_opts *opts, o.ancestor = old->name; o.branch1 = new->name; o.branch2 = "local"; - merge_trees(&o, new->commit->tree, work, + ret = merge_trees(&o, new->commit->tree, work, old->commit->tree, &result); + if (ret < 0) + exit(128); ret = reset_tree(new->commit->tree, opts, 0, writeout_error); + strbuf_release(&o.obuf); if (ret) return ret; } @@ -655,7 +658,8 @@ static void update_refs_for_switch(const struct checkout_opts *opts, update_ref(msg.buf, "HEAD", new->commit->object.oid.hash, NULL, REF_NODEREF, UPDATE_REFS_DIE_ON_ERR); if (!opts->quiet) { - if (old->path && advice_detached_head) + if (old->path && + advice_detached_head && !opts->force_detach) detach_advice(new->name); describe_detached_head(_("HEAD is now at"), new->commit); } @@ -703,8 +707,7 @@ static int add_pending_uninteresting_ref(const char *refname, static void describe_one_orphan(struct strbuf *sb, struct commit *commit) { strbuf_addstr(sb, " "); - strbuf_addstr(sb, - find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV)); + strbuf_add_unique_abbrev(sb, commit->object.oid.hash, DEFAULT_ABBREV); strbuf_addch(sb, ' '); if (!parse_commit(commit)) pp_commit_easy(CMIT_FMT_ONELINE, commit, sb); diff --git a/builtin/commit.c b/builtin/commit.c index 77e3dc8494..bb9f79b6ef 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -142,14 +142,24 @@ static int show_ignored_in_status, have_option_m; static const char *only_include_assumed; static struct strbuf message = STRBUF_INIT; -static enum status_format { - STATUS_FORMAT_NONE = 0, - STATUS_FORMAT_LONG, - STATUS_FORMAT_SHORT, - STATUS_FORMAT_PORCELAIN, +static enum wt_status_format status_format = STATUS_FORMAT_UNSPECIFIED; - STATUS_FORMAT_UNSPECIFIED -} status_format = STATUS_FORMAT_UNSPECIFIED; +static int opt_parse_porcelain(const struct option *opt, const char *arg, int unset) +{ + enum wt_status_format *value = (enum wt_status_format *)opt->value; + if (unset) + *value = STATUS_FORMAT_NONE; + else if (!arg) + *value = STATUS_FORMAT_PORCELAIN; + else if (!strcmp(arg, "v1") || !strcmp(arg, "1")) + *value = STATUS_FORMAT_PORCELAIN; + else if (!strcmp(arg, "v2") || !strcmp(arg, "2")) + *value = STATUS_FORMAT_PORCELAIN_V2; + else + die("unsupported porcelain version '%s'", arg); + + return 0; +} static int opt_parse_m(const struct option *opt, const char *arg, int unset) { @@ -500,24 +510,13 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int s->fp = fp; s->nowarn = nowarn; s->is_initial = get_sha1(s->reference, sha1) ? 1 : 0; + if (!s->is_initial) + hashcpy(s->sha1_commit, sha1); + s->status_format = status_format; + s->ignore_submodule_arg = ignore_submodule_arg; wt_status_collect(s); - - switch (status_format) { - case STATUS_FORMAT_SHORT: - wt_shortstatus_print(s); - break; - case STATUS_FORMAT_PORCELAIN: - wt_porcelain_print(s); - break; - case STATUS_FORMAT_UNSPECIFIED: - die("BUG: finalize_deferred_config() should have been called"); - break; - case STATUS_FORMAT_NONE: - case STATUS_FORMAT_LONG: - wt_status_print(s); - break; - } + wt_status_print(s); return s->commitable; } @@ -1099,7 +1098,7 @@ static const char *read_commit_message(const char *name) * is not in effect here. */ static struct status_deferred_config { - enum status_format status_format; + enum wt_status_format status_format; int show_branch; } status_deferred_config = { STATUS_FORMAT_UNSPECIFIED, @@ -1109,6 +1108,7 @@ static struct status_deferred_config { static void finalize_deferred_config(struct wt_status *s) { int use_deferred_config = (status_format != STATUS_FORMAT_PORCELAIN && + status_format != STATUS_FORMAT_PORCELAIN_V2 && !s->null_termination); if (s->null_termination) { @@ -1336,9 +1336,9 @@ int cmd_status(int argc, const char **argv, const char *prefix) N_("show status concisely"), STATUS_FORMAT_SHORT), OPT_BOOL('b', "branch", &s.show_branch, N_("show branch information")), - OPT_SET_INT(0, "porcelain", &status_format, - N_("machine-readable output"), - STATUS_FORMAT_PORCELAIN), + { OPTION_CALLBACK, 0, "porcelain", &status_format, + N_("version"), N_("machine-readable output"), + PARSE_OPT_OPTARG, opt_parse_porcelain }, OPT_SET_INT(0, "long", &status_format, N_("show status in long format (default)"), STATUS_FORMAT_LONG), @@ -1380,7 +1380,13 @@ int cmd_status(int argc, const char **argv, const char *prefix) fd = hold_locked_index(&index_lock, 0); s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0; + if (!s.is_initial) + hashcpy(s.sha1_commit, sha1); + s.ignore_submodule_arg = ignore_submodule_arg; + s.status_format = status_format; + s.verbose = verbose; + wt_status_collect(&s); if (0 <= fd) @@ -1389,23 +1395,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) if (s.relative_paths) s.prefix = prefix; - switch (status_format) { - case STATUS_FORMAT_SHORT: - wt_shortstatus_print(&s); - break; - case STATUS_FORMAT_PORCELAIN: - wt_porcelain_print(&s); - break; - case STATUS_FORMAT_UNSPECIFIED: - die("BUG: finalize_deferred_config() should have been called"); - break; - case STATUS_FORMAT_NONE: - case STATUS_FORMAT_LONG: - s.verbose = verbose; - s.ignore_submodule_arg = ignore_submodule_arg; - wt_status_print(&s); - break; - } + wt_status_print(&s); return 0; } diff --git a/builtin/config.c b/builtin/config.c index a991a53418..6cbf73369b 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -25,7 +25,6 @@ static char term = '\n'; static int use_global_config, use_system_config, use_local_config; static struct git_config_source given_config_source; static int actions, types; -static const char *get_color_slot, *get_colorbool_slot; static int end_null; static int respect_includes = -1; static int show_origin; diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index e5658c320e..ac84e99f3a 100644 --- a/builtin/fmt-merge-msg.c +++ b/builtin/fmt-merge-msg.c @@ -272,7 +272,7 @@ static int cmp_string_list_util_as_integral(const void *a_, const void *b_) static void add_people_count(struct strbuf *out, struct string_list *people) { if (people->nr == 1) - strbuf_addf(out, "%s", people->items[0].string); + strbuf_addstr(out, people->items[0].string); else if (people->nr == 2) strbuf_addf(out, "%s (%d) and %s (%d)", people->items[0].string, diff --git a/builtin/help.c b/builtin/help.c index 88480131cf..49f7a07f85 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -37,8 +37,10 @@ static int show_all = 0; static int show_guides = 0; static unsigned int colopts; static enum help_format help_format = HELP_FORMAT_NONE; +static int exclude_guides; static struct option builtin_help_options[] = { OPT_BOOL('a', "all", &show_all, N_("print all available commands")), + OPT_HIDDEN_BOOL(0, "exclude-guides", &exclude_guides, N_("exclude guides")), OPT_BOOL('g', "guides", &show_guides, N_("print list of useful guides")), OPT_SET_INT('m', "man", &help_format, N_("show man page"), HELP_FORMAT_MAN), OPT_SET_INT('w', "web", &help_format, N_("show manual in web browser"), @@ -379,17 +381,10 @@ static void get_html_page_path(struct strbuf *page_path, const char *page) free(to_free); } -/* - * If open_html is not defined in a platform-specific way (see for - * example compat/mingw.h), we use the script web--browse to display - * HTML. - */ -#ifndef open_html static void open_html(const char *path) { execl_git_cmd("web--browse", "-c", "help.browser", path, (char *)NULL); } -#endif static void show_html_page(const char *git_cmd) { @@ -433,10 +428,29 @@ static void list_common_guides_help(void) putchar('\n'); } +static const char *check_git_cmd(const char* cmd) +{ + char *alias; + + if (is_git_command(cmd)) + return cmd; + + alias = alias_lookup(cmd); + if (alias) { + printf_ln(_("`git %s' is aliased to `%s'"), cmd, alias); + free(alias); + exit(0); + } + + if (exclude_guides) + return help_unknown_cmd(cmd); + + return cmd; +} + int cmd_help(int argc, const char **argv, const char *prefix) { int nongit; - char *alias; enum help_format parsed_help_format; argc = parse_options(argc, argv, prefix, builtin_help_options, @@ -476,12 +490,7 @@ int cmd_help(int argc, const char **argv, const char *prefix) if (help_format == HELP_FORMAT_NONE) help_format = parse_help_format(DEFAULT_HELP_FORMAT); - alias = alias_lookup(argv[0]); - if (alias && !is_git_command(argv[0])) { - printf_ln(_("`git %s' is aliased to `%s'"), argv[0], alias); - free(alias); - return 0; - } + argv[0] = check_git_cmd(argv[0]); switch (help_format) { case HELP_FORMAT_NONE: diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 1d2ea583a4..4a8b4aebba 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -87,6 +87,7 @@ static struct progress *progress; static unsigned char input_buffer[4096]; static unsigned int input_offset, input_len; static off_t consumed_bytes; +static off_t max_input_size; static unsigned deepest_delta; static git_SHA_CTX input_ctx; static uint32_t input_crc32; @@ -297,6 +298,8 @@ static void use(int bytes) if (signed_add_overflows(consumed_bytes, bytes)) die(_("pack too large for current definition of off_t")); consumed_bytes += bytes; + if (max_input_size && consumed_bytes > max_input_size) + die(_("pack exceeds maximum allowed size")); } static const char *open_pack_file(const char *pack_name) @@ -1714,6 +1717,8 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) opts.off32_limit = strtoul(c+1, &c, 0); if (*c || opts.off32_limit & 0x80000000) die(_("bad %s"), arg); + } else if (skip_prefix(arg, "--max-input-size=", &arg)) { + max_input_size = strtoumax(arg, NULL, 10); } else usage(index_pack_usage); continue; diff --git a/builtin/log.c b/builtin/log.c index fd1652f52b..49aa534f4a 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -719,6 +719,7 @@ static void add_header(const char *value) static int thread; static int do_signoff; static int base_auto; +static char *from; static const char *signature = git_version_string; static const char *signature_file; static int config_cover_letter; @@ -807,6 +808,17 @@ static int git_format_config(const char *var, const char *value, void *cb) base_auto = git_config_bool(var, value); return 0; } + if (!strcmp(var, "format.from")) { + int b = git_config_maybe_bool(var, value); + free(from); + if (b < 0) + from = xstrdup(value); + else if (b) + from = xstrdup(git_committer_info(IDENT_NO_DATE)); + else + from = NULL; + return 0; + } return git_log_config(var, value, cb); } @@ -1331,7 +1343,7 @@ static void prepare_bases(struct base_tree_info *bases, struct object_id *patch_id; if (commit->util) continue; - if (commit_patch_id(commit, &diffopt, sha1)) + if (commit_patch_id(commit, &diffopt, sha1, 0)) die(_("cannot get patch id")); ALLOC_GROW(bases->patch_id, bases->nr_patch_id + 1, bases->alloc_patch_id); patch_id = bases->patch_id + bases->nr_patch_id; @@ -1384,7 +1396,6 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) int quiet = 0; int reroll_count = -1; char *branch_name = NULL; - char *from = NULL; char *base_commit = NULL; struct base_tree_info bases; @@ -1665,16 +1676,16 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) /* nothing to do */ return 0; total = nr; - if (!keep_subject && auto_number && total > 1) - numbered = 1; - if (numbered) - rev.total = total + start_number - 1; if (cover_letter == -1) { if (config_cover_letter == COVER_AUTO) cover_letter = (total > 1); else cover_letter = (config_cover_letter == COVER_ON); } + if (!keep_subject && auto_number && (total > 1 || cover_letter)) + numbered = 1; + if (numbered) + rev.total = total + start_number - 1; if (!signature) { ; /* --no-signature inhibits all signatures */ diff --git a/builtin/ls-files.c b/builtin/ls-files.c index f02e3d23bb..00ea91aae6 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -118,7 +118,8 @@ static void show_killed_files(struct dir_struct *dir) */ pos = cache_name_pos(ent->name, ent->len); if (0 <= pos) - die("bug in show-killed-files"); + die("BUG: killed-file %.*s not found", + ent->len, ent->name); pos = -pos - 1; while (pos < active_nr && ce_stage(active_cache[pos])) diff --git a/builtin/merge.c b/builtin/merge.c index 19b3bc2f2f..0ae099f746 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -30,6 +30,7 @@ #include "fmt-merge-msg.h" #include "gpg-interface.h" #include "sequencer.h" +#include "string-list.h" #define DEFAULT_TWOHEAD (1<<0) #define DEFAULT_OCTOPUS (1<<1) @@ -673,6 +674,8 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common, hold_locked_index(&lock, 1); clean = merge_recursive(&o, head, remoteheads->item, reversed, &result); + if (clean < 0) + exit(128); if (active_cache_changed && write_locked_index(&the_index, &lock, COMMIT_LOCK)) die (_("unable to write %s"), get_index_file()); @@ -703,42 +706,17 @@ static int count_unmerged_entries(void) return ret; } -static void split_merge_strategies(const char *string, struct strategy **list, - int *nr, int *alloc) -{ - char *p, *q, *buf; - - if (!string) - return; - - buf = xstrdup(string); - q = buf; - for (;;) { - p = strchr(q, ' '); - if (!p) { - ALLOC_GROW(*list, *nr + 1, *alloc); - (*list)[(*nr)++].name = xstrdup(q); - free(buf); - return; - } else { - *p = '\0'; - ALLOC_GROW(*list, *nr + 1, *alloc); - (*list)[(*nr)++].name = xstrdup(q); - q = ++p; - } - } -} - static void add_strategies(const char *string, unsigned attr) { - struct strategy *list = NULL; - int list_alloc = 0, list_nr = 0, i; - - memset(&list, 0, sizeof(list)); - split_merge_strategies(string, &list, &list_nr, &list_alloc); - if (list) { - for (i = 0; i < list_nr; i++) - append_strategy(get_strategy(list[i].name)); + int i; + + if (string) { + struct string_list list = STRING_LIST_INIT_DUP; + struct string_list_item *item; + string_list_split(&list, string, ' ', -1); + for_each_string_list_item(item, &list) + append_strategy(get_strategy(item->string)); + string_list_clear(&list, 0); return; } for (i = 0; i < ARRAY_SIZE(all_strategy); i++) diff --git a/builtin/mv.c b/builtin/mv.c index a2014266b6..446a316738 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -104,7 +104,7 @@ static int index_range_of_same_dir(const char *src, int length, int cmd_mv(int argc, const char **argv, const char *prefix) { - int i, gitmodules_modified = 0; + int i, flags, gitmodules_modified = 0; int verbose = 0, show_only = 0, force = 0, ignore_errors = 0; struct option builtin_mv_options[] = { OPT__VERBOSE(&verbose, N_("be verbose")), @@ -134,10 +134,13 @@ int cmd_mv(int argc, const char **argv, const char *prefix) modes = xcalloc(argc, sizeof(enum update_mode)); /* * Keep trailing slash, needed to let - * "git mv file no-such-dir/" error out. + * "git mv file no-such-dir/" error out, except in the case + * "git mv directory no-such-dir/". */ - dest_path = internal_copy_pathspec(prefix, argv + argc, 1, - KEEP_TRAILING_SLASH); + flags = KEEP_TRAILING_SLASH; + if (argc == 1 && is_directory(argv[0]) && !is_directory(argv[1])) + flags = 0; + dest_path = internal_copy_pathspec(prefix, argv + argc, 1, flags); submodule_gitfile = xcalloc(argc, sizeof(char *)); if (dest_path[0][0] == '\0') diff --git a/builtin/notes.c b/builtin/notes.c index 0572051762..f848b89692 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -91,7 +91,7 @@ static const char * const git_notes_get_ref_usage[] = { }; static const char note_template[] = - "\nWrite/edit the notes for the following object:\n"; + N_("Write/edit the notes for the following object:"); struct note_data { int given; @@ -179,7 +179,8 @@ static void prepare_note_data(const unsigned char *object, struct note_data *d, copy_obj_to_fd(fd, old_note); strbuf_addch(&buf, '\n'); - strbuf_add_commented_lines(&buf, note_template, strlen(note_template)); + strbuf_add_commented_lines(&buf, "\n", strlen("\n")); + strbuf_add_commented_lines(&buf, _(note_template), strlen(_(note_template))); strbuf_addch(&buf, '\n'); write_or_die(fd, buf.buf, buf.len); diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 92e2e5f7a8..4a63398960 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -46,6 +46,7 @@ static int keep_unreachable, unpack_unreachable, include_tag; static unsigned long unpack_unreachable_expiration; static int pack_loose_unreachable; static int local; +static int have_non_local_packs; static int incremental; static int ignore_packed_keep; static int allow_ofs_delta; @@ -978,6 +979,23 @@ static int want_object_in_pack(const unsigned char *sha1, return 1; if (incremental) return 0; + + /* + * When asked to do --local (do not include an + * object that appears in a pack we borrow + * from elsewhere) or --honor-pack-keep (do not + * include an object that appears in a pack marked + * with .keep), we need to make sure no copy of this + * object come from in _any_ pack that causes us to + * omit it, and need to complete this loop. When + * neither option is in effect, we know the object + * we just found is going to be packed, so break + * out of the loop to return 1 now. + */ + if (!ignore_packed_keep && + (!local || !have_non_local_packs)) + break; + if (local && !p->pack_local) return 0; if (ignore_packed_keep && p->pack_local && p->pack_keep) @@ -2784,6 +2802,28 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) progress = 2; prepare_packed_git(); + if (ignore_packed_keep) { + struct packed_git *p; + for (p = packed_git; p; p = p->next) + if (p->pack_local && p->pack_keep) + break; + if (!p) /* no keep-able packs found */ + ignore_packed_keep = 0; + } + if (local) { + /* + * unlike ignore_packed_keep above, we do not want to + * unset "local" based on looking at packs, as it + * also covers non-local objects + */ + struct packed_git *p; + for (p = packed_git; p; p = p->next) { + if (!p->pack_local) { + have_non_local_packs = 1; + break; + } + } + } if (progress) progress_state = start_progress(_("Counting objects"), 0); diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 92e1213ecc..f1ce05ce28 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -46,6 +46,7 @@ static int transfer_unpack_limit = -1; static int advertise_atomic_push = 1; static int advertise_push_options; static int unpack_limit = 100; +static off_t max_input_size; static int report_status; static int use_sideband; static int use_atomic; @@ -212,6 +213,11 @@ static int receive_pack_config(const char *var, const char *value, void *cb) return 0; } + if (strcmp(var, "receive.maxinputsize") == 0) { + max_input_size = git_config_int64(var, value); + return 0; + } + return git_default_config(var, value, cb); } @@ -1478,11 +1484,9 @@ static struct command **queue_command(struct command **tail, refname = line + 82; reflen = linelen - 82; - cmd = xcalloc(1, st_add3(sizeof(struct command), reflen, 1)); + FLEX_ALLOC_MEM(cmd, ref_name, refname, reflen); hashcpy(cmd->old_sha1, old_sha1); hashcpy(cmd->new_sha1, new_sha1); - memcpy(cmd->ref_name, refname, reflen); - cmd->ref_name[reflen] = '\0'; *tail = cmd; return &cmd->next; } @@ -1650,6 +1654,9 @@ static const char *unpack(int err_fd, struct shallow_info *si) if (fsck_objects) argv_array_pushf(&child.args, "--strict%s", fsck_msg_types.buf); + if (max_input_size) + argv_array_pushf(&child.args, "--max-input-size=%"PRIuMAX, + (uintmax_t)max_input_size); child.no_stdout = 1; child.err = err_fd; child.git_cmd = 1; @@ -1678,6 +1685,9 @@ static const char *unpack(int err_fd, struct shallow_info *si) fsck_msg_types.buf); if (!reject_thin) argv_array_push(&child.args, "--fix-thin"); + if (max_input_size) + argv_array_pushf(&child.args, "--max-input-size=%"PRIuMAX, + (uintmax_t)max_input_size); child.out = -1; child.err = err_fd; child.git_cmd = 1; diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index c961b74c5a..76cf05e2ad 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -469,7 +469,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix) (stop_at_non_option ? PARSE_OPT_STOP_AT_NON_OPTION : 0) | PARSE_OPT_SHELL_EVAL); - strbuf_addf(&parsed, " --"); + strbuf_addstr(&parsed, " --"); sq_quote_argv(&parsed, argv, 0); puts(parsed.buf); return 0; diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index a3667578b4..9d79f1994a 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -444,8 +444,7 @@ static int module_name(int argc, const char **argv, const char *prefix) static int clone_submodule(const char *path, const char *gitdir, const char *url, const char *depth, struct string_list *reference, int quiet) { - struct child_process cp; - child_process_init(&cp); + struct child_process cp = CHILD_PROCESS_INIT; argv_array_push(&cp.args, "clone"); argv_array_push(&cp.args, "--no-checkout"); @@ -858,8 +857,12 @@ static int update_clone_get_next_task(struct child_process *child, if (index < suc->failed_clones_nr) { int *p; ce = suc->failed_clones[index]; - if (!prepare_to_clone_next_submodule(ce, child, suc, err)) - die("BUG: ce was a submodule before?"); + if (!prepare_to_clone_next_submodule(ce, child, suc, err)) { + suc->current ++; + strbuf_addf(err, "BUG: submodule considered for cloning," + "doesn't need cloning any more?\n"); + return 0; + } p = xmalloc(sizeof(*p)); *p = suc->current; *idx_task_cb = p; @@ -1002,13 +1005,64 @@ static int resolve_relative_path(int argc, const char **argv, const char *prefix { struct strbuf sb = STRBUF_INIT; if (argc != 3) - die("submodule--helper relative_path takes exactly 2 arguments, got %d", argc); + die("submodule--helper relative-path takes exactly 2 arguments, got %d", argc); printf("%s", relative_path(argv[1], argv[2], &sb)); strbuf_release(&sb); return 0; } +static const char *remote_submodule_branch(const char *path) +{ + const struct submodule *sub; + gitmodules_config(); + git_config(submodule_config, NULL); + + sub = submodule_from_path(null_sha1, path); + if (!sub) + return NULL; + + if (!sub->branch) + return "master"; + + if (!strcmp(sub->branch, ".")) { + unsigned char sha1[20]; + const char *refname = resolve_ref_unsafe("HEAD", 0, sha1, NULL); + + if (!refname) + die(_("No such ref: %s"), "HEAD"); + + /* detached HEAD */ + if (!strcmp(refname, "HEAD")) + die(_("Submodule (%s) branch configured to inherit " + "branch from superproject, but the superproject " + "is not on any branch"), sub->name); + + if (!skip_prefix(refname, "refs/heads/", &refname)) + die(_("Expecting a full ref name, got %s"), refname); + return refname; + } + + return sub->branch; +} + +static int resolve_remote_submodule_branch(int argc, const char **argv, + const char *prefix) +{ + const char *ret; + struct strbuf sb = STRBUF_INIT; + if (argc != 2) + die("submodule--helper remote-branch takes exactly one arguments, got %d", argc); + + ret = remote_submodule_branch(argv[1]); + if (!ret) + die("submodule %s doesn't exist", argv[1]); + + printf("%s", ret); + strbuf_release(&sb); + return 0; +} + struct cmd_struct { const char *cmd; int (*fn)(int, const char **, const char *); @@ -1022,7 +1076,8 @@ static struct cmd_struct commands[] = { {"relative-path", resolve_relative_path}, {"resolve-relative-url", resolve_relative_url}, {"resolve-relative-url-test", resolve_relative_url_test}, - {"init", module_init} + {"init", module_init}, + {"remote-branch", resolve_remote_submodule_branch} }; int cmd_submodule__helper(int argc, const char **argv, const char *prefix) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 172470bf24..4532aa0831 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -19,6 +19,7 @@ static const char unpack_usage[] = "git unpack-objects [-n] [-q] [-r] [--strict] static unsigned char buffer[4096]; static unsigned int offset, len; static off_t consumed_bytes; +static off_t max_input_size; static git_SHA_CTX ctx; static struct fsck_options fsck_options = FSCK_OPTIONS_STRICT; @@ -87,6 +88,8 @@ static void use(int bytes) if (signed_add_overflows(consumed_bytes, bytes)) die("pack too large for current definition of off_t"); consumed_bytes += bytes; + if (max_input_size && consumed_bytes > max_input_size) + die(_("pack exceeds maximum allowed size")); } static void *get_data(unsigned long size) @@ -550,6 +553,10 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix) len = sizeof(*hdr); continue; } + if (skip_prefix(arg, "--max-input-size=", &arg)) { + max_input_size = strtoumax(arg, NULL, 10); + continue; + } usage(unpack_usage); } diff --git a/builtin/update-index.c b/builtin/update-index.c index 6cdfd5f730..ba04b197d8 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -1146,7 +1146,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) report(_("Untracked cache enabled for '%s'"), get_git_work_tree()); break; default: - die("Bug: bad untracked_cache value: %d", untracked_cache); + die("BUG: bad untracked_cache value: %d", untracked_cache); } if (active_cache_changed) { diff --git a/builtin/worktree.c b/builtin/worktree.c index 5a41788edb..6dcf7bd9d2 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -194,7 +194,7 @@ static int add_worktree(const char *path, const char *refname, struct strbuf sb = STRBUF_INIT; const char *name; struct stat st; - struct child_process cp; + struct child_process cp = CHILD_PROCESS_INIT; struct argv_array child_env = ARGV_ARRAY_INIT; int counter = 0, len, ret; struct strbuf symref = STRBUF_INIT; @@ -273,7 +273,6 @@ static int add_worktree(const char *path, const char *refname, argv_array_pushf(&child_env, "%s=%s", GIT_DIR_ENVIRONMENT, sb_git.buf); argv_array_pushf(&child_env, "%s=%s", GIT_WORK_TREE_ENVIRONMENT, path); - memset(&cp, 0, sizeof(cp)); cp.git_cmd = 1; if (commit) @@ -365,8 +364,7 @@ static int add(int ac, const char **av, const char *prefix) } if (opts.new_branch) { - struct child_process cp; - memset(&cp, 0, sizeof(cp)); + struct child_process cp = CHILD_PROCESS_INIT; cp.git_cmd = 1; argv_array_push(&cp.args, "branch"); if (opts.force_new_branch) diff --git a/cache.h b/cache.h index 1087dcaa1f..6738050132 100644 --- a/cache.h +++ b/cache.h @@ -1230,7 +1230,8 @@ struct date_mode { DATE_ISO8601_STRICT, DATE_RFC2822, DATE_STRFTIME, - DATE_RAW + DATE_RAW, + DATE_UNIX } type; const char *strftime_fmt; int local; @@ -1269,6 +1270,7 @@ extern const char *ident_default_email(void); extern const char *git_editor(void); extern const char *git_pager(int stdout_is_tty); extern int git_ident_config(const char *, const char *, void *); +extern void reset_ident_date(void); struct ident_split { const char *name_begin; @@ -1378,6 +1380,13 @@ extern struct packed_git { char pack_name[FLEX_ARRAY]; /* more */ } *packed_git; +/* + * A most-recently-used ordered version of the packed_git list, which can + * be iterated instead of packed_git (and marked via mru_mark). + */ +struct mru; +extern struct mru *packed_git_mru; + struct pack_entry { off_t offset; unsigned char sha1[20]; @@ -1417,7 +1426,6 @@ extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t extern void close_pack_windows(struct packed_git *); extern void close_all_packs(void); extern void unuse_pack(struct pack_window **); -extern void free_pack_by_name(const char *); extern void clear_delta_base_cache(void); extern struct packed_git *add_packed_git(const char *path, size_t path_len, int local); @@ -1567,10 +1575,18 @@ struct git_config_source { const char *blob; }; +enum config_origin_type { + CONFIG_ORIGIN_BLOB, + CONFIG_ORIGIN_FILE, + CONFIG_ORIGIN_STDIN, + CONFIG_ORIGIN_SUBMODULE_BLOB, + CONFIG_ORIGIN_CMDLINE +}; + typedef int (*config_fn_t)(const char *, const char *, void *); extern int git_default_config(const char *, const char *, void *); extern int git_config_from_file(config_fn_t fn, const char *, void *); -extern int git_config_from_mem(config_fn_t fn, const char *origin_type, +extern int git_config_from_mem(config_fn_t fn, const enum config_origin_type, const char *name, const char *buf, size_t len, void *data); extern void git_config_push_parameter(const char *text); extern int git_config_from_parameters(config_fn_t fn, void *data); @@ -1714,7 +1730,7 @@ extern int ignore_untracked_cache_config; struct key_value_info { const char *filename; int linenr; - const char *origin_type; + enum config_origin_type origin_type; enum config_scope scope; }; @@ -1741,7 +1757,6 @@ extern int copy_file(const char *dst, const char *src, int mode); extern int copy_file_with_time(const char *dst, const char *src, int mode); extern void write_or_die(int fd, const void *buf, size_t count); -extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg); extern void fsync_or_die(int fd, const char *); extern ssize_t read_in_full(int fd, void *buf, size_t count); diff --git a/commit-slab.h b/commit-slab.h index f84b449413..42d16dcded 100644 --- a/commit-slab.h +++ b/commit-slab.h @@ -8,7 +8,7 @@ * * After including this header file, using: * - * define_commit_slab(indegee, int); + * define_commit_slab(indegree, int); * * will let you call the following functions: * @@ -126,16 +126,16 @@ static MAYBE_UNUSED elemtype *slabname## _peek(struct slabname *s, \ return slabname##_at_peek(s, c, 0); \ } \ \ -static int stat_ ##slabname## realloc +struct slabname /* - * Note that this seemingly redundant second declaration is required + * Note that this redundant forward declaration is required * to allow a terminating semicolon, which makes instantiations look * like function declarations. I.e., the expansion of * * define_commit_slab(indegree, int); * - * ends in 'static int stat_indegreerealloc;'. This would otherwise + * ends in 'struct indegree;'. This would otherwise * be a syntax error according (at least) to ISO C. It's hard to * catch because GCC silently parses it by default. */ diff --git a/commit.c b/commit.c index 71a360dad3..ba6dee37aa 100644 --- a/commit.c +++ b/commit.c @@ -1576,6 +1576,15 @@ int commit_tree_extended(const char *msg, size_t msg_len, return result; } +void set_merge_remote_desc(struct commit *commit, + const char *name, struct object *obj) +{ + struct merge_remote_desc *desc; + FLEX_ALLOC_STR(desc, name, name); + desc->obj = obj; + commit->util = desc; +} + struct commit *get_merge_parent(const char *name) { struct object *obj; @@ -1585,13 +1594,8 @@ struct commit *get_merge_parent(const char *name) return NULL; obj = parse_object(oid.hash); commit = (struct commit *)peel_to_type(name, 0, obj, OBJ_COMMIT); - if (commit && !commit->util) { - struct merge_remote_desc *desc; - desc = xmalloc(sizeof(*desc)); - desc->obj = obj; - desc->name = strdup(name); - commit->util = desc; - } + if (commit && !commit->util) + set_merge_remote_desc(commit, name, obj); return commit; } diff --git a/commit.h b/commit.h index 23ae0c1d64..32e1a113e5 100644 --- a/commit.h +++ b/commit.h @@ -362,9 +362,11 @@ extern void for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void * struct merge_remote_desc { struct object *obj; /* the named object, could be a tag */ - const char *name; + char name[FLEX_ARRAY]; }; #define merge_remote_util(commit) ((struct merge_remote_desc *)((commit)->util)) +extern void set_merge_remote_desc(struct commit *commit, + const char *name, struct object *obj); /* * Given "name" from the command line to merge, find the commit object diff --git a/compat/mingw.c b/compat/mingw.c index 2b5467dead..3fbfda5978 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1930,48 +1930,6 @@ int mingw_raise(int sig) } } - -static const char *make_backslash_path(const char *path) -{ - static char buf[PATH_MAX + 1]; - char *c; - - if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) - die("Too long path: %.*s", 60, path); - - for (c = buf; *c; c++) { - if (*c == '/') - *c = '\\'; - } - return buf; -} - -void mingw_open_html(const char *unixpath) -{ - const char *htmlpath = make_backslash_path(unixpath); - typedef HINSTANCE (WINAPI *T)(HWND, const char *, - const char *, const char *, const char *, INT); - T ShellExecute; - HMODULE shell32; - int r; - - shell32 = LoadLibrary("shell32.dll"); - if (!shell32) - die("cannot load shell32.dll"); - ShellExecute = (T)GetProcAddress(shell32, "ShellExecuteA"); - if (!ShellExecute) - die("cannot run browser"); - - printf("Launching default browser to display HTML ...\n"); - r = HCAST(int, ShellExecute(NULL, "open", htmlpath, - NULL, "\\", SW_SHOWNORMAL)); - FreeLibrary(shell32); - /* see the MSDN documentation referring to the result codes here */ - if (r <= 32) { - die("failed to launch browser for %.*s", MAX_PATH, unixpath); - } -} - int link(const char *oldpath, const char *newpath) { typedef BOOL (WINAPI *T)(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES); diff --git a/compat/mingw.h b/compat/mingw.h index 95e128fcfd..034fff9479 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -67,6 +67,10 @@ typedef int pid_t; #define F_SETFD 2 #define FD_CLOEXEC 0x1 +#if !defined O_CLOEXEC && defined O_NOINHERIT +#define O_CLOEXEC O_NOINHERIT +#endif + #ifndef EAFNOSUPPORT #define EAFNOSUPPORT WSAEAFNOSUPPORT #endif @@ -417,9 +421,6 @@ int mingw_offset_1st_component(const char *path); #include #endif -void mingw_open_html(const char *path); -#define open_html mingw_open_html - /** * Converts UTF-8 encoded string to UTF-16LE. * diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c index a0a16eb1bb..2d4ef59013 100644 --- a/compat/nedmalloc/nedmalloc.c +++ b/compat/nedmalloc/nedmalloc.c @@ -938,10 +938,10 @@ void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void ** void **ret; threadcache *tc; int mymspace; - size_t i, *adjustedsizes=(size_t *) alloca(elems*sizeof(size_t)); - if(!adjustedsizes) return 0; - for(i=0; ivar; + int error_return = 0; + char *error_msg = NULL; /* U+FEFF Byte Order Mark in UTF8 */ const char *bomptr = utf8_bom; @@ -507,10 +510,40 @@ static int git_parse_source(config_fn_t fn, void *data) if (get_value(fn, data, var) < 0) break; } + + switch (cf->origin_type) { + case CONFIG_ORIGIN_BLOB: + error_msg = xstrfmt(_("bad config line %d in blob %s"), + cf->linenr, cf->name); + break; + case CONFIG_ORIGIN_FILE: + error_msg = xstrfmt(_("bad config line %d in file %s"), + cf->linenr, cf->name); + break; + case CONFIG_ORIGIN_STDIN: + error_msg = xstrfmt(_("bad config line %d in standard input"), + cf->linenr); + break; + case CONFIG_ORIGIN_SUBMODULE_BLOB: + error_msg = xstrfmt(_("bad config line %d in submodule-blob %s"), + cf->linenr, cf->name); + break; + case CONFIG_ORIGIN_CMDLINE: + error_msg = xstrfmt(_("bad config line %d in command line %s"), + cf->linenr, cf->name); + break; + default: + error_msg = xstrfmt(_("bad config line %d in %s"), + cf->linenr, cf->name); + } + if (cf->die_on_error) - die(_("bad config line %d in %s %s"), cf->linenr, cf->origin_type, cf->name); + die("%s", error_msg); else - return error(_("bad config line %d in %s %s"), cf->linenr, cf->origin_type, cf->name); + error_return = error("%s", error_msg); + + free(error_msg); + return error_return; } static int parse_unit_factor(const char *end, uintmax_t *val) @@ -619,16 +652,35 @@ int git_parse_ulong(const char *value, unsigned long *ret) NORETURN static void die_bad_number(const char *name, const char *value) { - const char *reason = errno == ERANGE ? - "out of range" : - "invalid unit"; + const char * error_type = (errno == ERANGE)? _("out of range"):_("invalid unit"); + if (!value) value = ""; - if (cf && cf->origin_type && cf->name) - die(_("bad numeric config value '%s' for '%s' in %s %s: %s"), - value, name, cf->origin_type, cf->name, reason); - die(_("bad numeric config value '%s' for '%s': %s"), value, name, reason); + if (!(cf && cf->name)) + die(_("bad numeric config value '%s' for '%s': %s"), + value, name, error_type); + + switch (cf->origin_type) { + case CONFIG_ORIGIN_BLOB: + die(_("bad numeric config value '%s' for '%s' in blob %s: %s"), + value, name, cf->name, error_type); + case CONFIG_ORIGIN_FILE: + die(_("bad numeric config value '%s' for '%s' in file %s: %s"), + value, name, cf->name, error_type); + case CONFIG_ORIGIN_STDIN: + die(_("bad numeric config value '%s' for '%s' in standard input: %s"), + value, name, error_type); + case CONFIG_ORIGIN_SUBMODULE_BLOB: + die(_("bad numeric config value '%s' for '%s' in submodule-blob %s: %s"), + value, name, cf->name, error_type); + case CONFIG_ORIGIN_CMDLINE: + die(_("bad numeric config value '%s' for '%s' in command line %s: %s"), + value, name, cf->name, error_type); + default: + die(_("bad numeric config value '%s' for '%s' in %s: %s"), + value, name, cf->name, error_type); + } } int git_config_int(const char *name, const char *value) @@ -1105,7 +1157,8 @@ static int do_config_from(struct config_source *top, config_fn_t fn, void *data) } static int do_config_from_file(config_fn_t fn, - const char *origin_type, const char *name, const char *path, FILE *f, + const enum config_origin_type origin_type, + const char *name, const char *path, FILE *f, void *data) { struct config_source top; @@ -1124,7 +1177,7 @@ static int do_config_from_file(config_fn_t fn, static int git_config_from_stdin(config_fn_t fn, void *data) { - return do_config_from_file(fn, "standard input", "", NULL, stdin, data); + return do_config_from_file(fn, CONFIG_ORIGIN_STDIN, "", NULL, stdin, data); } int git_config_from_file(config_fn_t fn, const char *filename, void *data) @@ -1135,14 +1188,14 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data) f = fopen(filename, "r"); if (f) { flockfile(f); - ret = do_config_from_file(fn, "file", filename, filename, f, data); + ret = do_config_from_file(fn, CONFIG_ORIGIN_FILE, filename, filename, f, data); funlockfile(f); fclose(f); } return ret; } -int git_config_from_mem(config_fn_t fn, const char *origin_type, +int git_config_from_mem(config_fn_t fn, const enum config_origin_type origin_type, const char *name, const char *buf, size_t len, void *data) { struct config_source top; @@ -1179,7 +1232,7 @@ static int git_config_from_blob_sha1(config_fn_t fn, return error("reference '%s' does not point to a blob", name); } - ret = git_config_from_mem(fn, "blob", name, buf, size, data); + ret = git_config_from_mem(fn, CONFIG_ORIGIN_BLOB, name, buf, size, data); free(buf); return ret; @@ -1390,12 +1443,12 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha if (cf->name) { kv_info->filename = strintern(cf->name); kv_info->linenr = cf->linenr; - kv_info->origin_type = strintern(cf->origin_type); + kv_info->origin_type = cf->origin_type; } else { /* for values read from `git_config_from_parameters()` */ kv_info->filename = NULL; kv_info->linenr = -1; - kv_info->origin_type = NULL; + kv_info->origin_type = CONFIG_ORIGIN_CMDLINE; } kv_info->scope = current_parsing_scope; si->util = kv_info; @@ -2476,14 +2529,28 @@ int parse_config_key(const char *var, const char *current_config_origin_type(void) { - const char *type; + int type; if (current_config_kvi) type = current_config_kvi->origin_type; else if(cf) type = cf->origin_type; else die("BUG: current_config_origin_type called outside config callback"); - return type ? type : "command line"; + + switch (type) { + case CONFIG_ORIGIN_BLOB: + return "blob"; + case CONFIG_ORIGIN_FILE: + return "file"; + case CONFIG_ORIGIN_STDIN: + return "standard input"; + case CONFIG_ORIGIN_SUBMODULE_BLOB: + return "submodule-blob"; + case CONFIG_ORIGIN_CMDLINE: + return "command line"; + default: + die("BUG: unknown config origin type"); + } } const char *current_config_name(void) diff --git a/config.mak.uname b/config.mak.uname index 17fed2f43a..b232908f8c 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -209,6 +209,7 @@ ifeq ($(uname_S),FreeBSD) HAVE_PATHS_H = YesPlease GMTIME_UNRELIABLE_ERRORS = UnfortunatelyYes HAVE_BSD_SYSCTL = YesPlease + PAGER_ENV = LESS=FRX LV=-c MORE=FRX endif ifeq ($(uname_S),OpenBSD) NO_STRCASESTR = YesPlease diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 10f6d52254..9c8f7380d0 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1008,8 +1008,8 @@ _git_branch () while [ $c -lt $cword ]; do i="${words[c]}" case "$i" in - -d|-m) only_local_ref="y" ;; - -r) has_r="y" ;; + -d|--delete|-m|--move) only_local_ref="y" ;; + -r|--remotes) has_r="y" ;; esac ((c++)) done @@ -1023,7 +1023,7 @@ _git_branch () --color --no-color --verbose --abbrev= --no-abbrev --track --no-track --contains --merged --no-merged --set-upstream-to= --edit-description --list - --unset-upstream + --unset-upstream --delete --move --remotes " ;; *) @@ -1136,6 +1136,7 @@ _git_clone () --depth --single-branch --branch + --recurse-submodules " return ;; @@ -1204,6 +1205,8 @@ _git_describe () __git_diff_algorithms="myers minimal patience histogram" +__git_diff_submodule_formats="log short" + __git_diff_common_options="--stat --numstat --shortstat --summary --patch-with-stat --name-only --name-status --color --no-color --color-words --no-renames --check @@ -1219,6 +1222,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary --dirstat --dirstat= --dirstat-by-file --dirstat-by-file= --cumulative --diff-algorithm= + --submodule --submodule= " _git_diff () @@ -1230,6 +1234,10 @@ _git_diff () __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}" return ;; + --submodule=*) + __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}" + return + ;; --*) __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex --base --ours --theirs --no-index @@ -1493,6 +1501,14 @@ _git_log () __gitcomp "full short no" "" "${cur##--decorate=}" return ;; + --diff-algorithm=*) + __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}" + return + ;; + --submodule=*) + __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}" + return + ;; --*) __gitcomp " $__git_log_common_options @@ -2181,6 +2197,7 @@ _git_config () format.attach format.cc format.coverLetter + format.from format.headers format.numbered format.pretty @@ -2455,6 +2472,10 @@ _git_show () __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}" return ;; + --submodule=*) + __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}" + return + ;; --*) __gitcomp "--pretty= --format= --abbrev-commit --oneline --show-signature diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl index 95438e1ed4..d60b4315ed 100755 --- a/contrib/fast-import/import-tars.perl +++ b/contrib/fast-import/import-tars.perl @@ -96,18 +96,21 @@ $mtime = oct $mtime; next if $typeflag == 5; # directory - print FI "blob\n", "mark :$next_mark\n"; - if ($typeflag == 2) { # symbolic link - print FI "data ", length($linkname), "\n", $linkname; - $mode = 0120000; - } else { - print FI "data $size\n"; - while ($size > 0 && read(I, $_, 512) == 512) { - print FI substr($_, 0, $size); - $size -= 512; + if ($typeflag != 1) { # handle hard links later + print FI "blob\n", "mark :$next_mark\n"; + if ($typeflag == 2) { # symbolic link + print FI "data ", length($linkname), "\n", + $linkname; + $mode = 0120000; + } else { + print FI "data $size\n"; + while ($size > 0 && read(I, $_, 512) == 512) { + print FI substr($_, 0, $size); + $size -= 512; + } } + print FI "\n"; } - print FI "\n"; my $path; if ($prefix) { @@ -115,7 +118,13 @@ } else { $path = "$name"; } - $files{$path} = [$next_mark++, $mode]; + + if ($typeflag == 1) { # hard link + $linkname = "$prefix/$linkname" if $prefix; + $files{$path} = [ $files{$linkname}->[0], $mode ]; + } else { + $files{$path} = [$next_mark++, $mode]; + } $author_time = $mtime if $mtime > $author_time; $path =~ m,^([^/]+)/,; diff --git a/contrib/hooks/multimail/CHANGES b/contrib/hooks/multimail/CHANGES index 100cc7a6d3..2076cf972b 100644 --- a/contrib/hooks/multimail/CHANGES +++ b/contrib/hooks/multimail/CHANGES @@ -1,3 +1,62 @@ +Release 1.4.0 +============= + +New features to troubleshoot a git-multimail installation +--------------------------------------------------------- + +* One can now perform a basic check of git-multimail's setup by + running the hook with the environment variable + GIT_MULTIMAIL_CHECK_SETUP set to a non-empty string. See + doc/troubleshooting.rst for details. + +* A new log files system was added. See the multimailhook.logFile, + multimailhook.errorLogFile and multimailhook.debugLogFile variables. + +* git_multimail.py can now be made more verbose using + multimailhook.verbose. + +* A new option --check-ref-filter is now available to help debugging + the refFilter* options. + +Formatting emails +----------------- + +* Formatting of emails was made slightly more compact, to reduce the + odds of having long subject lines truncated or wrapped in short list + of commits. + +* multimailhook.emailPrefix may now use the '%(repo_shortname)s' + placeholder for the repository's short name. + +* A new option multimailhook.subjectMaxLength is available to truncate + overly long subject lines. + +Bug fixes and minor changes +--------------------------- + +* Options refFilterDoSendRegex and refFilterDontSendRegex were + essentially broken. They should work now. + +* The behavior when both refFilter{Do,Dont}SendRegex and + refFilter{Exclusion,Inclusion}Regex are set have been slightly + changed. Exclusion/Inclusion is now strictly stronger than + DoSend/DontSend. + +* The management of precedence when a setting can be computed in + multiple ways has been considerably refactored and modified. + multimailhook.from and multimailhook.reponame now have precedence + over the environment-specific settings ($GL_REPO/$GL_USER for + gitolite, --stash-user/repo for Stash, --submitter/--project for + Gerrit). + +* The coverage of the testsuite has been considerably improved. All + configuration variables now appear at least once in the testsuite. + +This version was tested with Python 2.6 to 3.5. It also mostly works +with Python 2.4, but there is one known breakage in the testsuite +related to non-ascii characters. It was tested with Git +1.7.10.406.gdc801, 1.8.5.6, 2.1.4, and 2.10.0.rc0.1.g07c9292. + Release 1.3.1 (bugfix-only release) =================================== diff --git a/contrib/hooks/multimail/CONTRIBUTING.rst b/contrib/hooks/multimail/CONTRIBUTING.rst index 530ecbfcf1..da65570e9b 100644 --- a/contrib/hooks/multimail/CONTRIBUTING.rst +++ b/contrib/hooks/multimail/CONTRIBUTING.rst @@ -4,8 +4,9 @@ Contributing git-multimail is an open-source project, built by volunteers. We would welcome your help! -The current maintainers are Michael Haggerty -and Matthieu Moy . +The current maintainers are Matthieu Moy + and Michael Haggerty +. Please note that although a copy of git-multimail is distributed in the "contrib" section of the main Git project, development takes place @@ -22,6 +23,10 @@ to the maintainers). Please sign off your patches as per the `Git project practice `__. +Please vote for issues you would like to be addressed in priority +(click "add your reaction" and then the "+1" thumbs-up button on the +GitHub issue). + General discussion of git-multimail can take place on the main `Git mailing list`_. diff --git a/contrib/hooks/multimail/README b/contrib/hooks/multimail/README index 0c91d19a57..5105373aea 100644 --- a/contrib/hooks/multimail/README +++ b/contrib/hooks/multimail/README @@ -1,11 +1,11 @@ -git-multimail 1.3.1 -=================== +git-multimail version 1.4.0 +=========================== .. image:: https://travis-ci.org/git-multimail/git-multimail.svg?branch=master :target: https://travis-ci.org/git-multimail/git-multimail git-multimail is a tool for sending notification emails on pushes to a -Git repository. It includes a Python module called git_multimail.py, +Git repository. It includes a Python module called ``git_multimail.py``, which can either be used as a hook script directly or can be imported as a Python module into another script. @@ -93,20 +93,20 @@ Requirements Invocation ---------- -git_multimail.py is designed to be used as a ``post-receive`` hook in a +``git_multimail.py`` is designed to be used as a ``post-receive`` hook in a Git repository (see githooks(5)). Link or copy it to $GIT_DIR/hooks/post-receive within the repository for which email notifications are desired. Usually it should be installed on the central repository for a project, to which all commits are eventually pushed. -For use on pre-v1.5.1 Git servers, git_multimail.py can also work as +For use on pre-v1.5.1 Git servers, ``git_multimail.py`` can also work as an ``update`` hook, taking its arguments on the command line. To use this script in this manner, link or copy it to $GIT_DIR/hooks/update. Please note that the script is not completely reliable in this mode -[2]_. +[1]_. -Alternatively, git_multimail.py can be imported as a Python module +Alternatively, ``git_multimail.py`` can be imported as a Python module into your own Python post-receive script. This method is a bit more work, but allows the behavior of the hook to be customized using arbitrary Python code. For example, you can use a custom environment @@ -122,7 +122,7 @@ arbitrary Python code. For example, you can use a custom environment Or you can change how emails are sent by writing your own Mailer class. The ``post-receive`` script in this directory demonstrates how -to use git_multimail.py as a Python module. (If you make interesting +to use ``git_multimail.py`` as a Python module. (If you make interesting changes of this type, please consider sharing them with the community.) @@ -151,7 +151,10 @@ multimailhook.environment the repository name is derived from the repository's path. gitolite - the username of the pusher is read from $GL_USER, the repository + Environment to use when ``git-multimail`` is ran as a gitolite_ + hook. + + The username of the pusher is read from $GL_USER, the repository name is read from $GL_REPO, and the From: header value is optionally read from gitolite.conf (see multimailhook.from). @@ -294,7 +297,7 @@ multimailhook.htmlInIntro, multimailhook.htmlInFooter like ``link``, the reader will see the HTML source code and not a proper link. - Set ``multimailhook.htmlInIntro`` to true to allow writting HTML + Set ``multimailhook.htmlInIntro`` to true to allow writing HTML formatting in introduction templates. Similarly, set ``multimailhook.htmlInFooter`` for HTML in the footer. @@ -444,7 +447,9 @@ multimailhook.emailPrefix email filtering (though filtering based on the X-Git-* email headers is probably more robust). Default is the short name of the repository in square brackets; e.g., ``[myrepo]``. Set this - value to the empty string to suppress the email prefix. + value to the empty string to suppress the email prefix. You may + use the placeholder ``%(repo_shortname)s`` for the short name of + the repository. multimailhook.emailMaxLines The maximum number of lines that should be included in the body of @@ -461,6 +466,17 @@ multimailhook.emailMaxLineLength lines, the diffs are probably unreadable anyway. To disable line truncation, set this option to 0. +multimailhook.subjectMaxLength + The maximum length of the subject line (i.e. the ``oneline`` field + in templates, not including the prefix). Lines longer than this + limit are truncated to this length with a trailing ``[...]`` added + to indicate the missing text. This option The default is to use + ``multimailhook.emailMaxLineLength``. This option avoids sending + emails with overly long subject lines, but should not be needed if + the commit messages follow the Git convention (one short subject + line, then a blank line, then the message body). To disable line + truncation, set this option to 0. + multimailhook.maxCommitEmails The maximum number of commit emails to send for a given change. When the number of patches is larger that this value, only the @@ -474,12 +490,15 @@ multimailhook.emailStrictUTF8 not valid UTF-8 are converted to the Unicode replacement character, U+FFFD. The default is `true`. + This option is ineffective with Python 3, where non-UTF-8 + characters are unconditionally replaced. + multimailhook.diffOpts Options passed to ``git diff-tree`` when generating the summary information for ReferenceChange emails. Default is ``--stat --summary --find-copies-harder``. Add -p to those options to include a unified diff of changes in addition to the usual summary - output. Shell quoting is allowed; see multimailhook.logOpts for + output. Shell quoting is allowed; see ``multimailhook.logOpts`` for details. multimailhook.graphOpts @@ -516,7 +535,7 @@ multimailhook.commitLogOpts multimailhook.dateSubstitute String to use as a substitute for ``Date:`` in the output of ``git - log`` while formatting commit messages. This is usefull to avoid + log`` while formatting commit messages. This is useful to avoid emitting a line that can be interpreted by mailers as the start of a cited message (Zimbra webmail in particular). Defaults to ``CommitDate:``. Set to an empty string or ``none`` to deactivate @@ -564,6 +583,8 @@ multimailhook.refFilterInclusionRegex, multimailhook.refFilterExclusionRegex, mu the user-interface is not stable yet (in particular, the option names may change). If you want to participate in stabilizing the feature, please contact the maintainers and/or send pull-requests. + If you are happy with the current shape of the feature, please + report it too. Regular expressions that can be used to limit refs for which email updates will be sent. It is an error to specify both an inclusion @@ -613,6 +634,32 @@ multimailhook.refFilterInclusionRegex, multimailhook.refFilterExclusionRegex, mu [multimailhook] refFilterExclusionRegex = ^refs/tags/|^refs/heads/master$ + ``refFilterInclusionRegex`` and ``refFilterExclusionRegex`` are + strictly stronger than ``refFilterDoSendRegex`` and + ``refFilterDontSendRegex``. In other words, adding a ref to a + DoSend/DontSend regex has no effect if it is already excluded by a + Exclusion/Inclusion regex. + +multimailhook.logFile, multimailhook.errorLogFile, multimailhook.debugLogFile + + When set, these variable designate path to files where + git-multimail will log some messages. Normal messages and error + messages are sent to ``logFile``, and error messages are also sent + to ``errorLogFile``. Debug messages and all other messages are + sent to ``debugLogFile``. The recommended way is to set only one + of these variables, but it is also possible to set several of them + (part of the information is then duplicated in several log files, + for example errors are duplicated to all log files). + + Relative path are relative to the Git repository where the push is + done. + +multimailhook.verbose + + Verbosity level of git-multimail on its standard output. By + default, show only error and info messages. If set to true, show + also debug messages. + Email filtering aids -------------------- @@ -628,8 +675,8 @@ Customizing email contents git-multimail mostly generates emails by expanding templates. The templates can be customized. To avoid the need to edit -git_multimail.py directly, the preferred way to change the templates -is to write a separate Python script that imports git_multimail.py as +``git_multimail.py`` directly, the preferred way to change the templates +is to write a separate Python script that imports ``git_multimail.py`` as a module, then replaces the templates in place. See the provided post-receive script for an example of how this is done. @@ -645,8 +692,8 @@ GenericEnvironment a stand-alone Git repository. GitoliteEnvironment - a Git repository that is managed by gitolite - [3]_. For such repositories, the identity of the pusher is read from + a Git repository that is managed by gitolite_. For such + repositories, the identity of the pusher is read from environment variable $GL_USER, the name of the repository is read from $GL_REPO (if it is not overridden by multimailhook.reponame), and the From: header value is optionally read from gitolite.conf @@ -662,7 +709,7 @@ option to the script. If you need to customize the script in ways that are not supported by the existing environments, you can define your own environment class class using arbitrary Python code. To do so, you need to import -git_multimail.py as a Python module, as demonstrated by the example +``git_multimail.py`` as a Python module, as demonstrated by the example post-receive script. Then implement your environment class; it should usually inherit from one of the existing Environment classes and possibly one or more of the EnvironmentMixin classes. Then set the @@ -690,9 +737,7 @@ contribute to git-multimail. Footnotes --------- -.. [1] http://www.python.org/dev/peps/pep-0394/ - -.. [2] Because of the way information is passed to update hooks, the +.. [1] Because of the way information is passed to update hooks, the script's method of determining whether a commit has already been seen does not work when it is used as an ``update`` script. In particular, no notification email will be generated for a @@ -700,4 +745,4 @@ Footnotes push. A workaround is to use --force-send to force sending the emails. -.. [3] https://github.com/sitaramc/gitolite +.. _gitolite: https://github.com/sitaramc/gitolite diff --git a/contrib/hooks/multimail/README.Git b/contrib/hooks/multimail/README.Git index 1210bde045..161b0230a0 100644 --- a/contrib/hooks/multimail/README.Git +++ b/contrib/hooks/multimail/README.Git @@ -6,10 +6,10 @@ website: https://github.com/git-multimail/git-multimail The version in this directory was obtained from the upstream project -on May 13 2016 and consists of the "git-multimail" subdirectory from +on August 17 2016 and consists of the "git-multimail" subdirectory from revision - 3ce5470d4abf7251604cbf64e73a962e1b617f5e refs/tags/1.3.1 + 07b1cb6bfd7be156c62e1afa17cae13b850a869f refs/tags/1.4.0 Please see the README file in this directory for information about how to report bugs or contribute to git-multimail. diff --git a/contrib/hooks/multimail/doc/troubleshooting.rst b/contrib/hooks/multimail/doc/troubleshooting.rst index d3f346f076..651b509ee6 100644 --- a/contrib/hooks/multimail/doc/troubleshooting.rst +++ b/contrib/hooks/multimail/doc/troubleshooting.rst @@ -1,6 +1,40 @@ Troubleshooting issues with git-multimail: a FAQ ================================================ +How to check that git-multimail is properly set up? +--------------------------------------------------- + +Since version 1.4.0, git-multimail allows a simple self-checking of +its configuration: run it with the environment variable +``GIT_MULTIMAIL_CHECK_SETUP`` set to a non-empty string. You should +get something like this:: + + $ GIT_MULTIMAIL_CHECK_SETUP=true /home/moy/dev/git-multimail/git-multimail/git_multimail.py + Environment values: + administrator : 'the administrator of this repository' + charset : 'utf-8' + emailprefix : '[git-multimail] ' + fqdn : 'anie' + projectdesc : 'UNNAMED PROJECT' + pusher : 'moy' + repo_path : '/home/moy/dev/git-multimail' + repo_shortname : 'git-multimail' + + Now, checking that git-multimail's standard input is properly set ... + Please type some text and then press Return + foo + You have just entered: + foo + git-multimail seems properly set up. + +If you forgot to set an important variable, you may get instead:: + + $ GIT_MULTIMAIL_CHECK_SETUP=true /home/moy/dev/git-multimail/git-multimail/git_multimail.py + No email recipients configured! + +Do not set ``$GIT_MULTIMAIL_CHECK_SETUP`` other than for testing your +configuration: it would disable the hook completely. + Git is not using the right address in the From/To/Reply-To field ---------------------------------------------------------------- diff --git a/contrib/hooks/multimail/git_multimail.py b/contrib/hooks/multimail/git_multimail.py index 54ab4a4942..c7f86403cf 100755 --- a/contrib/hooks/multimail/git_multimail.py +++ b/contrib/hooks/multimail/git_multimail.py @@ -1,8 +1,8 @@ #! /usr/bin/env python -__version__ = '1.3.1' +__version__ = '1.4.0' -# Copyright (c) 2015 Matthieu Moy and others +# Copyright (c) 2015-2016 Matthieu Moy and others # Copyright (c) 2012-2014 Michael Haggerty and others # Derived from contrib/hooks/post-receive-email, which is # Copyright (c) 2007 Andy Parkins @@ -56,6 +56,7 @@ import subprocess import shlex import optparse +import logging import smtplib try: import ssl @@ -86,8 +87,8 @@ def is_string(s): def str_to_bytes(s): return s.encode(ENCODING) - def bytes_to_str(s): - return s.decode(ENCODING) + def bytes_to_str(s, errors='strict'): + return s.decode(ENCODING, errors) unicode = str @@ -98,6 +99,15 @@ def write_str(f, msg): f.buffer.write(msg.encode(sys.getdefaultencoding())) except UnicodeEncodeError: f.buffer.write(msg.encode(ENCODING)) + + def read_line(f): + # Try reading with the default encoding. If it fails, + # try UTF-8. + out = f.buffer.readline() + try: + return out.decode(sys.getdefaultencoding()) + except UnicodeEncodeError: + return out.decode(ENCODING) else: def is_string(s): try: @@ -108,12 +118,15 @@ def is_string(s): def str_to_bytes(s): return s - def bytes_to_str(s): + def bytes_to_str(s, errors='strict'): return s def write_str(f, msg): f.write(msg) + def read_line(f): + return f.readline() + def next(it): return it.next() @@ -213,8 +226,8 @@ def next(it): \\ O -- O -- O (%(oldrev_short)s) -Any revisions marked "omits" are not gone; other references still -refer to them. Any revisions marked "discards" are gone forever. +Any revisions marked "omit" are not gone; other references still +refer to them. Any revisions marked "discard" are gone forever. """ @@ -233,8 +246,8 @@ def next(it): revisions, and so the following emails describe only the N revisions from the common base, B. -Any revisions marked "omits" are not gone; other references still -refer to them. Any revisions marked "discards" are gone forever. +Any revisions marked "omit" are not gone; other references still +refer to them. Any revisions marked "discard" are gone forever. """ @@ -258,22 +271,22 @@ def next(it): NEW_REVISIONS_TEMPLATE = """\ The %(tot)s revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions -listed as "adds" were already present in the repository and have only +listed as "add" were already present in the repository and have only been added to this reference. """ TAG_CREATED_TEMPLATE = """\ - at %(newrev_short)-9s (%(newrev_type)s) + at %(newrev_short)-8s (%(newrev_type)s) """ TAG_UPDATED_TEMPLATE = """\ *** WARNING: tag %(short_refname)s was modified! *** - from %(oldrev_short)-9s (%(oldrev_type)s) - to %(newrev_short)-9s (%(newrev_type)s) + from %(oldrev_short)-8s (%(oldrev_type)s) + to %(newrev_short)-8s (%(newrev_type)s) """ @@ -286,7 +299,7 @@ def next(it): # The template used in summary tables. It looks best if this uses the # same alignment as TAG_CREATED_TEMPLATE and TAG_UPDATED_TEMPLATE. BRIEF_SUMMARY_TEMPLATE = """\ -%(action)10s %(rev_short)-9s %(text)s +%(action)8s %(rev_short)-8s %(text)s """ @@ -434,11 +447,16 @@ def read_output(cmd, input=None, keepends=False, **kw): input = str_to_bytes(input) else: stdin = None + errors = 'strict' + if 'errors' in kw: + errors = kw['errors'] + del kw['errors'] p = subprocess.Popen( - cmd, stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kw + tuple(str_to_bytes(w) for w in cmd), + stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kw ) (out, err) = p.communicate(input) - out = bytes_to_str(out) + out = bytes_to_str(out, errors=errors) retcode = p.wait() if retcode: raise CommandError(cmd, retcode) @@ -1020,7 +1038,9 @@ def generate_email(self, push, body_filter=None, extra_header_values={}): for line in footer: yield line - def get_alt_fromaddr(self): + def get_specific_fromaddr(self): + """For kinds of Changes which specify it, return the kind-specific + From address to use.""" return None @@ -1045,7 +1065,7 @@ def __init__(self, reference_change, rev, num, tot): self.cc_recipients = ', '.join(to.strip() for to in self._cc_recipients()) if self.cc_recipients: self.environment.log_msg( - 'Add %s to CC for %s\n' % (self.cc_recipients, self.rev.sha1)) + 'Add %s to CC for %s' % (self.cc_recipients, self.rev.sha1)) def _cc_recipients(self): cc_recipients = [] @@ -1065,6 +1085,10 @@ def _compute_values(self): ['log', '--format=%s', '--no-walk', self.rev.sha1] ) + max_subject_length = self.environment.get_max_subject_length() + if max_subject_length > 0 and len(oneline) > max_subject_length: + oneline = oneline[:max_subject_length - 6] + ' [...]' + values['rev'] = self.rev.sha1 values['rev_short'] = self.rev.short values['change_type'] = self.change_type @@ -1121,7 +1145,7 @@ def generate_email_body(self, push): for line in read_git_lines( ['log'] + self.environment.commitlogopts + ['-1', self.rev.sha1], keepends=True, - ): + errors='replace'): if line.startswith('Date: ') and self.environment.date_substitute: yield self.environment.date_substitute + line[len('Date: '):] else: @@ -1135,7 +1159,7 @@ def generate_email(self, push, body_filter=None, extra_header_values={}): self._contains_diff() return Change.generate_email(self, push, body_filter, extra_header_values) - def get_alt_fromaddr(self): + def get_specific_fromaddr(self): return self.environment.from_commit @@ -1193,7 +1217,7 @@ def create(environment, oldrev, newrev, refname): # Tracking branch: environment.log_warning( '*** Push-update of tracking branch %r\n' - '*** - incomplete email generated.\n' + '*** - incomplete email generated.' % (refname,) ) klass = OtherReferenceChange @@ -1201,7 +1225,7 @@ def create(environment, oldrev, newrev, refname): # Some other reference namespace: environment.log_warning( '*** Push-update of strange reference %r\n' - '*** - incomplete email generated.\n' + '*** - incomplete email generated.' % (refname,) ) klass = OtherReferenceChange @@ -1209,7 +1233,7 @@ def create(environment, oldrev, newrev, refname): # Anything else (is there anything else?) environment.log_warning( '*** Unknown type of update to %r (%s)\n' - '*** - incomplete email generated.\n' + '*** - incomplete email generated.' % (refname, rev.type,) ) klass = OtherReferenceChange @@ -1446,9 +1470,9 @@ def generate_revision_change_summary(self, push): if discards and adds: for (sha1, subject) in discards: if sha1 in discarded_commits: - action = 'discards' + action = 'discard' else: - action = 'omits' + action = 'omit' yield self.expand( BRIEF_SUMMARY_TEMPLATE, action=action, rev_short=sha1, text=subject, @@ -1457,7 +1481,7 @@ def generate_revision_change_summary(self, push): if sha1 in new_commits: action = 'new' else: - action = 'adds' + action = 'add' yield self.expand( BRIEF_SUMMARY_TEMPLATE, action=action, rev_short=sha1, text=subject, @@ -1469,9 +1493,9 @@ def generate_revision_change_summary(self, push): elif discards: for (sha1, subject) in discards: if sha1 in discarded_commits: - action = 'discards' + action = 'discard' else: - action = 'omits' + action = 'omit' yield self.expand( BRIEF_SUMMARY_TEMPLATE, action=action, rev_short=sha1, text=subject, @@ -1490,7 +1514,7 @@ def generate_revision_change_summary(self, push): if sha1 in new_commits: action = 'new' else: - action = 'adds' + action = 'add' yield self.expand( BRIEF_SUMMARY_TEMPLATE, action=action, rev_short=sha1, text=subject, @@ -1543,7 +1567,7 @@ def generate_revision_change_summary(self, push): for r in discarded_revisions: (sha1, subject) = r.rev.get_summary() yield r.expand( - BRIEF_SUMMARY_TEMPLATE, action='discards', text=subject, + BRIEF_SUMMARY_TEMPLATE, action='discard', text=subject, ) for line in self.generate_revision_change_graph(push): yield line @@ -1581,7 +1605,7 @@ def generate_delete_summary(self, push): ) yield '\n' - def get_alt_fromaddr(self): + def get_specific_fromaddr(self): return self.environment.from_refchange @@ -1791,13 +1815,13 @@ def describe_tag(self, push): except CommandError: prevtag = None if prevtag: - yield ' replaces %s\n' % (prevtag,) + yield ' replaces %s\n' % (prevtag,) else: prevtag = None - yield ' length %s bytes\n' % (read_git_output(['cat-file', '-s', tagobject]),) + yield ' length %s bytes\n' % (read_git_output(['cat-file', '-s', tagobject]),) - yield ' tagged by %s\n' % (tagger,) - yield ' on %s\n' % (tagged,) + yield ' by %s\n' % (tagger,) + yield ' on %s\n' % (tagged,) yield '\n' # Show the content of the tag message; this might contain a @@ -1914,6 +1938,9 @@ def __init__(self, environment, refname, short_refname, old, new, rev): class Mailer(object): """An object that can send emails.""" + def __init__(self, environment): + self.environment = environment + def send(self, lines, to_addrs): """Send an email consisting of lines. @@ -1948,14 +1975,14 @@ def find_sendmail(): 'Try setting multimailhook.sendmailCommand.' ) - def __init__(self, command=None, envelopesender=None): + def __init__(self, environment, command=None, envelopesender=None): """Construct a SendMailer instance. command should be the command and arguments used to invoke sendmail, as a list of strings. If an envelopesender is provided, it will also be passed to the command, via '-f envelopesender'.""" - + super(SendMailer, self).__init__(environment) if command: self.command = command[:] else: @@ -1968,7 +1995,7 @@ def send(self, lines, to_addrs): try: p = subprocess.Popen(self.command, stdin=subprocess.PIPE) except OSError: - sys.stderr.write( + self.environment.get_logger().error( '*** Cannot execute command: %s\n' % ' '.join(self.command) + '*** %s\n' % sys.exc_info()[1] + '*** Try setting multimailhook.mailer to "smtp"\n' + @@ -1979,15 +2006,16 @@ def send(self, lines, to_addrs): lines = (str_to_bytes(line) for line in lines) p.stdin.writelines(lines) except Exception: - sys.stderr.write( + self.environment.get_logger().error( '*** Error while generating commit email\n' '*** - mail sending aborted.\n' ) - try: + if hasattr(p, 'terminate'): # subprocess.terminate() is not available in Python 2.4 p.terminate() - except AttributeError: - pass + else: + import signal + os.kill(p.pid, signal.SIGTERM) raise else: p.stdin.close() @@ -1999,14 +2027,16 @@ def send(self, lines, to_addrs): class SMTPMailer(Mailer): """Send emails using Python's smtplib.""" - def __init__(self, envelopesender, smtpserver, + def __init__(self, environment, + envelopesender, smtpserver, smtpservertimeout=10.0, smtpserverdebuglevel=0, smtpencryption='none', smtpuser='', smtppass='', smtpcacerts='' ): + super(SMTPMailer, self).__init__(environment) if not envelopesender: - sys.stderr.write( + self.environment.get_logger().error( 'fatal: git_multimail: cannot use SMTPMailer without a sender address.\n' 'please set either multimailhook.envelopeSender or user.email\n' ) @@ -2041,7 +2071,7 @@ def call(klass, server, timeout): self.smtp = call(smtplib.SMTP_SSL, self.smtpserver, timeout=self.smtpservertimeout) elif self.security == 'tls': if 'ssl' not in sys.modules: - sys.stderr.write( + self.environment.get_logger().error( '*** Your Python version does not have the ssl library installed\n' '*** smtpEncryption=tls is not available.\n' '*** Either upgrade Python to 2.6 or later\n' @@ -2071,7 +2101,7 @@ def call(klass, server, timeout): self.smtp.sock, cert_reqs=ssl.CERT_NONE ) - sys.stderr.write( + self.environment.get_logger().error( '*** Warning, the server certificat is not verified (smtp) ***\n' '*** set the option smtpCACerts ***\n' ) @@ -2094,10 +2124,10 @@ def call(klass, server, timeout): % self.smtpserverdebuglevel) self.smtp.set_debuglevel(self.smtpserverdebuglevel) except Exception: - sys.stderr.write( + self.environment.get_logger().error( '*** Error establishing SMTP connection to %s ***\n' - % self.smtpserver) - sys.stderr.write('*** %s\n' % sys.exc_info()[1]) + '*** %s\n' + % (self.smtpserver, sys.exc_info()[1])) sys.exit(1) def __del__(self): @@ -2115,10 +2145,11 @@ def send(self, lines, to_addrs): to_addrs = [email for (name, email) in getaddresses([to_addrs])] self.smtp.sendmail(self.envelopesender, to_addrs, msg) except smtplib.SMTPResponseException: - sys.stderr.write('*** Error sending email ***\n') err = sys.exc_info()[1] - sys.stderr.write('*** Error %d: %s\n' % (err.smtp_code, - bytes_to_str(err.smtp_error))) + self.environment.get_logger().error( + '*** Error sending email ***\n' + '*** Error %d: %s\n' + % (err.smtp_code, bytes_to_str(err.smtp_error))) try: smtp = self.smtp # delete the field before quit() so that in case of @@ -2126,9 +2157,10 @@ def send(self, lines, to_addrs): del self.smtp smtp.quit() except: - sys.stderr.write('*** Error closing the SMTP connection ***\n') - sys.stderr.write('*** Exiting anyway ... ***\n') - sys.stderr.write('*** %s\n' % sys.exc_info()[1]) + self.environment.get_logger().error( + '*** Error closing the SMTP connection ***\n' + '*** Exiting anyway ... ***\n' + '*** %s\n' % sys.exc_info()[1]) sys.exit(1) @@ -2250,6 +2282,11 @@ class Environment(object): to send and when computing what commits are considered new to the repository. Default is "^refs/notes/". + get_max_subject_length() + + Return an int giving the maximal length for the subject + (git log --oneline). + They should also define the following attributes: announce_show_shortlog (bool) @@ -2324,6 +2361,15 @@ class Environment(object): multimailhook.fromRefchange and multimailhook.fromCommit by ConfigEnvironmentMixin. + log_file, error_log_file, debug_log_file (string) + + Name of a file to which logs should be sent. + + verbose (int) + + How verbose the system should be. + - 0 (default): show info, errors, ... + - 1 : show basic debug info """ REPO_NAME_RE = re.compile(r'^(?P.+?)(?:\.git)$') @@ -2346,6 +2392,7 @@ def __init__(self, osenv=None): self.quiet = False self.stdout = False self.combine_when_single_commit = True + self.logger = None self.COMPUTED_KEYS = [ 'administrator', @@ -2360,6 +2407,12 @@ def __init__(self, osenv=None): self._values = None + def get_logger(self): + """Get (possibly creates) the logger associated to this environment.""" + if self.logger is None: + self.logger = Logger(self) + return self.logger + def get_repo_shortname(self): """Use the last part of the repo path, with ".git" stripped off if present.""" @@ -2467,6 +2520,11 @@ def get_default_ref_ignore_regex(self): # which we simply do not have right now. return "^refs/notes/" + def get_max_subject_length(self): + """Return the maximal subject line (git log --oneline) length. + Longer subject lines will be truncated.""" + raise NotImplementedError() + def filter_body(self, lines): """Filter the lines intended for an email body. @@ -2482,19 +2540,22 @@ def log_msg(self, msg): """Write the string msg on a log file or on stderr. Sends the text to stderr by default, override to change the behavior.""" - write_str(sys.stderr, msg) + self.get_logger().info(msg) def log_warning(self, msg): """Write the string msg on a log file or on stderr. Sends the text to stderr by default, override to change the behavior.""" - write_str(sys.stderr, msg) + self.get_logger().warning(msg) def log_error(self, msg): """Write the string msg on a log file or on stderr. Sends the text to stderr by default, override to change the behavior.""" - write_str(sys.stderr, msg) + self.get_logger().error(msg) + + def check(self): + pass class ConfigEnvironmentMixin(Environment): @@ -2613,6 +2674,14 @@ def __init__(self, config, **kw): if combine is not None: self.combine_when_single_commit = combine + self.log_file = config.get('logFile', default=None) + self.error_log_file = config.get('errorLogFile', default=None) + self.debug_log_file = config.get('debugLogFile', default=None) + if config.get_bool('Verbose', default=False): + self.verbose = 1 + else: + self.verbose = 0 + def get_administrator(self): return ( self.config.get('administrator') or @@ -2631,11 +2700,21 @@ def get_emailprefix(self): if emailprefix is not None: emailprefix = emailprefix.strip() if emailprefix: - return emailprefix + ' ' - else: - return '' + emailprefix += ' ' else: - return '[%s] ' % (self.get_repo_shortname(),) + emailprefix = '[%(repo_shortname)s] ' + short_name = self.get_repo_shortname() + try: + return emailprefix % {'repo_shortname': short_name} + except: + self.get_logger().error( + '*** Invalid multimailhook.emailPrefix: %s\n' % emailprefix + + '*** %s\n' % sys.exc_info()[1] + + "*** Only the '%(repo_shortname)s' placeholder is allowed\n" + ) + raise ConfigurationException( + '"%s" is not an allowed setting for emailPrefix' % emailprefix + ) def get_sender(self): return self.config.get('envelopesender') @@ -2656,9 +2735,9 @@ def process_addr(self, addr, change): def get_fromaddr(self, change=None): fromaddr = self.config.get('from') if change: - alt_fromaddr = change.get_alt_fromaddr() - if alt_fromaddr: - fromaddr = alt_fromaddr + specific_fromaddr = change.get_specific_fromaddr() + if specific_fromaddr: + fromaddr = specific_fromaddr if fromaddr: fromaddr = self.process_addr(fromaddr, change) if fromaddr: @@ -2684,7 +2763,7 @@ def get_scancommitforcc(self): class FilterLinesEnvironmentMixin(Environment): """Handle encoding and maximum line length of body lines. - emailmaxlinelength (int or None) + email_max_line_length (int or None) The maximum length of any single line in the email body. Longer lines are truncated at that length with ' [...]' @@ -2699,10 +2778,13 @@ class FilterLinesEnvironmentMixin(Environment): """ - def __init__(self, strict_utf8=True, emailmaxlinelength=500, **kw): + def __init__(self, strict_utf8=True, + email_max_line_length=500, max_subject_length=500, + **kw): super(FilterLinesEnvironmentMixin, self).__init__(**kw) self.__strict_utf8 = strict_utf8 - self.__emailmaxlinelength = emailmaxlinelength + self.__email_max_line_length = email_max_line_length + self.__max_subject_length = max_subject_length def filter_body(self, lines): lines = super(FilterLinesEnvironmentMixin, self).filter_body(lines) @@ -2711,15 +2793,18 @@ def filter_body(self, lines): lines = (line.decode(ENCODING, 'replace') for line in lines) # Limit the line length in Unicode-space to avoid # splitting characters: - if self.__emailmaxlinelength: - lines = limit_linelength(lines, self.__emailmaxlinelength) + if self.__email_max_line_length > 0: + lines = limit_linelength(lines, self.__email_max_line_length) if not PYTHON3: lines = (line.encode(ENCODING, 'replace') for line in lines) - elif self.__emailmaxlinelength: - lines = limit_linelength(lines, self.__emailmaxlinelength) + elif self.__email_max_line_length: + lines = limit_linelength(lines, self.__email_max_line_length) return lines + def get_max_subject_length(self): + return self.__max_subject_length + class ConfigFilterLinesEnvironmentMixin( ConfigEnvironmentMixin, @@ -2732,9 +2817,13 @@ def __init__(self, config, **kw): if strict_utf8 is not None: kw['strict_utf8'] = strict_utf8 - emailmaxlinelength = config.get('emailmaxlinelength') - if emailmaxlinelength is not None: - kw['emailmaxlinelength'] = int(emailmaxlinelength) + email_max_line_length = config.get('emailmaxlinelength') + if email_max_line_length is not None: + kw['email_max_line_length'] = int(email_max_line_length) + + max_subject_length = config.get('subjectMaxLength', default=email_max_line_length) + if max_subject_length is not None: + kw['max_subject_length'] = int(max_subject_length) super(ConfigFilterLinesEnvironmentMixin, self).__init__( config=config, **kw @@ -2750,7 +2839,7 @@ def __init__(self, emailmaxlines, **kw): def filter_body(self, lines): lines = super(MaxlinesEnvironmentMixin, self).filter_body(lines) - if self.__emailmaxlines: + if self.__emailmaxlines > 0: lines = limit_lines(lines, self.__emailmaxlines) return lines @@ -2843,25 +2932,64 @@ def __init__( # actual *contents* of the change being reported, we only # choose based on the *type* of the change. Therefore we can # compute them once and for all: - if not (refchange_recipients or - announce_recipients or - revision_recipients or - scancommitforcc): - raise ConfigurationException('No email recipients configured!') self.__refchange_recipients = refchange_recipients self.__announce_recipients = announce_recipients self.__revision_recipients = revision_recipients + def check(self): + if not (self.get_refchange_recipients(None) or + self.get_announce_recipients(None) or + self.get_revision_recipients(None) or + self.get_scancommitforcc()): + raise ConfigurationException('No email recipients configured!') + super(StaticRecipientsEnvironmentMixin, self).check() + def get_refchange_recipients(self, refchange): + if self.__refchange_recipients is None: + return super(StaticRecipientsEnvironmentMixin, + self).get_refchange_recipients(refchange) return self.__refchange_recipients def get_announce_recipients(self, annotated_tag_change): + if self.__announce_recipients is None: + return super(StaticRecipientsEnvironmentMixin, + self).get_refchange_recipients(annotated_tag_change) return self.__announce_recipients def get_revision_recipients(self, revision): + if self.__revision_recipients is None: + return super(StaticRecipientsEnvironmentMixin, + self).get_refchange_recipients(revision) return self.__revision_recipients +class CLIRecipientsEnvironmentMixin(Environment): + """Mixin storing recipients information comming from the + command-line.""" + + def __init__(self, cli_recipients=None, **kw): + super(CLIRecipientsEnvironmentMixin, self).__init__(**kw) + self.__cli_recipients = cli_recipients + + def get_refchange_recipients(self, refchange): + if self.__cli_recipients is None: + return super(CLIRecipientsEnvironmentMixin, + self).get_refchange_recipients(refchange) + return self.__cli_recipients + + def get_announce_recipients(self, annotated_tag_change): + if self.__cli_recipients is None: + return super(CLIRecipientsEnvironmentMixin, + self).get_announce_recipients(annotated_tag_change) + return self.__cli_recipients + + def get_revision_recipients(self, revision): + if self.__cli_recipients is None: + return super(CLIRecipientsEnvironmentMixin, + self).get_revision_recipients(revision) + return self.__cli_recipients + + class ConfigRecipientsEnvironmentMixin( ConfigEnvironmentMixin, StaticRecipientsEnvironmentMixin @@ -2935,24 +3063,20 @@ def __init__(self, ref_filter_incl_regex, ref_filter_excl_regex, if ref_filter_do_send_regex and ref_filter_dont_send_regex: raise ConfigurationException( "Cannot specify both a ref doSend and dontSend regex.") - if ref_filter_do_send_regex or ref_filter_dont_send_regex: - self.__is_do_send_filter = bool(ref_filter_do_send_regex) - if ref_filter_incl_regex: - ref_filter_send_regex = ref_filter_incl_regex - elif ref_filter_excl_regex: - ref_filter_send_regex = ref_filter_excl_regex - else: - ref_filter_send_regex = '.*' - self.__is_do_send_filter = True - try: - self.__send_compiled_regex = re.compile(ref_filter_send_regex) - except Exception: - raise ConfigurationException( - 'Invalid Ref Filter Regex "%s": %s' % - (ref_filter_send_regex, sys.exc_info()[1])) + self.__is_do_send_filter = bool(ref_filter_do_send_regex) + if ref_filter_do_send_regex: + ref_filter_send_regex = ref_filter_do_send_regex + elif ref_filter_dont_send_regex: + ref_filter_send_regex = ref_filter_dont_send_regex else: - self.__send_compiled_regex = self.__compiled_regex - self.__is_do_send_filter = self.__is_inclusion_filter + ref_filter_send_regex = '.*' + self.__is_do_send_filter = True + try: + self.__send_compiled_regex = re.compile(ref_filter_send_regex) + except Exception: + raise ConfigurationException( + 'Invalid Ref Filter Regex "%s": %s' % + (ref_filter_send_regex, sys.exc_info()[1])) def get_ref_filter_regex(self, send_filter=False): if send_filter: @@ -3023,34 +3147,21 @@ def get_pusher(self): return self.osenv.get('USER', self.osenv.get('USERNAME', 'unknown user')) -class GenericEnvironment( - ProjectdescEnvironmentMixin, - ConfigMaxlinesEnvironmentMixin, - ComputeFQDNEnvironmentMixin, - ConfigFilterLinesEnvironmentMixin, - ConfigRecipientsEnvironmentMixin, - ConfigRefFilterEnvironmentMixin, - PusherDomainEnvironmentMixin, - ConfigOptionsEnvironmentMixin, - GenericEnvironmentMixin, - Environment, - ): - pass +class GitoliteEnvironmentHighPrecMixin(Environment): + def get_pusher(self): + return self.osenv.get('GL_USER', 'unknown user') -class GitoliteEnvironmentMixin(Environment): +class GitoliteEnvironmentLowPrecMixin(Environment): def get_repo_shortname(self): # The gitolite environment variable $GL_REPO is a pretty good # repo_shortname (though it's probably not as good as a value # the user might have explicitly put in his config). return ( self.osenv.get('GL_REPO', None) or - super(GitoliteEnvironmentMixin, self).get_repo_shortname() + super(GitoliteEnvironmentLowPrecMixin, self).get_repo_shortname() ) - def get_pusher(self): - return self.osenv.get('GL_USER', 'unknown user') - def get_fromaddr(self, change=None): GL_USER = self.osenv.get('GL_USER') if GL_USER is not None: @@ -3088,7 +3199,7 @@ def get_fromaddr(self, change=None): return m.group(1) finally: f.close() - return super(GitoliteEnvironmentMixin, self).get_fromaddr(change) + return super(GitoliteEnvironmentLowPrecMixin, self).get_fromaddr(change) class IncrementalDateTime(object): @@ -3109,67 +3220,43 @@ def __next__(self): return formatted -class GitoliteEnvironment( - ProjectdescEnvironmentMixin, - ConfigMaxlinesEnvironmentMixin, - ComputeFQDNEnvironmentMixin, - ConfigFilterLinesEnvironmentMixin, - ConfigRecipientsEnvironmentMixin, - ConfigRefFilterEnvironmentMixin, - PusherDomainEnvironmentMixin, - ConfigOptionsEnvironmentMixin, - GitoliteEnvironmentMixin, - Environment, - ): - pass - - -class StashEnvironmentMixin(Environment): +class StashEnvironmentHighPrecMixin(Environment): def __init__(self, user=None, repo=None, **kw): - super(StashEnvironmentMixin, self).__init__(**kw) + super(StashEnvironmentHighPrecMixin, + self).__init__(user=user, repo=repo, **kw) self.__user = user self.__repo = repo - def get_repo_shortname(self): - return self.__repo - def get_pusher(self): return re.match('(.*?)\s*<', self.__user).group(1) def get_pusher_email(self): return self.__user - def get_fromaddr(self, change=None): - return self.__user +class StashEnvironmentLowPrecMixin(Environment): + def __init__(self, user=None, repo=None, **kw): + super(StashEnvironmentLowPrecMixin, self).__init__(**kw) + self.__repo = repo + self.__user = user -class StashEnvironment( - StashEnvironmentMixin, - ProjectdescEnvironmentMixin, - ConfigMaxlinesEnvironmentMixin, - ComputeFQDNEnvironmentMixin, - ConfigFilterLinesEnvironmentMixin, - ConfigRecipientsEnvironmentMixin, - ConfigRefFilterEnvironmentMixin, - PusherDomainEnvironmentMixin, - ConfigOptionsEnvironmentMixin, - Environment, - ): - pass + def get_repo_shortname(self): + return self.__repo + + def get_fromaddr(self, change=None): + return self.__user -class GerritEnvironmentMixin(Environment): +class GerritEnvironmentHighPrecMixin(Environment): def __init__(self, project=None, submitter=None, update_method=None, **kw): - super(GerritEnvironmentMixin, self).__init__(**kw) + super(GerritEnvironmentHighPrecMixin, + self).__init__(submitter=submitter, project=project, **kw) self.__project = project self.__submitter = submitter self.__update_method = update_method "Make an 'update_method' value available for templates." self.COMPUTED_KEYS += ['update_method'] - def get_repo_shortname(self): - return self.__project - def get_pusher(self): if self.__submitter: if self.__submitter.find('<') != -1: @@ -3192,16 +3279,10 @@ def get_pusher_email(self): if self.__submitter: return self.__submitter else: - return super(GerritEnvironmentMixin, self).get_pusher_email() - - def get_fromaddr(self, change=None): - if self.__submitter and self.__submitter.find('<') != -1: - return self.__submitter - else: - return super(GerritEnvironmentMixin, self).get_fromaddr(change) + return super(GerritEnvironmentHighPrecMixin, self).get_pusher_email() def get_default_ref_ignore_regex(self): - default = super(GerritEnvironmentMixin, self).get_default_ref_ignore_regex() + default = super(GerritEnvironmentHighPrecMixin, self).get_default_ref_ignore_regex() return default + '|^refs/changes/|^refs/cache-automerge/|^refs/meta/' def get_revision_recipients(self, revision): @@ -3214,25 +3295,26 @@ def get_revision_recipients(self, revision): if committer == 'Gerrit Code Review': return [] else: - return super(GerritEnvironmentMixin, self).get_revision_recipients(revision) + return super(GerritEnvironmentHighPrecMixin, self).get_revision_recipients(revision) def get_update_method(self): return self.__update_method -class GerritEnvironment( - GerritEnvironmentMixin, - ProjectdescEnvironmentMixin, - ConfigMaxlinesEnvironmentMixin, - ComputeFQDNEnvironmentMixin, - ConfigFilterLinesEnvironmentMixin, - ConfigRecipientsEnvironmentMixin, - ConfigRefFilterEnvironmentMixin, - PusherDomainEnvironmentMixin, - ConfigOptionsEnvironmentMixin, - Environment, - ): - pass +class GerritEnvironmentLowPrecMixin(Environment): + def __init__(self, project=None, submitter=None, **kw): + super(GerritEnvironmentLowPrecMixin, self).__init__(**kw) + self.__project = project + self.__submitter = submitter + + def get_repo_shortname(self): + return self.__project + + def get_fromaddr(self, change=None): + if self.__submitter and self.__submitter.find('<') != -1: + return self.__submitter + else: + return super(GerritEnvironmentLowPrecMixin, self).get_fromaddr(change) class Push(object): @@ -3498,13 +3580,13 @@ def send_emails(self, mailer, body_filter=None): if not change.recipients: change.environment.log_warning( '*** no recipients configured so no email will be sent\n' - '*** for %r update %s->%s\n' + '*** for %r update %s->%s' % (change.refname, change.old.sha1, change.new.sha1,) ) else: if not change.environment.quiet: change.environment.log_msg( - 'Sending notification emails to: %s\n' % (change.recipients,)) + 'Sending notification emails to: %s' % (change.recipients,)) extra_values = {'send_date': next(send_date)} rev = change.send_single_combined_email(sha1s) @@ -3527,14 +3609,14 @@ def send_emails(self, mailer, body_filter=None): change.environment.log_warning( '*** Too many new commits (%d), not sending commit emails.\n' % len(sha1s) + '*** Try setting multimailhook.maxCommitEmails to a greater value\n' + - '*** Currently, multimailhook.maxCommitEmails=%d\n' % max_emails + '*** Currently, multimailhook.maxCommitEmails=%d' % max_emails ) return for (num, sha1) in enumerate(sha1s): rev = Revision(change, GitObject(sha1), num=num + 1, tot=len(sha1s)) if not rev.recipients and rev.cc_recipients: - change.environment.log_msg('*** Replacing Cc: with To:\n') + change.environment.log_msg('*** Replacing Cc: with To:') rev.recipients = rev.cc_recipients rev.cc_recipients = None if rev.recipients: @@ -3548,7 +3630,7 @@ def send_emails(self, mailer, body_filter=None): if unhandled_sha1s: change.environment.log_error( 'ERROR: No emails were sent for the following new commits:\n' - ' %s\n' + ' %s' % ('\n '.join(sorted(unhandled_sha1s)),) ) @@ -3562,12 +3644,23 @@ def include_ref(refname, ref_filter_regex, is_inclusion_filter): def run_as_post_receive_hook(environment, mailer): - ref_filter_regex, is_inclusion_filter = environment.get_ref_filter_regex(True) + environment.check() + send_filter_regex, send_is_inclusion_filter = environment.get_ref_filter_regex(True) + ref_filter_regex, is_inclusion_filter = environment.get_ref_filter_regex(False) changes = [] - for line in sys.stdin: + while True: + line = read_line(sys.stdin) + if line == '': + break (oldrev, newrev, refname) = line.strip().split(' ', 2) + environment.get_logger().debug( + "run_as_post_receive_hook: oldrev=%s, newrev=%s, refname=%s" % + (oldrev, newrev, refname)) + if not include_ref(refname, ref_filter_regex, is_inclusion_filter): continue + if not include_ref(refname, send_filter_regex, send_is_inclusion_filter): + continue changes.append( ReferenceChange.create(environment, oldrev, newrev, refname) ) @@ -3579,9 +3672,13 @@ def run_as_post_receive_hook(environment, mailer): def run_as_update_hook(environment, mailer, refname, oldrev, newrev, force_send=False): - ref_filter_regex, is_inclusion_filter = environment.get_ref_filter_regex(True) + environment.check() + send_filter_regex, send_is_inclusion_filter = environment.get_ref_filter_regex(True) + ref_filter_regex, is_inclusion_filter = environment.get_ref_filter_regex(False) if not include_ref(refname, ref_filter_regex, is_inclusion_filter): return + if not include_ref(refname, send_filter_regex, send_is_inclusion_filter): + return changes = [ ReferenceChange.create( environment, @@ -3596,6 +3693,75 @@ def run_as_update_hook(environment, mailer, refname, oldrev, newrev, force_send= mailer.__del__() +def check_ref_filter(environment): + send_filter_regex, send_is_inclusion = environment.get_ref_filter_regex(True) + ref_filter_regex, ref_is_inclusion = environment.get_ref_filter_regex(False) + + def inc_exc_lusion(b): + if b: + return 'inclusion' + else: + return 'exclusion' + + if send_filter_regex: + sys.stdout.write("DoSend/DontSend filter regex (" + + (inc_exc_lusion(send_is_inclusion)) + + '): ' + send_filter_regex.pattern + + '\n') + if send_filter_regex: + sys.stdout.write("Include/Exclude filter regex (" + + (inc_exc_lusion(ref_is_inclusion)) + + '): ' + ref_filter_regex.pattern + + '\n') + sys.stdout.write(os.linesep) + + sys.stdout.write( + "Refs marked as EXCLUDE are excluded by either refFilterInclusionRegex\n" + "or refFilterExclusionRegex. No emails will be sent for commits included\n" + "in these refs.\n" + "Refs marked as DONT-SEND are excluded by either refFilterDoSendRegex or\n" + "refFilterDontSendRegex, but not by either refFilterInclusionRegex or\n" + "refFilterExclusionRegex. Emails will be sent for commits included in these\n" + "refs only when the commit reaches a ref which isn't excluded.\n" + "Refs marked as DO-SEND are not excluded by any filter. Emails will\n" + "be sent normally for commits included in these refs.\n") + + sys.stdout.write(os.linesep) + + for refname in read_git_lines(['for-each-ref', '--format', '%(refname)']): + sys.stdout.write(refname) + if not include_ref(refname, ref_filter_regex, ref_is_inclusion): + sys.stdout.write(' EXCLUDE') + elif not include_ref(refname, send_filter_regex, send_is_inclusion): + sys.stdout.write(' DONT-SEND') + else: + sys.stdout.write(' DO-SEND') + + sys.stdout.write(os.linesep) + + +def show_env(environment, out): + out.write('Environment values:\n') + for (k, v) in sorted(environment.get_values().items()): + if k: # Don't show the {'' : ''} pair. + out.write(' %s : %r\n' % (k, v)) + out.write('\n') + # Flush to avoid interleaving with further log output + out.flush() + + +def check_setup(environment): + environment.check() + show_env(environment, sys.stdout) + sys.stdout.write("Now, checking that git-multimail's standard input " + "is properly set ..." + os.linesep) + sys.stdout.write("Please type some text and then press Return" + os.linesep) + stdin = sys.stdin.readline() + sys.stdout.write("You have just entered:" + os.linesep) + sys.stdout.write(stdin) + sys.stdout.write("git-multimail seems properly set up." + os.linesep) + + def choose_mailer(config, environment): mailer = config.get('mailer', default='sendmail') @@ -3608,6 +3774,7 @@ def choose_mailer(config, environment): smtppass = config.get('smtppass', default='') smtpcacerts = config.get('smtpcacerts', default='') mailer = SMTPMailer( + environment, envelopesender=(environment.get_sender() or environment.get_fromaddr()), smtpserver=smtpserver, smtpservertimeout=smtpservertimeout, smtpserverdebuglevel=smtpserverdebuglevel, @@ -3620,43 +3787,41 @@ def choose_mailer(config, environment): command = config.get('sendmailcommand') if command: command = shlex.split(command) - mailer = SendMailer(command=command, envelopesender=environment.get_sender()) + mailer = SendMailer(environment, + command=command, envelopesender=environment.get_sender()) else: environment.log_error( 'fatal: multimailhook.mailer is set to an incorrect value: "%s"\n' % mailer + - 'please use one of "smtp" or "sendmail".\n' + 'please use one of "smtp" or "sendmail".' ) sys.exit(1) return mailer KNOWN_ENVIRONMENTS = { - 'generic': GenericEnvironmentMixin, - 'gitolite': GitoliteEnvironmentMixin, - 'stash': StashEnvironmentMixin, - 'gerrit': GerritEnvironmentMixin, + 'generic': {'highprec': GenericEnvironmentMixin}, + 'gitolite': {'highprec': GitoliteEnvironmentHighPrecMixin, + 'lowprec': GitoliteEnvironmentLowPrecMixin}, + 'stash': {'highprec': StashEnvironmentHighPrecMixin, + 'lowprec': StashEnvironmentLowPrecMixin}, + 'gerrit': {'highprec': GerritEnvironmentHighPrecMixin, + 'lowprec': GerritEnvironmentLowPrecMixin}, } def choose_environment(config, osenv=None, env=None, recipients=None, hook_info=None): + env_name = choose_environment_name(config, env, osenv) + environment_klass = build_environment_klass(env_name) + env = build_environment(environment_klass, env_name, config, + osenv, recipients, hook_info) + return env + + +def choose_environment_name(config, env, osenv): if not osenv: osenv = os.environ - environment_mixins = [ - ConfigRefFilterEnvironmentMixin, - ProjectdescEnvironmentMixin, - ConfigMaxlinesEnvironmentMixin, - ComputeFQDNEnvironmentMixin, - ConfigFilterLinesEnvironmentMixin, - PusherDomainEnvironmentMixin, - ConfigOptionsEnvironmentMixin, - ] - environment_kw = { - 'osenv': osenv, - 'config': config, - } - if not env: env = config.get('environment') @@ -3665,8 +3830,58 @@ def choose_environment(config, osenv=None, env=None, recipients=None, env = 'gitolite' else: env = 'generic' + return env + + +COMMON_ENVIRONMENT_MIXINS = [ + ConfigRecipientsEnvironmentMixin, + CLIRecipientsEnvironmentMixin, + ConfigRefFilterEnvironmentMixin, + ProjectdescEnvironmentMixin, + ConfigMaxlinesEnvironmentMixin, + ComputeFQDNEnvironmentMixin, + ConfigFilterLinesEnvironmentMixin, + PusherDomainEnvironmentMixin, + ConfigOptionsEnvironmentMixin, + ] + + +def build_environment_klass(env_name): + if 'class' in KNOWN_ENVIRONMENTS[env_name]: + return KNOWN_ENVIRONMENTS[env_name]['class'] + + environment_mixins = [] + known_env = KNOWN_ENVIRONMENTS[env_name] + if 'highprec' in known_env: + high_prec_mixin = known_env['highprec'] + environment_mixins.append(high_prec_mixin) + environment_mixins = environment_mixins + COMMON_ENVIRONMENT_MIXINS + if 'lowprec' in known_env: + low_prec_mixin = known_env['lowprec'] + environment_mixins.append(low_prec_mixin) + environment_mixins.append(Environment) + klass_name = env_name.capitalize() + 'Environement' + environment_klass = type( + klass_name, + tuple(environment_mixins), + {}, + ) + KNOWN_ENVIRONMENTS[env_name]['class'] = environment_klass + return environment_klass + - environment_mixins.insert(0, KNOWN_ENVIRONMENTS[env]) +GerritEnvironment = build_environment_klass('gerrit') +StashEnvironment = build_environment_klass('stash') +GitoliteEnvironment = build_environment_klass('gitolite') +GenericEnvironment = build_environment_klass('generic') + + +def build_environment(environment_klass, env, config, + osenv, recipients, hook_info): + environment_kw = { + 'osenv': osenv, + 'config': config, + } if env == 'stash': environment_kw['user'] = hook_info['stash_user'] @@ -3676,20 +3891,8 @@ def choose_environment(config, osenv=None, env=None, recipients=None, environment_kw['submitter'] = hook_info['submitter'] environment_kw['update_method'] = hook_info['update_method'] - if recipients: - environment_mixins.insert(0, StaticRecipientsEnvironmentMixin) - environment_kw['refchange_recipients'] = recipients - environment_kw['announce_recipients'] = recipients - environment_kw['revision_recipients'] = recipients - environment_kw['scancommitforcc'] = config.get('scancommitforcc') - else: - environment_mixins.insert(0, ConfigRecipientsEnvironmentMixin) + environment_kw['cli_recipients'] = recipients - environment_klass = type( - 'EffectiveEnvironment', - tuple(environment_mixins) + (Environment,), - {}, - ) return environment_klass(**environment_kw) @@ -3710,7 +3913,8 @@ def get_version(): return __version__ -def compute_gerrit_options(options, args, required_gerrit_options): +def compute_gerrit_options(options, args, required_gerrit_options, + raw_refname): if None in required_gerrit_options: raise SystemExit("Error: Specify all of --oldrev, --newrev, --refname, " "and --project; or none of them.") @@ -3727,24 +3931,11 @@ def compute_gerrit_options(options, args, required_gerrit_options): # Gerrit oddly omits 'refs/heads/' in the refname when calling # ref-updated hook; put it back. git_dir = get_git_dir() - if (not os.path.exists(os.path.join(git_dir, options.refname)) and + if (not os.path.exists(os.path.join(git_dir, raw_refname)) and os.path.exists(os.path.join(git_dir, 'refs', 'heads', - options.refname))): + raw_refname))): options.refname = 'refs/heads/' + options.refname - # Convert each string option unicode for Python3. - if PYTHON3: - opts = ['environment', 'recipients', 'oldrev', 'newrev', 'refname', - 'project', 'submitter', 'stash-user', 'stash-repo'] - for opt in opts: - if not hasattr(options, opt): - continue - obj = getattr(options, opt) - if obj: - enc = obj.encode('utf-8', 'surrogateescape') - dec = enc.decode('utf-8', 'replace') - setattr(options, opt, dec) - # New revisions can appear in a gerrit repository either due to someone # pushing directly (in which case options.submitter will be set), or they # can press "Submit this patchset" in the web UI for some CR (in which @@ -3784,6 +3975,20 @@ def compute_gerrit_options(options, args, required_gerrit_options): def check_hook_specific_args(options, args): + raw_refname = options.refname + # Convert each string option unicode for Python3. + if PYTHON3: + opts = ['environment', 'recipients', 'oldrev', 'newrev', 'refname', + 'project', 'submitter', 'stash_user', 'stash_repo'] + for opt in opts: + if not hasattr(options, opt): + continue + obj = getattr(options, opt) + if obj: + enc = obj.encode('utf-8', 'surrogateescape') + dec = enc.decode('utf-8', 'replace') + setattr(options, opt, dec) + # First check for stash arguments if (options.stash_user is None) != (options.stash_repo is None): raise SystemExit("Error: Specify both of --stash-user and " @@ -3797,12 +4002,78 @@ def check_hook_specific_args(options, args): required_gerrit_options = (options.oldrev, options.newrev, options.refname, options.project) if required_gerrit_options != (None,) * 4: - return compute_gerrit_options(options, args, required_gerrit_options) + return compute_gerrit_options(options, args, required_gerrit_options, + raw_refname) # No special options in use, just return what we started with return options, args, {} +class Logger(object): + def parse_verbose(self, verbose): + if verbose > 0: + return logging.DEBUG + else: + return logging.INFO + + def create_log_file(self, environment, name, path, verbosity): + log_file = logging.getLogger(name) + file_handler = logging.FileHandler(path) + log_fmt = logging.Formatter("%(asctime)s [%(levelname)-5.5s] %(message)s") + file_handler.setFormatter(log_fmt) + log_file.addHandler(file_handler) + log_file.setLevel(verbosity) + return log_file + + def __init__(self, environment): + self.environment = environment + self.loggers = [] + stderr_log = logging.getLogger('git_multimail.stderr') + + class EncodedStderr(object): + def write(self, x): + write_str(sys.stderr, x) + + def flush(self): + sys.stderr.flush() + + stderr_handler = logging.StreamHandler(EncodedStderr()) + stderr_log.addHandler(stderr_handler) + stderr_log.setLevel(self.parse_verbose(environment.verbose)) + self.loggers.append(stderr_log) + + if environment.debug_log_file is not None: + debug_log_file = self.create_log_file( + environment, 'git_multimail.debug', environment.debug_log_file, logging.DEBUG) + self.loggers.append(debug_log_file) + + if environment.log_file is not None: + log_file = self.create_log_file( + environment, 'git_multimail.file', environment.log_file, logging.INFO) + self.loggers.append(log_file) + + if environment.error_log_file is not None: + error_log_file = self.create_log_file( + environment, 'git_multimail.error', environment.error_log_file, logging.ERROR) + self.loggers.append(error_log_file) + + def info(self, msg): + for l in self.loggers: + l.info(msg) + + def debug(self, msg): + for l in self.loggers: + l.debug(msg) + + def warning(self, msg): + for l in self.loggers: + l.warning(msg) + + def error(self, msg): + for l in self.loggers: + l.error(msg) + + def main(args): parser = optparse.OptionParser( description=__doc__, @@ -3829,7 +4100,7 @@ def main(args): '--show-env', action='store_true', default=False, help=( 'Write to stderr the values determined for the environment ' - '(intended for debugging purposes).' + '(intended for debugging purposes), then proceed normally.' ), ) parser.add_option( @@ -3854,6 +4125,22 @@ def main(args): "Display git-multimail's version" ), ) + + parser.add_option( + '--python-version', action='store_true', default=False, + help=( + "Display the version of Python used by git-multimail" + ), + ) + + parser.add_option( + '--check-ref-filter', action='store_true', default=False, + help=( + 'List refs and show information on how git-multimail ' + 'will process them.' + ) + ) + # The following options permit this script to be run as a gerrit # ref-updated hook. See e.g. # code.google.com/p/gerrit/source/browse/Documentation/config-hooks.txt @@ -3880,11 +4167,16 @@ def main(args): sys.stdout.write('git-multimail version ' + get_version() + '\n') return + if options.python_version: + sys.stdout.write('Python version ' + sys.version + '\n') + return + if options.c: Config.add_config_parameters(options.c) config = Config('multimailhook') + environment = None try: environment = choose_environment( config, osenv=os.environ, @@ -3894,38 +4186,52 @@ def main(args): ) if options.show_env: - sys.stderr.write('Environment values:\n') - for (k, v) in sorted(environment.get_values().items()): - sys.stderr.write(' %s : %r\n' % (k, v)) - sys.stderr.write('\n') + show_env(environment, sys.stderr) if options.stdout or environment.stdout: mailer = OutputMailer(sys.stdout) else: mailer = choose_mailer(config, environment) + must_check_setup = os.environ.get('GIT_MULTIMAIL_CHECK_SETUP') + if must_check_setup == '': + must_check_setup = False + if options.check_ref_filter: + check_ref_filter(environment) + elif must_check_setup: + check_setup(environment) # Dual mode: if arguments were specified on the command line, run # like an update hook; otherwise, run as a post-receive hook. - if args: + elif args: if len(args) != 3: parser.error('Need zero or three non-option arguments') (refname, oldrev, newrev) = args + environment.get_logger().debug( + "run_as_update_hook: refname=%s, oldrev=%s, newrev=%s, force_send=%s" % + (refname, oldrev, newrev, options.force_send)) run_as_update_hook(environment, mailer, refname, oldrev, newrev, options.force_send) else: run_as_post_receive_hook(environment, mailer) except ConfigurationException: sys.exit(sys.exc_info()[1]) + except SystemExit: + raise except Exception: t, e, tb = sys.exc_info() import traceback - sys.stdout.write('\n') - sys.stdout.write('Exception \'' + t.__name__ + - '\' raised. Please report this as a bug to\n') - sys.stdout.write('https://github.com/git-multimail/git-multimail/issues\n') - sys.stdout.write('with the information below:\n\n') - sys.stdout.write('git-multimail version ' + get_version() + '\n') - sys.stdout.write('Python version ' + sys.version + '\n') - traceback.print_exc(file=sys.stdout) + sys.stderr.write('\n') # Avoid mixing message with previous output + msg = ( + 'Exception \'' + t.__name__ + + '\' raised. Please report this as a bug to\n' + 'https://github.com/git-multimail/git-multimail/issues\n' + 'with the information below:\n\n' + 'git-multimail version ' + get_version() + '\n' + 'Python version ' + sys.version + '\n' + + traceback.format_exc()) + try: + environment.get_logger().error(msg) + except: + sys.stderr.write(msg) sys.exit(1) if __name__ == '__main__': diff --git a/contrib/mw-to-git/.perlcriticrc b/contrib/mw-to-git/.perlcriticrc index 5a9955d757..158958d363 100644 --- a/contrib/mw-to-git/.perlcriticrc +++ b/contrib/mw-to-git/.perlcriticrc @@ -19,7 +19,7 @@ [InputOutput::RequireCheckedSyscalls] functions = open say close -# This rules demands to add a dependancy for the Readonly module. This is not +# This rule demands to add a dependency for the Readonly module. This is not # wished. [-ValuesAndExpressions::ProhibitConstantPragma] diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 8dd74a9a40..41e74fba1e 100755 --- a/contrib/mw-to-git/git-remote-mediawiki.perl +++ b/contrib/mw-to-git/git-remote-mediawiki.perl @@ -963,7 +963,7 @@ sub mw_upload_file { print {*STDERR} "Check the configuration of file uploads in your mediawiki.\n"; return $newrevid; } - # Deleting and uploading a file requires a priviledged user + # Deleting and uploading a file requires a privileged user if ($file_deleted) { $mediawiki = connect_maybe($mediawiki, $remotename, $url); my $query = { diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index b567eaeff9..dec085a235 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -4,8 +4,9 @@ # # Copyright (C) 2009 Avery Pennarun # -if [ $# -eq 0 ]; then - set -- -h +if test $# -eq 0 +then + set -- -h fi OPTS_SPEC="\ git subtree add --prefix= @@ -48,89 +49,144 @@ squash= message= prefix= -debug() -{ - if [ -n "$debug" ]; then +debug () { + if test -n "$debug" + then printf "%s\n" "$*" >&2 fi } -say() -{ - if [ -z "$quiet" ]; then +say () { + if test -z "$quiet" + then printf "%s\n" "$*" >&2 fi } -progress() -{ - if [ -z "$quiet" ]; then +progress () { + if test -z "$quiet" + then printf "%s\r" "$*" >&2 fi } -assert() -{ - if "$@"; then - : - else +assert () { + if ! "$@" + then die "assertion failed: " "$@" fi } -#echo "Options: $*" - -while [ $# -gt 0 ]; do +while test $# -gt 0 +do opt="$1" shift + case "$opt" in - -q) quiet=1 ;; - -d) debug=1 ;; - --annotate) annotate="$1"; shift ;; - --no-annotate) annotate= ;; - -b) branch="$1"; shift ;; - -P) prefix="${1%/}"; shift ;; - -m) message="$1"; shift ;; - --no-prefix) prefix= ;; - --onto) onto="$1"; shift ;; - --no-onto) onto= ;; - --rejoin) rejoin=1 ;; - --no-rejoin) rejoin= ;; - --ignore-joins) ignore_joins=1 ;; - --no-ignore-joins) ignore_joins= ;; - --squash) squash=1 ;; - --no-squash) squash= ;; - --) break ;; - *) die "Unexpected option: $opt" ;; + -q) + quiet=1 + ;; + -d) + debug=1 + ;; + --annotate) + annotate="$1" + shift + ;; + --no-annotate) + annotate= + ;; + -b) + branch="$1" + shift + ;; + -P) + prefix="${1%/}" + shift + ;; + -m) + message="$1" + shift + ;; + --no-prefix) + prefix= + ;; + --onto) + onto="$1" + shift + ;; + --no-onto) + onto= + ;; + --rejoin) + rejoin=1 + ;; + --no-rejoin) + rejoin= + ;; + --ignore-joins) + ignore_joins=1 + ;; + --no-ignore-joins) + ignore_joins= + ;; + --squash) + squash=1 + ;; + --no-squash) + squash= + ;; + --) + break + ;; + *) + die "Unexpected option: $opt" + ;; esac done command="$1" shift + case "$command" in - add|merge|pull) default= ;; - split|push) default="--default HEAD" ;; - *) die "Unknown command '$command'" ;; +add|merge|pull) + default= + ;; +split|push) + default="--default HEAD" + ;; +*) + die "Unknown command '$command'" + ;; esac -if [ -z "$prefix" ]; then +if test -z "$prefix" +then die "You must provide the --prefix option." fi case "$command" in - add) [ -e "$prefix" ] && - die "prefix '$prefix' already exists." ;; - *) [ -e "$prefix" ] || - die "'$prefix' does not exist; use 'git subtree add'" ;; +add) + test -e "$prefix" && + die "prefix '$prefix' already exists." + ;; +*) + test -e "$prefix" || + die "'$prefix' does not exist; use 'git subtree add'" + ;; esac dir="$(dirname "$prefix/.")" -if [ "$command" != "pull" -a "$command" != "add" -a "$command" != "push" ]; then +if test "$command" != "pull" && + test "$command" != "add" && + test "$command" != "push" +then revs=$(git rev-parse $default --revs-only "$@") || exit $? - dirs="$(git rev-parse --no-revs --no-flags "$@")" || exit $? - if [ -n "$dirs" ]; then + dirs=$(git rev-parse --no-revs --no-flags "$@") || exit $? + if test -n "$dirs" + then die "Error: Use --prefix instead of bare filenames." fi fi @@ -142,78 +198,82 @@ debug "dir: {$dir}" debug "opts: {$*}" debug -cache_setup() -{ +cache_setup () { cachedir="$GIT_DIR/subtree-cache/$$" - rm -rf "$cachedir" || die "Can't delete old cachedir: $cachedir" - mkdir -p "$cachedir" || die "Can't create new cachedir: $cachedir" - mkdir -p "$cachedir/notree" || die "Can't create new cachedir: $cachedir/notree" + rm -rf "$cachedir" || + die "Can't delete old cachedir: $cachedir" + mkdir -p "$cachedir" || + die "Can't create new cachedir: $cachedir" + mkdir -p "$cachedir/notree" || + die "Can't create new cachedir: $cachedir/notree" debug "Using cachedir: $cachedir" >&2 } -cache_get() -{ - for oldrev in $*; do - if [ -r "$cachedir/$oldrev" ]; then +cache_get () { + for oldrev in "$@" + do + if test -r "$cachedir/$oldrev" + then read newrev <"$cachedir/$oldrev" echo $newrev fi done } -cache_miss() -{ - for oldrev in $*; do - if [ ! -r "$cachedir/$oldrev" ]; then +cache_miss () { + for oldrev in "$@" + do + if ! test -r "$cachedir/$oldrev" + then echo $oldrev fi done } -check_parents() -{ - missed=$(cache_miss $*) - for miss in $missed; do - if [ ! -r "$cachedir/notree/$miss" ]; then +check_parents () { + missed=$(cache_miss "$@") + for miss in $missed + do + if ! test -r "$cachedir/notree/$miss" + then debug " incorrect order: $miss" fi done } -set_notree() -{ +set_notree () { echo "1" > "$cachedir/notree/$1" } -cache_set() -{ +cache_set () { oldrev="$1" newrev="$2" - if [ "$oldrev" != "latest_old" \ - -a "$oldrev" != "latest_new" \ - -a -e "$cachedir/$oldrev" ]; then + if test "$oldrev" != "latest_old" && + test "$oldrev" != "latest_new" && + test -e "$cachedir/$oldrev" + then die "cache for $oldrev already exists!" fi echo "$newrev" >"$cachedir/$oldrev" } -rev_exists() -{ - if git rev-parse "$1" >/dev/null 2>&1; then +rev_exists () { + if git rev-parse "$1" >/dev/null 2>&1 + then return 0 else return 1 fi } -rev_is_descendant_of_branch() -{ +rev_is_descendant_of_branch () { newrev="$1" branch="$2" - branch_hash=$(git rev-parse $branch) - match=$(git rev-list -1 $branch_hash ^$newrev) + branch_hash=$(git rev-parse "$branch") + match=$(git rev-list -1 "$branch_hash" "^$newrev") - if [ -z "$match" ]; then + if test -z "$match" + then return 0 else return 1 @@ -223,15 +283,14 @@ rev_is_descendant_of_branch() # if a commit doesn't have a parent, this might not work. But we only want # to remove the parent from the rev-list, and since it doesn't exist, it won't # be there anyway, so do nothing in that case. -try_remove_previous() -{ - if rev_exists "$1^"; then +try_remove_previous () { + if rev_exists "$1^" + then echo "^$1^" fi } -find_latest_squash() -{ +find_latest_squash () { debug "Looking for latest squash ($dir)..." dir="$1" sq= @@ -239,37 +298,43 @@ find_latest_squash() sub= git log --grep="^git-subtree-dir: $dir/*\$" \ --pretty=format:'START %H%n%s%n%n%b%nEND%n' HEAD | - while read a b junk; do + while read a b junk + do debug "$a $b $junk" debug "{{$sq/$main/$sub}}" case "$a" in - START) sq="$b" ;; - git-subtree-mainline:) main="$b" ;; - git-subtree-split:) - sub="$(git rev-parse "$b^0")" || - die "could not rev-parse split hash $b from commit $sq" - ;; - END) - if [ -n "$sub" ]; then - if [ -n "$main" ]; then - # a rejoin commit? - # Pretend its sub was a squash. - sq="$sub" - fi - debug "Squash found: $sq $sub" - echo "$sq" "$sub" - break + START) + sq="$b" + ;; + git-subtree-mainline:) + main="$b" + ;; + git-subtree-split:) + sub="$(git rev-parse "$b^0")" || + die "could not rev-parse split hash $b from commit $sq" + ;; + END) + if test -n "$sub" + then + if test -n "$main" + then + # a rejoin commit? + # Pretend its sub was a squash. + sq="$sub" fi - sq= - main= - sub= - ;; + debug "Squash found: $sq $sub" + echo "$sq" "$sub" + break + fi + sq= + main= + sub= + ;; esac done } -find_existing_splits() -{ +find_existing_splits () { debug "Looking for prior splits..." dir="$1" revs="$2" @@ -277,37 +342,43 @@ find_existing_splits() sub= git log --grep="^git-subtree-dir: $dir/*\$" \ --pretty=format:'START %H%n%s%n%n%b%nEND%n' $revs | - while read a b junk; do + while read a b junk + do case "$a" in - START) sq="$b" ;; - git-subtree-mainline:) main="$b" ;; - git-subtree-split:) - sub="$(git rev-parse "$b^0")" || - die "could not rev-parse split hash $b from commit $sq" - ;; - END) - debug " Main is: '$main'" - if [ -z "$main" -a -n "$sub" ]; then - # squash commits refer to a subtree - debug " Squash: $sq from $sub" - cache_set "$sq" "$sub" - fi - if [ -n "$main" -a -n "$sub" ]; then - debug " Prior: $main -> $sub" - cache_set $main $sub - cache_set $sub $sub - try_remove_previous "$main" - try_remove_previous "$sub" - fi - main= - sub= - ;; + START) + sq="$b" + ;; + git-subtree-mainline:) + main="$b" + ;; + git-subtree-split:) + sub="$(git rev-parse "$b^0")" || + die "could not rev-parse split hash $b from commit $sq" + ;; + END) + debug " Main is: '$main'" + if test -z "$main" -a -n "$sub" + then + # squash commits refer to a subtree + debug " Squash: $sq from $sub" + cache_set "$sq" "$sub" + fi + if test -n "$main" -a -n "$sub" + then + debug " Prior: $main -> $sub" + cache_set $main $sub + cache_set $sub $sub + try_remove_previous "$main" + try_remove_previous "$sub" + fi + main= + sub= + ;; esac done } -copy_commit() -{ +copy_commit () { # We're going to set some environment vars here, so # do it in a subshell to get rid of them safely later debug copy_commit "{$1}" "{$2}" "{$3}" @@ -325,66 +396,69 @@ copy_commit() GIT_COMMITTER_NAME \ GIT_COMMITTER_EMAIL \ GIT_COMMITTER_DATE - (printf "%s" "$annotate"; cat ) | + ( + printf "%s" "$annotate" + cat + ) | git commit-tree "$2" $3 # reads the rest of stdin ) || die "Can't copy commit $1" } -add_msg() -{ +add_msg () { dir="$1" latest_old="$2" latest_new="$3" - if [ -n "$message" ]; then + if test -n "$message" + then commit_message="$message" else commit_message="Add '$dir/' from commit '$latest_new'" fi cat <<-EOF $commit_message - + git-subtree-dir: $dir git-subtree-mainline: $latest_old git-subtree-split: $latest_new EOF } -add_squashed_msg() -{ - if [ -n "$message" ]; then +add_squashed_msg () { + if test -n "$message" + then echo "$message" else echo "Merge commit '$1' as '$2'" fi } -rejoin_msg() -{ +rejoin_msg () { dir="$1" latest_old="$2" latest_new="$3" - if [ -n "$message" ]; then + if test -n "$message" + then commit_message="$message" else commit_message="Split '$dir/' into commit '$latest_new'" fi cat <<-EOF $commit_message - + git-subtree-dir: $dir git-subtree-mainline: $latest_old git-subtree-split: $latest_new EOF } -squash_msg() -{ +squash_msg () { dir="$1" oldsub="$2" newsub="$3" newsub_short=$(git rev-parse --short "$newsub") - - if [ -n "$oldsub" ]; then + + if test -n "$oldsub" + then oldsub_short=$(git rev-parse --short "$oldsub") echo "Squashed '$dir/' changes from $oldsub_short..$newsub_short" echo @@ -393,41 +467,41 @@ squash_msg() else echo "Squashed '$dir/' content from commit $newsub_short" fi - + echo echo "git-subtree-dir: $dir" echo "git-subtree-split: $newsub" } -toptree_for_commit() -{ +toptree_for_commit () { commit="$1" git log -1 --pretty=format:'%T' "$commit" -- || exit $? } -subtree_for_commit() -{ +subtree_for_commit () { commit="$1" dir="$2" git ls-tree "$commit" -- "$dir" | - while read mode type tree name; do - assert [ "$name" = "$dir" ] - assert [ "$type" = "tree" -o "$type" = "commit" ] - [ "$type" = "commit" ] && continue # ignore submodules + while read mode type tree name + do + assert test "$name" = "$dir" + assert test "$type" = "tree" -o "$type" = "commit" + test "$type" = "commit" && continue # ignore submodules echo $tree break done } -tree_changed() -{ +tree_changed () { tree=$1 shift - if [ $# -ne 1 ]; then + if test $# -ne 1 + then return 0 # weird parents, consider it changed else ptree=$(toptree_for_commit $1) - if [ "$ptree" != "$tree" ]; then + if test "$ptree" != "$tree" + then return 0 # changed else return 1 # not changed @@ -435,118 +509,127 @@ tree_changed() fi } -new_squash_commit() -{ +new_squash_commit () { old="$1" oldsub="$2" newsub="$3" tree=$(toptree_for_commit $newsub) || exit $? - if [ -n "$old" ]; then - squash_msg "$dir" "$oldsub" "$newsub" | - git commit-tree "$tree" -p "$old" || exit $? + if test -n "$old" + then + squash_msg "$dir" "$oldsub" "$newsub" | + git commit-tree "$tree" -p "$old" || exit $? else squash_msg "$dir" "" "$newsub" | - git commit-tree "$tree" || exit $? + git commit-tree "$tree" || exit $? fi } -copy_or_skip() -{ +copy_or_skip () { rev="$1" tree="$2" newparents="$3" - assert [ -n "$tree" ] + assert test -n "$tree" identical= nonidentical= p= gotparents= - for parent in $newparents; do + for parent in $newparents + do ptree=$(toptree_for_commit $parent) || exit $? - [ -z "$ptree" ] && continue - if [ "$ptree" = "$tree" ]; then + test -z "$ptree" && continue + if test "$ptree" = "$tree" + then # an identical parent could be used in place of this rev. identical="$parent" else nonidentical="$parent" fi - + # sometimes both old parents map to the same newparent; # eliminate duplicates is_new=1 - for gp in $gotparents; do - if [ "$gp" = "$parent" ]; then + for gp in $gotparents + do + if test "$gp" = "$parent" + then is_new= break fi done - if [ -n "$is_new" ]; then + if test -n "$is_new" + then gotparents="$gotparents $parent" p="$p -p $parent" fi done copycommit= - if [ -n "$identical" ] && [ -n "$nonidentical" ]; then + if test -n "$identical" && test -n "$nonidentical" + then extras=$(git rev-list --count $identical..$nonidentical) - if [ "$extras" -ne 0 ]; then + if test "$extras" -ne 0 + then # we need to preserve history along the other branch copycommit=1 fi fi - if [ -n "$identical" ] && [ -z "$copycommit" ]; then + if test -n "$identical" && test -z "$copycommit" + then echo $identical else - copy_commit $rev $tree "$p" || exit $? + copy_commit "$rev" "$tree" "$p" || exit $? fi } -ensure_clean() -{ - if ! git diff-index HEAD --exit-code --quiet 2>&1; then +ensure_clean () { + if ! git diff-index HEAD --exit-code --quiet 2>&1 + then die "Working tree has modifications. Cannot add." fi - if ! git diff-index --cached HEAD --exit-code --quiet 2>&1; then + if ! git diff-index --cached HEAD --exit-code --quiet 2>&1 + then die "Index has modifications. Cannot add." fi } -ensure_valid_ref_format() -{ +ensure_valid_ref_format () { git check-ref-format "refs/heads/$1" || - die "'$1' does not look like a ref" + die "'$1' does not look like a ref" } -cmd_add() -{ - if [ -e "$dir" ]; then +cmd_add () { + if test -e "$dir" + then die "'$dir' already exists. Cannot add." fi ensure_clean - - if [ $# -eq 1 ]; then - git rev-parse -q --verify "$1^{commit}" >/dev/null || - die "'$1' does not refer to a commit" - - "cmd_add_commit" "$@" - elif [ $# -eq 2 ]; then - # Technically we could accept a refspec here but we're - # just going to turn around and add FETCH_HEAD under the - # specified directory. Allowing a refspec might be - # misleading because we won't do anything with any other - # branches fetched via the refspec. - ensure_valid_ref_format "$2" - - "cmd_add_repository" "$@" + + if test $# -eq 1 + then + git rev-parse -q --verify "$1^{commit}" >/dev/null || + die "'$1' does not refer to a commit" + + cmd_add_commit "$@" + + elif test $# -eq 2 + then + # Technically we could accept a refspec here but we're + # just going to turn around and add FETCH_HEAD under the + # specified directory. Allowing a refspec might be + # misleading because we won't do anything with any other + # branches fetched via the refspec. + ensure_valid_ref_format "$2" + + cmd_add_repository "$@" else - say "error: parameters were '$@'" - die "Provide either a commit or a repository and commit." + say "error: parameters were '$@'" + die "Provide either a commit or a repository and commit." fi } -cmd_add_repository() -{ +cmd_add_repository () { echo "git fetch" "$@" repository=$1 refspec=$2 @@ -556,60 +639,63 @@ cmd_add_repository() cmd_add_commit "$@" } -cmd_add_commit() -{ +cmd_add_commit () { revs=$(git rev-parse $default --revs-only "$@") || exit $? set -- $revs rev="$1" - + debug "Adding $dir as '$rev'..." git read-tree --prefix="$dir" $rev || exit $? git checkout -- "$dir" || exit $? tree=$(git write-tree) || exit $? - + headrev=$(git rev-parse HEAD) || exit $? - if [ -n "$headrev" -a "$headrev" != "$rev" ]; then + if test -n "$headrev" && test "$headrev" != "$rev" + then headp="-p $headrev" else headp= fi - - if [ -n "$squash" ]; then + + if test -n "$squash" + then rev=$(new_squash_commit "" "" "$rev") || exit $? commit=$(add_squashed_msg "$rev" "$dir" | - git commit-tree $tree $headp -p "$rev") || exit $? + git commit-tree "$tree" $headp -p "$rev") || exit $? else revp=$(peel_committish "$rev") && - commit=$(add_msg "$dir" "$headrev" "$rev" | - git commit-tree $tree $headp -p "$revp") || exit $? + commit=$(add_msg "$dir" $headrev "$rev" | + git commit-tree "$tree" $headp -p "$revp") || exit $? fi git reset "$commit" || exit $? - + say "Added dir '$dir'" } -cmd_split() -{ +cmd_split () { debug "Splitting $dir..." cache_setup || exit $? - - if [ -n "$onto" ]; then + + if test -n "$onto" + then debug "Reading history for --onto=$onto..." git rev-list $onto | - while read rev; do + while read rev + do # the 'onto' history is already just the subdir, so # any parent we find there can be used verbatim debug " cache: $rev" - cache_set $rev $rev + cache_set "$rev" "$rev" done fi - - if [ -n "$ignore_joins" ]; then + + if test -n "$ignore_joins" + then unrevs= else unrevs="$(find_existing_splits "$dir" "$revs")" fi - + # We can't restrict rev-list to only $dir here, because some of our # parents have the $dir contents the root, and those won't match. # (and rev-list --follow doesn't seem to solve this) @@ -618,12 +704,14 @@ cmd_split() revcount=0 createcount=0 eval "$grl" | - while read rev parents; do + while read rev parents + do revcount=$(($revcount + 1)) progress "$revcount/$revmax ($createcount)" debug "Processing commit: $rev" - exists=$(cache_get $rev) - if [ -n "$exists" ]; then + exists=$(cache_get "$rev") + if test -n "$exists" + then debug " prior: $exists" continue fi @@ -631,77 +719,89 @@ cmd_split() debug " parents: $parents" newparents=$(cache_get $parents) debug " newparents: $newparents" - - tree=$(subtree_for_commit $rev "$dir") + + tree=$(subtree_for_commit "$rev" "$dir") debug " tree is: $tree" check_parents $parents - + # ugly. is there no better way to tell if this is a subtree # vs. a mainline commit? Does it matter? - if [ -z $tree ]; then - set_notree $rev - if [ -n "$newparents" ]; then - cache_set $rev $rev + if test -z "$tree" + then + set_notree "$rev" + if test -n "$newparents" + then + cache_set "$rev" "$rev" fi continue fi newrev=$(copy_or_skip "$rev" "$tree" "$newparents") || exit $? debug " newrev is: $newrev" - cache_set $rev $newrev - cache_set latest_new $newrev - cache_set latest_old $rev + cache_set "$rev" "$newrev" + cache_set latest_new "$newrev" + cache_set latest_old "$rev" done || exit $? + latest_new=$(cache_get latest_new) - if [ -z "$latest_new" ]; then + if test -z "$latest_new" + then die "No new revisions were found" fi - - if [ -n "$rejoin" ]; then + + if test -n "$rejoin" + then debug "Merging split branch into HEAD..." latest_old=$(cache_get latest_old) git merge -s ours \ --allow-unrelated-histories \ - -m "$(rejoin_msg "$dir" $latest_old $latest_new)" \ - $latest_new >&2 || exit $? - fi - if [ -n "$branch" ]; then - if rev_exists "refs/heads/$branch"; then - if ! rev_is_descendant_of_branch $latest_new $branch; then + -m "$(rejoin_msg "$dir" "$latest_old" "$latest_new")" \ + "$latest_new" >&2 || exit $? + fi + if test -n "$branch" + then + if rev_exists "refs/heads/$branch" + then + if ! rev_is_descendant_of_branch "$latest_new" "$branch" + then die "Branch '$branch' is not an ancestor of commit '$latest_new'." fi action='Updated' else action='Created' fi - git update-ref -m 'subtree split' "refs/heads/$branch" $latest_new || exit $? + git update-ref -m 'subtree split' \ + "refs/heads/$branch" "$latest_new" || exit $? say "$action branch '$branch'" fi - echo $latest_new + echo "$latest_new" exit 0 } -cmd_merge() -{ +cmd_merge () { revs=$(git rev-parse $default --revs-only "$@") || exit $? ensure_clean - + set -- $revs - if [ $# -ne 1 ]; then + if test $# -ne 1 + then die "You must provide exactly one revision. Got: '$revs'" fi rev="$1" - - if [ -n "$squash" ]; then + + if test -n "$squash" + then first_split="$(find_latest_squash "$dir")" - if [ -z "$first_split" ]; then + if test -z "$first_split" + then die "Can't squash-merge: '$dir' was never added." fi set $first_split old=$1 sub=$2 - if [ "$sub" = "$rev" ]; then + if test "$sub" = "$rev" + then say "Subtree is already at commit $rev." exit 0 fi @@ -711,25 +811,29 @@ cmd_merge() fi version=$(git version) - if [ "$version" \< "git version 1.7" ]; then - if [ -n "$message" ]; then - git merge -s subtree --message="$message" $rev + if test "$version" \< "git version 1.7" + then + if test -n "$message" + then + git merge -s subtree --message="$message" "$rev" else - git merge -s subtree $rev + git merge -s subtree "$rev" fi else - if [ -n "$message" ]; then - git merge -Xsubtree="$prefix" --message="$message" $rev + if test -n "$message" + then + git merge -Xsubtree="$prefix" \ + --message="$message" "$rev" else git merge -Xsubtree="$prefix" $rev fi fi } -cmd_pull() -{ - if [ $# -ne 2 ]; then - die "You must provide " +cmd_pull () { + if test $# -ne 2 + then + die "You must provide " fi ensure_clean ensure_valid_ref_format "$2" @@ -739,20 +843,21 @@ cmd_pull() cmd_merge "$@" } -cmd_push() -{ - if [ $# -ne 2 ]; then - die "You must provide " +cmd_push () { + if test $# -ne 2 + then + die "You must provide " fi ensure_valid_ref_format "$2" - if [ -e "$dir" ]; then - repository=$1 - refspec=$2 - echo "git push using: " $repository $refspec - localrev=$(git subtree split --prefix="$prefix") || die - git push "$repository" $localrev:refs/heads/$refspec + if test -e "$dir" + then + repository=$1 + refspec=$2 + echo "git push using: " "$repository" "$refspec" + localrev=$(git subtree split --prefix="$prefix") || die + git push "$repository" "$localrev":"refs/heads/$refspec" else - die "'$dir' must already exist. Try 'git subtree add'." + die "'$dir' must already exist. Try 'git subtree add'." fi } diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 9751cfe9e6..3c87ebaf57 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -948,7 +948,7 @@ test_expect_success 'split a new subtree without --onto option' ' # also test that we still can split out an entirely new subtree # if the parent of the first commit in the tree is not empty, - # then the new subtree has accidently been attached to something + # then the new subtree has accidentally been attached to something git subtree split --prefix="sub dir2" --branch subproj2-br && check_equal "$(git log --pretty=format:%P -1 subproj2-br)" "" ) diff --git a/convert.c b/convert.c index 67d69b5c0e..077f5e601e 100644 --- a/convert.c +++ b/convert.c @@ -189,33 +189,25 @@ static enum eol output_eol(enum crlf_action crlf_action) } static void check_safe_crlf(const char *path, enum crlf_action crlf_action, - struct text_stat *stats, enum safe_crlf checksafe) + struct text_stat *old_stats, struct text_stat *new_stats, + enum safe_crlf checksafe) { - if (!checksafe) - return; - - if (output_eol(crlf_action) == EOL_LF) { + if (old_stats->crlf && !new_stats->crlf ) { /* - * CRLFs would not be restored by checkout: - * check if we'd remove CRLFs + * CRLFs would not be restored by checkout */ - if (stats->crlf) { - if (checksafe == SAFE_CRLF_WARN) - warning("CRLF will be replaced by LF in %s.\nThe file will have its original line endings in your working directory.", path); - else /* i.e. SAFE_CRLF_FAIL */ - die("CRLF would be replaced by LF in %s.", path); - } - } else if (output_eol(crlf_action) == EOL_CRLF) { + if (checksafe == SAFE_CRLF_WARN) + warning("CRLF will be replaced by LF in %s.\nThe file will have its original line endings in your working directory.", path); + else /* i.e. SAFE_CRLF_FAIL */ + die("CRLF would be replaced by LF in %s.", path); + } else if (old_stats->lonelf && !new_stats->lonelf ) { /* - * CRLFs would be added by checkout: - * check if we have "naked" LFs + * CRLFs would be added by checkout */ - if (stats->lonelf) { - if (checksafe == SAFE_CRLF_WARN) - warning("LF will be replaced by CRLF in %s.\nThe file will have its original line endings in your working directory.", path); - else /* i.e. SAFE_CRLF_FAIL */ - die("LF would be replaced by CRLF in %s", path); - } + if (checksafe == SAFE_CRLF_WARN) + warning("LF will be replaced by CRLF in %s.\nThe file will have its original line endings in your working directory.", path); + else /* i.e. SAFE_CRLF_FAIL */ + die("LF would be replaced by CRLF in %s", path); } } @@ -233,12 +225,35 @@ static int has_cr_in_index(const char *path) return has_cr; } +static int will_convert_lf_to_crlf(size_t len, struct text_stat *stats, + enum crlf_action crlf_action) +{ + if (output_eol(crlf_action) != EOL_CRLF) + return 0; + /* No "naked" LF? Nothing to convert, regardless. */ + if (!stats->lonelf) + return 0; + + if (crlf_action == CRLF_AUTO || crlf_action == CRLF_AUTO_INPUT || crlf_action == CRLF_AUTO_CRLF) { + /* If we have any CR or CRLF line endings, we do not touch it */ + /* This is the new safer autocrlf-handling */ + if (stats->lonecr || stats->crlf) + return 0; + + if (convert_is_binary(len, stats)) + return 0; + } + return 1; + +} + static int crlf_to_git(const char *path, const char *src, size_t len, struct strbuf *buf, enum crlf_action crlf_action, enum safe_crlf checksafe) { struct text_stat stats; char *dst; + int convert_crlf_into_lf; if (crlf_action == CRLF_BINARY || (src && !len)) @@ -252,6 +267,8 @@ static int crlf_to_git(const char *path, const char *src, size_t len, return 1; gather_stats(src, len, &stats); + /* Optimization: No CRLF? Nothing to convert, regardless. */ + convert_crlf_into_lf = !!stats.crlf; if (crlf_action == CRLF_AUTO || crlf_action == CRLF_AUTO_INPUT || crlf_action == CRLF_AUTO_CRLF) { if (convert_is_binary(len, &stats)) @@ -263,12 +280,24 @@ static int crlf_to_git(const char *path, const char *src, size_t len, if (checksafe == SAFE_CRLF_RENORMALIZE) checksafe = SAFE_CRLF_FALSE; else if (has_cr_in_index(path)) - return 0; + convert_crlf_into_lf = 0; } - check_safe_crlf(path, crlf_action, &stats, checksafe); - - /* Optimization: No CRLF? Nothing to convert, regardless. */ - if (!stats.crlf) + if (checksafe && len) { + struct text_stat new_stats; + memcpy(&new_stats, &stats, sizeof(new_stats)); + /* simulate "git add" */ + if (convert_crlf_into_lf) { + new_stats.lonelf += new_stats.crlf; + new_stats.crlf = 0; + } + /* simulate "git checkout" */ + if (will_convert_lf_to_crlf(len, &new_stats, crlf_action)) { + new_stats.crlf += new_stats.lonelf; + new_stats.lonelf = 0; + } + check_safe_crlf(path, crlf_action, &stats, &new_stats, checksafe); + } + if (!convert_crlf_into_lf) return 0; /* @@ -314,21 +343,9 @@ static int crlf_to_worktree(const char *path, const char *src, size_t len, return 0; gather_stats(src, len, &stats); - - /* No "naked" LF? Nothing to convert, regardless. */ - if (!stats.lonelf) + if (!will_convert_lf_to_crlf(len, &stats, crlf_action)) return 0; - if (crlf_action == CRLF_AUTO || crlf_action == CRLF_AUTO_INPUT || crlf_action == CRLF_AUTO_CRLF) { - /* If we have any CR or CRLF line endings, we do not touch it */ - /* This is the new safer autocrlf-handling */ - if (stats.lonecr || stats.crlf ) - return 0; - - if (convert_is_binary(len, &stats)) - return 0; - } - /* are we "faking" in place editing ? */ if (src == buf->buf) to_free = strbuf_detach(buf, NULL); diff --git a/date.c b/date.c index 4c7aa9ba85..a996331f5b 100644 --- a/date.c +++ b/date.c @@ -177,6 +177,12 @@ const char *show_date(unsigned long time, int tz, const struct date_mode *mode) struct tm *tm; static struct strbuf timebuf = STRBUF_INIT; + if (mode->type == DATE_UNIX) { + strbuf_reset(&timebuf); + strbuf_addf(&timebuf, "%lu", time); + return timebuf.buf; + } + if (mode->local) tz = local_tzoffset(time); @@ -792,6 +798,8 @@ static enum date_mode_type parse_date_type(const char *format, const char **end) return DATE_NORMAL; if (skip_prefix(format, "raw", end)) return DATE_RAW; + if (skip_prefix(format, "unix", end)) + return DATE_UNIX; if (skip_prefix(format, "format", end)) return DATE_STRFTIME; diff --git a/diff.c b/diff.c index b43d3dd2ec..534c12e28e 100644 --- a/diff.c +++ b/diff.c @@ -4462,7 +4462,7 @@ static void patch_id_consume(void *priv, char *line, unsigned long len) } /* returns 0 upon success, and writes result into sha1 */ -static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1) +static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1, int diff_header_only) { struct diff_queue_struct *q = &diff_queued_diff; int i; @@ -4497,9 +4497,6 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1) diff_fill_sha1_info(p->one); diff_fill_sha1_info(p->two); - if (fill_mmfile(&mf1, p->one) < 0 || - fill_mmfile(&mf2, p->two) < 0) - return error("unable to read files to diff"); len1 = remove_space(p->one->path, strlen(p->one->path)); len2 = remove_space(p->two->path, strlen(p->two->path)); @@ -4534,6 +4531,13 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1) len2, p->two->path); git_SHA1_Update(&ctx, buffer, len1); + if (diff_header_only) + continue; + + if (fill_mmfile(&mf1, p->one) < 0 || + fill_mmfile(&mf2, p->two) < 0) + return error("unable to read files to diff"); + if (diff_filespec_is_binary(p->one) || diff_filespec_is_binary(p->two)) { git_SHA1_Update(&ctx, oid_to_hex(&p->one->oid), @@ -4556,11 +4560,11 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1) return 0; } -int diff_flush_patch_id(struct diff_options *options, unsigned char *sha1) +int diff_flush_patch_id(struct diff_options *options, unsigned char *sha1, int diff_header_only) { struct diff_queue_struct *q = &diff_queued_diff; int i; - int result = diff_get_patch_id(options, sha1); + int result = diff_get_patch_id(options, sha1, diff_header_only); for (i = 0; i < q->nr; i++) diff_free_filepair(q->queue[i]); diff --git a/diff.h b/diff.h index 125447be09..7883729edf 100644 --- a/diff.h +++ b/diff.h @@ -342,7 +342,7 @@ extern int run_diff_files(struct rev_info *revs, unsigned int option); extern int run_diff_index(struct rev_info *revs, int cached); extern int do_diff_cache(const unsigned char *, struct diff_options *); -extern int diff_flush_patch_id(struct diff_options *, unsigned char *); +extern int diff_flush_patch_id(struct diff_options *, unsigned char *, int); extern int diff_result_code(struct diff_options *, int); diff --git a/diffcore-rename.c b/diffcore-rename.c index 58ac0a531b..73d003a08a 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -541,7 +541,7 @@ void diffcore_rename(struct diff_options *options) rename_dst_nr * rename_src_nr, 50, 1); } - mx = xcalloc(st_mult(num_create, NUM_CANDIDATE_PER_DST), sizeof(*mx)); + mx = xcalloc(st_mult(NUM_CANDIDATE_PER_DST, num_create), sizeof(*mx)); for (dst_cnt = i = 0; i < rename_dst_nr; i++) { struct diff_filespec *two = rename_dst[i].two; struct diff_score *m; diff --git a/git-compat-util.h b/git-compat-util.h index 590bfddf73..db89ba7748 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -667,6 +667,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen, #define getpagesize() sysconf(_SC_PAGESIZE) #endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + #ifdef FREAD_READS_DIRECTORIES #ifdef fopen #undef fopen @@ -815,7 +819,7 @@ extern FILE *fopen_for_writing(const char *path); * you can do: * * struct foo *f; - * FLEX_ALLOC_STR(f, name, src); + * FLEXPTR_ALLOC_STR(f, name, src); * * and "name" will point to a block of memory after the struct, which will be * freed along with the struct (but the pointer can be repointed anywhere). diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh index 84d6cc021c..7bfb6737df 100755 --- a/git-difftool--helper.sh +++ b/git-difftool--helper.sh @@ -86,6 +86,13 @@ else do launch_merge_tool "$1" "$2" "$5" status=$? + if test $status -ge 126 + then + # Command not found (127), not executable (126) or + # exited via a signal (>= 128). + exit $status + fi + if test "$status" != 0 && test "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true then diff --git a/git-difftool.perl b/git-difftool.perl index ebd13baa6e..a5790d03a0 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -37,14 +37,6 @@ sub usage exit($exitcode); } -sub find_worktree -{ - # Git->repository->wc_path() does not honor changes to the working - # tree location made by $ENV{GIT_WORK_TREE} or the 'core.worktree' - # config variable. - return Git::command_oneline('rev-parse', '--show-toplevel'); -} - sub print_tool_help { # See the comment at the bottom of file_diff() for the reason behind @@ -67,14 +59,14 @@ sub exit_cleanup sub use_wt_file { - my ($repo, $workdir, $file, $sha1) = @_; + my ($workdir, $file, $sha1) = @_; my $null_sha1 = '0' x 40; if (-l "$workdir/$file" || ! -e _) { return (0, $null_sha1); } - my $wt_sha1 = $repo->command_oneline('hash-object', "$workdir/$file"); + my $wt_sha1 = Git::command_oneline('hash-object', "$workdir/$file"); my $use = ($sha1 eq $null_sha1) || ($sha1 eq $wt_sha1); return ($use, $wt_sha1); } @@ -83,20 +75,17 @@ sub changed_files { my ($repo_path, $index, $worktree) = @_; $ENV{GIT_INDEX_FILE} = $index; - $ENV{GIT_WORK_TREE} = $worktree; - my $must_unset_git_dir = 0; - if (not defined($ENV{GIT_DIR})) { - $must_unset_git_dir = 1; - $ENV{GIT_DIR} = $repo_path; - } - my @refreshargs = qw/update-index --really-refresh -q --unmerged/; - my @gitargs = qw/diff-files --name-only -z/; + my @gitargs = ('--git-dir', $repo_path, '--work-tree', $worktree); + my @refreshargs = ( + @gitargs, 'update-index', + '--really-refresh', '-q', '--unmerged'); try { Git::command_oneline(@refreshargs); } catch Git::Error::Command with {}; - my $line = Git::command_oneline(@gitargs); + my @diffargs = (@gitargs, 'diff-files', '--name-only', '-z'); + my $line = Git::command_oneline(@diffargs); my @files; if (defined $line) { @files = split('\0', $line); @@ -105,26 +94,15 @@ sub changed_files } delete($ENV{GIT_INDEX_FILE}); - delete($ENV{GIT_WORK_TREE}); - delete($ENV{GIT_DIR}) if ($must_unset_git_dir); return map { $_ => 1 } @files; } sub setup_dir_diff { - my ($repo, $workdir, $symlinks) = @_; - - # Run the diff; exit immediately if no diff found - # 'Repository' and 'WorkingCopy' must be explicitly set to insure that - # if $GIT_DIR and $GIT_WORK_TREE are set in ENV, they are actually used - # by Git->repository->command*. - my $repo_path = $repo->repo_path(); - my %repo_args = (Repository => $repo_path, WorkingCopy => $workdir); - my $diffrepo = Git->repository(%repo_args); - + my ($workdir, $symlinks) = @_; my @gitargs = ('diff', '--raw', '--no-abbrev', '-z', @ARGV); - my $diffrtn = $diffrepo->command_oneline(@gitargs); + my $diffrtn = Git::command_oneline(@gitargs); exit(0) unless defined($diffrtn); # Build index info for left and right sides of the diff @@ -176,12 +154,12 @@ sub setup_dir_diff if ($lmode eq $symlink_mode) { $symlink{$src_path}{left} = - $diffrepo->command_oneline('show', "$lsha1"); + Git::command_oneline('show', $lsha1); } if ($rmode eq $symlink_mode) { $symlink{$dst_path}{right} = - $diffrepo->command_oneline('show', "$rsha1"); + Git::command_oneline('show', $rsha1); } if ($lmode ne $null_mode and $status !~ /^C/) { @@ -193,8 +171,8 @@ sub setup_dir_diff if ($working_tree_dups{$dst_path}++) { next; } - my ($use, $wt_sha1) = use_wt_file($repo, $workdir, - $dst_path, $rsha1); + my ($use, $wt_sha1) = + use_wt_file($workdir, $dst_path, $rsha1); if ($use) { push @working_tree, $dst_path; $wtindex .= "$rmode $wt_sha1\t$dst_path\0"; @@ -211,44 +189,34 @@ sub setup_dir_diff mkpath($ldir) or exit_cleanup($tmpdir, 1); mkpath($rdir) or exit_cleanup($tmpdir, 1); - # If $GIT_DIR is not set prior to calling 'git update-index' and - # 'git checkout-index', then those commands will fail if difftool - # is called from a directory other than the repo root. - my $must_unset_git_dir = 0; - if (not defined($ENV{GIT_DIR})) { - $must_unset_git_dir = 1; - $ENV{GIT_DIR} = $repo_path; - } - # Populate the left and right directories based on each index file my ($inpipe, $ctx); $ENV{GIT_INDEX_FILE} = "$tmpdir/lindex"; ($inpipe, $ctx) = - $repo->command_input_pipe(qw(update-index -z --index-info)); + Git::command_input_pipe('update-index', '-z', '--index-info'); print($inpipe $lindex); - $repo->command_close_pipe($inpipe, $ctx); + Git::command_close_pipe($inpipe, $ctx); my $rc = system('git', 'checkout-index', '--all', "--prefix=$ldir/"); exit_cleanup($tmpdir, $rc) if $rc != 0; $ENV{GIT_INDEX_FILE} = "$tmpdir/rindex"; ($inpipe, $ctx) = - $repo->command_input_pipe(qw(update-index -z --index-info)); + Git::command_input_pipe('update-index', '-z', '--index-info'); print($inpipe $rindex); - $repo->command_close_pipe($inpipe, $ctx); + Git::command_close_pipe($inpipe, $ctx); $rc = system('git', 'checkout-index', '--all', "--prefix=$rdir/"); exit_cleanup($tmpdir, $rc) if $rc != 0; $ENV{GIT_INDEX_FILE} = "$tmpdir/wtindex"; ($inpipe, $ctx) = - $repo->command_input_pipe(qw(update-index --info-only -z --index-info)); + Git::command_input_pipe('update-index', '--info-only', '-z', '--index-info'); print($inpipe $wtindex); - $repo->command_close_pipe($inpipe, $ctx); + Git::command_close_pipe($inpipe, $ctx); # If $GIT_DIR was explicitly set just for the update/checkout # commands, then it should be unset before continuing. - delete($ENV{GIT_DIR}) if ($must_unset_git_dir); delete($ENV{GIT_INDEX_FILE}); # Changes in the working tree need special treatment since they are @@ -415,9 +383,9 @@ sub dir_diff my $rc; my $error = 0; my $repo = Git->repository(); - my $workdir = find_worktree(); - my ($a, $b, $tmpdir, @worktree) = - setup_dir_diff($repo, $workdir, $symlinks); + my $repo_path = $repo->repo_path(); + my $workdir = $repo->wc_path(); + my ($a, $b, $tmpdir, @worktree) = setup_dir_diff($workdir, $symlinks); if (defined($extcmd)) { $rc = system($extcmd, $a, $b); @@ -443,10 +411,10 @@ sub dir_diff next if ! -f "$b/$file"; if (!$indices_loaded) { - %wt_modified = changed_files($repo->repo_path(), - "$tmpdir/wtindex", "$workdir"); - %tmp_modified = changed_files($repo->repo_path(), - "$tmpdir/wtindex", "$b"); + %wt_modified = changed_files( + $repo_path, "$tmpdir/wtindex", $workdir); + %tmp_modified = changed_files( + $repo_path, "$tmpdir/wtindex", $b); $indices_loaded = 1; } diff --git a/git-p4.py b/git-p4.py index ac6f4c14fb..fd5ca52462 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1934,7 +1934,7 @@ def run(self, args): if self.useClientSpec: self.clientSpecDirs = getClientSpec() - # Check for the existance of P4 branches + # Check for the existence of P4 branches branchesDetected = (len(p4BranchesInGit().keys()) > 1) if self.useClientSpec and not branchesDetected: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index ded4595638..7e558b068c 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -121,7 +121,7 @@ mark_action_done () { sed -e 1q < "$todo" >> "$done" sed -e 1d < "$todo" >> "$todo".new mv -f "$todo".new "$todo" - new_count=$(git stripspace --strip-comments <"$done" | wc -l) + new_count=$(( $(git stripspace --strip-comments <"$done" | wc -l) )) echo $new_count >"$msgnum" total=$(($new_count + $(git stripspace --strip-comments <"$todo" | wc -l))) echo $total >"$end" @@ -404,51 +404,12 @@ pick_one_preserving_merges () { this_nth_commit_message () { n=$1 - case "$n" in - 1) gettext "This is the 1st commit message:";; - 2) gettext "This is the 2nd commit message:";; - 3) gettext "This is the 3rd commit message:";; - 4) gettext "This is the 4th commit message:";; - 5) gettext "This is the 5th commit message:";; - 6) gettext "This is the 6th commit message:";; - 7) gettext "This is the 7th commit message:";; - 8) gettext "This is the 8th commit message:";; - 9) gettext "This is the 9th commit message:";; - 10) gettext "This is the 10th commit message:";; - # TRANSLATORS: if the language you are translating into - # doesn't allow you to compose a sentence in this fashion, - # consider translating as if this and the following few strings - # were "This is the commit message ${n}:" - *1[0-9]|*[04-9]) eval_gettext "This is the \${n}th commit message:";; - *1) eval_gettext "This is the \${n}st commit message:";; - *2) eval_gettext "This is the \${n}nd commit message:";; - *3) eval_gettext "This is the \${n}rd commit message:";; - *) eval_gettext "This is the commit message \${n}:";; - esac + eval_gettext "This is the commit message #\${n}:" } + skip_nth_commit_message () { n=$1 - case "$n" in - 1) gettext "The 1st commit message will be skipped:";; - 2) gettext "The 2nd commit message will be skipped:";; - 3) gettext "The 3rd commit message will be skipped:";; - 4) gettext "The 4th commit message will be skipped:";; - 5) gettext "The 5th commit message will be skipped:";; - 6) gettext "The 6th commit message will be skipped:";; - 7) gettext "The 7th commit message will be skipped:";; - 8) gettext "The 8th commit message will be skipped:";; - 9) gettext "The 9th commit message will be skipped:";; - 10) gettext "The 10th commit message will be skipped:";; - # TRANSLATORS: if the language you are translating into - # doesn't allow you to compose a sentence in this fashion, - # consider translating as if this and the following few strings - # were "The commit message ${n} will be skipped:" - *1[0-9]|*[04-9]) eval_gettext "The \${n}th commit message will be skipped:";; - *1) eval_gettext "The \${n}st commit message will be skipped:";; - *2) eval_gettext "The \${n}nd commit message will be skipped:";; - *3) eval_gettext "The \${n}rd commit message will be skipped:";; - *) eval_gettext "The commit message \${n} will be skipped:";; - esac + eval_gettext "The commit message #\${n} will be skipped:" } update_squash_messages () { diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 0c34aa62f6..a8a4576342 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -163,9 +163,11 @@ git_pager() { else GIT_PAGER=cat fi - : "${LESS=-FRX}" - : "${LV=-c}" - export LESS LV + for vardef in @@PAGER_ENV@@ + do + var=${vardef%%=*} + eval ": \"\${$vardef}\" && export $var" + done eval "$GIT_PAGER" '"$@"' } diff --git a/git-stash.sh b/git-stash.sh index 22fb8bcba6..826af183d4 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -265,7 +265,7 @@ save_stash () { create_stash "$stash_msg" $untracked store_stash -m "$stash_msg" -q $w_commit || die "$(gettext "Cannot save the current status")" - say Saved working directory and index state "$stash_msg" + say "$(eval_gettext "Saved working directory and index state \$stash_msg")" if test -z "$patch_mode" then @@ -548,7 +548,7 @@ pop_stash() { drop_stash "$@" else status=$? - say "The stash is kept in case you need it again." + say "$(gettext "The stash is kept in case you need it again.")" exit $status fi } diff --git a/git-submodule.sh b/git-submodule.sh index 3b412f554b..a1cc71b521 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -479,7 +479,8 @@ fetch_in_submodule () ( '') git fetch ;; *) - git fetch $(get_default_remote) "$2" ;; + shift + git fetch $(get_default_remote) "$@" ;; esac ) @@ -588,7 +589,6 @@ cmd_update() name=$(git submodule--helper name "$sm_path") || exit url=$(git config submodule."$name".url) - branch=$(get_submodule_config "$name" branch master) if ! test -z "$update" then update_module=$update @@ -614,10 +614,11 @@ cmd_update() if test -n "$remote" then + branch=$(git submodule--helper remote-branch "$sm_path") if test -z "$nofetch" then # Fetch remote before determining tracking $sha1 - fetch_in_submodule "$sm_path" || + fetch_in_submodule "$sm_path" $depth || die "$(eval_gettext "Unable to fetch in submodule path '\$sm_path'")" fi remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote) @@ -640,13 +641,13 @@ cmd_update() # Run fetch only if $sha1 isn't present or it # is not reachable from a ref. is_tip_reachable "$sm_path" "$sha1" || - fetch_in_submodule "$sm_path" || + fetch_in_submodule "$sm_path" $depth || die "$(eval_gettext "Unable to fetch in submodule path '\$displaypath'")" # Now we tried the usual fetch, but $sha1 may # not be reachable from any of the refs is_tip_reachable "$sm_path" "$sha1" || - fetch_in_submodule "$sm_path" "$sha1" || + fetch_in_submodule "$sm_path" $depth "$sha1" || die "$(eval_gettext "Fetched in submodule path '\$displaypath', but it did not contain \$sha1. Direct fetching of that commit failed.")" fi diff --git a/git.c b/git.c index 0f1937fd0c..1c61151758 100644 --- a/git.c +++ b/git.c @@ -522,21 +522,34 @@ static void strip_extension(const char **argv) static void handle_builtin(int argc, const char **argv) { + struct argv_array args = ARGV_ARRAY_INIT; const char *cmd; struct cmd_struct *builtin; strip_extension(argv); cmd = argv[0]; - /* Turn "git cmd --help" into "git help cmd" */ + /* Turn "git cmd --help" into "git help --exclude-guides cmd" */ if (argc > 1 && !strcmp(argv[1], "--help")) { + int i; + argv[1] = argv[0]; argv[0] = cmd = "help"; + + for (i = 0; i < argc; i++) { + argv_array_push(&args, argv[i]); + if (!i) + argv_array_push(&args, "--exclude-guides"); + } + + argc++; + argv = args.argv; } builtin = get_builtin(cmd); if (builtin) exit(run_builtin(builtin, argc, argv)); + argv_array_clear(&args); } static void execv_dashed_external(const char **argv) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 2fddf750fa..33d701d852 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2090,7 +2090,7 @@ sub format_ref_marker { -href => href( action=>$dest_action, hash=>$dest - )}, $name); + )}, esc_html($name)); $markers .= " " . $link . ""; diff --git a/gpg-interface.c b/gpg-interface.c index 08356f92e7..8672edaf48 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -217,6 +217,7 @@ int verify_signed_buffer(const char *payload, size_t payload_size, argv_array_pushl(&gpg.args, gpg_program, "--status-fd=1", + "--keyid-format=long", "--verify", temp.filename.buf, "-", NULL); diff --git a/grep.c b/grep.c index 58d599e647..d7d00b87cb 100644 --- a/grep.c +++ b/grep.c @@ -693,10 +693,10 @@ static struct grep_expr *prep_header_patterns(struct grep_opt *opt) for (p = opt->header_list; p; p = p->next) { if (p->token != GREP_PATTERN_HEAD) - die("bug: a non-header pattern in grep header list."); + die("BUG: a non-header pattern in grep header list."); if (p->field < GREP_HEADER_FIELD_MIN || GREP_HEADER_FIELD_MAX <= p->field) - die("bug: unknown header field %d", p->field); + die("BUG: unknown header field %d", p->field); compile_regexp(p, opt); } @@ -709,7 +709,7 @@ static struct grep_expr *prep_header_patterns(struct grep_opt *opt) h = compile_pattern_atom(&pp); if (!h || pp != p->next) - die("bug: malformed header expr"); + die("BUG: malformed header expr"); if (!header_group[p->field]) { header_group[p->field] = h; continue; @@ -1514,7 +1514,7 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle case GREP_BINARY_TEXT: break; default: - die("bug: unknown binary handling mode"); + die("BUG: unknown binary handling mode"); } } diff --git a/http-backend.c b/http-backend.c index 0d59499a51..adc8c8c3da 100644 --- a/http-backend.c +++ b/http-backend.c @@ -75,55 +75,57 @@ static void format_write(int fd, const char *fmt, ...) write_or_die(fd, buffer, n); } -static void http_status(unsigned code, const char *msg) +static void http_status(struct strbuf *hdr, unsigned code, const char *msg) { - format_write(1, "Status: %u %s\r\n", code, msg); + strbuf_addf(hdr, "Status: %u %s\r\n", code, msg); } -static void hdr_str(const char *name, const char *value) +static void hdr_str(struct strbuf *hdr, const char *name, const char *value) { - format_write(1, "%s: %s\r\n", name, value); + strbuf_addf(hdr, "%s: %s\r\n", name, value); } -static void hdr_int(const char *name, uintmax_t value) +static void hdr_int(struct strbuf *hdr, const char *name, uintmax_t value) { - format_write(1, "%s: %" PRIuMAX "\r\n", name, value); + strbuf_addf(hdr, "%s: %" PRIuMAX "\r\n", name, value); } -static void hdr_date(const char *name, unsigned long when) +static void hdr_date(struct strbuf *hdr, const char *name, unsigned long when) { const char *value = show_date(when, 0, DATE_MODE(RFC2822)); - hdr_str(name, value); + hdr_str(hdr, name, value); } -static void hdr_nocache(void) +static void hdr_nocache(struct strbuf *hdr) { - hdr_str("Expires", "Fri, 01 Jan 1980 00:00:00 GMT"); - hdr_str("Pragma", "no-cache"); - hdr_str("Cache-Control", "no-cache, max-age=0, must-revalidate"); + hdr_str(hdr, "Expires", "Fri, 01 Jan 1980 00:00:00 GMT"); + hdr_str(hdr, "Pragma", "no-cache"); + hdr_str(hdr, "Cache-Control", "no-cache, max-age=0, must-revalidate"); } -static void hdr_cache_forever(void) +static void hdr_cache_forever(struct strbuf *hdr) { unsigned long now = time(NULL); - hdr_date("Date", now); - hdr_date("Expires", now + 31536000); - hdr_str("Cache-Control", "public, max-age=31536000"); + hdr_date(hdr, "Date", now); + hdr_date(hdr, "Expires", now + 31536000); + hdr_str(hdr, "Cache-Control", "public, max-age=31536000"); } -static void end_headers(void) +static void end_headers(struct strbuf *hdr) { - write_or_die(1, "\r\n", 2); + strbuf_add(hdr, "\r\n", 2); + write_or_die(1, hdr->buf, hdr->len); + strbuf_release(hdr); } -__attribute__((format (printf, 1, 2))) -static NORETURN void not_found(const char *err, ...) +__attribute__((format (printf, 2, 3))) +static NORETURN void not_found(struct strbuf *hdr, const char *err, ...) { va_list params; - http_status(404, "Not Found"); - hdr_nocache(); - end_headers(); + http_status(hdr, 404, "Not Found"); + hdr_nocache(hdr); + end_headers(hdr); va_start(params, err); if (err && *err) @@ -132,14 +134,14 @@ static NORETURN void not_found(const char *err, ...) exit(0); } -__attribute__((format (printf, 1, 2))) -static NORETURN void forbidden(const char *err, ...) +__attribute__((format (printf, 2, 3))) +static NORETURN void forbidden(struct strbuf *hdr, const char *err, ...) { va_list params; - http_status(403, "Forbidden"); - hdr_nocache(); - end_headers(); + http_status(hdr, 403, "Forbidden"); + hdr_nocache(hdr); + end_headers(hdr); va_start(params, err); if (err && *err) @@ -148,21 +150,23 @@ static NORETURN void forbidden(const char *err, ...) exit(0); } -static void select_getanyfile(void) +static void select_getanyfile(struct strbuf *hdr) { if (!getanyfile) - forbidden("Unsupported service: getanyfile"); + forbidden(hdr, "Unsupported service: getanyfile"); } -static void send_strbuf(const char *type, struct strbuf *buf) +static void send_strbuf(struct strbuf *hdr, + const char *type, struct strbuf *buf) { - hdr_int(content_length, buf->len); - hdr_str(content_type, type); - end_headers(); + hdr_int(hdr, content_length, buf->len); + hdr_str(hdr, content_type, type); + end_headers(hdr); write_or_die(1, buf->buf, buf->len); } -static void send_local_file(const char *the_type, const char *name) +static void send_local_file(struct strbuf *hdr, const char *the_type, + const char *name) { char *p = git_pathdup("%s", name); size_t buf_alloc = 8192; @@ -172,14 +176,14 @@ static void send_local_file(const char *the_type, const char *name) fd = open(p, O_RDONLY); if (fd < 0) - not_found("Cannot open '%s': %s", p, strerror(errno)); + not_found(hdr, "Cannot open '%s': %s", p, strerror(errno)); if (fstat(fd, &sb) < 0) die_errno("Cannot stat '%s'", p); - hdr_int(content_length, sb.st_size); - hdr_str(content_type, the_type); - hdr_date(last_modified, sb.st_mtime); - end_headers(); + hdr_int(hdr, content_length, sb.st_size); + hdr_str(hdr, content_type, the_type); + hdr_date(hdr, last_modified, sb.st_mtime); + end_headers(hdr); for (;;) { ssize_t n = xread(fd, buf, buf_alloc); @@ -194,32 +198,32 @@ static void send_local_file(const char *the_type, const char *name) free(p); } -static void get_text_file(char *name) +static void get_text_file(struct strbuf *hdr, char *name) { - select_getanyfile(); - hdr_nocache(); - send_local_file("text/plain", name); + select_getanyfile(hdr); + hdr_nocache(hdr); + send_local_file(hdr, "text/plain", name); } -static void get_loose_object(char *name) +static void get_loose_object(struct strbuf *hdr, char *name) { - select_getanyfile(); - hdr_cache_forever(); - send_local_file("application/x-git-loose-object", name); + select_getanyfile(hdr); + hdr_cache_forever(hdr); + send_local_file(hdr, "application/x-git-loose-object", name); } -static void get_pack_file(char *name) +static void get_pack_file(struct strbuf *hdr, char *name) { - select_getanyfile(); - hdr_cache_forever(); - send_local_file("application/x-git-packed-objects", name); + select_getanyfile(hdr); + hdr_cache_forever(hdr); + send_local_file(hdr, "application/x-git-packed-objects", name); } -static void get_idx_file(char *name) +static void get_idx_file(struct strbuf *hdr, char *name) { - select_getanyfile(); - hdr_cache_forever(); - send_local_file("application/x-git-packed-objects-toc", name); + select_getanyfile(hdr); + hdr_cache_forever(hdr); + send_local_file(hdr, "application/x-git-packed-objects-toc", name); } static void http_config(void) @@ -241,14 +245,14 @@ static void http_config(void) strbuf_release(&var); } -static struct rpc_service *select_service(const char *name) +static struct rpc_service *select_service(struct strbuf *hdr, const char *name) { const char *svc_name; struct rpc_service *svc = NULL; int i; if (!skip_prefix(name, "git-", &svc_name)) - forbidden("Unsupported service: '%s'", name); + forbidden(hdr, "Unsupported service: '%s'", name); for (i = 0; i < ARRAY_SIZE(rpc_service); i++) { struct rpc_service *s = &rpc_service[i]; @@ -259,14 +263,14 @@ static struct rpc_service *select_service(const char *name) } if (!svc) - forbidden("Unsupported service: '%s'", name); + forbidden(hdr, "Unsupported service: '%s'", name); if (svc->enabled < 0) { const char *user = getenv("REMOTE_USER"); svc->enabled = (user && *user) ? 1 : 0; } if (!svc->enabled) - forbidden("Service not enabled: '%s'", svc->name); + forbidden(hdr, "Service not enabled: '%s'", svc->name); return svc; } @@ -442,23 +446,23 @@ static int show_text_ref(const char *name, const struct object_id *oid, return 0; } -static void get_info_refs(char *arg) +static void get_info_refs(struct strbuf *hdr, char *arg) { const char *service_name = get_parameter("service"); struct strbuf buf = STRBUF_INIT; - hdr_nocache(); + hdr_nocache(hdr); if (service_name) { const char *argv[] = {NULL /* service name */, "--stateless-rpc", "--advertise-refs", ".", NULL}; - struct rpc_service *svc = select_service(service_name); + struct rpc_service *svc = select_service(hdr, service_name); strbuf_addf(&buf, "application/x-git-%s-advertisement", svc->name); - hdr_str(content_type, buf.buf); - end_headers(); + hdr_str(hdr, content_type, buf.buf); + end_headers(hdr); packet_write(1, "# service=git-%s\n", svc->name); packet_flush(1); @@ -467,9 +471,9 @@ static void get_info_refs(char *arg) run_service(argv, 0); } else { - select_getanyfile(); + select_getanyfile(hdr); for_each_namespaced_ref(show_text_ref, &buf); - send_strbuf("text/plain", &buf); + send_strbuf(hdr, "text/plain", &buf); } strbuf_release(&buf); } @@ -494,24 +498,24 @@ static int show_head_ref(const char *refname, const struct object_id *oid, return 0; } -static void get_head(char *arg) +static void get_head(struct strbuf *hdr, char *arg) { struct strbuf buf = STRBUF_INIT; - select_getanyfile(); + select_getanyfile(hdr); head_ref_namespaced(show_head_ref, &buf); - send_strbuf("text/plain", &buf); + send_strbuf(hdr, "text/plain", &buf); strbuf_release(&buf); } -static void get_info_packs(char *arg) +static void get_info_packs(struct strbuf *hdr, char *arg) { size_t objdirlen = strlen(get_object_directory()); struct strbuf buf = STRBUF_INIT; struct packed_git *p; size_t cnt = 0; - select_getanyfile(); + select_getanyfile(hdr); prepare_packed_git(); for (p = packed_git; p; p = p->next) { if (p->pack_local) @@ -525,12 +529,12 @@ static void get_info_packs(char *arg) } strbuf_addch(&buf, '\n'); - hdr_nocache(); - send_strbuf("text/plain; charset=utf-8", &buf); + hdr_nocache(hdr); + send_strbuf(hdr, "text/plain; charset=utf-8", &buf); strbuf_release(&buf); } -static void check_content_type(const char *accepted_type) +static void check_content_type(struct strbuf *hdr, const char *accepted_type) { const char *actual_type = getenv("CONTENT_TYPE"); @@ -538,9 +542,9 @@ static void check_content_type(const char *accepted_type) actual_type = ""; if (strcmp(actual_type, accepted_type)) { - http_status(415, "Unsupported Media Type"); - hdr_nocache(); - end_headers(); + http_status(hdr, 415, "Unsupported Media Type"); + hdr_nocache(hdr); + end_headers(hdr); format_write(1, "Expected POST with Content-Type '%s'," " but received '%s' instead.\n", @@ -549,23 +553,23 @@ static void check_content_type(const char *accepted_type) } } -static void service_rpc(char *service_name) +static void service_rpc(struct strbuf *hdr, char *service_name) { const char *argv[] = {NULL, "--stateless-rpc", ".", NULL}; - struct rpc_service *svc = select_service(service_name); + struct rpc_service *svc = select_service(hdr, service_name); struct strbuf buf = STRBUF_INIT; strbuf_reset(&buf); strbuf_addf(&buf, "application/x-git-%s-request", svc->name); - check_content_type(buf.buf); + check_content_type(hdr, buf.buf); - hdr_nocache(); + hdr_nocache(hdr); strbuf_reset(&buf); strbuf_addf(&buf, "application/x-git-%s-result", svc->name); - hdr_str(content_type, buf.buf); + hdr_str(hdr, content_type, buf.buf); - end_headers(); + end_headers(hdr); argv[0] = svc->name; run_service(argv, svc->buffer_input); @@ -576,11 +580,13 @@ static int dead; static NORETURN void die_webcgi(const char *err, va_list params) { if (dead <= 1) { + struct strbuf hdr = STRBUF_INIT; + vreportf("fatal: ", err, params); - http_status(500, "Internal Server Error"); - hdr_nocache(); - end_headers(); + http_status(&hdr, 500, "Internal Server Error"); + hdr_nocache(&hdr); + end_headers(&hdr); } exit(0); /* we successfully reported a failure ;-) */ } @@ -617,7 +623,7 @@ static char* getdir(void) static struct service_cmd { const char *method; const char *pattern; - void (*imp)(char *); + void (*imp)(struct strbuf *, char *); } services[] = { {"GET", "/HEAD$", get_head}, {"GET", "/info/refs$", get_info_refs}, @@ -632,6 +638,21 @@ static struct service_cmd { {"POST", "/git-receive-pack$", service_rpc} }; +static int bad_request(struct strbuf *hdr, const struct service_cmd *c) +{ + const char *proto = getenv("SERVER_PROTOCOL"); + + if (proto && !strcmp(proto, "HTTP/1.1")) { + http_status(hdr, 405, "Method Not Allowed"); + hdr_str(hdr, "Allow", + !strcmp(c->method, "GET") ? "GET, HEAD" : c->method); + } else + http_status(hdr, 400, "Bad Request"); + hdr_nocache(hdr); + end_headers(hdr); + return 0; +} + int cmd_main(int argc, const char **argv) { char *method = getenv("REQUEST_METHOD"); @@ -639,6 +660,7 @@ int cmd_main(int argc, const char **argv) struct service_cmd *cmd = NULL; char *cmd_arg = NULL; int i; + struct strbuf hdr = STRBUF_INIT; set_die_routine(die_webcgi); set_die_is_recursing_routine(die_webcgi_recursing); @@ -659,18 +681,8 @@ int cmd_main(int argc, const char **argv) if (!regexec(&re, dir, 1, out, 0)) { size_t n; - if (strcmp(method, c->method)) { - const char *proto = getenv("SERVER_PROTOCOL"); - if (proto && !strcmp(proto, "HTTP/1.1")) { - http_status(405, "Method Not Allowed"); - hdr_str("Allow", !strcmp(c->method, "GET") ? - "GET, HEAD" : c->method); - } else - http_status(400, "Bad Request"); - hdr_nocache(); - end_headers(); - return 0; - } + if (strcmp(method, c->method)) + return bad_request(&hdr, c); cmd = c; n = out[0].rm_eo - out[0].rm_so; @@ -682,19 +694,19 @@ int cmd_main(int argc, const char **argv) } if (!cmd) - not_found("Request not supported: '%s'", dir); + not_found(&hdr, "Request not supported: '%s'", dir); setup_path(); if (!enter_repo(dir, 0)) - not_found("Not a git repository: '%s'", dir); + not_found(&hdr, "Not a git repository: '%s'", dir); if (!getenv("GIT_HTTP_EXPORT_ALL") && access("git-daemon-export-ok", F_OK) ) - not_found("Repository not exported: '%s'", dir); + not_found(&hdr, "Repository not exported: '%s'", dir); http_config(); max_request_buffer = git_env_ulong("GIT_HTTP_MAX_REQUEST_BUFFER", max_request_buffer); - cmd->imp(cmd_arg); + cmd->imp(&hdr, cmd_arg); return 0; } diff --git a/http-push.c b/http-push.c index dacada9094..704b1c837c 100644 --- a/http-push.c +++ b/http-push.c @@ -1137,7 +1137,7 @@ static void remote_ls(const char *path, int flags, ls.userData = userData; ls.userFunc = userFunc; - strbuf_addf(&out_buffer.buf, PROPFIND_ALL_REQUEST); + strbuf_addstr(&out_buffer.buf, PROPFIND_ALL_REQUEST); dav_headers = curl_slist_append(dav_headers, "Depth: 1"); dav_headers = curl_slist_append(dav_headers, "Content-Type: text/xml"); diff --git a/http.c b/http.c index e81dd132d4..cd40b012f8 100644 --- a/http.c +++ b/http.c @@ -1225,7 +1225,7 @@ void append_remote_object_url(struct strbuf *buf, const char *url, strbuf_addf(buf, "objects/%.*s/", 2, hex); if (!only_two_digit_prefix) - strbuf_addf(buf, "%s", hex+2); + strbuf_addstr(buf, hex + 2); } char *get_remote_object_url(const char *url, const char *hex, diff --git a/ident.c b/ident.c index 139c5289d0..e20a772dde 100644 --- a/ident.c +++ b/ident.c @@ -184,6 +184,11 @@ static const char *ident_default_date(void) return git_default_date.buf; } +void reset_ident_date(void) +{ + strbuf_reset(&git_default_date); +} + static int crud(unsigned char c) { return c <= 32 || diff --git a/imap-send.c b/imap-send.c index db0fafee99..0f5f4760e9 100644 --- a/imap-send.c +++ b/imap-send.c @@ -511,7 +511,7 @@ static int nfsnprintf(char *buf, int blen, const char *fmt, ...) va_start(va, fmt); if (blen <= 0 || (unsigned)(ret = vsnprintf(buf, blen, fmt, va)) >= (unsigned)blen) - die("Fatal: buffer too small. Please report a bug."); + die("BUG: buffer too small. Please report a bug."); va_end(va); return ret; } diff --git a/lockfile.h b/lockfile.h index 3d301937b0..d26ad27b2b 100644 --- a/lockfile.h +++ b/lockfile.h @@ -55,6 +55,10 @@ * * calling `fdopen_lock_file()` to get a `FILE` pointer for the * open file and writing to the file using stdio. * + * Note that the file descriptor returned by hold_lock_file_for_update() + * is marked O_CLOEXEC, so the new contents must be written by the + * current process, not a spawned one. + * * When finished writing, the caller can: * * * Close the file descriptor and rename the lockfile to its final diff --git a/log-tree.c b/log-tree.c index d0062e6788..bfb735c845 100644 --- a/log-tree.c +++ b/log-tree.c @@ -263,8 +263,6 @@ void format_decorations_extended(struct strbuf *sb, if (current_and_HEAD && decoration->type == DECORATION_REF_HEAD) { - strbuf_addstr(sb, color_reset); - strbuf_addstr(sb, color_commit); strbuf_addstr(sb, " -> "); strbuf_addstr(sb, color_reset); strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type)); diff --git a/mailinfo.c b/mailinfo.c index 9f19ca1080..e19abe3cb9 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -179,12 +179,6 @@ static void handle_content_type(struct mailinfo *mi, struct strbuf *line) } } -static void handle_message_id(struct mailinfo *mi, const struct strbuf *line) -{ - if (mi->add_message_id) - mi->message_id = strdup(line->buf); -} - static void handle_content_transfer_encoding(struct mailinfo *mi, const struct strbuf *line) { @@ -495,7 +489,8 @@ static int check_header(struct mailinfo *mi, len = strlen("Message-Id: "); strbuf_add(&sb, line->buf + len, line->len - len); decode_header(mi, &sb); - handle_message_id(mi, &sb); + if (mi->add_message_id) + mi->message_id = strbuf_detach(&sb, NULL); ret = 1; goto check_header_out; } diff --git a/merge-recursive.c b/merge-recursive.c index a4a1195f61..e34912683c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -23,6 +23,37 @@ #include "dir.h" #include "submodule.h" +static void flush_output(struct merge_options *o) +{ + if (o->buffer_output < 2 && o->obuf.len) { + fputs(o->obuf.buf, stdout); + strbuf_reset(&o->obuf); + } +} + +static int err(struct merge_options *o, const char *err, ...) +{ + va_list params; + + if (o->buffer_output < 2) + flush_output(o); + else { + strbuf_complete(&o->obuf, '\n'); + strbuf_addstr(&o->obuf, "error: "); + } + va_start(params, err); + strbuf_vaddf(&o->obuf, err, params); + va_end(params); + if (o->buffer_output > 1) + strbuf_addch(&o->obuf, '\n'); + else { + error("%s", o->obuf.buf); + strbuf_reset(&o->obuf); + } + + return -1; +} + static struct tree *shift_tree_object(struct tree *one, struct tree *two, const char *subtree_shift) { @@ -42,12 +73,9 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two, static struct commit *make_virtual_commit(struct tree *tree, const char *comment) { struct commit *commit = alloc_commit_node(); - struct merge_remote_desc *desc = xmalloc(sizeof(*desc)); - desc->name = comment; - desc->obj = (struct object *)commit; + set_merge_remote_desc(commit, comment, (struct object *)commit); commit->tree = tree; - commit->util = desc; commit->object.parsed = 1; return commit; } @@ -148,14 +176,6 @@ static int show(struct merge_options *o, int v) return (!o->call_depth && o->verbosity >= v) || o->verbosity >= 5; } -static void flush_output(struct merge_options *o) -{ - if (o->obuf.len) { - fputs(o->obuf.buf, stdout); - strbuf_reset(&o->obuf); - } -} - __attribute__((format (printf, 3, 4))) static void output(struct merge_options *o, int v, const char *fmt, ...) { @@ -177,28 +197,30 @@ static void output(struct merge_options *o, int v, const char *fmt, ...) static void output_commit_title(struct merge_options *o, struct commit *commit) { - int i; - flush_output(o); - for (i = o->call_depth; i--;) - fputs(" ", stdout); + strbuf_addchars(&o->obuf, ' ', o->call_depth * 2); if (commit->util) - printf("virtual %s\n", merge_remote_util(commit)->name); + strbuf_addf(&o->obuf, "virtual %s\n", + merge_remote_util(commit)->name); else { - printf("%s ", find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV)); + strbuf_addf(&o->obuf, "%s ", + find_unique_abbrev(commit->object.oid.hash, + DEFAULT_ABBREV)); if (parse_commit(commit) != 0) - printf(_("(bad commit)\n")); + strbuf_addf(&o->obuf, _("(bad commit)\n")); else { const char *title; const char *msg = get_commit_buffer(commit, NULL); int len = find_commit_subject(msg, &title); if (len) - printf("%.*s\n", len, title); + strbuf_addf(&o->obuf, "%.*s\n", len, title); unuse_commit_buffer(commit, msg); } } + flush_output(o); } -static int add_cacheinfo(unsigned int mode, const struct object_id *oid, +static int add_cacheinfo(struct merge_options *o, + unsigned int mode, const struct object_id *oid, const char *path, int stage, int refresh, int options) { struct cache_entry *ce; @@ -206,7 +228,7 @@ static int add_cacheinfo(unsigned int mode, const struct object_id *oid, ce = make_cache_entry(mode, oid ? oid->hash : null_sha1, path, stage, 0); if (!ce) - return error(_("addinfo_cache failed for path '%s'"), path); + return err(o, _("addinfo_cache failed for path '%s'"), path); ret = add_cache_entry(ce, options); if (refresh) { @@ -268,15 +290,17 @@ struct tree *write_tree_from_memory(struct merge_options *o) fprintf(stderr, "BUG: %d %.*s\n", ce_stage(ce), (int)ce_namelen(ce), ce->name); } - die("Bug in merge-recursive.c"); + die("BUG: unmerged index entries in merge-recursive.c"); } if (!active_cache_tree) active_cache_tree = cache_tree(); if (!cache_tree_fully_valid(active_cache_tree) && - cache_tree_update(&the_index, 0) < 0) - die(_("error building trees")); + cache_tree_update(&the_index, 0) < 0) { + err(o, _("error building trees")); + return NULL; + } result = lookup_tree(active_cache_tree->sha1); @@ -409,7 +433,7 @@ static void record_df_conflict_files(struct merge_options *o, * and the file need to be present, then the D/F file will be * reinstated with a new unique name at the time it is processed. */ - struct string_list df_sorted_entries; + struct string_list df_sorted_entries = STRING_LIST_INIT_NODUP; const char *last_file = NULL; int last_len = 0; int i; @@ -422,7 +446,6 @@ static void record_df_conflict_files(struct merge_options *o, return; /* Ensure D/F conflicts are adjacent in the entries list. */ - memset(&df_sorted_entries, 0, sizeof(struct string_list)); for (i = 0; i < entries->nr; i++) { struct string_list_item *next = &entries->items[i]; string_list_append(&df_sorted_entries, next->string)->util = @@ -542,7 +565,8 @@ static struct string_list *get_renames(struct merge_options *o, return renames; } -static int update_stages(const char *path, const struct diff_filespec *o, +static int update_stages(struct merge_options *opt, const char *path, + const struct diff_filespec *o, const struct diff_filespec *a, const struct diff_filespec *b) { @@ -561,13 +585,13 @@ static int update_stages(const char *path, const struct diff_filespec *o, if (remove_file_from_cache(path)) return -1; if (o) - if (add_cacheinfo(o->mode, &o->oid, path, 1, 0, options)) + if (add_cacheinfo(opt, o->mode, &o->oid, path, 1, 0, options)) return -1; if (a) - if (add_cacheinfo(a->mode, &a->oid, path, 2, 0, options)) + if (add_cacheinfo(opt, a->mode, &a->oid, path, 2, 0, options)) return -1; if (b) - if (add_cacheinfo(b->mode, &b->oid, path, 3, 0, options)) + if (add_cacheinfo(opt, b->mode, &b->oid, path, 3, 0, options)) return -1; return 0; } @@ -667,23 +691,21 @@ static int was_tracked(const char *path) { int pos = cache_name_pos(path, strlen(path)); - if (pos < 0) - pos = -1 - pos; - while (pos < active_nr && - !strcmp(path, active_cache[pos]->name)) { - /* - * If stage #0, it is definitely tracked. - * If it has stage #2 then it was tracked - * before this merge started. All other - * cases the path was not tracked. - */ - switch (ce_stage(active_cache[pos])) { - case 0: - case 2: + if (0 <= pos) + /* we have been tracking this path */ + return 1; + + /* + * Look for an unmerged entry for the path, + * specifically stage #2, which would indicate + * that "our" side before the merge started + * had the path tracked (and resulted in a conflict). + */ + for (pos = -1 - pos; + pos < active_nr && !strcmp(path, active_cache[pos]->name); + pos++) + if (ce_stage(active_cache[pos]) == 2) return 1; - } - pos++; - } return 0; } @@ -718,12 +740,10 @@ static int make_room_for_path(struct merge_options *o, const char *path) /* Make sure leading directories are created */ status = safe_create_leading_directories_const(path); if (status) { - if (status == SCLD_EXISTS) { + if (status == SCLD_EXISTS) /* something else exists */ - error(msg, path, _(": perhaps a D/F conflict?")); - return -1; - } - die(msg, path, ""); + return err(o, msg, path, _(": perhaps a D/F conflict?")); + return err(o, msg, path, ""); } /* @@ -731,7 +751,7 @@ static int make_room_for_path(struct merge_options *o, const char *path) * tracking it. */ if (would_lose_untracked(path)) - return error(_("refusing to lose untracked file at '%s'"), + return err(o, _("refusing to lose untracked file at '%s'"), path); /* Successful unlink is good.. */ @@ -741,16 +761,18 @@ static int make_room_for_path(struct merge_options *o, const char *path) if (errno == ENOENT) return 0; /* .. but not some other error (who really cares what?) */ - return error(msg, path, _(": perhaps a D/F conflict?")); + return err(o, msg, path, _(": perhaps a D/F conflict?")); } -static void update_file_flags(struct merge_options *o, - const struct object_id *oid, - unsigned mode, - const char *path, - int update_cache, - int update_wd) +static int update_file_flags(struct merge_options *o, + const struct object_id *oid, + unsigned mode, + const char *path, + int update_cache, + int update_wd) { + int ret = 0; + if (o->call_depth) update_wd = 0; @@ -771,9 +793,11 @@ static void update_file_flags(struct merge_options *o, buf = read_sha1_file(oid->hash, &type, &size); if (!buf) - die(_("cannot read object %s '%s'"), oid_to_hex(oid), path); - if (type != OBJ_BLOB) - die(_("blob expected for %s '%s'"), oid_to_hex(oid), path); + return err(o, _("cannot read object %s '%s'"), oid_to_hex(oid), path); + if (type != OBJ_BLOB) { + ret = err(o, _("blob expected for %s '%s'"), oid_to_hex(oid), path); + goto free_buf; + } if (S_ISREG(mode)) { struct strbuf strbuf = STRBUF_INIT; if (convert_to_working_tree(path, buf, size, &strbuf)) { @@ -785,8 +809,7 @@ static void update_file_flags(struct merge_options *o, if (make_room_for_path(o, path) < 0) { update_wd = 0; - free(buf); - goto update_index; + goto free_buf; } if (S_ISREG(mode) || (!has_symlinks && S_ISLNK(mode))) { int fd; @@ -795,8 +818,11 @@ static void update_file_flags(struct merge_options *o, else mode = 0666; fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode); - if (fd < 0) - die_errno(_("failed to open '%s'"), path); + if (fd < 0) { + ret = err(o, _("failed to open '%s': %s"), + path, strerror(errno)); + goto free_buf; + } write_in_full(fd, buf, size); close(fd); } else if (S_ISLNK(mode)) { @@ -804,25 +830,29 @@ static void update_file_flags(struct merge_options *o, safe_create_leading_directories_const(path); unlink(path); if (symlink(lnk, path)) - die_errno(_("failed to symlink '%s'"), path); + ret = err(o, _("failed to symlink '%s': %s"), + path, strerror(errno)); free(lnk); } else - die(_("do not know what to do with %06o %s '%s'"), - mode, oid_to_hex(oid), path); + ret = err(o, + _("do not know what to do with %06o %s '%s'"), + mode, oid_to_hex(oid), path); + free_buf: free(buf); } update_index: - if (update_cache) - add_cacheinfo(mode, oid, path, 0, update_wd, ADD_CACHE_OK_TO_ADD); + if (!ret && update_cache) + add_cacheinfo(o, mode, oid, path, 0, update_wd, ADD_CACHE_OK_TO_ADD); + return ret; } -static void update_file(struct merge_options *o, - int clean, - const struct object_id *oid, - unsigned mode, - const char *path) +static int update_file(struct merge_options *o, + int clean, + const struct object_id *oid, + unsigned mode, + const char *path) { - update_file_flags(o, oid, mode, path, o->call_depth || clean, !o->call_depth); + return update_file_flags(o, oid, mode, path, o->call_depth || clean, !o->call_depth); } /* Low level file merging, update and removal */ @@ -896,117 +926,120 @@ static int merge_3way(struct merge_options *o, return merge_status; } -static struct merge_file_info merge_file_1(struct merge_options *o, +static int merge_file_1(struct merge_options *o, const struct diff_filespec *one, const struct diff_filespec *a, const struct diff_filespec *b, const char *branch1, - const char *branch2) + const char *branch2, + struct merge_file_info *result) { - struct merge_file_info result; - result.merge = 0; - result.clean = 1; + result->merge = 0; + result->clean = 1; if ((S_IFMT & a->mode) != (S_IFMT & b->mode)) { - result.clean = 0; + result->clean = 0; if (S_ISREG(a->mode)) { - result.mode = a->mode; - oidcpy(&result.oid, &a->oid); + result->mode = a->mode; + oidcpy(&result->oid, &a->oid); } else { - result.mode = b->mode; - oidcpy(&result.oid, &b->oid); + result->mode = b->mode; + oidcpy(&result->oid, &b->oid); } } else { if (!oid_eq(&a->oid, &one->oid) && !oid_eq(&b->oid, &one->oid)) - result.merge = 1; + result->merge = 1; /* * Merge modes */ if (a->mode == b->mode || a->mode == one->mode) - result.mode = b->mode; + result->mode = b->mode; else { - result.mode = a->mode; + result->mode = a->mode; if (b->mode != one->mode) { - result.clean = 0; - result.merge = 1; + result->clean = 0; + result->merge = 1; } } if (oid_eq(&a->oid, &b->oid) || oid_eq(&a->oid, &one->oid)) - oidcpy(&result.oid, &b->oid); + oidcpy(&result->oid, &b->oid); else if (oid_eq(&b->oid, &one->oid)) - oidcpy(&result.oid, &a->oid); + oidcpy(&result->oid, &a->oid); else if (S_ISREG(a->mode)) { mmbuffer_t result_buf; - int merge_status; + int ret = 0, merge_status; merge_status = merge_3way(o, &result_buf, one, a, b, branch1, branch2); if ((merge_status < 0) || !result_buf.ptr) - die(_("Failed to execute internal merge")); + ret = err(o, _("Failed to execute internal merge")); - if (write_sha1_file(result_buf.ptr, result_buf.size, - blob_type, result.oid.hash)) - die(_("Unable to add %s to database"), - a->path); + if (!ret && write_sha1_file(result_buf.ptr, result_buf.size, + blob_type, result->oid.hash)) + ret = err(o, _("Unable to add %s to database"), + a->path); free(result_buf.ptr); - result.clean = (merge_status == 0); + if (ret) + return ret; + result->clean = (merge_status == 0); } else if (S_ISGITLINK(a->mode)) { - result.clean = merge_submodule(result.oid.hash, + result->clean = merge_submodule(result->oid.hash, one->path, one->oid.hash, a->oid.hash, b->oid.hash, !o->call_depth); } else if (S_ISLNK(a->mode)) { - oidcpy(&result.oid, &a->oid); + oidcpy(&result->oid, &a->oid); if (!oid_eq(&a->oid, &b->oid)) - result.clean = 0; - } else { - die(_("unsupported object type in the tree")); - } + result->clean = 0; + } else + die("BUG: unsupported object type in the tree"); } - return result; + return 0; } -static struct merge_file_info -merge_file_special_markers(struct merge_options *o, +static int merge_file_special_markers(struct merge_options *o, const struct diff_filespec *one, const struct diff_filespec *a, const struct diff_filespec *b, const char *branch1, const char *filename1, const char *branch2, - const char *filename2) + const char *filename2, + struct merge_file_info *mfi) { char *side1 = NULL; char *side2 = NULL; - struct merge_file_info mfi; + int ret; if (filename1) side1 = xstrfmt("%s:%s", branch1, filename1); if (filename2) side2 = xstrfmt("%s:%s", branch2, filename2); - mfi = merge_file_1(o, one, a, b, - side1 ? side1 : branch1, side2 ? side2 : branch2); + ret = merge_file_1(o, one, a, b, + side1 ? side1 : branch1, + side2 ? side2 : branch2, mfi); free(side1); free(side2); - return mfi; + return ret; } -static struct merge_file_info merge_file_one(struct merge_options *o, +static int merge_file_one(struct merge_options *o, const char *path, const struct object_id *o_oid, int o_mode, const struct object_id *a_oid, int a_mode, const struct object_id *b_oid, int b_mode, const char *branch1, - const char *branch2) + const char *branch2, + struct merge_file_info *mfi) { struct diff_filespec one, a, b; @@ -1017,10 +1050,10 @@ static struct merge_file_info merge_file_one(struct merge_options *o, a.mode = a_mode; oidcpy(&b.oid, b_oid); b.mode = b_mode; - return merge_file_1(o, &one, &a, &b, branch1, branch2); + return merge_file_1(o, &one, &a, &b, branch1, branch2, mfi); } -static void handle_change_delete(struct merge_options *o, +static int handle_change_delete(struct merge_options *o, const char *path, const struct object_id *o_oid, int o_mode, const struct object_id *a_oid, int a_mode, @@ -1028,6 +1061,7 @@ static void handle_change_delete(struct merge_options *o, const char *change, const char *change_past) { char *renamed = NULL; + int ret = 0; if (dir_in_way(path, !o->call_depth)) { renamed = unique_path(o, path, a_oid ? o->branch1 : o->branch2); } @@ -1038,21 +1072,23 @@ static void handle_change_delete(struct merge_options *o, * correct; since there is no true "middle point" between * them, simply reuse the base version for virtual merge base. */ - remove_file_from_cache(path); - update_file(o, 0, o_oid, o_mode, renamed ? renamed : path); + ret = remove_file_from_cache(path); + if (!ret) + ret = update_file(o, 0, o_oid, o_mode, + renamed ? renamed : path); } else if (!a_oid) { if (!renamed) { output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s " "and %s in %s. Version %s of %s left in tree."), change, path, o->branch1, change_past, o->branch2, o->branch2, path); - update_file(o, 0, b_oid, b_mode, path); + ret = update_file(o, 0, b_oid, b_mode, path); } else { output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s " "and %s in %s. Version %s of %s left in tree at %s."), change, path, o->branch1, change_past, o->branch2, o->branch2, path, renamed); - update_file(o, 0, b_oid, b_mode, renamed); + ret = update_file(o, 0, b_oid, b_mode, renamed); } } else { if (!renamed) { @@ -1065,7 +1101,7 @@ static void handle_change_delete(struct merge_options *o, "and %s in %s. Version %s of %s left in tree at %s."), change, path, o->branch2, change_past, o->branch1, o->branch1, path, renamed); - update_file(o, 0, a_oid, a_mode, renamed); + ret = update_file(o, 0, a_oid, a_mode, renamed); } /* * No need to call update_file() on path when !renamed, since @@ -1075,9 +1111,11 @@ static void handle_change_delete(struct merge_options *o, */ } free(renamed); + + return ret; } -static void conflict_rename_delete(struct merge_options *o, +static int conflict_rename_delete(struct merge_options *o, struct diff_filepair *pair, const char *rename_branch, const char *other_branch) @@ -1097,21 +1135,20 @@ static void conflict_rename_delete(struct merge_options *o, b_mode = dest->mode; } - handle_change_delete(o, - o->call_depth ? orig->path : dest->path, - &orig->oid, orig->mode, - a_oid, a_mode, - b_oid, b_mode, - _("rename"), _("renamed")); - - if (o->call_depth) { - remove_file_from_cache(dest->path); - } else { - update_stages(dest->path, NULL, - rename_branch == o->branch1 ? dest : NULL, - rename_branch == o->branch1 ? NULL : dest); - } + if (handle_change_delete(o, + o->call_depth ? orig->path : dest->path, + &orig->oid, orig->mode, + a_oid, a_mode, + b_oid, b_mode, + _("rename"), _("renamed"))) + return -1; + if (o->call_depth) + return remove_file_from_cache(dest->path); + else + return update_stages(o, dest->path, NULL, + rename_branch == o->branch1 ? dest : NULL, + rename_branch == o->branch1 ? NULL : dest); } static struct diff_filespec *filespec_from_entry(struct diff_filespec *target, @@ -1127,7 +1164,7 @@ static struct diff_filespec *filespec_from_entry(struct diff_filespec *target, return target; } -static void handle_file(struct merge_options *o, +static int handle_file(struct merge_options *o, struct diff_filespec *rename, int stage, struct rename_conflict_info *ci) @@ -1137,6 +1174,7 @@ static void handle_file(struct merge_options *o, const char *cur_branch, *other_branch; struct diff_filespec other; struct diff_filespec *add; + int ret; if (stage == 2) { dst_entry = ci->dst_entry1; @@ -1151,7 +1189,8 @@ static void handle_file(struct merge_options *o, add = filespec_from_entry(&other, dst_entry, stage ^ 1); if (add) { char *add_name = unique_path(o, rename->path, other_branch); - update_file(o, 0, &add->oid, add->mode, add_name); + if (update_file(o, 0, &add->oid, add->mode, add_name)) + return -1; remove_file(o, 0, rename->path, 0); dst_name = unique_path(o, rename->path, cur_branch); @@ -1162,17 +1201,20 @@ static void handle_file(struct merge_options *o, rename->path, other_branch, dst_name); } } - update_file(o, 0, &rename->oid, rename->mode, dst_name); - if (stage == 2) - update_stages(rename->path, NULL, rename, add); + if ((ret = update_file(o, 0, &rename->oid, rename->mode, dst_name))) + ; /* fall through, do allow dst_name to be released */ + else if (stage == 2) + ret = update_stages(o, rename->path, NULL, rename, add); else - update_stages(rename->path, NULL, add, rename); + ret = update_stages(o, rename->path, NULL, add, rename); if (dst_name != rename->path) free(dst_name); + + return ret; } -static void conflict_rename_rename_1to2(struct merge_options *o, +static int conflict_rename_rename_1to2(struct merge_options *o, struct rename_conflict_info *ci) { /* One file was renamed in both branches, but to different names. */ @@ -1190,18 +1232,21 @@ static void conflict_rename_rename_1to2(struct merge_options *o, struct merge_file_info mfi; struct diff_filespec other; struct diff_filespec *add; - mfi = merge_file_one(o, one->path, + if (merge_file_one(o, one->path, &one->oid, one->mode, &a->oid, a->mode, &b->oid, b->mode, - ci->branch1, ci->branch2); + ci->branch1, ci->branch2, &mfi)) + return -1; + /* * FIXME: For rename/add-source conflicts (if we could detect * such), this is wrong. We should instead find a unique * pathname and then either rename the add-source file to that * unique path, or use that unique path instead of src here. */ - update_file(o, 0, &mfi.oid, mfi.mode, one->path); + if (update_file(o, 0, &mfi.oid, mfi.mode, one->path)) + return -1; /* * Above, we put the merged content at the merge-base's @@ -1212,22 +1257,26 @@ static void conflict_rename_rename_1to2(struct merge_options *o, * resolving the conflict at that path in its favor. */ add = filespec_from_entry(&other, ci->dst_entry1, 2 ^ 1); - if (add) - update_file(o, 0, &add->oid, add->mode, a->path); + if (add) { + if (update_file(o, 0, &add->oid, add->mode, a->path)) + return -1; + } else remove_file_from_cache(a->path); add = filespec_from_entry(&other, ci->dst_entry2, 3 ^ 1); - if (add) - update_file(o, 0, &add->oid, add->mode, b->path); + if (add) { + if (update_file(o, 0, &add->oid, add->mode, b->path)) + return -1; + } else remove_file_from_cache(b->path); - } else { - handle_file(o, a, 2, ci); - handle_file(o, b, 3, ci); - } + } else if (handle_file(o, a, 2, ci) || handle_file(o, b, 3, ci)) + return -1; + + return 0; } -static void conflict_rename_rename_2to1(struct merge_options *o, +static int conflict_rename_rename_2to1(struct merge_options *o, struct rename_conflict_info *ci) { /* Two files, a & b, were renamed to the same thing, c. */ @@ -1238,6 +1287,7 @@ static void conflict_rename_rename_2to1(struct merge_options *o, char *path = c1->path; /* == c2->path */ struct merge_file_info mfi_c1; struct merge_file_info mfi_c2; + int ret; output(o, 1, _("CONFLICT (rename/rename): " "Rename %s->%s in %s. " @@ -1248,12 +1298,13 @@ static void conflict_rename_rename_2to1(struct merge_options *o, remove_file(o, 1, a->path, o->call_depth || would_lose_untracked(a->path)); remove_file(o, 1, b->path, o->call_depth || would_lose_untracked(b->path)); - mfi_c1 = merge_file_special_markers(o, a, c1, &ci->ren1_other, - o->branch1, c1->path, - o->branch2, ci->ren1_other.path); - mfi_c2 = merge_file_special_markers(o, b, &ci->ren2_other, c2, - o->branch1, ci->ren2_other.path, - o->branch2, c2->path); + if (merge_file_special_markers(o, a, c1, &ci->ren1_other, + o->branch1, c1->path, + o->branch2, ci->ren1_other.path, &mfi_c1) || + merge_file_special_markers(o, b, &ci->ren2_other, c2, + o->branch1, ci->ren2_other.path, + o->branch2, c2->path, &mfi_c2)) + return -1; if (o->call_depth) { /* @@ -1264,19 +1315,25 @@ static void conflict_rename_rename_2to1(struct merge_options *o, * again later for the non-recursive merge. */ remove_file(o, 0, path, 0); - update_file(o, 0, &mfi_c1.oid, mfi_c1.mode, a->path); - update_file(o, 0, &mfi_c2.oid, mfi_c2.mode, b->path); + ret = update_file(o, 0, &mfi_c1.oid, mfi_c1.mode, a->path); + if (!ret) + ret = update_file(o, 0, &mfi_c2.oid, mfi_c2.mode, + b->path); } else { char *new_path1 = unique_path(o, path, ci->branch1); char *new_path2 = unique_path(o, path, ci->branch2); output(o, 1, _("Renaming %s to %s and %s to %s instead"), a->path, new_path1, b->path, new_path2); remove_file(o, 0, path, 0); - update_file(o, 0, &mfi_c1.oid, mfi_c1.mode, new_path1); - update_file(o, 0, &mfi_c2.oid, mfi_c2.mode, new_path2); + ret = update_file(o, 0, &mfi_c1.oid, mfi_c1.mode, new_path1); + if (!ret) + ret = update_file(o, 0, &mfi_c2.oid, mfi_c2.mode, + new_path2); free(new_path2); free(new_path1); } + + return ret; } static int process_renames(struct merge_options *o, @@ -1354,7 +1411,7 @@ static int process_renames(struct merge_options *o, const char *ren2_dst = ren2->pair->two->path; enum rename_type rename_type; if (strcmp(ren1_src, ren2_src) != 0) - die("ren1_src != ren2_src"); + die("BUG: ren1_src != ren2_src"); ren2->dst_entry->processed = 1; ren2->processed = 1; if (strcmp(ren1_dst, ren2_dst) != 0) { @@ -1388,7 +1445,7 @@ static int process_renames(struct merge_options *o, ren2 = lookup->util; ren2_dst = ren2->pair->two->path; if (strcmp(ren1_dst, ren2_dst) != 0) - die("ren1_dst != ren2_dst"); + die("BUG: ren1_dst != ren2_dst"); clean_merge = 0; ren2->processed = 1; @@ -1461,12 +1518,13 @@ static int process_renames(struct merge_options *o, * update_file_flags() instead of * update_file(). */ - update_file_flags(o, - &ren1->pair->two->oid, - ren1->pair->two->mode, - ren1_dst, - 1, /* update_cache */ - 0 /* update_wd */); + if (update_file_flags(o, + &ren1->pair->two->oid, + ren1->pair->two->mode, + ren1_dst, + 1, /* update_cache */ + 0 /* update_wd */)) + clean_merge = -1; } else if (!oid_eq(&dst_other.oid, &null_oid)) { clean_merge = 0; try_merge = 1; @@ -1476,26 +1534,33 @@ static int process_renames(struct merge_options *o, ren1_dst, branch2); if (o->call_depth) { struct merge_file_info mfi; - mfi = merge_file_one(o, ren1_dst, &null_oid, 0, - &ren1->pair->two->oid, - ren1->pair->two->mode, - &dst_other.oid, - dst_other.mode, - branch1, branch2); + if (merge_file_one(o, ren1_dst, &null_oid, 0, + &ren1->pair->two->oid, + ren1->pair->two->mode, + &dst_other.oid, + dst_other.mode, + branch1, branch2, &mfi)) { + clean_merge = -1; + goto cleanup_and_return; + } output(o, 1, _("Adding merged %s"), ren1_dst); - update_file(o, 0, &mfi.oid, - mfi.mode, ren1_dst); + if (update_file(o, 0, &mfi.oid, + mfi.mode, ren1_dst)) + clean_merge = -1; try_merge = 0; } else { char *new_path = unique_path(o, ren1_dst, branch2); output(o, 1, _("Adding as %s instead"), new_path); - update_file(o, 0, &dst_other.oid, - dst_other.mode, new_path); + if (update_file(o, 0, &dst_other.oid, + dst_other.mode, new_path)) + clean_merge = -1; free(new_path); } } else try_merge = 1; + if (clean_merge < 0) + goto cleanup_and_return; if (try_merge) { struct diff_filespec *one, *a, *b; src_other.path = (char *)ren1_src; @@ -1522,6 +1587,7 @@ static int process_renames(struct merge_options *o, } } } +cleanup_and_return: string_list_clear(&a_by_dst, 0); string_list_clear(&b_by_dst, 0); @@ -1533,23 +1599,25 @@ static struct object_id *stage_oid(const struct object_id *oid, unsigned mode) return (is_null_oid(oid) || mode == 0) ? NULL: (struct object_id *)oid; } -static int read_oid_strbuf(const struct object_id *oid, struct strbuf *dst) +static int read_oid_strbuf(struct merge_options *o, + const struct object_id *oid, struct strbuf *dst) { void *buf; enum object_type type; unsigned long size; buf = read_sha1_file(oid->hash, &type, &size); if (!buf) - return error(_("cannot read object %s"), oid_to_hex(oid)); + return err(o, _("cannot read object %s"), oid_to_hex(oid)); if (type != OBJ_BLOB) { free(buf); - return error(_("object %s is not a blob"), oid_to_hex(oid)); + return err(o, _("object %s is not a blob"), oid_to_hex(oid)); } strbuf_attach(dst, buf, size, size + 1); return 0; } -static int blob_unchanged(const struct object_id *o_oid, +static int blob_unchanged(struct merge_options *opt, + const struct object_id *o_oid, unsigned o_mode, const struct object_id *a_oid, unsigned a_mode, @@ -1567,7 +1635,7 @@ static int blob_unchanged(const struct object_id *o_oid, return 0; assert(o_oid && a_oid); - if (read_oid_strbuf(o_oid, &o) || read_oid_strbuf(a_oid, &a)) + if (read_oid_strbuf(opt, o_oid, &o) || read_oid_strbuf(opt, a_oid, &a)) goto error_return; /* * Note: binary | is used so that both renormalizations are @@ -1584,18 +1652,18 @@ static int blob_unchanged(const struct object_id *o_oid, return ret; } -static void handle_modify_delete(struct merge_options *o, +static int handle_modify_delete(struct merge_options *o, const char *path, struct object_id *o_oid, int o_mode, struct object_id *a_oid, int a_mode, struct object_id *b_oid, int b_mode) { - handle_change_delete(o, - path, - o_oid, o_mode, - a_oid, a_mode, - b_oid, b_mode, - _("modify"), _("modified")); + return handle_change_delete(o, + path, + o_oid, o_mode, + a_oid, a_mode, + b_oid, b_mode, + _("modify"), _("modified")); } static int merge_content(struct merge_options *o, @@ -1639,9 +1707,10 @@ static int merge_content(struct merge_options *o, if (dir_in_way(path, !o->call_depth)) df_conflict_remains = 1; } - mfi = merge_file_special_markers(o, &one, &a, &b, - o->branch1, path1, - o->branch2, path2); + if (merge_file_special_markers(o, &one, &a, &b, + o->branch1, path1, + o->branch2, path2, &mfi)) + return -1; if (mfi.clean && !df_conflict_remains && oid_eq(&mfi.oid, a_oid) && mfi.mode == a_mode) { @@ -1655,7 +1724,7 @@ static int merge_content(struct merge_options *o, */ path_renamed_outside_HEAD = !path2 || !strcmp(path, path2); if (!path_renamed_outside_HEAD) { - add_cacheinfo(mfi.mode, &mfi.oid, path, + add_cacheinfo(o, mfi.mode, &mfi.oid, path, 0, (!o->call_depth), 0); return mfi.clean; } @@ -1668,7 +1737,8 @@ static int merge_content(struct merge_options *o, output(o, 1, _("CONFLICT (%s): Merge conflict in %s"), reason, path); if (rename_conflict_info && !df_conflict_remains) - update_stages(path, &one, &a, &b); + if (update_stages(o, path, &one, &a, &b)) + return -1; } if (df_conflict_remains) { @@ -1676,30 +1746,33 @@ static int merge_content(struct merge_options *o, if (o->call_depth) { remove_file_from_cache(path); } else { - if (!mfi.clean) - update_stages(path, &one, &a, &b); - else { + if (!mfi.clean) { + if (update_stages(o, path, &one, &a, &b)) + return -1; + } else { int file_from_stage2 = was_tracked(path); struct diff_filespec merged; oidcpy(&merged.oid, &mfi.oid); merged.mode = mfi.mode; - update_stages(path, NULL, - file_from_stage2 ? &merged : NULL, - file_from_stage2 ? NULL : &merged); + if (update_stages(o, path, NULL, + file_from_stage2 ? &merged : NULL, + file_from_stage2 ? NULL : &merged)) + return -1; } } new_path = unique_path(o, path, rename_conflict_info->branch1); output(o, 1, _("Adding as %s instead"), new_path); - update_file(o, 0, &mfi.oid, mfi.mode, new_path); + if (update_file(o, 0, &mfi.oid, mfi.mode, new_path)) { + free(new_path); + return -1; + } free(new_path); mfi.clean = 0; - } else { - update_file(o, mfi.clean, &mfi.oid, mfi.mode, path); - } + } else if (update_file(o, mfi.clean, &mfi.oid, mfi.mode, path)) + return -1; return mfi.clean; - } /* Per entry merge function */ @@ -1727,17 +1800,21 @@ static int process_entry(struct merge_options *o, break; case RENAME_DELETE: clean_merge = 0; - conflict_rename_delete(o, conflict_info->pair1, - conflict_info->branch1, - conflict_info->branch2); + if (conflict_rename_delete(o, + conflict_info->pair1, + conflict_info->branch1, + conflict_info->branch2)) + clean_merge = -1; break; case RENAME_ONE_FILE_TO_TWO: clean_merge = 0; - conflict_rename_rename_1to2(o, conflict_info); + if (conflict_rename_rename_1to2(o, conflict_info)) + clean_merge = -1; break; case RENAME_TWO_FILES_TO_ONE: clean_merge = 0; - conflict_rename_rename_2to1(o, conflict_info); + if (conflict_rename_rename_2to1(o, conflict_info)) + clean_merge = -1; break; default: entry->processed = 0; @@ -1746,8 +1823,8 @@ static int process_entry(struct merge_options *o, } else if (o_oid && (!a_oid || !b_oid)) { /* Case A: Deleted in one */ if ((!a_oid && !b_oid) || - (!b_oid && blob_unchanged(o_oid, o_mode, a_oid, a_mode, normalize, path)) || - (!a_oid && blob_unchanged(o_oid, o_mode, b_oid, b_mode, normalize, path))) { + (!b_oid && blob_unchanged(o, o_oid, o_mode, a_oid, a_mode, normalize, path)) || + (!a_oid && blob_unchanged(o, o_oid, o_mode, b_oid, b_mode, normalize, path))) { /* Deleted in both or deleted in one and * unchanged in the other */ if (a_oid) @@ -1757,8 +1834,9 @@ static int process_entry(struct merge_options *o, } else { /* Modify/delete; deleted side may have put a directory in the way */ clean_merge = 0; - handle_modify_delete(o, path, o_oid, o_mode, - a_oid, a_mode, b_oid, b_mode); + if (handle_modify_delete(o, path, o_oid, o_mode, + a_oid, a_mode, b_oid, b_mode)) + clean_merge = -1; } } else if ((!o_oid && a_oid && !b_oid) || (!o_oid && !a_oid && b_oid)) { @@ -1790,14 +1868,16 @@ static int process_entry(struct merge_options *o, output(o, 1, _("CONFLICT (%s): There is a directory with name %s in %s. " "Adding %s as %s"), conf, path, other_branch, path, new_path); - update_file(o, 0, oid, mode, new_path); - if (o->call_depth) + if (update_file(o, 0, oid, mode, new_path)) + clean_merge = -1; + else if (o->call_depth) remove_file_from_cache(path); free(new_path); } else { output(o, 2, _("Adding %s"), path); /* do not overwrite file if already present */ - update_file_flags(o, oid, mode, path, 1, !a_oid); + if (update_file_flags(o, oid, mode, path, 1, !a_oid)) + clean_merge = -1; } } else if (a_oid && b_oid) { /* Case C: Added in both (check for same permissions) and */ @@ -1812,7 +1892,7 @@ static int process_entry(struct merge_options *o, */ remove_file(o, 1, path, !a_mode); } else - die(_("Fatal merge failure, shouldn't happen.")); + die("BUG: fatal merge failure, shouldn't happen."); return clean_merge; } @@ -1840,11 +1920,10 @@ int merge_trees(struct merge_options *o, if (code != 0) { if (show(o, 4) || o->call_depth) - die(_("merging of trees %s and %s failed"), + err(o, _("merging of trees %s and %s failed"), oid_to_hex(&head->object.oid), oid_to_hex(&merge->object.oid)); - else - exit(128); + return -1; } if (unmerged_cache()) { @@ -1860,17 +1939,23 @@ int merge_trees(struct merge_options *o, re_head = get_renames(o, head, common, head, merge, entries); re_merge = get_renames(o, merge, common, head, merge, entries); clean = process_renames(o, re_head, re_merge); + if (clean < 0) + return clean; for (i = entries->nr-1; 0 <= i; i--) { const char *path = entries->items[i].string; struct stage_data *e = entries->items[i].util; - if (!e->processed - && !process_entry(o, path, e)) - clean = 0; + if (!e->processed) { + int ret = process_entry(o, path, e); + if (!ret) + clean = 0; + else if (ret < 0) + return ret; + } } for (i = 0; i < entries->nr; i++) { struct stage_data *e = entries->items[i].util; if (!e->processed) - die(_("Unprocessed path??? %s"), + die("BUG: unprocessed path??? %s", entries->items[i].string); } @@ -1885,8 +1970,8 @@ int merge_trees(struct merge_options *o, else clean = 1; - if (o->call_depth) - *result = write_tree_from_memory(o); + if (o->call_depth && !(*result = write_tree_from_memory(o))) + return -1; return clean; } @@ -1952,23 +2037,25 @@ int merge_recursive(struct merge_options *o, /* * When the merge fails, the result contains files * with conflict markers. The cleanness flag is - * ignored, it was never actually used, as result of - * merge_trees has always overwritten it: the committed - * "conflicts" were already resolved. + * ignored (unless indicating an error), it was never + * actually used, as result of merge_trees has always + * overwritten it: the committed "conflicts" were + * already resolved. */ discard_cache(); saved_b1 = o->branch1; saved_b2 = o->branch2; o->branch1 = "Temporary merge branch 1"; o->branch2 = "Temporary merge branch 2"; - merge_recursive(o, merged_common_ancestors, iter->item, - NULL, &merged_common_ancestors); + if (merge_recursive(o, merged_common_ancestors, iter->item, + NULL, &merged_common_ancestors) < 0) + return -1; o->branch1 = saved_b1; o->branch2 = saved_b2; o->call_depth--; if (!merged_common_ancestors) - die(_("merge returned no commit")); + return err(o, _("merge returned no commit")); } discard_cache(); @@ -1978,6 +2065,10 @@ int merge_recursive(struct merge_options *o, o->ancestor = "merged common ancestors"; clean = merge_trees(o, h1->tree, h2->tree, merged_common_ancestors->tree, &mrtree); + if (clean < 0) { + flush_output(o); + return clean; + } if (o->call_depth) { *result = make_virtual_commit(mrtree, "merged tree"); @@ -1985,6 +2076,8 @@ int merge_recursive(struct merge_options *o, commit_list_insert(h2, &(*result)->parents->next); } flush_output(o); + if (!o->call_depth && o->buffer_output < 2) + strbuf_release(&o->obuf); if (show(o, 2)) diff_warn_rename_limit("merge.renamelimit", o->needed_rename_limit, 0); @@ -2025,7 +2118,7 @@ int merge_recursive_generic(struct merge_options *o, for (i = 0; i < num_base_list; ++i) { struct commit *base; if (!(base = get_ref(base_list[i], oid_to_hex(base_list[i])))) - return error(_("Could not parse object '%s'"), + return err(o, _("Could not parse object '%s'"), oid_to_hex(base_list[i])); commit_list_insert(base, &ca); } @@ -2034,9 +2127,12 @@ int merge_recursive_generic(struct merge_options *o, hold_locked_index(lock, 1); clean = merge_recursive(o, head_commit, next_commit, ca, result); + if (clean < 0) + return clean; + if (active_cache_changed && write_locked_index(&the_index, lock, COMMIT_LOCK)) - return error(_("Unable to write index.")); + return err(o, _("Unable to write index.")); return clean ? 0 : 1; } diff --git a/merge-recursive.h b/merge-recursive.h index d415724aea..735343b413 100644 --- a/merge-recursive.h +++ b/merge-recursive.h @@ -13,7 +13,7 @@ struct merge_options { MERGE_RECURSIVE_THEIRS } recursive_variant; const char *subtree_shift; - unsigned buffer_output : 1; + unsigned buffer_output; /* 1: output at end, 2: keep buffered */ unsigned renormalize : 1; long xdl_opts; int verbosity; diff --git a/mru.c b/mru.c new file mode 100644 index 0000000000..9dedae0287 --- /dev/null +++ b/mru.c @@ -0,0 +1,50 @@ +#include "cache.h" +#include "mru.h" + +void mru_append(struct mru *mru, void *item) +{ + struct mru_entry *cur = xmalloc(sizeof(*cur)); + cur->item = item; + cur->prev = mru->tail; + cur->next = NULL; + + if (mru->tail) + mru->tail->next = cur; + else + mru->head = cur; + mru->tail = cur; +} + +void mru_mark(struct mru *mru, struct mru_entry *entry) +{ + /* If we're already at the front of the list, nothing to do */ + if (mru->head == entry) + return; + + /* Otherwise, remove us from our current slot... */ + if (entry->prev) + entry->prev->next = entry->next; + if (entry->next) + entry->next->prev = entry->prev; + else + mru->tail = entry->prev; + + /* And insert us at the beginning. */ + entry->prev = NULL; + entry->next = mru->head; + if (mru->head) + mru->head->prev = entry; + mru->head = entry; +} + +void mru_clear(struct mru *mru) +{ + struct mru_entry *p = mru->head; + + while (p) { + struct mru_entry *to_free = p; + p = p->next; + free(to_free); + } + mru->head = mru->tail = NULL; +} diff --git a/mru.h b/mru.h new file mode 100644 index 0000000000..42e4aeaa10 --- /dev/null +++ b/mru.h @@ -0,0 +1,45 @@ +#ifndef MRU_H +#define MRU_H + +/** + * A simple most-recently-used cache, backed by a doubly-linked list. + * + * Usage is roughly: + * + * // Create a list. Zero-initialization is required. + * static struct mru cache; + * mru_append(&cache, item); + * ... + * + * // Iterate in MRU order. + * struct mru_entry *p; + * for (p = cache.head; p; p = p->next) { + * if (matches(p->item)) + * break; + * } + * + * // Mark an item as used, moving it to the front of the list. + * mru_mark(&cache, p); + * + * // Reset the list to empty, cleaning up all resources. + * mru_clear(&cache); + * + * Note that you SHOULD NOT call mru_mark() and then continue traversing the + * list; it reorders the marked item to the front of the list, and therefore + * you will begin traversing the whole list again. + */ + +struct mru_entry { + void *item; + struct mru_entry *prev, *next; +}; + +struct mru { + struct mru_entry *head, *tail; +}; + +void mru_append(struct mru *mru, void *item); +void mru_mark(struct mru *mru, struct mru_entry *entry); +void mru_clear(struct mru *mru); + +#endif /* MRU_H */ diff --git a/pack-write.c b/pack-write.c index 33293ce2a6..ea0b788130 100644 --- a/pack-write.c +++ b/pack-write.c @@ -354,7 +354,6 @@ void finish_tmp_packfile(struct strbuf *name_buffer, die_errno("unable to make temporary index file readable"); strbuf_addf(name_buffer, "%s.pack", sha1_to_hex(sha1)); - free_pack_by_name(name_buffer->buf); if (rename(pack_tmp_name, name_buffer->buf)) die_errno("unable to rename temporary pack file"); diff --git a/pager.c b/pager.c index 4bc048148e..6470b8180d 100644 --- a/pager.c +++ b/pager.c @@ -63,14 +63,38 @@ const char *git_pager(int stdout_is_tty) return pager; } +static void setup_pager_env(struct argv_array *env) +{ + const char **argv; + int i; + char *pager_env = xstrdup(PAGER_ENV); + int n = split_cmdline(pager_env, &argv); + + if (n < 0) + die("malformed build-time PAGER_ENV: %s", + split_cmdline_strerror(n)); + + for (i = 0; i < n; i++) { + char *cp = strchr(argv[i], '='); + + if (!cp) + die("malformed build-time PAGER_ENV"); + + *cp = '\0'; + if (!getenv(argv[i])) { + *cp = '='; + argv_array_push(env, argv[i]); + } + } + free(pager_env); + free(argv); +} + void prepare_pager_args(struct child_process *pager_process, const char *pager) { argv_array_push(&pager_process->args, pager); pager_process->use_shell = 1; - if (!getenv("LESS")) - argv_array_push(&pager_process->env_array, "LESS=FRX"); - if (!getenv("LV")) - argv_array_push(&pager_process->env_array, "LV=-c"); + setup_pager_env(&pager_process->env_array); } void setup_pager(void) diff --git a/patch-ids.c b/patch-ids.c index a4d0016664..082412aca6 100644 --- a/patch-ids.c +++ b/patch-ids.c @@ -5,7 +5,7 @@ #include "patch-ids.h" int commit_patch_id(struct commit *commit, struct diff_options *options, - unsigned char *sha1) + unsigned char *sha1, int diff_header_only) { if (commit->parents) diff_tree_sha1(commit->parents->item->object.oid.hash, @@ -13,93 +13,86 @@ int commit_patch_id(struct commit *commit, struct diff_options *options, else diff_root_tree_sha1(commit->object.oid.hash, "", options); diffcore_std(options); - return diff_flush_patch_id(options, sha1); + return diff_flush_patch_id(options, sha1, diff_header_only); } -static const unsigned char *patch_id_access(size_t index, void *table) +/* + * When we cannot load the full patch-id for both commits for whatever + * reason, the function returns -1 (i.e. return error(...)). Despite + * the "cmp" in the name of this function, the caller only cares about + * the return value being zero (a and b are equivalent) or non-zero (a + * and b are different), and returning non-zero would keep both in the + * result, even if they actually were equivalent, in order to err on + * the side of safety. The actual value being negative does not have + * any significance; only that it is non-zero matters. + */ +static int patch_id_cmp(struct patch_id *a, + struct patch_id *b, + struct diff_options *opt) { - struct patch_id **id_table = table; - return id_table[index]->patch_id; + if (is_null_sha1(a->patch_id) && + commit_patch_id(a->commit, opt, a->patch_id, 0)) + return error("Could not get patch ID for %s", + oid_to_hex(&a->commit->object.oid)); + if (is_null_sha1(b->patch_id) && + commit_patch_id(b->commit, opt, b->patch_id, 0)) + return error("Could not get patch ID for %s", + oid_to_hex(&b->commit->object.oid)); + return hashcmp(a->patch_id, b->patch_id); } -static int patch_pos(struct patch_id **table, int nr, const unsigned char *id) -{ - return sha1_pos(id, table, nr, patch_id_access); -} - -#define BUCKET_SIZE 190 /* 190 * 21 = 3990, with slop close enough to 4K */ -struct patch_id_bucket { - struct patch_id_bucket *next; - int nr; - struct patch_id bucket[BUCKET_SIZE]; -}; - int init_patch_ids(struct patch_ids *ids) { memset(ids, 0, sizeof(*ids)); diff_setup(&ids->diffopts); DIFF_OPT_SET(&ids->diffopts, RECURSIVE); diff_setup_done(&ids->diffopts); + hashmap_init(&ids->patches, (hashmap_cmp_fn)patch_id_cmp, 256); return 0; } int free_patch_ids(struct patch_ids *ids) { - struct patch_id_bucket *next, *patches; - - free(ids->table); - for (patches = ids->patches; patches; patches = next) { - next = patches->next; - free(patches); - } + hashmap_free(&ids->patches, 1); return 0; } -static struct patch_id *add_commit(struct commit *commit, - struct patch_ids *ids, - int no_add) +static int init_patch_id_entry(struct patch_id *patch, + struct commit *commit, + struct patch_ids *ids) { - struct patch_id_bucket *bucket; - struct patch_id *ent; - unsigned char sha1[20]; - int pos; + unsigned char header_only_patch_id[GIT_SHA1_RAWSZ]; - if (commit_patch_id(commit, &ids->diffopts, sha1)) - return NULL; - pos = patch_pos(ids->table, ids->nr, sha1); - if (0 <= pos) - return ids->table[pos]; - if (no_add) - return NULL; + patch->commit = commit; + if (commit_patch_id(commit, &ids->diffopts, header_only_patch_id, 1)) + return -1; - pos = -1 - pos; - - bucket = ids->patches; - if (!bucket || (BUCKET_SIZE <= bucket->nr)) { - bucket = xcalloc(1, sizeof(*bucket)); - bucket->next = ids->patches; - ids->patches = bucket; - } - ent = &bucket->bucket[bucket->nr++]; - hashcpy(ent->patch_id, sha1); - - ALLOC_GROW(ids->table, ids->nr + 1, ids->alloc); - if (pos < ids->nr) - memmove(ids->table + pos + 1, ids->table + pos, - sizeof(ent) * (ids->nr - pos)); - ids->nr++; - ids->table[pos] = ent; - return ids->table[pos]; + hashmap_entry_init(patch, sha1hash(header_only_patch_id)); + return 0; } struct patch_id *has_commit_patch_id(struct commit *commit, struct patch_ids *ids) { - return add_commit(commit, ids, 1); + struct patch_id patch; + + memset(&patch, 0, sizeof(patch)); + if (init_patch_id_entry(&patch, commit, ids)) + return NULL; + + return hashmap_get(&ids->patches, &patch, &ids->diffopts); } struct patch_id *add_commit_patch_id(struct commit *commit, struct patch_ids *ids) { - return add_commit(commit, ids, 0); + struct patch_id *key = xcalloc(1, sizeof(*key)); + + if (init_patch_id_entry(key, commit, ids)) { + free(key); + return NULL; + } + + hashmap_add(&ids->patches, key); + return key; } diff --git a/patch-ids.h b/patch-ids.h index eeb56b307f..0f34ea11ea 100644 --- a/patch-ids.h +++ b/patch-ids.h @@ -2,19 +2,18 @@ #define PATCH_IDS_H struct patch_id { - unsigned char patch_id[20]; - char seen; + struct hashmap_entry ent; + unsigned char patch_id[GIT_SHA1_RAWSZ]; + struct commit *commit; }; struct patch_ids { + struct hashmap patches; struct diff_options diffopts; - int nr, alloc; - struct patch_id **table; - struct patch_id_bucket *patches; }; int commit_patch_id(struct commit *commit, struct diff_options *options, - unsigned char *sha1); + unsigned char *sha1, int); int init_patch_ids(struct patch_ids *); int free_patch_ids(struct patch_ids *); struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *); diff --git a/path.c b/path.c index 17551c4834..fe3c4d96c6 100644 --- a/path.c +++ b/path.c @@ -380,6 +380,8 @@ static void adjust_git_path(struct strbuf *buf, int git_dir_len) get_index_file(), strlen(get_index_file())); else if (git_db_env && dir_prefix(base, "objects")) replace_dir(buf, git_dir_len + 7, get_object_directory()); + else if (git_hooks_path && dir_prefix(base, "hooks")) + replace_dir(buf, git_dir_len + 5, git_hooks_path); else if (git_common_dir_env) update_common_dir(buf, git_dir_len, NULL); } diff --git a/po/ca.po b/po/ca.po index 46000d7d64..30e00e2b58 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 \n" -"POT-Creation-Date: 2016-03-16 00:16+0800\n" -"PO-Revision-Date: 2016-03-19 23:51-0600\n" +"POT-Creation-Date: 2016-08-27 23:21+0800\n" +"PO-Revision-Date: 2016-08-28 10:32-0600\n" "Last-Translator: Alex Henrie \n" "Language-Team: Catalan\n" "Language: ca\n" @@ -16,14 +16,39 @@ 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.8.7\n" +"X-Generator: Poedit 1.8.8\n" #: advice.c:55 #, c-format msgid "hint: %.*s\n" msgstr "pista: %.*s\n" -#: advice.c:88 +#: advice.c:83 +msgid "Cherry-picking is not possible because you have unmerged files." +msgstr "Recollir cireres no és possible perquè teniu fitxers no fusionats." + +#: advice.c:85 +msgid "Committing is not possible because you have unmerged files." +msgstr "Cometre no és possible perquè teniu fitxers no fusionats." + +#: advice.c:87 +msgid "Merging is not possible because you have unmerged files." +msgstr "Fusionar no és possible perquè teniu fitxers no fusionats." + +#: advice.c:89 +msgid "Pulling is not possible because you have unmerged files." +msgstr "Baixar no es possible perquè teniu fitxers no fusionats." + +#: advice.c:91 +msgid "Reverting is not possible because you have unmerged files." +msgstr "Revertir no és possible perquè teniu fitxers no fusionats." + +#: advice.c:93 +#, c-format +msgid "It is not possible to %s because you have unmerged files." +msgstr "No es possible %s perquè teniu fitxers no fusionats." + +#: advice.c:101 msgid "" "Fix them up in the work tree, and then use 'git add/rm '\n" "as appropriate to mark resolution and make a commit." @@ -32,17 +57,48 @@ msgstr "" "'git add/rm ' segons sigui apropiat per a marcar la\n" "resolució i feu una comissió." -#: advice.c:101 builtin/merge.c:1226 +#: advice.c:109 +msgid "Exiting because of an unresolved conflict." +msgstr "S'està sortint a causa d'un conflicte no resolt." + +#: advice.c:114 builtin/merge.c:1181 msgid "You have not concluded your merge (MERGE_HEAD exists)." msgstr "No heu conclòs la vostra fusió (MERGE_HEAD existeix)." -#: advice.c:103 +#: advice.c:116 msgid "Please, commit your changes before merging." msgstr "Si us plau, cometeu els vostres canvis abans de fusionar." -#: advice.c:104 +#: advice.c:117 msgid "Exiting because of unfinished merge." -msgstr "Sortint a causa d'una fusió no terminada." +msgstr "S'està sortint a causa d'una fusió no terminada." + +#: advice.c:123 +#, c-format +msgid "" +"Note: checking out '%s'.\n" +"\n" +"You are in 'detached HEAD' state. You can look around, make experimental\n" +"changes and commit them, and you can discard any commits you make in this\n" +"state without impacting any branches by performing another checkout.\n" +"\n" +"If you want to create a new branch to retain commits you create, you may\n" +"do so (now or later) by using -b with the checkout command again. Example:\n" +"\n" +" git checkout -b \n" +"\n" +msgstr "" +"Avís: s'està agafant '%s'.\n" +"\n" +"Esteu en un estat de 'HEAD separat'. Podeu mirar al voltant, fer canvis\n" +"experimentals i cometre-los i podeu descartar qualsevulla comissió que feu\n" +"en aquest estat sense impactar cap branca realitzant un altre agafament.\n" +"\n" +"Si voleu crear una branca nova per a conservar les comissions que creeu,\n" +"poder fer així (ara o més tard) usant -b de nou amb l'ordre checkout.\n" +"Exemple:\n" +"\n" +" git checkout -b \n" #: archive.c:12 msgid "git archive [] [...]" @@ -63,7 +119,7 @@ msgstr "" msgid "git archive --remote [--exec ] --list" msgstr "git archive --remote [--exec ] --list" -#: archive.c:344 builtin/add.c:137 builtin/add.c:420 builtin/rm.c:327 +#: archive.c:344 builtin/add.c:139 builtin/add.c:435 builtin/rm.c:327 #, c-format msgid "pathspec '%s' did not match any files" msgstr "L'especificació de camí '%s' no ha coincidit amb cap fitxer" @@ -76,7 +132,7 @@ msgstr "format" msgid "archive format" msgstr "format d'arxiu" -#: archive.c:430 builtin/log.c:1232 +#: archive.c:430 builtin/log.c:1422 msgid "prefix" msgstr "prefix" @@ -84,10 +140,10 @@ msgstr "prefix" msgid "prepend prefix to each pathname in the archive" msgstr "anteposa el prefix a cada nom de camí en l'arxiu" -#: archive.c:432 builtin/archive.c:88 builtin/blame.c:2547 builtin/blame.c:2548 -#: builtin/config.c:60 builtin/fast-export.c:987 builtin/fast-export.c:989 -#: builtin/grep.c:720 builtin/hash-object.c:100 builtin/ls-files.c:459 -#: builtin/ls-files.c:462 builtin/notes.c:398 builtin/notes.c:561 +#: archive.c:432 builtin/archive.c:88 builtin/blame.c:2553 builtin/blame.c:2554 +#: builtin/config.c:59 builtin/fast-export.c:987 builtin/fast-export.c:989 +#: builtin/grep.c:722 builtin/hash-object.c:100 builtin/ls-files.c:460 +#: builtin/ls-files.c:463 builtin/notes.c:399 builtin/notes.c:562 #: builtin/read-tree.c:109 parse-options.h:153 msgid "file" msgstr "fitxer" @@ -120,7 +176,8 @@ msgstr "comprimeix millor" msgid "list supported archive formats" msgstr "allista els formats d'arxiu admesos" -#: archive.c:451 builtin/archive.c:90 builtin/clone.c:78 +#: archive.c:451 builtin/archive.c:90 builtin/clone.c:82 +#: builtin/submodule--helper.c:832 msgid "repo" msgstr "dipòsit" @@ -128,7 +185,7 @@ msgstr "dipòsit" msgid "retrieve the archive from remote repository " msgstr "recupera l'arxiu del dipòsit remot " -#: archive.c:453 builtin/archive.c:92 builtin/notes.c:482 +#: archive.c:453 builtin/archive.c:92 builtin/notes.c:483 msgid "command" msgstr "ordre" @@ -136,6 +193,28 @@ msgstr "ordre" msgid "path to the remote git-upload-archive command" msgstr "camí a l'ordre git-upload-archive remota" +#: archive.c:461 +msgid "Unexpected option --remote" +msgstr "Opció inesperada --remote" + +#: archive.c:463 +msgid "Option --exec can only be used together with --remote" +msgstr "L'opció --exec només es pot usar junt amb --remote" + +#: archive.c:465 +msgid "Unexpected option --output" +msgstr "Opció inesperada --output" + +#: archive.c:487 +#, c-format +msgid "Unknown archive format '%s'" +msgstr "Format d'arxiu desconegut '%s'" + +#: archive.c:494 +#, c-format +msgid "Argument not supported for format '%s': -%d" +msgstr "Paràmetre no admet per al format '%s': -%d" + #: attr.c:263 msgid "" "Negative patterns are ignored in git attributes\n" @@ -144,6 +223,130 @@ msgstr "" "Els patrons negatius s'ignoren en els atributs de git\n" "Useu '\\!' per exclamació capdavantera literal." +#: bisect.c:441 +#, c-format +msgid "Could not open file '%s'" +msgstr "No s'ha pogut obrir el fitxer '%s'" + +#: bisect.c:446 +#, c-format +msgid "Badly quoted content in file '%s': %s" +msgstr "Comentari amb cometes dolentes en el fitxer '%s': %s" + +#: bisect.c:655 +#, c-format +msgid "We cannot bisect more!\n" +msgstr "No podem bisecar més!\n" + +#: bisect.c:708 +#, c-format +msgid "Not a valid commit name %s" +msgstr "No és un nom de comissió vàlid %s" + +#: bisect.c:732 +#, c-format +msgid "" +"The merge base %s is bad.\n" +"This means the bug has been fixed between %s and [%s].\n" +msgstr "" +"La base de fusió %s és dolenta.\n" +"Això vol dir que el defecte s'ha arreglat entre %s i [%s].\n" + +#: bisect.c:737 +#, c-format +msgid "" +"The merge base %s is new.\n" +"The property has changed between %s and [%s].\n" +msgstr "" +"La base de fusió %s és nova.\n" +"La propietat s'ha canviat entre %s i [%s].\n" + +#: bisect.c:742 +#, c-format +msgid "" +"The merge base %s is %s.\n" +"This means the first '%s' commit is between %s and [%s].\n" +msgstr "" +"La base de fusió %s és %s.\n" +"Això vol dir que la primera comissió '%s' és entre %s i [%s].\n" + +#: bisect.c:750 +#, c-format +msgid "" +"Some %s revs are not ancestor of the %s rev.\n" +"git bisect cannot work properly in this case.\n" +"Maybe you mistook %s and %s revs?\n" +msgstr "" +"Unes %s revisions no són els avantpassats de la revisió %s.\n" +"git bisect no pot funcionar correctament en aquest cas.\n" +"Potser heu confós les revisions %s i %s?\n" + +#: bisect.c:763 +#, c-format +msgid "" +"the merge base between %s and [%s] must be skipped.\n" +"So we cannot be sure the first %s commit is between %s and %s.\n" +"We continue anyway." +msgstr "" +"s'ha de saltar la base de fusió entre %s i [%s].\n" +"Llavors, no podem estar segurs que la primera comissió %s sigui entre %s i " +"%s.\n" +"Continuem de totes maneres." + +#: bisect.c:798 +#, c-format +msgid "Bisecting: a merge base must be tested\n" +msgstr "Bisecant: s'ha de provar una base de fusió\n" + +#: bisect.c:849 +#, c-format +msgid "a %s revision is needed" +msgstr "es necessita una revisió %s" + +#: bisect.c:866 builtin/notes.c:174 builtin/tag.c:248 +#, c-format +msgid "could not create file '%s'" +msgstr "no s'ha pogut crear el fitxer '%s'" + +#: bisect.c:917 +#, c-format +msgid "could not read file '%s'" +msgstr "no s'ha pogut llegir el fitxer '%s'" + +#: bisect.c:947 +msgid "reading bisect refs failed" +msgstr "la lectura de les referències de bisecció ha fallat" + +#: bisect.c:967 +#, c-format +msgid "%s was both %s and %s\n" +msgstr "%s era ambdós %s i %s\n" + +#: bisect.c:975 +#, c-format +msgid "" +"No testable commit found.\n" +"Maybe you started with bad path parameters?\n" +msgstr "" +"No s'ha trobat cap comissió provable.\n" +"Potser heu començat amb paràmetres de camí dolents?\n" + +#: bisect.c:994 +#, c-format +msgid "(roughly %d step)" +msgid_plural "(roughly %d steps)" +msgstr[0] "(aproximadament %d pas)" +msgstr[1] "(aproximadament %d passos)" + +#. TRANSLATORS: the last %s will be replaced with +#. "(roughly %d steps)" translation +#: bisect.c:998 +#, c-format +msgid "Bisecting: %d revision left to test after this %s\n" +msgid_plural "Bisecting: %d revisions left to test after this %s\n" +msgstr[0] "Bisecant: manca %d revisió a provar després d'aquesta %s\n" +msgstr[1] "Bisecant: manquen %d revisions a provar després d'aquesta %s\n" + #: branch.c:53 #, c-format msgid "" @@ -160,7 +363,7 @@ msgstr "" #: branch.c:67 #, c-format msgid "Not setting branch %s as its own upstream." -msgstr "No establint la branca %s com a la seva pròpia font." +msgstr "No s'està establint la branca %s com a la seva pròpia font." #: branch.c:93 #, c-format @@ -280,11 +483,16 @@ msgstr "Nom d'objecte ambigu: '%s'." msgid "Not a valid branch point: '%s'." msgstr "No és un punt de ramificació vàlid: '%s'." -#: branch.c:344 +#: branch.c:345 #, c-format msgid "'%s' is already checked out at '%s'" msgstr "'%s' ja s'ha agafat a '%s'" +#: branch.c:364 +#, c-format +msgid "HEAD of working tree %s is not updated" +msgstr "La HEAD de l'arbre de treball %s no està actualitzat" + #: bundle.c:34 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -295,7 +503,7 @@ msgstr "'%s' no sembla un fitxer de farcell v2" msgid "unrecognized header: %s%s (%d)" msgstr "capçalera no reconeguda: %s%s (%d)" -#: bundle.c:87 builtin/commit.c:766 +#: bundle.c:87 builtin/commit.c:778 #, c-format msgid "could not open '%s'" msgstr "no s'ha pogut obrir '%s'" @@ -304,10 +512,10 @@ 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 ref-filter.c:1462 sequencer.c:627 sequencer.c:1074 -#: builtin/blame.c:2754 builtin/commit.c:1045 builtin/log.c:334 -#: builtin/log.c:852 builtin/log.c:1467 builtin/log.c:1700 builtin/merge.c:358 -#: builtin/shortlog.c:170 +#: bundle.c:163 ref-filter.c:1462 sequencer.c:630 sequencer.c:1085 +#: builtin/blame.c:2763 builtin/commit.c:1057 builtin/log.c:348 +#: builtin/log.c:890 builtin/log.c:1336 builtin/log.c:1659 builtin/log.c:1901 +#: builtin/merge.c:356 builtin/shortlog.c:170 msgid "revision walk setup failed" msgstr "la configuració del passeig per revisions ha fallat" @@ -346,31 +554,31 @@ msgstr "El rev-list s'ha mort" msgid "ref '%s' is excluded by the rev-list options" msgstr "les opcions de la llista de revisions exclouen la referència '%s'" -#: bundle.c:443 builtin/log.c:157 builtin/log.c:1372 builtin/shortlog.c:273 +#: bundle.c:443 builtin/log.c:165 builtin/log.c:1565 builtin/shortlog.c:273 #, c-format msgid "unrecognized argument: %s" msgstr "paràmetre no reconegut: %s" -#: bundle.c:449 +#: bundle.c:451 msgid "Refusing to create empty bundle." -msgstr "Refusant crear un farcell buit." +msgstr "S'està refusant crear un farcell buit." -#: bundle.c:459 +#: bundle.c:463 #, c-format msgid "cannot create '%s'" msgstr "no es pot crear '%s'" -#: bundle.c:480 +#: bundle.c:491 msgid "index-pack died" msgstr "L'index-pack s'ha mort" -#: color.c:275 +#: color.c:290 #, c-format msgid "invalid color value: %.*s" msgstr "valor de color no vàlid: %.*s" -#: commit.c:40 builtin/am.c:437 builtin/am.c:473 builtin/am.c:1505 -#: builtin/am.c:2135 +#: commit.c:40 builtin/am.c:433 builtin/am.c:469 builtin/am.c:1505 +#: builtin/am.c:2119 #, c-format msgid "could not parse %s" msgstr "no s'ha pogut analitzar %s" @@ -384,125 +592,195 @@ msgstr "%s %s no és una comissió!" msgid "memory exhausted" msgstr "memòria esgotada" -#: config.c:475 config.c:477 +#: config.c:516 +#, c-format +msgid "bad config line %d in blob %s" +msgstr "línia de configuració dolenta %d en el blob %s" + +#: config.c:520 +#, c-format +msgid "bad config line %d in file %s" +msgstr "línia de configuració dolenta %d en el fitxer %s" + +#: config.c:524 +#, c-format +msgid "bad config line %d in standard input" +msgstr "línia de configuració dolenta %d en l'entrada estàndard" + +#: config.c:528 +#, c-format +msgid "bad config line %d in submodule-blob %s" +msgstr "línia de configuració dolenta %d en el blob de submòdul %s" + +#: config.c:532 #, c-format -msgid "bad config line %d in %s %s" -msgstr "línia de fitxer de configuració dolenta %d en %s %s" +msgid "bad config line %d in command line %s" +msgstr "línia de configuració dolenta %d en la línia d'ordres %s" -#: config.c:593 +#: config.c:536 #, c-format -msgid "bad numeric config value '%s' for '%s' in %s %s: %s" -msgstr "valor de configuració numèrica dolent '%s' per '%s' en %s %s: %s" +msgid "bad config line %d in %s" +msgstr "línia de configuració dolenta %d en %s" + +#: config.c:655 +msgid "out of range" +msgstr "fora de rang" -#: config.c:595 +#: config.c:655 +msgid "invalid unit" +msgstr "unitat no vàlida" + +#: config.c:661 #, c-format msgid "bad numeric config value '%s' for '%s': %s" -msgstr "valor de configuració numèrica dolent '%s' per '%s': %s" +msgstr "valor de configuració numèric dolent '%s' per '%s': %s" + +#: config.c:666 +#, c-format +msgid "bad numeric config value '%s' for '%s' in blob %s: %s" +msgstr "valor de configuració numèric dolent '%s' per '%s' en el blob %s: %s" + +#: config.c:669 +#, c-format +msgid "bad numeric config value '%s' for '%s' in file %s: %s" +msgstr "valor de configuració numèric dolent '%s' per '%s' en el fitxer %s: %s" + +#: config.c:672 +#, c-format +msgid "bad numeric config value '%s' for '%s' in standard input: %s" +msgstr "" +"valor de configuració numèric dolent '%s' per '%s' en l'entrada estàndard: %s" + +#: config.c:675 +#, c-format +msgid "bad numeric config value '%s' for '%s' in submodule-blob %s: %s" +msgstr "" +"valor de configuració numèric dolent '%s' per '%s' en el blob de submòdul " +"%s: %s" + +#: config.c:678 +#, c-format +msgid "bad numeric config value '%s' for '%s' in command line %s: %s" +msgstr "" +"valor de configuració numèric dolent '%s' per '%s' en la línia d'ordres %s: " +"%s" + +#: config.c:681 +#, c-format +msgid "bad numeric config value '%s' for '%s' in %s: %s" +msgstr "valor de configuració numèric dolent '%s' per '%s' en %s: %s" -#: config.c:680 +#: config.c:768 #, c-format msgid "failed to expand user dir in: '%s'" msgstr "s'ha fallat en expandir el directori d'usuari en '%s'" -#: config.c:758 config.c:769 +#: config.c:849 config.c:860 #, c-format msgid "bad zlib compression level %d" msgstr "nivell de compressió de zlib dolent %d" -#: config.c:891 +#: config.c:978 #, c-format msgid "invalid mode for object creation: %s" msgstr "mode de creació d'objecte no vàlid: %s" -#: config.c:1220 +#: config.c:1312 msgid "unable to parse command-line config" msgstr "no s'ha pogut analitzar la configuració de la línia d'ordres" -#: config.c:1281 -msgid "unknown error occured while reading the configuration files" -msgstr "ha ocorregut un error desconegut en llegir els fitxers de configuració" +#: config.c:1362 +msgid "unknown error occurred while reading the configuration files" +msgstr "un error desconegut ha ocorregut en llegir els fitxers de configuració" -#: config.c:1629 +#: config.c:1716 #, c-format msgid "unable to parse '%s' from command-line config" msgstr "no s'ha pogut analitzar '%s' de la configuració de la línia d'ordres" -#: config.c:1631 +#: config.c:1718 #, c-format msgid "bad config variable '%s' in file '%s' at line %d" msgstr "variable de configuració dolenta '%s' en el fitxer '%s' a la línia %d" -#: config.c:1690 +#: config.c:1777 #, c-format msgid "%s has multiple values" msgstr "%s té múltiples valors" -#: config.c:2226 +#: config.c:2311 +#, c-format +msgid "could not set '%s' to '%s'" +msgstr "no s'ha pogut establir '%s' a '%s'" + +#: config.c:2313 #, c-format -msgid "Could not set '%s' to '%s'" -msgstr "No s'ha pogut establir '%s' com a '%s'" +msgid "could not unset '%s'" +msgstr "no s'ha pogut desestablir '%s'" + +#: connected.c:63 builtin/fsck.c:173 builtin/prune.c:140 +msgid "Checking connectivity" +msgstr "S'està comprovant la connectivitat" -#: connected.c:69 +#: connected.c:74 msgid "Could not run 'git rev-list'" msgstr "No s'ha pogut executar 'git rev-list'" -#: connected.c:89 -#, c-format -msgid "failed write to rev-list: %s" -msgstr "escriptura fallada al rev-list: %s" +#: connected.c:94 +msgid "failed write to rev-list" +msgstr "escriptura fallada a rev-list" -#: connected.c:97 -#, c-format -msgid "failed to close rev-list's stdin: %s" -msgstr "s'ha fallat en tancar l'stdin del rev-list: %s" +#: connected.c:101 +msgid "failed to close rev-list's stdin" +msgstr "s'ha fallat en tancar l'stdin del rev-list" -#: date.c:95 +#: date.c:97 msgid "in the future" msgstr "en el futur" -#: date.c:101 +#: date.c:103 #, c-format msgid "%lu second ago" msgid_plural "%lu seconds ago" msgstr[0] "fa %lu segon" msgstr[1] "fa %lu segons" -#: date.c:108 +#: date.c:110 #, c-format msgid "%lu minute ago" msgid_plural "%lu minutes ago" msgstr[0] "fa %lu minut" msgstr[1] "fa %lu minuts" -#: date.c:115 +#: date.c:117 #, c-format msgid "%lu hour ago" msgid_plural "%lu hours ago" msgstr[0] "fa %lu hora" msgstr[1] "fa %lu hores" -#: date.c:122 +#: date.c:124 #, c-format msgid "%lu day ago" msgid_plural "%lu days ago" msgstr[0] "fa %lu dia" msgstr[1] "fa %lu dies" -#: date.c:128 +#: date.c:130 #, c-format msgid "%lu week ago" msgid_plural "%lu weeks ago" msgstr[0] "fa %lu setmana" msgstr[1] "fa %lu setmanes" -#: date.c:135 +#: date.c:137 #, c-format msgid "%lu month ago" msgid_plural "%lu months ago" msgstr[0] "fa %lu mes" msgstr[1] "fa %lu mesos" -#: date.c:146 +#: date.c:148 #, c-format msgid "%lu year" msgid_plural "%lu years" @@ -510,14 +788,14 @@ msgstr[0] "%lu any" msgstr[1] "%lu anys" #. TRANSLATORS: "%s" is " years" -#: date.c:149 +#: date.c:151 #, c-format msgid "%s, %lu month ago" msgid_plural "%s, %lu months ago" msgstr[0] "fa %s i %lu mes" msgstr[1] "fa %s i %lu mesos" -#: date.c:154 date.c:159 +#: date.c:156 date.c:161 #, c-format msgid "%lu year ago" msgid_plural "%lu years ago" @@ -529,45 +807,45 @@ msgstr[1] "fa %lu anys" msgid "failed to read orderfile '%s'" msgstr "s'ha fallat en llegir el fitxer d'ordres '%s'" -#: diffcore-rename.c:536 +#: diffcore-rename.c:540 msgid "Performing inexact rename detection" -msgstr "Realitzant detecció inexacta de canvis de nom" +msgstr "S'està realitzant una detecció inexacta de canvis de nom" -#: diff.c:115 +#: diff.c:116 #, c-format msgid " Failed to parse dirstat cut-off percentage '%s'\n" msgstr " S'ha fallat en analitzar el percentatge limitant de dirstat '%s'\n" -#: diff.c:120 +#: diff.c:121 #, c-format msgid " Unknown dirstat parameter '%s'\n" msgstr " Paràmetre de dirstat desconegut '%s'\n" -#: diff.c:215 +#: diff.c:225 #, c-format msgid "Unknown value for 'diff.submodule' config variable: '%s'" msgstr "" "Valor desconegut de la variable de configuració de 'diff.submodule': '%s'" -#: diff.c:267 +#: diff.c:277 #, c-format msgid "" "Found errors in 'diff.dirstat' config variable:\n" "%s" msgstr "" -"Errors trobats en la variable de configuració 'diff.dirstat':\n" +"S'han trobat errors en la variable de configuració 'diff.dirstat':\n" "%s" -#: diff.c:2997 +#: diff.c:3017 #, c-format msgid "external diff died, stopping at %s" -msgstr "El diff external s'ha mort, aturant a %s" +msgstr "El diff external s'ha mort, s'està aturant a %s" -#: diff.c:3393 +#: diff.c:3415 msgid "--follow requires exactly one pathspec" msgstr "--follow requereix exactament una especificació de camí" -#: diff.c:3556 +#: diff.c:3578 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -576,56 +854,47 @@ msgstr "" "S'ha fallat en analitzar el paràmetre d'opció de --dirstat/-X:\n" "%s" -#: diff.c:3570 +#: diff.c:3592 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "S'ha fallat en analitzar el paràmetre d'opció de --submodule: %s" -#: dir.c:2004 +#: dir.c:1823 msgid "failed to get kernel name and information" msgstr "s'ha fallat en obtenir el nombre i la informació del nucli" -#: dir.c:2123 +#: dir.c:1942 msgid "Untracked cache is disabled on this system or location." msgstr "" "La memòria cau no seguida està inhabilitada en aquest sistema o ubicació." -#: gpg-interface.c:166 gpg-interface.c:237 -msgid "could not run gpg." -msgstr "no s'ha pogut executar el gpg." - #: gpg-interface.c:178 -msgid "gpg did not accept the data" -msgstr "El gpg no ha acceptat les dades" - -#: gpg-interface.c:189 msgid "gpg failed to sign the data" -msgstr "gpg ha fallat en firmar les dades" +msgstr "gpg ha fallat en signar les dades" -#: gpg-interface.c:222 -#, c-format -msgid "could not create temporary file '%s': %s" -msgstr "no s'ha pogut crear el fitxer temporal '%s': %s" +#: gpg-interface.c:208 +msgid "could not create temporary file" +msgstr "no s'ha pogut crear el fitxer temporal" -#: gpg-interface.c:225 +#: gpg-interface.c:210 #, c-format -msgid "failed writing detached signature to '%s': %s" -msgstr "s'ha fallat en escriure la firma separada a '%s': %s" +msgid "failed writing detached signature to '%s'" +msgstr "s'ha fallat en escriure la signatura separada a '%s'" -#: grep.c:1718 +#: grep.c:1792 #, c-format msgid "'%s': unable to read %s" msgstr "'%s': no s'ha pogut llegir %s" -#: grep.c:1735 +#: grep.c:1809 builtin/clone.c:382 builtin/diff.c:84 builtin/rm.c:155 #, c-format -msgid "'%s': %s" -msgstr "'%s': %s" +msgid "failed to stat '%s'" +msgstr "s'ha fallat en fer stat a '%s'" -#: grep.c:1746 +#: grep.c:1820 #, c-format -msgid "'%s': short read %s" -msgstr "'%s': lectura curta %s" +msgid "'%s': short read" +msgstr "'%s': lectura curta" #: help.c:205 #, c-format @@ -659,8 +928,9 @@ 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 una ordre de Git amb nom '%s', la qual no existeix.\n" -"Continuant sota l'assumpció que volíeu dir '%s'" +"ADVERTÈNCIA: Heu invocat una ordre de Git amb nom '%s', la qual no " +"existeix.\n" +"S'està continuant sota l'assumpció que volíeu dir '%s'" #: help.c:393 #, c-format @@ -672,7 +942,7 @@ msgstr "en %0.1f segons automàticament..." msgid "git: '%s' is not a git command. See 'git --help'." msgstr "git: '%s' no és una ordre de git. Vegeu 'git --help'." -#: help.c:404 help.c:464 +#: help.c:404 help.c:470 msgid "" "\n" "Did you mean this?" @@ -686,92 +956,112 @@ msgstr[1] "" "\n" "Volíeu dir un d'aquests?" -#: help.c:460 +#: help.c:466 #, c-format msgid "%s: %s - %s" msgstr "%s: %s - %s" +#: lockfile.c:152 +#, c-format +msgid "" +"Unable to create '%s.lock': %s.\n" +"\n" +"Another git process seems to be running in this repository, e.g.\n" +"an editor opened by 'git commit'. Please make sure all processes\n" +"are terminated then try again. If it still fails, a git process\n" +"may have crashed in this repository earlier:\n" +"remove the file manually to continue." +msgstr "" +"No s'ha pogut crear '%s.lock': %s.\n" +"\n" +"Sembla que un altre procés de git s'està executant en aquest\n" +"dipòsit, per exemple, un editor obert per 'git commit'. Si us\n" +"plau, assegureu-vos que tots els processos s'hagin terminat i\n" +"llavors trobeu de nou. Si encara falla, potser que un procés de\n" +"git ha tingut una pana:\n" +"elimineu el fitxer manualment per a continuar." + +#: lockfile.c:160 +#, c-format +msgid "Unable to create '%s.lock': %s" +msgstr "No es pot crear '%s.lock': %s" + #: merge.c:41 msgid "failed to read the cache" msgstr "s'ha fallat en llegir la memòria cau" -#: merge.c:94 builtin/am.c:2008 builtin/am.c:2043 builtin/checkout.c:376 -#: builtin/checkout.c:587 builtin/clone.c:730 +#: merge.c:94 builtin/am.c:1992 builtin/am.c:2027 builtin/checkout.c:375 +#: builtin/checkout.c:589 builtin/clone.c:732 msgid "unable to write new index file" msgstr "no s'ha pogut escriure un fitxer d'índex nou" -#: merge-recursive.c:189 -#, c-format +#: merge-recursive.c:209 msgid "(bad commit)\n" msgstr "(comissió dolenta)\n" -#: merge-recursive.c:209 +#: merge-recursive.c:231 #, c-format msgid "addinfo_cache failed for path '%s'" msgstr "addinfo_cache ha fallat per al camí '%s'" -#: merge-recursive.c:270 +#: merge-recursive.c:301 msgid "error building trees" msgstr "error en construir arbres" -#: merge-recursive.c:689 +#: merge-recursive.c:720 #, c-format msgid "failed to create path '%s'%s" msgstr "s'ha fallat en crear el camí '%s' %s" -#: merge-recursive.c:700 +#: merge-recursive.c:731 #, c-format msgid "Removing %s to make room for subdirectory\n" -msgstr "Eliminant %s per a fer espai per al subdirectori\n" +msgstr "S'està eliminant %s per a fer espai per al subdirectori\n" -#: merge-recursive.c:714 merge-recursive.c:735 +#: merge-recursive.c:745 merge-recursive.c:764 msgid ": perhaps a D/F conflict?" msgstr ": potser un conflicte D/F?" -#: merge-recursive.c:725 +#: merge-recursive.c:754 #, c-format msgid "refusing to lose untracked file at '%s'" -msgstr "refusant perdre el fitxer no seguit a '%s'" +msgstr "s'està refusant perdre el fitxer no seguit a '%s'" -#: merge-recursive.c:765 +#: merge-recursive.c:796 #, c-format msgid "cannot read object %s '%s'" msgstr "no es pot llegir l'objecte %s '%s'" -#: merge-recursive.c:767 +#: merge-recursive.c:798 #, c-format msgid "blob expected for %s '%s'" msgstr "blob esperat per a %s '%s'" -#: merge-recursive.c:790 builtin/clone.c:374 +#: merge-recursive.c:822 #, c-format -msgid "failed to open '%s'" -msgstr "s'ha fallat en obrir '%s'" +msgid "failed to open '%s': %s" +msgstr "s'ha fallat en obrir '%s': %s" -#: merge-recursive.c:798 +#: merge-recursive.c:833 #, c-format -msgid "failed to symlink '%s'" -msgstr "s'ha fallat en fer l'enllaç simbòlic '%s'" +msgid "failed to symlink '%s': %s" +msgstr "s'ha fallat en fer l'enllaç simbòlic '%s': %s" -#: merge-recursive.c:801 +#: merge-recursive.c:838 #, c-format msgid "do not know what to do with %06o %s '%s'" msgstr "no se sap què fer amb %06o %s '%s'" -#: merge-recursive.c:939 +#: merge-recursive.c:978 msgid "Failed to execute internal merge" msgstr "S'ha fallat en executar la fusió interna" -#: merge-recursive.c:943 +#: merge-recursive.c:982 #, c-format msgid "Unable to add %s to database" msgstr "no s'ha pogut afegir %s a la base de dades" -#: merge-recursive.c:959 -msgid "unsupported object type in the tree" -msgstr "tipus d'objecte no compatible en l'arbre" - -#: merge-recursive.c:1034 merge-recursive.c:1048 +#: merge-recursive.c:1081 merge-recursive.c:1095 #, c-format msgid "" "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left " @@ -780,7 +1070,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:1040 merge-recursive.c:1053 +#: merge-recursive.c:1087 merge-recursive.c:1100 #, c-format msgid "" "CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left " @@ -789,20 +1079,20 @@ 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:1094 +#: merge-recursive.c:1143 msgid "rename" msgstr "canvia de nom" -#: merge-recursive.c:1094 +#: merge-recursive.c:1143 msgid "renamed" msgstr "canviat de nom" -#: merge-recursive.c:1150 +#: merge-recursive.c:1200 #, 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" +msgstr "%s és un directori en %s; s'està afegint com a %s en lloc d'això" -#: merge-recursive.c:1172 +#: merge-recursive.c:1225 #, c-format msgid "" "CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s" @@ -811,147 +1101,139 @@ msgstr "" "CONFLICTE (canvi de nom/canvi de nom): Canvi de nom \"%s\"->\"%s\" en la " "branca \"%s\" canvi de nom \"%s\"->\"%s\" en \"%s\"%s" -#: merge-recursive.c:1177 +#: merge-recursive.c:1230 msgid " (left unresolved)" msgstr " (deixat sense resolució)" -#: merge-recursive.c:1231 +#: merge-recursive.c:1292 #, 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:1261 +#: merge-recursive.c:1325 #, 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 d'això" +msgstr "S'està canviant el nom de %s a %s i %s a %s en lloc d'això" -#: merge-recursive.c:1460 +#: merge-recursive.c:1531 #, c-format msgid "CONFLICT (rename/add): Rename %s->%s in %s. %s added in %s" msgstr "" "CONFLICTE (canvi de nom/afegiment): Canvi de nom %s->%s en %s. %s afegit en " "%s" -#: merge-recursive.c:1470 +#: merge-recursive.c:1546 #, c-format msgid "Adding merged %s" -msgstr "Afegint %s fusionat" +msgstr "S'està afegint %s fusionat" -#: merge-recursive.c:1475 merge-recursive.c:1677 +#: merge-recursive.c:1553 merge-recursive.c:1766 #, c-format msgid "Adding as %s instead" -msgstr "Afegint com a %s en lloc d'això" +msgstr "S'està afegint com a %s en lloc d'això" -#: merge-recursive.c:1526 +#: merge-recursive.c:1610 #, c-format msgid "cannot read object %s" msgstr "no es pot llegir l'objecte %s" -#: merge-recursive.c:1529 +#: merge-recursive.c:1613 #, c-format msgid "object %s is not a blob" msgstr "L'objecte %s no és un blob" -#: merge-recursive.c:1581 +#: merge-recursive.c:1666 msgid "modify" msgstr "modifica" -#: merge-recursive.c:1581 +#: merge-recursive.c:1666 msgid "modified" msgstr "modificat" -#: merge-recursive.c:1591 +#: merge-recursive.c:1676 msgid "content" msgstr "contingut" -#: merge-recursive.c:1598 +#: merge-recursive.c:1683 msgid "add/add" msgstr "afegiment/afegiment" -#: merge-recursive.c:1632 +#: merge-recursive.c:1718 #, c-format msgid "Skipped %s (merged same as existing)" -msgstr "%s saltat (el fusionat és igual a l'existent)" +msgstr "S'ha saltat %s (el fusionat és igual a l'existent)" -#: merge-recursive.c:1646 +#: merge-recursive.c:1732 #, c-format msgid "Auto-merging %s" -msgstr "Autofusionant %s" +msgstr "S'està autofusionant %s" -#: merge-recursive.c:1650 git-submodule.sh:1048 +#: merge-recursive.c:1736 git-submodule.sh:919 msgid "submodule" msgstr "submòdul" -#: merge-recursive.c:1651 +#: merge-recursive.c:1737 #, c-format msgid "CONFLICT (%s): Merge conflict in %s" msgstr "CONFLICTE (%s): Conflicte de fusió en %s" -#: merge-recursive.c:1737 +#: merge-recursive.c:1831 #, c-format msgid "Removing %s" -msgstr "Eliminant %s" +msgstr "S'està eliminant %s" -#: merge-recursive.c:1762 +#: merge-recursive.c:1857 msgid "file/directory" msgstr "fitxer/directori" -#: merge-recursive.c:1768 +#: merge-recursive.c:1863 msgid "directory/file" msgstr "directori/fitxer" -#: merge-recursive.c:1773 +#: merge-recursive.c:1868 #, 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. S'està afegint %s com a " +"%s" -#: merge-recursive.c:1783 +#: merge-recursive.c:1877 #, c-format msgid "Adding %s" -msgstr "Afegint %s" - -#: merge-recursive.c:1800 -msgid "Fatal merge failure, shouldn't happen." -msgstr "Fallat de fusió fatal; això no ha de passar." +msgstr "S'està afegint %s" -#: merge-recursive.c:1819 +#: merge-recursive.c:1914 msgid "Already up-to-date!" -msgstr "Ja al dia!" +msgstr "Ja està al dia!" -#: merge-recursive.c:1828 +#: merge-recursive.c:1923 #, c-format msgid "merging of trees %s and %s failed" msgstr "la fusió dels arbres %s i %s ha fallat" -#: merge-recursive.c:1858 -#, c-format -msgid "Unprocessed path??? %s" -msgstr "Camí no processat??? %s" - -#: merge-recursive.c:1906 +#: merge-recursive.c:2006 msgid "Merging:" msgstr "Fusionant:" -#: merge-recursive.c:1919 +#: merge-recursive.c:2019 #, 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:1956 +#: merge-recursive.c:2058 msgid "merge returned no commit" msgstr "la fusió no ha retornat cap comissió" -#: merge-recursive.c:2013 +#: merge-recursive.c:2121 #, c-format msgid "Could not parse object '%s'" msgstr "No s'ha pogut analitzar l'objecte '%s'" -#: merge-recursive.c:2024 builtin/merge.c:646 +#: merge-recursive.c:2135 builtin/merge.c:641 builtin/merge.c:788 msgid "Unable to write index." msgstr "No s'ha pogut escriure l'índex." @@ -967,7 +1249,7 @@ msgstr "Valor de notes.rewriteMode dolent: '%s'" #: notes-utils.c:110 #, c-format msgid "Refusing to rewrite notes in %s (outside of refs/notes/)" -msgstr "Refusant reescriure les notes en %s (fora de refs/notes/)" +msgstr "S'està 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 @@ -981,28 +1263,28 @@ msgstr "Valor dolent de %s: '%s'" msgid "unable to parse object: %s" msgstr "no s'ha pogut analitzar l'objecte: %s" -#: parse-options.c:570 +#: parse-options.c:572 msgid "..." msgstr "..." -#: parse-options.c:588 +#: parse-options.c:590 #, c-format msgid "usage: %s" msgstr "ús: %s" #. TRANSLATORS: the colon here should align with the #. one in "usage: %s" translation -#: parse-options.c:592 +#: parse-options.c:594 #, c-format msgid " or: %s" msgstr " o: %s" -#: parse-options.c:595 +#: parse-options.c:597 #, c-format msgid " %s" msgstr " %s" -#: parse-options.c:629 +#: parse-options.c:631 msgid "-NUM" msgstr "-NUM" @@ -1011,7 +1293,7 @@ msgstr "-NUM" msgid "malformed object name '%s'" msgstr "nom de camp mal format '%s'" -#: path.c:752 +#: path.c:798 #, c-format msgid "Could not make %s writable by group" msgstr "No s'ha pogut fer %s escrivible pel grup" @@ -1083,7 +1365,7 @@ msgstr "" "No hi ha res a excloure per patrons :(exclusió).\n" "Potser heu oblidat afegir o ':/' o '.' ?" -#: pretty.c:969 +#: pretty.c:973 msgid "unable to parse --pretty format" msgstr "no s'ha pogut analitzar el format --pretty" @@ -1098,7 +1380,7 @@ msgid "" "Using version %i" msgstr "" "index.version establert, però el valor no és vàlid.\n" -"Usant la versió %i" +"S'està usant la versió %i" #: read-cache.c:1291 #, c-format @@ -1107,25 +1389,24 @@ msgid "" "Using version %i" msgstr "" "GIT_INDEX_VERSION establert, però el valor no és vàlid.\n" -"Usant la versió %i" +"S'està usant la versió %i" -#: refs.c:543 builtin/merge.c:761 builtin/merge.c:872 builtin/merge.c:974 -#: builtin/merge.c:984 +#: refs.c:551 builtin/merge.c:840 #, c-format msgid "Could not open '%s' for writing" msgstr "No s'ha pogut obrir '%s' per a escriptura" -#: refs/files-backend.c:2374 +#: refs/files-backend.c:2534 #, c-format msgid "could not delete reference %s: %s" msgstr "no s'ha pogut suprimir la referència %s: %s" -#: refs/files-backend.c:2377 +#: refs/files-backend.c:2537 #, c-format msgid "could not delete references: %s" msgstr "no s'ha pogut suprimir les referències: %s" -#: refs/files-backend.c:2386 +#: refs/files-backend.c:2546 #, c-format msgid "could not remove reference %s" msgstr "no s'ha pogut eliminar la referència %s" @@ -1247,12 +1528,12 @@ msgstr "objecte mal format a '%s'" #: ref-filter.c:1373 #, c-format msgid "ignoring ref with broken name %s" -msgstr "ignorant la referència amb nom trencat %s" +msgstr "s'està ignorant la referència amb nom trencat %s" #: ref-filter.c:1378 #, c-format msgid "ignoring broken ref %s" -msgstr "ignorant la referència trencada %s" +msgstr "s'està ignorant la referència trencada %s" #: ref-filter.c:1651 #, c-format @@ -1264,22 +1545,22 @@ msgstr "format: manca l'àtom %%(end)" msgid "malformed object name %s" msgstr "nom d'objecte %s mal format" -#: remote.c:745 +#: remote.c:746 #, c-format msgid "Cannot fetch both %s and %s to %s" msgstr "No es pot obtenir ambdós %s i %s a %s" -#: remote.c:749 +#: remote.c:750 #, c-format msgid "%s usually tracks %s, not %s" msgstr "%s generalment segueix %s, no %s" -#: remote.c:753 +#: remote.c:754 #, c-format msgid "%s tracks both %s and %s" msgstr "%s segueix ambdós %s i %s" -#: remote.c:761 +#: remote.c:762 msgid "Internal error" msgstr "Error intern" @@ -1386,16 +1667,16 @@ msgstr[1] "" msgid " (use \"git pull\" to merge the remote branch into yours)\n" msgstr " (useu \"git pull\" per a fusionar la branca remota a la vostra)\n" -#: revision.c:2131 +#: revision.c:2132 msgid "your current branch appears to be broken" msgstr "la vostra branca actual sembla trencada" -#: revision.c:2134 +#: revision.c:2135 #, c-format msgid "your current branch '%s' does not have any commits yet" msgstr "la vostra branca actual '%s' encara no té cap comissió" -#: revision.c:2328 +#: revision.c:2329 msgid "--first-parent is incompatible with --bisect" msgstr "--first-parent és incompatible amb --bisect" @@ -1408,26 +1689,30 @@ msgstr "s'ha fallat en obrir /dev/null" msgid "dup2(%d,%d) failed" msgstr "dup2(%d,%d) ha fallat" -#: send-pack.c:295 +#: send-pack.c:298 msgid "failed to sign the push certificate" -msgstr "s'ha fallat en firmar el certificat de pujada" +msgstr "s'ha fallat en signar el certificat de pujada" -#: send-pack.c:404 +#: send-pack.c:411 msgid "the receiving end does not support --signed push" msgstr "el destí receptor no admet pujar --signed" -#: send-pack.c:406 +#: send-pack.c:413 msgid "" "not sending a push certificate since the receiving end does not support --" "signed push" msgstr "" -"no enviant una certificació de pujada perquè el destí receptor no admet " -"pujar --signed" +"no s'està enviant una certificació de pujada perquè el destí receptor no " +"admet pujar --signed" -#: send-pack.c:418 +#: send-pack.c:425 msgid "the receiving end does not support --atomic push" msgstr "el destí receptor no admet pujar --atomic" +#: send-pack.c:430 +msgid "the receiving end does not support push options" +msgstr "el destí receptor no admet opcions de pujada" + #: sequencer.c:174 msgid "" "after resolving the conflicts, mark the corrected paths\n" @@ -1446,15 +1731,15 @@ msgstr "" "corregits amb 'git add ' o 'git rm '\n" "i cometeu el resultat amb 'git commit'" -#: sequencer.c:190 sequencer.c:833 sequencer.c:913 +#: sequencer.c:190 sequencer.c:841 sequencer.c:924 #, c-format msgid "Could not write to %s" msgstr "No s'ha pogut escriure a %s" -#: sequencer.c:193 +#: sequencer.c:193 sequencer.c:843 sequencer.c:928 #, c-format -msgid "Error wrapping up %s" -msgstr "Error en finalitzar %s" +msgid "Error wrapping up %s." +msgstr "Ha hagut un error en finalitzar %s." #: sequencer.c:208 msgid "Your local changes would be overwritten by cherry-pick." @@ -1468,45 +1753,50 @@ msgstr "Els vostres canvis locals se sobreescriurien per la reversió." msgid "Commit your changes or stash them to proceed." msgstr "Cometeu els vostres canvis o emmagatzemeu-los per a procedir." +#: sequencer.c:228 +#, c-format +msgid "%s: fast-forward" +msgstr "%s: avanç ràpid" + #. TRANSLATORS: %s will be "revert" or "cherry-pick" -#: sequencer.c:300 +#: sequencer.c:303 #, c-format msgid "%s: Unable to write new index file" msgstr "%s: No s'ha pogut escriure un fitxer d'índex nou" -#: sequencer.c:318 +#: sequencer.c:321 msgid "Could not resolve HEAD commit\n" msgstr "No s'ha pogut resoldre la comissió HEAD\n" -#: sequencer.c:338 +#: sequencer.c:341 msgid "Unable to update cache tree\n" msgstr "No s'ha pogut actualitzar l'arbre cau\n" -#: sequencer.c:390 +#: sequencer.c:393 #, c-format msgid "Could not parse commit %s\n" msgstr "No s'ha pogut analitzar la comissió %s\n" -#: sequencer.c:395 +#: sequencer.c:398 #, c-format msgid "Could not parse parent commit %s\n" msgstr "No s'ha pogut analitzar la comissió mare %s\n" -#: sequencer.c:460 +#: sequencer.c:463 msgid "Your index file is unmerged." msgstr "El vostre fitxer d'índex està sense fusionar." -#: sequencer.c:479 +#: sequencer.c:482 #, c-format msgid "Commit %s is a merge but no -m option was given." msgstr "La comissió %s és una fusió però no s'ha donat cap opció -m." -#: sequencer.c:487 +#: sequencer.c:490 #, c-format msgid "Commit %s does not have parent %d" msgstr "La comissió %s no té mare %d" -#: sequencer.c:491 +#: sequencer.c:494 #, c-format msgid "Mainline was specified but commit %s is not a merge." msgstr "" @@ -1514,172 +1804,253 @@ msgstr "" #. TRANSLATORS: The first %s will be "revert" or #. "cherry-pick", the second %s a SHA1 -#: sequencer.c:504 +#: sequencer.c:507 #, c-format msgid "%s: cannot parse parent commit %s" msgstr "%s: no es pot analitzar la comissió mare %s" -#: sequencer.c:508 +#: sequencer.c:511 #, c-format msgid "Cannot get commit message for %s" msgstr "No es pot obtenir el missatge de comissió de %s" -#: sequencer.c:594 +#: sequencer.c:597 #, c-format msgid "could not revert %s... %s" msgstr "no s'ha pogut revertir %s...%s" -#: sequencer.c:595 +#: sequencer.c:598 #, c-format msgid "could not apply %s... %s" msgstr "no s'ha pogut aplicar %s...%s" -#: sequencer.c:630 +#: sequencer.c:633 msgid "empty commit set passed" msgstr "conjunt de comissions buit passat" -#: sequencer.c:638 +#: sequencer.c:641 #, c-format msgid "git %s: failed to read the index" msgstr "git %s: s'ha fallat en llegir l'índex" -#: sequencer.c:642 +#: sequencer.c:645 #, c-format msgid "git %s: failed to refresh the index" msgstr "git %s: s'ha fallat en actualitzar l'índex" -#: sequencer.c:702 -#, c-format -msgid "Cannot %s during a %s" -msgstr "No es pot %s durant un %s" +#: sequencer.c:705 +msgid "Cannot revert during another revert." +msgstr "No es pot revertir durant una altra reversió." + +#: sequencer.c:706 +msgid "Cannot revert during a cherry-pick." +msgstr "No es pot revertir durant un recull de cireres." + +#: sequencer.c:709 +msgid "Cannot cherry-pick during a revert." +msgstr "No es pot recollir cireres durant una reversió." + +#: sequencer.c:710 +msgid "Cannot cherry-pick during another cherry-pick." +msgstr "No es pot recollir cireres durant altre recull de cireres." -#: sequencer.c:724 +#: sequencer.c:732 #, c-format msgid "Could not parse line %d." msgstr "No s'ha pogut analitzar la línia %d." -#: sequencer.c:729 +#: sequencer.c:737 msgid "No commits parsed." -msgstr "Cap comissió analitzada." +msgstr "No s'ha analitzat cap comissió." -#: sequencer.c:741 +#: sequencer.c:749 #, c-format msgid "Could not open %s" msgstr "No s'ha pogut obrir %s" -#: sequencer.c:745 +#: sequencer.c:753 #, c-format msgid "Could not read %s." msgstr "No s'ha pogut llegir %s." -#: sequencer.c:752 +#: sequencer.c:760 #, c-format msgid "Unusable instruction sheet: %s" msgstr "Full d'instruccions inusable: %s" -#: sequencer.c:782 +#: sequencer.c:790 #, c-format msgid "Invalid key: %s" msgstr "Clau no vàlida: %s" -#: sequencer.c:785 builtin/pull.c:50 builtin/pull.c:52 +#: sequencer.c:793 builtin/pull.c:50 builtin/pull.c:52 #, c-format msgid "Invalid value for %s: %s" msgstr "Valor no vàlid per a %s: %s" -#: sequencer.c:795 +#: sequencer.c:803 #, c-format msgid "Malformed options sheet: %s" msgstr "Full d'opcions mal format: %s" -#: sequencer.c:814 +#: sequencer.c:822 msgid "a cherry-pick or revert is already in progress" msgstr "un recull de cireres o una reversió ja està en curs" -#: sequencer.c:815 +#: sequencer.c:823 msgid "try \"git cherry-pick (--continue | --quit | --abort)\"" msgstr "intenteu \"git cherry-pick (--continue | --quit | --abort)\"" -#: sequencer.c:819 +#: sequencer.c:827 #, c-format msgid "Could not create sequencer directory %s" msgstr "No s'ha pogut crear el directori de seqüenciador %s" -#: sequencer.c:835 sequencer.c:917 -#, c-format -msgid "Error wrapping up %s." -msgstr "Error en finalitzar %s." - -#: sequencer.c:854 sequencer.c:987 +#: sequencer.c:862 sequencer.c:998 msgid "no cherry-pick or revert in progress" msgstr "ni hi ha cap recull de cireres ni cap reversió en curs" -#: sequencer.c:856 +#: sequencer.c:864 msgid "cannot resolve HEAD" msgstr "no es pot resoldre HEAD" -#: sequencer.c:858 +#: sequencer.c:866 sequencer.c:900 msgid "cannot abort from a branch yet to be born" msgstr "no es pot avortar des d'una branca que encara ha de nàixer" -#: sequencer.c:878 builtin/apply.c:4287 +#: sequencer.c:886 builtin/fetch.c:724 builtin/fetch.c:970 #, c-format -msgid "cannot open %s: %s" -msgstr "no es pot obrir %s: %s" +msgid "cannot open %s" +msgstr "no es pot obrir %s" -#: sequencer.c:881 +#: sequencer.c:888 #, c-format msgid "cannot read %s: %s" msgstr "no es pot llegir %s: %s" -#: sequencer.c:882 +#: sequencer.c:889 msgid "unexpected end of file" msgstr "final de fitxer inesperat" -#: sequencer.c:888 +#: sequencer.c:895 #, c-format msgid "stored pre-cherry-pick HEAD file '%s' is corrupt" msgstr "el fitxer HEAD emmagatzemat abans del recull de cireres '%s' és malmès" -#: sequencer.c:910 +#: sequencer.c:921 #, c-format msgid "Could not format %s." msgstr "No s'ha pogut formatar %s." -#: sequencer.c:1055 +#: sequencer.c:1066 #, c-format msgid "%s: can't cherry-pick a %s" msgstr "%s: no es pot recollir com a cirera un %s" -#: sequencer.c:1058 +#: sequencer.c:1069 #, c-format msgid "%s: bad revision" msgstr "%s: revisió dolenta" -#: sequencer.c:1092 +#: sequencer.c:1102 msgid "Can't revert as initial commit" msgstr "No es pot revertir com a comissió inicial" -#: sequencer.c:1093 -msgid "Can't cherry-pick into empty head" -msgstr "No es pot recollir cireres en un cap buit" +#: setup.c:160 +#, c-format +msgid "" +"%s: no such path in the working tree.\n" +"Use 'git -- ...' to specify paths that do not exist locally." +msgstr "" +"%s: no hi ha tal camí en l'arbre de treball.\n" +"Useu 'git -- ...' per a especificar camins que no existeixin " +"localment." + +#: setup.c:173 +#, c-format +msgid "" +"ambiguous argument '%s': unknown revision or path not in the working tree.\n" +"Use '--' to separate paths from revisions, like this:\n" +"'git [...] -- [...]'" +msgstr "" +"paràmetre ambigu '%s': revisió no coneguda o camí no en l'arbre de treball.\n" +"Useu '--' per a separar els camins de les revisions, com això:\n" +"'git [...] -- [...]'" + +#: setup.c:223 +#, c-format +msgid "" +"ambiguous argument '%s': both revision and filename\n" +"Use '--' to separate paths from revisions, like this:\n" +"'git [...] -- [...]'" +msgstr "" +"paràmetre ambigu '%s': ambdós una revisió i un nom de fitxer\n" +"Useu '--' per a separar els camins de les revisions, com això:\n" +"'git [...] -- [...]'" -#: setup.c:246 +#: setup.c:248 builtin/apply.c:3362 builtin/apply.c:3373 builtin/apply.c:3419 #, c-format msgid "failed to read %s" msgstr "s'ha fallat en llegir %s" -#: sha1_file.c:1080 +#: setup.c:468 +#, c-format +msgid "Expected git repo version <= %d, found %d" +msgstr "S'esperava una versió de dipòsit de git <= %d, s'ha trobat %d" + +#: setup.c:476 +msgid "unknown repository extensions found:" +msgstr "s'han trobat extensions de dipòsit desconegudes:" + +#: setup.c:762 +#, c-format +msgid "Not a git repository (or any of the parent directories): %s" +msgstr "No un dipòsit de git (ni cap dels directoris pares): %s" + +#: setup.c:764 setup.c:915 builtin/index-pack.c:1641 +msgid "Cannot come back to cwd" +msgstr "No es pot tornar al directori de treball actual" + +#: setup.c:845 +msgid "Unable to read current working directory" +msgstr "No s'ha pogut llegir el directori de treball actual" + +#: setup.c:920 +#, c-format +msgid "" +"Not a git repository (or any parent up to mount point %s)\n" +"Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)." +msgstr "" +"No un dipòsit de git (ni cap pare fins el punt de muntatge %s)\n" +"S'atura a la frontera de sistema de fitxers (GIT_DISCOVERY_ACROSS_FILESYSTEM " +"no està establert)." + +#: setup.c:927 +#, c-format +msgid "Cannot change to '%s/..'" +msgstr "No es pot canviar a '%s/..'" + +#: setup.c:989 +#, c-format +msgid "" +"Problem with core.sharedRepository filemode value (0%.3o).\n" +"The owner of files must always have read and write permissions." +msgstr "" +"Problema amb el valor de mode de fitxer core.sharedRepository (0%.3o).\n" +"El propietari dels fitxers sempre ha de tenir permissions de lectura i " +"escriptura." + +#: sha1_file.c:1046 msgid "offset before end of packfile (broken .idx?)" msgstr "desplaçament abans de la fi del fitxer de paquet (.idx trencat?)" -#: sha1_file.c:2459 +#: sha1_file.c:2434 #, c-format msgid "offset before start of pack index for %s (corrupt index?)" msgstr "" "desplaçament abans d'inici d'índex de paquet per a %s (índex corromput?)" -#: sha1_file.c:2463 +#: sha1_file.c:2438 #, c-format msgid "offset beyond end of pack index for %s (truncated index?)" msgstr "" @@ -1709,31 +2080,40 @@ msgstr "" "suprimiu-les. Desactiveu aquest missatge executant\n" "\"git config advice.objectNameWarning false\"" -#: submodule.c:62 submodule.c:96 +#: submodule.c:64 submodule.c:98 msgid "Cannot change unmerged .gitmodules, resolve merge conflicts first" msgstr "" "No es pot canviar un .gitmodules no fusionat, primer resoldreu els " "conflictes de fusió" -#: submodule.c:66 submodule.c:100 +#: submodule.c:68 submodule.c:102 #, c-format msgid "Could not find section in .gitmodules where path=%s" msgstr "No s'ha pogut trobar la secció en .gitmodules on path=%s" -#: submodule.c:74 +#: submodule.c:76 #, c-format msgid "Could not update .gitmodules entry %s" msgstr "No s'ha pogut actualitzar l'entrada de .gitmodules %s" -#: submodule.c:107 +#: submodule.c:109 #, c-format msgid "Could not remove .gitmodules entry for %s" msgstr "No s'ha pogut eliminar l'entrada de .gitmodules per a %s" -#: submodule.c:118 +#: submodule.c:120 msgid "staging updated .gitmodules failed" msgstr "L'allistament del .gitmodules actualitzat ha fallat" +#: submodule.c:177 +msgid "negative values not allowed for submodule.fetchJobs" +msgstr "no es permeten els valors negatius a submodule.fetchJobs" + +#: submodule-config.c:358 +#, c-format +msgid "invalid value for %s" +msgstr "valor no vàlid per a %s" + #: trailer.c:237 #, c-format msgid "running trailer command '%s' failed" @@ -1788,240 +2168,506 @@ msgstr "no s'ha pogut obrir el fitxer temporal" msgid "could not rename temporary file to %s" msgstr "no s'ha pogut canviar el nom del fitxer temporal a %s" -#: transport-helper.c:1041 +#: transport.c:62 #, c-format -msgid "Could not read ref %s" -msgstr "No s'ha pogut llegir la referència %s" - -#: unpack-trees.c:203 -msgid "Checking out files" -msgstr "Agafant fitxers" - -#: urlmatch.c:120 -msgid "invalid URL scheme name or missing '://' suffix" -msgstr "l'esquema d'URL no és vàlida o li manca el sufix '://'" +msgid "Would set upstream of '%s' to '%s' of '%s'\n" +msgstr "Canviaria la font de '%s' a '%s' de '%s'\n" -#: urlmatch.c:144 urlmatch.c:297 urlmatch.c:356 +#: transport.c:151 #, c-format -msgid "invalid %XX escape sequence" -msgstr "seqüència d'escapament %XX no vàlida" - -#: urlmatch.c:172 -msgid "missing host and scheme is not 'file:'" -msgstr "manca la màquina i l'esquema no és 'file:'" - -#: urlmatch.c:189 -msgid "a 'file:' URL may not have a port number" -msgstr "un URL 'file:' no pot tenir número de port" +msgid "transport: invalid depth option '%s'" +msgstr "transport: opció de profunditat no vàlida '%s'" -#: urlmatch.c:199 -msgid "invalid characters in host name" -msgstr "hi ha caràcters no vàlids en el nom de màquina" +#: transport.c:771 +#, c-format +msgid "" +"The following submodule paths contain changes that can\n" +"not be found on any remote:\n" +msgstr "" +"Els camins de submòdul següents contenen canvis que no\n" +"es poden trobar en cap remot:\n" -#: urlmatch.c:244 urlmatch.c:255 -msgid "invalid port number" -msgstr "número de port no vàlid" +#: transport.c:775 +#, c-format +msgid "" +"\n" +"Please try\n" +"\n" +"\tgit push --recurse-submodules=on-demand\n" +"\n" +"or cd to the path and use\n" +"\n" +"\tgit push\n" +"\n" +"to push them to a remote.\n" +"\n" +msgstr "" +"\n" +"Si us plau, intenteu\n" +"\n" +"\tgit push --recurse-submodules=on-demand\n" +"\n" +"o canviar de directori al camí i useu\n" +"\n" +"\tgit push\n" +"\n" +"per a pujar-los a un remot.\n" -#: urlmatch.c:322 -msgid "invalid '..' path segment" -msgstr "segment de camí '..' no vàlid" +#: transport.c:783 +msgid "Aborting." +msgstr "S'està avortant." -#: wrapper.c:222 wrapper.c:381 +#: transport-helper.c:1041 #, c-format -msgid "could not open '%s' for reading and writing" -msgstr "no s'ha pogut obrir '%s' per a lectura i escriptura" +msgid "Could not read ref %s" +msgstr "No s'ha pogut llegir la referència %s" -#: wrapper.c:224 wrapper.c:383 +#: unpack-trees.c:64 #, c-format -msgid "could not open '%s' for writing" -msgstr "no s'ha pogut obrir '%s' per a escriptura" +msgid "" +"Your local changes to the following files would be overwritten by checkout:\n" +"%%sPlease commit your changes or stash them before you switch branches." +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per " +"agafar:\n" +"%%sSi us plau, cometeu els vostres canvis o emmagatzemeu-los abans de " +"canviar de branca." -#: wrapper.c:226 wrapper.c:385 builtin/am.c:323 builtin/commit.c:1691 -#: builtin/merge.c:1075 builtin/pull.c:387 +#: unpack-trees.c:66 #, c-format -msgid "could not open '%s' for reading" -msgstr "no s'ha pogut obrir '%s' per a lectura" +msgid "" +"Your local changes to the following files would be overwritten by checkout:\n" +"%%s" +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per " +"agafar:\n" +"%%s" -#: wrapper.c:611 +#: unpack-trees.c:69 #, c-format -msgid "unable to access '%s': %s" -msgstr "no s'ha pogut accedir a '%s': %s" +msgid "" +"Your local changes to the following files would be overwritten by merge:\n" +"%%sPlease commit your changes or stash them before you merge." +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per " +"fusionar:\n" +"%%sSi us plau, cometeu els vostres canvis o emmagatzemeu-los abans de " +"fusionar." -#: wrapper.c:632 +#: unpack-trees.c:71 #, c-format -msgid "unable to access '%s'" -msgstr "no s'ha pogut accedir a '%s'" +msgid "" +"Your local changes to the following files would be overwritten by merge:\n" +"%%s" +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per " +"fusionar:\n" +"%%s" -#: wrapper.c:640 -msgid "unable to get current working directory" -msgstr "no s'ha pogut obtenir el directori de treball actual" +#: unpack-trees.c:74 +#, c-format +msgid "" +"Your local changes to the following files would be overwritten by %s:\n" +"%%sPlease commit your changes or stash them before you %s." +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per %s:\n" +"%%sSi us plau, cometeu els vostres canvis o emmagatzemeu-los abans de %s." -#: wrapper.c:667 +#: unpack-trees.c:76 #, c-format -msgid "could not open %s for writing" -msgstr "no s'ha pogut obrir '%s' per a escriptura" +msgid "" +"Your local changes to the following files would be overwritten by %s:\n" +"%%s" +msgstr "" +"Els vostres canvis locals als fitxers següents se sobreescriurien per %s:\n" +"%%s" -#: wrapper.c:678 builtin/am.c:410 +#: unpack-trees.c:81 +#, c-format +msgid "" +"Updating the following directories would lose untracked files in it:\n" +"%s" +msgstr "" +"Actualitzar els directoris següents perdria fitxers no seguits en el:\n" +"%s" + +#: unpack-trees.c:85 +#, c-format +msgid "" +"The following untracked working tree files would be removed by checkout:\n" +"%%sPlease move or remove them before you switch branches." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per " +"agafar:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de canviar de branca." + +#: unpack-trees.c:87 +#, c-format +msgid "" +"The following untracked working tree files would be removed by checkout:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per " +"agafar:\n" +"%%s" + +#: unpack-trees.c:90 +#, c-format +msgid "" +"The following untracked working tree files would be removed by merge:\n" +"%%sPlease move or remove them before you merge." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per " +"fusionar:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de fusionar." + +#: unpack-trees.c:92 +#, c-format +msgid "" +"The following untracked working tree files would be removed by merge:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per " +"fusionar:\n" +"%%s" + +#: unpack-trees.c:95 +#, c-format +msgid "" +"The following untracked working tree files would be removed by %s:\n" +"%%sPlease move or remove them before you %s." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per %s:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de %s." + +#: unpack-trees.c:97 +#, c-format +msgid "" +"The following untracked working tree files would be removed by %s:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball s'eliminarien per %s:\n" +"%%s" + +#: unpack-trees.c:102 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by " +"checkout:\n" +"%%sPlease move or remove them before you switch branches." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"agafar:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de canviar de branca." + +#: unpack-trees.c:104 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by " +"checkout:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"agafar:\n" +"%%s" + +#: unpack-trees.c:107 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by merge:\n" +"%%sPlease move or remove them before you merge." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"fusionar:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de fusionar." + +#: unpack-trees.c:109 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by merge:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"fusionar:\n" +"%%s" + +#: unpack-trees.c:112 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by %s:\n" +"%%sPlease move or remove them before you %s." +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"%s:\n" +"%%sSi us plau, moveu-los o elimineu-los abans de %s." + +#: unpack-trees.c:114 +#, c-format +msgid "" +"The following untracked working tree files would be overwritten by %s:\n" +"%%s" +msgstr "" +"Els següents fitxers no seguits en l'arbre de treball se sobreescriurien per " +"%s:\n" +"%%s" + +#: unpack-trees.c:121 +#, c-format +msgid "Entry '%s' overlaps with '%s'. Cannot bind." +msgstr "L'entrada '%s' encavalca amb '%s'. No es pot vincular." + +#: unpack-trees.c:124 +#, c-format +msgid "" +"Cannot update sparse checkout: the following entries are not up-to-date:\n" +"%s" +msgstr "" +"No es pot actualitzar l'agafament parcial: les entrades següents no estan al " +"dia:\n" +"%s" + +#: unpack-trees.c:126 +#, c-format +msgid "" +"The following Working tree files would be overwritten by sparse checkout " +"update:\n" +"%s" +msgstr "" +"Els fitxers següents en l'arbre de treball se sobreescriurien per " +"actualitzar l'agafament parcial:\n" +"%s" + +#: unpack-trees.c:128 +#, c-format +msgid "" +"The following Working tree files would be removed by sparse checkout " +"update:\n" +"%s" +msgstr "" +"Els fitxers següents en l'arbre de treball s'eliminarien per actualitzar " +"l'agafament parcial:\n" +"%s" + +#: unpack-trees.c:205 +#, c-format +msgid "Aborting\n" +msgstr "S'està avortant\n" + +#: unpack-trees.c:237 +msgid "Checking out files" +msgstr "S'està agafant fitxers" + +#: urlmatch.c:120 +msgid "invalid URL scheme name or missing '://' suffix" +msgstr "l'esquema d'URL no és vàlid 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 no vàlida" + +#: urlmatch.c:172 +msgid "missing host and scheme is not 'file:'" +msgstr "manca la màquina i l'esquema no és 'file:'" + +#: urlmatch.c:189 +msgid "a 'file:' URL may not have a port number" +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 no vàlids en el nom de màquina" + +#: urlmatch.c:244 urlmatch.c:255 +msgid "invalid port number" +msgstr "número de port no vàlid" + +#: urlmatch.c:322 +msgid "invalid '..' path segment" +msgstr "segment de camí '..' no vàlid" + +#: worktree.c:282 +#, c-format +msgid "failed to read '%s'" +msgstr "s'ha fallat en llegir '%s'" + +#: wrapper.c:222 wrapper.c:392 +#, c-format +msgid "could not open '%s' for reading and writing" +msgstr "no s'ha pogut obrir '%s' per a lectura i escriptura" + +#: wrapper.c:224 wrapper.c:394 builtin/am.c:778 +#, c-format +msgid "could not open '%s' for writing" +msgstr "no s'ha pogut obrir '%s' per a escriptura" + +#: wrapper.c:226 wrapper.c:396 builtin/am.c:324 builtin/am.c:771 +#: builtin/am.c:859 builtin/commit.c:1712 builtin/merge.c:1029 +#: builtin/pull.c:407 +#, c-format +msgid "could not open '%s' for reading" +msgstr "no s'ha pogut obrir '%s' per a lectura" + +#: wrapper.c:605 wrapper.c:626 +#, c-format +msgid "unable to access '%s'" +msgstr "no s'ha pogut accedir a '%s'" + +#: wrapper.c:634 +msgid "unable to get current working directory" +msgstr "no s'ha pogut obtenir el directori de treball actual" + +#: wrapper.c:658 #, c-format msgid "could not write to %s" msgstr "no s'ha pogut escriure a %s" -#: wrapper.c:684 +#: wrapper.c:660 #, c-format msgid "could not close %s" msgstr "no s'ha pogut tancar %s" -#: wt-status.c:149 +#: wt-status.c:150 msgid "Unmerged paths:" msgstr "Camins sense fusionar:" -#: wt-status.c:176 wt-status.c:203 +#: wt-status.c:177 wt-status.c:204 #, c-format msgid " (use \"git reset %s ...\" to unstage)" msgstr " (useu \"git reset %s ...\" per a desallistar)" -#: wt-status.c:178 wt-status.c:205 +#: wt-status.c:179 wt-status.c:206 msgid " (use \"git rm --cached ...\" to unstage)" msgstr " (useu \"git rm --cached ...\" per a desallistar)" -#: wt-status.c:182 +#: wt-status.c:183 msgid " (use \"git add ...\" to mark resolution)" msgstr " (useu \"git add ...\" per a senyalar resolució)" -#: wt-status.c:184 wt-status.c:188 +#: wt-status.c:185 wt-status.c:189 msgid " (use \"git add/rm ...\" as appropriate to mark resolution)" msgstr "" " (useu \"git add/rm ...\" segons sigui apropiat per a senyalar " "resolució)" -#: wt-status.c:186 +#: wt-status.c:187 msgid " (use \"git rm ...\" to mark resolution)" msgstr " (useu \"git rm ...\" per a senyalar resolució)" -#: wt-status.c:197 wt-status.c:880 +#: wt-status.c:198 wt-status.c:882 msgid "Changes to be committed:" msgstr "Canvis a cometre:" -#: wt-status.c:215 wt-status.c:889 +#: wt-status.c:216 wt-status.c:891 msgid "Changes not staged for commit:" msgstr "Canvis no allistats per a cometre:" -#: wt-status.c:219 +#: wt-status.c:220 msgid " (use \"git add ...\" to update what will be committed)" msgstr " (useu \"git add ...\" per a actualitzar què es cometrà)" -#: wt-status.c:221 +#: wt-status.c:222 msgid " (use \"git add/rm ...\" to update what will be committed)" msgstr " (useu \"git add/rm ...\" per a actualitzar què es cometrà)" -#: wt-status.c:222 +#: wt-status.c:223 msgid "" " (use \"git checkout -- ...\" to discard changes in working directory)" msgstr "" " (useu \"git checkout -- ...\" per a descartar els canvis en el " "directori de treball)" -#: wt-status.c:224 +#: wt-status.c:225 msgid " (commit or discard the untracked or modified content in submodules)" msgstr "" " (cometeu o descarteu el contingut modificat o no seguit en els submòduls)" -#: wt-status.c:236 +#: wt-status.c:237 #, c-format msgid " (use \"git %s ...\" to include in what will be committed)" msgstr " (useu \"git %s ...\" per a incloure-ho en què es cometrà)" -#: wt-status.c:251 +#: wt-status.c:252 msgid "both deleted:" msgstr "suprimit per ambdós:" -#: wt-status.c:253 +#: wt-status.c:254 msgid "added by us:" msgstr "afegit per nosaltres:" -#: wt-status.c:255 +#: wt-status.c:256 msgid "deleted by them:" msgstr "suprimit per ells:" -#: wt-status.c:257 +#: wt-status.c:258 msgid "added by them:" msgstr "afegit per ells:" -#: wt-status.c:259 +#: wt-status.c:260 msgid "deleted by us:" msgstr "suprimit per nosaltres:" -#: wt-status.c:261 +#: wt-status.c:262 msgid "both added:" msgstr "afegit per ambdós:" -#: wt-status.c:263 +#: wt-status.c:264 msgid "both modified:" msgstr "modificat per ambdós:" -#: wt-status.c:265 -#, c-format -msgid "bug: unhandled unmerged status %x" -msgstr "bug: estat no fusionat no gestionat %x" - -#: wt-status.c:273 +#: wt-status.c:274 msgid "new file:" msgstr "fitxer nou:" -#: wt-status.c:275 +#: wt-status.c:276 msgid "copied:" msgstr "copiat:" -#: wt-status.c:277 +#: wt-status.c:278 msgid "deleted:" msgstr "suprimit:" -#: wt-status.c:279 +#: wt-status.c:280 msgid "modified:" msgstr "modificat:" -#: wt-status.c:281 +#: wt-status.c:282 msgid "renamed:" msgstr "canviat de nom:" -#: wt-status.c:283 +#: wt-status.c:284 msgid "typechange:" msgstr "canviat de tipus:" -#: wt-status.c:285 +#: wt-status.c:286 msgid "unknown:" msgstr "desconegut:" -#: wt-status.c:287 +#: wt-status.c:288 msgid "unmerged:" msgstr "sense fusionar:" -#: wt-status.c:369 +#: wt-status.c:370 msgid "new commits, " msgstr "comissions noves, " -#: wt-status.c:371 +#: wt-status.c:372 msgid "modified content, " msgstr "contingut modificat, " -#: wt-status.c:373 +#: wt-status.c:374 msgid "untracked content, " msgstr "contingut no seguit, " -#: wt-status.c:390 -#, c-format -msgid "bug: unhandled diff status %c" -msgstr "bug: estat de diferència no gestionat %c" - -#: wt-status.c:754 +#: wt-status.c:756 msgid "Submodules changed but not updated:" msgstr "Submòduls canviats però no actualitzats:" -#: wt-status.c:756 +#: wt-status.c:758 msgid "Submodule changes to be committed:" msgstr "Canvis de submòdul a cometre:" -#: wt-status.c:837 +#: wt-status.c:839 msgid "" "Do not touch the line above.\n" "Everything below will be removed." @@ -2029,226 +2675,230 @@ msgstr "" "No toqueu la línia de sobre.\n" "Tot el que hi ha a sota s'eliminarà." -#: wt-status.c:948 +#: wt-status.c:950 msgid "You have unmerged paths." msgstr "Teniu camins sense fusionar." -#: wt-status.c:951 +#: wt-status.c:953 msgid " (fix conflicts and run \"git commit\")" msgstr " (arregleu els conflictes i executeu \"git commit\")" -#: wt-status.c:954 +#: wt-status.c:955 +msgid " (use \"git merge --abort\" to abort the merge)" +msgstr " (useu \"git merge --abort\" per a avortar la fusió)" + +#: wt-status.c:960 msgid "All conflicts fixed but you are still merging." msgstr "Tots els conflictes estan arreglats però encara esteu fusionant." -#: wt-status.c:957 +#: wt-status.c:963 msgid " (use \"git commit\" to conclude merge)" msgstr " (useu \"git commit\" per a concloure la fusió)" -#: wt-status.c:967 +#: wt-status.c:973 msgid "You are in the middle of an am session." msgstr "Esteu enmig d'una sessió am." -#: wt-status.c:970 +#: wt-status.c:976 msgid "The current patch is empty." msgstr "El pedaç actual està buit." -#: wt-status.c:974 +#: wt-status.c:980 msgid " (fix conflicts and then run \"git am --continue\")" msgstr " (arregleu els conflictes i després executeu \"git am --continue\")" -#: wt-status.c:976 +#: wt-status.c:982 msgid " (use \"git am --skip\" to skip this patch)" msgstr " (useu \"git am --skip\" per a ometre aquest pedaç)" -#: wt-status.c:978 +#: wt-status.c:984 msgid " (use \"git am --abort\" to restore the original branch)" msgstr " (useu \"git am --abort\" per a restaurar la branca original)" -#: wt-status.c:1105 +#: wt-status.c:1109 msgid "No commands done." msgstr "No s'ha fet cap ordre." -#: wt-status.c:1108 +#: wt-status.c:1112 #, c-format msgid "Last command done (%d command done):" msgid_plural "Last commands done (%d commands done):" -msgstr[0] "Última ordre fet (%d ordre feta):" +msgstr[0] "Última ordre feta (%d ordre feta):" msgstr[1] "Últimes ordres fetes (%d ordres fetes):" -#: wt-status.c:1119 +#: wt-status.c:1123 #, c-format msgid " (see more in file %s)" msgstr " (vegeu més en el fitxer %s)" -#: wt-status.c:1124 +#: wt-status.c:1128 msgid "No commands remaining." msgstr "No manca cap ordre." -#: wt-status.c:1127 +#: wt-status.c:1131 #, c-format msgid "Next command to do (%d remaining command):" msgid_plural "Next commands to do (%d remaining commands):" msgstr[0] "Ordre següent a fer (manca %d ordre):" msgstr[1] "Ordres següents a fer (manquen %d ordres):" -#: wt-status.c:1135 +#: wt-status.c:1139 msgid " (use \"git rebase --edit-todo\" to view and edit)" msgstr " (useu \"git rebase --edit-todo\" per a veure i editar)" -#: wt-status.c:1148 +#: wt-status.c:1152 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "Actualment esteu rebasant la branca '%s' en '%s'." -#: wt-status.c:1153 +#: wt-status.c:1157 msgid "You are currently rebasing." msgstr "Actualment esteu rebasant." -#: wt-status.c:1167 +#: wt-status.c:1171 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr "" " (arregleu els conflictes i després executeu \"git rebase --continue\")" -#: wt-status.c:1169 +#: wt-status.c:1173 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr " (useu \"git rebase --skip\" per a saltar aquest pedaç)" -#: wt-status.c:1171 +#: wt-status.c:1175 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr " (useu \"git rebase --abort\" per a agafar la branca original)" -#: wt-status.c:1177 +#: wt-status.c:1181 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr " (tots els conflictes arreglats: executeu \"git rebase --continue\")" -#: wt-status.c:1181 +#: wt-status.c:1185 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." msgstr "" "Actualment esteu dividint una comissió mentre rebaseu la branca '%s' en '%s'." -#: wt-status.c:1186 +#: wt-status.c:1190 msgid "You are currently splitting a commit during a rebase." msgstr "Actualment esteu dividint una comissió durant un rebasament." -#: wt-status.c:1189 +#: wt-status.c:1193 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:1193 +#: wt-status.c:1197 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "" "Actualment esteu editant una comissió mentre rebaseu la branca '%s' en '%s'." -#: wt-status.c:1198 +#: wt-status.c:1202 msgid "You are currently editing a commit during a rebase." msgstr "Actualment esteu editant una comissió durant un rebasament." -#: wt-status.c:1201 +#: wt-status.c:1205 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr " (useu \"git commit --amend\" per a esmenar la comissió actual)" -#: wt-status.c:1203 +#: wt-status.c:1207 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:1213 +#: wt-status.c:1217 #, c-format msgid "You are currently cherry-picking commit %s." msgstr "Actualment esteu recollint com a cirera la comissió %s." -#: wt-status.c:1218 +#: wt-status.c:1222 msgid " (fix conflicts and run \"git cherry-pick --continue\")" msgstr " (arregleu els conflictes i executeu \"git cherry-pick --continue\")" -#: wt-status.c:1221 +#: wt-status.c:1225 msgid " (all conflicts fixed: run \"git cherry-pick --continue\")" msgstr "" " (tots els conflictes arreglats: executeu \"git cherry-pick --continue\")" -#: wt-status.c:1223 +#: wt-status.c:1227 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:1232 +#: wt-status.c:1236 #, c-format msgid "You are currently reverting commit %s." msgstr "Actualment esteu revertint la comissió %s." -#: wt-status.c:1237 +#: wt-status.c:1241 msgid " (fix conflicts and run \"git revert --continue\")" msgstr " (arregleu els conflictes i executeu \"git revert --continue\")" -#: wt-status.c:1240 +#: wt-status.c:1244 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr "" " (tots els conflictes estan arreglats: executeu \"git revert --continue\")" -#: wt-status.c:1242 +#: wt-status.c:1246 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:1253 +#: wt-status.c:1257 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "Actualment esteu bisecant, heu començat des de la branca '%s'." -#: wt-status.c:1257 +#: wt-status.c:1261 msgid "You are currently bisecting." msgstr "Actualment esteu bisecant." -#: wt-status.c:1260 +#: wt-status.c:1264 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr " (useu \"git bisect reset\" per a tornar a la branca original)" -#: wt-status.c:1438 +#: wt-status.c:1464 msgid "On branch " msgstr "En la branca " -#: wt-status.c:1444 +#: wt-status.c:1470 msgid "interactive rebase in progress; onto " msgstr "rebasament interactiu en progrés; sobre " -#: wt-status.c:1446 +#: wt-status.c:1472 msgid "rebase in progress; onto " msgstr "rebasament en progrés; sobre " -#: wt-status.c:1451 +#: wt-status.c:1477 msgid "HEAD detached at " msgstr "HEAD separat a " -#: wt-status.c:1453 +#: wt-status.c:1479 msgid "HEAD detached from " msgstr "HEAD separat de " -#: wt-status.c:1456 +#: wt-status.c:1482 msgid "Not currently on any branch." -msgstr "Actualment no en cap branca." +msgstr "Actualment no s'és en cap branca." -#: wt-status.c:1474 +#: wt-status.c:1500 msgid "Initial commit" msgstr "Comissió inicial" -#: wt-status.c:1488 +#: wt-status.c:1514 msgid "Untracked files" msgstr "Fitxers no seguits" -#: wt-status.c:1490 +#: wt-status.c:1516 msgid "Ignored files" msgstr "Fitxers ignorats" -#: wt-status.c:1494 +#: wt-status.c:1520 #, c-format msgid "" "It took %.2f seconds to enumerate untracked files. 'status -uno'\n" @@ -2260,31 +2910,31 @@ msgstr "" "oblidar-vos d'afegir fitxers nous per vós mateix (vegeu\n" "'git help status')." -#: wt-status.c:1500 +#: wt-status.c:1526 #, c-format msgid "Untracked files not listed%s" msgstr "Els fitxers no seguits no estan llistats%s" -#: wt-status.c:1502 +#: wt-status.c:1528 msgid " (use -u option to show untracked files)" msgstr " (useu l'opció -u per a mostrar els fitxers no seguits)" -#: wt-status.c:1508 +#: wt-status.c:1534 msgid "No changes" msgstr "Sense canvis" -#: wt-status.c:1513 +#: wt-status.c:1539 #, 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:1516 +#: wt-status.c:1542 #, c-format msgid "no changes added to commit\n" msgstr "no hi ha canvis afegits a cometre\n" -#: wt-status.c:1519 +#: wt-status.c:1545 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " @@ -2293,55 +2943,55 @@ 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:1522 +#: wt-status.c:1548 #, 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:1525 +#: wt-status.c:1551 #, 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:1528 wt-status.c:1533 +#: wt-status.c:1554 wt-status.c:1559 #, c-format msgid "nothing to commit\n" msgstr "no hi ha res a cometre\n" -#: wt-status.c:1531 +#: wt-status.c:1557 #, 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:1535 +#: wt-status.c:1561 #, c-format -msgid "nothing to commit, working directory clean\n" -msgstr "no hi ha res a cometre, directori de treball net\n" +msgid "nothing to commit, working tree clean\n" +msgstr "no hi ha res a cometre, l'arbre de treball està net\n" -#: wt-status.c:1642 +#: wt-status.c:1668 msgid "Initial commit on " msgstr "Comissió inicial en " -#: wt-status.c:1646 +#: wt-status.c:1672 msgid "HEAD (no branch)" msgstr "HEAD (sense branca)" -#: wt-status.c:1675 +#: wt-status.c:1701 msgid "gone" msgstr "no hi és" -#: wt-status.c:1677 wt-status.c:1685 +#: wt-status.c:1703 wt-status.c:1711 msgid "behind " msgstr "darrere " -#: wt-status.c:1680 wt-status.c:1683 +#: wt-status.c:1706 wt-status.c:1709 msgid "ahead " msgstr "davant per " -#: compat/precompose_utf8.c:57 builtin/clone.c:413 +#: compat/precompose_utf8.c:57 builtin/clone.c:415 #, c-format msgid "failed to unlink '%s'" msgstr "s'ha fallat en desenllaçar '%s'" @@ -2355,206 +3005,210 @@ msgstr "git add [] [--] ..." msgid "unexpected diff status %c" msgstr "estat de diff inesperat %c" -#: builtin/add.c:70 builtin/commit.c:278 +#: builtin/add.c:71 builtin/commit.c:281 msgid "updating files failed" msgstr "s'ha fallat en actualitzar els fitxers" -#: builtin/add.c:80 +#: builtin/add.c:81 #, c-format msgid "remove '%s'\n" msgstr "elimina '%s'\n" -#: builtin/add.c:134 +#: builtin/add.c:136 msgid "Unstaged changes after refreshing the index:" msgstr "Canvis no allistats després d'actualitzar l'índex:" -#: builtin/add.c:194 builtin/rev-parse.c:797 +#: builtin/add.c:196 builtin/rev-parse.c:811 msgid "Could not read the index" msgstr "No s'ha pogut llegir l'índex" -#: builtin/add.c:205 +#: builtin/add.c:207 #, c-format msgid "Could not open '%s' for writing." msgstr "No s'ha pogut obrir '%s' per a escriptura." -#: builtin/add.c:209 +#: builtin/add.c:211 msgid "Could not write patch" msgstr "No s'ha pogut escriure el pedaç" -#: builtin/add.c:212 +#: builtin/add.c:214 msgid "editing patch failed" msgstr "l'edició del pedaç ha fallat" -#: builtin/add.c:215 +#: builtin/add.c:217 #, c-format msgid "Could not stat '%s'" msgstr "No s'ha pogut fer stat a '%s'" -#: builtin/add.c:217 +#: builtin/add.c:219 msgid "Empty patch. Aborted." -msgstr "El pedaç és buit. Avortat." +msgstr "El pedaç és buit. S'ha avortat." -#: builtin/add.c:222 +#: builtin/add.c:224 #, c-format msgid "Could not apply '%s'" msgstr "No s'ha pogut aplicar '%s'" -#: builtin/add.c:232 +#: builtin/add.c:234 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "" "Els camins següents s'ignoren per un dels vostres fitxers .gitignore:\n" -#: builtin/add.c:249 builtin/clean.c:870 builtin/fetch.c:112 builtin/mv.c:111 -#: builtin/prune-packed.c:55 builtin/pull.c:189 builtin/push.c:511 -#: builtin/remote.c:1330 builtin/rm.c:268 builtin/send-pack.c:162 +#: builtin/add.c:253 builtin/clean.c:870 builtin/fetch.c:113 builtin/mv.c:111 +#: builtin/prune-packed.c:55 builtin/pull.c:197 builtin/push.c:521 +#: builtin/remote.c:1327 builtin/rm.c:268 builtin/send-pack.c:162 msgid "dry run" msgstr "marxa en sec" -#: builtin/add.c:250 builtin/apply.c:4561 builtin/check-ignore.c:19 -#: builtin/commit.c:1322 builtin/count-objects.c:85 builtin/fsck.c:558 -#: builtin/log.c:1651 builtin/mv.c:110 builtin/read-tree.c:114 +#: builtin/add.c:254 builtin/apply.c:4854 builtin/check-ignore.c:19 +#: builtin/commit.c:1334 builtin/count-objects.c:85 builtin/fsck.c:593 +#: builtin/log.c:1852 builtin/mv.c:110 builtin/read-tree.c:114 msgid "be verbose" msgstr "sigues detallat" -#: builtin/add.c:252 +#: builtin/add.c:256 msgid "interactive picking" msgstr "recull interactiu" -#: builtin/add.c:253 builtin/checkout.c:1155 builtin/reset.c:286 +#: builtin/add.c:257 builtin/checkout.c:1157 builtin/reset.c:286 msgid "select hunks interactively" msgstr "selecciona els trossos interactivament" -#: builtin/add.c:254 +#: builtin/add.c:258 msgid "edit current diff and apply" msgstr "edita la diferència actual i aplica-la" -#: builtin/add.c:255 +#: builtin/add.c:259 msgid "allow adding otherwise ignored files" msgstr "permet afegir fitxers que d'altra manera s'ignoren" -#: builtin/add.c:256 +#: builtin/add.c:260 msgid "update tracked files" msgstr "actualitza els fitxers seguits" -#: builtin/add.c:257 +#: builtin/add.c:261 msgid "record only the fact that the path will be added later" msgstr "registra només el fet que el camí s'afegirà més tard" -#: builtin/add.c:258 +#: builtin/add.c:262 msgid "add changes from all tracked and untracked files" msgstr "afegeix els canvis de tots els fitxers seguits i no seguits" -#: builtin/add.c:261 +#: builtin/add.c:265 msgid "ignore paths removed in the working tree (same as --no-all)" msgstr "" "ignora els camins eliminats en l'arbre de treball (el mateix que --no-all)" -#: builtin/add.c:263 +#: builtin/add.c:267 msgid "don't add, only refresh the index" msgstr "no afegeixis, només actualitza l'índex" -#: builtin/add.c:264 +#: builtin/add.c:268 msgid "just skip files which cannot be added because of errors" msgstr "només omet els fitxers que no es poden afegir a causa d'errors" -#: builtin/add.c:265 +#: builtin/add.c:269 msgid "check if - even missing - files are ignored in dry run" msgstr "" "comproveu si els fitxers - fins i tot els absents - s'ignoren en marxa en sec" -#: builtin/add.c:287 +#: builtin/add.c:270 builtin/update-index.c:958 +msgid "(+/-)x" +msgstr "(+/-)x" + +#: builtin/add.c:270 builtin/update-index.c:959 +msgid "override the executable bit of the listed files" +msgstr "passa per alt el bit executable dels fitxers llistats" + +#: builtin/add.c:292 #, 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:294 +#: builtin/add.c:300 msgid "adding files failed" msgstr "l'afegiment de fitxers ha fallat" -#: builtin/add.c:330 +#: builtin/add.c:336 msgid "-A and -u are mutually incompatible" msgstr "-A i -u són mutualment incompatibles" -#: builtin/add.c:337 +#: builtin/add.c:343 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "L'opció --ignore-missing només es pot usar junt amb --dry-run" #: builtin/add.c:352 #, c-format +msgid "--chmod param '%s' must be either -x or +x" +msgstr "el paràmetre --chmod '%s' ha de ser o -x o +x" + +#: builtin/add.c:367 +#, c-format msgid "Nothing specified, nothing added.\n" -msgstr "Res especificat, res afegit.\n" +msgstr "No s'ha especificat res, no s'ha afegit res.\n" -#: builtin/add.c:353 +#: builtin/add.c:368 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "Potser volíeu dir 'git add .'?\n" -#: builtin/add.c:358 builtin/check-ignore.c:172 builtin/clean.c:914 -#: builtin/commit.c:337 builtin/mv.c:131 builtin/reset.c:235 builtin/rm.c:298 -#: builtin/submodule--helper.c:35 +#: builtin/add.c:373 builtin/check-ignore.c:172 builtin/checkout.c:279 +#: builtin/checkout.c:473 builtin/clean.c:914 builtin/commit.c:340 +#: builtin/mv.c:131 builtin/reset.c:235 builtin/rm.c:298 +#: builtin/submodule--helper.c:240 msgid "index file corrupt" msgstr "fitxer d'índex malmès" -#: builtin/add.c:439 builtin/apply.c:4659 builtin/mv.c:280 builtin/rm.c:430 +#: builtin/add.c:454 builtin/apply.c:4784 builtin/mv.c:286 builtin/rm.c:431 msgid "Unable to write new index file" msgstr "no s'ha pogut escriure un fitxer d'índex nou" -#: builtin/am.c:256 builtin/commit.c:738 builtin/merge.c:1078 +#: builtin/am.c:257 builtin/commit.c:750 builtin/merge.c:1032 #, c-format msgid "could not read '%s'" msgstr "no s'ha pogut llegir '%s'" -#: builtin/am.c:430 +#: builtin/am.c:426 msgid "could not parse author script" msgstr "no s'ha pogut analitzar l'script d'autor" -#: builtin/am.c:507 +#: builtin/am.c:503 #, c-format msgid "'%s' was deleted by the applypatch-msg hook" -msgstr "s'ha suprimit '%s' per el ganxo applypatch-msg" +msgstr "s'ha suprimit '%s' pel ganxo applypatch-msg" -#: builtin/am.c:548 builtin/notes.c:300 +#: builtin/am.c:544 builtin/notes.c:301 #, c-format msgid "Malformed input line: '%s'." msgstr "Línia d'entrada mal formada: '%s'." -#: builtin/am.c:585 builtin/notes.c:315 +#: builtin/am.c:581 builtin/notes.c:316 #, c-format msgid "Failed to copy notes from '%s' to '%s'" msgstr "S'ha fallat en copiar les notes de '%s' a '%s'" -#: builtin/am.c:611 +#: builtin/am.c:607 msgid "fseek failed" msgstr "fseek ha fallat" -#: builtin/am.c:772 builtin/am.c:860 -#, c-format -msgid "could not open '%s' for reading: %s" -msgstr "no s'ha pogut obrir '%s' per a lectura: %s" - -#: builtin/am.c:779 -#, c-format -msgid "could not open '%s' for writing: %s" -msgstr "no s'ha pogut obrir '%s' per a escriptura: %s" - -#: builtin/am.c:788 +#: builtin/am.c:787 #, c-format msgid "could not parse patch '%s'" msgstr "no s'ha pogut analitzar el pedaç '%s'" -#: builtin/am.c:853 +#: builtin/am.c:852 msgid "Only one StGIT patch series can be applied at once" msgstr "només una sèrie de pedaços StGIT es pot aplicar a la vegada" -#: builtin/am.c:901 +#: builtin/am.c:899 msgid "invalid timestamp" msgstr "marca de temps no vàlida" -#: builtin/am.c:904 builtin/am.c:912 +#: builtin/am.c:902 builtin/am.c:910 msgid "invalid Date line" msgstr "línia Date no vàlida" -#: builtin/am.c:909 +#: builtin/am.c:907 msgid "invalid timezone offset" msgstr "desplaçament de zona de temps no vàlid" @@ -2562,7 +3216,7 @@ msgstr "desplaçament de zona de temps no vàlid" msgid "Patch format detection failed." msgstr "La detecció de format de pedaç ha fallat." -#: builtin/am.c:1001 builtin/clone.c:378 +#: builtin/am.c:1001 builtin/clone.c:380 #, c-format msgid "failed to create directory '%s'" msgstr "s'ha fallat en crear el directori '%s'" @@ -2571,7 +3225,7 @@ msgstr "s'ha fallat en crear el directori '%s'" msgid "Failed to split patches." msgstr "S'ha fallat en dividir els pedaços." -#: builtin/am.c:1137 builtin/commit.c:363 +#: builtin/am.c:1137 builtin/commit.c:366 msgid "unable to write index file" msgstr "no s'ha pogut escriure el fitxer d'índex" @@ -2583,7 +3237,8 @@ msgstr "Quan hàgiu resolt aquest problema, executeu \"%s --continue\"." #: builtin/am.c:1189 #, c-format msgid "If you prefer to skip this patch, run \"%s --skip\" instead." -msgstr "Si preferiu saltar aquest pedaç, executeu \"%s --skip\" en lloc." +msgstr "" +"Si preferiu saltar aquest pedaç, executeu \"%s --skip\" en lloc d'això." #: builtin/am.c:1190 #, c-format @@ -2596,7 +3251,7 @@ msgstr "" msgid "Patch is empty. Was it split wrong?" msgstr "El pedaç és buit. S'ha dividit malament?" -#: builtin/am.c:1402 builtin/log.c:1350 +#: builtin/am.c:1402 builtin/log.c:1543 #, c-format msgid "invalid ident line: %s" msgstr "línia d'identitat no vàlida: %s" @@ -2606,17 +3261,17 @@ msgstr "línia d'identitat no vàlida: %s" msgid "unable to parse commit %s" msgstr "no s'ha pogut analitzar la comissió %s" -#: builtin/am.c:1631 +#: builtin/am.c:1602 msgid "Repository lacks necessary blobs to fall back on 3-way merge." msgstr "" "Al dipòsit li manquen els blobs necessaris per a retrocedir a una fusió de 3 " "vies." -#: builtin/am.c:1633 +#: builtin/am.c:1604 msgid "Using index info to reconstruct a base tree..." -msgstr "Usant la informació d'índex per a reconstruir un arbre base..." +msgstr "S'està usant la informació d'índex per a reconstruir un arbre base..." -#: builtin/am.c:1652 +#: builtin/am.c:1623 msgid "" "Did you hand edit your patch?\n" "It does not apply to blobs recorded in its index." @@ -2624,38 +3279,38 @@ msgstr "" "Heu editat el vostre pedaç a mà?\n" "No s'aplica als blobs recordats en el seu índex." -#: builtin/am.c:1658 +#: builtin/am.c:1629 msgid "Falling back to patching base and 3-way merge..." -msgstr "Retrocedint a apedaçar la base i fusionar de 3 vies..." +msgstr "S'està retrocedint a apedaçar la base i fusionar de 3 vies..." -#: builtin/am.c:1673 +#: builtin/am.c:1654 msgid "Failed to merge in the changes." msgstr "S'ha fallat en fusionar els canvis." -#: builtin/am.c:1697 builtin/merge.c:633 +#: builtin/am.c:1679 builtin/merge.c:628 msgid "git write-tree failed to write a tree" msgstr "git write-tree ha fallat en escriure un arbre" -#: builtin/am.c:1704 +#: builtin/am.c:1686 msgid "applying to an empty history" -msgstr "aplicant a una història buida" +msgstr "s'està aplicant a una història buida" -#: builtin/am.c:1717 builtin/commit.c:1755 builtin/merge.c:830 -#: builtin/merge.c:855 +#: builtin/am.c:1699 builtin/commit.c:1776 builtin/merge.c:798 +#: builtin/merge.c:823 msgid "failed to write commit object" msgstr "s'ha fallat en escriure l'objecte de comissió" -#: builtin/am.c:1749 builtin/am.c:1753 +#: builtin/am.c:1731 builtin/am.c:1735 #, c-format msgid "cannot resume: %s does not exist." msgstr "no es pot reprendre: %s no existeix." -#: builtin/am.c:1769 +#: builtin/am.c:1751 msgid "cannot be interactive without stdin connected to a terminal." msgstr "" "no es pot ser interactiu sense que stdin sigui connectat a un terminal." -#: builtin/am.c:1774 +#: builtin/am.c:1756 msgid "Commit Body is:" msgstr "El cos de la comissió és:" @@ -2663,37 +3318,37 @@ msgstr "El cos de la comissió és:" #. in your translation. The program will only accept English #. input at this point. #. -#: builtin/am.c:1784 +#: builtin/am.c:1766 msgid "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: " msgstr "" "Voleu aplicar-lo? [y]es/[n]o/[e]dita/[v]isualitza el pedaç/[a]ccepta'ls " "tots: " -#: builtin/am.c:1834 +#: builtin/am.c:1816 #, c-format msgid "Dirty index: cannot apply patches (dirty: %s)" msgstr "Índex brut: no es pot aplicar pedaços (bruts: %s)" -#: builtin/am.c:1869 builtin/am.c:1941 +#: builtin/am.c:1853 builtin/am.c:1925 #, c-format msgid "Applying: %.*s" -msgstr "Aplicant: %.*s" +msgstr "S'està aplicant: %.*s" -#: builtin/am.c:1885 +#: builtin/am.c:1869 msgid "No changes -- Patch already applied." msgstr "Sense canvis -- El pedaç ja s'ha aplicat." -#: builtin/am.c:1893 +#: builtin/am.c:1877 #, c-format msgid "Patch failed at %s %.*s" msgstr "El pedaç ha fallat a %s %.*s" -#: builtin/am.c:1899 +#: builtin/am.c:1883 #, c-format msgid "The copy of the patch that failed is found in: %s" msgstr "La còpia del pedaç que ha fallat es troba en: %s" -#: builtin/am.c:1944 +#: builtin/am.c:1928 msgid "" "No changes - did you forget to use 'git add'?\n" "If there is nothing left to stage, chances are that something else\n" @@ -2703,7 +3358,7 @@ msgstr "" "Si no hi ha res a allistar, probablement alguna altra cosa\n" "ja ha introduït els mateixos canvis; potser voleu ometre aquest pedaç." -#: builtin/am.c:1951 +#: builtin/am.c:1935 msgid "" "You still have unmerged paths in your index.\n" "Did you forget to use 'git add'?" @@ -2711,17 +3366,17 @@ msgstr "" "Encara teniu camins sense fusionar en el vostre índex.\n" "Heu oblidat d'usar 'git add'?" -#: builtin/am.c:2059 builtin/am.c:2063 builtin/am.c:2075 builtin/reset.c:308 +#: builtin/am.c:2043 builtin/am.c:2047 builtin/am.c:2059 builtin/reset.c:308 #: builtin/reset.c:316 #, c-format msgid "Could not parse object '%s'." msgstr "No s'ha pogut analitzar l'objecte '%s'." -#: builtin/am.c:2111 +#: builtin/am.c:2095 msgid "failed to clean index" msgstr "s'ha fallat en netejar l'índex" -#: builtin/am.c:2145 +#: builtin/am.c:2129 msgid "" "You seem to have moved HEAD since the last 'am' failure.\n" "Not rewinding to ORIG_HEAD" @@ -2729,154 +3384,156 @@ msgstr "" "Sembla que heu mogut HEAD després de l'última fallada de 'am'.\n" "No rebobinant a ORIG_HEAD" -#: builtin/am.c:2206 +#: builtin/am.c:2192 #, c-format msgid "Invalid value for --patch-format: %s" msgstr "Valor no vàlid per a --patch-format: %s" -#: builtin/am.c:2239 +#: builtin/am.c:2225 msgid "git am [] [(|)...]" msgstr "git am [] [(|)...]" -#: builtin/am.c:2240 +#: builtin/am.c:2226 msgid "git am [] (--continue | --skip | --abort)" msgstr "git am [] (--continue | --skip | --abort)" -#: builtin/am.c:2246 +#: builtin/am.c:2232 msgid "run interactively" msgstr "executa interactivament" -#: builtin/am.c:2248 +#: builtin/am.c:2234 msgid "historical option -- no-op" msgstr "opció històrica -- no-op" -#: builtin/am.c:2250 +#: builtin/am.c:2236 msgid "allow fall back on 3way merging if needed" msgstr "permet retrocedir a una fusió de 3 vies si és necessari" -#: builtin/am.c:2251 builtin/init-db.c:474 builtin/prune-packed.c:57 -#: builtin/repack.c:171 +#: builtin/am.c:2237 builtin/init-db.c:481 builtin/prune-packed.c:57 +#: builtin/repack.c:172 msgid "be quiet" msgstr "calla" -#: builtin/am.c:2253 +#: builtin/am.c:2239 msgid "add a Signed-off-by line to the commit message" msgstr "afegeix una línia Signed-off-by al missatge de comissió" -#: builtin/am.c:2256 +#: builtin/am.c:2242 msgid "recode into utf8 (default)" msgstr "recodifica en utf8 (per defecte)" -#: builtin/am.c:2258 +#: builtin/am.c:2244 msgid "pass -k flag to git-mailinfo" msgstr "passa la bandera -k al git-mailinfo" -#: builtin/am.c:2260 +#: builtin/am.c:2246 msgid "pass -b flag to git-mailinfo" msgstr "passa la bandera -b al git-mailinfo" -#: builtin/am.c:2262 +#: builtin/am.c:2248 msgid "pass -m flag to git-mailinfo" msgstr "passa la bandera -m al git-mailinfo" -#: builtin/am.c:2264 +#: builtin/am.c:2250 msgid "pass --keep-cr flag to git-mailsplit for mbox format" msgstr "passa la bandera --keep-cr al git-mailsplit pel format mbox" -#: builtin/am.c:2267 +#: builtin/am.c:2253 msgid "do not pass --keep-cr flag to git-mailsplit independent of am.keepcr" msgstr "" "no passis la bandera --keep-cr al git-mailsplit independent de am.keepcr" -#: builtin/am.c:2270 +#: builtin/am.c:2256 msgid "strip everything before a scissors line" msgstr "despulla tot abans d'una línia de tissores" -#: builtin/am.c:2271 builtin/apply.c:4544 +#: builtin/am.c:2257 builtin/apply.c:4837 msgid "action" msgstr "acció" -#: builtin/am.c:2272 builtin/am.c:2275 builtin/am.c:2278 builtin/am.c:2281 -#: builtin/am.c:2284 builtin/am.c:2287 builtin/am.c:2290 builtin/am.c:2293 -#: builtin/am.c:2299 +#: builtin/am.c:2258 builtin/am.c:2261 builtin/am.c:2264 builtin/am.c:2267 +#: builtin/am.c:2270 builtin/am.c:2273 builtin/am.c:2276 builtin/am.c:2279 +#: builtin/am.c:2285 msgid "pass it through git-apply" msgstr "passa-ho a través del git-apply" -#: builtin/am.c:2280 builtin/apply.c:4568 +#: builtin/am.c:2266 builtin/apply.c:4861 msgid "root" msgstr "arrel" -#: builtin/am.c:2283 builtin/am.c:2286 builtin/apply.c:4506 -#: builtin/apply.c:4509 builtin/clone.c:86 builtin/fetch.c:95 -#: builtin/pull.c:171 builtin/submodule--helper.c:72 -#: builtin/submodule--helper.c:160 builtin/submodule--helper.c:163 +#: builtin/am.c:2269 builtin/am.c:2272 builtin/apply.c:4799 +#: builtin/apply.c:4802 builtin/clone.c:90 builtin/fetch.c:96 +#: builtin/pull.c:179 builtin/submodule--helper.c:277 +#: builtin/submodule--helper.c:402 builtin/submodule--helper.c:482 +#: builtin/submodule--helper.c:485 builtin/submodule--helper.c:823 +#: builtin/submodule--helper.c:826 msgid "path" msgstr "camí" -#: builtin/am.c:2289 builtin/fmt-merge-msg.c:666 builtin/fmt-merge-msg.c:669 -#: builtin/grep.c:704 builtin/merge.c:198 builtin/pull.c:131 builtin/pull.c:185 -#: builtin/repack.c:178 builtin/repack.c:182 builtin/show-branch.c:645 +#: builtin/am.c:2275 builtin/fmt-merge-msg.c:666 builtin/fmt-merge-msg.c:669 +#: builtin/grep.c:706 builtin/merge.c:200 builtin/pull.c:134 builtin/pull.c:193 +#: builtin/repack.c:181 builtin/repack.c:185 builtin/show-branch.c:645 #: builtin/show-ref.c:175 builtin/tag.c:340 parse-options.h:132 #: parse-options.h:134 parse-options.h:244 msgid "n" msgstr "n" -#: builtin/am.c:2292 builtin/apply.c:4512 +#: builtin/am.c:2278 builtin/apply.c:4805 msgid "num" msgstr "número" -#: builtin/am.c:2295 builtin/for-each-ref.c:37 builtin/replace.c:438 +#: builtin/am.c:2281 builtin/for-each-ref.c:37 builtin/replace.c:438 #: builtin/tag.c:372 msgid "format" msgstr "format" -#: builtin/am.c:2296 +#: builtin/am.c:2282 msgid "format the patch(es) are in" msgstr "el format en el qual estan els pedaços" -#: builtin/am.c:2302 +#: builtin/am.c:2288 msgid "override error message when patch failure occurs" msgstr "" "passa per alt el missatge d'error quan s'ocorre una fallada en apedaçar" -#: builtin/am.c:2304 +#: builtin/am.c:2290 msgid "continue applying patches after resolving a conflict" msgstr "segueix aplicant pedaços després de resoldre un conflicte" -#: builtin/am.c:2307 +#: builtin/am.c:2293 msgid "synonyms for --continue" msgstr "sinònims de --continue" -#: builtin/am.c:2310 +#: builtin/am.c:2296 msgid "skip the current patch" msgstr "salta el pedaç actual" -#: builtin/am.c:2313 +#: builtin/am.c:2299 msgid "restore the original branch and abort the patching operation." msgstr "restaura la branca original i avorta l'operació d'apedaçament." -#: builtin/am.c:2317 +#: builtin/am.c:2303 msgid "lie about committer date" msgstr "menteix sobre la data del comitent" -#: builtin/am.c:2319 +#: builtin/am.c:2305 msgid "use current timestamp for author date" msgstr "usa el marc de temps actual per la data d'autor" -#: builtin/am.c:2321 builtin/commit.c:1593 builtin/merge.c:225 -#: builtin/pull.c:159 builtin/revert.c:92 builtin/tag.c:355 +#: builtin/am.c:2307 builtin/commit.c:1610 builtin/merge.c:229 +#: builtin/pull.c:164 builtin/revert.c:92 builtin/tag.c:355 msgid "key-id" msgstr "ID de clau" -#: builtin/am.c:2322 +#: builtin/am.c:2308 msgid "GPG-sign commits" -msgstr "firma les comissions amb GPG" +msgstr "signa les comissions amb GPG" -#: builtin/am.c:2325 +#: builtin/am.c:2311 msgid "(internal use for git-rebase)" msgstr "(ús intern per al git-rebase)" -#: builtin/am.c:2340 +#: builtin/am.c:2326 msgid "" "The -b/--binary option has been a no-op for long time, and\n" "it will be removed. Please do not use it anymore." @@ -2884,18 +3541,18 @@ msgstr "" "Fa molt que l'opció -b/--binary no ha fet res, i\n" "s'eliminarà. Si us plau, no l'useu més." -#: builtin/am.c:2347 +#: builtin/am.c:2333 msgid "failed to read the index" msgstr "s'ha fallat en llegir l'índex" -#: builtin/am.c:2362 +#: builtin/am.c:2348 #, c-format msgid "previous rebase directory %s still exists but mbox given." msgstr "" "un directori de rebasament anterior %s encara existeix però s'ha donat una " "bústia." -#: builtin/am.c:2386 +#: builtin/am.c:2372 #, c-format msgid "" "Stray %s directory found.\n" @@ -2904,73 +3561,73 @@ msgstr "" "Directori %s extraviat trobat.\n" "Useu \"git am --abort\" per a eliminar-lo." -#: builtin/am.c:2392 +#: builtin/am.c:2378 msgid "Resolve operation not in progress, we are not resuming." msgstr "Operació de resolució no en curs; no reprenem." -#: builtin/apply.c:59 +#: builtin/apply.c:122 msgid "git apply [] [...]" msgstr "git apply [] [...]" -#: builtin/apply.c:111 +#: builtin/apply.c:153 #, c-format msgid "unrecognized whitespace option '%s'" msgstr "opció d'espai en blanc '%s' no reconeguda" -#: builtin/apply.c:126 +#: builtin/apply.c:169 #, c-format msgid "unrecognized whitespace ignore option '%s'" msgstr "opció d'ignoral d'espai en blanc '%s' no reconeguda" -#: builtin/apply.c:818 +#: builtin/apply.c:854 #, c-format msgid "Cannot prepare timestamp regexp %s" msgstr "No es pot preparar l'expressió regular de marca de temps %s" -#: builtin/apply.c:827 +#: builtin/apply.c:863 #, c-format msgid "regexec returned %d for input: %s" msgstr "regexec ha retornat %d per l'entrada: %s" -#: builtin/apply.c:908 +#: builtin/apply.c:947 #, c-format msgid "unable to find filename in patch at line %d" msgstr "no s'ha pogut trobar el nom de fitxer en el pedaç a la línia %d" -#: builtin/apply.c:940 +#: builtin/apply.c:984 #, c-format msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d" msgstr "" "git apply: git-diff dolent - /dev/null esperat, %s rebut en la línia %d" -#: builtin/apply.c:944 +#: builtin/apply.c:989 #, c-format msgid "git apply: bad git-diff - inconsistent new filename on line %d" msgstr "" "git apply: git-diff dolent - nom de fitxer nou inconsistent en la línia %d" -#: builtin/apply.c:945 +#: builtin/apply.c:990 #, c-format msgid "git apply: bad git-diff - inconsistent old filename on line %d" msgstr "" "git apply: git-diff dolent - nom de fitxer antic inconsistent en la línia %d" -#: builtin/apply.c:952 +#: builtin/apply.c:995 #, c-format msgid "git apply: bad git-diff - expected /dev/null on line %d" msgstr "git apply: git-diff dolent - /dev/null esperat en la línia %d" -#: builtin/apply.c:1415 +#: builtin/apply.c:1489 #, c-format msgid "recount: unexpected line: %.*s" msgstr "recompte: línia inesperada: %.*s" -#: builtin/apply.c:1472 +#: builtin/apply.c:1550 #, c-format msgid "patch fragment without header at line %d: %.*s" msgstr "fragment de pedaç sense capçalera a la línia %d: %.*s" -#: builtin/apply.c:1489 +#: builtin/apply.c:1567 #, c-format msgid "" "git diff header lacks filename information when removing %d leading pathname " @@ -2985,77 +3642,77 @@ msgstr[1] "" "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:1655 +#: builtin/apply.c:1743 msgid "new file depends on old contents" msgstr "el fitxer nou depèn dels continguts antics" -#: builtin/apply.c:1657 +#: builtin/apply.c:1745 msgid "deleted file still has contents" msgstr "el fitxer suprimit encara té continguts" -#: builtin/apply.c:1683 +#: builtin/apply.c:1774 #, c-format msgid "corrupt patch at line %d" msgstr "el pedaç és malmès a la línia %d" -#: builtin/apply.c:1719 +#: builtin/apply.c:1810 #, c-format msgid "new file %s depends on old contents" msgstr "el fitxer nou %s depèn dels continguts antics" -#: builtin/apply.c:1721 +#: builtin/apply.c:1812 #, c-format msgid "deleted file %s still has contents" msgstr "el fitxer suprimit %s encara té continguts" -#: builtin/apply.c:1724 +#: builtin/apply.c:1815 #, c-format msgid "** warning: file %s becomes empty but is not deleted" -msgstr "** avís: el fitxer %s queda buit però no se suprimeix" +msgstr "** advertència: el fitxer %s queda buit però no se suprimeix" -#: builtin/apply.c:1870 +#: builtin/apply.c:1962 #, c-format msgid "corrupt binary patch at line %d: %.*s" msgstr "pedaç binari malmès a la línia %d: %.*s" -#: builtin/apply.c:1899 +#: builtin/apply.c:1999 #, c-format msgid "unrecognized binary patch at line %d" msgstr "pedaç binari no reconegut a la línia %d" -#: builtin/apply.c:2050 +#: builtin/apply.c:2154 #, c-format msgid "patch with only garbage at line %d" msgstr "pedaç amb només escombraries a la línia %d" -#: builtin/apply.c:2140 +#: builtin/apply.c:2244 #, c-format msgid "unable to read symlink %s" msgstr "no s'ha pogut llegir l'enllaç simbòlic %s" -#: builtin/apply.c:2144 +#: builtin/apply.c:2248 #, c-format msgid "unable to open or read %s" msgstr "no s'ha pogut obrir o llegir %s" -#: builtin/apply.c:2777 +#: builtin/apply.c:2901 #, c-format msgid "invalid start of line: '%c'" msgstr "inici de línia no vàlid: '%c'" -#: builtin/apply.c:2896 +#: builtin/apply.c:3020 #, c-format msgid "Hunk #%d succeeded at %d (offset %d line)." msgid_plural "Hunk #%d succeeded at %d (offset %d lines)." msgstr[0] "El tros #%d ha tingut èxit a %d (desplaçament %d línia)." msgstr[1] "El tros #%d ha tingut èxit a %d (desplaçament %d línies)." -#: builtin/apply.c:2908 +#: builtin/apply.c:3032 #, c-format msgid "Context reduced to (%ld/%ld) to apply fragment at %d" msgstr "El context s'ha reduït a (%ld/%ld) per a aplicar el fragment a %d" -#: builtin/apply.c:2914 +#: builtin/apply.c:3038 #, c-format msgid "" "while searching for:\n" @@ -3064,336 +3721,341 @@ msgstr "" "tot cercant:\n" "%.*s" -#: builtin/apply.c:2934 +#: builtin/apply.c:3060 #, c-format msgid "missing binary patch data for '%s'" msgstr "manquen les dades de pedaç binari de '%s'" -#: builtin/apply.c:3035 +#: builtin/apply.c:3163 #, c-format msgid "binary patch does not apply to '%s'" msgstr "el pedaç binari no s'aplica a '%s'" -#: builtin/apply.c:3041 +#: builtin/apply.c:3169 #, c-format msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)" msgstr "" "el pedaç binari a '%s' crea un resultat incorrecte (esperant %s, %s rebut)" -#: builtin/apply.c:3062 +#: builtin/apply.c:3190 #, c-format msgid "patch failed: %s:%ld" msgstr "el pedaç ha fallat: %s:%ld" -#: builtin/apply.c:3186 +#: builtin/apply.c:3314 #, c-format msgid "cannot checkout %s" msgstr "no es pot agafar %s" -#: builtin/apply.c:3231 builtin/apply.c:3242 builtin/apply.c:3287 -#, c-format -msgid "read of %s failed" -msgstr "la lectura de %s ha fallat" - -#: builtin/apply.c:3239 +#: builtin/apply.c:3370 #, c-format msgid "reading from '%s' beyond a symbolic link" -msgstr "llegint de '%s' més enllà d'un enllaç simbòlic" +msgstr "s'està llegint de '%s' més enllà d'un enllaç simbòlic" -#: builtin/apply.c:3267 builtin/apply.c:3489 +#: builtin/apply.c:3399 builtin/apply.c:3630 #, c-format msgid "path %s has been renamed/deleted" msgstr "el camí %s s'ha canviat de nom / s'ha suprimit" -#: builtin/apply.c:3348 builtin/apply.c:3503 +#: builtin/apply.c:3482 builtin/apply.c:3644 #, c-format msgid "%s: does not exist in index" msgstr "%s: no existeix en l'índex" -#: builtin/apply.c:3352 builtin/apply.c:3495 builtin/apply.c:3517 +#: builtin/apply.c:3486 builtin/apply.c:3636 builtin/apply.c:3658 #, c-format msgid "%s: %s" msgstr "%s: %s" -#: builtin/apply.c:3357 builtin/apply.c:3511 +#: builtin/apply.c:3491 builtin/apply.c:3652 #, c-format msgid "%s: does not match index" msgstr "%s: no coincideix amb l'índex" -#: builtin/apply.c:3459 +#: builtin/apply.c:3597 msgid "removal patch leaves file contents" msgstr "el pedaç d'eliminació deixa els continguts dels fitxers" -#: builtin/apply.c:3528 +#: builtin/apply.c:3669 #, c-format msgid "%s: wrong type" msgstr "%s: tipus erroni" -#: builtin/apply.c:3530 +#: builtin/apply.c:3671 #, c-format msgid "%s has type %o, expected %o" msgstr "%s és del tipus %o, s'esperava %o" -#: builtin/apply.c:3689 builtin/apply.c:3691 +#: builtin/apply.c:3822 builtin/apply.c:3824 #, c-format msgid "invalid path '%s'" msgstr "camí no vàlid: %s" -#: builtin/apply.c:3746 +#: builtin/apply.c:3879 #, c-format msgid "%s: already exists in index" msgstr "%s: ja existeix en l'índex" -#: builtin/apply.c:3749 +#: builtin/apply.c:3882 #, c-format msgid "%s: already exists in working directory" msgstr "%s: ja existeix en el directori de treball" -#: builtin/apply.c:3769 +#: builtin/apply.c:3902 #, c-format msgid "new mode (%o) of %s does not match old mode (%o)" msgstr "el mode nou (%o) de %s no coincideix amb el mode antic (%o)" -#: builtin/apply.c:3774 +#: builtin/apply.c:3907 #, c-format msgid "new mode (%o) of %s does not match old mode (%o) of %s" msgstr "el mode nou (%o) de %s no coincideix amb el mode antic (%o) de %s" -#: builtin/apply.c:3794 +#: builtin/apply.c:3927 #, c-format msgid "affected file '%s' is beyond a symbolic link" msgstr "el fitxer afectat '%s' és més enllà d'un enllaç simbòlic" -#: builtin/apply.c:3798 +#: builtin/apply.c:3931 #, c-format msgid "%s: patch does not apply" msgstr "%s: el pedaç no s'aplica" -#: builtin/apply.c:3812 +#: builtin/apply.c:3945 #, c-format msgid "Checking patch %s..." -msgstr "Comprovant el pedaç %s..." +msgstr "S'està comprovant el pedaç %s..." -#: builtin/apply.c:3905 builtin/checkout.c:233 builtin/reset.c:135 +#: builtin/apply.c:4038 builtin/checkout.c:233 builtin/reset.c:135 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "make_cache_entry ha fallat per al camí '%s'" -#: builtin/apply.c:4048 +#: builtin/apply.c:4182 #, c-format msgid "unable to remove %s from index" msgstr "no s'ha pogut eliminar %s de l'índex" -#: builtin/apply.c:4077 +#: builtin/apply.c:4215 #, c-format msgid "corrupt patch for submodule %s" msgstr "pedaç malmès per al submòdul %s" -#: builtin/apply.c:4081 +#: builtin/apply.c:4219 #, c-format msgid "unable to stat newly created file '%s'" msgstr "no s'ha pogut fer stat al fitxer novament creat '%s'" -#: builtin/apply.c:4086 +#: builtin/apply.c:4224 #, c-format msgid "unable to create backing store for newly created file %s" msgstr "" "no s'ha pogut crear un magatzem de recolzament per al fitxer novament creat " "%s" -#: builtin/apply.c:4089 builtin/apply.c:4197 +#: builtin/apply.c:4227 builtin/apply.c:4340 #, c-format msgid "unable to add cache entry for %s" msgstr "no s'ha pogut afegir una entrada de cau per a %s" -#: builtin/apply.c:4122 +#: builtin/apply.c:4260 #, c-format msgid "closing file '%s'" -msgstr "tancant el fitxer '%s'" +msgstr "s'està tancant el fitxer '%s'" -#: builtin/apply.c:4171 +#: builtin/apply.c:4313 #, c-format msgid "unable to write file '%s' mode %o" msgstr "no s'ha pogut escriure el fitxer '%s' mode %o" -#: builtin/apply.c:4258 +#: builtin/apply.c:4403 #, c-format msgid "Applied patch %s cleanly." msgstr "El pedaç %s s'ha aplicat netament." -#: builtin/apply.c:4266 +#: builtin/apply.c:4411 msgid "internal error" msgstr "error intern" -#: builtin/apply.c:4269 +#: builtin/apply.c:4414 #, c-format msgid "Applying patch %%s with %d reject..." msgid_plural "Applying patch %%s with %d rejects..." -msgstr[0] "Aplicant el pedaç %%s amb %d rebuig" -msgstr[1] "Aplicant el pedaç %%s amb %d rebuitjos" +msgstr[0] "S'està aplicant el pedaç %%s amb %d rebuig..." +msgstr[1] "S'està aplicant el pedaç %%s amb %d rebuitjos..." -#: builtin/apply.c:4279 +#: builtin/apply.c:4424 #, c-format msgid "truncating .rej filename to %.*s.rej" -msgstr "truncant el nom del fitxer .rej a %.*s.rej" +msgstr "s'està truncant el nom del fitxer .rej a %.*s.rej" + +#: builtin/apply.c:4432 +#, c-format +msgid "cannot open %s: %s" +msgstr "no es pot obrir %s: %s" -#: builtin/apply.c:4300 +#: builtin/apply.c:4445 #, c-format msgid "Hunk #%d applied cleanly." msgstr "El tros #%d s'ha aplicat netament." -#: builtin/apply.c:4303 +#: builtin/apply.c:4448 #, c-format msgid "Rejected hunk #%d." msgstr "S'ha rebutjat el tros #%d." -#: builtin/apply.c:4393 +#: builtin/apply.c:4537 +#, c-format +msgid "Skipped patch '%s'." +msgstr "S'ha saltat el pedaç '%s'." + +#: builtin/apply.c:4545 msgid "unrecognized input" msgstr "entrada no reconeguda" -#: builtin/apply.c:4404 +#: builtin/apply.c:4556 msgid "unable to read index file" msgstr "no es pot llegir el fitxer d'índex" -#: builtin/apply.c:4507 +#: builtin/apply.c:4701 +msgid "--3way outside a repository" +msgstr "--3way fora d'un dipòsit" + +#: builtin/apply.c:4709 +msgid "--index outside a repository" +msgstr "--index fora d'un dipòsit" + +#: builtin/apply.c:4712 +msgid "--cached outside a repository" +msgstr "--cached fora d'un dipòsit" + +#: builtin/apply.c:4745 +#, c-format +msgid "can't open patch '%s'" +msgstr "no es pot obrir el pedaç '%s'" + +#: builtin/apply.c:4760 +#, c-format +msgid "squelched %d whitespace error" +msgid_plural "squelched %d whitespace errors" +msgstr[0] "s'ha omès %d error d'espai en blanc" +msgstr[1] "s'han omès %d errors d'espai en blanc" + +#: builtin/apply.c:4766 builtin/apply.c:4776 +#, c-format +msgid "%d line adds whitespace errors." +msgid_plural "%d lines add whitespace errors." +msgstr[0] "%d línia afegeix errors d'espai en blanc." +msgstr[1] "%d línies afegeixen errors d'espai en blanc." + +#: builtin/apply.c:4800 msgid "don't apply changes matching the given path" msgstr "no apliquis els canvis que coincideixin amb el camí donat" -#: builtin/apply.c:4510 +#: builtin/apply.c:4803 msgid "apply changes matching the given path" msgstr "aplica els canvis que coincideixin amb el camí donat" -#: builtin/apply.c:4513 +#: builtin/apply.c:4806 msgid "remove leading slashes from traditional diff paths" msgstr "" "elimina barres obliqües inicials dels camins de diferència " "tradicionals" -#: builtin/apply.c:4516 +#: builtin/apply.c:4809 msgid "ignore additions made by the patch" msgstr "ignora afegiments fets pel pedaç" -#: builtin/apply.c:4518 +#: builtin/apply.c:4811 msgid "instead of applying the patch, output diffstat for the input" msgstr "" "en lloc d'aplicar el pedaç, emet les estadístiques de diferència de l'entrada" -#: builtin/apply.c:4522 +#: builtin/apply.c:4815 msgid "show number of added and deleted lines in decimal notation" msgstr "mostra el nombre de línies afegides i suprimides en notació decimal" -#: builtin/apply.c:4524 +#: builtin/apply.c:4817 msgid "instead of applying the patch, output a summary for the input" msgstr "en lloc d'aplicar el pedaç, emet un resum de l'entrada" -#: builtin/apply.c:4526 +#: builtin/apply.c:4819 msgid "instead of applying the patch, see if the patch is applicable" msgstr "en lloc d'aplicar el pedaç, veges si el pedaç és aplicable" -#: builtin/apply.c:4528 +#: builtin/apply.c:4821 msgid "make sure the patch is applicable to the current index" msgstr "assegura que el pedaç sigui aplicable a l'índex actual" -#: builtin/apply.c:4530 +#: builtin/apply.c:4823 msgid "apply a patch without touching the working tree" msgstr "aplica un pedaç sense tocar l'arbre de treball" -#: builtin/apply.c:4532 +#: builtin/apply.c:4825 msgid "accept a patch that touches outside the working area" msgstr "accepta un pedaç que toqui fora de l'àrea de treball" -#: builtin/apply.c:4534 +#: builtin/apply.c:4827 msgid "also apply the patch (use with --stat/--summary/--check)" msgstr "aplica el pedaç també (useu amb --stat/--summary/--check)" -#: builtin/apply.c:4536 +#: builtin/apply.c:4829 msgid "attempt three-way merge if a patch does not apply" msgstr "intenta una fusió de tres vies si el pedaç no s'aplica" -#: builtin/apply.c:4538 +#: builtin/apply.c:4831 msgid "build a temporary index based on embedded index information" msgstr "construeix un índex temporal basat en la informació d'índex incrustada" -#: builtin/apply.c:4541 builtin/checkout-index.c:169 builtin/ls-files.c:425 +#: builtin/apply.c:4834 builtin/checkout-index.c:169 builtin/ls-files.c:426 msgid "paths are separated with NUL character" msgstr "els camins se separen amb el caràcter NUL" -#: builtin/apply.c:4543 +#: builtin/apply.c:4836 msgid "ensure at least lines of context match" msgstr "assegura't que almenys línies de context coincideixin" -#: builtin/apply.c:4545 +#: builtin/apply.c:4838 msgid "detect new or modified lines that have whitespace errors" msgstr "" "detecta les línies noves o modificades que tinguin errors d'espai en blanc" -#: builtin/apply.c:4548 builtin/apply.c:4551 +#: builtin/apply.c:4841 builtin/apply.c:4844 msgid "ignore changes in whitespace when finding context" msgstr "ignora els canvis d'espai en blanc en cercar context" -#: builtin/apply.c:4554 +#: builtin/apply.c:4847 msgid "apply the patch in reverse" msgstr "aplica el pedaç al revés" -#: builtin/apply.c:4556 +#: builtin/apply.c:4849 msgid "don't expect at least one line of context" msgstr "no esperis almenys una línia de context" -#: builtin/apply.c:4558 +#: builtin/apply.c:4851 msgid "leave the rejected hunks in corresponding *.rej files" msgstr "deixa els trossos rebutjats en fitxers *.reg coresspondents" -#: builtin/apply.c:4560 +#: builtin/apply.c:4853 msgid "allow overlapping hunks" msgstr "permet trossos encavalcants" -#: builtin/apply.c:4563 +#: builtin/apply.c:4856 msgid "tolerate incorrectly detected missing new-line at the end of file" msgstr "tolera una línia nova incorrectament detectada al final del fitxer" -#: builtin/apply.c:4566 +#: builtin/apply.c:4859 msgid "do not trust the line counts in the hunk headers" msgstr "no confiïs en els recomptes de línia en les capçaleres dels trossos" -#: builtin/apply.c:4569 +#: builtin/apply.c:4862 msgid "prepend to all filenames" msgstr "anteposa a tots els noms de fitxer" -#: builtin/apply.c:4591 -msgid "--3way outside a repository" -msgstr "--3way fora d'un dipòsit" - -#: builtin/apply.c:4599 -msgid "--index outside a repository" -msgstr "--index fora d'un dipòsit" - -#: builtin/apply.c:4602 -msgid "--cached outside a repository" -msgstr "--cached fora d'un dipòsit" - -#: builtin/apply.c:4621 -#, c-format -msgid "can't open patch '%s'" -msgstr "no es pot obrir el pedaç '%s'" - -#: builtin/apply.c:4635 -#, c-format -msgid "squelched %d whitespace error" -msgid_plural "squelched %d whitespace errors" -msgstr[0] "%d error d'espai en blanc omès" -msgstr[1] "%d errors d'espai en blanc omesos" - -#: builtin/apply.c:4641 builtin/apply.c:4651 -#, c-format -msgid "%d line adds whitespace errors." -msgid_plural "%d lines add whitespace errors." -msgstr[0] "%d línia afegeix errors d'espai en blanc." -msgstr[1] "%d línies afegeixen errors d'espai en blanc." - #: builtin/archive.c:17 #, c-format msgid "could not create archive file '%s'" -msgstr "no es pot crear el fitxer d'arxiu '%s'" +msgstr "no s'ha pogut crear el fitxer d'arxiu '%s'" #: builtin/archive.c:20 msgid "could not redirect output" @@ -3445,109 +4107,109 @@ msgstr "git blame [] [] [] [--] fitxer" msgid " are documented in git-rev-list(1)" msgstr "es documenten les en git-rev-list(1)" -#: builtin/blame.c:1782 +#: builtin/blame.c:1781 msgid "Blaming lines" -msgstr "Culpant les línies" +msgstr "S'estan culpant les línies" -#: builtin/blame.c:2530 +#: builtin/blame.c:2536 msgid "Show blame entries as we find them, incrementally" msgstr "Mostra les entrades de culpa mentre les trobem, incrementalment" -#: builtin/blame.c:2531 +#: builtin/blame.c:2537 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "" "Mostra un SHA-1 en blanc per les comissions de frontera (Per defecte: " "desactivat)" -#: builtin/blame.c:2532 +#: builtin/blame.c:2538 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "" "No tractis les comissions d'arrel com a límits (Per defecte: desactivat)" -#: builtin/blame.c:2533 +#: builtin/blame.c:2539 msgid "Show work cost statistics" msgstr "Mostra les estadístiques de preu de treball" -#: builtin/blame.c:2534 +#: builtin/blame.c:2540 msgid "Force progress reporting" msgstr "Força l'informe de progrés" -#: builtin/blame.c:2535 +#: builtin/blame.c:2541 msgid "Show output score for blame entries" msgstr "Mostra la puntuació de sortida de les entrades de culpa" -#: builtin/blame.c:2536 +#: builtin/blame.c:2542 msgid "Show original filename (Default: auto)" msgstr "Mostra el nom de fitxer original (Per defecte: automàtic)" -#: builtin/blame.c:2537 +#: builtin/blame.c:2543 msgid "Show original linenumber (Default: off)" msgstr "Mostra el número de línia original (Per defecte: desactivat)" -#: builtin/blame.c:2538 +#: builtin/blame.c:2544 msgid "Show in a format designed for machine consumption" msgstr "Presenta en un format dissenyat per consumpció per màquina" -#: builtin/blame.c:2539 +#: builtin/blame.c:2545 msgid "Show porcelain format with per-line commit information" msgstr "Mostra el format de porcellana amb informació de comissió per línia" -#: builtin/blame.c:2540 +#: builtin/blame.c:2546 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "" "Usa el mateix mode de sortida que git-annotate (Per defecte: desactivat)" -#: builtin/blame.c:2541 +#: builtin/blame.c:2547 msgid "Show raw timestamp (Default: off)" msgstr "Mostra la marca de temps crua (Per defecte: desactivat)" -#: builtin/blame.c:2542 +#: builtin/blame.c:2548 msgid "Show long commit SHA1 (Default: off)" msgstr "Mostra l'SHA1 de comissió llarg (Per defecte: desactivat)" -#: builtin/blame.c:2543 +#: builtin/blame.c:2549 msgid "Suppress author name and timestamp (Default: off)" msgstr "Omet el nom d'autor i la marca de temps (Per defecte: desactivat)" -#: builtin/blame.c:2544 +#: builtin/blame.c:2550 msgid "Show author email instead of name (Default: off)" msgstr "" "Mostra l'adreça de correu electrònic de l'autor en lloc del nom (Per " "defecte: desactivat)" -#: builtin/blame.c:2545 +#: builtin/blame.c:2551 msgid "Ignore whitespace differences" msgstr "Ignora les diferències d'espai en blanc" -#: builtin/blame.c:2546 +#: builtin/blame.c:2552 msgid "Spend extra cycles to find better match" msgstr "Gasta cicles extres per a trobar una coincidència millor" -#: builtin/blame.c:2547 +#: builtin/blame.c:2553 msgid "Use revisions from instead of calling git-rev-list" msgstr "Usa les revisions de en lloc d'invocar git-rev-list" -#: builtin/blame.c:2548 +#: builtin/blame.c:2554 msgid "Use 's contents as the final image" msgstr "Usa els continguts de com a la imatge final" -#: builtin/blame.c:2549 builtin/blame.c:2550 +#: builtin/blame.c:2555 builtin/blame.c:2556 msgid "score" msgstr "puntuació" -#: builtin/blame.c:2549 +#: builtin/blame.c:2555 msgid "Find line copies within and across files" msgstr "Troba còpies de línia dins i a través dels fitxers" -#: builtin/blame.c:2550 +#: builtin/blame.c:2556 msgid "Find line movements within and across files" msgstr "Troba moviments de línia dins i a través dels fitxers" -#: builtin/blame.c:2551 +#: builtin/blame.c:2557 msgid "n,m" msgstr "n,m" -#: builtin/blame.c:2551 +#: builtin/blame.c:2557 msgid "Process only line range n,m, counting from 1" msgstr "Processa només el rang de línies n,m, comptant des d'1" @@ -3557,56 +4219,56 @@ msgstr "Processa només el rang de línies n,m, comptant des d'1" #. takes 22 places, is the longest among various forms of #. relative timestamps, but your language may need more or #. fewer display columns. -#: builtin/blame.c:2640 +#: builtin/blame.c:2649 msgid "4 years, 11 months ago" msgstr "fa 4 anys i 11 mesos" -#: builtin/branch.c:25 +#: builtin/branch.c:26 msgid "git branch [] [-r | -a] [--merged | --no-merged]" msgstr "git branch [] [-r | -a] [--merged | --no-merged]" -#: builtin/branch.c:26 +#: builtin/branch.c:27 msgid "git branch [] [-l] [-f] []" msgstr "git branch [] [-l] [-f] []" -#: builtin/branch.c:27 +#: builtin/branch.c:28 msgid "git branch [] [-r] (-d | -D) ..." msgstr "git branch [] [-r] (-d | -D) ..." -#: builtin/branch.c:28 +#: builtin/branch.c:29 msgid "git branch [] (-m | -M) [] " msgstr "git branch [] (-m | -M) [] " -#: builtin/branch.c:29 +#: builtin/branch.c:30 msgid "git branch [] [-r | -a] [--points-at]" msgstr "git branch [] [-r | -a] [--points-at]" -#: builtin/branch.c:142 +#: builtin/branch.c:143 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD." msgstr "" -"suprimint la branca '%s' que s'ha fusionat a\n" -" '%s', però encara no s'ha fusionat\n" -" a HEAD." +"s'està suprimint la branca '%s' que s'ha\n" +" fusionat a '%s', però encara no\n" +" s'ha fusionat a HEAD." -#: builtin/branch.c:146 +#: builtin/branch.c:147 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" " '%s', even though it is merged to HEAD." msgstr "" -"no suprimint la branca '%s' que encara no s'ha\n" -" fusionat a '%s', encara que està\n" +"no s'està suprimint la branca '%s' que encara no\n" +" s'ha fusionat a '%s', encara que està\n" " fusionada a HEAD." -#: builtin/branch.c:160 +#: builtin/branch.c:161 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "No s'ha pogut trobar l'objecte de comissió de '%s'" -#: builtin/branch.c:164 +#: builtin/branch.c:165 #, c-format msgid "" "The branch '%s' is not fully merged.\n" @@ -3615,340 +4277,368 @@ msgstr "" "La branca '%s' no està totalment fusionada.\n" "Si esteu segur que la voleu suprimir, executeu 'git branch -D %s'." -#: builtin/branch.c:177 +#: builtin/branch.c:178 msgid "Update of config-file failed" msgstr "L'actualització del fitxer de configuració ha fallat" -#: builtin/branch.c:205 +#: builtin/branch.c:206 msgid "cannot use -a with -d" msgstr "no es pot usar -a amb -d" -#: builtin/branch.c:211 +#: builtin/branch.c:212 msgid "Couldn't look up commit object for HEAD" msgstr "No s'ha pogut trobar l'objecte de comissió de HEAD" -#: builtin/branch.c:219 +#: builtin/branch.c:226 #, c-format -msgid "Cannot delete the branch '%s' which you are currently on." -msgstr "No es pot suprimir la branca '%s', en la qual sou actualment." +msgid "Cannot delete branch '%s' checked out at '%s'" +msgstr "No es pot suprimir la branca '%s' agafada a '%s'" -#: builtin/branch.c:235 +#: builtin/branch.c:241 #, c-format msgid "remote-tracking branch '%s' not found." msgstr "no s'ha trobat la branca amb seguiment remot '%s'." -#: builtin/branch.c:236 +#: builtin/branch.c:242 #, c-format msgid "branch '%s' not found." msgstr "no s'ha trobat la branca '%s'." -#: builtin/branch.c:251 +#: builtin/branch.c:257 #, c-format msgid "Error deleting remote-tracking branch '%s'" msgstr "Error en suprimir la branca amb seguiment remot '%s'" -#: builtin/branch.c:252 +#: builtin/branch.c:258 #, c-format msgid "Error deleting branch '%s'" msgstr "Error en suprimir la branca '%s'" -#: builtin/branch.c:259 +#: builtin/branch.c:265 #, c-format msgid "Deleted remote-tracking branch %s (was %s).\n" msgstr "S'ha suprimit la branca amb seguiment remot %s (era %s).\n" -#: builtin/branch.c:260 +#: builtin/branch.c:266 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "S'ha suprimit la branca %s (era %s).\n" -#: builtin/branch.c:303 +#: builtin/branch.c:312 #, c-format msgid "[%s: gone]" msgstr "[%s: no hi és]" -#: builtin/branch.c:308 +#: builtin/branch.c:317 #, c-format msgid "[%s]" msgstr "[%s]" -#: builtin/branch.c:313 +#: builtin/branch.c:322 #, c-format msgid "[%s: behind %d]" msgstr "[%s: darrere per %d]" -#: builtin/branch.c:315 +#: builtin/branch.c:324 #, c-format msgid "[behind %d]" msgstr "[darrere de %d]" -#: builtin/branch.c:319 +#: builtin/branch.c:328 #, c-format msgid "[%s: ahead %d]" msgstr "[%s: davant per %d]" -#: builtin/branch.c:321 +#: builtin/branch.c:330 #, c-format msgid "[ahead %d]" msgstr "[davant de %d]" -#: builtin/branch.c:324 +#: builtin/branch.c:333 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "[%s: davant per %d, darrere per %d]" -#: builtin/branch.c:327 +#: builtin/branch.c:336 #, c-format msgid "[ahead %d, behind %d]" msgstr "[davant %d, darrere %d]" -#: builtin/branch.c:340 +#: builtin/branch.c:349 msgid " **** invalid ref ****" msgstr " **** referència no vàlida ****" -#: builtin/branch.c:366 +#: builtin/branch.c:375 #, c-format msgid "(no branch, rebasing %s)" -msgstr "(cap branca, rebasant %s)" +msgstr "(cap branca, s'està rebasant %s)" -#: builtin/branch.c:369 +#: builtin/branch.c:378 #, c-format msgid "(no branch, bisect started on %s)" msgstr "(cap branca, bisecció començada en %s)" -#: builtin/branch.c:375 +#. TRANSLATORS: make sure this matches +#. "HEAD detached at " in wt-status.c +#: builtin/branch.c:384 #, c-format msgid "(HEAD detached at %s)" msgstr "(HEAD separat a %s)" -#: builtin/branch.c:378 +#. TRANSLATORS: make sure this matches +#. "HEAD detached from " in wt-status.c +#: builtin/branch.c:389 #, c-format msgid "(HEAD detached from %s)" msgstr "(HEAD separat de %s)" -#: builtin/branch.c:382 +#: builtin/branch.c:393 msgid "(no branch)" msgstr "(cap branca)" -#: builtin/branch.c:524 +#: builtin/branch.c:544 +#, c-format +msgid "Branch %s is being rebased at %s" +msgstr "La branca %s s'està rebasant a %s" + +#: builtin/branch.c:548 +#, c-format +msgid "Branch %s is being bisected at %s" +msgstr "La branca %s s'està bisecant a %s" + +#: builtin/branch.c:563 msgid "cannot rename the current branch while not on any." msgstr "no es pot canviar el nom de la branca actual mentre no s'és a cap." -#: builtin/branch.c:534 +#: builtin/branch.c:573 #, c-format msgid "Invalid branch name: '%s'" msgstr "Nom de branca no vàlid: '%s'" -#: builtin/branch.c:549 +#: builtin/branch.c:590 msgid "Branch rename failed" msgstr "El canvi de nom de branca ha fallat" -#: builtin/branch.c:553 +#: builtin/branch.c:594 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "S'ha canviat el nom de la branca malanomenada '%s'" -#: builtin/branch.c:557 +#: builtin/branch.c:597 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "S'ha canviat el nom de la branca a %s, però HEAD no està actualitzat!" -#: builtin/branch.c:564 +#: builtin/branch.c:604 msgid "Branch is renamed, but update of config-file failed" msgstr "" "La branca està canviada de nom, però l'actualització del fitxer de " "configuració ha fallat" -#: builtin/branch.c:586 +#: builtin/branch.c:620 #, c-format -msgid "could not write branch description template: %s" -msgstr "no s'ha pogut escriure la plantilla de descripció de branca: %s" +msgid "" +"Please edit the description for the branch\n" +" %s\n" +"Lines starting with '%c' will be stripped.\n" +msgstr "" +"Si us plau, editeu la descripció de la branca\n" +" %s\n" +"Es despullaran les línies que comencin amb '%c'.\n" -#: builtin/branch.c:615 +#: builtin/branch.c:651 msgid "Generic options" msgstr "Opcions genèriques" -#: builtin/branch.c:617 +#: builtin/branch.c:653 msgid "show hash and subject, give twice for upstream branch" msgstr "mostra el hash i l'assumpte, doneu dues vegades per la branca font" -#: builtin/branch.c:618 +#: builtin/branch.c:654 msgid "suppress informational messages" msgstr "omet els missatges informatius" -#: builtin/branch.c:619 +#: builtin/branch.c:655 msgid "set up tracking mode (see git-pull(1))" msgstr "configura el mode de seguiment (vegeu git-pull(1))" -#: builtin/branch.c:621 +#: builtin/branch.c:657 msgid "change upstream info" msgstr "canvia la informació de font" -#: builtin/branch.c:625 +#: builtin/branch.c:659 +msgid "upstream" +msgstr "font" + +#: builtin/branch.c:659 +msgid "change the upstream info" +msgstr "canvia la informació de font" + +#: builtin/branch.c:661 msgid "use colored output" msgstr "usa sortida colorada" -#: builtin/branch.c:626 +#: builtin/branch.c:662 msgid "act on remote-tracking branches" msgstr "actua en branques amb seguiment remot" -#: builtin/branch.c:628 builtin/branch.c:629 +#: builtin/branch.c:664 builtin/branch.c:665 msgid "print only branches that contain the commit" msgstr "imprimeix només les branques que continguin la comissió" -#: builtin/branch.c:632 +#: builtin/branch.c:668 msgid "Specific git-branch actions:" msgstr "Accions de git-branch específiques:" -#: builtin/branch.c:633 +#: builtin/branch.c:669 msgid "list both remote-tracking and local branches" msgstr "llista les branques amb seguiment remot i les locals" -#: builtin/branch.c:635 +#: builtin/branch.c:671 msgid "delete fully merged branch" msgstr "suprimeix la branca si està completament fusionada" -#: builtin/branch.c:636 +#: builtin/branch.c:672 msgid "delete branch (even if not merged)" msgstr "suprimeix la branca (encara que no estigui fusionada)" -#: builtin/branch.c:637 +#: builtin/branch.c:673 msgid "move/rename a branch and its reflog" msgstr "mou/canvia de nom una branca i el seu registre de referència" -#: builtin/branch.c:638 +#: builtin/branch.c:674 msgid "move/rename a branch, even if target exists" msgstr "mou/canvia de nom una branca, encara que el destí existeixi" -#: builtin/branch.c:639 +#: builtin/branch.c:675 msgid "list branch names" msgstr "llista els noms de branca" -#: builtin/branch.c:640 +#: builtin/branch.c:676 msgid "create the branch's reflog" msgstr "crea el registre de referència de la branca" -#: builtin/branch.c:642 +#: builtin/branch.c:678 msgid "edit the description for the branch" msgstr "edita la descripció de la branca" -#: builtin/branch.c:643 +#: builtin/branch.c:679 msgid "force creation, move/rename, deletion" msgstr "força creació, moviment/canvi de nom, supressió" -#: builtin/branch.c:644 +#: builtin/branch.c:680 msgid "print only branches that are merged" msgstr "imprimeix només les branques que s'han fusionat" -#: builtin/branch.c:645 +#: builtin/branch.c:681 msgid "print only branches that are not merged" msgstr "imprimeix només les branques que no s'han fusionat" -#: builtin/branch.c:646 +#: builtin/branch.c:682 msgid "list branches in columns" msgstr "llista les branques en columnes" -#: builtin/branch.c:647 builtin/for-each-ref.c:38 builtin/tag.c:366 +#: builtin/branch.c:683 builtin/for-each-ref.c:38 builtin/tag.c:366 msgid "key" msgstr "clau" -#: builtin/branch.c:648 builtin/for-each-ref.c:39 builtin/tag.c:367 +#: builtin/branch.c:684 builtin/for-each-ref.c:39 builtin/tag.c:367 msgid "field name to sort on" msgstr "nom del camp en el qual ordenar" -#: builtin/branch.c:650 builtin/for-each-ref.c:41 builtin/notes.c:401 -#: builtin/notes.c:404 builtin/notes.c:564 builtin/notes.c:567 +#: builtin/branch.c:686 builtin/for-each-ref.c:41 builtin/notes.c:402 +#: builtin/notes.c:405 builtin/notes.c:565 builtin/notes.c:568 #: builtin/tag.c:369 msgid "object" msgstr "objecte" -#: builtin/branch.c:651 +#: builtin/branch.c:687 msgid "print only branches of the object" msgstr "imprimeix només les branques de l'objecte" -#: builtin/branch.c:669 +#: builtin/branch.c:705 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:673 builtin/clone.c:705 +#: builtin/branch.c:709 builtin/clone.c:707 msgid "HEAD not found below refs/heads!" msgstr "HEAD no trobat sota refs/heads!" -#: builtin/branch.c:693 +#: builtin/branch.c:729 msgid "--column and --verbose are incompatible" msgstr "--column i --verbose són incompatibles" -#: builtin/branch.c:704 builtin/branch.c:746 +#: builtin/branch.c:740 builtin/branch.c:782 msgid "branch name required" msgstr "cal el nom de branca" -#: builtin/branch.c:722 +#: builtin/branch.c:758 msgid "Cannot give description to detached HEAD" msgstr "No es pot donar descripció a un HEAD separat" -#: builtin/branch.c:727 +#: builtin/branch.c:763 msgid "cannot edit description of more than one branch" msgstr "no es pot editar la descripció de més d'una branca" -#: builtin/branch.c:734 +#: builtin/branch.c:770 #, c-format msgid "No commit on branch '%s' yet." -msgstr "Encara no hi ha comissió en la branca '%s'." +msgstr "Encara no hi ha cap comissió en la branca '%s'." -#: builtin/branch.c:737 +#: builtin/branch.c:773 #, c-format msgid "No branch named '%s'." msgstr "No hi ha branca amb nom '%s'." -#: builtin/branch.c:752 +#: builtin/branch.c:788 msgid "too many branches for a rename operation" msgstr "hi ha massa branques per a una operació de canvi de nom" -#: builtin/branch.c:757 +#: builtin/branch.c:793 msgid "too many branches to set new upstream" msgstr "hi ha massa branques per a establir una nova font" -#: builtin/branch.c:761 +#: builtin/branch.c:797 #, 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 branca." -#: builtin/branch.c:764 builtin/branch.c:786 builtin/branch.c:807 +#: builtin/branch.c:800 builtin/branch.c:822 builtin/branch.c:843 #, c-format msgid "no such branch '%s'" msgstr "no hi ha tal branca '%s'" -#: builtin/branch.c:768 +#: builtin/branch.c:804 #, c-format msgid "branch '%s' does not exist" msgstr "la branca '%s' no existeix" -#: builtin/branch.c:780 +#: builtin/branch.c:816 msgid "too many branches to unset upstream" msgstr "hi ha massa branques per a desestablir la font" -#: builtin/branch.c:784 +#: builtin/branch.c:820 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 perquè no assenyala cap branca." -#: builtin/branch.c:790 +#: builtin/branch.c:826 #, c-format msgid "Branch '%s' has no upstream information" msgstr "La branca '%s' no té informació de font" -#: builtin/branch.c:804 +#: builtin/branch.c:840 msgid "it does not make sense to create 'HEAD' manually" msgstr "no té sentit crear 'HEAD' manualment" -#: builtin/branch.c:810 +#: builtin/branch.c:846 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 branca" -#: builtin/branch.c:813 +#: builtin/branch.c:849 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" @@ -3957,7 +4647,7 @@ msgstr "" "La bandera --set-upstream està desaprovada i s'eliminarà. Considereu usar --" "track o --set-upstream-to\n" -#: builtin/branch.c:830 +#: builtin/branch.c:866 #, c-format msgid "" "\n" @@ -3968,16 +4658,6 @@ msgstr "" "Si volíeu fer '%s' seguir '%s', feu això:\n" "\n" -#: builtin/branch.c:831 -#, c-format -msgid " git branch -d %s\n" -msgstr " git branch -d %s\n" - -#: builtin/branch.c:832 -#, c-format -msgid " git branch --set-upstream-to %s\n" -msgstr " git branch --set-upstream-to %s\n" - #: builtin/bundle.c:51 #, c-format msgid "%s is okay\n" @@ -3991,7 +4671,7 @@ msgstr "Cal un dipòsit per a fer un farcell." msgid "Need a repository to unbundle." msgstr "Cal un dipòsit per a desfer un farcell." -#: builtin/cat-file.c:428 +#: builtin/cat-file.c:443 msgid "" "git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|" "|--textconv) " @@ -3999,57 +4679,57 @@ msgstr "" "git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|" "|--textconv) " -#: builtin/cat-file.c:429 +#: builtin/cat-file.c:444 msgid "git cat-file (--batch | --batch-check) [--follow-symlinks]" msgstr "git cat-file (--batch | --batch-check) [--follow-symlinks]" -#: builtin/cat-file.c:466 +#: builtin/cat-file.c:481 msgid " can be one of: blob, tree, commit, tag" msgstr " pot ser un de: blob, tree, commit, tag" -#: builtin/cat-file.c:467 +#: builtin/cat-file.c:482 msgid "show object type" msgstr "mostra el tipus de l'objecte" -#: builtin/cat-file.c:468 +#: builtin/cat-file.c:483 msgid "show object size" msgstr "mostra la mida de l'objecte" -#: builtin/cat-file.c:470 +#: builtin/cat-file.c:485 msgid "exit with zero when there's no error" msgstr "surt amb zero quan no hi ha error" -#: builtin/cat-file.c:471 +#: builtin/cat-file.c:486 msgid "pretty-print object's content" msgstr "imprimeix bellament el contingut de l'objecte" -#: builtin/cat-file.c:473 +#: builtin/cat-file.c:488 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:475 +#: builtin/cat-file.c:490 msgid "allow -s and -t to work with broken/corrupt objects" msgstr "permet que -s i -t funcionin amb objectes trencats/malmesos" -#: builtin/cat-file.c:476 +#: builtin/cat-file.c:491 msgid "buffer --batch output" msgstr "posa la sortida de --batch en memòria intermèdia" -#: builtin/cat-file.c:478 +#: builtin/cat-file.c:493 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:481 +#: builtin/cat-file.c:496 msgid "show info about objects fed from the standard input" msgstr "mostra informació sobre els objectes rebuts de l'entrada estàndard" -#: builtin/cat-file.c:484 +#: builtin/cat-file.c:499 msgid "follow in-tree symlinks (used with --batch or --batch-check)" msgstr "" "segueix els enllaços simbòlics en l'arbre (s'usa amb --batch o --batch-check)" -#: builtin/cat-file.c:486 +#: builtin/cat-file.c:501 msgid "show all objects with --batch or --batch-check" msgstr "mostra tots els objectes amb --batch o --batch-check" @@ -4077,7 +4757,7 @@ msgstr "llegeix els noms de fitxer d'stdin" msgid "terminate input and output records by a NUL character" msgstr "acaba els registres d'entrada i de sortida amb un caràcter NUL" -#: builtin/check-ignore.c:18 builtin/checkout.c:1136 builtin/gc.c:325 +#: builtin/check-ignore.c:18 builtin/checkout.c:1138 builtin/gc.c:325 msgid "suppress progress reporting" msgstr "omet el reportatge de progrés" @@ -4148,7 +4828,7 @@ msgstr "força la sobreescriptura de fitxers existents" #: builtin/checkout-index.c:163 msgid "no warning for existing files and files not in index" -msgstr "cap avís per a fitxers existents i fitxers no en l'índex" +msgstr "cap advertència per a fitxers existents i fitxers no en l'índex" #: builtin/checkout-index.c:165 msgid "don't checkout new files" @@ -4167,8 +4847,9 @@ msgid "write the content to temporary files" msgstr "escriu el contingut a fitxers temporals" #: builtin/checkout-index.c:174 builtin/column.c:30 -#: builtin/submodule--helper.c:166 builtin/submodule--helper.c:169 -#: builtin/submodule--helper.c:172 builtin/submodule--helper.c:175 +#: builtin/submodule--helper.c:488 builtin/submodule--helper.c:491 +#: builtin/submodule--helper.c:494 builtin/submodule--helper.c:497 +#: builtin/submodule--helper.c:830 builtin/worktree.c:469 msgid "string" msgstr "cadena" @@ -4218,80 +4899,76 @@ msgstr "camí '%s': no es pot fusionar" msgid "Unable to add merge result for '%s'" msgstr "no s'ha pogut afegir el resultat de fusió per a '%s'" -#: builtin/checkout.c:251 builtin/checkout.c:254 builtin/checkout.c:257 -#: builtin/checkout.c:260 +#: builtin/checkout.c:250 builtin/checkout.c:253 builtin/checkout.c:256 +#: builtin/checkout.c:259 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "'%s' no es pot usar amb actualització de camins" -#: builtin/checkout.c:263 builtin/checkout.c:266 +#: builtin/checkout.c:262 builtin/checkout.c:265 #, c-format msgid "'%s' cannot be used with %s" msgstr "'%s' no es pot usar amb %s" -#: builtin/checkout.c:269 +#: builtin/checkout.c:268 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "" "No es pot actualitzar els camins i canviar a la branca '%s' a la vegada." -#: builtin/checkout.c:280 builtin/checkout.c:474 -msgid "corrupt index file" -msgstr "fitxer d'índex malmès" - -#: builtin/checkout.c:340 builtin/checkout.c:347 +#: builtin/checkout.c:339 builtin/checkout.c:346 #, c-format msgid "path '%s' is unmerged" msgstr "el camí '%s' està sense fusionar" -#: builtin/checkout.c:496 +#: builtin/checkout.c:495 msgid "you need to resolve your current index first" -msgstr "heu de resoldre el vostre índex actual primer" +msgstr "heu de primer resoldre el vostre índex actual" -#: builtin/checkout.c:623 +#: builtin/checkout.c:625 #, c-format msgid "Can not do reflog for '%s': %s\n" msgstr "No es pot fer reflog per a '%s': %s\n" -#: builtin/checkout.c:661 +#: builtin/checkout.c:664 msgid "HEAD is now at" msgstr "HEAD ara és a" -#: builtin/checkout.c:665 builtin/clone.c:659 +#: builtin/checkout.c:668 builtin/clone.c:661 msgid "unable to update HEAD" msgstr "no s'ha pogut actualitzar HEAD" -#: builtin/checkout.c:669 +#: builtin/checkout.c:672 #, c-format msgid "Reset branch '%s'\n" msgstr "Restableix la branca '%s'\n" -#: builtin/checkout.c:672 +#: builtin/checkout.c:675 #, c-format msgid "Already on '%s'\n" msgstr "Ja en '%s'\n" -#: builtin/checkout.c:676 +#: builtin/checkout.c:679 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "S'ha agafat i restablert la branca '%s'\n" -#: builtin/checkout.c:678 builtin/checkout.c:1068 +#: builtin/checkout.c:681 builtin/checkout.c:1070 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "S'ha agafat la branca nova '%s'\n" -#: builtin/checkout.c:680 +#: builtin/checkout.c:683 #, c-format msgid "Switched to branch '%s'\n" msgstr "S'ha agafat la branca '%s'\n" -#: builtin/checkout.c:732 +#: builtin/checkout.c:734 #, c-format msgid " ... and %d more.\n" msgstr " ... i %d més.\n" -#: builtin/checkout.c:738 +#: builtin/checkout.c:740 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -4304,17 +4981,17 @@ msgid_plural "" "\n" "%s\n" msgstr[0] "" -"Avís: esteu deixant enrere %d comissió, no connectada a\n" -"cap de les vostres branques:\n" +"Advertència: esteu deixant enrere %d comissió, no\n" +"connectada a cap de les vostres branques:\n" "\n" "%s\n" msgstr[1] "" -"Avís: esteu deixant enrere %d comissions, no connectades a\n" -"cap de les vostres branques:\n" +"Advertència: esteu deixant enrere %d comissions, no\n" +"connectades a cap de les vostres branques:\n" "\n" "%s\n" -#: builtin/checkout.c:757 +#: builtin/checkout.c:759 #, c-format msgid "" "If you want to keep it by creating a new branch, this may be a good time\n" @@ -4341,150 +5018,150 @@ msgstr[1] "" " git branch %s\n" "\n" -#: builtin/checkout.c:793 +#: builtin/checkout.c:795 msgid "internal error in revision walk" msgstr "error intern en el passeig per revisions" -#: builtin/checkout.c:797 +#: builtin/checkout.c:799 msgid "Previous HEAD position was" msgstr "La posició de HEAD anterior era" -#: builtin/checkout.c:824 builtin/checkout.c:1063 +#: builtin/checkout.c:826 builtin/checkout.c:1065 msgid "You are on a branch yet to be born" msgstr "Sou en una branca que encara ha de nàixer" -#: builtin/checkout.c:969 +#: builtin/checkout.c:971 #, c-format msgid "only one reference expected, %d given." -msgstr "només una referència esperada, %d donades." +msgstr "s'esperava només una referència, s'han donat %d." -#: builtin/checkout.c:1009 builtin/worktree.c:211 +#: builtin/checkout.c:1011 builtin/worktree.c:214 #, c-format msgid "invalid reference: %s" msgstr "referència no vàlida: %s" -#: builtin/checkout.c:1038 +#: builtin/checkout.c:1040 #, c-format msgid "reference is not a tree: %s" msgstr "la referència no és un arbre: %s" -#: builtin/checkout.c:1077 +#: builtin/checkout.c:1079 msgid "paths cannot be used with switching branches" msgstr "els camins no es poden usar amb canvi de branca" -#: builtin/checkout.c:1080 builtin/checkout.c:1084 +#: builtin/checkout.c:1082 builtin/checkout.c:1086 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "'%s' no es pot usar amb canvi de branca" -#: builtin/checkout.c:1088 builtin/checkout.c:1091 builtin/checkout.c:1096 -#: builtin/checkout.c:1099 +#: builtin/checkout.c:1090 builtin/checkout.c:1093 builtin/checkout.c:1098 +#: builtin/checkout.c:1101 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "'%s' no es pot usar amb '%s'" -#: builtin/checkout.c:1104 +#: builtin/checkout.c:1106 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "No es pot canviar la branca a la no comissió '%s'" -#: builtin/checkout.c:1137 builtin/checkout.c:1139 builtin/clone.c:84 -#: builtin/remote.c:165 builtin/remote.c:167 builtin/worktree.c:318 -#: builtin/worktree.c:320 +#: builtin/checkout.c:1139 builtin/checkout.c:1141 builtin/clone.c:88 +#: builtin/remote.c:165 builtin/remote.c:167 builtin/worktree.c:324 +#: builtin/worktree.c:326 msgid "branch" msgstr "branca" -#: builtin/checkout.c:1138 +#: builtin/checkout.c:1140 msgid "create and checkout a new branch" msgstr "crea i agafa una branca nova" -#: builtin/checkout.c:1140 +#: builtin/checkout.c:1142 msgid "create/reset and checkout a branch" msgstr "crea/restableix i agafa una branca" -#: builtin/checkout.c:1141 +#: builtin/checkout.c:1143 msgid "create reflog for new branch" msgstr "crea un registre de referència per a la branca nova" -#: builtin/checkout.c:1142 -msgid "detach the HEAD at named commit" -msgstr "separa el HEAD a la comissió anomenada" +#: builtin/checkout.c:1144 builtin/worktree.c:328 +msgid "detach HEAD at named commit" +msgstr "separa HEAD a la comissió anomenada" -#: builtin/checkout.c:1143 +#: builtin/checkout.c:1145 msgid "set upstream info for new branch" msgstr "estableix la informació de font de la branca nova" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1147 msgid "new-branch" msgstr "branca-nova" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1147 msgid "new unparented branch" msgstr "branca òrfena nova" -#: builtin/checkout.c:1146 +#: builtin/checkout.c:1148 msgid "checkout our version for unmerged files" msgstr "agafa la versió nostra dels fitxers sense fusionar" -#: builtin/checkout.c:1148 +#: builtin/checkout.c:1150 msgid "checkout their version for unmerged files" msgstr "agafa la versió seva dels fitxers sense fusionar" -#: builtin/checkout.c:1150 +#: builtin/checkout.c:1152 msgid "force checkout (throw away local modifications)" msgstr "agafa a la força (descarta qualsevulla modificació local)" -#: builtin/checkout.c:1151 +#: builtin/checkout.c:1153 msgid "perform a 3-way merge with the new branch" msgstr "realitza una fusió de 3 vies amb la branca nova" -#: builtin/checkout.c:1152 builtin/merge.c:227 +#: builtin/checkout.c:1154 builtin/merge.c:231 msgid "update ignored files (default)" msgstr "actualitza els fitxers ignorats (per defecte)" -#: builtin/checkout.c:1153 builtin/log.c:1269 parse-options.h:250 +#: builtin/checkout.c:1155 builtin/log.c:1459 parse-options.h:250 msgid "style" msgstr "estil" -#: builtin/checkout.c:1154 +#: builtin/checkout.c:1156 msgid "conflict style (merge or diff3)" msgstr "estil de conflicte (fusió o diff3)" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1159 msgid "do not limit pathspecs to sparse entries only" msgstr "no limitis les especificacions de camí només a entrades disperses" -#: builtin/checkout.c:1159 +#: builtin/checkout.c:1161 msgid "second guess 'git checkout '" msgstr "dubta 'git checkout '" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1163 msgid "do not check if another worktree is holding the given ref" msgstr "no comprovis si altre arbre de treball té la referència donada" -#: builtin/checkout.c:1162 builtin/clone.c:58 builtin/fetch.c:116 -#: builtin/merge.c:224 builtin/pull.c:113 builtin/push.c:526 +#: builtin/checkout.c:1164 builtin/clone.c:60 builtin/fetch.c:117 +#: builtin/merge.c:228 builtin/pull.c:116 builtin/push.c:536 #: builtin/send-pack.c:168 msgid "force progress reporting" msgstr "força l'informe de progrés" -#: builtin/checkout.c:1193 +#: builtin/checkout.c:1195 msgid "-b, -B and --orphan are mutually exclusive" msgstr "-b, -B i --orphan són mutualment exclusius" -#: builtin/checkout.c:1210 +#: builtin/checkout.c:1212 msgid "--track needs a branch name" msgstr "--track necessita un nom de branca" -#: builtin/checkout.c:1215 +#: builtin/checkout.c:1217 msgid "Missing branch name; try -b" msgstr "Manca el nom de branca; proveu -b" -#: builtin/checkout.c:1251 +#: builtin/checkout.c:1253 msgid "invalid path specification" msgstr "especificació de camí no vàlida" -#: builtin/checkout.c:1258 +#: builtin/checkout.c:1260 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" @@ -4493,12 +5170,12 @@ msgstr "" "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:1263 +#: builtin/checkout.c:1265 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "git checkout: --detach no accepta un paràmetre de camí '%s'" -#: builtin/checkout.c:1267 +#: builtin/checkout.c:1269 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -4515,7 +5192,7 @@ msgstr "" #: builtin/clean.c:29 #, c-format msgid "Removing %s\n" -msgstr "Eliminant %s\n" +msgstr "S'està eliminant %s\n" #: builtin/clean.c:30 #, c-format @@ -4525,7 +5202,7 @@ msgstr "Eliminaria %s\n" #: builtin/clean.c:31 #, c-format msgid "Skipping repository %s\n" -msgstr "Saltant el dipòsit %s\n" +msgstr "S'està saltant el dipòsit %s\n" #: builtin/clean.c:32 #, c-format @@ -4582,7 +5259,7 @@ msgstr "Introduïu els patrons a ignorar>> " #: builtin/clean.c:690 #, c-format msgid "WARNING: Cannot find items matched by: %s" -msgstr "AVÍS: No es pot trobar ítems que coincideixin amb: %s" +msgstr "ADVERTÈNCIA: No es pot trobar ítems que coincideixin amb: %s" #: builtin/clean.c:711 msgid "Select items to delete" @@ -4632,7 +5309,7 @@ msgstr[1] "Eliminaria els ítems següents:" #: builtin/clean.c:838 msgid "No more files to clean, exiting." -msgstr "No hi ha més fitxers a netejar; sortint." +msgstr "No hi ha més fitxers a netejar; s'està sortint." #: builtin/clean.c:869 msgid "do not print names of files removed" @@ -4650,8 +5327,8 @@ msgstr "neteja interactiva" msgid "remove whole directories" msgstr "elimina directoris sencers" -#: builtin/clean.c:875 builtin/describe.c:407 builtin/grep.c:722 -#: builtin/ls-files.c:456 builtin/name-rev.c:307 builtin/show-ref.c:182 +#: builtin/clean.c:875 builtin/describe.c:407 builtin/grep.c:724 +#: builtin/ls-files.c:457 builtin/name-rev.c:314 builtin/show-ref.c:182 msgid "pattern" msgstr "patró" @@ -4691,103 +5368,112 @@ msgstr "" msgid "git clone [] [--] []" msgstr "git clone [] [--] []" -#: builtin/clone.c:60 +#: builtin/clone.c:62 msgid "don't create a checkout" msgstr "no facis cap agafament" -#: builtin/clone.c:61 builtin/clone.c:63 builtin/init-db.c:469 +#: builtin/clone.c:63 builtin/clone.c:65 builtin/init-db.c:476 msgid "create a bare repository" msgstr "crea un dipòsit nu" -#: builtin/clone.c:65 +#: builtin/clone.c:67 msgid "create a mirror repository (implies bare)" msgstr "crea un dipòsit reflectit (implica bare)" -#: builtin/clone.c:67 +#: builtin/clone.c:69 msgid "to clone from a local repository" msgstr "per a clonar des d'un dipòsit local" -#: builtin/clone.c:69 +#: builtin/clone.c:71 msgid "don't use local hardlinks, always copy" msgstr "no usis enllaços durs locals, sempre copia" -#: builtin/clone.c:71 +#: builtin/clone.c:73 msgid "setup as shared repository" msgstr "configura com a dipòsit compartit" -#: builtin/clone.c:73 builtin/clone.c:75 +#: builtin/clone.c:75 builtin/clone.c:77 msgid "initialize submodules in the clone" msgstr "inicialitza els submòduls en el clon" -#: builtin/clone.c:76 builtin/init-db.c:466 +#: builtin/clone.c:79 +msgid "number of submodules cloned in parallel" +msgstr "nombre de submòduls clonats en paral·lel" + +#: builtin/clone.c:80 builtin/init-db.c:473 msgid "template-directory" msgstr "directori-de-plantilla" -#: builtin/clone.c:77 builtin/init-db.c:467 +#: builtin/clone.c:81 builtin/init-db.c:474 msgid "directory from which templates will be used" msgstr "directori del qual les plantilles s'usaran" -#: builtin/clone.c:79 builtin/submodule--helper.c:173 +#: builtin/clone.c:83 builtin/submodule--helper.c:495 +#: builtin/submodule--helper.c:833 msgid "reference repository" msgstr "dipòsit de referència" -#: builtin/clone.c:81 +#: builtin/clone.c:85 msgid "use --reference only while cloning" msgstr "usa --reference només en clonar" -#: builtin/clone.c:82 builtin/column.c:26 builtin/merge-file.c:44 +#: builtin/clone.c:86 builtin/column.c:26 builtin/merge-file.c:44 msgid "name" msgstr "nom" -#: builtin/clone.c:83 +#: builtin/clone.c:87 msgid "use instead of 'origin' to track upstream" msgstr "usa en lloc de 'origin' per a seguir la font" -#: builtin/clone.c:85 +#: builtin/clone.c:89 msgid "checkout instead of the remote's HEAD" msgstr "agafa en lloc del HEAD del remot" -#: builtin/clone.c:87 +#: builtin/clone.c:91 msgid "path to git-upload-pack on the remote" msgstr "camí a git-upload-pack en el remot" -#: builtin/clone.c:88 builtin/fetch.c:117 builtin/grep.c:665 builtin/pull.c:193 +#: builtin/clone.c:92 builtin/fetch.c:118 builtin/grep.c:667 builtin/pull.c:201 msgid "depth" msgstr "profunditat" -#: builtin/clone.c:89 +#: builtin/clone.c:93 msgid "create a shallow clone of that depth" msgstr "crea un clon superficial de tal profunditat" -#: builtin/clone.c:91 +#: builtin/clone.c:95 msgid "clone only one branch, HEAD or --branch" msgstr "clona només una branca, HEAD o --branch" -#: builtin/clone.c:92 builtin/init-db.c:475 +#: builtin/clone.c:97 +msgid "any cloned submodules will be shallow" +msgstr "qualsevol submòdul clonat serà superficial" + +#: builtin/clone.c:98 builtin/init-db.c:482 msgid "gitdir" msgstr "directori de git" -#: builtin/clone.c:93 builtin/init-db.c:476 +#: builtin/clone.c:99 builtin/init-db.c:483 msgid "separate git dir from working tree" msgstr "separa el directori de git de l'arbre de treball" -#: builtin/clone.c:94 +#: builtin/clone.c:100 msgid "key=value" msgstr "clau=valor" -#: builtin/clone.c:95 +#: builtin/clone.c:101 msgid "set config inside the new repository" msgstr "estableix la configuració dins del dipòsit nou" -#: builtin/clone.c:96 builtin/fetch.c:131 builtin/push.c:536 +#: builtin/clone.c:102 builtin/fetch.c:132 builtin/push.c:547 msgid "use IPv4 addresses only" msgstr "usa només les adreces IPv4" -#: builtin/clone.c:98 builtin/fetch.c:133 builtin/push.c:538 +#: builtin/clone.c:104 builtin/fetch.c:134 builtin/push.c:549 msgid "use IPv6 addresses only" msgstr "usa només les adreces IPv6" -#: builtin/clone.c:239 +#: builtin/clone.c:241 msgid "" "No directory name could be guessed.\n" "Please specify a directory on the command line" @@ -4795,190 +5481,185 @@ msgstr "" "No s'ha pogut endevinar cap nom de directori.\n" "Si us plau, especifiqueu un directori en la línia d'ordres" -#: builtin/clone.c:305 +#: builtin/clone.c:307 #, c-format msgid "reference repository '%s' as a linked checkout is not supported yet." msgstr "" "Encara no se suporta el dipòsit de referència '%s' com a agafament enllaçat." -#: builtin/clone.c:307 +#: builtin/clone.c:309 #, 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:312 +#: builtin/clone.c:314 #, c-format msgid "reference repository '%s' is shallow" msgstr "el dipòsit de referència '%s' és superficial" -#: builtin/clone.c:315 +#: builtin/clone.c:317 #, c-format msgid "reference repository '%s' is grafted" msgstr "el dipòsit de referència '%s' és empeltat" -#: builtin/clone.c:380 builtin/diff.c:84 +#: builtin/clone.c:376 #, c-format -msgid "failed to stat '%s'" -msgstr "s'ha fallat en fer stat a '%s'" +msgid "failed to open '%s'" +msgstr "s'ha fallat en obrir '%s'" -#: builtin/clone.c:382 +#: builtin/clone.c:384 #, c-format msgid "%s exists and is not a directory" msgstr "%s existeix i no és directori" -#: builtin/clone.c:396 +#: builtin/clone.c:398 #, c-format msgid "failed to stat %s\n" msgstr "s'ha fallat en fer stat a '%s'\n" -#: builtin/clone.c:418 +#: builtin/clone.c:420 #, c-format msgid "failed to create link '%s'" msgstr "s'ha fallat en crear l'enllaç '%s'" -#: builtin/clone.c:422 +#: builtin/clone.c:424 #, c-format msgid "failed to copy file to '%s'" msgstr "s'ha fallat en copiar el fitxer a '%s'" -#: builtin/clone.c:447 builtin/clone.c:631 +#: builtin/clone.c:449 #, c-format msgid "done.\n" msgstr "fet.\n" -#: builtin/clone.c:459 +#: builtin/clone.c:461 msgid "" "Clone succeeded, but checkout failed.\n" "You can inspect what was checked out with 'git status'\n" "and retry the checkout with 'git checkout -f HEAD'\n" msgstr "" -"La clonació ha tingut èxit, però l'agafament ha\n" +"El clonatge ha tingut èxit, però l'agafament ha\n" "fallat. Podeu inspeccionar què s'ha agafat amb\n" "'git status' i tornar a intentar l'agafament amb\n" "'git checkout -f HEAD'\n" -#: builtin/clone.c:536 +#: builtin/clone.c:538 #, c-format msgid "Could not find remote branch %s to clone." msgstr "No s'ha pogut trobar la branca remota %s per a clonar." -#: builtin/clone.c:626 -#, c-format -msgid "Checking connectivity... " -msgstr "Provant connectivitat... " - -#: builtin/clone.c:629 +#: builtin/clone.c:633 msgid "remote did not send all necessary objects" msgstr "el remot no ha enviat tots els objectes necessaris" -#: builtin/clone.c:647 +#: builtin/clone.c:649 #, c-format msgid "unable to update %s" -msgstr "no s'ha pogut actualizar %s" +msgstr "no s'ha pogut actualitzar %s" -#: builtin/clone.c:696 +#: builtin/clone.c:698 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "" "el HEAD remot es refereix a una referència que no existeix; no s'ha pogut " "agafar.\n" -#: builtin/clone.c:727 +#: builtin/clone.c:729 msgid "unable to checkout working tree" msgstr "no s'ha pogut agafar l'arbre de treball" -#: builtin/clone.c:753 +#: builtin/clone.c:766 msgid "unable to write parameters to config file" -msgstr "no s'ha pogut escriure les paràmetres al fitxer de configuració" +msgstr "no s'ha pogut escriure els paràmetres al fitxer de configuració" -#: builtin/clone.c:816 +#: builtin/clone.c:829 msgid "cannot repack to clean up" msgstr "no es pot reempaquetar per a netejar" -#: builtin/clone.c:818 +#: builtin/clone.c:831 msgid "cannot unlink temporary alternates file" msgstr "no es pot desenllaçar el fitxer d'alternatives temporal" -#: builtin/clone.c:850 +#: builtin/clone.c:863 builtin/receive-pack.c:1855 msgid "Too many arguments." msgstr "Hi ha massa paràmetres." -#: builtin/clone.c:854 +#: builtin/clone.c:867 msgid "You must specify a repository to clone." msgstr "Heu d'especificar un dipòsit per a clonar." -#: builtin/clone.c:865 +#: builtin/clone.c:878 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "les opcions --bare i --origin %s són incompatibles." -#: builtin/clone.c:868 +#: builtin/clone.c:881 msgid "--bare and --separate-git-dir are incompatible." msgstr "--bare i --separate-git-dir són incompatibles." -#: builtin/clone.c:881 +#: builtin/clone.c:894 #, c-format msgid "repository '%s' does not exist" msgstr "el dipòsit '%s' no existeix" -#: builtin/clone.c:887 builtin/fetch.c:1174 +#: builtin/clone.c:900 builtin/fetch.c:1293 #, c-format msgid "depth %s is not a positive number" msgstr "la profunditat %s no és nombre positiu" -#: builtin/clone.c:897 +#: builtin/clone.c:910 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "el camí destí '%s' ja existeix i no és un directori buit." -#: builtin/clone.c:907 +#: builtin/clone.c:920 #, c-format msgid "working tree '%s' already exists." msgstr "l'arbre de treball '%s' ja existeix." -#: builtin/clone.c:922 builtin/clone.c:933 builtin/submodule--helper.c:218 -#: builtin/worktree.c:219 builtin/worktree.c:246 +#: builtin/clone.c:935 builtin/clone.c:946 builtin/submodule--helper.c:544 +#: builtin/worktree.c:222 builtin/worktree.c:249 #, c-format msgid "could not create leading directories of '%s'" msgstr "no s'ha pogut crear els directoris inicials de '%s'" -#: builtin/clone.c:925 +#: builtin/clone.c:938 #, 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:943 +#: builtin/clone.c:956 #, c-format msgid "Cloning into bare repository '%s'...\n" -msgstr "Clonant al dipòsit nu '%s'...\n" +msgstr "S'està clonant al dipòsit nu '%s'...\n" -#: builtin/clone.c:945 +#: builtin/clone.c:958 #, c-format msgid "Cloning into '%s'...\n" -msgstr "Clonant a '%s'...\n" +msgstr "S'està clonant a '%s'...\n" -#: builtin/clone.c:984 +#: builtin/clone.c:997 msgid "--depth is ignored in local clones; use file:// instead." msgstr "--depth s'ignora en els clons locals; useu file:// en lloc d'això." -#: builtin/clone.c:987 +#: builtin/clone.c:1000 msgid "source repository is shallow, ignoring --local" -msgstr "el dipòsit font és superficial, ignorant --local" +msgstr "el dipòsit font és superficial, s'està ignorant --local" -#: builtin/clone.c:992 +#: builtin/clone.c:1005 msgid "--local is ignored" msgstr "--local s'ignora" -#: builtin/clone.c:996 +#: builtin/clone.c:1009 #, c-format msgid "Don't know how to clone %s" msgstr "No se sap com clonar %s" -#: builtin/clone.c:1045 builtin/clone.c:1053 +#: builtin/clone.c:1058 builtin/clone.c:1066 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "La branca remota %s no es troba en la font %s" -#: builtin/clone.c:1056 +#: builtin/clone.c:1069 msgid "You appear to have cloned an empty repository." msgstr "Sembla que heu clonat un dipòsit buit." @@ -5120,66 +5801,66 @@ msgstr "" "Llavors \"git cherry-pick --continue\" reprendrà recollint\n" "com a cireres les comissions restants.\n" -#: builtin/commit.c:305 +#: builtin/commit.c:308 msgid "failed to unpack HEAD tree object" msgstr "s'ha fallat en desempaquetar l'objecte d'arbre HEAD" -#: builtin/commit.c:346 +#: builtin/commit.c:349 msgid "unable to create temporary index" msgstr "no s'ha pogut crear un índex temporal" -#: builtin/commit.c:352 +#: builtin/commit.c:355 msgid "interactive add failed" msgstr "l'afegiment interactiu ha fallat" -#: builtin/commit.c:365 +#: builtin/commit.c:368 msgid "unable to update temporary index" msgstr "no s'ha pogut actualitzar l'índex temporal" -#: builtin/commit.c:367 +#: builtin/commit.c:370 msgid "Failed to update main cache tree" msgstr "S'ha fallat en actualitzar l'arbre principal de memòria cau" -#: builtin/commit.c:391 builtin/commit.c:414 builtin/commit.c:463 +#: builtin/commit.c:394 builtin/commit.c:417 builtin/commit.c:466 msgid "unable to write new_index file" msgstr "no s'ha pogut escriure el fitxer new_index" -#: builtin/commit.c:445 +#: builtin/commit.c:448 msgid "cannot do a partial commit during a merge." msgstr "no es pot fer una comissió parcial durant una fusió." -#: builtin/commit.c:447 +#: builtin/commit.c:450 msgid "cannot do a partial commit during a cherry-pick." msgstr "no es pot fer una comissió parcial durant un recull de cireres." -#: builtin/commit.c:456 +#: builtin/commit.c:459 msgid "cannot read the index" msgstr "no es pot llegir l'índex" -#: builtin/commit.c:475 +#: builtin/commit.c:478 msgid "unable to write temporary index file" msgstr "no s'ha pogut escriure un fitxer d'índex temporal" -#: builtin/commit.c:580 +#: builtin/commit.c:583 #, c-format msgid "commit '%s' lacks author header" msgstr "a la comissió '%s' li manca la capçalera d'autor" -#: builtin/commit.c:582 +#: builtin/commit.c:585 #, c-format msgid "commit '%s' has malformed author line" msgstr "la comissió '%s' té una línia d'autor mal formada" -#: builtin/commit.c:601 +#: builtin/commit.c:604 msgid "malformed --author parameter" msgstr "paràmetre --author mal format" -#: builtin/commit.c:609 +#: builtin/commit.c:612 #, c-format msgid "invalid date format: %s" msgstr "format de data no vàlid: %s" -#: builtin/commit.c:653 +#: builtin/commit.c:656 msgid "" "unable to select a comment character that is not used\n" "in the current commit message" @@ -5187,38 +5868,38 @@ msgstr "" "no es pot seleccionar un caràcter de comentari que\n" "no sigui usat en el missatge de comissió actual" -#: builtin/commit.c:690 builtin/commit.c:723 builtin/commit.c:1080 +#: builtin/commit.c:693 builtin/commit.c:726 builtin/commit.c:1092 #, c-format msgid "could not lookup commit %s" msgstr "no s'ha pogut trobar la comissió %s" -#: builtin/commit.c:702 builtin/shortlog.c:285 +#: builtin/commit.c:705 builtin/shortlog.c:286 #, c-format msgid "(reading log message from standard input)\n" -msgstr "(llegint el missatge de registre des de l'entrada estàndard)\n" +msgstr "(s'està llegint el missatge de registre des de l'entrada estàndard)\n" -#: builtin/commit.c:704 +#: builtin/commit.c:707 msgid "could not read log from standard input" msgstr "no s'ha pogut llegir el registre des de l'entrada estàndard" -#: builtin/commit.c:708 +#: builtin/commit.c:711 #, c-format msgid "could not read log file '%s'" msgstr "no s'ha pogut llegir el fitxer de registre '%s'" -#: builtin/commit.c:730 -msgid "could not read MERGE_MSG" -msgstr "no s'ha pogut llegir MERGE_MSG" - -#: builtin/commit.c:734 +#: builtin/commit.c:738 builtin/commit.c:746 msgid "could not read SQUASH_MSG" msgstr "no s'ha pogut llegir SQUASH_MSG" -#: builtin/commit.c:785 +#: builtin/commit.c:743 +msgid "could not read MERGE_MSG" +msgstr "no s'ha pogut llegir MERGE_MSG" + +#: builtin/commit.c:797 msgid "could not write commit template" msgstr "no s'ha pogut escriure la plantilla de comissió" -#: builtin/commit.c:803 +#: builtin/commit.c:815 #, c-format msgid "" "\n" @@ -5233,7 +5914,7 @@ msgstr "" "\t%s\n" "i intenteu-ho de nou.\n" -#: builtin/commit.c:808 +#: builtin/commit.c:820 #, c-format msgid "" "\n" @@ -5244,11 +5925,11 @@ msgid "" msgstr "" "\n" "Sembla que podeu estar cometent un recull de cireres.\n" -"Si això no és correcte, si us plau elimineu el fitxer\n" +"Si això no és correcte, si us plau, elimineu el fitxer\n" "\t%s\n" "i intenteu-ho de nou.\n" -#: builtin/commit.c:821 +#: builtin/commit.c:833 #, c-format msgid "" "Please enter the commit message for your changes. Lines starting\n" @@ -5258,7 +5939,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:828 +#: builtin/commit.c:840 #, c-format msgid "" "Please enter the commit message for your changes. Lines starting\n" @@ -5269,149 +5950,150 @@ msgstr "" "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:848 +#: builtin/commit.c:860 #, c-format msgid "%sAuthor: %.*s <%.*s>" msgstr "%sAutor: %.*s <%.*s>" -#: builtin/commit.c:856 +#: builtin/commit.c:868 #, c-format msgid "%sDate: %s" msgstr "%sData: %s" -#: builtin/commit.c:863 +#: builtin/commit.c:875 #, c-format msgid "%sCommitter: %.*s <%.*s>" msgstr "%sComitent: %.*s <%.*s>" -#: builtin/commit.c:881 +#: builtin/commit.c:893 msgid "Cannot read index" msgstr "No es pot llegir l'índex" -#: builtin/commit.c:938 +#: builtin/commit.c:950 msgid "Error building trees" msgstr "Error en construir arbres" -#: builtin/commit.c:953 builtin/tag.c:266 +#: builtin/commit.c:965 builtin/tag.c:266 #, 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:1055 +#: builtin/commit.c:1067 #, c-format msgid "--author '%s' is not 'Name ' and matches no existing author" msgstr "" "--author '%s' no és 'Nom ' i no coincideix amb\n" "cap autor existent" -#: builtin/commit.c:1070 builtin/commit.c:1310 +#: builtin/commit.c:1082 builtin/commit.c:1322 #, c-format msgid "Invalid untracked files mode '%s'" msgstr "Mode de fitxers no seguits no vàlid '%s'" -#: builtin/commit.c:1107 +#: builtin/commit.c:1119 msgid "--long and -z are incompatible" msgstr "--long i -z són incompatibles" -#: builtin/commit.c:1137 +#: builtin/commit.c:1149 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:1146 +#: builtin/commit.c:1158 msgid "You have nothing to amend." msgstr "No teniu res a esmenar." -#: builtin/commit.c:1149 +#: builtin/commit.c:1161 msgid "You are in the middle of a merge -- cannot amend." msgstr "Esteu enmig d'una fusió -- no es pot esmenar." -#: builtin/commit.c:1151 +#: builtin/commit.c:1163 msgid "You are in the middle of a cherry-pick -- cannot amend." msgstr "Esteu enmig d'un recull de cireres -- no es pot esmenar." -#: builtin/commit.c:1154 +#: builtin/commit.c:1166 msgid "Options --squash and --fixup cannot be used together" msgstr "Les opcions --squash i --fixup no es poden usar juntes" -#: builtin/commit.c:1164 +#: builtin/commit.c:1176 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:1166 +#: builtin/commit.c:1178 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:1174 +#: builtin/commit.c:1186 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:1191 +#: builtin/commit.c:1203 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:1193 +#: builtin/commit.c:1205 msgid "No paths with --include/--only does not make sense." msgstr "--include/--only no té sentit sense camí." -#: builtin/commit.c:1195 +#: builtin/commit.c:1207 msgid "Clever... amending the last one with dirty index." -msgstr "Intel·ligent... esmenant l'últim amb índex brut." +msgstr "Intel·ligent... s'està esmenant l'últim amb índex brut." -#: builtin/commit.c:1197 +#: builtin/commit.c:1209 msgid "Explicit paths specified without -i or -o; assuming --only paths..." msgstr "" -"S'han especificat camins explícits sense -i o -o; presumint camins --only..." +"S'han especificat camins explícits sense -i o -o; s'està presumint camins --" +"only..." -#: builtin/commit.c:1209 builtin/tag.c:475 +#: builtin/commit.c:1221 builtin/tag.c:474 #, c-format msgid "Invalid cleanup mode %s" msgstr "Mode de neteja no vàlid %s" -#: builtin/commit.c:1214 +#: builtin/commit.c:1226 msgid "Paths with -a does not make sense." msgstr "-a no té sentit amb camins." -#: builtin/commit.c:1324 builtin/commit.c:1605 +#: builtin/commit.c:1336 builtin/commit.c:1622 msgid "show status concisely" msgstr "mostra l'estat concisament" -#: builtin/commit.c:1326 builtin/commit.c:1607 +#: builtin/commit.c:1338 builtin/commit.c:1624 msgid "show branch information" msgstr "mostra la informació de branca" -#: builtin/commit.c:1328 builtin/commit.c:1609 builtin/push.c:512 -#: builtin/worktree.c:430 +#: builtin/commit.c:1340 builtin/commit.c:1626 builtin/push.c:522 +#: builtin/worktree.c:440 msgid "machine-readable output" msgstr "sortida llegible per màquina" -#: builtin/commit.c:1331 builtin/commit.c:1611 +#: builtin/commit.c:1343 builtin/commit.c:1628 msgid "show status in long format (default)" msgstr "mostra l'estat en format llarg (per defecte)" -#: builtin/commit.c:1334 builtin/commit.c:1614 +#: builtin/commit.c:1346 builtin/commit.c:1631 msgid "terminate entries with NUL" msgstr "acaba les entrades amb NUL" -#: builtin/commit.c:1336 builtin/commit.c:1617 builtin/fast-export.c:981 +#: builtin/commit.c:1348 builtin/commit.c:1634 builtin/fast-export.c:981 #: builtin/fast-export.c:984 builtin/tag.c:353 msgid "mode" msgstr "mode" -#: builtin/commit.c:1337 builtin/commit.c:1617 +#: builtin/commit.c:1349 builtin/commit.c:1634 msgid "show untracked files, optional modes: all, normal, no. (Default: all)" msgstr "" "mostra els fitxers no seguits, modes opcionals: all, normal, no. (Per " "defecte: all)" -#: builtin/commit.c:1340 +#: builtin/commit.c:1352 msgid "show ignored files" msgstr "mostra els fitxers ignorats" -#: builtin/commit.c:1341 parse-options.h:155 +#: builtin/commit.c:1353 parse-options.h:155 msgid "when" msgstr "quan" -#: builtin/commit.c:1342 +#: builtin/commit.c:1354 msgid "" "ignore changes to submodules, optional when: all, dirty, untracked. " "(Default: all)" @@ -5419,202 +6101,202 @@ msgstr "" "ignora els canvis als submòduls, opcional quan: all, dirty, untracked. (Per " "defecte: all)" -#: builtin/commit.c:1344 +#: builtin/commit.c:1356 msgid "list untracked files in columns" msgstr "mostra els fitxers no seguits en columnes" -#: builtin/commit.c:1430 +#: builtin/commit.c:1442 msgid "couldn't look up newly created commit" msgstr "no s'ha pogut trobar la comissió novament creada" -#: builtin/commit.c:1432 +#: builtin/commit.c:1444 msgid "could not parse newly created commit" msgstr "no s'ha pogut analitzar la comissió novament creada" -#: builtin/commit.c:1477 +#: builtin/commit.c:1489 msgid "detached HEAD" msgstr "HEAD separat" -#: builtin/commit.c:1480 +#: builtin/commit.c:1492 msgid " (root-commit)" msgstr " (comissió d'arrel)" -#: builtin/commit.c:1575 +#: builtin/commit.c:1592 msgid "suppress summary after successful commit" msgstr "omet el resum després d'una comissió reeixida" -#: builtin/commit.c:1576 +#: builtin/commit.c:1593 msgid "show diff in commit message template" msgstr "mostra la diferència en la plantilla de missatge de comissió" -#: builtin/commit.c:1578 +#: builtin/commit.c:1595 msgid "Commit message options" msgstr "Opcions de missatge de comissió" -#: builtin/commit.c:1579 builtin/tag.c:351 +#: builtin/commit.c:1596 builtin/tag.c:351 msgid "read message from file" msgstr "llegiu el missatge des d'un fitxer" -#: builtin/commit.c:1580 +#: builtin/commit.c:1597 msgid "author" msgstr "autor" -#: builtin/commit.c:1580 +#: builtin/commit.c:1597 msgid "override author for commit" msgstr "autor corregit de la comissió" -#: builtin/commit.c:1581 builtin/gc.c:326 +#: builtin/commit.c:1598 builtin/gc.c:326 msgid "date" msgstr "data" -#: builtin/commit.c:1581 +#: builtin/commit.c:1598 msgid "override date for commit" msgstr "data corregida de la comissió" -#: builtin/commit.c:1582 builtin/merge.c:218 builtin/notes.c:395 -#: builtin/notes.c:558 builtin/tag.c:349 +#: builtin/commit.c:1599 builtin/merge.c:220 builtin/notes.c:396 +#: builtin/notes.c:559 builtin/tag.c:349 msgid "message" msgstr "missatge" -#: builtin/commit.c:1582 +#: builtin/commit.c:1599 msgid "commit message" msgstr "missatge de comissió" -#: builtin/commit.c:1583 builtin/commit.c:1584 builtin/commit.c:1585 -#: builtin/commit.c:1586 parse-options.h:256 ref-filter.h:79 +#: builtin/commit.c:1600 builtin/commit.c:1601 builtin/commit.c:1602 +#: builtin/commit.c:1603 parse-options.h:256 ref-filter.h:79 msgid "commit" msgstr "comissió" -#: builtin/commit.c:1583 +#: builtin/commit.c:1600 msgid "reuse and edit message from specified commit" msgstr "reusa i edita el missatge de la comissió especificada" -#: builtin/commit.c:1584 +#: builtin/commit.c:1601 msgid "reuse message from specified commit" msgstr "reusa el missatge de la comissió especificada" -#: builtin/commit.c:1585 +#: builtin/commit.c:1602 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:1586 +#: builtin/commit.c:1603 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:1587 +#: builtin/commit.c:1604 msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "l'autor de la comissió ja sóc jo (s'usa amb -C/-c/--amend)" -#: builtin/commit.c:1588 builtin/log.c:1219 builtin/revert.c:86 +#: builtin/commit.c:1605 builtin/log.c:1409 builtin/revert.c:86 msgid "add Signed-off-by:" msgstr "afegeix Signed-off-by:" -#: builtin/commit.c:1589 +#: builtin/commit.c:1606 msgid "use specified template file" msgstr "usa el fitxer de plantilla especificat" -#: builtin/commit.c:1590 +#: builtin/commit.c:1607 msgid "force edit of commit" msgstr "força l'edició de la comissió" -#: builtin/commit.c:1591 +#: builtin/commit.c:1608 msgid "default" msgstr "per defecte" -#: builtin/commit.c:1591 builtin/tag.c:354 +#: builtin/commit.c:1608 builtin/tag.c:354 msgid "how to strip spaces and #comments from message" msgstr "com despullar els espais i #comentaris del missatge" -#: builtin/commit.c:1592 +#: builtin/commit.c:1609 msgid "include status in commit message template" msgstr "inclou l'estat en la plantilla de missatge de comissió" -#: builtin/commit.c:1594 builtin/merge.c:226 builtin/pull.c:160 +#: builtin/commit.c:1611 builtin/merge.c:230 builtin/pull.c:165 #: builtin/revert.c:93 msgid "GPG sign commit" -msgstr "firma la comissió amb GPG" +msgstr "signa la comissió amb GPG" -#: builtin/commit.c:1597 +#: builtin/commit.c:1614 msgid "Commit contents options" msgstr "Opcions dels continguts de les comissions" -#: builtin/commit.c:1598 +#: builtin/commit.c:1615 msgid "commit all changed files" msgstr "comet tots els fitxers canviats" -#: builtin/commit.c:1599 +#: builtin/commit.c:1616 msgid "add specified files to index for commit" msgstr "afegeix els fitxers especificats a l'índex per a cometre" -#: builtin/commit.c:1600 +#: builtin/commit.c:1617 msgid "interactively add files" msgstr "afegeix els fitxers interactivament" -#: builtin/commit.c:1601 +#: builtin/commit.c:1618 msgid "interactively add changes" msgstr "afegeix els canvis interactivament" -#: builtin/commit.c:1602 +#: builtin/commit.c:1619 msgid "commit only specified files" msgstr "comet només els fitxers especificats" -#: builtin/commit.c:1603 -msgid "bypass pre-commit hook" -msgstr "evita el ganxo de precomissió" +#: builtin/commit.c:1620 +msgid "bypass pre-commit and commit-msg hooks" +msgstr "evita els ganxos de precomissió i missatge de comissió" -#: builtin/commit.c:1604 +#: builtin/commit.c:1621 msgid "show what would be committed" msgstr "mostra què es cometria" -#: builtin/commit.c:1615 +#: builtin/commit.c:1632 msgid "amend previous commit" msgstr "esmena la comissió anterior" -#: builtin/commit.c:1616 +#: builtin/commit.c:1633 msgid "bypass post-rewrite hook" msgstr "evita el ganxo de postreescriure" -#: builtin/commit.c:1621 +#: builtin/commit.c:1638 msgid "ok to record an empty change" msgstr "està bé registrar un canvi buit" -#: builtin/commit.c:1623 +#: builtin/commit.c:1640 msgid "ok to record a change with an empty message" msgstr "està bé registrar un canvi amb missatge buit" -#: builtin/commit.c:1652 +#: builtin/commit.c:1669 msgid "could not parse HEAD commit" msgstr "no s'ha pogut analitzar la comissió HEAD" -#: builtin/commit.c:1698 +#: builtin/commit.c:1719 #, c-format msgid "Corrupt MERGE_HEAD file (%s)" msgstr "Fitxer MERGE_HEAD malmès (%s)" -#: builtin/commit.c:1705 +#: builtin/commit.c:1726 msgid "could not read MERGE_MODE" msgstr "no s'ha pogut llegir MERGE_MODE" -#: builtin/commit.c:1724 +#: builtin/commit.c:1745 #, c-format msgid "could not read commit message: %s" msgstr "no s'ha pogut llegir el missatge de comissió: %s" -#: builtin/commit.c:1735 +#: builtin/commit.c:1756 #, c-format msgid "Aborting commit; you did not edit the message.\n" -msgstr "Avortant la comissió; no heu editat el missatge.\n" +msgstr "S'està avortant la comissió; no heu editat el missatge.\n" -#: builtin/commit.c:1740 +#: builtin/commit.c:1761 #, c-format msgid "Aborting commit due to empty commit message.\n" -msgstr "Avortant la comissió a causa d'un missatge de comissió buit.\n" +msgstr "S'està avortant la comissió a causa d'un missatge de comissió buit.\n" -#: builtin/commit.c:1788 +#: builtin/commit.c:1809 msgid "" "Repository has been updated, but unable to write\n" "new_index file. Check that disk is not full and quota is\n" @@ -5629,142 +6311,142 @@ msgstr "" msgid "git config []" msgstr "git config []" -#: builtin/config.c:56 +#: builtin/config.c:55 msgid "Config file location" msgstr "Ubicació del fitxer de configuració" -#: builtin/config.c:57 +#: builtin/config.c:56 msgid "use global config file" msgstr "usa el fitxer de configuració global" -#: builtin/config.c:58 +#: builtin/config.c:57 msgid "use system config file" msgstr "usa el fitxer de configuració del sistema" -#: builtin/config.c:59 +#: builtin/config.c:58 msgid "use repository config file" msgstr "usa el fitxer de configuració del dipòsit" -#: builtin/config.c:60 +#: builtin/config.c:59 msgid "use given config file" msgstr "usa el fitxer de configuració donat" -#: builtin/config.c:61 +#: builtin/config.c:60 msgid "blob-id" msgstr "ID de blob" -#: builtin/config.c:61 +#: builtin/config.c:60 msgid "read config from given blob object" msgstr "llegeix la configuració de l'objecte de blob donat" -#: builtin/config.c:62 +#: builtin/config.c:61 msgid "Action" msgstr "Acció" -#: builtin/config.c:63 +#: builtin/config.c:62 msgid "get value: name [value-regex]" msgstr "obtén valor: nom [regex-de-valors]" -#: builtin/config.c:64 +#: builtin/config.c:63 msgid "get all values: key [value-regex]" msgstr "obtén tots els valors: clau [regex-de-valors]" -#: builtin/config.c:65 +#: builtin/config.c:64 msgid "get values for regexp: name-regex [value-regex]" msgstr "obtén valors de regexp: regex-de-noms [regex-de-valors]" -#: builtin/config.c:66 +#: builtin/config.c:65 msgid "get value specific for the URL: section[.var] URL" msgstr "obtén el valor específic per a l'URL: secció[.variable] URL" -#: builtin/config.c:67 +#: builtin/config.c:66 msgid "replace all matching variables: name value [value_regex]" msgstr "" "reemplaça totes les variables que coincideixen: nom valor [regex_de_valors]" -#: builtin/config.c:68 +#: builtin/config.c:67 msgid "add a new variable: name value" msgstr "afegeix una variable nova: nom valor" -#: builtin/config.c:69 +#: builtin/config.c:68 msgid "remove a variable: name [value-regex]" msgstr "elimina una variable: nom [regex-de-valors]" -#: builtin/config.c:70 +#: builtin/config.c:69 msgid "remove all matches: name [value-regex]" msgstr "elimina totes les coincidències: nom [regex-de-valors]" -#: builtin/config.c:71 +#: builtin/config.c:70 msgid "rename section: old-name new-name" msgstr "canvia el nom de secció: nom-antic nom-nou" -#: builtin/config.c:72 +#: builtin/config.c:71 msgid "remove a section: name" msgstr "elimina una secció: nom" -#: builtin/config.c:73 +#: builtin/config.c:72 msgid "list all" msgstr "llista tots" -#: builtin/config.c:74 +#: builtin/config.c:73 msgid "open an editor" msgstr "obre un editor" -#: builtin/config.c:75 +#: builtin/config.c:74 msgid "find the color configured: slot [default]" msgstr "troba el color configurat: ranura [per defecte]" -#: builtin/config.c:76 +#: builtin/config.c:75 msgid "find the color setting: slot [stdout-is-tty]" msgstr "troba l'ajust de color: ranura [stdout-és-tty]" -#: builtin/config.c:77 +#: builtin/config.c:76 msgid "Type" msgstr "Tipus" -#: builtin/config.c:78 +#: builtin/config.c:77 msgid "value is \"true\" or \"false\"" msgstr "el valor és \"true\" o \"false\"" -#: builtin/config.c:79 +#: builtin/config.c:78 msgid "value is decimal number" msgstr "el valor és un nombre decimal" -#: builtin/config.c:80 +#: builtin/config.c:79 msgid "value is --bool or --int" msgstr "el valor és --bool o --int" -#: builtin/config.c:81 +#: builtin/config.c:80 msgid "value is a path (file or directory name)" msgstr "el valor és un camí (nom de fitxer o directori)" -#: builtin/config.c:82 +#: builtin/config.c:81 msgid "Other" msgstr "Altre" -#: builtin/config.c:83 +#: builtin/config.c:82 msgid "terminate values with NUL byte" msgstr "acaba els valors amb un octet NUL" -#: builtin/config.c:84 +#: builtin/config.c:83 msgid "show variable names only" msgstr "mostra només els noms de variable" -#: builtin/config.c:85 +#: builtin/config.c:84 msgid "respect include directives on lookup" msgstr "respecta les directives d'inclusió en cercar" -#: builtin/config.c:86 +#: builtin/config.c:85 msgid "show origin of config (file, standard input, blob, command line)" msgstr "" "mostra l'origen de la configuració (fitxer, entrada estàndar, blob, línia " "d'ordres)" -#: builtin/config.c:328 +#: builtin/config.c:327 msgid "unable to parse default color value" msgstr "no s'ha pogut analitzar el valor de color per defecte" -#: builtin/config.c:469 +#: builtin/config.c:471 #, c-format msgid "" "# This is Git's per-user configuration file.\n" @@ -5779,7 +6461,7 @@ msgstr "" "#\tname = %s\n" "#\temail = %s\n" -#: builtin/config.c:611 +#: builtin/config.c:613 #, c-format msgid "cannot create configuration file %s" msgstr "no es pot crear el fitxer de configuració '%s'" @@ -5815,7 +6497,7 @@ msgstr "l'etiqueta anotada %s no té nom incrustat" msgid "tag '%s' is really '%s' here" msgstr "l'etiqueta '%s' realment és '%s' aquí" -#: builtin/describe.c:250 builtin/log.c:459 +#: builtin/describe.c:250 builtin/log.c:480 #, c-format msgid "Not a valid object name %s" msgstr "%s no és un nom d'objecte vàlid" @@ -5833,7 +6515,7 @@ msgstr "cap etiqueta coincideix exactament amb '%s'" #: builtin/describe.c:272 #, c-format msgid "searching to describe %s\n" -msgstr "cercant per a descriure %s\n" +msgstr "s'està cercant per a descriure %s\n" #: builtin/describe.c:319 #, c-format @@ -5908,7 +6590,7 @@ msgstr "considera les etiquetes més recents (per defecte: 10)" msgid "only consider tags matching " msgstr "només considera les etiquetes que coincideixen amb " -#: builtin/describe.c:410 builtin/name-rev.c:314 +#: builtin/describe.c:410 builtin/name-rev.c:321 msgid "show abbreviated commit object as fallback" msgstr "mostra l'objecte de comissió abreviat com a retrocediment" @@ -5926,7 +6608,7 @@ msgstr "--long és incompatible amb --abbrev=0" #: builtin/describe.c:456 msgid "No names found, cannot describe anything." -msgstr "Cap nom trobat, no es pot descriure res." +msgstr "No s'ha trobat cap nom, no es pot descriure res." #: builtin/describe.c:476 msgid "--dirty is incompatible with commit-ishes" @@ -5942,21 +6624,21 @@ msgstr "'%s': no és ni fitxer regular ni enllaç simbòlic" msgid "invalid option: %s" msgstr "opció no vàlida: %s" -#: builtin/diff.c:358 +#: builtin/diff.c:360 msgid "Not a git repository" msgstr "No és un dipòsit de git" -#: builtin/diff.c:401 +#: builtin/diff.c:403 #, c-format msgid "invalid object '%s' given." msgstr "s'ha donat un objecte no vàlid '%s'." -#: builtin/diff.c:410 +#: builtin/diff.c:412 #, c-format msgid "more than two blobs given: '%s'" msgstr "s'ha donat més de dos blobs: '%s" -#: builtin/diff.c:417 +#: builtin/diff.c:419 #, c-format msgid "unhandled object '%s' given." msgstr "s'ha donat l'objecte no gestionat '%s'." @@ -5971,7 +6653,7 @@ msgstr "mostra el progrés després de objectes" #: builtin/fast-export.c:982 msgid "select handling of signed tags" -msgstr "selecciona la gestió de les etiquetes firmades" +msgstr "selecciona la gestió de les etiquetes signades" #: builtin/fast-export.c:985 msgid "select handling of tags that tag filtered objects" @@ -6013,182 +6695,178 @@ msgstr "Aplica l'especificació de referència a les referències exportades" msgid "anonymize output" msgstr "anonimitza la sortida" -#: builtin/fetch.c:20 +#: builtin/fetch.c:21 msgid "git fetch [] [ [...]]" msgstr "git fetch [] [ [...]]" -#: builtin/fetch.c:21 +#: builtin/fetch.c:22 msgid "git fetch [] " msgstr "git fetch [] " -#: builtin/fetch.c:22 +#: builtin/fetch.c:23 msgid "git fetch --multiple [] [( | )...]" msgstr "git fetch --multiple [] [( | )...]" -#: builtin/fetch.c:23 +#: builtin/fetch.c:24 msgid "git fetch --all []" msgstr "git fetch --all []" -#: builtin/fetch.c:92 builtin/pull.c:166 +#: builtin/fetch.c:93 builtin/pull.c:174 msgid "fetch from all remotes" msgstr "obtén de tots els remots" -#: builtin/fetch.c:94 builtin/pull.c:169 +#: builtin/fetch.c:95 builtin/pull.c:177 msgid "append to .git/FETCH_HEAD instead of overwriting" msgstr "annexa a .git/FETCH_HEAD en lloc de sobreescriure" -#: builtin/fetch.c:96 builtin/pull.c:172 +#: builtin/fetch.c:97 builtin/pull.c:180 msgid "path to upload pack on remote end" msgstr "camí al qual pujar el paquet al costat remot" -#: builtin/fetch.c:97 builtin/pull.c:174 +#: builtin/fetch.c:98 builtin/pull.c:182 msgid "force overwrite of local branch" msgstr "força la sobreescriptura de la branca local" -#: builtin/fetch.c:99 +#: builtin/fetch.c:100 msgid "fetch from multiple remotes" msgstr "obtén de múltiples remots" -#: builtin/fetch.c:101 builtin/pull.c:176 +#: builtin/fetch.c:102 builtin/pull.c:184 msgid "fetch all tags and associated objects" msgstr "obtén totes les etiquetes i tots els objectes associats" -#: builtin/fetch.c:103 +#: builtin/fetch.c:104 msgid "do not fetch all tags (--no-tags)" msgstr "no obtinguis les etiquetes (--no-tags)" -#: builtin/fetch.c:105 +#: builtin/fetch.c:106 msgid "number of submodules fetched in parallel" msgstr "nombre de submòduls obtinguts en paral·lel" -#: builtin/fetch.c:107 builtin/pull.c:179 +#: builtin/fetch.c:108 builtin/pull.c:187 msgid "prune remote-tracking branches no longer on remote" msgstr "poda les branques amb seguiment remot que ja no estiguin en el remot" -#: builtin/fetch.c:108 builtin/pull.c:182 +#: builtin/fetch.c:109 builtin/pull.c:190 msgid "on-demand" msgstr "sota demanda" -#: builtin/fetch.c:109 builtin/pull.c:183 +#: builtin/fetch.c:110 builtin/pull.c:191 msgid "control recursive fetching of submodules" msgstr "controla l'obtenció recursiva de submòduls" -#: builtin/fetch.c:113 builtin/pull.c:191 +#: builtin/fetch.c:114 builtin/pull.c:199 msgid "keep downloaded pack" msgstr "retén el paquet baixat" -#: builtin/fetch.c:115 +#: builtin/fetch.c:116 msgid "allow updating of HEAD ref" msgstr "permet l'actualització de la referència HEAD" -#: builtin/fetch.c:118 builtin/pull.c:194 +#: builtin/fetch.c:119 builtin/pull.c:202 msgid "deepen history of shallow clone" msgstr "aprofundeix la història d'un clon superficial" -#: builtin/fetch.c:120 builtin/pull.c:197 +#: builtin/fetch.c:121 builtin/pull.c:205 msgid "convert to a complete repository" msgstr "converteix en un dipòsit complet" -#: builtin/fetch.c:122 builtin/log.c:1236 +#: builtin/fetch.c:123 builtin/log.c:1426 msgid "dir" msgstr "directori" -#: builtin/fetch.c:123 +#: builtin/fetch.c:124 msgid "prepend this to submodule path output" msgstr "anteposa això a la sortida de camí del submòdul" -#: builtin/fetch.c:126 +#: builtin/fetch.c:127 msgid "default mode for recursion" msgstr "mode de recursivitat per defecte" -#: builtin/fetch.c:128 builtin/pull.c:200 +#: builtin/fetch.c:129 builtin/pull.c:208 msgid "accept refs that update .git/shallow" msgstr "accepta les referències que actualitzin .git/shallow" -#: builtin/fetch.c:129 builtin/pull.c:202 +#: builtin/fetch.c:130 builtin/pull.c:210 msgid "refmap" msgstr "mapa de referències" -#: builtin/fetch.c:130 builtin/pull.c:203 +#: builtin/fetch.c:131 builtin/pull.c:211 msgid "specify fetch refmap" msgstr "mostra el mapa de referències d'obtenció" -#: builtin/fetch.c:386 +#: builtin/fetch.c:387 msgid "Couldn't find remote ref HEAD" msgstr "No s'ha pogut trobar la referència HEAD remota" -#: builtin/fetch.c:466 +#: builtin/fetch.c:503 +#, c-format +msgid "configuration fetch.output contains invalid value %s" +msgstr "la configuració fetch.output conté un valor no vàlid %s" + +#: builtin/fetch.c:592 #, c-format msgid "object %s not found" msgstr "objecte %s no trobat" -#: builtin/fetch.c:471 +#: builtin/fetch.c:596 msgid "[up to date]" msgstr "[al dia]" -#: builtin/fetch.c:485 -#, c-format -msgid "! %-*s %-*s -> %s (can't fetch in current branch)" -msgstr "! %-*s %-*s -> %s (no es pot obtenir en la branca actual)" - -#: builtin/fetch.c:486 builtin/fetch.c:574 +#: builtin/fetch.c:609 builtin/fetch.c:689 msgid "[rejected]" msgstr "[rebutjat]" -#: builtin/fetch.c:497 +#: builtin/fetch.c:610 +msgid "can't fetch in current branch" +msgstr "no es pot obtenir en la branca actual" + +#: builtin/fetch.c:619 msgid "[tag update]" msgstr "[actualització d'etiqueta]" -#: builtin/fetch.c:499 builtin/fetch.c:534 builtin/fetch.c:552 -msgid " (unable to update local ref)" -msgstr " (no s'ha pogut actualitzar la referència local)" +#: builtin/fetch.c:620 builtin/fetch.c:653 builtin/fetch.c:669 +#: builtin/fetch.c:684 +msgid "unable to update local ref" +msgstr "no s'ha pogut actualitzar la referència local" -#: builtin/fetch.c:517 +#: builtin/fetch.c:639 msgid "[new tag]" msgstr "[etiqueta nova]" -#: builtin/fetch.c:520 +#: builtin/fetch.c:642 msgid "[new branch]" msgstr "[branca nova]" -#: builtin/fetch.c:523 +#: builtin/fetch.c:645 msgid "[new ref]" msgstr "[referència nova]" -#: builtin/fetch.c:569 -msgid "unable to update local ref" -msgstr "no s'ha pogut actualitzar la referència local" - -#: builtin/fetch.c:569 +#: builtin/fetch.c:684 msgid "forced update" msgstr "actualització forçada" -#: builtin/fetch.c:576 -msgid "(non-fast-forward)" -msgstr "(sense avanç ràpid)" - -#: builtin/fetch.c:610 builtin/fetch.c:851 -#, c-format -msgid "cannot open %s: %s\n" -msgstr "no es pot obrir %s: %s\n" +#: builtin/fetch.c:689 +msgid "non-fast-forward" +msgstr "sense avanç ràpid" -#: builtin/fetch.c:619 +#: builtin/fetch.c:733 #, c-format msgid "%s did not send all necessary objects\n" msgstr "%s no ha enviat tots els objectes necessaris\n" -#: builtin/fetch.c:637 +#: builtin/fetch.c:753 #, c-format msgid "reject %s because shallow roots are not allowed to be updated" msgstr "" "rebutja %s perquè no es permet que les arrels superficials s'actualitzin" -#: builtin/fetch.c:724 builtin/fetch.c:816 +#: builtin/fetch.c:839 builtin/fetch.c:934 #, c-format msgid "From %.*s\n" msgstr "De %.*s\n" -#: builtin/fetch.c:735 +#: builtin/fetch.c:850 #, c-format msgid "" "some local refs could not be updated; try running\n" @@ -6198,55 +6876,55 @@ msgstr "" " intenteu executar 'git remote prune %s' per a eliminar\n" " qualsevulla branca antiga o conflictiva" -#: builtin/fetch.c:787 +#: builtin/fetch.c:904 #, c-format msgid " (%s will become dangling)" msgstr " (%s es tornarà penjant)" -#: builtin/fetch.c:788 +#: builtin/fetch.c:905 #, c-format msgid " (%s has become dangling)" msgstr " (%s s'ha tornat penjant)" -#: builtin/fetch.c:820 +#: builtin/fetch.c:937 msgid "[deleted]" msgstr "[suprimit]" -#: builtin/fetch.c:821 builtin/remote.c:1025 +#: builtin/fetch.c:938 builtin/remote.c:1020 msgid "(none)" msgstr "(cap)" -#: builtin/fetch.c:841 +#: builtin/fetch.c:960 #, c-format msgid "Refusing to fetch into current branch %s of non-bare repository" -msgstr "Refusant obtenir en la branca actual %s d'un dipòsit no nu" +msgstr "S'està refusant obtenir en la branca actual %s d'un dipòsit no nu" -#: builtin/fetch.c:860 +#: builtin/fetch.c:979 #, c-format msgid "Option \"%s\" value \"%s\" is not valid for %s" msgstr "L'opció \"%s\" amb valor \"%s\" no és vàlida per a %s" -#: builtin/fetch.c:863 +#: builtin/fetch.c:982 #, c-format msgid "Option \"%s\" is ignored for %s\n" msgstr "S'ignora l'opció \"%s\" per a %s\n" -#: builtin/fetch.c:920 +#: builtin/fetch.c:1039 #, c-format msgid "Don't know how to fetch from %s" msgstr "No se sap com obtenir de %s" -#: builtin/fetch.c:1080 +#: builtin/fetch.c:1199 #, c-format msgid "Fetching %s\n" -msgstr "Obtenint %s\n" +msgstr "S'està obtenint %s\n" -#: builtin/fetch.c:1082 builtin/remote.c:96 +#: builtin/fetch.c:1201 builtin/remote.c:96 #, c-format msgid "Could not fetch %s" msgstr "No s'ha pogut obtenir %s" -#: builtin/fetch.c:1100 +#: builtin/fetch.c:1219 msgid "" "No remote repository specified. Please, specify either a URL or a\n" "remote name from which new revisions should be fetched." @@ -6254,32 +6932,32 @@ msgstr "" "Cap dipòsit remot especificat. Si us plau, especifiqueu o un URL o\n" "un nom remot del qual es deuen obtenir les revisions noves." -#: builtin/fetch.c:1123 +#: builtin/fetch.c:1242 msgid "You need to specify a tag name." msgstr "Necessiteu especificar un nom d'etiqueta." -#: builtin/fetch.c:1165 +#: builtin/fetch.c:1284 msgid "--depth and --unshallow cannot be used together" msgstr "--depth i --unshallow no es poden usar junts" -#: builtin/fetch.c:1167 +#: builtin/fetch.c:1286 msgid "--unshallow on a complete repository does not make sense" msgstr "--unshallow en un dipòsit complet no té sentit" -#: builtin/fetch.c:1187 +#: builtin/fetch.c:1306 msgid "fetch --all does not take a repository argument" msgstr "fetch --all no accepta un paràmetre de dipòsit" -#: builtin/fetch.c:1189 +#: builtin/fetch.c:1308 msgid "fetch --all does not make sense with refspecs" msgstr "fetch --all no té sentit amb especificacions de referència" -#: builtin/fetch.c:1200 +#: builtin/fetch.c:1319 #, c-format msgid "No such remote or remote group: %s" msgstr "No hi ha tal remot ni tal grup remot: %s" -#: builtin/fetch.c:1208 +#: builtin/fetch.c:1327 msgid "Fetching a group and specifying refspecs does not make sense" msgstr "Obtenir un grup i especificar referències no té sentit" @@ -6367,65 +7045,65 @@ msgstr "imprimeix només les referències que no s'han fusionat" msgid "print only refs which contain the commit" msgstr "imprimeix només les referències que continguin la comissió" -#: builtin/fsck.c:156 builtin/prune.c:140 -msgid "Checking connectivity" -msgstr "Comprovant connectivitat" - -#: builtin/fsck.c:486 +#: builtin/fsck.c:519 msgid "Checking object directories" -msgstr "Comprovant els directoris d'objecte" +msgstr "S'estan comprovant els directoris d'objecte" -#: builtin/fsck.c:553 +#: builtin/fsck.c:588 msgid "git fsck [] [...]" msgstr "git fsck [] [...]" -#: builtin/fsck.c:559 +#: builtin/fsck.c:594 msgid "show unreachable objects" msgstr "mostra els objectes inabastables" -#: builtin/fsck.c:560 +#: builtin/fsck.c:595 msgid "show dangling objects" msgstr "mostra els objectes penjants" -#: builtin/fsck.c:561 +#: builtin/fsck.c:596 msgid "report tags" msgstr "informa de les etiquetes" -#: builtin/fsck.c:562 +#: builtin/fsck.c:597 msgid "report root nodes" msgstr "informa dels nodes d'arrel" -#: builtin/fsck.c:563 +#: builtin/fsck.c:598 msgid "make index objects head nodes" msgstr "fes els objectes d'índex nodes de cap" -#: builtin/fsck.c:564 +#: builtin/fsck.c:599 msgid "make reflogs head nodes (default)" msgstr "fes que els registres de referències siguin nodes de cap (per defecte)" -#: builtin/fsck.c:565 +#: builtin/fsck.c:600 msgid "also consider packs and alternate objects" msgstr "també considera els paquets i els objectes alternatius" -#: builtin/fsck.c:566 +#: builtin/fsck.c:601 msgid "check only connectivity" msgstr "comprova només la connectivitat" -#: builtin/fsck.c:567 +#: builtin/fsck.c:602 msgid "enable more strict checking" msgstr "habilita la comprovació més estricta" -#: builtin/fsck.c:569 +#: builtin/fsck.c:604 msgid "write dangling objects in .git/lost-found" msgstr "escriu objectes penjants a .git/lost-found" -#: builtin/fsck.c:570 builtin/prune.c:107 +#: builtin/fsck.c:605 builtin/prune.c:107 msgid "show progress" msgstr "mostra el progrés" -#: builtin/fsck.c:631 +#: builtin/fsck.c:606 +msgid "show verbose names for reachable objects" +msgstr "mostra els noms detallats dels objectes abastables" + +#: builtin/fsck.c:671 msgid "Checking objects" -msgstr "Comprovant els objectes" +msgstr "S'estan comprovant els objectes" #: builtin/gc.c:25 msgid "git gc []" @@ -6476,12 +7154,13 @@ msgstr "força l'execució de gc encara que hi pugui haver un altre gc executant #, c-format msgid "Auto packing the repository in background for optimum performance.\n" msgstr "" -"Empaquetant automàticament el dipòsit en el fons per rendiment òptim.\n" +"S'està empaquetant el dipòsit automàticament en el fons per rendiment " +"òptim.\n" #: builtin/gc.c:375 #, c-format msgid "Auto packing the repository for optimum performance.\n" -msgstr "Empaquetant automàticament el dipòsit per rendiment òptim.\n" +msgstr "S'està empaquetant automàticament el dipòsit per rendiment òptim.\n" #: builtin/gc.c:376 #, c-format @@ -6493,7 +7172,7 @@ msgstr "Vegeu \"git help gc\" per neteja manual.\n" msgid "" "gc is already running on machine '%s' pid % (use --force if not)" msgstr "" -"gc ja està executant en la màquina '%s' pid % (useu --force si no)" +"gc ja s'està executant en la màquina '%s' pid % (useu --force si no)" #: builtin/gc.c:441 msgid "" @@ -6526,218 +7205,218 @@ msgstr "no s'ha pogut llegir l'arbre (%s)" msgid "unable to grep from object of type %s" msgstr "no es pot fer grep des d'un objecte de tipus %s" -#: builtin/grep.c:558 +#: builtin/grep.c:560 #, c-format msgid "switch `%c' expects a numerical value" msgstr "l'opció `%c' espera un valor numèric" -#: builtin/grep.c:575 +#: builtin/grep.c:577 #, c-format msgid "cannot open '%s'" msgstr "no es pot obrir '%s'" -#: builtin/grep.c:644 +#: builtin/grep.c:646 msgid "search in index instead of in the work tree" msgstr "cerca en l'índex en lloc de l'arbre de treball" -#: builtin/grep.c:646 +#: builtin/grep.c:648 msgid "find in contents not managed by git" msgstr "cerca en continguts no gestionats per git" -#: builtin/grep.c:648 +#: builtin/grep.c:650 msgid "search in both tracked and untracked files" msgstr "cerca tant en fitxers seguits com en no seguits" -#: builtin/grep.c:650 +#: builtin/grep.c:652 msgid "ignore files specified via '.gitignore'" msgstr "ignora els fitxers especificats mitjançant '.gitignore'" -#: builtin/grep.c:653 +#: builtin/grep.c:655 msgid "show non-matching lines" msgstr "mostra les línies no coincidents" -#: builtin/grep.c:655 +#: builtin/grep.c:657 msgid "case insensitive matching" msgstr "coincidència insensible a majúscula i minúscula" -#: builtin/grep.c:657 +#: builtin/grep.c:659 msgid "match patterns only at word boundaries" msgstr "coincideix amb els patrons només als límits de paraula" -#: builtin/grep.c:659 +#: builtin/grep.c:661 msgid "process binary files as text" msgstr "processa els fitxers binaris com a text" -#: builtin/grep.c:661 +#: builtin/grep.c:663 msgid "don't match patterns in binary files" msgstr "no coincideixis amb els patrons en els fitxers binaris" -#: builtin/grep.c:664 +#: builtin/grep.c:666 msgid "process binary files with textconv filters" msgstr "processa els fitxers binaris amb filtres de textconv" -#: builtin/grep.c:666 +#: builtin/grep.c:668 msgid "descend at most levels" msgstr "descendeix com a màxim nivells" -#: builtin/grep.c:670 +#: builtin/grep.c:672 msgid "use extended POSIX regular expressions" msgstr "usa les expressions regulars POSIX esteses" -#: builtin/grep.c:673 +#: builtin/grep.c:675 msgid "use basic POSIX regular expressions (default)" msgstr "usa les expressions regulars POSIX bàsiques (per defecte)" -#: builtin/grep.c:676 +#: builtin/grep.c:678 msgid "interpret patterns as fixed strings" msgstr "interpreta els patrons com a cadenes fixes" -#: builtin/grep.c:679 +#: builtin/grep.c:681 msgid "use Perl-compatible regular expressions" msgstr "usa les expressions regulars compatibles amb Perl" -#: builtin/grep.c:682 +#: builtin/grep.c:684 msgid "show line numbers" msgstr "mostra els números de línia" -#: builtin/grep.c:683 +#: builtin/grep.c:685 msgid "don't show filenames" msgstr "no mostris els noms de fitxer" -#: builtin/grep.c:684 +#: builtin/grep.c:686 msgid "show filenames" msgstr "mostra els noms de fitxer" -#: builtin/grep.c:686 +#: builtin/grep.c:688 msgid "show filenames relative to top directory" msgstr "mostra els noms de fitxer relatius al directori superior" -#: builtin/grep.c:688 +#: builtin/grep.c:690 msgid "show only filenames instead of matching lines" msgstr "mostra només els noms de fitxer en lloc de les línies coincidents" -#: builtin/grep.c:690 +#: builtin/grep.c:692 msgid "synonym for --files-with-matches" msgstr "sinònim de --files-with-matches" -#: builtin/grep.c:693 +#: builtin/grep.c:695 msgid "show only the names of files without match" msgstr "mostra només els noms dels fitxers sense coincidència" -#: builtin/grep.c:695 +#: builtin/grep.c:697 msgid "print NUL after filenames" msgstr "imprimeix NUL després dels noms de fitxer" -#: builtin/grep.c:697 +#: builtin/grep.c:699 msgid "show the number of matches instead of matching lines" msgstr "mostra el nombre de coincidències en lloc de les línies coincidents" -#: builtin/grep.c:698 +#: builtin/grep.c:700 msgid "highlight matches" msgstr "ressalta les coincidències" -#: builtin/grep.c:700 +#: builtin/grep.c:702 msgid "print empty line between matches from different files" msgstr "imprimeix una línia buida entre coincidències de fitxers distints" -#: builtin/grep.c:702 +#: builtin/grep.c:704 msgid "show filename only once above matches from same file" msgstr "" "mostra el nom de fitxer només una vegada a dalt de les coincidències del " "mateix fitxer" -#: builtin/grep.c:705 +#: builtin/grep.c:707 msgid "show context lines before and after matches" msgstr "mostra línies de context abans i després d'una coincidència" -#: builtin/grep.c:708 +#: builtin/grep.c:710 msgid "show context lines before matches" msgstr "mostra línies de context abans d'una coincidència" -#: builtin/grep.c:710 +#: builtin/grep.c:712 msgid "show context lines after matches" msgstr "mostra línies de context després d'una coincidència" -#: builtin/grep.c:712 +#: builtin/grep.c:714 msgid "use worker threads" msgstr "usa fils obrers" -#: builtin/grep.c:713 +#: builtin/grep.c:715 msgid "shortcut for -C NUM" msgstr "drecera per -C NUM" -#: builtin/grep.c:716 +#: builtin/grep.c:718 msgid "show a line with the function name before matches" msgstr "mostra una línia amb el nom de funció abans de les coincidències" -#: builtin/grep.c:718 +#: builtin/grep.c:720 msgid "show the surrounding function" msgstr "mostra la funció circumdant" -#: builtin/grep.c:721 +#: builtin/grep.c:723 msgid "read patterns from file" msgstr "llegeix els patrons des d'un fitxer" -#: builtin/grep.c:723 +#: builtin/grep.c:725 msgid "match " msgstr "coincideix amb " -#: builtin/grep.c:725 +#: builtin/grep.c:727 msgid "combine patterns specified with -e" msgstr "combina els patrons especificats amb -e" -#: builtin/grep.c:737 +#: builtin/grep.c:739 msgid "indicate hit with exit status without output" msgstr "indica coincidència amb estat de sortida sense sortida textual" -#: builtin/grep.c:739 +#: builtin/grep.c:741 msgid "show only matches from files that match all patterns" msgstr "" "mostra només les coincidències dels fitxers que coincideixin amb tots els " "patrons" -#: builtin/grep.c:741 +#: builtin/grep.c:743 msgid "show parse tree for grep expression" msgstr "mostra l'arbre d'anàlisis de l'expressió de grep" -#: builtin/grep.c:745 +#: builtin/grep.c:747 msgid "pager" msgstr "paginador" -#: builtin/grep.c:745 +#: builtin/grep.c:747 msgid "show matching files in the pager" msgstr "mostra els fitxers coincidents en el paginador" -#: builtin/grep.c:748 +#: builtin/grep.c:750 msgid "allow calling of grep(1) (ignored by this build)" msgstr "permet la invocació de grep(1) (ignorat per aquesta compilació)" -#: builtin/grep.c:811 +#: builtin/grep.c:813 msgid "no pattern given." msgstr "cap patró donat." -#: builtin/grep.c:843 builtin/index-pack.c:1475 +#: builtin/grep.c:845 builtin/index-pack.c:1479 #, c-format msgid "invalid number of threads specified (%d)" msgstr "s'ha especificat un nombre de fils no vàlid (%d)" -#: builtin/grep.c:873 +#: builtin/grep.c:875 msgid "--open-files-in-pager only works on the worktree" msgstr "--open-files-in-pager només funciona en l'arbre de treball" -#: builtin/grep.c:899 +#: builtin/grep.c:901 msgid "--cached or --untracked cannot be used with --no-index." msgstr "--cached o --untracked no es pot usar amb --no-index." -#: builtin/grep.c:904 +#: builtin/grep.c:906 msgid "--no-index or --untracked cannot be used with revs." msgstr "--no-index o --untracked no es pot usar amb revisions." -#: builtin/grep.c:907 +#: builtin/grep.c:909 msgid "--[no-]exclude-standard cannot be used for tracked contents." msgstr "--[no-]exclude-standard no es pot usar per als continguts seguits." -#: builtin/grep.c:915 +#: builtin/grep.c:917 msgid "both --cached and trees are given." msgstr "s'han donat ambdós --caches i arbres." @@ -6828,8 +7507,8 @@ msgstr "la versió d'emacsclient '%d' és massa vella (< 22)." #: builtin/help.c:130 builtin/help.c:151 builtin/help.c:160 builtin/help.c:168 #, c-format -msgid "failed to exec '%s': %s" -msgstr "s'ha fallat en executar '%s': %s" +msgid "failed to exec '%s'" +msgstr "s'ha fallat en executar '%s'" #: builtin/help.c:205 #, c-format @@ -6852,7 +7531,7 @@ msgstr "" #: builtin/help.c:334 #, c-format msgid "'%s': unknown man viewer." -msgstr "'%s': visualitzador de manuals desconegut" +msgstr "'%s': visualitzador de manuals desconegut." #: builtin/help.c:351 msgid "no man viewer handled the request" @@ -6862,332 +7541,331 @@ msgstr "cap visualitzador de manuals ha gestionat la sol·licitud" msgid "no info viewer handled the request" msgstr "cap visualitzador d'informació ha gestionat la sol·licitud" -#: builtin/help.c:408 +#: builtin/help.c:401 msgid "Defining attributes per path" msgstr "La definició d'atributs per camí" -#: builtin/help.c:409 +#: builtin/help.c:402 msgid "Everyday Git With 20 Commands Or So" msgstr "Git quotidià amb més o menys 20 ordres" -#: builtin/help.c:410 +#: builtin/help.c:403 msgid "A Git glossary" msgstr "Un glossari de Git" -#: builtin/help.c:411 +#: builtin/help.c:404 msgid "Specifies intentionally untracked files to ignore" msgstr "Especifica els fitxers intencionalment no seguits a ignorar" -#: builtin/help.c:412 +#: builtin/help.c:405 msgid "Defining submodule properties" msgstr "La definició de les propietats de submòduls" -#: builtin/help.c:413 +#: builtin/help.c:406 msgid "Specifying revisions and ranges for Git" msgstr "L'especificació de revisions i rangs per al Git" -#: builtin/help.c:414 +#: builtin/help.c:407 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:415 +#: builtin/help.c:408 msgid "An overview of recommended workflows with Git" msgstr "Una visió de conjunt de fluxos de treball recomanats amb Git" -#: builtin/help.c:427 +#: builtin/help.c:420 msgid "The common Git guides are:\n" msgstr "Les guies de Git comunes són:\n" -#: builtin/help.c:448 builtin/help.c:465 +#: builtin/help.c:441 builtin/help.c:458 #, c-format msgid "usage: %s%s" msgstr "ús: %s%s" -#: builtin/help.c:481 +#: builtin/help.c:474 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "`git %s' és un àlies de `%s'" -#: builtin/index-pack.c:152 +#: builtin/index-pack.c:153 #, c-format msgid "unable to open %s" msgstr "no s'ha pogut obrir %s" -#: builtin/index-pack.c:202 +#: builtin/index-pack.c:203 #, c-format msgid "object type mismatch at %s" msgstr "hi ha una discordança de tipus d'objecte a %s" -#: builtin/index-pack.c:222 +#: builtin/index-pack.c:223 #, c-format msgid "did not receive expected object %s" msgstr "no s'ha rebut l'objecte esperat %s" -#: builtin/index-pack.c:225 +#: builtin/index-pack.c:226 #, c-format msgid "object %s: expected type %s, found %s" msgstr "objecte %s: tipus %s esperat, %s trobat" -#: builtin/index-pack.c:267 +#: builtin/index-pack.c:268 #, c-format msgid "cannot fill %d byte" msgid_plural "cannot fill %d bytes" msgstr[0] "no es pot omplir %d octet" msgstr[1] "no es pot omplir %d octets" -#: builtin/index-pack.c:277 +#: builtin/index-pack.c:278 msgid "early EOF" msgstr "EOF prematur" -#: builtin/index-pack.c:278 +#: builtin/index-pack.c:279 msgid "read error on input" msgstr "error de lectura d'entrada" -#: builtin/index-pack.c:290 +#: builtin/index-pack.c:291 msgid "used more bytes than were available" msgstr "s'han usat més octets que hi havia disponibles" -#: builtin/index-pack.c:297 +#: builtin/index-pack.c:298 msgid "pack too large for current definition of off_t" msgstr "paquet massa gran per a la definició actual d'off_t" -#: builtin/index-pack.c:313 +#: builtin/index-pack.c:314 #, c-format msgid "unable to create '%s'" msgstr "no es pot crear '%s'" -#: builtin/index-pack.c:318 +#: builtin/index-pack.c:319 #, c-format msgid "cannot open packfile '%s'" msgstr "no es pot obrir el fitxer de paquet '%s'" -#: builtin/index-pack.c:332 +#: builtin/index-pack.c:333 msgid "pack signature mismatch" -msgstr "hi ha una discordança de firma de paquet" +msgstr "hi ha una discordança de signatura de paquet" -#: builtin/index-pack.c:334 +#: builtin/index-pack.c:335 #, c-format msgid "pack version % unsupported" msgstr "la versió de paquet % no és compatible" -#: builtin/index-pack.c:352 +#: builtin/index-pack.c:353 #, c-format -msgid "pack has bad object at offset %lu: %s" -msgstr "el paquet té un objecte dolent a la posició %lu: %s" +msgid "pack has bad object at offset %: %s" +msgstr "el paquet té un objecte dolent a la posició %: %s" -#: builtin/index-pack.c:473 +#: builtin/index-pack.c:475 #, c-format msgid "inflate returned %d" msgstr "la inflació ha retornat %d" -#: builtin/index-pack.c:522 +#: builtin/index-pack.c:524 msgid "offset value overflow for delta base object" msgstr "desbordament de valor de desplaçament per a l'objecte base de delta" -#: builtin/index-pack.c:530 +#: builtin/index-pack.c:532 msgid "delta base offset is out of bound" msgstr "el desplaçament de base de delta està fora de límits" -#: builtin/index-pack.c:538 +#: builtin/index-pack.c:540 #, c-format msgid "unknown object type %d" msgstr "tipus d'objecte desconegut %d" -#: builtin/index-pack.c:569 +#: builtin/index-pack.c:571 msgid "cannot pread pack file" msgstr "no es pot fer pread en el fitxer de paquet" -#: builtin/index-pack.c:571 +#: builtin/index-pack.c:573 #, c-format -msgid "premature end of pack file, %lu byte missing" -msgid_plural "premature end of pack file, %lu bytes missing" -msgstr[0] "final prematur de fitxer de paquet, manca %lu octet" -msgstr[1] "final prematur de fitxer de paquet, manquen %lu octets" +msgid "premature end of pack file, % byte missing" +msgid_plural "premature end of pack file, % bytes missing" +msgstr[0] "el final del fitxer de paquet és prematur, manca % octet" +msgstr[1] "" +"el final del fitxer de paquet és prematur, manquen % octets" -#: builtin/index-pack.c:597 +#: builtin/index-pack.c:599 msgid "serious inflate inconsistency" msgstr "hi ha una inconsistència seriosa d'inflació" -#: builtin/index-pack.c:743 builtin/index-pack.c:749 builtin/index-pack.c:772 -#: builtin/index-pack.c:806 builtin/index-pack.c:815 +#: builtin/index-pack.c:745 builtin/index-pack.c:751 builtin/index-pack.c:774 +#: builtin/index-pack.c:808 builtin/index-pack.c:817 #, c-format msgid "SHA1 COLLISION FOUND WITH %s !" msgstr "S'HA TROBAT UNA COL·LISIÓ SHA1 AMB %s !" -#: builtin/index-pack.c:746 builtin/pack-objects.c:162 -#: builtin/pack-objects.c:254 +#: builtin/index-pack.c:748 builtin/pack-objects.c:164 +#: builtin/pack-objects.c:256 #, c-format msgid "unable to read %s" msgstr "no s'ha pogut llegir %s" -#: builtin/index-pack.c:812 +#: builtin/index-pack.c:814 #, c-format msgid "cannot read existing object %s" msgstr "no es pot llegir l'objecte existent %s" -#: builtin/index-pack.c:826 +#: builtin/index-pack.c:828 #, c-format msgid "invalid blob object %s" msgstr "objecte de blob no vàlid %s" -#: builtin/index-pack.c:840 +#: builtin/index-pack.c:842 #, c-format msgid "invalid %s" msgstr "%s no vàlid" -#: builtin/index-pack.c:843 +#: builtin/index-pack.c:845 msgid "Error in object" msgstr "Error en objecte" -#: builtin/index-pack.c:845 +#: builtin/index-pack.c:847 #, c-format msgid "Not all child objects of %s are reachable" msgstr "No tots els objectes fills de %s són abastables" -#: builtin/index-pack.c:917 builtin/index-pack.c:948 +#: builtin/index-pack.c:919 builtin/index-pack.c:950 msgid "failed to apply delta" msgstr "s'ha fallat en aplicar la delta" -#: builtin/index-pack.c:1118 +#: builtin/index-pack.c:1120 msgid "Receiving objects" -msgstr "Rebent objectes" +msgstr "S'estan rebent objectes" -#: builtin/index-pack.c:1118 +#: builtin/index-pack.c:1120 msgid "Indexing objects" -msgstr "Indexant objectes" +msgstr "S'estan indexant objectes" -#: builtin/index-pack.c:1150 +#: builtin/index-pack.c:1152 msgid "pack is corrupted (SHA1 mismatch)" msgstr "el paquet és malmès (discordança SHA1)" -#: builtin/index-pack.c:1155 +#: builtin/index-pack.c:1157 msgid "cannot fstat packfile" msgstr "no es pot fer fstat en el fitxer de paquet" -#: builtin/index-pack.c:1158 +#: builtin/index-pack.c:1160 msgid "pack has junk at the end" msgstr "el paquet té brossa al seu final" -#: builtin/index-pack.c:1169 +#: builtin/index-pack.c:1171 msgid "confusion beyond insanity in parse_pack_objects()" msgstr "confusió més enllà de la bogeria en parse_pack_objects()" -#: builtin/index-pack.c:1194 +#: builtin/index-pack.c:1196 msgid "Resolving deltas" -msgstr "Resolent les deltes" +msgstr "S'estan resolent les deltes" -#: builtin/index-pack.c:1205 +#: builtin/index-pack.c:1207 #, c-format msgid "unable to create thread: %s" msgstr "no s'ha pogut crear fil: %s" -#: builtin/index-pack.c:1247 +#: builtin/index-pack.c:1249 msgid "confusion beyond insanity" msgstr "confusió més enllà de la bogeria" -#: builtin/index-pack.c:1253 +#: builtin/index-pack.c:1255 #, c-format -msgid "completed with %d local objects" -msgstr "s'ha completat amb %d objectes locals" +msgid "completed with %d local object" +msgid_plural "completed with %d local objects" +msgstr[0] "s'ha completat amb %d objecte local" +msgstr[1] "s'ha completat amb %d objectes locals" -#: builtin/index-pack.c:1263 +#: builtin/index-pack.c:1267 #, c-format msgid "Unexpected tail checksum for %s (disk corruption?)" msgstr "Suma de verificació final no esperada per a %s (corrupció de disc?)" -#: builtin/index-pack.c:1267 +#: builtin/index-pack.c:1271 #, c-format msgid "pack has %d unresolved delta" msgid_plural "pack has %d unresolved deltas" msgstr[0] "El paquet té %d delta no resolta" msgstr[1] "El paquet té %d deltes no resoltes" -#: builtin/index-pack.c:1291 +#: builtin/index-pack.c:1295 #, c-format msgid "unable to deflate appended object (%d)" msgstr "no s'ha pogut desinflar l'objecte annexat (%d)" -#: builtin/index-pack.c:1367 +#: builtin/index-pack.c:1371 #, c-format msgid "local object %s is corrupt" msgstr "l'objecte local %s és malmès" -#: builtin/index-pack.c:1391 +#: builtin/index-pack.c:1395 msgid "error while closing pack file" msgstr "error en tancar el fitxer de paquet" -#: builtin/index-pack.c:1404 +#: builtin/index-pack.c:1408 #, c-format msgid "cannot write keep file '%s'" msgstr "no es pot escriure el fitxer a retenir '%s'" -#: builtin/index-pack.c:1412 +#: builtin/index-pack.c:1416 #, c-format msgid "cannot close written keep file '%s'" msgstr "no es pot tancar el fitxer escrit a retenir '%s'" -#: builtin/index-pack.c:1425 +#: builtin/index-pack.c:1429 msgid "cannot store pack file" msgstr "no es pot emmagatzemar el fitxer de paquet" -#: builtin/index-pack.c:1436 +#: builtin/index-pack.c:1440 msgid "cannot store index file" msgstr "no es pot emmagatzemar el fitxer d'índex" -#: builtin/index-pack.c:1469 +#: builtin/index-pack.c:1473 #, c-format msgid "bad pack.indexversion=%" msgstr "pack.indexversion=% dolent" -#: builtin/index-pack.c:1479 builtin/index-pack.c:1664 +#: builtin/index-pack.c:1483 builtin/index-pack.c:1681 #, c-format msgid "no threads support, ignoring %s" -msgstr "no hi ha suport de fils, ignorant %s" +msgstr "no hi ha suport de fils, s'està ignorant %s" -#: builtin/index-pack.c:1538 +#: builtin/index-pack.c:1542 #, c-format msgid "Cannot open existing pack file '%s'" msgstr "No es pot obrir el fitxer de paquet existent '%s'" -#: builtin/index-pack.c:1540 +#: builtin/index-pack.c:1544 #, c-format msgid "Cannot open existing pack idx file for '%s'" msgstr "No es pot obrir el fitxer d'índex de paquets existent de '%s'" -#: builtin/index-pack.c:1587 +#: builtin/index-pack.c:1591 #, c-format msgid "non delta: %d object" msgid_plural "non delta: %d objects" msgstr[0] "sense delta: %d objecte" msgstr[1] "sense delta: %d objectes" -#: builtin/index-pack.c:1594 +#: builtin/index-pack.c:1598 #, c-format msgid "chain length = %d: %lu object" msgid_plural "chain length = %d: %lu objects" msgstr[0] "longitud de cadena = %d: %lu objecte" msgstr[1] "longitud de cadena = %d: %lu objectes" -#: builtin/index-pack.c:1624 -msgid "Cannot come back to cwd" -msgstr "No es pot tornar al directori de treball actual" +#: builtin/index-pack.c:1611 +#, c-format +msgid "packfile name '%s' does not end with '.pack'" +msgstr "el nom del fitxer de paquet '%s' no acaba amb '.pack'" -#: builtin/index-pack.c:1676 builtin/index-pack.c:1679 -#: builtin/index-pack.c:1691 builtin/index-pack.c:1695 +#: builtin/index-pack.c:1693 builtin/index-pack.c:1696 +#: builtin/index-pack.c:1712 builtin/index-pack.c:1716 #, c-format msgid "bad %s" msgstr "%s dolent" -#: builtin/index-pack.c:1709 +#: builtin/index-pack.c:1730 msgid "--fix-thin cannot be used without --stdin" msgstr "--fix-thin no es pot usar sense --stdin" -#: builtin/index-pack.c:1713 builtin/index-pack.c:1722 -#, c-format -msgid "packfile name '%s' does not end with '.pack'" -msgstr "el nom de fitxer de paquet '%s' no acaba amb '.pack'" - -#: builtin/index-pack.c:1730 +#: builtin/index-pack.c:1738 msgid "--verify with no packfile name given" msgstr "s'ha donat --verify sense nom de fitxer de paquet" @@ -7224,54 +7902,54 @@ msgstr "no es pot copiar '%s' a '%s'" #: builtin/init-db.c:89 #, c-format msgid "ignoring template %s" -msgstr "ignorant la plantilla %s" +msgstr "s'està ignorant la plantilla %s" -#: builtin/init-db.c:118 +#: builtin/init-db.c:120 #, c-format msgid "templates not found %s" msgstr "no s'han trobat les plantilles %s" -#: builtin/init-db.c:131 +#: builtin/init-db.c:135 #, 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'" +msgid "not copying templates from '%s': %s" +msgstr "no s'està copiant plantilles de '%s': %s" -#: builtin/init-db.c:309 builtin/init-db.c:312 +#: builtin/init-db.c:312 builtin/init-db.c:315 #, c-format msgid "%s already exists" msgstr "%s ja existeix" -#: builtin/init-db.c:340 +#: builtin/init-db.c:344 #, c-format msgid "unable to handle file type %d" msgstr "no s'ha pogut gestionar el tipus de fitxer %d" -#: builtin/init-db.c:343 +#: builtin/init-db.c:347 #, c-format msgid "unable to move %s to %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:399 +#: builtin/init-db.c:402 #, c-format -msgid "%s%s Git repository in %s%s\n" -msgstr "%s dipòsit de Git%s a %s%s\n" +msgid "Reinitialized existing shared Git repository in %s%s\n" +msgstr "S'ha reinicialitzat el dipòsit compartit existent del Git en %s%s\n" -#: builtin/init-db.c:400 -msgid "Reinitialized existing" -msgstr "S'ha reinicialitzat un existent" +#: builtin/init-db.c:403 +#, c-format +msgid "Reinitialized existing Git repository in %s%s\n" +msgstr "S'ha reinicialitzat el dipòsit existent del Git en %s%s\n" -#: builtin/init-db.c:400 -msgid "Initialized empty" -msgstr "S'ha inicialitzat un buit" +#: builtin/init-db.c:407 +#, c-format +msgid "Initialized empty shared Git repository in %s%s\n" +msgstr "S'ha inicialitzat un dipòsit compartit buit del Git en %s%s\n" -#: builtin/init-db.c:401 -msgid " shared" -msgstr " compartit" +#: builtin/init-db.c:408 +#, c-format +msgid "Initialized empty Git repository in %s%s\n" +msgstr "S'ha inicialitzat un dipòsit buit del Git en %s%s\n" -#: builtin/init-db.c:448 +#: builtin/init-db.c:455 msgid "" "git init [-q | --quiet] [--bare] [--template=] [--" "shared[=]] []" @@ -7279,25 +7957,25 @@ msgstr "" "git init [-q | --quiet] [--bare] [--template=] [--" "shared[=]] []" -#: builtin/init-db.c:471 +#: builtin/init-db.c:478 msgid "permissions" msgstr "permisos" -#: builtin/init-db.c:472 +#: builtin/init-db.c:479 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:506 builtin/init-db.c:511 +#: builtin/init-db.c:513 builtin/init-db.c:518 #, c-format msgid "cannot mkdir %s" msgstr "no es pot mkdir %s" -#: builtin/init-db.c:515 +#: builtin/init-db.c:522 #, c-format msgid "cannot chdir to %s" -msgstr "no es pot chdir a %s" +msgstr "no es pot canviar de directori a %s" -#: builtin/init-db.c:536 +#: builtin/init-db.c:543 #, c-format msgid "" "%s (or --work-tree=) not allowed without specifying %s (or --git-" @@ -7306,7 +7984,7 @@ msgstr "" "no es permet %s (o --work-tree=) sense especificar %s (o --git-" "dir=)" -#: builtin/init-db.c:564 +#: builtin/init-db.c:571 #, c-format msgid "Cannot access work tree '%s'" msgstr "No es pot accedir a l'arbre de treball '%s'" @@ -7339,278 +8017,330 @@ msgstr "remolcs a afegir" msgid "no input file given for in-place editing" msgstr "no s'ha donat cap fitxer d'entrada per a edició in situ" -#: builtin/log.c:43 +#: builtin/log.c:44 msgid "git log [] [] [[--] ...]" msgstr "git log [] [] [[--] ...]" -#: builtin/log.c:44 +#: builtin/log.c:45 msgid "git show [] ..." msgstr "git show [] ..." -#: builtin/log.c:83 +#: builtin/log.c:84 #, c-format msgid "invalid --decorate option: %s" msgstr "opció --decorate no vàlida: %s" -#: builtin/log.c:131 +#: builtin/log.c:139 msgid "suppress diff output" msgstr "omet la sortida de diferències" -#: builtin/log.c:132 +#: builtin/log.c:140 msgid "show source" msgstr "mostra la font" -#: builtin/log.c:133 +#: builtin/log.c:141 msgid "Use mail map file" msgstr "Usa el fitxer de mapa de correu" -#: builtin/log.c:134 +#: builtin/log.c:142 msgid "decorate options" msgstr "opcions de decoració" -#: builtin/log.c:137 +#: builtin/log.c:145 msgid "Process line range n,m in file, counting from 1" msgstr "Processa el rang de línies n,m en el fitxer, comptant des d'1" -#: builtin/log.c:233 +#: builtin/log.c:241 #, c-format msgid "Final output: %d %s\n" msgstr "Sortida final: %d %s\n" -#: builtin/log.c:465 +#: builtin/log.c:486 #, c-format msgid "git show %s: bad file" msgstr "git show %s: fitxer dolent" -#: builtin/log.c:479 builtin/log.c:572 +#: builtin/log.c:500 builtin/log.c:594 #, c-format msgid "Could not read object %s" msgstr "No es pot llegir l'objecte %s" -#: builtin/log.c:596 +#: builtin/log.c:618 #, c-format msgid "Unknown type: %d" msgstr "Tipus desconegut: %d" -#: builtin/log.c:715 +#: builtin/log.c:739 msgid "format.headers without value" msgstr "format.headers sense valor" -#: builtin/log.c:801 +#: builtin/log.c:839 msgid "name of output directory is too long" msgstr "el nom del directori de sortida és massa llarg" -#: builtin/log.c:816 +#: builtin/log.c:854 #, c-format msgid "Cannot open patch file %s" msgstr "No es pot obrir el fitxer de pedaç %s" -#: builtin/log.c:830 +#: builtin/log.c:868 msgid "Need exactly one range." msgstr "Cal exactament un rang." -#: builtin/log.c:840 +#: builtin/log.c:878 msgid "Not a range." msgstr "No és un rang." -#: builtin/log.c:946 +#: builtin/log.c:984 msgid "Cover letter needs email format" msgstr "La carta de presentació necessita el format de correu electrònic" -#: builtin/log.c:1025 +#: builtin/log.c:1064 #, c-format msgid "insane in-reply-to: %s" msgstr "in-reply-to boig: %s" -#: builtin/log.c:1053 +#: builtin/log.c:1092 msgid "git format-patch [] [ | ]" msgstr "git format-patch [] [ | ]" -#: builtin/log.c:1098 +#: builtin/log.c:1137 msgid "Two output directories?" -msgstr "Dos directoris de sortida?" +msgstr "Hi ha dos directoris de sortida?" + +#: builtin/log.c:1244 builtin/log.c:1883 builtin/log.c:1885 builtin/log.c:1897 +#, c-format +msgid "Unknown commit %s" +msgstr "Comissió desconeguda %s" + +#: builtin/log.c:1254 builtin/notes.c:254 builtin/notes.c:305 +#: builtin/notes.c:307 builtin/notes.c:370 builtin/notes.c:425 +#: builtin/notes.c:511 builtin/notes.c:516 builtin/notes.c:594 +#: builtin/notes.c:657 builtin/notes.c:882 builtin/tag.c:455 +#, 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/log.c:1259 +msgid "Could not find exact merge base." +msgstr "No s'ha pogut trobar la base exacta de fusió." + +#: builtin/log.c:1263 +msgid "" +"Failed to get upstream, if you want to record base commit automatically,\n" +"please use git branch --set-upstream-to to track a remote branch.\n" +"Or you could specify base commit by --base= manually." +msgstr "" +"S'ha fallat en obtenir la font. Si voleu registrar la comissió base\n" +"automàticament, si us plau, useu git branch --set-upstream-to per a\n" +"seguir una branca remot. O podeu especificar la comissió base manualment\n" +"amb --base=." + +#: builtin/log.c:1283 +msgid "Failed to find exact merge base" +msgstr "S'ha fallat en trobar la base exacta de fusió." + +#: builtin/log.c:1294 +msgid "base commit should be the ancestor of revision list" +msgstr "la comissió base ha de ser l'avantpassat de la llista de revisions" + +#: builtin/log.c:1298 +msgid "base commit shouldn't be in revision list" +msgstr "la comissió base no ha de ser en la llista de revisions" -#: builtin/log.c:1214 +#: builtin/log.c:1347 +msgid "cannot get patch id" +msgstr "no es pot obtenir l'id del pedaç" + +#: builtin/log.c:1404 msgid "use [PATCH n/m] even with a single patch" msgstr "usa [PATCH n/m] fins i tot amb un sol pedaç" -#: builtin/log.c:1217 +#: builtin/log.c:1407 msgid "use [PATCH] even with multiple patches" msgstr "usa [PATCH] fins i tot amb múltiples pedaços" -#: builtin/log.c:1221 +#: builtin/log.c:1411 msgid "print patches to standard out" msgstr "imprimeix els pedaços a la sortida estàndard" -#: builtin/log.c:1223 +#: builtin/log.c:1413 msgid "generate a cover letter" msgstr "genera una carta de presentació" -#: builtin/log.c:1225 +#: builtin/log.c:1415 msgid "use simple number sequence for output file names" msgstr "usa una seqüència de números per als noms dels fitxers de sortida" -#: builtin/log.c:1226 +#: builtin/log.c:1416 msgid "sfx" msgstr "sufix" -#: builtin/log.c:1227 +#: builtin/log.c:1417 msgid "use instead of '.patch'" msgstr "usa en lloc de '.patch'" -#: builtin/log.c:1229 +#: builtin/log.c:1419 msgid "start numbering patches at instead of 1" msgstr "comença numerant els pedaços a en lloc d'1" -#: builtin/log.c:1231 +#: builtin/log.c:1421 msgid "mark the series as Nth re-roll" msgstr "marca la sèrie com a l'enèsima llançada" -#: builtin/log.c:1233 +#: builtin/log.c:1423 msgid "Use [] instead of [PATCH]" msgstr "Usa [] en lloc de [PATCH]" -#: builtin/log.c:1236 +#: builtin/log.c:1426 msgid "store resulting files in " msgstr "emmagatzema els fitxers resultants a " -#: builtin/log.c:1239 +#: builtin/log.c:1429 msgid "don't strip/add [PATCH]" msgstr "no despullis/afegeixis [PATCH]" -#: builtin/log.c:1242 +#: builtin/log.c:1432 msgid "don't output binary diffs" msgstr "no emetis diferències binàries" -#: builtin/log.c:1244 +#: builtin/log.c:1434 msgid "output all-zero hash in From header" msgstr "emet un hash de tots zeros en la capçalera From" -#: builtin/log.c:1246 +#: builtin/log.c:1436 msgid "don't include a patch matching a commit upstream" msgstr "no incloguis pedaços que coincideixin amb comissions a la font" -#: builtin/log.c:1248 +#: builtin/log.c:1438 msgid "show patch format instead of default (patch + stat)" msgstr "" "mostra el format de pedaç en lloc del per defecte (pedaç + estadístiques)" -#: builtin/log.c:1250 +#: builtin/log.c:1440 msgid "Messaging" msgstr "Missatgeria" -#: builtin/log.c:1251 +#: builtin/log.c:1441 msgid "header" msgstr "capçalera" -#: builtin/log.c:1252 +#: builtin/log.c:1442 msgid "add email header" msgstr "afegeix una capçalera de correu electrònic" -#: builtin/log.c:1253 builtin/log.c:1255 +#: builtin/log.c:1443 builtin/log.c:1445 msgid "email" msgstr "correu electrònic" -#: builtin/log.c:1253 +#: builtin/log.c:1443 msgid "add To: header" msgstr "afegeix la capçalera To:" -#: builtin/log.c:1255 +#: builtin/log.c:1445 msgid "add Cc: header" msgstr "afegeix la capçalera Cc:" -#: builtin/log.c:1257 +#: builtin/log.c:1447 msgid "ident" msgstr "identitat" -#: builtin/log.c:1258 +#: builtin/log.c:1448 msgid "set From address to (or committer ident if absent)" msgstr "" "estableix l'adreça From a (o la identitat del comitent si manca)" -#: builtin/log.c:1260 +#: builtin/log.c:1450 msgid "message-id" msgstr "ID de missatge" -#: builtin/log.c:1261 +#: builtin/log.c:1451 msgid "make first mail a reply to " -msgstr "fes del primer missatge una resposta a " +msgstr "fes que el primer missatge sigui una resposta a " -#: builtin/log.c:1262 builtin/log.c:1265 +#: builtin/log.c:1452 builtin/log.c:1455 msgid "boundary" msgstr "límit" -#: builtin/log.c:1263 +#: builtin/log.c:1453 msgid "attach the patch" msgstr "ajunta el pedaç" -#: builtin/log.c:1266 +#: builtin/log.c:1456 msgid "inline the patch" msgstr "posa el pedaç en el cos" -#: builtin/log.c:1270 +#: builtin/log.c:1460 msgid "enable message threading, styles: shallow, deep" msgstr "habilita l'enfilada de missatges, estils: shallow, deep" -#: builtin/log.c:1272 +#: builtin/log.c:1462 msgid "signature" -msgstr "firma" +msgstr "signatura" -#: builtin/log.c:1273 +#: builtin/log.c:1463 msgid "add a signature" -msgstr "afegeix una firma" +msgstr "afegeix una signatura" + +#: builtin/log.c:1464 +msgid "base-commit" +msgstr "comissió base" -#: builtin/log.c:1275 +#: builtin/log.c:1465 +msgid "add prerequisite tree info to the patch series" +msgstr "afegeix la informació d'arbre prerequerida a la sèrie de pedaços" + +#: builtin/log.c:1467 msgid "add a signature from a file" -msgstr "afegeix una firma des d'un fitxer" +msgstr "afegeix una signatura des d'un fitxer" -#: builtin/log.c:1276 +#: builtin/log.c:1468 msgid "don't print the patch filenames" msgstr "no imprimeixis els noms de fitxer del pedaç" -#: builtin/log.c:1365 +#: builtin/log.c:1558 msgid "-n and -k are mutually exclusive." msgstr "-n i -k són mutualment exclusius." -#: builtin/log.c:1367 +#: builtin/log.c:1560 msgid "--subject-prefix and -k are mutually exclusive." msgstr "--subject-prefix i -k són mutualment exclusius." -#: builtin/log.c:1375 +#: builtin/log.c:1568 msgid "--name-only does not make sense" msgstr "--name-only no té sentit" -#: builtin/log.c:1377 +#: builtin/log.c:1570 msgid "--name-status does not make sense" msgstr "--name-status no té sentit" -#: builtin/log.c:1379 +#: builtin/log.c:1572 msgid "--check does not make sense" msgstr "--check no té sentit" -#: builtin/log.c:1407 +#: builtin/log.c:1602 msgid "standard output, or directory, which one?" msgstr "sortida estàndard o directori, quin dels dos?" -#: builtin/log.c:1409 +#: builtin/log.c:1604 #, c-format msgid "Could not create directory '%s'" msgstr "No s'ha pogut crear el directori '%s'" -#: builtin/log.c:1506 +#: builtin/log.c:1698 #, c-format msgid "unable to read signature file '%s'" -msgstr "no s'ha pogut llegir el fitxer de firma '%s'" +msgstr "no s'ha pogut llegir el fitxer de signatura '%s'" -#: builtin/log.c:1569 +#: builtin/log.c:1769 msgid "Failed to create output files" msgstr "S'ha fallat en crear els fitxers de sortida" -#: builtin/log.c:1617 +#: builtin/log.c:1818 msgid "git cherry [-v] [ [ []]]" msgstr "git cherry [-v] [ [ []]]" -#: builtin/log.c:1671 +#: builtin/log.c:1872 #, c-format msgid "" "Could not find a tracked remote branch, please specify manually.\n" @@ -7618,106 +8348,101 @@ msgstr "" "No s'ha pogut trobar una branca remota seguida. Si us plau, especifiqueu " " manualment.\n" -#: builtin/log.c:1682 builtin/log.c:1684 builtin/log.c:1696 -#, c-format -msgid "Unknown commit %s" -msgstr "Comissió desconeguda %s" - -#: builtin/ls-files.c:378 +#: builtin/ls-files.c:379 msgid "git ls-files [] [...]" msgstr "git ls-files [] [...]" -#: builtin/ls-files.c:427 +#: builtin/ls-files.c:428 msgid "identify the file status with tags" msgstr "identifica l'estat de fitxer amb etiquetes" -#: builtin/ls-files.c:429 +#: builtin/ls-files.c:430 msgid "use lowercase letters for 'assume unchanged' files" msgstr "usa lletres minúscules per als fitxers 'assume unchanged'" -#: builtin/ls-files.c:431 +#: builtin/ls-files.c:432 msgid "show cached files in the output (default)" msgstr "" "mostra en la sortida els fitxers desats en la memòria cau (per defecte)" -#: builtin/ls-files.c:433 +#: builtin/ls-files.c:434 msgid "show deleted files in the output" msgstr "mostra en la sortida els fitxers suprimits" -#: builtin/ls-files.c:435 +#: builtin/ls-files.c:436 msgid "show modified files in the output" msgstr "mostra en la sortida els fitxers modificats" -#: builtin/ls-files.c:437 +#: builtin/ls-files.c:438 msgid "show other files in the output" msgstr "mostra en la sortida els altres fitxers" -#: builtin/ls-files.c:439 +#: builtin/ls-files.c:440 msgid "show ignored files in the output" msgstr "mostra en la sortida els fitxers ignorats" -#: builtin/ls-files.c:442 +#: builtin/ls-files.c:443 msgid "show staged contents' object name in the output" msgstr "mostra en la sortida el nom d'objecte dels continguts allistats" -#: builtin/ls-files.c:444 +#: builtin/ls-files.c:445 msgid "show files on the filesystem that need to be removed" msgstr "mostra els fitxers en el sistema de fitxers que s'han d'eliminar" -#: builtin/ls-files.c:446 +#: builtin/ls-files.c:447 msgid "show 'other' directories' names only" msgstr "mostra només els noms dels directoris 'other'" -#: builtin/ls-files.c:448 +#: builtin/ls-files.c:449 msgid "show line endings of files" msgstr "mostra els terminis de línia dels fitxers" -#: builtin/ls-files.c:450 +#: builtin/ls-files.c:451 msgid "don't show empty directories" msgstr "no mostris els directoris buits" -#: builtin/ls-files.c:453 +#: builtin/ls-files.c:454 msgid "show unmerged files in the output" msgstr "mostra en la sortida els fitxers sense fusionar" -#: builtin/ls-files.c:455 +#: builtin/ls-files.c:456 msgid "show resolve-undo information" msgstr "mostra la informació de resolució de desfet" -#: builtin/ls-files.c:457 +#: builtin/ls-files.c:458 msgid "skip files matching pattern" msgstr "salta els fitxers coincidents amb el patró" -#: builtin/ls-files.c:460 +#: builtin/ls-files.c:461 msgid "exclude patterns are read from " msgstr "els patrons d'exclusió es llegeixen de " -#: builtin/ls-files.c:463 +#: builtin/ls-files.c:464 msgid "read additional per-directory exclude patterns in " msgstr "llegeix els patrons addicionals d'exclusió per directori en " -#: builtin/ls-files.c:465 +#: builtin/ls-files.c:466 msgid "add the standard git exclusions" msgstr "afegeix les exclusions estàndards de git" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:469 msgid "make the output relative to the project top directory" msgstr "fes que la sortida sigui relativa al directori superior del projecte" -#: builtin/ls-files.c:471 +#: builtin/ls-files.c:472 msgid "if any is not in the index, treat this as an error" msgstr "si qualsevol no és en l'índex, tracta això com a error" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:473 msgid "tree-ish" msgstr "arbre" -#: builtin/ls-files.c:473 +#: builtin/ls-files.c:474 msgid "pretend that paths removed since are still present" msgstr "" "pretén que els camins eliminats després de encara siguin presents" -#: builtin/ls-files.c:475 +#: builtin/ls-files.c:476 msgid "show debugging data" msgstr "mostra les dades de depuració" @@ -7766,7 +8491,7 @@ msgstr "surt amb codi de sortida 2 si no es troba cap referència coincident" #: builtin/ls-remote.c:64 msgid "show underlying ref in addition to the object pointed by it" -msgstr "mostra la referència subjacent en adició a l'objecte que senyali" +msgstr "mostra la referència subjacent a més de l'objecte que senyali" #: builtin/ls-tree.c:28 msgid "git ls-tree [] [...]" @@ -7805,184 +8530,175 @@ msgid "list entire tree; not just current directory (implies --full-name)" msgstr "" "llista l'arbre sencer; no només el directori actual (implica --full-name)" -#: builtin/merge.c:45 +#: builtin/merge.c:46 msgid "git merge [] [...]" msgstr "git merge [] [...]" -#: builtin/merge.c:46 +#: builtin/merge.c:47 msgid "git merge [] HEAD " msgstr "git merge [] HEAD " -#: builtin/merge.c:47 +#: builtin/merge.c:48 msgid "git merge --abort" msgstr "git merge --abort" -#: builtin/merge.c:100 +#: builtin/merge.c:102 msgid "switch `m' requires a value" msgstr "l'opció `m' requereix un valor" -#: builtin/merge.c:137 +#: builtin/merge.c:139 #, 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:138 +#: builtin/merge.c:140 #, c-format msgid "Available strategies are:" msgstr "Les estratègies disponibles són:" -#: builtin/merge.c:143 +#: builtin/merge.c:145 #, c-format msgid "Available custom strategies are:" msgstr "Les estratègies personalitzades disponibles són:" -#: builtin/merge.c:193 builtin/pull.c:123 +#: builtin/merge.c:195 builtin/pull.c:126 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:196 builtin/pull.c:126 +#: builtin/merge.c:198 builtin/pull.c:129 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:197 builtin/pull.c:129 +#: builtin/merge.c:199 builtin/pull.c:132 msgid "(synonym to --stat)" msgstr "(sinònim de --stat)" -#: builtin/merge.c:199 builtin/pull.c:132 +#: builtin/merge.c:201 builtin/pull.c:135 msgid "add (at most ) entries from shortlog to merge commit message" msgstr "" "afegeix (com a màxim ) entrades del registre curt al missatge de comissió " "de fusió" -#: builtin/merge.c:202 builtin/pull.c:135 +#: builtin/merge.c:204 builtin/pull.c:138 msgid "create a single commit instead of doing a merge" msgstr "crea una única comissió en lloc de fusionar" -#: builtin/merge.c:204 builtin/pull.c:138 +#: builtin/merge.c:206 builtin/pull.c:141 msgid "perform a commit if the merge succeeds (default)" msgstr "realitza una comissió si la fusió té èxit (per defecte)" -#: builtin/merge.c:206 builtin/pull.c:141 +#: builtin/merge.c:208 builtin/pull.c:144 msgid "edit message before committing" msgstr "edita el missatge abans de cometre" -#: builtin/merge.c:207 +#: builtin/merge.c:209 msgid "allow fast-forward (default)" msgstr "permet l'avanç ràpid (per defecte)" -#: builtin/merge.c:209 builtin/pull.c:147 +#: builtin/merge.c:211 builtin/pull.c:150 msgid "abort if fast-forward is not possible" msgstr "avorta si l'avanç ràpid no és possible" -#: 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:215 builtin/pull.c:153 +msgid "verify that the named commit has a valid GPG signature" +msgstr "verifica que la comissió anomenada tingui una signatura GPG vàlida" -#: builtin/merge.c:214 builtin/notes.c:770 builtin/pull.c:152 +#: builtin/merge.c:216 builtin/notes.c:772 builtin/pull.c:157 #: builtin/revert.c:89 msgid "strategy" msgstr "estratègia" -#: builtin/merge.c:215 builtin/pull.c:153 +#: builtin/merge.c:217 builtin/pull.c:158 msgid "merge strategy to use" msgstr "estratègia de fusió a usar" -#: builtin/merge.c:216 builtin/pull.c:156 +#: builtin/merge.c:218 builtin/pull.c:161 msgid "option=value" msgstr "opció=valor" -#: builtin/merge.c:217 builtin/pull.c:157 +#: builtin/merge.c:219 builtin/pull.c:162 msgid "option for selected merge strategy" msgstr "opció per a l'estratègia de fusió seleccionada" -#: builtin/merge.c:219 +#: builtin/merge.c:221 msgid "merge commit message (for a non-fast-forward merge)" msgstr "missatge de comissió de fusió (per a una fusió no d'avanç ràpid)" -#: builtin/merge.c:223 +#: builtin/merge.c:225 msgid "abort the current in-progress merge" msgstr "avorta la fusió en curs actual" -#: builtin/merge.c:251 +#: builtin/merge.c:227 builtin/pull.c:169 +msgid "allow merging unrelated histories" +msgstr "permet fusionar històries no relacionades" + +#: builtin/merge.c:255 msgid "could not run stash." msgstr "no s'ha pogut executar stash." -#: builtin/merge.c:256 +#: builtin/merge.c:260 msgid "stash failed" msgstr "l'emmagatzemament ha fallat" -#: builtin/merge.c:261 +#: builtin/merge.c:265 #, c-format msgid "not a valid object: %s" msgstr "no és un objecte vàlid: %s" -#: builtin/merge.c:280 builtin/merge.c:297 +#: builtin/merge.c:284 builtin/merge.c:301 msgid "read-tree failed" msgstr "read-tree ha fallat" -#: builtin/merge.c:327 +#: builtin/merge.c:331 msgid " (nothing to squash)" msgstr " (res a aixafar)" -#: builtin/merge.c:340 +#: builtin/merge.c:342 #, c-format msgid "Squash commit -- not updating HEAD\n" -msgstr "Comissió d'aixafada -- no actualitzant HEAD\n" +msgstr "Comissió d'aixafada -- no s'està actualitzant HEAD\n" -#: builtin/merge.c:344 builtin/merge.c:764 builtin/merge.c:976 -#: builtin/merge.c:989 -#, c-format -msgid "Could not write to '%s'" -msgstr "No s'ha pogut escriure al '%s'" - -#: builtin/merge.c:372 -msgid "Writing SQUASH_MSG" -msgstr "Escrivint SQUASH_MSG" - -#: builtin/merge.c:374 -msgid "Finishing SQUASH_MSG" -msgstr "Finalitzant SQUASH_MSG" - -#: builtin/merge.c:397 +#: builtin/merge.c:392 #, c-format msgid "No merge message -- not updating HEAD\n" -msgstr "Cap missatge de fusió -- no actualitzant HEAD\n" +msgstr "Cap missatge de fusió -- no s'està actualitzant HEAD\n" -#: builtin/merge.c:448 +#: builtin/merge.c:443 #, c-format msgid "'%s' does not point to a commit" msgstr "'%s' no assenyala una comissió" -#: builtin/merge.c:538 +#: builtin/merge.c:533 #, c-format msgid "Bad branch.%s.mergeoptions string: %s" msgstr "Cadena branch.%s.mergeoptions dolenta: %s" -#: builtin/merge.c:657 +#: builtin/merge.c:652 msgid "Not handling anything other than two heads merge." -msgstr "No gestionant res a part de la fusió de dos caps." +msgstr "No s'està gestionant res a part de la fusió de dos caps." -#: builtin/merge.c:671 +#: builtin/merge.c:666 #, c-format msgid "Unknown option for merge-recursive: -X%s" msgstr "Opció desconeguda de merge-recursive: -X%s" -#: builtin/merge.c:684 +#: builtin/merge.c:681 #, c-format msgid "unable to write %s" msgstr "no s'ha pogut escriure %s" -#: builtin/merge.c:773 +#: builtin/merge.c:733 #, c-format msgid "Could not read from '%s'" msgstr "No s'ha pogut llegir de '%s'" -#: builtin/merge.c:782 +#: builtin/merge.c:742 #, c-format msgid "Not committing merge; use 'git commit' to complete the merge.\n" -msgstr "No cometent la fusió; useu 'git commit' per a completar la fusió.\n" +msgstr "" +"No s'està cometent la fusió; useu 'git commit' per a completar la fusió.\n" -#: builtin/merge.c:788 +#: builtin/merge.c:748 #, c-format msgid "" "Please enter a commit message to explain why this merge is necessary,\n" @@ -7998,54 +8714,68 @@ msgstr "" "S'ignoraran les línies que comencin amb '%c', i un missatge buit\n" "avorta la comissió.\n" -#: builtin/merge.c:812 +#: builtin/merge.c:772 msgid "Empty commit message." -msgstr "Missatge de comissió buit." +msgstr "El missatge de comissió és buit." -#: builtin/merge.c:824 +#: builtin/merge.c:792 #, c-format msgid "Wonderful.\n" msgstr "Meravellós.\n" -#: builtin/merge.c:879 +#: builtin/merge.c:847 #, 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:895 +#: builtin/merge.c:863 #, c-format msgid "'%s' is not a commit" msgstr "'%s' no és una comissió" -#: builtin/merge.c:936 +#: builtin/merge.c:904 msgid "No current branch." -msgstr "Cap branca actual." +msgstr "No hi ha cap branca actual." -#: builtin/merge.c:938 +#: builtin/merge.c:906 msgid "No remote for the current branch." msgstr "No hi ha cap remot per a la branca actual." -#: builtin/merge.c:940 +#: builtin/merge.c:908 msgid "No default upstream defined for the current branch." msgstr "No hi ha cap font per defecte definida per a la branca actual." -#: builtin/merge.c:945 +#: builtin/merge.c:913 #, c-format msgid "No remote-tracking branch for %s from %s" msgstr "No hi ha cap branca amb seguiment remot per a %s de %s" -#: builtin/merge.c:1080 +#: builtin/merge.c:960 +#, c-format +msgid "Bad value '%s' in environment '%s'" +msgstr "Valor dolent '%s' en l'entorn '%s'" + +#: builtin/merge.c:1034 #, c-format msgid "could not close '%s'" msgstr "no s'ha pogut tancar '%s'" -#: builtin/merge.c:1207 +#: builtin/merge.c:1061 +#, c-format +msgid "not something we can merge in %s: %s" +msgstr "no és cosa que puguem fusionar en %s: %s" + +#: builtin/merge.c:1095 +msgid "not something we can merge" +msgstr "no és cosa que puguem fusionar" + +#: builtin/merge.c:1162 msgid "There is no merge to abort (MERGE_HEAD missing)." msgstr "No hi ha fusió a avortar (manca MERGE_HEAD)." -#: builtin/merge.c:1223 +#: builtin/merge.c:1178 msgid "" "You have not concluded your merge (MERGE_HEAD exists).\n" "Please, commit your changes before you merge." @@ -8053,7 +8783,7 @@ msgstr "" "No heu conclòs la vostra fusió (MERGE_HEAD existeix).\n" "Si us plau, cometeu els vostres canvis abans de fusionar." -#: builtin/merge.c:1230 +#: builtin/merge.c:1185 msgid "" "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n" "Please, commit your changes before you merge." @@ -8061,108 +8791,120 @@ msgstr "" "No heu conclòs el vostre recull de cireres (CHERRY_PICK_HEAD existeix).\n" "Si us plau, cometeu els vostres canvis abans de fusionar." -#: builtin/merge.c:1233 +#: builtin/merge.c:1188 msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)." msgstr "" "No heu conclòs el vostre recull de cireres (CHERRY_PICK_HEAD existeix)." -#: builtin/merge.c:1242 +#: builtin/merge.c:1197 msgid "You cannot combine --squash with --no-ff." msgstr "No podeu combinar --squash amb --no-ff." -#: builtin/merge.c:1250 +#: builtin/merge.c:1205 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:1267 +#: builtin/merge.c:1222 msgid "Squash commit into empty head not supported yet" msgstr "Aixafar una comissió a un cap buit encara no es permet" -#: builtin/merge.c:1269 +#: builtin/merge.c:1224 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:1275 +#: builtin/merge.c:1229 #, c-format msgid "%s - not something we can merge" msgstr "%s - no és una cosa que puguem fusionar" -#: builtin/merge.c:1277 +#: builtin/merge.c:1231 msgid "Can merge only exactly one commit into empty head" msgstr "Es pot fusionar no més d'exactament una comissió a un cap buit" -#: builtin/merge.c:1332 +#: builtin/merge.c:1287 #, c-format msgid "Commit %s has an untrusted GPG signature, allegedly by %s." -msgstr "La comissió %s té una firma GPG no fiable, suposadament de %s." +msgstr "La comissió %s té una signatura GPG no fiable, suposadament de %s." -#: builtin/merge.c:1335 +#: builtin/merge.c:1290 #, 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." +msgstr "La comissió %s té una signatura GPG dolenta suposadament de %s." -#: builtin/merge.c:1338 +#: builtin/merge.c:1293 #, c-format msgid "Commit %s does not have a GPG signature." -msgstr "La comissió %s no té firma GPG." +msgstr "La comissió %s no té signatura GPG." -#: builtin/merge.c:1341 +#: builtin/merge.c:1296 #, 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" +msgstr "La comissió %s té una signatura GPG bona de %s\n" + +#: builtin/merge.c:1358 +msgid "refusing to merge unrelated histories" +msgstr "s'està refusant fusionar històries no relacionades" + +#: builtin/merge.c:1367 +msgid "Already up-to-date." +msgstr "Ja està al dia." -#: builtin/merge.c:1424 +#: builtin/merge.c:1382 #, c-format msgid "Updating %s..%s\n" -msgstr "Actualitzant %s..%s\n" +msgstr "S'estan actualitzant %s..%s\n" -#: builtin/merge.c:1461 +#: builtin/merge.c:1419 #, c-format msgid "Trying really trivial in-index merge...\n" -msgstr "Intentant una fusió molt trivial en l'índex...\n" +msgstr "S'està intentant una fusió molt trivial en l'índex...\n" -#: builtin/merge.c:1468 +#: builtin/merge.c:1426 #, c-format msgid "Nope.\n" msgstr "No.\n" -#: builtin/merge.c:1500 +#: builtin/merge.c:1451 +msgid "Already up-to-date. Yeeah!" +msgstr "Ja està al dia. Estupend!" + +#: builtin/merge.c:1457 msgid "Not possible to fast-forward, aborting." -msgstr "No és possible avançar ràpidament, avortant." +msgstr "No és possible avançar ràpidament, s'està avortant." -#: builtin/merge.c:1523 builtin/merge.c:1602 +#: builtin/merge.c:1480 builtin/merge.c:1559 #, c-format msgid "Rewinding the tree to pristine...\n" -msgstr "Rebobinant l'arbre a la pristina...\n" +msgstr "S'està rebobinant l'arbre a la pristina...\n" -#: builtin/merge.c:1527 +#: builtin/merge.c:1484 #, c-format msgid "Trying merge strategy %s...\n" -msgstr "Intentant l'estratègia de fusió %s...\n" +msgstr "S'està intentant l'estratègia de fusió %s...\n" -#: builtin/merge.c:1593 +#: builtin/merge.c:1550 #, c-format msgid "No merge strategy handled the merge.\n" msgstr "Cap estratègia de fusió ha gestionat la fusió.\n" -#: builtin/merge.c:1595 +#: builtin/merge.c:1552 #, c-format msgid "Merge with strategy %s failed.\n" msgstr "L'estratègia de fusió %s ha fallat.\n" -#: builtin/merge.c:1604 +#: builtin/merge.c:1561 #, c-format msgid "Using the %s to prepare resolving by hand.\n" -msgstr "Usant el %s per a preparar la resolució a mà.\n" +msgstr "S'està usant el %s per a preparar la resolució a mà.\n" -#: builtin/merge.c:1616 +#: builtin/merge.c:1573 #, c-format msgid "Automatic merge went well; stopped before committing as requested\n" msgstr "" -"La fusió automàtica ha sortit bé; s'ha aturat abans de cometre tal i com " -"s'havia demanat\n" +"La fusió automàtica ha sortit bé; s'ha aturat abans de cometre com s'havia " +"demanat\n" #: builtin/merge-base.c:29 msgid "git merge-base [-a | --all] ..." @@ -8270,7 +9012,7 @@ msgstr "git mv [] ... " msgid "Directory %s is in index and no submodule?" msgstr "El directori %s és en l'índex i no hi ha cap submòdul?" -#: builtin/mv.c:72 +#: builtin/mv.c:72 builtin/rm.c:317 msgid "Please stage your changes to .gitmodules or stash them to proceed" msgstr "" "Si us plau, allisteu els vostres canvis a .gitmodules o emmagatzemeu-los per " @@ -8289,109 +9031,109 @@ msgstr "força el moviment / canvi de nom encara que el destí existeixi" msgid "skip move/rename errors" msgstr "omet els errors de moviment / canvi de nom" -#: builtin/mv.c:152 +#: builtin/mv.c:155 #, c-format msgid "destination '%s' is not a directory" msgstr "el destí '%s' no és un directori" -#: builtin/mv.c:163 +#: builtin/mv.c:166 #, c-format msgid "Checking rename of '%s' to '%s'\n" -msgstr "Comprovant el canvi de nom de '%s' a '%s'\n" +msgstr "S'està comprovant el canvi de nom de '%s' a '%s'\n" -#: builtin/mv.c:167 +#: builtin/mv.c:170 msgid "bad source" msgstr "font dolenta" -#: builtin/mv.c:170 +#: builtin/mv.c:173 msgid "can not move directory into itself" msgstr "no es pot moure un directori a dins d'ell mateix" -#: builtin/mv.c:173 +#: builtin/mv.c:176 msgid "cannot move directory over file" msgstr "no es pot moure un directori sobre un fitxer" -#: builtin/mv.c:182 +#: builtin/mv.c:185 msgid "source directory is empty" msgstr "el directori font està buit" -#: builtin/mv.c:207 +#: builtin/mv.c:210 msgid "not under version control" msgstr "no està sota control de versions" -#: builtin/mv.c:210 +#: builtin/mv.c:213 msgid "destination exists" msgstr "el destí existeix" -#: builtin/mv.c:218 +#: builtin/mv.c:221 #, c-format msgid "overwriting '%s'" -msgstr "sobreescrivint '%s'" +msgstr "s'està sobreescrivint '%s'" -#: builtin/mv.c:221 +#: builtin/mv.c:224 msgid "Cannot overwrite" msgstr "No es pot sobreescriure" -#: builtin/mv.c:224 +#: builtin/mv.c:227 msgid "multiple sources for the same target" msgstr "múltiples fonts per al mateix destí" -#: builtin/mv.c:226 +#: builtin/mv.c:229 msgid "destination directory does not exist" msgstr "el directori destí no existeix" -#: builtin/mv.c:233 +#: builtin/mv.c:236 #, c-format msgid "%s, source=%s, destination=%s" msgstr "%s, origen=%s, destí=%s" -#: builtin/mv.c:254 +#: builtin/mv.c:257 #, c-format msgid "Renaming %s to %s\n" -msgstr "Canviant el nom de %s a %s\n" +msgstr "S'està canviant el nom de %s a %s\n" -#: builtin/mv.c:257 builtin/remote.c:714 builtin/repack.c:365 +#: builtin/mv.c:263 builtin/remote.c:710 builtin/repack.c:375 #, c-format msgid "renaming '%s' failed" msgstr "el canvi del nom de '%s' ha fallat" -#: builtin/name-rev.c:251 +#: builtin/name-rev.c:258 msgid "git name-rev [] ..." msgstr "git name-rev [] ..." -#: builtin/name-rev.c:252 +#: builtin/name-rev.c:259 msgid "git name-rev [] --all" msgstr "git name-rev [] --all" -#: builtin/name-rev.c:253 +#: builtin/name-rev.c:260 msgid "git name-rev [] --stdin" msgstr "git name-rev [] --stdin" -#: builtin/name-rev.c:305 +#: builtin/name-rev.c:312 msgid "print only names (no SHA-1)" msgstr "imprimeix només els noms (sense SHA-1)" -#: builtin/name-rev.c:306 +#: builtin/name-rev.c:313 msgid "only use tags to name the commits" msgstr "només usa les etiquetes per a anomenar les comissions" -#: builtin/name-rev.c:308 +#: builtin/name-rev.c:315 msgid "only use refs matching " msgstr "només usa les referències que coincideixin amb " -#: builtin/name-rev.c:310 +#: builtin/name-rev.c:317 msgid "list all commits reachable from all refs" msgstr "llista totes les comissions abastables de totes les referències" -#: builtin/name-rev.c:311 +#: builtin/name-rev.c:318 msgid "read from stdin" msgstr "llegeix d'stdin" -#: builtin/name-rev.c:312 +#: builtin/name-rev.c:319 msgid "allow to print `undefined` names (default)" msgstr "permet imprimir els noms `undefined` (per defecte)" -#: builtin/name-rev.c:318 +#: builtin/name-rev.c:325 msgid "dereference tags in the input (internal use)" msgstr "dereferencia les etiquetes en l'entrada (ús intern)" @@ -8508,6 +9250,10 @@ msgstr "git notes prune []" msgid "git notes get-ref" msgstr "git notes get-ref" +#: builtin/notes.c:94 +msgid "Write/edit the notes for the following object:" +msgstr "Escriviu/editeu les notes de l'objecte següent:" + #: builtin/notes.c:147 #, c-format msgid "unable to start 'show' for object '%s'" @@ -8522,90 +9268,77 @@ msgstr "no s'ha pogut llegir la sortida de 'show'" msgid "failed to finish 'show' for object '%s'" msgstr "s'ha fallat en finalitzar 'show' per a l'objecte '%s'" -#: builtin/notes.c:174 builtin/tag.c:248 -#, c-format -msgid "could not create file '%s'" -msgstr "no s'ha pogut crear el fitxer '%s'" - -#: builtin/notes.c:193 +#: builtin/notes.c:194 msgid "Please supply the note contents using either -m or -F option" msgstr "" "Si us plau, proveïu els continguts de la nota fent servir l'opció -m o " "l'opció -F" -#: builtin/notes.c:202 +#: builtin/notes.c:203 msgid "unable to write note object" msgstr "no s'ha pogut escriure l'objecte de nota" -#: builtin/notes.c:204 +#: builtin/notes.c:205 #, 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:232 builtin/tag.c:440 +#: builtin/notes.c:233 builtin/tag.c:439 #, c-format msgid "cannot read '%s'" msgstr "no es pot llegir '%s'" -#: builtin/notes.c:234 builtin/tag.c:443 +#: builtin/notes.c:235 builtin/tag.c:442 #, c-format msgid "could not open or read '%s'" msgstr "no s'ha pogut obrir o llegir '%s'" -#: builtin/notes.c:253 builtin/notes.c:304 builtin/notes.c:306 -#: builtin/notes.c:369 builtin/notes.c:424 builtin/notes.c:510 -#: builtin/notes.c:515 builtin/notes.c:593 builtin/notes.c:656 -#: builtin/notes.c:880 builtin/tag.c:456 -#, 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:256 +#: builtin/notes.c:257 #, c-format msgid "Failed to read object '%s'." msgstr "S'ha fallat en llegir l'objecte '%s'." -#: builtin/notes.c:260 +#: builtin/notes.c:261 #, 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:362 builtin/notes.c:417 builtin/notes.c:493 -#: builtin/notes.c:505 builtin/notes.c:581 builtin/notes.c:649 -#: builtin/notes.c:945 +#: builtin/notes.c:363 builtin/notes.c:418 builtin/notes.c:494 +#: builtin/notes.c:506 builtin/notes.c:582 builtin/notes.c:650 +#: builtin/notes.c:800 builtin/notes.c:947 builtin/notes.c:968 msgid "too many parameters" msgstr "massa paràmetres" -#: builtin/notes.c:375 builtin/notes.c:662 +#: builtin/notes.c:376 builtin/notes.c:663 #, c-format msgid "No note found for object %s." msgstr "No s'ha trobat cap nota per a l'objecte %s." -#: builtin/notes.c:396 builtin/notes.c:559 +#: builtin/notes.c:397 builtin/notes.c:560 msgid "note contents as a string" msgstr "anota els continguts com a cadena" -#: builtin/notes.c:399 builtin/notes.c:562 +#: builtin/notes.c:400 builtin/notes.c:563 msgid "note contents in a file" msgstr "anota els continguts en un fitxer" -#: builtin/notes.c:402 builtin/notes.c:565 +#: builtin/notes.c:403 builtin/notes.c:566 msgid "reuse and edit specified note object" msgstr "reusa i edita l'objecte de nota especificat" -#: builtin/notes.c:405 builtin/notes.c:568 +#: builtin/notes.c:406 builtin/notes.c:569 msgid "reuse specified note object" msgstr "reusa l'objecte de nota especificat" -#: builtin/notes.c:408 builtin/notes.c:571 +#: builtin/notes.c:409 builtin/notes.c:572 msgid "allow storing empty note" msgstr "permet l'emmagatzematge d'una nota buida" -#: builtin/notes.c:409 builtin/notes.c:480 +#: builtin/notes.c:410 builtin/notes.c:481 msgid "replace existing notes" msgstr "reemplaça les notes existents" -#: builtin/notes.c:434 +#: builtin/notes.c:435 #, c-format msgid "" "Cannot add notes. Found existing notes for object %s. Use '-f' to overwrite " @@ -8614,30 +9347,30 @@ msgstr "" "No es pot afegir les notes. S'han trobat notes existents de l'objecte %s. " "Useu '-f' per a sobreescriure les notes existents." -#: builtin/notes.c:449 builtin/notes.c:528 +#: builtin/notes.c:450 builtin/notes.c:529 #, c-format msgid "Overwriting existing notes for object %s\n" -msgstr "Sobreescrivint les notes existents de l'objecte %s\n" +msgstr "S'estan sobreescrivint les notes existents de l'objecte %s\n" -#: builtin/notes.c:460 builtin/notes.c:621 builtin/notes.c:885 +#: builtin/notes.c:461 builtin/notes.c:622 builtin/notes.c:887 #, c-format msgid "Removing note for object %s\n" -msgstr "Eliminant la nota de l'objecte %s\n" +msgstr "S'està eliminant la nota de l'objecte %s\n" -#: builtin/notes.c:481 +#: builtin/notes.c:482 msgid "read objects from stdin" msgstr "llegeix els objectes des d'stdin" -#: builtin/notes.c:483 +#: builtin/notes.c:484 msgid "load rewriting config for (implies --stdin)" msgstr "" "carrega la configuració de reescriptura per a (implica --stdin)" -#: builtin/notes.c:501 +#: builtin/notes.c:502 msgid "too few parameters" msgstr "hi ha massa pocs paràmetres" -#: builtin/notes.c:522 +#: builtin/notes.c:523 #, c-format msgid "" "Cannot copy notes. Found existing notes for object %s. Use '-f' to overwrite " @@ -8646,12 +9379,12 @@ 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:534 +#: builtin/notes.c:535 #, 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:586 +#: builtin/notes.c:587 #, c-format msgid "" "The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n" @@ -8660,15 +9393,20 @@ msgstr "" "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:767 +#: builtin/notes.c:753 +#, c-format +msgid "unknown notes merge strategy %s" +msgstr "estratègia de fusió de notes desconeguda %s" + +#: builtin/notes.c:769 msgid "General options" msgstr "Opcions generals" -#: builtin/notes.c:769 +#: builtin/notes.c:771 msgid "Merge options" msgstr "Opcions de fusió" -#: builtin/notes.c:771 +#: builtin/notes.c:773 msgid "" "resolve notes conflicts using the given strategy (manual/ours/theirs/union/" "cat_sort_uniq)" @@ -8676,49 +9414,87 @@ msgstr "" "resol els conflictes de nota usant l'estratègia donada (manual/ours/theirs/" "union/cat_sort_uniq)" -#: builtin/notes.c:773 +#: builtin/notes.c:775 msgid "Committing unmerged notes" -msgstr "Cometent les notes sense fusionar" +msgstr "S'estan cometent les notes sense fusionar" -#: builtin/notes.c:775 +#: builtin/notes.c:777 msgid "finalize notes merge by committing unmerged notes" msgstr "finalitza la fusió de notes cometent les notes sense fusionar" -#: builtin/notes.c:777 +#: builtin/notes.c:779 msgid "Aborting notes merge resolution" -msgstr "Avortant la resolució de fusió de notes" +msgstr "S'està avortant la resolució de fusió de notes" -#: builtin/notes.c:779 +#: builtin/notes.c:781 msgid "abort notes merge" msgstr "avorta la fusió de notes" -#: builtin/notes.c:856 +#: builtin/notes.c:792 +msgid "cannot mix --commit, --abort or -s/--strategy" +msgstr "no es pot combinar --commit, --abort i -s/--strategy" + +#: builtin/notes.c:797 +msgid "Must specify a notes ref to merge" +msgstr "Cal especificar una referència de notes a fusionar" + +#: builtin/notes.c:821 +#, c-format +msgid "Unknown -s/--strategy: %s" +msgstr "-s/--strategy desconeguda: %s" + +#: builtin/notes.c:858 #, c-format msgid "A notes merge into %s is already in-progress at %s" msgstr "Una fusió de notes a %s ja està en curs a %s" -#: builtin/notes.c:883 +#: builtin/notes.c:861 +#, c-format +msgid "Failed to store link to current notes ref (%s)" +msgstr "" +"S'ha fallat en emmagatzemar l'enllaç a la referència de notes actual (%s)" + +#: builtin/notes.c:863 +#, c-format +msgid "" +"Automatic notes merge failed. Fix conflicts in %s and commit the result with " +"'git notes merge --commit', or abort the merge with 'git notes merge --" +"abort'.\n" +msgstr "" +"La fusió de notes automàtica ha fallat. Arregleu els conflictes en %s i " +"cometeu el resultat amb 'git notes merge --commit', o avorteu la fusió amb " +"'git notes merge --abort'.\n" + +#: builtin/notes.c:885 #, c-format msgid "Object %s has no note\n" msgstr "L'objecte %s no té cap nota\n" -#: builtin/notes.c:895 +#: builtin/notes.c:897 msgid "attempt to remove non-existent note is not an error" msgstr "l'intent d'eliminar una nota no existent no és un error" -#: builtin/notes.c:898 +#: builtin/notes.c:900 msgid "read object names from the standard input" msgstr "llegeix els noms d'objecte des de l'entrada estàndard" -#: builtin/notes.c:979 +#: builtin/notes.c:938 builtin/prune.c:105 builtin/worktree.c:127 +msgid "do not remove, show only" +msgstr "no eliminis, només mostra" + +#: builtin/notes.c:939 +msgid "report pruned notes" +msgstr "informa de notes podades" + +#: builtin/notes.c:981 msgid "notes-ref" msgstr "referència de notes" -#: builtin/notes.c:980 +#: builtin/notes.c:982 msgid "use notes from " msgstr "usa les notes de " -#: builtin/notes.c:1015 builtin/remote.c:1626 +#: builtin/notes.c:1017 builtin/remote.c:1623 #, c-format msgid "Unknown subcommand: %s" msgstr "Subordre desconeguda: %s" @@ -8737,183 +9513,193 @@ msgstr "" "git pack-objects [...] [< | < " "]" -#: builtin/pack-objects.c:175 builtin/pack-objects.c:178 +#: builtin/pack-objects.c:177 builtin/pack-objects.c:180 #, c-format msgid "deflate error (%d)" msgstr "error de deflació (%d)" -#: builtin/pack-objects.c:772 +#: builtin/pack-objects.c:766 +msgid "disabling bitmap writing, packs are split due to pack.packSizeLimit" +msgstr "" +"s'està inhabilitant l'escriptura de mapes de bits, es divideixen els paquets " +"a causa de pack.packSizeLimit" + +#: builtin/pack-objects.c:779 msgid "Writing objects" -msgstr "Escrivint els objectes" +msgstr "S'estan escrivint els objectes" -#: builtin/pack-objects.c:1012 +#: builtin/pack-objects.c:1037 msgid "disabling bitmap writing, as some objects are not being packed" msgstr "" -"inhabilitant l'escriptura de mapes de bits, perquè alguns objectes no " -"s'estan empaquetant" +"s'està inhabilitant l'escriptura de mapes de bits, perquè alguns objectes no " +"s'empaqueten" -#: builtin/pack-objects.c:2172 +#: builtin/pack-objects.c:2197 msgid "Compressing objects" -msgstr "Comprimint objectes" +msgstr "S'estan comprimint objectes" -#: builtin/pack-objects.c:2558 +#: builtin/pack-objects.c:2611 #, c-format msgid "unsupported index version %s" msgstr "versió d'índex no compatible %s" -#: builtin/pack-objects.c:2562 +#: builtin/pack-objects.c:2615 #, c-format msgid "bad index version '%s'" msgstr "versió d'índex dolenta '%s'" -#: builtin/pack-objects.c:2592 +#: builtin/pack-objects.c:2645 msgid "do not show progress meter" msgstr "no mostris l'indicador de progrés" -#: builtin/pack-objects.c:2594 +#: builtin/pack-objects.c:2647 msgid "show progress meter" msgstr "mostra l'indicador de progrés" -#: builtin/pack-objects.c:2596 +#: builtin/pack-objects.c:2649 msgid "show progress meter during object writing phase" msgstr "mostra l'indicador de progrés durant la fase d'escriptura d'objectes" -#: builtin/pack-objects.c:2599 +#: builtin/pack-objects.c:2652 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:2600 +#: builtin/pack-objects.c:2653 msgid "version[,offset]" msgstr "versió[,desplaçament]" -#: builtin/pack-objects.c:2601 +#: builtin/pack-objects.c:2654 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:2604 +#: builtin/pack-objects.c:2657 msgid "maximum size of each output pack file" msgstr "mida màxima de cada fitxer de paquet de sortida" -#: builtin/pack-objects.c:2606 +#: builtin/pack-objects.c:2659 msgid "ignore borrowed objects from alternate object store" msgstr "" "ignora els objectes prestats d'un emmagatzemament d'objectes alternatiu" -#: builtin/pack-objects.c:2608 +#: builtin/pack-objects.c:2661 msgid "ignore packed objects" msgstr "ignora els objectes empaquetats" -#: builtin/pack-objects.c:2610 +#: builtin/pack-objects.c:2663 msgid "limit pack window by objects" msgstr "limita la finestra d'empaquetament per objectes" -#: builtin/pack-objects.c:2612 +#: builtin/pack-objects.c:2665 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:2614 +#: builtin/pack-objects.c:2667 msgid "maximum length of delta chain allowed in the resulting pack" msgstr "longitud màxima de la cadena de deltes permesa en el paquet resultant" -#: builtin/pack-objects.c:2616 +#: builtin/pack-objects.c:2669 msgid "reuse existing deltas" msgstr "reusa les deltes existents" -#: builtin/pack-objects.c:2618 +#: builtin/pack-objects.c:2671 msgid "reuse existing objects" msgstr "reusa els objectes existents" -#: builtin/pack-objects.c:2620 +#: builtin/pack-objects.c:2673 msgid "use OFS_DELTA objects" msgstr "usa objectes OFS_DELTA" -#: builtin/pack-objects.c:2622 +#: builtin/pack-objects.c:2675 msgid "use threads when searching for best delta matches" msgstr "usa fils en cercar les millores coincidències de delta" -#: builtin/pack-objects.c:2624 +#: builtin/pack-objects.c:2677 msgid "do not create an empty pack output" msgstr "no creïs una emissió de paquet buida" -#: builtin/pack-objects.c:2626 +#: builtin/pack-objects.c:2679 msgid "read revision arguments from standard input" msgstr "llegeix els paràmetres de revisió des de l'entrada estàndard" -#: builtin/pack-objects.c:2628 +#: builtin/pack-objects.c:2681 msgid "limit the objects to those that are not yet packed" msgstr "limita els objectes als quals encara no s'hagin empaquetat" -#: builtin/pack-objects.c:2631 +#: builtin/pack-objects.c:2684 msgid "include objects reachable from any reference" msgstr "inclou els objectes abastables de qualsevulla referència" -#: builtin/pack-objects.c:2634 +#: builtin/pack-objects.c:2687 msgid "include objects referred by reflog entries" msgstr "" "inclou els objectes als quals facin referència les entrades del registre de " "referències" -#: builtin/pack-objects.c:2637 +#: builtin/pack-objects.c:2690 msgid "include objects referred to by the index" msgstr "inclou els objectes als quals faci referència l'índex" -#: builtin/pack-objects.c:2640 +#: builtin/pack-objects.c:2693 msgid "output pack to stdout" msgstr "emet el paquet a stdout" -#: builtin/pack-objects.c:2642 +#: builtin/pack-objects.c:2695 msgid "include tag objects that refer to objects to be packed" msgstr "" "inclou els objectes d'etiqueta que facin referència als objectes a empaquetar" -#: builtin/pack-objects.c:2644 +#: builtin/pack-objects.c:2697 msgid "keep unreachable objects" msgstr "retén els objectes inabastables" -#: builtin/pack-objects.c:2645 parse-options.h:142 +#: builtin/pack-objects.c:2699 +msgid "pack loose unreachable objects" +msgstr "empaqueta els objectes inabastables solts" + +#: builtin/pack-objects.c:2700 parse-options.h:142 msgid "time" msgstr "hora" -#: builtin/pack-objects.c:2646 +#: builtin/pack-objects.c:2701 msgid "unpack unreachable objects newer than