diff options
231 files changed, 11613 insertions, 4772 deletions
diff --git a/.gitignore b/.gitignore index 6669bf0c6c..1640c3ad00 100644 --- a/.gitignore +++ b/.gitignore @@ -125,6 +125,7 @@ /git-remote-ftps /git-remote-fd /git-remote-ext +/git-remote-testgit /git-remote-testpy /git-remote-testsvn /git-repack @@ -228,6 +229,7 @@ /cscope* *.obj *.lib +*.res *.sln *.suo *.ncb diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 7e4d5716a6..559d5f9ebf 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -237,8 +237,10 @@ For Python scripts: Writing Documentation: - Most (if not all) of the documentation pages are written in AsciiDoc - and processed into HTML output and manpages. + Most (if not all) of the documentation pages are written in the + AsciiDoc format in *.txt files (e.g. Documentation/git.txt), and + processed into HTML and manpages (e.g. git.html and git.1 in the + same directory). Every user-visible change should be reflected in the documentation. The same general rule as for code applies -- imitate the existing diff --git a/Documentation/RelNotes/1.8.2.3.txt b/Documentation/RelNotes/1.8.2.3.txt new file mode 100644 index 0000000000..613948251a --- /dev/null +++ b/Documentation/RelNotes/1.8.2.3.txt @@ -0,0 +1,19 @@ +Git v1.8.2.3 Release Notes +========================== + +Fixes since v1.8.2.2 +-------------------- + + * "rev-list --stdin" and friends kept bogus pointers into the input + buffer around as human readable object names. This was not a + huge problem but was exposed by a new change that uses these + names in error output. + + * When "git difftool" drove "kdiff3", it mistakenly passed --auto + option that was meant while resolving merge conflicts. + + * "git remote add" command did not diagnose extra command line + arguments as an error and silently ignored them. + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.3.1.txt b/Documentation/RelNotes/1.8.3.1.txt new file mode 100644 index 0000000000..fc3ea185a5 --- /dev/null +++ b/Documentation/RelNotes/1.8.3.1.txt @@ -0,0 +1,14 @@ +Git v1.8.3.1 Release Notes +======================== + +Fixes since v1.8.3 +------------------ + + * When $HOME is misconfigured to point at an unreadable directory, we + used to complain and die. The check has been loosened. + + * Handling of negative exclude pattern for directories "!dir" was + broken in the update to v1.8.3. + +Also contains a handful of trivial code clean-ups, documentation +updates, updates to the test suite, etc. diff --git a/Documentation/RelNotes/1.8.3.txt b/Documentation/RelNotes/1.8.3.txt index 6d25165884..ead568e7f1 100644 --- a/Documentation/RelNotes/1.8.3.txt +++ b/Documentation/RelNotes/1.8.3.txt @@ -8,23 +8,22 @@ When "git push [$there]" does not say what to push, we have used the traditional "matching" semantics so far (all your branches were sent to the remote as long as there already are branches of the same name over there). In Git 2.0, the default will change to the "simple" -semantics that pushes the current branch to the branch with the same -name, only when the current branch is set to integrate with that -remote branch. There is a user preference configuration variable +semantics that pushes only the current branch to the branch with the same +name, and only when the current branch is set to integrate with that +remote branch. Use the user preference configuration variable "push.default" to change this. If you are an old-timer who is used -to the "matching" semantics, you can set it to "matching" to keep the -traditional behaviour. If you want to live in the future early, -you can set it to "simple" today without waiting for Git 2.0. - -When "git add -u" and "git add -A", that does not specify what paths -to add on the command line is run from inside a subdirectory, these -commands will operate on the entire tree in Git 2.0 for consistency -with "git commit -a" and other commands. Because there will be no -mechanism to make "git add -u" behave as if "git add -u .", it is -important for those who are used to "git add -u" (without pathspec) -updating the index only for paths in the current subdirectory to start -training their fingers to explicitly say "git add -u ." when they mean -it before Git 2.0 comes. A warning is issued when these commands are +to the "matching" semantics, you can set the variable to "matching" +to keep the traditional behaviour. If you want to live in the future +early, you can set it to "simple" today without waiting for Git 2.0. + +When "git add -u" (and "git add -A") is run inside a subdirectory and +does not specify which paths to add on the command line, it +will operate on the entire tree in Git 2.0 for consistency +with "git commit -a" and other commands. There will be no +mechanism to make plain "git add -u" behave like "git add -u .". +Current users of "git add -u" (without a pathspec) should start +training their fingers to explicitly say "git add -u ." +before Git 2.0 comes. A warning is issued when these commands are run without a pathspec and when you have local changes outside the current directory, because the behaviour in Git 2.0 will be different from today's version in such a situation. @@ -33,8 +32,8 @@ In Git 2.0, "git add <path>" will behave as "git add -A <path>", so that "git add dir/" will notice paths you removed from the directory and record the removal. Versions before Git 2.0, including this release, will keep ignoring removals, but the users who rely on this -behaviour is encouraged to use "git add --ignore-removal <path>" and -get used to it. +behaviour are encouraged to start using "git add --ignore-removal <path>" +now before 2.0 is released. Updates since v1.8.2 @@ -42,11 +41,24 @@ Updates since v1.8.2 Foreign interface - * remote-hg and remote-bzr helpers (in contrib/) have been updated. + * remote-hg and remote-bzr helpers (in contrib/ since v1.8.2) have + been updated; especially, the latter has been done in an + accelerated schedule (read: we may not have merged to this release + if we were following the usual "cook sufficiently in next before + unleashing it to the world" workflow) in order to help Emacs folks, + whose primary SCM seems to be stagnating. UI, Workflows & Features + * A handful of updates applied to gitk, including an addition of + "revert" action, showing dates in tags in a nicer way, making + colors configurable, and support for -G'pickaxe' search. + + * The prompt string generator (in contrib/completion/) learned to + show how many changes there are in total and how many have been + replayed during a "git rebase" session. + * "git branch --vv" learned to paint the name of the branch it integrates with in a different color (color.branch.upstream, which defaults to blue). @@ -102,9 +114,10 @@ UI, Workflows & Features of erroneous inputs was suboptimal and has been improved. * When the interactive access to git-shell is not enabled, it issues - a message meant to help the system administrator to enable it. - An explicit way to help the end users who connect to the service by - issuing custom messages to refuse such an access has been added. + a message meant to help the system administrator to enable it. An + explicit way has been added to issue custom messages to refuse an + access over the network to help the end users who connect to the + service expecting an interactive shell. * In addition to the case where the user edits the log message with the "e)dit" option of "am -i", replace the "Applying: this patch" @@ -114,8 +127,8 @@ UI, Workflows & Features * "git status" suggests users to look into using --untracked=no option when it takes too long. - * "git status" shows a bit more information to "git status" during a - rebase/bisect session. + * "git status" shows a bit more information during a rebase/bisect + session. * "git fetch" learned to fetch a commit at the tip of an unadvertised ref by specifying a raw object name from the command line when the @@ -148,8 +161,8 @@ UI, Workflows & Features * "git mergetool" now feeds files to the "p4merge" backend in the order that matches the p4 convention, where "theirs" is usually - shown on the left side, which is the opposite from other backend - expects. + shown on the left side, which is the opposite from what other backends + expect. * "show/log" now honors gpg.program configuration just like other parts of the code that use GnuPG. @@ -159,9 +172,9 @@ UI, Workflows & Features * "git difftool" allows the user to write into the temporary files being shown; if the user makes changes to the working tree at the - same time, one of the changes has to be lost in such a case, but it - tells the user what happened and refrains from overwriting the copy - in the working tree. + same time, it now refrains from overwriting the copy in the working + tree and leaves the temporary file so that changes can be merged + manually. * There was no good way to ask "I have a random string that came from outside world. I want to turn it into a 40-hex object name while @@ -173,7 +186,7 @@ Performance, Internal Implementation, etc. * Updates for building under msvc. - * A handful of issues in the code to traverse working tree to find + * A handful of issues in the code that traverses the working tree to find untracked and/or ignored files have been fixed, and the general codepath involved in "status -u" and "clean" have been cleaned up and optimized. @@ -182,15 +195,15 @@ Performance, Internal Implementation, etc. pack has been shrunk. * The logic to coalesce the same lines removed from the parents in - the output from "diff -c/--cc" has been updated, but with an O(n^2) + the output from "diff -c/--cc" has been updated, but with O(n^2) complexity, so this might turn out to be undesirable. * The code to enforce permission bits on files in $GIT_DIR/ for - shared repositories have been simplified. + shared repositories has been simplified. - * A few codepaths knew how much data they need to put in the - hashtables they use upfront, but still started from a small table - repeatedly growing and rehashing. + * A few codepaths know how much data they need to put in the + hashtables they use when they start, but still began with small tables + and repeatedly grew and rehashed them. * The API to walk reflog entries from the latest to older, which was necessary for operations such as "git checkout -", was cumbersome @@ -202,9 +215,9 @@ Performance, Internal Implementation, etc. * The pkt-line API, implementation and its callers have been cleaned up to make them more robust. - * Cygwin port has a faster-but-lying lstat(2) emulation whose + * The Cygwin port has a faster-but-lying lstat(2) emulation whose incorrectness does not matter in practice except for a few - codepaths, and setting permission bits to directories is a codepath + codepaths, and setting permission bits on directories is a codepath that needs to use a more correct one. * "git checkout" had repeated pathspec matches on the same paths, @@ -225,42 +238,49 @@ Unless otherwise noted, all the fixes since v1.8.2 in the maintenance track are contained in this release (see release notes to them for details). - * When receive-pack detects error in the pack header it received in + * Recent versions of File::Temp (used by "git svn") started blowing + up when its tempfile sub is called as a class method; updated the + callsite to call it as a plain vanilla function to fix it. + (merge eafc2dd hb/git-pm-tempfile later to maint). + + * Various subcommands of "git remote" simply ignored extraneous + command line arguments instead of diagnosing them as errors. + + * When receive-pack detects an error in the pack header it received in order to decide which of unpack-objects or index-pack to run, it - returned without closing the error stream, which led to a hang + returned without closing the error stream, which led to a hung sideband thread. - * Zsh completion forgot that '%' character used to signal untracked + * Zsh completion forgot that the '%' character used to signal untracked files needs to be escaped with another '%'. * A commit object whose author or committer ident are malformed - crashed some code that trusted that a name, an email and an + crashed some code that trusted that a name, an email and a timestamp can always be found in it. * When "upload-pack" fails while generating a pack in response to - "git fetch" (or "git clone"), the receiving side mistakenly said - there was a programming error to trigger the die handler + "git fetch" (or "git clone"), the receiving side had + a programming error that triggered the die handler recursively. - * "rev-list --stdin" and friends kept bogus pointers into input - buffer around as human readble object names. This was not a huge + * "rev-list --stdin" and friends kept bogus pointers into the input + buffer around as human readable object names. This was not a huge problem but was exposed by a new change that uses these names in error output. - (merge 70d26c6 tr/copy-revisions-from-stdin later to maint). * Smart-capable HTTP servers were not restricted via the - GIT_NAMESPACE mechanism when talking with commit-walker clients, - like they do when talking with smart HTTP clients. + GIT_NAMESPACE mechanism when talking with commit-walking clients, + like they are when talking with smart HTTP clients. (merge 6130f86 jk/http-dumb-namespaces later to maint). * "git merge-tree" did not omit a merge result that is identical to - "our" side in certain cases. + the "our" side in certain cases. (merge aacecc3 jk/merge-tree-added-identically later to maint). - * Perl scripts like "git-svn" closed (not redirecting to /dev/null) + * Perl scripts like "git-svn" closed (instead of redirecting to /dev/null) the standard error stream, which is not a very smart thing to do. - Later open may return file descriptor #2 for unrelated purpose, and - error reporting code may write into them. + A later open may return file descriptor #2 for an unrelated purpose, and + error reporting code may write into it. * "git show-branch" was not prepared to show a very long run of ancestor operators e.g. foobar^2~2^2^2^2...^2~4 correctly. @@ -268,17 +288,17 @@ details). * "git diff --diff-algorithm algo" is also understood as "git diff --diff-algorithm=algo". - * The new core.commentchar configuration was not applied to a few + * The new core.commentchar configuration was not applied in a few places. - * "git bundle" did not like a bundle created using a commit without - any message as its one of the prerequistes. + * "git bundle" erroneously bailed out when parsing a valid bundle + containing a prerequisite commit without a commit message. * "git log -S/-G" started paying attention to textconv filter, but - there was no way to disable this. Make it honor --no-textconv + there was no way to disable this. Make it honor the --no-textconv option. - * When used with "-d temporary-directory" option, "git filter-branch" + * When used with the "-d temporary-directory" option, "git filter-branch" failed to come back to the original working tree to perform the final clean-up procedure. @@ -287,59 +307,57 @@ details). not pay much attention to the annotated tag payload. Make the code notice the type of the tag object, in addition to the dwim_ref() based classification the current code uses (i.e. the name appears - in refs/tags/) to decide when to special case merging of tags. + in refs/tags/) to decide when to special-case tag merging. - * Fix 1.8.1.x regression that stopped matching "dir" (without + * Fix a 1.8.1.x regression that stopped matching "dir" (without a trailing slash) to a directory "dir". - (merge efa5f82 jc/directory-attrs-regression-fix later to maint-1.8.1). * "git apply --whitespace=fix" was not prepared to see a line getting longer after fixing whitespaces (e.g. tab-in-indent aka Python). - (merge 329b26e jc/apply-ws-fix-tab-in-indent later to maint-1.8.1). * The prompt string generator (in contrib/completion/) did not notice when we are in a middle of a "git revert" session. - * "submodule summary --summary-limit" option did not support + * "submodule summary --summary-limit" option did not support the "--option=value" form. * "index-pack --fix-thin" used an uninitialized value to compute - delta depths of objects it appends to the resulting pack. + the delta depths of objects it appends to the resulting pack. - * "index-pack --verify-stat" used a few counters outside protection - of mutex, possibly showing incorrect numbers. + * "index-pack --verify-stat" used a few counters outside the protection + of a mutex, possibly showing incorrect numbers. * The code to keep track of what directory names are known to Git on - platforms with case insensitive filesystems can get confused upon a - hash collision between these pathnames and looped forever. + platforms with case insensitive filesystems could get confused upon a + hash collision between these pathnames and would loop forever. - * Annotated tags outside refs/tags/ hierarchy were not advertised - correctly to the ls-remote and fetch with recent version of Git. + * Annotated tags outside the refs/tags/ hierarchy were not advertised + correctly to ls-remote and fetch with recent versions of Git. - * Recent optimization broke shallow clones. + * Recent optimizations broke shallow clones. * "git cmd -- ':(top'" was not diagnosed as an invalid syntax, and instead the parser kept reading beyond the end of the string. * "git tag -f <tag>" always said "Updated tag '<tag>'" even when - creating a new tag (i.e. not overwriting nor updating). + creating a new tag (i.e. neither overwriting nor updating). * "git p4" did not behave well when the path to the root of the P4 client was not its real path. (merge bbd8486 pw/p4-symlinked-root later to maint). - * "git archive" reports a failure when asked to create an archive out - of an empty tree. It would be more intuitive to give an empty + * "git archive" reported a failure when asked to create an archive out + of an empty tree. It is more intuitive to give an empty archive back in such a case. - * When "format-patch" quoted a non-ascii strings on the header files, + * When "format-patch" quoted a non-ascii string in header files, it incorrectly applied rfc2047 and chopped a single character in - the middle of it. + the middle of the string. * An aliased command spawned from a bare repository that does not say - it is bare with "core.bare = yes" is treated as non-bare by mistake. + it is bare with "core.bare = yes" was treated as non-bare by mistake. - * In "git reflog expire", REACHABLE bit was not cleared from the + * In "git reflog expire", the REACHABLE bit was not cleared from the correct objects. * The logic used by "git diff -M --stat" to shorten the names of @@ -347,9 +365,9 @@ details). common prefix and suffix between the two filenames overlapped. * The "--match=<pattern>" option of "git describe", when used with - "--all" to allow refs that are not annotated tags to be used as a + "--all" to allow refs that are not annotated tags to be a base of description, did not restrict the output from the command - to those that match the given pattern. + to those refs that match the given pattern. * Clarify in the documentation "what" gets pushed to "where" when the command line to "git push" does not say these explicitly. @@ -357,7 +375,7 @@ details). * The "--color=<when>" argument to the commands in the diff family was described poorly. - * The arguments given to pre-rebase hook were not documented. + * The arguments given to the pre-rebase hook were not documented. * The v4 index format was not documented. @@ -375,7 +393,7 @@ details). * In the v1.8.0 era, we changed symbols that do not have to be global to file scope static, but a few functions in graph.c were used by - CGit from sideways bypassing the entry points of the API the + CGit sideways, bypassing the entry points of the API the in-tree users use. * "git update-index -h" did not do the usual "-h(elp)" thing. @@ -388,30 +406,30 @@ details). $msg already ended with one. * The SSL peer verification done by "git imap-send" did not ask for - Server Name Indication (RFC 4366), failing to connect SSL/TLS + Server Name Indication (RFC 4366), failing to connect to SSL/TLS sites that serve multiple hostnames on a single IP. * perl/Git.pm::cat_blob slurped everything in core only to write it out to a file descriptor, which was not a very smart thing to do. * "git branch" did not bother to check nonsense command line - parameters and issue errors in many cases. + parameters. It now issues errors in many cases. - * Verification of signed tags were not done correctly when not in C + * Verification of signed tags was not done correctly when not in C or en/US locale. * Some platforms and users spell UTF-8 differently; retry with the most official "UTF-8" when the system does not understand the - user-supplied encoding name that are the common alternative - spellings of UTF-8. + user-supplied encoding name that is a common alternative + spelling of UTF-8. - * When export-subst is used, "zip" output recorded incorrect + * When export-subst is used, "zip" output recorded an incorrect size of the file. * "git am $maildir/" applied messages in an unexpected order; sort filenames read from the maildir/ in a way that is more likely to - sort messages in the order the writing MUA meant to, by sorting - numeric segment in numeric order and non-numeric segment in + sort the messages in the order the writing MUA meant to, by sorting + numeric segments in numeric order and non-numeric segments in alphabetical order. * "git submodule update", when recursed into sub-submodules, did not diff --git a/Documentation/RelNotes/1.8.4.txt b/Documentation/RelNotes/1.8.4.txt new file mode 100644 index 0000000000..6dda09560e --- /dev/null +++ b/Documentation/RelNotes/1.8.4.txt @@ -0,0 +1,179 @@ +Git v1.8.4 Release Notes +======================== + +Updates since v1.8.3 +-------------------- + +Foreign interface + + * Remote transport helper has been updated to report errors and + maintain ref hierarchy used to keep track of its own state better. + + * With "export" remote-helper protocol, (1) a push that tries to + update a remote ref whose name is different from the pushing side + does not work yet, and (2) the helper may not know how to do + --dry-run; these problematic cases are disabled for now. + +UI, Workflows & Features + + * "check-ignore" (new feature since 1.8.2) has been updated to work + more like "check-attr" over bidi-pipes. + + * "git describe" learned "--first-parent" option to limit its closest + tagged commit search to the first-parent chain. + + * "git merge foo" that might have meant "git merge origin/foo" is + diagnosed with a more informative error message. + + * "git log -L<line>,<range>:<filename>" has been added. This may + still have leaks and rough edges, though. + + * We used the approxidate() parser for "--expire=<timestamp>" options + of various commands, but it is better to treat --expire=all and + --expire=now a bit more specially than using the current timestamp. + "git gc" and "git reflog" have been updated with a new parsing + function for expiry dates. + + * Updates to completion (both bash and zsh) helpers. + + * The behaviour of the "--chain-reply-to" option of "git send-email" + have changed at 1.7.0, and we added a warning/advice message to + help users adjust to the new behaviour back then, but we kept it + around for too long. The message has finally been removed. + + * "git fetch origin master" unlike "git fetch origin" or "git fetch" + did not update "refs/remotes/origin/master"; this was an early + design decision to keep the update of remote tracking branches + predictable, but in practice it turns out that people find it more + convenient to opportunistically update them whenever we have a + chance, and we have been updating them when we run "git push" which + already breaks the original "predictability" anyway. + + * The configuration variable core.checkstat was advertised in the + documentation but the code expected core.statinfo instead. + For now, we accept both core.checkstat and core.statinfo, but the + latter will be removed in the longer term. + + +Performance, Internal Implementation, etc. + + * The codepath to read from marks files in fast-import/export did not + have to accept anything but 40-hex representation of the object + name. Further, fast-export did not need full in-core object + representation to have parsed wen reading from them. These + codepaths have been optimized by taking advantage of these access + patterns. + + * Object lookup logic, when the object hashtable starts to become + crowded, has been optimized. + + * When TEST_OUTPUT_DIRECTORY setting is used, it was handled somewhat + inconsistently between the test framework and t/Makefile, and logic + to summarize the results looked at a wrong place. + + * "git clone" uses a lighter-weight implementation when making sure + that the history behind refs are complete. + + * Many warnings from sparse source checker in compat/ area has been + squelched. + + * The code to reading and updating packed-refs file has been updated, + correcting corner case bugs. + + +Also contains various documentation updates and code clean-ups. + + +Fixes since v1.8.3 +------------------ + +Unless otherwise noted, all the fixes since v1.8.3 in the maintenance +track are contained in this release (see release notes to them for +details). + + * "difftool --dir-diff" did not copy back changes made by the + end-user in the diff tool backend to the working tree in some + cases. + (merge 32eaf1d ks/difftool-dir-diff-copy-fix later to maint). + + * "git push $there HEAD:branch" did not resolve HEAD early enough, so + it was easy to flip it around while push is still going on and push + out a branch that the user did not originally intended when the + command was started. + (merge 0f075b2 rr/push-head later to maint). + + * The bash prompt code (in contrib/) displayed the name of the branch + being rebased when "rebase -i/-m/-p" modes are in use, but not the + plain vanilla "rebase". + (merge 1306321 fc/show-branch-in-rebase-am later to maint). + + * Handling of negative exclude pattern for directories "!dir" was + broken in the update to v1.8.3. + (merge c3c327d kb/status-ignored-optim-2 later to maint). + + * zsh prompt script that borrowed from bash prompt script did not + work due to slight differences in array variable notation between + these two shells. + (merge d0583da tg/maint-zsh-svn-remote-prompt later to maint). + + * An entry for "file://" scheme in the enumeration of URL types Git + can take in the HTML documentation was made into a clickable link + by mistake. + (merge 4c32e36 nd/urls-doc-no-file-hyperlink-fix later to maint). + + * "git push --[no-]verify" was not documented. + (merge 90d32d1 tr/push-no-verify-doc later to maint). + + * Stop installing the git-remote-testpy script that is only used for + testing. + (merge 416fda6 fc/makefile later to maint). + + * "git commit --allow-empty-message -m ''" should not start an + editor. + (merge 2520677 rs/commit-m-no-edit later to maint). + + * "git merge @{-1}~22" was rewritten to "git merge frotz@{1}~22" + incorrectly when your previous branch was "frotz" (it should be + rewritten to "git merge frotz~22" instead). + (merge 84cf246 jc/strbuf-branchname-fix later to maint). + + * "git diff -c -p" was not showing a deleted line from a hunk when + another hunk immediately begins where the earlier one ends. + (merge aac3857 mk/combine-diff-context-horizon-fix later to maint). + + * "git log --ancestry-path A...B" did not work as expected, as it did + not pay attention to the fact that the merge base between A and B + was the bottom of the range being specified. + (merge a765499 kb/ancestry-path-threedots later to maint). + + * Mac OS X does not like to write(2) more than INT_MAX number of + bytes; work it around by chopping write(2) into smaller pieces. + (merge 6c642a8 fc/macos-x-clipped-write later to maint). + + * Newer MacOS X encourages the programs to compile and link with + their CommonCrypto, not with OpenSSL. + (merge be4c828 da/darwin later to maint). + + * "git clone foo/bar:baz" cannot be a request to clone from a remote + over git-over-ssh specified in the scp style. This case is now + detected and clones from a local repository at "foo/bar:baz". + (merge 6000334 nd/clone-local-with-colon later to maint). + + * When $HOME is misconfigured to point at an unreadable directory, we + used to complain and die. Loosen the check. + (merge 4698c8f jn/config-ignore-inaccessible later to maint). + + * "git subtree" (in contrib/) had one codepath with loose error + checks to lose data at the remote side. + (merge 3212d56 jk/subtree-do-not-push-if-split-fails later to maint). + + * "git fetch" into a shallow repository from a repository that does + not know about the shallow boundary commits (e.g. a different fork + from the repository the current shallow repository was cloned from) + did not work correctly. + (merge 71d5f93 mh/fetch-into-shallow later to maint). + + * "git checkout foo" DWIMs the intended "upstream" and turns it into + "git checkout -t -b foo remotes/origin/foo". This codepath has been + updated to correctly take existing remote definitions into account. + (merge 229177a jh/checkout-auto-tracking later to maint). diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index b0d31df0e7..e9f984ba01 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -9,28 +9,11 @@ --show-stats:: Include additional statistics at the end of blame output. --L <start>,<end>:: +-L <start>,<end>, -L :<regex>:: Annotate only the given line range. <start> and <end> can take one of these forms: - - number -+ -If <start> or <end> is a number, it specifies an -absolute line number (lines count from 1). -+ - -- /regex/ -+ -This form will use the first line matching the given -POSIX regex. If <end> is a regex, it will search -starting at the line given by <start>. -+ - -- +offset or -offset -+ -This is only valid for <end> and will specify a number -of lines before or after the line given by <start>. -+ +include::line-range-format.txt[] -l:: Show long rev (Default: off). diff --git a/Documentation/config.txt b/Documentation/config.txt index c67038b56d..6e53fc5074 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1104,11 +1104,11 @@ format.thread:: value disables threading. format.signoff:: - A boolean value which lets you enable the `-s/--signoff` option of - format-patch by default. *Note:* Adding the Signed-off-by: line to a - patch should be a conscious act and means that you certify you have - the rights to submit this work under the same open source license. - Please see the 'SubmittingPatches' document for further discussion. + A boolean value which lets you enable the `-s/--signoff` option of + format-patch by default. *Note:* Adding the Signed-off-by: line to a + patch should be a conscious act and means that you certify you have + the rights to submit this work under the same open source license. + Please see the 'SubmittingPatches' document for further discussion. format.coverLetter:: A boolean that controls whether to generate a cover-letter when @@ -1225,7 +1225,7 @@ gitcvs.dbname:: gitcvs.dbdriver:: Used Perl DBI driver. You can specify any available driver - for this here, but it might not work. git-cvsserver is tested + for this here, but it might not work. git-cvsserver is tested with 'DBD::SQLite', reported to work with 'DBD::Pg', and reported *not* to work with 'DBD::mysql'. Experimental feature. May not contain double colons (`:`). Default: 'SQLite'. diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 104579dc75..b8a9b86375 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -480,7 +480,7 @@ endif::git-format-patch[] --ignore-submodules[=<when>]:: Ignore changes to submodules in the diff generation. <when> can be - either "none", "untracked", "dirty" or "all", which is the default + either "none", "untracked", "dirty" or "all", which is the default. Using "none" will consider the submodule modified when it either contains untracked or modified files or its HEAD differs from the commit recorded in the superproject and can be used to override any settings of the diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 19d57a80f5..5bbe7b6d10 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -9,12 +9,12 @@ git-am - Apply a series of patches from a mailbox SYNOPSIS -------- [verse] -'git am' [--signoff] [--keep] [--keep-cr | --no-keep-cr] [--utf8 | --no-utf8] +'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>] [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet] - [--scissors | --no-scissors] + [--[no-]scissors] [(<mbox> | <Maildir>)...] 'git am' (--continue | --skip | --abort) @@ -43,8 +43,7 @@ OPTIONS --keep-non-patch:: Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). ---keep-cr:: ---no-keep-cr:: +--[no-]keep-cr:: With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1]) with the same option, to prevent it from stripping CR at the end of lines. `am.keepcr` configuration variable can be used to specify the diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 250e5228a3..b97aaab4ed 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git archive' [--format=<fmt>] [--list] [--prefix=<prefix>/] [<extra>] - [-o | --output=<file>] [--worktree-attributes] + [-o <file> | --output=<file>] [--worktree-attributes] [--remote=<repo> [--exec=<git-upload-archive>]] <tree-ish> [<path>...] diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index 9a05c2b3d2..6cea7f1ce1 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -8,9 +8,9 @@ git-blame - Show what revision and author last modified each line of a file SYNOPSIS -------- [verse] -'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] [-L n,m] - [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] [--abbrev=<n>] - [<rev> | --contents <file> | --reverse <rev>] [--] <file> +'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] + [-L n,m | -L :fn] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] + [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>] [--] <file> DESCRIPTION ----------- diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt index 5abdbaa51c..a7be80d48b 100644 --- a/Documentation/git-check-attr.txt +++ b/Documentation/git-check-attr.txt @@ -56,6 +56,11 @@ being queried and <info> can be either: 'set';; when the attribute is defined as true. <value>;; when a value has been assigned to the attribute. +Buffering happens as documented under the `GIT_FLUSH` option in +linkgit:git[1]. The caller is responsible for avoiding deadlocks +caused by overfilling an input buffer or reading from an empty output +buffer. + EXAMPLES -------- diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt index 854e4d0c42..8e1f7ab7ea 100644 --- a/Documentation/git-check-ignore.txt +++ b/Documentation/git-check-ignore.txt @@ -39,6 +39,12 @@ OPTIONS below). If `--stdin` is also given, input paths are separated with a NUL character instead of a linefeed character. +-n, --non-matching:: + Show given paths which don't match any pattern. This only + makes sense when `--verbose` is enabled, otherwise it would + not be possible to distinguish between paths which match a + pattern and those which don't. + OUTPUT ------ @@ -65,6 +71,20 @@ are also used instead of colons and hard tabs: <source> <NULL> <linenum> <NULL> <pattern> <NULL> <pathname> <NULL> +If `-n` or `--non-matching` are specified, non-matching pathnames will +also be output, in which case all fields in each output record except +for <pathname> will be empty. This can be useful when running +non-interactively, so that files can be incrementally streamed to +STDIN of a long-running check-ignore process, and for each of these +files, STDOUT will indicate whether that file matched a pattern or +not. (Without this option, it would be impossible to tell whether the +absence of output for a given file meant that it didn't match any +pattern, or that the output hadn't been generated yet.) + +Buffering happens as documented under the `GIT_FLUSH` option in +linkgit:git[1]. The caller is responsible for avoiding deadlocks +caused by overfilling an input buffer or reading from an empty output +buffer. EXIT STATUS ----------- diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index ec1739a896..a49be1bab4 100644 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@ -83,8 +83,7 @@ typed the branch name. OPTIONS ------- ---allow-onelevel:: ---no-allow-onelevel:: +--[no-]allow-onelevel:: Controls whether one-level refnames are accepted (i.e., refnames that do not contain multiple `/`-separated components). The default is `--no-allow-onelevel`. diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 23a9413525..ca118ac6bf 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -131,9 +131,9 @@ entries; instead, unmerged entries are ignored. "--track" in linkgit:git-branch[1] for details. + If no '-b' option is given, the name of the new branch will be -derived from the remote-tracking branch. If "remotes/" or "refs/remotes/" -is prefixed it is stripped away, and then the part up to the -next slash (which would be the nickname of the remote) is removed. +derived from the remote-tracking branch, by looking at the local part of +the refspec configured for the corresponding remote, and then stripping +the initial part up to the "*". This would tell us to use "hack" as the local branch when branching off of "origin/hack" (or "remotes/origin/hack", or even "refs/remotes/origin/hack"). If the given name has no slash, or the above diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 5c16e317f6..a0727d7759 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -14,7 +14,7 @@ SYNOPSIS [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] [--separate-git-dir <git dir>] [--depth <depth>] [--[no-]single-branch] - [--recursive|--recurse-submodules] [--] <repository> + [--recursive | --recurse-submodules] [--] <repository> [<directory>] DESCRIPTION @@ -188,7 +188,7 @@ objects from the source repository into a pack in the cloned repository. with a long history, and would want to send in fixes as patches. ---single-branch:: +--[no-]single-branch:: Clone only the history leading to the tip of a single branch, either specified by the `--branch` option or the primary branch remote's `HEAD` points at. When creating a shallow diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 9b1be5581d..1a7616c73a 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -12,7 +12,7 @@ SYNOPSIS [--dry-run] [(-c | -C | --fixup | --squash) <commit>] [-F <file> | -m <msg>] [--reset-author] [--allow-empty] [--allow-empty-message] [--no-verify] [-e] [--author=<author>] - [--date=<date>] [--cleanup=<mode>] [--status | --no-status] + [--date=<date>] [--cleanup=<mode>] [--[no-]status] [-i | -o] [-S[<keyid>]] [--] [<file>...] DESCRIPTION @@ -197,8 +197,8 @@ variable (see linkgit:git-config[1]). -e:: --edit:: The message taken from file with `-F`, command line with - `-m`, and from file with `-C` are usually used as the - commit log message unmodified. This option lets you + `-m`, and from commit object with `-C` are usually used as + the commit log message unmodified. This option lets you further edit the message taken from these sources. --no-edit:: diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 9ae2508f3f..d88a6fcb29 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -186,8 +186,7 @@ See also <<FILES>>. Opens an editor to modify the specified config file; either '--system', '--global', or repository (default). ---includes:: ---no-includes:: +--[no-]includes:: Respect `include.*` directives in config files when looking up values. Defaults to on. diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt index bfb106cccd..223f731523 100644 --- a/Documentation/git-daemon.txt +++ b/Documentation/git-daemon.txt @@ -16,8 +16,10 @@ SYNOPSIS [--reuseaddr] [--detach] [--pid-file=<file>] [--enable=<service>] [--disable=<service>] [--allow-override=<service>] [--forbid-override=<service>] - [--access-hook=<path>] - [--inetd | [--listen=<host_or_ipaddr>] [--port=<n>] [--user=<user> [--group=<group>]] + [--access-hook=<path>] [--[no-]informative-errors] + [--inetd | + [--listen=<host_or_ipaddr>] [--port=<n>] + [--user=<user> [--group=<group>]]] [<directory>...] DESCRIPTION @@ -169,8 +171,7 @@ Git configuration files in that directory are readable by `<user>`. repository configuration. By default, all the services are overridable. ---informative-errors:: ---no-informative-errors:: +--[no-]informative-errors:: When informative errors are turned on, git-daemon will report more verbose errors to the client, differentiating conditions like "no such repository" from "repository not exported". This diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 28e5ec0e2c..9439cd6d56 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -88,6 +88,11 @@ OPTIONS --always:: Show uniquely abbreviated commit object as fallback. +--first-parent:: + Follow only the first parent commit upon seeing a merge commit. + This is useful when you wish to not match tags on branches merged + in the history of the target commit. + EXAMPLES -------- @@ -149,7 +154,9 @@ is found, its name will be output and searching will stop. If an exact match was not found, 'git describe' will walk back through the commit history to locate an ancestor commit which has been tagged. The ancestor's tag will be output along with an -abbreviation of the input committish's SHA-1. +abbreviation of the input committish's SHA-1. If '--first-parent' was +specified then the walk will only consider the first parent of each +commit. If multiple tags were found during the walk then the tag which has the fewest commits different from the input committish will be diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt index c0b7c581ad..a86cf62e68 100644 --- a/Documentation/git-diff-index.txt +++ b/Documentation/git-diff-index.txt @@ -3,7 +3,7 @@ git-diff-index(1) NAME ---- -git-diff-index - Compares content and mode of blobs between the index and repository +git-diff-index - Compare a tree to the working tree or index SYNOPSIS @@ -13,11 +13,11 @@ SYNOPSIS DESCRIPTION ----------- -Compares the content and mode of the blobs found via a tree -object with the content of the current index and, optionally -ignoring the stat state of the file on disk. When paths are -specified, compares only those named paths. Otherwise all -entries in the index are compared. +Compares the content and mode of the blobs found in a tree object +with the corresponding tracked files in the working tree, or with the +corresponding paths in the index. When <path> arguments are present, +compares only paths matching those patterns. Otherwise all tracked +files are compared. OPTIONS ------- diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index 8361e6e4e3..11887e63a0 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -69,8 +69,7 @@ with custom merge tool commands and has the same value as `$MERGED`. --tool-help:: Print a list of diff tools that may be used with `--tool`. ---symlinks:: ---no-symlinks:: +--[no-]symlinks:: 'git difftool''s default behavior is create symlinks to the working tree when run in `--dir-diff` mode and the right-hand side of the comparison yields the same content as the file in diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt index 03fc8c39d8..efb03806f5 100644 --- a/Documentation/git-fast-export.txt +++ b/Documentation/git-fast-export.txt @@ -106,11 +106,11 @@ marks the same across runs. different from the commit's first parent). [<git-rev-list-args>...]:: - A list of arguments, acceptable to 'git rev-parse' and - 'git rev-list', that specifies the specific objects and references - to export. For example, `master~10..master` causes the - current master reference to be exported along with all objects - added since its 10th ancestor commit. + A list of arguments, acceptable to 'git rev-parse' and + 'git rev-list', that specifies the specific objects and references + to export. For example, `master~10..master` causes the + current master reference to be exported along with all objects + added since its 10th ancestor commit. EXAMPLES -------- diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt index b81e90d8e7..1e71754347 100644 --- a/Documentation/git-fetch-pack.txt +++ b/Documentation/git-fetch-pack.txt @@ -10,9 +10,9 @@ SYNOPSIS -------- [verse] 'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] - [--upload-pack=<git-upload-pack>] - [--depth=<n>] [--no-progress] - [-v] [<host>:]<directory> [<refs>...] + [--upload-pack=<git-upload-pack>] + [--depth=<n>] [--no-progress] + [-v] [<host>:]<directory> [<refs>...] DESCRIPTION ----------- diff --git a/Documentation/git-fmt-merge-msg.txt b/Documentation/git-fmt-merge-msg.txt index 3a0f55ec8e..bb1232a52c 100644 --- a/Documentation/git-fmt-merge-msg.txt +++ b/Documentation/git-fmt-merge-msg.txt @@ -35,8 +35,7 @@ OPTIONS Do not list one-line descriptions from the actual commits being merged. ---summary:: ---no-summary:: +--[no-]summary:: Synonyms to --log and --no-log; these are deprecated and will be removed in the future. diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index e5878bd97b..25c431d3c5 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -30,8 +30,7 @@ index file, all SHA-1 references in `refs` namespace, and all reflogs Print out objects that exist but that aren't reachable from any of the reference nodes. ---dangling:: ---no-dangling:: +--[no-]dangling:: Print objects that exist but that are never 'directly' used (default). `--no-dangling` can be used to omit this information from the output. @@ -78,8 +77,7 @@ index file, all SHA-1 references in `refs` namespace, and all reflogs a blob, the contents are written into the file, rather than its object name. ---progress:: ---no-progress:: +--[no-]progress:: Progress status is reported on the standard error stream by default when it is attached to a terminal, unless --no-progress or --verbose is specified. --progress forces diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index b370b025b8..2402ed6828 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -62,8 +62,9 @@ automatic consolidation of packs. --prune=<date>:: Prune loose objects older than date (default is 2 weeks ago, - overridable by the config variable `gc.pruneExpire`). This - option is on by default. + overridable by the config variable `gc.pruneExpire`). + --prune=all prunes loose objects regardless of their age. + --prune is on by default. --no-prune:: Do not prune any loose objects. diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 50d46e1a7b..8497aa4494 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -25,7 +25,7 @@ SYNOPSIS [-W | --function-context] [-f <file>] [-e] <pattern> [--and|--or|--not|(|)|-e <pattern>...] - [ [--exclude-standard] [--cached | --no-index | --untracked] | <tree>...] + [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>...] [--] [<pathspec>...] DESCRIPTION diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt index bde8eec30d..7a4e055520 100644 --- a/Documentation/git-index-pack.txt +++ b/Documentation/git-index-pack.txt @@ -74,6 +74,9 @@ OPTIONS --strict:: Die, if the pack contains broken objects or links. +--check-self-contained-and-connected:: + Die if the pack contains broken links. For internal use only. + --threads=<n>:: Specifies the number of threads to spawn when resolving deltas. This requires that index-pack be compiled with diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index a976534ab8..4687fe8192 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -62,6 +62,19 @@ produced by --stat etc. Note that only message is considered, if also a diff is shown its size is not included. +-L <start>,<end>:<file>, -L :<regex>:<file>:: + + Trace the evolution of the line range given by "<start>,<end>" + (or the funcname regex <regex>) within the <file>. You may + not give any pathspec limiters. This is currently limited to + a walk starting from a single revision, i.e., you may only + give zero or one positive revision arguments. + You can specify this option more than once. ++ +<start> and <end> can take one of these forms: + +include::line-range-format.txt[] + <revision range>:: Show only commits in the specified revision range. When no <revision range> is specified, it defaults to `HEAD` (i.e. the @@ -140,6 +153,11 @@ Examples This makes sense only when following a strict policy of merging all topic branches when staying on a single integration branch. +git log -L '/int main/',/^}/:main.c:: + + Shows how the function `main()` in the file 'main.c' evolved + over time. + `git log -3`:: Limits the number of commits to show to 3. diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 97e7a8e9e7..164a3c6ede 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -9,7 +9,7 @@ git-mailinfo - Extracts patch and authorship from a single e-mail message SYNOPSIS -------- [verse] -'git mailinfo' [-k|-b] [-u | --encoding=<encoding> | -n] [--scissors] <msg> <patch> +'git mailinfo' [-k|-b] [-u | --encoding=<encoding> | -n] [--[no-]scissors] <msg> <patch> DESCRIPTION diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 42391f2ae7..67ca99cd92 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -76,8 +76,7 @@ The 'git fmt-merge-msg' command can be used to give a good default for automated 'git merge' invocations. ---rerere-autoupdate:: ---no-rerere-autoupdate:: +--[no-]rerere-autoupdate:: Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible. diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt index 6b563c500f..07137f252b 100644 --- a/Documentation/git-mergetool.txt +++ b/Documentation/git-mergetool.txt @@ -8,7 +8,7 @@ git-mergetool - Run merge conflict resolution tools to resolve merge conflicts SYNOPSIS -------- [verse] -'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>...] +'git mergetool' [--tool=<tool>] [-y | --[no-]prompt] [<file>...] DESCRIPTION ----------- diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index eb2883c94c..df5be268ba 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -11,7 +11,7 @@ SYNOPSIS [verse] 'git push' [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream] - [<repository> [<refspec>...]] + [--no-verify] [<repository> [<refspec>...]] DESCRIPTION ----------- @@ -162,8 +162,7 @@ useful if you write an alias or script around 'git push'. linkgit:git-pull[1] and other commands. For more information, see 'branch.<name>.merge' in linkgit:git-config[1]. ---thin:: ---no-thin:: +--[no-]thin:: These options are passed to linkgit:git-send-pack[1]. A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is @@ -196,6 +195,11 @@ useful if you write an alias or script around 'git push'. be pushed. If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status. +--[no-]verify:: + Toggle the pre-push hook (see linkgit:githooks[5]). The + default is \--verify, giving the hook a chance to prevent the + push. With \--no-verify, the hook is bypassed completely. + include::urls-remotes.txt[] diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index fb8697ea4c..70791b9fd8 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -67,14 +67,19 @@ them. --expire=<time>:: Entries older than this time are pruned. Without the option it is taken from configuration `gc.reflogExpire`, - which in turn defaults to 90 days. + which in turn defaults to 90 days. --expire=all prunes + entries regardless of their age; --expire=never turns off + pruning of reachable entries (but see --expire-unreachable). --expire-unreachable=<time>:: Entries older than this time and not reachable from the current tip of the branch are pruned. Without the option it is taken from configuration `gc.reflogExpireUnreachable`, which in turn defaults to - 30 days. + 30 days. --expire-unreachable=all prunes unreachable + entries regardless of their age; --expire-unreachable=never + turns off early pruning of unreachable entries (but see + --expire). --all:: Instead of listing <refs> explicitly, prune all refs. diff --git a/Documentation/git-remote.txt b/Documentation/git-remote.txt index e8c396b5f9..581bb4c413 100644 --- a/Documentation/git-remote.txt +++ b/Documentation/git-remote.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git remote' [-v | --verbose] -'git remote add' [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url> +'git remote add' [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> 'git remote rename' <old> <new> 'git remote remove' <name> 'git remote set-head' <name> (-a | -d | <branch>) @@ -18,8 +18,8 @@ SYNOPSIS 'git remote set-url' [--push] <name> <newurl> [<oldurl>] 'git remote set-url --add' [--push] <name> <newurl> 'git remote set-url --delete' [--push] <name> <url> -'git remote' [-v | --verbose] 'show' [-n] <name> -'git remote prune' [-n | --dry-run] <name> +'git remote' [-v | --verbose] 'show' [-n] <name>... +'git remote prune' [-n | --dry-run] <name>... 'git remote' [-v | --verbose] 'update' [-p | --prune] [(<group> | <remote>)...] DESCRIPTION diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 70152e8b1e..f79c9d8583 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -8,7 +8,7 @@ git-revert - Revert some existing commits SYNOPSIS -------- [verse] -'git revert' [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>... +'git revert' [--[no-]edit] [-n] [-m parent-number] [-s] <commit>... 'git revert' --continue 'git revert' --quit 'git revert' --abort diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 74d5bdc59d..e5767134b1 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -77,6 +77,8 @@ argument <path> is the relative location for the cloned submodule to exist in the superproject. If <path> is not given, the "humanish" part of the source repository is used ("repo" for "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). +The <path> is also used as the submodule's logical name in its +configuration entries unless `--name` is used to specify a logical name. + <repository> is the URL of the new submodule's origin repository. This may be either an absolute URL, or (if it begins with ./ @@ -124,8 +126,10 @@ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information too (and can also report changes to a submodule's work tree). init:: - Initialize the submodules, i.e. register each submodule name - and url found in .gitmodules into .git/config. + Initialize the submodules recorded in the index (which were + added and committed elsewhere) by copying submodule + names and urls from .gitmodules to .git/config. + Optional <path> arguments limit which submodules will be initialized. It will also copy the value of `submodule.$name.update` into .git/config. The key used in .git/config is `submodule.$name.url`. diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 7706d41c87..aad452f169 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -85,6 +85,10 @@ COMMANDS When passed to 'init' or 'clone' this regular expression will be preserved as a config key. See 'fetch' for a description of '--ignore-paths'. +--include-paths=<regex>;; + When passed to 'init' or 'clone' this regular expression will + be preserved as a config key. See 'fetch' for a description + of '--include-paths'. --no-minimize-url;; When tracking multiple directories (using --stdlayout, --branches, or --tags options), git svn will attempt to connect @@ -146,6 +150,14 @@ Skip "branches" and "tags" of first level directories;; ------------------------------------------------------------------------ -- +--include-paths=<regex>;; + This allows one to specify a Perl regular expression that will + cause the inclusion of only matching paths from checkout from SVN. + The '--include-paths' option should match for every 'fetch' + (including automatic fetches due to 'clone', 'dcommit', + 'rebase', etc) on a given repository. '--ignore-paths' takes + precedence over '--include-paths'. + --log-window-size=<n>;; Fetch <n> log entries per request when scanning Subversion history. The default is 100. For very large Subversion repositories, larger @@ -259,13 +271,15 @@ first have already been pushed into SVN. Create a tag by using the tags_subdir instead of the branches_subdir specified during git svn init. --d;; ---destination;; +-d<path>;; +--destination=<path>;; + If more than one --branches (or --tags) option was given to the 'init' or 'clone' command, you must provide the location of the branch (or - tag) you wish to create in the SVN repository. The value of this - option must match one of the paths specified by a --branches (or - --tags) option. You can see these paths with the commands + tag) you wish to create in the SVN repository. <path> specifies which + path to use to create the branch or tag and should match the pattern + on the left-hand side of one of the configured branches or tags + refspecs. You can see these refspecs with the commands + git config --get-all svn-remote.<name>.branches git config --get-all svn-remote.<name>.tags @@ -286,6 +300,11 @@ where <name> is the name of the SVN repository as specified by the -R option to git config --get-all svn-remote.<name>.commiturl + +--parents;; + Create parent folders. This parameter is equivalent to the parameter + --parents on svn cp commands and is useful for non-standard repository + layouts. + 'tag':: Create a tag in the SVN repository. This is a shorthand for 'branch -t'. @@ -1020,6 +1039,25 @@ comma-separated list of names within braces. For example: tags = tags/{1.0,2.0}/src:refs/remotes/tags/* ------------------------------------------------------------------------ +Multiple fetch, branches, and tags keys are supported: + +------------------------------------------------------------------------ +[svn-remote "messy-repo"] + url = http://server.org/svn + fetch = trunk/project-a:refs/remotes/project-a/trunk + fetch = branches/demos/june-project-a-demo:refs/remotes/project-a/demos/june-demo + branches = branches/server/*:refs/remotes/project-a/branches/* + branches = branches/demos/2011/*:refs/remotes/project-a/2011-demos/* + tags = tags/server/*:refs/remotes/project-a/tags/* +------------------------------------------------------------------------ + +Creating a branch in such a configuration requires disambiguating which +location to use using the -d or --destination flag: + +------------------------------------------------------------------------ +$ git svn branch -d branches/server release-2-3-0 +------------------------------------------------------------------------ + Note that git-svn keeps track of the highest revision in which a branch or tag has appeared. If the subset of branches or tags is changed after fetching, then .git/svn/.metadata must be manually edited to remove (or diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 670e9fb2c2..e0a87029cd 100644 --- a/Documentation/git-update-index.txt +++ b/Documentation/git-update-index.txt @@ -14,8 +14,8 @@ SYNOPSIS [--refresh] [-q] [--unmerged] [--ignore-missing] [(--cacheinfo <mode> <object> <file>)...] [--chmod=(+|-)x] - [--assume-unchanged | --no-assume-unchanged] - [--skip-worktree | --no-skip-worktree] + [--[no-]assume-unchanged] + [--[no-]skip-worktree] [--ignore-submodules] [--really-refresh] [--unresolve] [--again | -g] [--info-only] [--index-info] @@ -77,8 +77,7 @@ OPTIONS --chmod=(+|-)x:: Set the execute permissions on the updated files. ---assume-unchanged:: ---no-assume-unchanged:: +--[no-]assume-unchanged:: When these flags are specified, the object names recorded for the paths are not updated. Instead, these options set and unset the "assume unchanged" bit for the @@ -102,8 +101,7 @@ you will need to handle the situation manually. Like '--refresh', but checks stat information unconditionally, without regard to the "assume unchanged" setting. ---skip-worktree:: ---no-skip-worktree:: +--[no-]skip-worktree:: When one of these flags is specified, the object name recorded for the paths are not updated. Instead, these options set and unset the "skip-worktree" bit for the paths. See diff --git a/Documentation/git.txt b/Documentation/git.txt index 8438c076c3..fcbca8db77 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,11 +43,18 @@ unreleased) version of Git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.8.2.2/git.html[documentation for release 1.8.2.2] +* link:v1.8.3.1/git.html[documentation for release 1.8.3.1] * release notes for - link:RelNotes/1.8.2.2.txt[1.8.2.2]. - link:RelNotes/1.8.2.1.txt[1.8.2.1]. + link:RelNotes/1.8.3.1.txt[1.8.3.1], + link:RelNotes/1.8.3.txt[1.8.3]. + +* link:v1.8.2.3/git.html[documentation for release 1.8.2.3] + +* release notes for + link:RelNotes/1.8.2.3.txt[1.8.2.3], + link:RelNotes/1.8.2.2.txt[1.8.2.2], + link:RelNotes/1.8.2.1.txt[1.8.2.1], link:RelNotes/1.8.2.txt[1.8.2]. * link:v1.8.1.6/git.html[documentation for release 1.8.1.6] @@ -810,8 +817,9 @@ for further details. 'GIT_FLUSH':: If this environment variable is set to "1", then commands such as 'git blame' (in incremental mode), 'git rev-list', 'git log', - and 'git whatchanged' will force a flush of the output stream - after each commit-oriented record have been flushed. If this + 'git check-attr', 'git check-ignore', and 'git whatchanged' will + force a flush of the output stream after each record have been + flushed. If this variable is set to "0", the output of these commands will be done using completely buffered I/O. If this environment variable is not set, Git will choose buffered or record-oriented flushing diff --git a/Documentation/gitremote-helpers.txt b/Documentation/gitremote-helpers.txt index da746419b3..0827f69139 100644 --- a/Documentation/gitremote-helpers.txt +++ b/Documentation/gitremote-helpers.txt @@ -159,11 +159,11 @@ Miscellaneous capabilities carried out. 'refspec' <refspec>:: - This modifies the 'import' capability, allowing the produced - fast-import stream to modify refs in a private namespace - instead of writing to refs/heads or refs/remotes directly. + For remote helpers that implement 'import' or 'export', this capability + allows the refs to be constrained to a private namespace, instead of + writing to refs/heads or refs/remotes directly. It is recommended that all importers providing the 'import' - capability use this. + capability use this. It's mandatory for 'export'. + A helper advertising the capability `refspec refs/heads/*:refs/svn/origin/branches/*` @@ -174,8 +174,8 @@ ref. This capability can be advertised multiple times. The first applicable refspec takes precedence. The left-hand of refspecs advertised with this capability must cover all refs reported by -the list command. If a helper does not need a specific 'refspec' -capability then it should advertise `refspec *:*`. +the list command. If no 'refspec' capability is advertised, +there is an implied `refspec *:*`. 'bidi-import':: This modifies the 'import' capability. diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt index d6f3393c5f..aa03882ddb 100644 --- a/Documentation/gitrepository-layout.txt +++ b/Documentation/gitrepository-layout.txt @@ -211,6 +211,9 @@ shallow:: and maintained by shallow clone mechanism. See `--depth` option to linkgit:git-clone[1] and linkgit:git-fetch[1]. +modules:: + Contains the git-repositories of the submodules. + SEE ALSO -------- linkgit:git-init[1], diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 68a18e1497..db2a74df93 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -400,12 +400,13 @@ should not be combined with other pathspec. <<def_ref,ref>> and local ref. [[def_remote_tracking_branch]]remote-tracking branch:: - A regular Git <<def_branch,branch>> that is used to follow changes from - another <<def_repository,repository>>. A remote-tracking - branch should not contain direct modifications or have local commits - made to it. A remote-tracking branch can usually be - identified as the right-hand-side <<def_ref,ref>> in a Pull: - <<def_refspec,refspec>>. + A <<def_ref,ref>> that is used to follow changes from another + <<def_repository,repository>>. It typically looks like + 'refs/remotes/foo/bar' (indicating that it tracks a branch named + 'bar' in a remote named 'foo'), and matches the right-hand-side of + a configured fetch <<def_refspec,refspec>>. A remote-tracking + branch should not contain direct modifications or have local + commits made to it. [[def_repository]]repository:: A collection of <<def_ref,refs>> together with an diff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt new file mode 100644 index 0000000000..3e7ce72daa --- /dev/null +++ b/Documentation/line-range-format.txt @@ -0,0 +1,25 @@ +- number ++ +If <start> or <end> is a number, it specifies an +absolute line number (lines count from 1). ++ + +- /regex/ ++ +This form will use the first line matching the given +POSIX regex. If <end> is a regex, it will search +starting at the line given by <start>. ++ + +- +offset or -offset ++ +This is only valid for <end> and will specify a number +of lines before or after the line given by <start>. ++ + +- :regex ++ +If the option's argument is of the form :regex, it denotes the range +from the first funcname line that matches <regex>, up to the next +funcname line. ++ diff --git a/Documentation/merge-options.txt b/Documentation/merge-options.txt index 2adccf8fec..afba8d4f3b 100644 --- a/Documentation/merge-options.txt +++ b/Documentation/merge-options.txt @@ -8,12 +8,13 @@ failed and do not autocommit, to give the user a chance to inspect and further tweak the merge result before committing. --edit:: +-e:: --no-edit:: Invoke an editor before committing successful mechanical merge to further edit the auto-generated merge message, so that the user can explain and justify the merge. The `--no-edit` option can be used to accept the auto-generated message (this is generally - discouraged). The `--edit` option is still useful if you are + discouraged). The `--edit` (or `-e`) option is still useful if you are giving a draft message with the `-m` option from the command line and want to edit it in the editor. + diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt index 94a9d32f1d..18cffc25b8 100644 --- a/Documentation/pull-fetch-param.txt +++ b/Documentation/pull-fetch-param.txt @@ -68,6 +68,11 @@ Some short-cut notations are also supported. + * `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`; it requests fetching everything up to the given tag. -* A parameter <ref> without a colon is equivalent to - <ref>: when pulling/fetching, so it merges <ref> into the current - branch without storing the remote branch anywhere locally +ifndef::git-pull[] +* A parameter <ref> without a colon fetches that ref into FETCH_HEAD, +endif::git-pull[] +ifdef::git-pull[] +* A parameter <ref> without a colon merges <ref> into the current + branch, +endif::git-pull[] + and updates the remote-tracking branches (if any). diff --git a/Documentation/technical/api-parse-options.txt b/Documentation/technical/api-parse-options.txt index 32ddc1cf13..1317db4d6c 100644 --- a/Documentation/technical/api-parse-options.txt +++ b/Documentation/technical/api-parse-options.txt @@ -41,6 +41,8 @@ The parse-options API allows: * Boolean long options can be 'negated' (or 'unset') by prepending `no-`, e.g. `--no-abbrev` instead of `--abbrev`. Conversely, options that begin with `no-` can be 'negated' by removing it. + Other long options can be unset (e.g., set string to NULL, set + integer to 0) by prepending `no-`. * Options and non-option arguments can clearly be separated using the `--` option, e.g. `-a -b --option -- --this-is-a-file` indicates that @@ -174,6 +176,10 @@ There are some macros to easily define options: Introduce an option with date argument, see `approxidate()`. The timestamp is put into `int_var`. +`OPT_EXPIRY_DATE(short, long, &int_var, description)`:: + Introduce an option with expiry date argument, see `parse_expiry_date()`. + The timestamp is put into `int_var`. + `OPT_CALLBACK(short, long, &var, arg_str, description, func_ptr)`:: Introduce an option with argument. The argument will be fed into the function given by `func_ptr` diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt index f1a51edf47..b898e97988 100644 --- a/Documentation/technical/pack-protocol.txt +++ b/Documentation/technical/pack-protocol.txt @@ -228,8 +228,7 @@ obtained through ref discovery. The client MUST write all obj-ids which it only has shallow copies of (meaning that it does not have the parents of a commit) as 'shallow' lines so that the server is aware of the limitations of -the client's history. Clients MUST NOT mention an obj-id which -it does not know exists on the server. +the client's history. The client now sends the maximum commit history depth it wants for this transaction, which is the number of commits it wants from the diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 3ca122faed..5e185f87c2 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -23,6 +23,12 @@ An alternative scp-like syntax may also be used with the ssh protocol: - {startsb}user@{endsb}host.xz:path/to/repo.git/ +This syntax is only recognized if there are no slashes before the +first colon. This helps differentiate a local path that contains a +colon. For example the local path `foo:bar` could be specified as an +absolute path or `./foo:bar` to avoid being misinterpreted as an ssh +url. + The ssh and git protocols additionally support ~username expansion: - ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/~{startsb}user{endsb}/path/to/repo.git/ @@ -33,7 +39,7 @@ For local repositories, also supported by Git natively, the following syntaxes may be used: - /path/to/repo.git/ -- file:///path/to/repo.git/ +- \file:///path/to/repo.git/ ifndef::git-clone[] These two syntaxes are mostly equivalent, except when cloning, when diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 293d0b9fa4..390782fa12 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.8.3-rc0 +DEF_VER=v1.8.3.GIT LF=' ' @@ -69,6 +69,9 @@ all:: # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt # doesn't support GNU extensions like --check and --statistics # +# Define NEEDS_CLIPPED_WRITE if your write(2) cannot write more than +# INT_MAX bytes at once (e.g. MacOS X). +# # Define HAVE_PATHS_H if you have paths.h and want to use the default PATH # it specifies. # @@ -137,6 +140,10 @@ all:: # specify your own (or DarwinPort's) include directories and # library directories by defining CFLAGS and LDFLAGS appropriately. # +# Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X +# and do not want to use Apple's CommonCrypto library. This allows you +# to provide your own OpenSSL library, for example from MacPorts. +# # Define BLK_SHA1 environment variable to make use of the bundled # optimized C SHA1 routine. # @@ -456,6 +463,7 @@ SCRIPT_SH += git-mergetool.sh SCRIPT_SH += git-pull.sh SCRIPT_SH += git-quiltimport.sh SCRIPT_SH += git-rebase.sh +SCRIPT_SH += git-remote-testgit.sh SCRIPT_SH += git-repack.sh SCRIPT_SH += git-request-pull.sh SCRIPT_SH += git-stash.sh @@ -483,11 +491,17 @@ SCRIPT_PERL += git-svn.perl SCRIPT_PYTHON += git-remote-testpy.py SCRIPT_PYTHON += git-p4.py +NO_INSTALL += git-remote-testpy + # Generated files for scripts SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH)) SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL)) SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON)) +SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN)) +SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN)) +SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN)) + # Individual rules to allow e.g. # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script" # from subdirectories like contrib/*/ @@ -497,12 +511,12 @@ build-sh-script: $(SCRIPT_SH_GEN) build-python-script: $(SCRIPT_PYTHON_GEN) .PHONY: install-perl-script install-sh-script install-python-script -install-sh-script: $(SCRIPT_SH_GEN) - $(INSTALL) $(SCRIPT_SH_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' -install-perl-script: $(SCRIPT_PERL_GEN) - $(INSTALL) $(SCRIPT_PERL_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' -install-python-script: $(SCRIPT_PYTHON_GEN) - $(INSTALL) $(SCRIPT_PYTHON_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' +install-sh-script: $(SCRIPT_SH_INS) + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' +install-perl-script: $(SCRIPT_PERL_INS) + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' +install-python-script: $(SCRIPT_PYTHON_INS) + $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' .PHONY: clean-perl-script clean-sh-script clean-python-script clean-sh-script: @@ -512,9 +526,9 @@ clean-perl-script: clean-python-script: $(RM) $(SCRIPT_PYTHON_GEN) -SCRIPTS = $(SCRIPT_SH_GEN) \ - $(SCRIPT_PERL_GEN) \ - $(SCRIPT_PYTHON_GEN) \ +SCRIPTS = $(SCRIPT_SH_INS) \ + $(SCRIPT_PERL_INS) \ + $(SCRIPT_PYTHON_INS) \ git-instaweb ETAGS_TARGET = TAGS @@ -669,6 +683,8 @@ LIB_H += help.h LIB_H += http.h LIB_H += kwset.h LIB_H += levenshtein.h +LIB_H += line-log.h +LIB_H += line-range.h LIB_H += list-objects.h LIB_H += ll-merge.h LIB_H += log-tree.h @@ -680,7 +696,6 @@ LIB_H += notes-cache.h LIB_H += notes-merge.h LIB_H += notes.h LIB_H += object.h -LIB_H += pack-refs.h LIB_H += pack-revindex.h LIB_H += pack.h LIB_H += parse-options.h @@ -797,6 +812,8 @@ LIB_OBJS += hex.o LIB_OBJS += ident.o LIB_OBJS += kwset.o LIB_OBJS += levenshtein.o +LIB_OBJS += line-log.o +LIB_OBJS += line-range.o LIB_OBJS += list-objects.o LIB_OBJS += ll-merge.o LIB_OBJS += lockfile.o @@ -813,7 +830,6 @@ LIB_OBJS += notes-cache.o LIB_OBJS += notes-merge.o LIB_OBJS += object.o LIB_OBJS += pack-check.o -LIB_OBJS += pack-refs.o LIB_OBJS += pack-revindex.o LIB_OBJS += pack-write.o LIB_OBJS += pager.o @@ -1050,6 +1066,11 @@ ifeq ($(uname_S),Darwin) BASIC_LDFLAGS += -L/opt/local/lib endif endif + ifndef NO_APPLE_COMMON_CRYPTO + APPLE_COMMON_CRYPTO = YesPlease + COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO + endif + NO_REGEX = YesPlease PTHREAD_LIBS = endif @@ -1384,10 +1405,16 @@ ifdef PPC_SHA1 LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o LIB_H += ppc/sha1.h else +ifdef APPLE_COMMON_CRYPTO + COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL + SHA1_HEADER = <CommonCrypto/CommonDigest.h> +else SHA1_HEADER = <openssl/sha.h> EXTLIBS += $(LIB_4_CRYPTO) endif endif +endif + ifdef NO_PERL_MAKEMAKER export NO_PERL_MAKEMAKER endif @@ -1459,6 +1486,11 @@ ifndef NO_MSGFMT_EXTENDED_OPTIONS MSGFMT += --check --statistics endif +ifdef NEEDS_CLIPPED_WRITE + BASIC_CFLAGS += -DNEEDS_CLIPPED_WRITE + COMPAT_OBJS += compat/clipped-write.o +endif + ifneq (,$(XDL_FAST_HASH)) BASIC_CFLAGS += -DXDL_FAST_HASH endif @@ -1496,6 +1528,7 @@ ifndef V QUIET_MSGFMT = @echo ' ' MSGFMT $@; QUIET_GCOV = @echo ' ' GCOV $@; QUIET_SP = @echo ' ' SP $<; + QUIET_RC = @echo ' ' RC $@; QUIET_SUBDIR0 = +@subdir= QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ $(MAKE) $(PRINT_DIR) -C $$subdir @@ -1638,7 +1671,7 @@ please_set_SHELL_PATH_to_a_more_modern_shell: shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell strip: $(PROGRAMS) git$X - $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X + $(STRIP) $(STRIP_OPTS) $^ ### Target-specific flags and dependencies @@ -1698,9 +1731,9 @@ version.sp version.s version.o: EXTRA_CPPFLAGS = \ $(BUILT_INS): git$X $(QUIET_BUILT_IN)$(RM) $@ && \ - ln git$X $@ 2>/dev/null || \ - ln -s git$X $@ 2>/dev/null || \ - cp git$X $@ + ln $< $@ 2>/dev/null || \ + ln -s $< $@ 2>/dev/null || \ + cp $< $@ common-cmds.h: ./generate-cmdlist.sh command-list.txt @@ -1741,6 +1774,11 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES $(QUIET_GEN)$(cmd_munge_script) && \ mv $@+ $@ +git.res: git.rc GIT-VERSION-FILE + $(QUIET_RC)$(RC) \ + $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \ + -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ + ifndef NO_PERL $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak @@ -1765,7 +1803,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE -e ' x' \ -e '}' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ - $@.perl >$@+ && \ + $< >$@+ && \ chmod +x $@+ && \ mv $@+ $@ @@ -1789,8 +1827,8 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh endif # NO_PERL ifndef NO_PYTHON -$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS -$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py +$(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS +$(SCRIPT_PYTHON_GEN): % : %.py $(QUIET_GEN)$(RM) $@ $@+ && \ INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \ --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \ @@ -1798,11 +1836,11 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \ -e 's|\(os\.getenv("GITPYTHONLIB"\)[^)]*)|\1,"@@INSTLIBDIR@@")|' \ -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ - $@.py >$@+ && \ + $< >$@+ && \ chmod +x $@+ && \ mv $@+ $@ else # NO_PYTHON -$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh +$(SCRIPT_PYTHON_GEN): % : unimplemented.sh $(QUIET_GEN)$(RM) $@ $@+ && \ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \ @@ -1997,6 +2035,7 @@ endif ifdef USE_NED_ALLOCATOR compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \ -DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR +compat/nedmalloc/nedmalloc.sp: SPARSE_FLAGS += -Wno-non-pointer-null endif git-%$X: %.o GIT-LDFLAGS $(GITLIBS) @@ -2152,6 +2191,9 @@ 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)))'\' >>$@ +ifdef TEST_OUTPUT_DIRECTORY + @echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@ +endif ifdef GIT_TEST_OPTS @echo GIT_TEST_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_OPTS)))'\' >>$@ endif @@ -2436,8 +2478,8 @@ profile-clean: $(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) -clean: profile-clean - $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \ +clean: profile-clean coverage-clean + $(RM) *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \ builtin/*.o $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X $(RM) $(TEST_PROGRAMS) @@ -2517,29 +2559,34 @@ check-builtins:: ### Test suite coverage testing # -.PHONY: coverage coverage-clean coverage-build coverage-report +.PHONY: coverage coverage-clean coverage-compile coverage-test coverage-report +.PHONY: coverage-clean-results coverage: - $(MAKE) coverage-build - $(MAKE) coverage-report + $(MAKE) coverage-test + $(MAKE) coverage-untested-functions object_dirs := $(sort $(dir $(OBJECTS))) -coverage-clean: +coverage-clean-results: $(RM) $(addsuffix *.gcov,$(object_dirs)) $(RM) $(addsuffix *.gcda,$(object_dirs)) - $(RM) $(addsuffix *.gcno,$(object_dirs)) $(RM) coverage-untested-functions $(RM) -r cover_db/ $(RM) -r cover_db_html/ +coverage-clean: coverage-clean-results + $(RM) $(addsuffix *.gcno,$(object_dirs)) + COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov GCOVFLAGS = --preserve-paths --branch-probabilities --all-blocks -coverage-build: coverage-clean +coverage-compile: $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all + +coverage-test: coverage-clean-results coverage-compile $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ - -j1 test + DEFAULT_TEST_TARGET=test -j1 test coverage-report: $(QUIET_GCOV)for dir in $(object_dirs); do \ @@ -1 +1 @@ -Documentation/RelNotes/1.8.3.txt
\ No newline at end of file +Documentation/RelNotes/1.8.4.txt
\ No newline at end of file diff --git a/archive-zip.c b/archive-zip.c index b2c4fe0e9f..4bde019bce 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -232,7 +232,6 @@ static int write_zip_entry(struct archiver_args *args, size = 0; compressed_size = 0; buffer = NULL; - size = 0; } else if (S_ISREG(mode) || S_ISLNK(mode)) { enum object_type type = sha1_object_info(sha1, &size); @@ -197,6 +197,21 @@ int validate_new_branchname(const char *name, struct strbuf *ref, return 1; } +static int check_tracking_branch(struct remote *remote, void *cb_data) +{ + char *tracking_branch = cb_data; + struct refspec query; + memset(&query, 0, sizeof(struct refspec)); + query.dst = tracking_branch; + return !(remote_find_tracking(remote, &query) || + prefixcmp(query.src, "refs/heads/")); +} + +static int validate_remote_tracking_branch(char *ref) +{ + return !for_each_remote(check_tracking_branch, ref); +} + static const char upstream_not_branch[] = N_("Cannot setup tracking information; starting point '%s' is not a branch."); static const char upstream_missing[] = @@ -259,7 +274,7 @@ void create_branch(const char *head, case 1: /* Unique completion -- good, only if it is a real branch */ if (prefixcmp(real_ref, "refs/heads/") && - prefixcmp(real_ref, "refs/remotes/")) { + validate_remote_tracking_branch(real_ref)) { if (explicit_tracking) die(_(upstream_not_branch), start_name); else @@ -12,6 +12,9 @@ extern const char git_usage_string[]; extern const char git_more_info_string[]; +#define PRUNE_PACKED_DRY_RUN 01 +#define PRUNE_PACKED_VERBOSE 02 + extern void prune_packed_objects(int); struct fmt_merge_msg_opts { diff --git a/builtin/blame.c b/builtin/blame.c index 57a487e052..079dcd3407 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -21,6 +21,7 @@ #include "parse-options.h" #include "utf8.h" #include "userdiff.h" +#include "line-range.h" static char blame_usage[] = N_("git blame [options] [rev-opts] [rev] [--] file"); @@ -566,11 +567,16 @@ static void dup_entry(struct blame_entry *dst, struct blame_entry *src) dst->score = 0; } -static const char *nth_line(struct scoreboard *sb, int lno) +static const char *nth_line(struct scoreboard *sb, long lno) { return sb->final_buf + sb->lineno[lno]; } +static const char *nth_line_cb(void *data, long lno) +{ + return nth_line((struct scoreboard *)data, lno); +} + /* * It is known that lines between tlno to same came from parent, and e * has an overlap with that range. it also is known that parent's @@ -1932,83 +1938,6 @@ static const char *add_prefix(const char *prefix, const char *path) } /* - * Parsing of (comma separated) one item in the -L option - */ -static const char *parse_loc(const char *spec, - struct scoreboard *sb, long lno, - long begin, long *ret) -{ - char *term; - const char *line; - long num; - int reg_error; - regex_t regexp; - regmatch_t match[1]; - - /* Allow "-L <something>,+20" to mean starting at <something> - * for 20 lines, or "-L <something>,-5" for 5 lines ending at - * <something>. - */ - if (1 < begin && (spec[0] == '+' || spec[0] == '-')) { - num = strtol(spec + 1, &term, 10); - if (term != spec + 1) { - if (spec[0] == '-') - num = 0 - num; - if (0 < num) - *ret = begin + num - 2; - else if (!num) - *ret = begin; - else - *ret = begin + num; - return term; - } - return spec; - } - num = strtol(spec, &term, 10); - if (term != spec) { - *ret = num; - return term; - } - if (spec[0] != '/') - return spec; - - /* it could be a regexp of form /.../ */ - for (term = (char *) spec + 1; *term && *term != '/'; term++) { - if (*term == '\\') - term++; - } - if (*term != '/') - return spec; - - /* try [spec+1 .. term-1] as regexp */ - *term = 0; - begin--; /* input is in human terms */ - line = nth_line(sb, begin); - - if (!(reg_error = regcomp(®exp, spec + 1, REG_NEWLINE)) && - !(reg_error = regexec(®exp, line, 1, match, 0))) { - const char *cp = line + match[0].rm_so; - const char *nline; - - while (begin++ < lno) { - nline = nth_line(sb, begin); - if (line <= cp && cp < nline) - break; - line = nline; - } - *ret = begin; - regfree(®exp); - *term++ = '/'; - return term; - } - else { - char errbuf[1024]; - regerror(reg_error, ®exp, errbuf, 1024); - die("-L parameter '%s': %s", spec + 1, errbuf); - } -} - -/* * Parsing of -L option */ static void prepare_blame_range(struct scoreboard *sb, @@ -2016,15 +1945,7 @@ static void prepare_blame_range(struct scoreboard *sb, long lno, long *bottom, long *top) { - const char *term; - - term = parse_loc(bottomtop, sb, lno, 1, bottom); - if (*term == ',') { - term = parse_loc(term + 1, sb, lno, *bottom + 1, top); - if (*term) - usage(blame_usage); - } - if (*term) + if (parse_range_arg(bottomtop, nth_line_cb, sb, lno, bottom, top, sb->path)) usage(blame_usage); } @@ -2574,10 +2495,6 @@ parse_done: bottom = top = 0; if (bottomtop) prepare_blame_range(&sb, bottomtop, lno, &bottom, &top); - if (bottom && top && top < bottom) { - long tmp; - tmp = top; top = bottom; bottom = tmp; - } if (bottom < 1) bottom = 1; if (top < 1) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 854a88a056..4a8fc707c7 100644 --- a/builtin/check-ignore.c +++ b/builtin/check-ignore.c @@ -5,7 +5,7 @@ #include "pathspec.h" #include "parse-options.h" -static int quiet, verbose, stdin_paths; +static int quiet, verbose, stdin_paths, show_non_matching; static const char * const check_ignore_usage[] = { "git check-ignore [options] pathname...", "git check-ignore [options] --stdin < <list-of-paths>", @@ -22,21 +22,28 @@ static const struct option check_ignore_options[] = { N_("read file names from stdin")), OPT_BOOLEAN('z', NULL, &null_term_line, N_("input paths are terminated by a null character")), + OPT_BOOLEAN('n', "non-matching", &show_non_matching, + N_("show non-matching input paths")), OPT_END() }; static void output_exclude(const char *path, struct exclude *exclude) { - char *bang = exclude->flags & EXC_FLAG_NEGATIVE ? "!" : ""; - char *slash = exclude->flags & EXC_FLAG_MUSTBEDIR ? "/" : ""; + char *bang = (exclude && exclude->flags & EXC_FLAG_NEGATIVE) ? "!" : ""; + char *slash = (exclude && exclude->flags & EXC_FLAG_MUSTBEDIR) ? "/" : ""; if (!null_term_line) { if (!verbose) { write_name_quoted(path, stdout, '\n'); } else { - quote_c_style(exclude->el->src, NULL, stdout, 0); - printf(":%d:%s%s%s\t", - exclude->srcpos, - bang, exclude->pattern, slash); + if (exclude) { + quote_c_style(exclude->el->src, NULL, stdout, 0); + printf(":%d:%s%s%s\t", + exclude->srcpos, + bang, exclude->pattern, slash); + } + else { + printf("::\t"); + } quote_c_style(path, NULL, stdout, 0); fputc('\n', stdout); } @@ -44,30 +51,26 @@ static void output_exclude(const char *path, struct exclude *exclude) if (!verbose) { printf("%s%c", path, '\0'); } else { - printf("%s%c%d%c%s%s%s%c%s%c", - exclude->el->src, '\0', - exclude->srcpos, '\0', - bang, exclude->pattern, slash, '\0', - path, '\0'); + if (exclude) + printf("%s%c%d%c%s%s%s%c%s%c", + exclude->el->src, '\0', + exclude->srcpos, '\0', + bang, exclude->pattern, slash, '\0', + path, '\0'); + else + printf("%c%c%c%s%c", '\0', '\0', '\0', path, '\0'); } } } -static int check_ignore(const char *prefix, const char **pathspec) +static int check_ignore(struct dir_struct *dir, + const char *prefix, const char **pathspec) { - struct dir_struct dir; const char *path, *full_path; char *seen; int num_ignored = 0, dtype = DT_UNKNOWN, i; struct exclude *exclude; - /* read_cache() is only necessary so we can watch out for submodules. */ - if (read_cache() < 0) - die(_("index file corrupt")); - - memset(&dir, 0, sizeof(dir)); - setup_standard_excludes(&dir); - if (!pathspec || !*pathspec) { if (!quiet) fprintf(stderr, "no pathspec given.\n"); @@ -86,28 +89,26 @@ static int check_ignore(const char *prefix, const char **pathspec) ? strlen(prefix) : 0, path); full_path = check_path_for_gitlink(full_path); die_if_path_beyond_symlink(full_path, prefix); + exclude = NULL; if (!seen[i]) { - exclude = last_exclude_matching(&dir, full_path, &dtype); - if (exclude) { - if (!quiet) - output_exclude(path, exclude); - num_ignored++; - } + exclude = last_exclude_matching(dir, full_path, &dtype); } + if (!quiet && (exclude || show_non_matching)) + output_exclude(path, exclude); + if (exclude) + num_ignored++; } free(seen); - clear_directory(&dir); return num_ignored; } -static int check_ignore_stdin_paths(const char *prefix) +static int check_ignore_stdin_paths(struct dir_struct *dir, const char *prefix) { struct strbuf buf, nbuf; - char **pathspec = NULL; - size_t nr = 0, alloc = 0; + char *pathspec[2] = { NULL, NULL }; int line_termination = null_term_line ? 0 : '\n'; - int num_ignored; + int num_ignored = 0; strbuf_init(&buf, 0); strbuf_init(&nbuf, 0); @@ -118,23 +119,19 @@ static int check_ignore_stdin_paths(const char *prefix) die("line is badly quoted"); strbuf_swap(&buf, &nbuf); } - ALLOC_GROW(pathspec, nr + 1, alloc); - pathspec[nr] = xcalloc(strlen(buf.buf) + 1, sizeof(*buf.buf)); - strcpy(pathspec[nr++], buf.buf); + pathspec[0] = buf.buf; + num_ignored += check_ignore(dir, prefix, (const char **)pathspec); + maybe_flush_or_die(stdout, "check-ignore to stdout"); } - ALLOC_GROW(pathspec, nr + 1, alloc); - pathspec[nr] = NULL; - num_ignored = check_ignore(prefix, (const char **)pathspec); - maybe_flush_or_die(stdout, "attribute to stdout"); strbuf_release(&buf); strbuf_release(&nbuf); - free(pathspec); return num_ignored; } int cmd_check_ignore(int argc, const char **argv, const char *prefix) { int num_ignored; + struct dir_struct dir; git_config(git_default_config, NULL); @@ -156,13 +153,24 @@ int cmd_check_ignore(int argc, const char **argv, const char *prefix) if (verbose) die(_("cannot have both --quiet and --verbose")); } + if (show_non_matching && !verbose) + die(_("--non-matching is only valid with --verbose")); + + /* read_cache() is only necessary so we can watch out for submodules. */ + if (read_cache() < 0) + die(_("index file corrupt")); + + memset(&dir, 0, sizeof(dir)); + setup_standard_excludes(&dir); if (stdin_paths) { - num_ignored = check_ignore_stdin_paths(prefix); + num_ignored = check_ignore_stdin_paths(&dir, prefix); } else { - num_ignored = check_ignore(prefix, argv); + num_ignored = check_ignore(&dir, prefix, argv); maybe_flush_or_die(stdout, "ignore to stdout"); } + clear_directory(&dir); + return !num_ignored; } diff --git a/builtin/checkout.c b/builtin/checkout.c index 81b4419da5..f5b50e520f 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -825,38 +825,40 @@ static int git_checkout_config(const char *var, const char *value, void *cb) } struct tracking_name_data { - const char *name; - char *remote; + /* const */ char *src_ref; + char *dst_ref; + unsigned char *dst_sha1; int unique; }; -static int check_tracking_name(const char *refname, const unsigned char *sha1, - int flags, void *cb_data) +static int check_tracking_name(struct remote *remote, void *cb_data) { struct tracking_name_data *cb = cb_data; - const char *slash; - - if (prefixcmp(refname, "refs/remotes/")) - return 0; - slash = strchr(refname + 13, '/'); - if (!slash || strcmp(slash + 1, cb->name)) + struct refspec query; + memset(&query, 0, sizeof(struct refspec)); + query.src = cb->src_ref; + if (remote_find_tracking(remote, &query) || + get_sha1(query.dst, cb->dst_sha1)) return 0; - if (cb->remote) { + if (cb->dst_ref) { cb->unique = 0; return 0; } - cb->remote = xstrdup(refname); + cb->dst_ref = xstrdup(query.dst); return 0; } -static const char *unique_tracking_name(const char *name) +static const char *unique_tracking_name(const char *name, unsigned char *sha1) { - struct tracking_name_data cb_data = { NULL, NULL, 1 }; - cb_data.name = name; - for_each_ref(check_tracking_name, &cb_data); + struct tracking_name_data cb_data = { NULL, NULL, NULL, 1 }; + char src_ref[PATH_MAX]; + snprintf(src_ref, PATH_MAX, "refs/heads/%s", name); + cb_data.src_ref = src_ref; + cb_data.dst_sha1 = sha1; + for_each_remote(check_tracking_name, &cb_data); if (cb_data.unique) - return cb_data.remote; - free(cb_data.remote); + return cb_data.dst_ref; + free(cb_data.dst_ref); return NULL; } @@ -919,8 +921,8 @@ static int parse_branchname_arg(int argc, const char **argv, if (dwim_new_local_branch_ok && !check_filename(NULL, arg) && argc == 1) { - const char *remote = unique_tracking_name(arg); - if (!remote || get_sha1(remote, rev)) + const char *remote = unique_tracking_name(arg, rev); + if (!remote) return argcount; *new_branch = arg; arg = remote; diff --git a/builtin/clone.c b/builtin/clone.c index 58fee9874f..66bff5700f 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -18,7 +18,6 @@ #include "transport.h" #include "strbuf.h" #include "dir.h" -#include "pack-refs.h" #include "sigchain.h" #include "branch.h" #include "remote.h" @@ -387,7 +386,7 @@ static void clone_local(const char *src_repo, const char *dest_repo) static const char *junk_work_tree; static const char *junk_git_dir; static pid_t junk_pid; -enum { +static enum { JUNK_LEAVE_NONE, JUNK_LEAVE_REPO, JUNK_LEAVE_ALL @@ -542,12 +541,18 @@ static void update_remote_refs(const struct ref *refs, const struct ref *mapped_refs, const struct ref *remote_head_points_at, const char *branch_top, - const char *msg) + const char *msg, + struct transport *transport) { const struct ref *rm = mapped_refs; - if (check_everything_connected(iterate_ref_map, 0, &rm)) + if (0 <= option_verbosity) + printf(_("Checking connectivity... ")); + if (check_everything_connected_with_transport(iterate_ref_map, + 0, &rm, transport)) die(_("remote did not send all necessary objects")); + if (0 <= option_verbosity) + printf(_("done\n")); if (refs) { write_remote_refs(mapped_refs); @@ -783,6 +788,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) is_local = option_local != 0 && path && !is_bundle; if (is_local && option_depth) warning(_("--depth is ignored in local clones; use file:// instead.")); + if (option_local > 0 && !is_local) + warning(_("--local is ignored")); if (argc == 2) dir = xstrdup(argv[1]); @@ -889,6 +896,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_upload_pack) transport_set_option(transport, TRANS_OPT_UPLOADPACK, option_upload_pack); + + if (transport->smart_options && !option_depth) + transport->smart_options->check_self_contained_and_connected = 1; } refs = transport_get_remote_refs(transport); @@ -950,7 +960,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) transport_fetch_refs(transport, mapped_refs); update_remote_refs(refs, mapped_refs, remote_head_points_at, - branch_top.buf, reflog_msg.buf); + branch_top.buf, reflog_msg.buf, transport); update_head(our_head_points_at, remote_head, reflog_msg.buf); diff --git a/builtin/commit.c b/builtin/commit.c index d2f30d960a..1621dfcd40 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -107,7 +107,7 @@ static const char *cleanup_arg; static enum commit_whence whence; static int use_editor = 1, include_status = 1; -static int show_ignored_in_status; +static int show_ignored_in_status, have_option_m; static const char *only_include_assumed; static struct strbuf message = STRBUF_INIT; @@ -121,9 +121,11 @@ static enum { static int opt_parse_m(const struct option *opt, const char *arg, int unset) { struct strbuf *buf = opt->value; - if (unset) + if (unset) { + have_option_m = 0; strbuf_setlen(buf, 0); - else { + } else { + have_option_m = 1; if (buf->len) strbuf_addch(buf, '\n'); strbuf_addstr(buf, arg); @@ -975,7 +977,7 @@ static int parse_and_validate_options(int argc, const char *argv[], if (force_author && renew_authorship) die(_("Using both --reset-author and --author does not make sense")); - if (logfile || message.len || use_message || fixup_message) + if (logfile || have_option_m || use_message || fixup_message) use_editor = 0; if (0 <= edit_flag) use_editor = edit_flag; diff --git a/builtin/config.c b/builtin/config.c index 33c9bf9d84..19ffcaf187 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -379,8 +379,8 @@ int cmd_config(int argc, const char **argv, const char *prefix) */ die("$HOME not set"); - if (access_or_warn(user_config, R_OK) && - xdg_config && !access_or_warn(xdg_config, R_OK)) + if (access_or_warn(user_config, R_OK, 0) && + xdg_config && !access_or_warn(xdg_config, R_OK, 0)) given_config_file = xdg_config; else given_config_file = user_config; diff --git a/builtin/describe.c b/builtin/describe.c index 6636a68cd9..ad8471626a 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -21,6 +21,7 @@ static int debug; /* Display lots of verbose info */ static int all; /* Any valid ref can be used */ static int tags; /* Allow lightweight tags */ static int longformat; +static int first_parent; static int abbrev = -1; /* unspecified */ static int max_candidates = 10; static struct hash_table names; @@ -336,6 +337,9 @@ static void describe(const char *arg, int last_one) commit_list_insert_by_date(p, &list); p->object.flags |= c->object.flags; parents = parents->next; + + if (first_parent) + break; } } @@ -404,6 +408,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix) OPT_BOOLEAN(0, "all", &all, N_("use any ref")), OPT_BOOLEAN(0, "tags", &tags, N_("use any tag, even unannotated")), OPT_BOOLEAN(0, "long", &longformat, N_("always use long format")), + OPT_BOOLEAN(0, "first-parent", &first_parent, N_("only follow first parent")), OPT__ABBREV(&abbrev), OPT_SET_INT(0, "exact-match", &max_candidates, N_("only output exact matches"), 0), diff --git a/builtin/fast-export.c b/builtin/fast-export.c index d60d675f6f..d1d68e9fc6 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -613,6 +613,8 @@ static void import_marks(char *input_file) char *line_end, *mark_end; unsigned char sha1[20]; struct object *object; + struct commit *commit; + enum object_type type; line_end = strchr(line, '\n'); if (line[0] != ':' || !line_end) @@ -621,23 +623,29 @@ static void import_marks(char *input_file) mark = strtoumax(line + 1, &mark_end, 10); if (!mark || mark_end == line + 1 - || *mark_end != ' ' || get_sha1(mark_end + 1, sha1)) + || *mark_end != ' ' || get_sha1_hex(mark_end + 1, sha1)) die("corrupt mark line: %s", line); if (last_idnum < mark) last_idnum = mark; - object = parse_object(sha1); - if (!object) + type = sha1_object_info(sha1, NULL); + if (type < 0) + die("object not found: %s", sha1_to_hex(sha1)); + + if (type != OBJ_COMMIT) + /* only commits */ continue; + commit = lookup_commit(sha1); + if (!commit) + die("not a commit? can't happen: %s", sha1_to_hex(sha1)); + + object = &commit->object; + if (object->flags & SHOWN) error("Object %s already has a mark", sha1_to_hex(sha1)); - if (object->type != OBJ_COMMIT) - /* only commits */ - continue; - mark_object(object, mark); object->flags |= SHOWN; diff --git a/builtin/fetch.c b/builtin/fetch.c index 4b6b1dfe66..d15a7343d8 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -119,7 +119,7 @@ static void add_merge_config(struct ref **head, for (rm = *head; rm; rm = rm->next) { if (branch_merge_matches(branch, i, rm->name)) { - rm->merge = 1; + rm->fetch_head_status = FETCH_HEAD_MERGE; break; } } @@ -140,7 +140,7 @@ static void add_merge_config(struct ref **head, refspec.src = branch->merge[i]->src; get_fetch_map(remote_refs, &refspec, tail, 1); for (rm = *old_tail; rm; rm = rm->next) - rm->merge = 1; + rm->fetch_head_status = FETCH_HEAD_MERGE; } } @@ -160,6 +160,8 @@ static struct ref *get_ref_map(struct transport *transport, const struct ref *remote_refs = transport_get_remote_refs(transport); if (ref_count || tags == TAGS_SET) { + struct ref **old_tail; + for (i = 0; i < ref_count; i++) { get_fetch_map(remote_refs, &refs[i], &tail, 0); if (refs[i].dst && refs[i].dst[0]) @@ -167,9 +169,23 @@ static struct ref *get_ref_map(struct transport *transport, } /* Merge everything on the command line, but not --tags */ for (rm = ref_map; rm; rm = rm->next) - rm->merge = 1; + rm->fetch_head_status = FETCH_HEAD_MERGE; if (tags == TAGS_SET) get_fetch_map(remote_refs, tag_refspec, &tail, 0); + + /* + * For any refs that we happen to be fetching via command-line + * arguments, take the opportunity to update their configured + * counterparts. However, we do not want to mention these + * entries in FETCH_HEAD at all, as they would simply be + * duplicates of existing entries. + */ + old_tail = tail; + for (i = 0; i < transport->remote->fetch_refspec_nr; i++) + get_fetch_map(ref_map, &transport->remote->fetch[i], + &tail, 1); + for (rm = *old_tail; rm; rm = rm->next) + rm->fetch_head_status = FETCH_HEAD_IGNORE; } else { /* Use the defaults */ struct remote *remote = transport->remote; @@ -186,7 +202,7 @@ static struct ref *get_ref_map(struct transport *transport, *autotags = 1; if (!i && !has_merge && ref_map && !remote->fetch[0].pattern) - ref_map->merge = 1; + ref_map->fetch_head_status = FETCH_HEAD_MERGE; } /* * if the remote we're fetching from is the same @@ -202,7 +218,7 @@ static struct ref *get_ref_map(struct transport *transport, ref_map = get_remote_ref(remote_refs, "HEAD"); if (!ref_map) die(_("Couldn't find remote ref HEAD")); - ref_map->merge = 1; + ref_map->fetch_head_status = FETCH_HEAD_MERGE; tail = &ref_map->next; } } @@ -389,7 +405,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, const char *what, *kind; struct ref *rm; char *url, *filename = dry_run ? "/dev/null" : git_path("FETCH_HEAD"); - int want_merge; + int want_status; fp = fopen(filename, "a"); if (!fp) @@ -407,19 +423,22 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, } /* - * The first pass writes objects to be merged and then the - * second pass writes the rest, in order to allow using - * FETCH_HEAD as a refname to refer to the ref to be merged. + * We do a pass for each fetch_head_status type in their enum order, so + * merged entries are written before not-for-merge. That lets readers + * use FETCH_HEAD as a refname to refer to the ref to be merged. */ - for (want_merge = 1; 0 <= want_merge; want_merge--) { + for (want_status = FETCH_HEAD_MERGE; + want_status <= FETCH_HEAD_IGNORE; + want_status++) { for (rm = ref_map; rm; rm = rm->next) { struct ref *ref = NULL; + const char *merge_status_marker = ""; commit = lookup_commit_reference_gently(rm->old_sha1, 1); if (!commit) - rm->merge = 0; + rm->fetch_head_status = FETCH_HEAD_NOT_FOR_MERGE; - if (rm->merge != want_merge) + if (rm->fetch_head_status != want_status) continue; if (rm->peer_ref) { @@ -465,16 +484,26 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, strbuf_addf(¬e, "%s ", kind); strbuf_addf(¬e, "'%s' of ", what); } - fprintf(fp, "%s\t%s\t%s", - sha1_to_hex(rm->old_sha1), - rm->merge ? "" : "not-for-merge", - note.buf); - for (i = 0; i < url_len; ++i) - if ('\n' == url[i]) - fputs("\\n", fp); - else - fputc(url[i], fp); - fputc('\n', fp); + switch (rm->fetch_head_status) { + case FETCH_HEAD_NOT_FOR_MERGE: + merge_status_marker = "not-for-merge"; + /* fall-through */ + case FETCH_HEAD_MERGE: + fprintf(fp, "%s\t%s\t%s", + sha1_to_hex(rm->old_sha1), + merge_status_marker, + note.buf); + for (i = 0; i < url_len; ++i) + if ('\n' == url[i]) + fputs("\\n", fp); + else + fputc(url[i], fp); + fputc('\n', fp); + break; + default: + /* do not write anything to FETCH_HEAD */ + break; + } strbuf_reset(¬e); if (ref) { diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 79dfe47320..9c1cfac442 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -77,8 +77,10 @@ static int nr_threads; static int from_stdin; static int strict; +static int do_fsck_object; static int verbose; static int show_stat; +static int check_self_contained_and_connected; static struct progress *progress; @@ -187,13 +189,13 @@ static int mark_link(struct object *obj, int type, void *data) /* The content of each linked object must have been checked or it must be already present in the object database */ -static void check_object(struct object *obj) +static unsigned check_object(struct object *obj) { if (!obj) - return; + return 0; if (!(obj->flags & FLAG_LINK)) - return; + return 0; if (!(obj->flags & FLAG_CHECKED)) { unsigned long size; @@ -201,17 +203,20 @@ static void check_object(struct object *obj) if (type != obj->type || type <= 0) die(_("object of unexpected type")); obj->flags |= FLAG_CHECKED; - return; + return 1; } + + return 0; } -static void check_objects(void) +static unsigned check_objects(void) { - unsigned i, max; + unsigned i, max, foreign_nr = 0; max = get_max_object_index(); for (i = 0; i < max; i++) - check_object(get_indexed_object(i)); + foreign_nr += check_object(get_indexed_object(i)); + return foreign_nr; } @@ -747,8 +752,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, int eaten; void *buf = (void *) data; - if (!buf) - buf = new_data = get_data_from_pack(obj_entry); + assert(data && "data can only be NULL for large _blobs_"); /* * we do not need to free the memory here, as the @@ -757,7 +761,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, obj = parse_object_buffer(sha1, type, size, buf, &eaten); if (!obj) die(_("invalid %s"), typename(type)); - if (fsck_object(obj, 1, fsck_error_function)) + if (do_fsck_object && + fsck_object(obj, 1, fsck_error_function)) die(_("Error in object")); if (fsck_walk(obj, mark_link, NULL)) die(_("Not all child objects of %s are reachable"), sha1_to_hex(obj->sha1)); @@ -1491,6 +1496,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) struct pack_idx_entry **idx_objects; struct pack_idx_option opts; unsigned char pack_sha1[20]; + unsigned foreign_nr = 1; /* zero is a "good" value, assume bad */ if (argc == 2 && !strcmp(argv[1], "-h")) usage(index_pack_usage); @@ -1512,6 +1518,10 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) fix_thin_pack = 1; } else if (!strcmp(arg, "--strict")) { strict = 1; + do_fsck_object = 1; + } else if (!strcmp(arg, "--check-self-contained-and-connected")) { + strict = 1; + check_self_contained_and_connected = 1; } else if (!strcmp(arg, "--verify")) { verify = 1; } else if (!strcmp(arg, "--verify-stat")) { @@ -1625,7 +1635,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) conclude_pack(fix_thin_pack, curr_pack, pack_sha1); free(deltas); if (strict) - check_objects(); + foreign_nr = check_objects(); if (show_stat) show_pack_info(stat_only); @@ -1651,5 +1661,11 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) if (index_name == NULL) free((void *) curr_index); + /* + * Let the caller know this pack is not self contained + */ + if (check_self_contained_and_connected && foreign_nr) + return 1; + return 0; } diff --git a/builtin/log.c b/builtin/log.c index 6e56a50002..9e2123295f 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -19,6 +19,7 @@ #include "remote.h" #include "string-list.h" #include "parse-options.h" +#include "line-log.h" #include "branch.h" #include "streaming.h" #include "version.h" @@ -42,6 +43,12 @@ static const char * const builtin_log_usage[] = { NULL }; +struct line_opt_callback_data { + struct rev_info *rev; + const char *prefix; + struct string_list args; +}; + static int parse_decoration_style(const char *var, const char *value) { switch (git_config_maybe_bool(var, value)) { @@ -76,6 +83,19 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse return 0; } +static int log_line_range_callback(const struct option *option, const char *arg, int unset) +{ + struct line_opt_callback_data *data = option->value; + + if (!arg) + return -1; + + data->rev->line_level_traverse = 1; + string_list_append(&data->args, arg); + + return 0; +} + static void cmd_log_init_defaults(struct rev_info *rev) { if (fmt_pretty) @@ -98,6 +118,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, { struct userformat_want w; int quiet = 0, source = 0, mailmap = 0; + static struct line_opt_callback_data line_cb = {NULL, NULL, STRING_LIST_INIT_DUP}; const struct option builtin_log_options[] = { OPT_BOOL(0, "quiet", &quiet, N_("suppress diff output")), @@ -105,9 +126,15 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, OPT_BOOL(0, "use-mailmap", &mailmap, N_("Use mail map file")), { OPTION_CALLBACK, 0, "decorate", NULL, NULL, N_("decorate options"), PARSE_OPT_OPTARG, decorate_callback}, + OPT_CALLBACK('L', NULL, &line_cb, "n,m:file", + "Process line range n,m in file, counting from 1", + log_line_range_callback), OPT_END() }; + line_cb.rev = rev; + line_cb.prefix = prefix; + mailmap = use_mailmap_config; argc = parse_options(argc, argv, prefix, builtin_log_options, builtin_log_usage, @@ -161,6 +188,10 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, rev->show_decorations = 1; load_ref_decorations(decoration_style); } + + if (rev->line_level_traverse) + line_log_init(rev, line_cb.prefix, &line_cb.args); + setup_pager(); } diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index ed25d81b88..61cbde4094 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -251,7 +251,11 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3]) for (i = 0; i < 3; i++) { mask |= (1 << i); - if (n[i].mode && S_ISDIR(n[i].mode)) + /* + * Treat missing entries as directories so that we return + * after unresolved_directory has handled this. + */ + if (!n[i].mode || S_ISDIR(n[i].mode)) dirmask |= (1 << i); } @@ -302,7 +306,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3]) static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *entry, struct traverse_info *info) { /* Same in both? */ - if (same_entry(entry+1, entry+2) || both_empty(entry+0, entry+2)) { + if (same_entry(entry+1, entry+2) || both_empty(entry+1, entry+2)) { /* Modified, added or removed identically */ resolve(info, NULL, entry+1); return mask; diff --git a/builtin/merge.c b/builtin/merge.c index 3e2daa37c3..2ebe732896 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1054,7 +1054,8 @@ static struct commit_list *collect_parents(struct commit *head_commit, for (i = 0; i < argc; i++) { struct commit *commit = get_merge_parent(argv[i]); if (!commit) - die(_("%s - not something we can merge"), argv[i]); + help_unknown_ref(argv[i], "merge", + "not something we can merge"); remotes = &commit_list_insert(commit, remotes)->next; } *remotes = NULL; diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c index b5a0f88eb8..b20b1ec4c1 100644 --- a/builtin/pack-refs.c +++ b/builtin/pack-refs.c @@ -1,6 +1,6 @@ #include "builtin.h" #include "parse-options.h" -#include "pack-refs.h" +#include "refs.h" static char const * const pack_refs_usage[] = { N_("git pack-refs [options]"), diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c index 83382c1fe1..fa6ce42f44 100644 --- a/builtin/prune-packed.c +++ b/builtin/prune-packed.c @@ -8,9 +8,6 @@ static const char * const prune_packed_usage[] = { NULL }; -#define DRY_RUN 01 -#define VERBOSE 02 - static struct progress *progress; static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts) @@ -29,7 +26,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts) if (!has_sha1_pack(sha1)) continue; memcpy(pathname + len, de->d_name, 38); - if (opts & DRY_RUN) + if (opts & PRUNE_PACKED_DRY_RUN) printf("rm -f %s\n", pathname); else unlink_or_warn(pathname); @@ -44,7 +41,7 @@ void prune_packed_objects(int opts) const char *dir = get_object_directory(); int len = strlen(dir); - if (opts == VERBOSE) + if (opts & PRUNE_PACKED_VERBOSE) progress = start_progress_delay("Removing duplicate objects", 256, 95, 2); @@ -71,10 +68,12 @@ void prune_packed_objects(int opts) int cmd_prune_packed(int argc, const char **argv, const char *prefix) { - int opts = isatty(2) ? VERBOSE : 0; + int opts = isatty(2) ? PRUNE_PACKED_VERBOSE : 0; const struct option prune_packed_options[] = { - OPT_BIT('n', "dry-run", &opts, N_("dry run"), DRY_RUN), - OPT_NEGBIT('q', "quiet", &opts, N_("be quiet"), VERBOSE), + OPT_BIT('n', "dry-run", &opts, N_("dry run"), + PRUNE_PACKED_DRY_RUN), + OPT_NEGBIT('q', "quiet", &opts, N_("be quiet"), + PRUNE_PACKED_VERBOSE), OPT_END() }; diff --git a/builtin/prune.c b/builtin/prune.c index 85843d4f17..6366917c6d 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -132,8 +132,8 @@ int cmd_prune(int argc, const char **argv, const char *prefix) OPT__DRY_RUN(&show_only, N_("do not remove, show only")), OPT__VERBOSE(&verbose, N_("report pruned objects")), OPT_BOOL(0, "progress", &show_progress, N_("show progress")), - OPT_DATE(0, "expire", &expire, - N_("expire objects older than <time>")), + OPT_EXPIRY_DATE(0, "expire", &expire, + N_("expire objects older than <time>")), OPT_END() }; char *s; @@ -165,7 +165,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix) stop_progress(&progress); prune_object_dir(get_object_directory()); - prune_packed_objects(show_only); + prune_packed_objects(show_only ? PRUNE_PACKED_DRY_RUN : 0); remove_temporary_files(get_object_directory()); s = mkpathdup("%s/pack", get_object_directory()); remove_temporary_files(s); diff --git a/builtin/push.c b/builtin/push.c index 909c34dfda..2d84d10720 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -113,17 +113,19 @@ static NORETURN int die_push_simple(struct branch *branch, struct remote *remote remote->name, branch->name, advice_maybe); } +static const char message_detached_head_die[] = + N_("You are not currently on a branch.\n" + "To push the history leading to the current (detached HEAD)\n" + "state now, use\n" + "\n" + " git push %s HEAD:<name-of-remote-branch>\n"); + static void setup_push_upstream(struct remote *remote, int simple) { struct strbuf refspec = STRBUF_INIT; struct branch *branch = branch_get(NULL); if (!branch) - die(_("You are not currently on a branch.\n" - "To push the history leading to the current (detached HEAD)\n" - "state now, use\n" - "\n" - " git push %s HEAD:<name-of-remote-branch>\n"), - remote->name); + die(_(message_detached_head_die), remote->name); if (!branch->merge_nr || !branch->merge || !branch->remote_name) die(_("The current branch %s has no upstream branch.\n" "To push the current branch and set the remote as upstream, use\n" @@ -173,6 +175,8 @@ static void warn_unspecified_push_default_configuration(void) static void setup_default_push_refspecs(struct remote *remote) { + struct branch *branch; + switch (push_default) { default: case PUSH_DEFAULT_UNSPECIFIED: @@ -192,7 +196,10 @@ static void setup_default_push_refspecs(struct remote *remote) break; case PUSH_DEFAULT_CURRENT: - add_refspec("HEAD"); + branch = branch_get(NULL); + if (!branch) + die(_(message_detached_head_die), remote->name); + add_refspec(branch->name); break; case PUSH_DEFAULT_NOTHING: diff --git a/builtin/read-tree.c b/builtin/read-tree.c index 042ac1b84f..0f5d7fe23f 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -66,7 +66,7 @@ static int exclude_per_directory_cb(const struct option *opt, const char *arg, return 0; } -static void debug_stage(const char *label, struct cache_entry *ce, +static void debug_stage(const char *label, const struct cache_entry *ce, struct unpack_trees_options *o) { printf("%s ", label); @@ -80,7 +80,8 @@ static void debug_stage(const char *label, struct cache_entry *ce, sha1_to_hex(ce->sha1)); } -static int debug_merge(struct cache_entry **stages, struct unpack_trees_options *o) +static int debug_merge(const struct cache_entry * const *stages, + struct unpack_trees_options *o) { int i; diff --git a/builtin/reflog.c b/builtin/reflog.c index 72a0af70c3..54184b3d13 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -496,11 +496,9 @@ static int parse_expire_cfg_value(const char *var, const char *value, unsigned l { if (!value) return config_error_nonbool(var); - if (!strcmp(value, "never") || !strcmp(value, "false")) { - *expire = 0; - return 0; - } - *expire = approxidate(value); + if (parse_expiry_date(value, expire)) + return error(_("%s' for '%s' is not a valid timestamp"), + value, var); return 0; } @@ -614,11 +612,13 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) if (!strcmp(arg, "--dry-run") || !strcmp(arg, "-n")) cb.dry_run = 1; else if (!prefixcmp(arg, "--expire=")) { - cb.expire_total = approxidate(arg + 9); + if (parse_expiry_date(arg + 9, &cb.expire_total)) + die(_("'%s' is not a valid timestamp"), arg); explicit_expiry |= EXPIRE_TOTAL; } else if (!prefixcmp(arg, "--expire-unreachable=")) { - cb.expire_unreachable = approxidate(arg + 21); + if (parse_expiry_date(arg + 21, &cb.expire_unreachable)) + die(_("'%s' is not a valid timestamp"), arg); explicit_expiry |= EXPIRE_UNREACH; } else if (!strcmp(arg, "--stale-fix")) diff --git a/builtin/remote.c b/builtin/remote.c index 937484d7c7..5e54d367b8 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -178,7 +178,7 @@ static int add(int argc, const char **argv) argc = parse_options(argc, argv, NULL, options, builtin_remote_add_usage, 0); - if (argc < 2) + if (argc != 2) usage_with_options(builtin_remote_add_usage, options); if (mirror && master) @@ -190,7 +190,8 @@ struct cache_entry { * another. But we never change the name, or the hash state! */ #define CE_STATE_MASK (CE_HASHED | CE_UNHASHED) -static inline void copy_cache_entry(struct cache_entry *dst, struct cache_entry *src) +static inline void copy_cache_entry(struct cache_entry *dst, + const struct cache_entry *src) { unsigned int state = dst->ce_flags & CE_STATE_MASK; @@ -222,7 +223,8 @@ static inline unsigned int create_ce_mode(unsigned int mode) return S_IFGITLINK; return S_IFREG | ce_permissions(mode); } -static inline unsigned int ce_mode_from_stat(struct cache_entry *ce, unsigned int mode) +static inline unsigned int ce_mode_from_stat(const struct cache_entry *ce, + unsigned int mode) { extern int trust_executable_bit, has_symlinks; if (!has_symlinks && S_ISREG(mode) && @@ -480,8 +482,8 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig #define CE_MATCH_RACY_IS_DIRTY 02 /* do stat comparison even if CE_SKIP_WORKTREE is true */ #define CE_MATCH_IGNORE_SKIP_WORKTREE 04 -extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); -extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); +extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int); +extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int); #define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */ @@ -910,6 +912,7 @@ void show_date_relative(unsigned long time, int tz, const struct timeval *now, struct strbuf *timebuf); int parse_date(const char *date, char *buf, int bufsize); int parse_date_basic(const char *date, unsigned long *timestamp, int *offset); +int parse_expiry_date(const char *date, unsigned long *timestamp); void datestamp(char *buf, int bufsize); #define approxidate(s) approxidate_careful((s), NULL) unsigned long approxidate_careful(const char *, int *); @@ -1024,9 +1027,21 @@ struct ref { unsigned int force:1, forced_update:1, - merge:1, deletion:1, matched:1; + + /* + * Order is important here, as we write to FETCH_HEAD + * in numeric order. And the default NOT_FOR_MERGE + * should be 0, so that xcalloc'd structures get it + * by default. + */ + enum { + FETCH_HEAD_MERGE = -1, + FETCH_HEAD_NOT_FOR_MERGE = 0, + FETCH_HEAD_IGNORE = 1 + } fetch_head_status; + enum { REF_STATUS_NONE = 0, REF_STATUS_OK, diff --git a/combine-diff.c b/combine-diff.c index 77d7872aaf..3e8bb17831 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -518,8 +518,11 @@ static int give_context(struct sline *sline, unsigned long cnt, int num_parent) unsigned long k; /* Paint a few lines before the first interesting line. */ - while (j < i) - sline[j++].flag |= mark | no_pre_delete; + while (j < i) { + if (!(sline[j].flag & mark)) + sline[j].flag |= no_pre_delete; + sline[j++].flag |= mark; + } again: /* we know up to i is to be included. where does the @@ -176,6 +176,8 @@ extern int for_each_commit_graft(each_commit_graft_fn, void *); extern int is_repository_shallow(void); extern struct commit_list *get_shallow_commits(struct object_array *heads, int depth, int shallow_flag, int not_shallow_flag); +extern void check_shallow_file_for_update(void); +extern void set_alternate_shallow_file(const char *path); int is_descendant_of(struct commit *, struct commit_list *); int in_merge_bases(struct commit *, struct commit *); diff --git a/compat/clipped-write.c b/compat/clipped-write.c new file mode 100644 index 0000000000..b8f98ff77f --- /dev/null +++ b/compat/clipped-write.c @@ -0,0 +1,13 @@ +#include "../git-compat-util.h" +#undef write + +/* + * Version of write that will write at most INT_MAX bytes. + * Workaround a xnu bug on Mac OS X + */ +ssize_t clipped_write(int fildes, const void *buf, size_t nbyte) +{ + if (nbyte > INT_MAX) + nbyte = INT_MAX; + return write(fildes, buf, nbyte); +} diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c index 5ef0685135..378c467401 100644 --- a/compat/fnmatch/fnmatch.c +++ b/compat/fnmatch/fnmatch.c @@ -25,6 +25,7 @@ # define _GNU_SOURCE 1 #endif +#include <stddef.h> #include <errno.h> #include <fnmatch.h> #include <ctype.h> @@ -121,7 +122,7 @@ whose names are inconsistent. */ # if !defined _LIBC && !defined getenv -extern char *getenv (); +extern char *getenv (const char *name); # endif # ifndef errno diff --git a/compat/mingw.c b/compat/mingw.c index b673625580..bb92c436f7 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -841,8 +841,8 @@ struct pinfo_t { struct pinfo_t *next; pid_t pid; HANDLE proc; -} pinfo_t; -struct pinfo_t *pinfo = NULL; +}; +static struct pinfo_t *pinfo = NULL; CRITICAL_SECTION pinfo_cs; static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **env, @@ -1253,7 +1253,7 @@ static int WSAAPI getaddrinfo_stub(const char *node, const char *service, else sin->sin_addr.s_addr = INADDR_LOOPBACK; ai->ai_addr = (struct sockaddr *)sin; - ai->ai_next = 0; + ai->ai_next = NULL; return 0; } @@ -1677,14 +1677,16 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out) #undef signal sig_handler_t mingw_signal(int sig, sig_handler_t handler) { - sig_handler_t old = timer_fn; + sig_handler_t old; switch (sig) { case SIGALRM: + old = timer_fn; timer_fn = handler; break; case SIGINT: + old = sigint_fn; sigint_fn = handler; break; diff --git a/compat/mingw.h b/compat/mingw.h index 685cd2c3d4..bd0a88bc1d 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -334,13 +334,20 @@ char **make_augmented_environ(const char *const *vars); void free_environ(char **env); /* + * A critical section used in the implementation of the spawn + * functions (mingw_spawnv[p]e()) and waitpid(). Intialised in + * the replacement main() macro below. + */ +extern CRITICAL_SECTION pinfo_cs; + +/* * A replacement of main() that ensures that argv[0] has a path * and that default fmode and std(in|out|err) are in binary mode */ #define main(c,v) dummy_decl_mingw_main(); \ -static int mingw_main(); \ -int main(int argc, const char **argv) \ +static int mingw_main(c,v); \ +int main(int argc, char **argv) \ { \ extern CRITICAL_SECTION pinfo_cs; \ _fmode = _O_BINARY; \ diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h index 1401a67274..5a44dead9d 100644 --- a/compat/nedmalloc/malloc.c.h +++ b/compat/nedmalloc/malloc.c.h @@ -484,6 +484,10 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP #define DLMALLOC_VERSION 20804 #endif /* DLMALLOC_VERSION */ +#if defined(linux) +#define _GNU_SOURCE 1 +#endif + #ifndef WIN32 #ifdef _WIN32 #define WIN32 1 @@ -1802,7 +1806,7 @@ struct win32_mlock_t static MLOCK_T malloc_global_mutex = { 0, 0, 0}; -static FORCEINLINE long win32_getcurrentthreadid() { +static FORCEINLINE long win32_getcurrentthreadid(void) { #ifdef _MSC_VER #if defined(_M_IX86) long *threadstruct=(long *)__readfsdword(0x18); diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c index 91c4e7f27b..609ebba125 100644 --- a/compat/nedmalloc/nedmalloc.c +++ b/compat/nedmalloc/nedmalloc.c @@ -159,8 +159,8 @@ struct mallinfo nedmallinfo(void) THROWSPEC { return nedpmallinfo(0); } #endif int nedmallopt(int parno, int value) THROWSPEC { return nedpmallopt(0, parno, value); } int nedmalloc_trim(size_t pad) THROWSPEC { return nedpmalloc_trim(0, pad); } -void nedmalloc_stats() THROWSPEC { nedpmalloc_stats(0); } -size_t nedmalloc_footprint() THROWSPEC { return nedpmalloc_footprint(0); } +void nedmalloc_stats(void) THROWSPEC { nedpmalloc_stats(0); } +size_t nedmalloc_footprint(void) THROWSPEC { return nedpmalloc_footprint(0); } void **nedindependent_calloc(size_t elemsno, size_t elemsize, void **chunks) THROWSPEC { return nedpindependent_calloc(0, elemsno, elemsize, chunks); } void **nedindependent_comalloc(size_t elems, size_t *sizes, void **chunks) THROWSPEC { return nedpindependent_comalloc(0, elems, sizes, chunks); } diff --git a/compat/poll/poll.c b/compat/poll/poll.c index 7d226ecb29..44103103a4 100644 --- a/compat/poll/poll.c +++ b/compat/poll/poll.c @@ -576,7 +576,7 @@ restart: { /* It's a socket. */ WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); - WSAEventSelect ((SOCKET) h, 0, 0); + WSAEventSelect ((SOCKET) h, NULL, 0); /* If we're lucky, WSAEnumNetworkEvents already provided a way to distinguish FD_READ and FD_ACCEPT; this saves a recv later. */ diff --git a/compat/regex/regexec.c b/compat/regex/regexec.c index 0194965c5d..0cd6e0ef98 100644 --- a/compat/regex/regexec.c +++ b/compat/regex/regexec.c @@ -2313,7 +2313,7 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx, } /* Update the state_log if we need */ -re_dfastate_t * +static re_dfastate_t * internal_function merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *next_state) @@ -2326,7 +2326,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } - else if (mctx->state_log[cur_idx] == 0) + else if (mctx->state_log[cur_idx] == NULL) { mctx->state_log[cur_idx] = next_state; } @@ -2392,7 +2392,7 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, /* Skip bytes in the input that correspond to part of a multi-byte match, then look in the log for a state from which to restart matching. */ -re_dfastate_t * +static re_dfastate_t * internal_function find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) { diff --git a/compat/unsetenv.c b/compat/unsetenv.c index eb29f5e084..4ea18569c2 100644 --- a/compat/unsetenv.c +++ b/compat/unsetenv.c @@ -2,7 +2,6 @@ void gitunsetenv (const char *name) { - extern char **environ; int src, dst; size_t nmln; diff --git a/compat/win32/pthread.c b/compat/win32/pthread.c index 010e875ec4..e18f5c6e2e 100644 --- a/compat/win32/pthread.c +++ b/compat/win32/pthread.c @@ -52,7 +52,7 @@ int win32_pthread_join(pthread_t *thread, void **value_ptr) pthread_t pthread_self(void) { - pthread_t t = { 0 }; + pthread_t t = { NULL }; t.tid = GetCurrentThreadId(); return t; } diff --git a/compat/win32mmap.c b/compat/win32mmap.c index 61d2ef8e46..80a8c9af4f 100644 --- a/compat/win32mmap.c +++ b/compat/win32mmap.c @@ -21,8 +21,8 @@ void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of if (!(flags & MAP_PRIVATE)) die("Invalid usage of mmap when built with USE_WIN32_MMAP"); - hmap = CreateFileMapping((HANDLE)_get_osfhandle(fd), 0, PAGE_WRITECOPY, - 0, 0, 0); + hmap = CreateFileMapping((HANDLE)_get_osfhandle(fd), NULL, + PAGE_WRITECOPY, 0, 0, NULL); if (!hmap) return MAP_FAILED; @@ -58,7 +58,7 @@ static int handle_path_include(const char *path, struct config_include_data *inc path = buf.buf; } - if (!access_or_die(path, R_OK)) { + if (!access_or_die(path, R_OK, 0)) { if (++inc->depth > MAX_INCLUDE_DEPTH) die(include_depth_advice, MAX_INCLUDE_DEPTH, path, cf && cf->name ? cf->name : "the command line"); @@ -566,7 +566,20 @@ static int git_default_core_config(const char *var, const char *value) trust_ctime = git_config_bool(var, value); return 0; } - if (!strcmp(var, "core.statinfo")) { + if (!strcmp(var, "core.statinfo") || + !strcmp(var, "core.checkstat")) { + /* + * NEEDSWORK: statinfo was a typo in v1.8.2 that has + * never been advertised. we will remove it at Git + * 2.0 boundary. + */ + if (!strcmp(var, "core.statinfo")) { + static int warned; + if (!warned++) { + warning("'core.statinfo' will be removed in Git 2.0; " + "use 'core.checkstat' instead."); + } + } if (!strcasecmp(value, "default")) check_stat = 1; else if (!strcasecmp(value, "minimal")) @@ -954,23 +967,23 @@ int git_config_early(config_fn_t fn, void *data, const char *repo_config) home_config_paths(&user_config, &xdg_config, "config"); - if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK)) { + if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0)) { ret += git_config_from_file(fn, git_etc_gitconfig(), data); found += 1; } - if (xdg_config && !access_or_die(xdg_config, R_OK)) { + if (xdg_config && !access_or_die(xdg_config, R_OK, ACCESS_EACCES_OK)) { ret += git_config_from_file(fn, xdg_config, data); found += 1; } - if (user_config && !access_or_die(user_config, R_OK)) { + if (user_config && !access_or_die(user_config, R_OK, ACCESS_EACCES_OK)) { ret += git_config_from_file(fn, user_config, data); found += 1; } - if (repo_config && !access_or_die(repo_config, R_OK)) { + if (repo_config && !access_or_die(repo_config, R_OK, 0)) { ret += git_config_from_file(fn, repo_config, data); found += 1; } diff --git a/config.mak.uname b/config.mak.uname index 28aa239be0..7ac541e9eb 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -95,6 +95,7 @@ ifeq ($(uname_S),Darwin) NO_MEMMEM = YesPlease USE_ST_TIMESPEC = YesPlease HAVE_DEV_TTY = YesPlease + NEEDS_CLIPPED_WRITE = YesPlease COMPAT_OBJS += compat/precompose_utf8.o BASIC_CFLAGS += -DPRECOMPOSE_UNICODE endif @@ -479,7 +480,6 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_FNMATCH = YesPlease NO_MEMMEM = YesPlease NEEDS_LIBICONV = YesPlease - OLD_ICONV = YesPlease NO_STRTOUMAX = YesPlease NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease @@ -499,13 +499,17 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_INET_PTON = YesPlease NO_INET_NTOP = YesPlease NO_POSIX_GOODIES = UnfortunatelyYes + DEFAULT_HELP_FORMAT = html COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" COMPAT_OBJS += compat/mingw.o compat/winansi.o \ compat/win32/pthread.o compat/win32/syslog.o \ compat/win32/dirent.o + BASIC_LDFLAGS += -Wl,--large-address-aware EXTLIBS += -lws2_32 + GITLIBS += git.res PTHREAD_LIBS = + RC = windres -O coff NATIVE_CRLF = YesPlease X = .exe SPARSE_FLAGS = -Wno-one-bit-signed-bitfield @@ -517,6 +521,7 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) NO_R_TO_GCC_LINKER = YesPlease INTERNAL_QSORT = YesPlease HAVE_LIBCHARSET_H = YesPlease + NO_GETTEXT = YesPlease else NO_CURL = YesPlease endif @@ -551,8 +551,11 @@ struct child_process *git_connect(int fd[2], const char *url_orig, path = strchr(end, c); if (path && !has_dos_drive_prefix(end)) { if (c == ':') { - protocol = PROTO_SSH; - *path++ = '\0'; + if (path < strchrnul(host, '/')) { + protocol = PROTO_SSH; + *path++ = '\0'; + } else /* '/' in the host part, assume local path */ + path = end; } } else path = end; diff --git a/connected.c b/connected.c index 1e89c1cd1d..fae8d64c12 100644 --- a/connected.c +++ b/connected.c @@ -2,7 +2,12 @@ #include "run-command.h" #include "sigchain.h" #include "connected.h" +#include "transport.h" +int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data) +{ + return check_everything_connected_with_transport(fn, quiet, cb_data, NULL); +} /* * If we feed all the commits we want to verify to this command * @@ -14,7 +19,10 @@ * * Returns 0 if everything is connected, non-zero otherwise. */ -int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data) +int check_everything_connected_with_transport(sha1_iterate_fn fn, + int quiet, + void *cb_data, + struct transport *transport) { struct child_process rev_list; const char *argv[] = {"rev-list", "--objects", @@ -22,10 +30,23 @@ int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data) char commit[41]; unsigned char sha1[20]; int err = 0; + struct packed_git *new_pack = NULL; if (fn(cb_data, sha1)) return err; + if (transport && transport->smart_options && + transport->smart_options->self_contained_and_connected && + transport->pack_lockfile && + !suffixcmp(transport->pack_lockfile, ".keep")) { + struct strbuf idx_file = STRBUF_INIT; + strbuf_addstr(&idx_file, transport->pack_lockfile); + strbuf_setlen(&idx_file, idx_file.len - 5); /* ".keep" */ + strbuf_addstr(&idx_file, ".idx"); + new_pack = add_packed_git(idx_file.buf, idx_file.len, 1); + strbuf_release(&idx_file); + } + if (quiet) argv[5] = "--quiet"; @@ -42,6 +63,17 @@ int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data) commit[40] = '\n'; do { + /* + * If index-pack already checked that: + * - there are no dangling pointers in the new pack + * - the pack is self contained + * Then if the updated ref is in the new pack, then we + * are sure the ref is good and not sending it to + * rev-list for verification. + */ + if (new_pack && find_pack_entry_one(sha1, new_pack)) + continue; + memcpy(commit, sha1_to_hex(sha1), 40); if (write_in_full(rev_list.in, commit, 41) < 0) { if (errno != EPIPE && errno != EINVAL) diff --git a/connected.h b/connected.h index 7e4585a6cb..0b060b7429 100644 --- a/connected.h +++ b/connected.h @@ -1,6 +1,8 @@ #ifndef CONNECTED_H #define CONNECTED_H +struct transport; + /* * Take callback data, and return next object name in the buffer. * When called after returning the name for the last object, return -1 @@ -16,5 +18,8 @@ typedef int (*sha1_iterate_fn)(void *, unsigned char [20]); * Return 0 if Ok, non zero otherwise (i.e. some missing objects) */ extern int check_everything_connected(sha1_iterate_fn, int quiet, void *cb_data); +extern int check_everything_connected_with_transport(sha1_iterate_fn, int quiet, + void *cb_data, + struct transport *transport); #endif /* CONNECTED_H */ diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bc3fc9e323..56c52c6654 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -252,106 +252,50 @@ __gitcomp_file () # since tilde expansion is not applied. # This means that COMPREPLY will be empty and Bash default # completion will be used. - COMPREPLY=($(compgen -P "${2-}" -W "$1" -- "${3-$cur}")) + __gitcompadd "$1" "${2-}" "${3-$cur}" "" - # Tell Bash that compspec generates filenames. - compopt -o filenames 2>/dev/null + # use a hack to enable file mode in bash < 4 + compopt -o filenames +o nospace 2>/dev/null || + compgen -f /non-existing-dir/ > /dev/null } -__git_index_file_list_filter_compat () -{ - local path - - while read -r path; do - case "$path" in - ?*/*) echo "${path%%/*}/" ;; - *) echo "$path" ;; - esac - done -} - -__git_index_file_list_filter_bash () -{ - local path - - while read -r path; do - case "$path" in - ?*/*) - # XXX if we append a slash to directory names when using - # `compopt -o filenames`, Bash will append another slash. - # This is pretty stupid, and this the reason why we have to - # define a compatible version for this function. - echo "${path%%/*}" ;; - *) - echo "$path" ;; - esac - done -} - -# Process path list returned by "ls-files" and "diff-index --name-only" -# commands, in order to list only file names relative to a specified -# directory, and append a slash to directory names. -__git_index_file_list_filter () -{ - # Default to Bash >= 4.x - __git_index_file_list_filter_bash -} - -# Execute git ls-files, returning paths relative to the directory -# specified in the first argument, and using the options specified in -# the second argument. +# Execute 'git ls-files', unless the --committable option is specified, in +# which case it runs 'git diff-index' to find out the files that can be +# committed. It return paths relative to the directory specified in the first +# argument, and using the options specified in the second argument. __git_ls_files_helper () { ( test -n "${CDPATH+set}" && unset CDPATH - # NOTE: $2 is not quoted in order to support multiple options - cd "$1" && git ls-files --exclude-standard $2 + cd "$1" + if [ "$2" == "--committable" ]; then + git diff-index --name-only --relative HEAD + else + # NOTE: $2 is not quoted in order to support multiple options + git ls-files --exclude-standard $2 + fi ) 2>/dev/null } -# Execute git diff-index, returning paths relative to the directory -# specified in the first argument, and using the tree object id -# specified in the second argument. -__git_diff_index_helper () -{ - ( - test -n "${CDPATH+set}" && unset CDPATH - cd "$1" && git diff-index --name-only --relative "$2" - ) 2>/dev/null -} - # __git_index_files accepts 1 or 2 arguments: # 1: Options to pass to ls-files (required). -# Supported options are --cached, --modified, --deleted, --others, -# and --directory. # 2: A directory path (optional). # If provided, only files within the specified directory are listed. # Sub directories are never recursed. Path must have a trailing # slash. __git_index_files () { - local dir="$(__gitdir)" root="${2-.}" + local dir="$(__gitdir)" root="${2-.}" file if [ -d "$dir" ]; then - __git_ls_files_helper "$root" "$1" | __git_index_file_list_filter | - sort | uniq - fi -} - -# __git_diff_index_files accepts 1 or 2 arguments: -# 1) The id of a tree object. -# 2) A directory path (optional). -# If provided, only files within the specified directory are listed. -# Sub directories are never recursed. Path must have a trailing -# slash. -__git_diff_index_files () -{ - local dir="$(__gitdir)" root="${2-.}" - - if [ -d "$dir" ]; then - __git_diff_index_helper "$root" "$1" | __git_index_file_list_filter | - sort | uniq + __git_ls_files_helper "$root" "$1" | + while read -r file; do + case "$file" in + ?*/*) echo "${file%%/*}" ;; + *) echo "$file" ;; + esac + done | sort | uniq fi } @@ -427,14 +371,8 @@ __git_refs () done ;; *) - git ls-remote "$dir" HEAD ORIG_HEAD 'refs/tags/*' 'refs/heads/*' 'refs/remotes/*' 2>/dev/null | \ - while read -r hash i; do - case "$i" in - *^{}) ;; - refs/*) echo "${i#refs/*/}" ;; - *) echo "$i" ;; - esac - done + echo "HEAD" + git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##" ;; esac } @@ -552,44 +490,23 @@ __git_complete_revlist_file () } -# __git_complete_index_file requires 1 argument: the options to pass to -# ls-file +# __git_complete_index_file requires 1 argument: +# 1: the options to pass to ls-file +# +# The exception is --committable, which finds the files appropriate commit. __git_complete_index_file () { - local pfx cur_="$cur" + local pfx="" cur_="$cur" case "$cur_" in ?*/*) pfx="${cur_%/*}" cur_="${cur_##*/}" pfx="${pfx}/" - - __gitcomp_file "$(__git_index_files "$1" "$pfx")" "$pfx" "$cur_" - ;; - *) - __gitcomp_file "$(__git_index_files "$1")" "" "$cur_" ;; esac -} - -# __git_complete_diff_index_file requires 1 argument: the id of a tree -# object -__git_complete_diff_index_file () -{ - local pfx cur_="$cur" - case "$cur_" in - ?*/*) - pfx="${cur_%/*}" - cur_="${cur_##*/}" - pfx="${pfx}/" - - __gitcomp_file "$(__git_diff_index_files "$1" "$pfx")" "$pfx" "$cur_" - ;; - *) - __gitcomp_file "$(__git_diff_index_files "$1")" "" "$cur_" - ;; - esac + __gitcomp_file "$(__git_index_files "$1" "$pfx")" "$pfx" "$cur_" } __git_complete_file () @@ -1213,7 +1130,7 @@ _git_commit () esac if git rev-parse --verify --quiet HEAD >/dev/null; then - __git_complete_diff_index_file "HEAD" + __git_complete_index_file "--committable" else # This is the first commit __git_complete_index_file "--cached" @@ -1314,11 +1231,12 @@ _git_fetch () } __git_format_patch_options=" - --stdout --attach --no-attach --thread --thread= --output-directory + --stdout --attach --no-attach --thread --thread= --no-thread --numbered --start-number --numbered-files --keep-subject --signoff --signature --no-signature --in-reply-to= --cc= --full-index --binary --not --all --cover-letter --no-prefix --src-prefix= --dst-prefix= --inline --suffix= --ignore-if-in-upstream --subject-prefix= + --output-directory --reroll-count --to= --quiet --notes " _git_format_patch () @@ -1810,7 +1728,7 @@ __git_config_get_set_variables () _git_config () { case "$prev" in - branch.*.remote) + branch.*.remote|branch.*.pushremote) __gitcomp_nl "$(__git_remotes)" return ;; @@ -1818,11 +1736,19 @@ _git_config () __gitcomp_nl "$(__git_refs)" return ;; + branch.*.rebase) + __gitcomp "false true" + return + ;; + remote.pushdefault) + __gitcomp_nl "$(__git_remotes)" + return + ;; remote.*.fetch) local remote="${prev#remote.}" remote="${remote%.fetch}" if [ -z "$cur" ]; then - __gitcompadd "refs/heads/" "" "" "" + __gitcomp_nl "refs/heads/" "" "" "" return fi __gitcomp_nl "$(__git_refs_remotes "$remote")" @@ -1857,6 +1783,10 @@ _git_config () " return ;; + diff.submodule) + __gitcomp "log short" + return + ;; help.format) __gitcomp "man info web html" return @@ -1898,7 +1828,7 @@ _git_config () ;; branch.*.*) local pfx="${cur%.*}." cur_="${cur##*.}" - __gitcomp "remote merge mergeoptions rebase" "$pfx" "$cur_" + __gitcomp "remote pushremote merge mergeoptions rebase" "$pfx" "$cur_" return ;; branch.*) @@ -2051,13 +1981,14 @@ _git_config () core.whitespace core.worktree diff.autorefreshindex - diff.statGraphWidth diff.external diff.ignoreSubmodules diff.mnemonicprefix diff.noprefix diff.renameLimit diff.renames + diff.statGraphWidth + diff.submodule diff.suppressBlankEmpty diff.tool diff.wordRegex @@ -2192,6 +2123,7 @@ _git_config () receive.fsckObjects receive.unpackLimit receive.updateserverinfo + remote.pushdefault remotes. repack.usedeltabaseoffset rerere.autoupdate @@ -2436,7 +2368,7 @@ _git_svn () --no-metadata --use-svm-props --use-svnsync-props --log-window-size= --no-checkout --quiet --repack-flags --use-log-author --localtime - --ignore-paths= $remote_opts + --ignore-paths= --include-paths= $remote_opts " local init_opts=" --template= --shared= --trunk= --tags= @@ -2648,7 +2580,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then --*=*|*.) ;; *) c="$c " ;; esac - array[$#array+1]="$c" + array+=("$c") done compset -P '*[=:]' compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 @@ -2674,35 +2606,19 @@ if [[ -n ${ZSH_VERSION-} ]]; then compadd -Q -p "${2-}" -f -- ${=1} && _ret=0 } - __git_zsh_helper () - { - emulate -L ksh - local cur cword prev - cur=${words[CURRENT-1]} - prev=${words[CURRENT-2]} - let cword=CURRENT-1 - __${service}_main - } - _git () { - emulate -L zsh - local _ret=1 - __git_zsh_helper - let _ret && _default -S '' && _ret=0 + local _ret=1 cur cword prev + cur=${words[CURRENT]} + prev=${words[CURRENT-1]} + let cword=CURRENT-1 + emulate ksh -c __${service}_main + let _ret && _default && _ret=0 return _ret } compdef _git git gitk return -elif [[ -n ${BASH_VERSION-} ]]; then - if ((${BASH_VERSINFO[0]} < 4)); then - # compopt is not supported - __git_index_file_list_filter () - { - __git_index_file_list_filter_compat - } - fi fi __git_func_wrap () diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index cf8116d477..fac5e711eb 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -2,18 +2,19 @@ # zsh completion wrapper for git # -# You need git's bash completion script installed somewhere, by default on the -# same directory as this script. +# Copyright (c) 2012-2013 Felipe Contreras <felipe.contreras@gmail.com> # -# If your script is on ~/.git-completion.sh instead, you can configure it on -# your ~/.zshrc: +# You need git's bash completion script installed somewhere, by default it +# would be the location bash-completion uses. +# +# If your script is somewhere else, you can configure it on your ~/.zshrc: # # zstyle ':completion:*:*:git:*' script ~/.git-completion.sh # -# The recommended way to install this script is to copy to -# '~/.zsh/completion/_git', and then add the following to your ~/.zshrc file: +# The recommended way to install this script is to copy to '~/.zsh/_git', and +# then add the following to your ~/.zshrc file: # -# fpath=(~/.zsh/completion $fpath) +# fpath=(~/.zsh $fpath) complete () { @@ -21,8 +22,23 @@ complete () return 0 } +zstyle -T ':completion:*:*:git:*' tag-order && \ + zstyle ':completion:*:*:git:*' tag-order 'common-commands' + zstyle -s ":completion:*:*:git:*" script script -test -z "$script" && script="$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash +if [ -z "$script" ]; then + local -a locations + local e + locations=( + '/etc/bash_completion.d/git' # fedora, old debian + '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian + '/usr/share/bash-completion/git' # gentoo + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + ) + for e in $locations; do + test -f $e && script="$e" && break + done +fi ZSH_VERSION='' . "$script" __gitcomp () @@ -69,18 +85,131 @@ __gitcomp_file () compadd -Q -p "${2-}" -f -- ${=1} && _ret=0 } +__git_zsh_bash_func () +{ + emulate -L ksh + + local command=$1 + + local completion_func="_git_${command//-/_}" + declare -f $completion_func >/dev/null && $completion_func && return + + local expansion=$(__git_aliased_command "$command") + if [ -n "$expansion" ]; then + completion_func="_git_${expansion//-/_}" + declare -f $completion_func >/dev/null && $completion_func + fi +} + +__git_zsh_cmd_common () +{ + local -a list + list=( + add:'add file contents to the index' + bisect:'find by binary search the change that introduced a bug' + branch:'list, create, or delete branches' + checkout:'checkout a branch or paths to the working tree' + clone:'clone a repository into a new directory' + commit:'record changes to the repository' + diff:'show changes between commits, commit and working tree, etc' + fetch:'download objects and refs from another repository' + grep:'print lines matching a pattern' + init:'create an empty Git repository or reinitialize an existing one' + log:'show commit logs' + merge:'join two or more development histories together' + mv:'move or rename a file, a directory, or a symlink' + pull:'fetch from and merge with another repository or a local branch' + push:'update remote refs along with associated objects' + rebase:'forward-port local commits to the updated upstream head' + reset:'reset current HEAD to the specified state' + rm:'remove files from the working tree and from the index' + show:'show various types of objects' + status:'show the working tree status' + tag:'create, list, delete or verify a tag object signed with GPG') + _describe -t common-commands 'common commands' list && _ret=0 +} + +__git_zsh_cmd_alias () +{ + local -a list + list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*}) + _describe -t alias-commands 'aliases' list $* && _ret=0 +} + +__git_zsh_cmd_all () +{ + local -a list + emulate ksh -c __git_compute_all_commands + list=( ${=__git_all_commands} ) + _describe -t all-commands 'all commands' list && _ret=0 +} + +__git_zsh_main () +{ + local curcontext="$curcontext" state state_descr line + typeset -A opt_args + local -a orig_words + + orig_words=( ${words[@]} ) + + _arguments -C \ + '(-p --paginate --no-pager)'{-p,--paginate}'[pipe all output into ''less'']' \ + '(-p --paginate)--no-pager[do not pipe git output into a pager]' \ + '--git-dir=-[set the path to the repository]: :_directories' \ + '--bare[treat the repository as a bare repository]' \ + '(- :)--version[prints the git suite version]' \ + '--exec-path=-[path to where your core git programs are installed]:: :_directories' \ + '--html-path[print the path where git''s HTML documentation is installed]' \ + '--info-path[print the path where the Info files are installed]' \ + '--man-path[print the manpath (see `man(1)`) for the man pages]' \ + '--work-tree=-[set the path to the working tree]: :_directories' \ + '--namespace=-[set the git namespace]' \ + '--no-replace-objects[do not use replacement refs to replace git objects]' \ + '(- :)--help[prints the synopsis and a list of the most commonly used commands]: :->arg' \ + '(-): :->command' \ + '(-)*:: :->arg' && return + + case $state in + (command) + _alternative \ + 'alias-commands:alias:__git_zsh_cmd_alias' \ + 'common-commands:common:__git_zsh_cmd_common' \ + 'all-commands:all:__git_zsh_cmd_all' && _ret=0 + ;; + (arg) + local command="${words[1]}" __git_dir + + if (( $+opt_args[--bare] )); then + __git_dir='.' + else + __git_dir=${opt_args[--git-dir]} + fi + + (( $+opt_args[--help] )) && command='help' + + words=( ${orig_words[@]} ) + + __git_zsh_bash_func $command + ;; + esac +} + _git () { local _ret=1 - () { - emulate -L ksh - local cur cword prev - cur=${words[CURRENT-1]} - prev=${words[CURRENT-2]} - let cword=CURRENT-1 - __${service}_main - } - let _ret && _default -S '' && _ret=0 + local cur cword prev + + cur=${words[CURRENT]} + prev=${words[CURRENT-1]} + let cword=CURRENT-1 + + if (( $+functions[__${service}_zsh_main] )); then + __${service}_zsh_main + else + emulate ksh -c __${service}_main + fi + + let _ret && _default && _ret=0 return _ret } diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 054c52e90a..86a4f3fa49 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -20,7 +20,8 @@ # <post>, which are strings you would put in $PS1 before # and after the status string generated by the git-prompt # machinery. e.g. -# PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "' +# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "' +# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" } # will show username, at-sign, host, colon, cwd, then # various status string, followed by dollar and SP, as # your prompt. @@ -124,7 +125,7 @@ __git_ps1_show_upstream () fi ;; svn-remote.*.url) - svn_remote[ $((${#svn_remote[@]} + 1)) ]="$value" + svn_remote[$((${#svn_remote[@]} + 1))]="$value" svn_url_pattern+="\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; @@ -146,10 +147,11 @@ __git_ps1_show_upstream () svn*) # get the upstream from the "git-svn-id: ..." in a commit message # (git-svn uses essentially the same procedure internally) - local svn_upstream=($(git log --first-parent -1 \ + local -a svn_upstream + svn_upstream=($(git log --first-parent -1 \ --grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null)) if [[ 0 -ne ${#svn_upstream[@]} ]]; then - svn_upstream=${svn_upstream[ ${#svn_upstream[@]} - 2 ]} + svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]} svn_upstream=${svn_upstream%@*} local n_stop="${#svn_remote[@]}" for ((n=1; n <= n_stop; n++)); do @@ -222,6 +224,85 @@ __git_ps1_show_upstream () } +# Helper function that is meant to be called from __git_ps1. It +# builds up a gitstring injecting color codes into the appropriate +# places. +__git_ps1_colorize_gitstring () +{ + if [[ -n ${ZSH_VERSION-} ]]; then + local c_red='%F{red}' + local c_green='%F{green}' + local c_lblue='%F{blue}' + local c_clear='%f' + local bad_color=$c_red + local ok_color=$c_green + local branch_color="$c_clear" + local flags_color="$c_lblue" + local branchstring="$c${b##refs/heads/}" + + if [ $detached = no ]; then + branch_color="$ok_color" + else + branch_color="$bad_color" + fi + + gitstring="$branch_color$branchstring$c_clear" + + if [ -n "$w$i$s$u$r$p" ]; then + gitstring="$gitstring$z" + fi + if [ "$w" = "*" ]; then + gitstring="$gitstring$bad_color$w" + fi + if [ -n "$i" ]; then + gitstring="$gitstring$ok_color$i" + fi + if [ -n "$s" ]; then + gitstring="$gitstring$flags_color$s" + fi + if [ -n "$u" ]; then + gitstring="$gitstring$bad_color$u" + fi + gitstring="$gitstring$c_clear$r$p" + return + fi + local c_red='\e[31m' + local c_green='\e[32m' + local c_lblue='\e[1;34m' + local c_clear='\e[0m' + local bad_color=$c_red + local ok_color=$c_green + local branch_color="$c_clear" + local flags_color="$c_lblue" + local branchstring="$c${b##refs/heads/}" + + if [ $detached = no ]; then + branch_color="$ok_color" + else + branch_color="$bad_color" + fi + + # Setting gitstring directly with \[ and \] around colors + # is necessary to prevent wrapping issues! + gitstring="\[$branch_color\]$branchstring\[$c_clear\]" + + if [ -n "$w$i$s$u$r$p" ]; then + gitstring="$gitstring$z" + fi + if [ "$w" = "*" ]; then + gitstring="$gitstring\[$bad_color\]$w" + fi + if [ -n "$i" ]; then + gitstring="$gitstring\[$ok_color\]$i" + fi + if [ -n "$s" ]; then + gitstring="$gitstring\[$flags_color\]$s" + fi + if [ -n "$u" ]; then + gitstring="$gitstring\[$bad_color\]$u" + fi + gitstring="$gitstring\[$c_clear\]$r$p" +} # __git_ps1 accepts 0 or 1 arguments (i.e., format string) # when called from PS1 using command substitution @@ -263,15 +344,23 @@ __git_ps1 () else local r="" local b="" - if [ -f "$g/rebase-merge/interactive" ]; then - r="|REBASE-i" - b="$(cat "$g/rebase-merge/head-name")" - elif [ -d "$g/rebase-merge" ]; then - r="|REBASE-m" + local step="" + local total="" + if [ -d "$g/rebase-merge" ]; then b="$(cat "$g/rebase-merge/head-name")" + step=$(cat "$g/rebase-merge/msgnum") + total=$(cat "$g/rebase-merge/end") + if [ -f "$g/rebase-merge/interactive" ]; then + r="|REBASE-i" + else + r="|REBASE-m" + fi else if [ -d "$g/rebase-apply" ]; then + step=$(cat "$g/rebase-apply/next") + total=$(cat "$g/rebase-apply/last") if [ -f "$g/rebase-apply/rebasing" ]; then + b="$(cat "$g/rebase-apply/head-name")" r="|REBASE" elif [ -f "$g/rebase-apply/applying" ]; then r="|AM" @@ -288,6 +377,7 @@ __git_ps1 () r="|BISECTING" fi + test -n "$b" || b="$(git symbolic-ref HEAD 2>/dev/null)" || { detached=yes b="$( @@ -308,6 +398,10 @@ __git_ps1 () } fi + if [ -n "$step" ] && [ -n "$total" ]; then + r="$r $step/$total" + fi + local w="" local i="" local s="" @@ -348,54 +442,20 @@ __git_ps1 () fi fi + local z="${GIT_PS1_STATESEPARATOR-" "}" local f="$w$i$s$u" if [ $pcmode = yes ]; then local gitstring= if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then - local c_red='\e[31m' - local c_green='\e[32m' - local c_lblue='\e[1;34m' - local c_clear='\e[0m' - local bad_color=$c_red - local ok_color=$c_green - local branch_color="$c_clear" - local flags_color="$c_lblue" - local branchstring="$c${b##refs/heads/}" - - if [ $detached = no ]; then - branch_color="$ok_color" - else - branch_color="$bad_color" - fi - - # Setting gitstring directly with \[ and \] around colors - # is necessary to prevent wrapping issues! - gitstring="\[$branch_color\]$branchstring\[$c_clear\]" - - if [ -n "$w$i$s$u$r$p" ]; then - gitstring="$gitstring " - fi - if [ "$w" = "*" ]; then - gitstring="$gitstring\[$bad_color\]$w" - fi - if [ -n "$i" ]; then - gitstring="$gitstring\[$ok_color\]$i" - fi - if [ -n "$s" ]; then - gitstring="$gitstring\[$flags_color\]$s" - fi - if [ -n "$u" ]; then - gitstring="$gitstring\[$bad_color\]$u" - fi - gitstring="$gitstring\[$c_clear\]$r$p" + __git_ps1_colorize_gitstring else - gitstring="$c${b##refs/heads/}${f:+ $f}$r$p" + gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p" fi gitstring=$(printf -- "$printf_format" "$gitstring") PS1="$ps1pc_start$gitstring$ps1pc_end" else # NO color option unless in PROMPT_COMMAND mode - printf -- "$printf_format" "$c${b##refs/heads/}${f:+ $f}$r$p" + printf -- "$printf_format" "$c${b##refs/heads/}${f:+$z$f}$r$p" fi fi } diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index c19ed0e26b..10300c63d1 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -13,6 +13,9 @@ # or # % git clone bzr::lp:myrepo # +# If you want to specify which branches you want track (per repo): +# git config remote-bzr.branches 'trunk, devel, test' +# import sys @@ -27,6 +30,8 @@ import bzrlib.generate_ids import bzrlib.transport import bzrlib.errors import bzrlib.ui +import bzrlib.urlutils +import bzrlib.branch import sys import os @@ -37,6 +42,7 @@ import atexit, shutil, hashlib, urlparse, subprocess NAME_RE = re.compile('^([^<>]+)') AUTHOR_RE = re.compile('^([^<>]+?)? ?<([^<>]*)>$') +EMAIL_RE = re.compile('^([^<>]+[^ \\\t<>])?\\b(?:[ \\t<>]*?)\\b([^ \\t<>]+@[^ \\t<>]+)') RAW_AUTHOR_RE = re.compile('^(\w+) (.+)? <(.*)> (\d+) ([+-]\d+)') def die(msg, *args): @@ -49,6 +55,12 @@ def warn(msg, *args): def gittz(tz): return '%+03d%02d' % (tz / 3600, tz % 3600 / 60) +def get_config(config): + cmd = ['git', 'config', '--get', config] + process = subprocess.Popen(cmd, stdout=subprocess.PIPE) + output, _ = process.communicate() + return output + class Marks: def __init__(self, path): @@ -84,7 +96,7 @@ class Marks: return self.marks[rev] def to_rev(self, mark): - return self.rev_marks[mark] + return str(self.rev_marks[mark]) def next_mark(self): self.last_mark += 1 @@ -174,9 +186,19 @@ def fixup_user(user): name = m.group(1) mail = m.group(2).strip() else: - m = NAME_RE.match(user) + m = EMAIL_RE.match(user) if m: - name = m.group(1).strip() + name = m.group(1) + mail = m.group(2) + else: + m = NAME_RE.match(user) + if m: + name = m.group(1).strip() + + if not name: + name = 'unknown' + if not mail: + mail = 'Unknown' return '%s <%s>' % (name, mail) @@ -250,22 +272,32 @@ def export_files(tree, files): return final -def export_branch(branch, name): +def export_branch(repo, name): global prefix ref = '%s/heads/%s' % (prefix, name) tip = marks.get_tip(name) + branch = bzrlib.branch.Branch.open(branches[name]) repo = branch.repository - repo.lock_read() + + branch.lock_read() revs = branch.iter_merge_sorted_revisions(None, tip, 'exclude', 'forward') - count = 0 + try: + tip_revno = branch.revision_id_to_revno(tip) + last_revno, _ = branch.last_revision_info() + total = last_revno - tip_revno + except bzrlib.errors.NoSuchRevision: + tip_revno = 0 + total = 0 - revs = [revid for revid, _, _, _ in revs if not marks.is_marked(revid)] + for revid, _, seq, _ in revs: - for revid in revs: + if marks.is_marked(revid): + continue rev = repo.get_revision(revid) + revno = seq[0] parents = rev.parent_ids time = rev.timestamp @@ -320,12 +352,18 @@ def export_branch(branch, name): print "M %s :%u %s" % f print - count += 1 - if (count % 100 == 0): - print "progress revision %s (%d/%d)" % (revid, count, len(revs)) - print "#############################################################" + if len(seq) > 1: + # let's skip branch revisions from the progress report + continue + + progress = (revno - tip_revno) + if (progress % 100 == 0): + if total: + print "progress revision %d '%s' (%d/%d)" % (revno, name, progress, total) + else: + print "progress revision %d '%s' (%d)" % (revno, name, progress) - repo.unlock() + branch.unlock() revid = branch.last_revision() @@ -347,23 +385,24 @@ def export_tag(repo, name): def do_import(parser): global dirname - branch = parser.repo + repo = parser.repo path = os.path.join(dirname, 'marks-git') print "feature done" if os.path.exists(path): print "feature import-marks=%s" % path print "feature export-marks=%s" % path + print "feature force" sys.stdout.flush() while parser.check('import'): ref = parser[1] if ref.startswith('refs/heads/'): name = ref[len('refs/heads/'):] - export_branch(branch, name) + export_branch(repo, name) if ref.startswith('refs/tags/'): name = ref[len('refs/tags/'):] - export_tag(branch, name) + export_tag(repo, name) parser.next() print 'done' @@ -382,23 +421,21 @@ def parse_blob(parser): class CustomTree(): - def __init__(self, repo, revid, parents, files): + def __init__(self, branch, revid, parents, files): global files_cache - self.repo = repo - self.revid = revid - self.parents = parents self.updates = {} + self.branch = branch def copy_tree(revid): files = files_cache[revid] = {} - tree = repo.repository.revision_tree(revid) - repo.lock_read() + branch.lock_read() + tree = branch.repository.revision_tree(revid) try: for path, entry in tree.iter_entries_by_dir(): - files[path] = entry.file_id + files[path] = [entry.file_id, None] finally: - repo.unlock() + branch.unlock() return files if len(parents) == 0: @@ -411,12 +448,18 @@ class CustomTree(): self.base_files = copy_tree(self.base_id) self.files = files_cache[revid] = self.base_files.copy() + self.rev_files = {} + + for path, data in self.files.iteritems(): + fid, mark = data + self.rev_files[fid] = [path, mark] for path, f in files.iteritems(): - fid = self.files.get(path, None) + fid, mark = self.files.get(path, [None, None]) if not fid: fid = bzrlib.generate_ids.gen_file_id(path) f['path'] = path + self.rev_files[fid] = [path, mark] self.updates[fid] = f def last_revision(self): @@ -426,16 +469,16 @@ class CustomTree(): changes = [] def get_parent(dirname, basename): - parent_fid = self.base_files.get(dirname, None) + parent_fid, mark = self.base_files.get(dirname, [None, None]) if parent_fid: return parent_fid - parent_fid = self.files.get(dirname, None) + parent_fid, mark = self.files.get(dirname, [None, None]) if parent_fid: return parent_fid if basename == '': return None fid = bzrlib.generate_ids.gen_file_id(path) - d = add_entry(fid, dirname, 'directory') + add_entry(fid, dirname, 'directory') return fid def add_entry(fid, path, kind, mode = None): @@ -456,9 +499,8 @@ class CustomTree(): (None, basename), (None, kind), (None, executable)) - self.files[path] = change[0] + self.files[path] = [change[0], None] changes.append(change) - return change def update_entry(fid, path, kind, mode = None): dirname, basename = os.path.split(path) @@ -478,9 +520,8 @@ class CustomTree(): (None, basename), (None, kind), (None, executable)) - self.files[path] = change[0] + self.files[path] = [change[0], None] changes.append(change) - return change def remove_entry(fid, path, kind): dirname, basename = os.path.split(path) @@ -495,7 +536,6 @@ class CustomTree(): (None, None)) del self.files[path] changes.append(change) - return change for fid, f in self.updates.iteritems(): path = f['path'] @@ -509,13 +549,30 @@ class CustomTree(): else: add_entry(fid, path, 'file', f['mode']) + self.files[path][1] = f['mark'] + self.rev_files[fid][1] = f['mark'] + return changes + def get_content(self, file_id): + path, mark = self.rev_files[file_id] + if mark: + return blob_marks[mark] + + # last resort + tree = self.branch.repository.revision_tree(self.base_id) + return tree.get_file_text(file_id) + def get_file_with_stat(self, file_id, path=None): - return (StringIO.StringIO(self.updates[file_id]['data']), None) + content = self.get_content(file_id) + return (StringIO.StringIO(content), None) def get_symlink_target(self, file_id): - return self.updates[file_id]['data'] + return self.get_content(file_id) + + def id2path(self, file_id): + path, mark = self.rev_files[file_id] + return path def c_style_unescape(string): if string[0] == string[-1] == '"': @@ -531,8 +588,11 @@ def parse_commit(parser): ref = parser[1] parser.next() - if ref != 'refs/heads/master': - die("bzr doesn't support multiple branches; use 'master'") + if ref.startswith('refs/heads/'): + name = ref[len('refs/heads/'):] + branch = bzrlib.branch.Branch.open(branches[name]) + else: + die('unknown ref') commit_mark = parser.get_mark() parser.next() @@ -559,7 +619,7 @@ def parse_commit(parser): if parser.check('M'): t, m, mark_ref, path = line.split(' ', 3) mark = int(mark_ref[1:]) - f = { 'mode' : m, 'data' : blob_marks[mark] } + f = { 'mode' : m, 'mark' : mark } elif parser.check('D'): t, path = line.split(' ') f = { 'deleted' : True } @@ -568,20 +628,18 @@ def parse_commit(parser): path = c_style_unescape(path).decode('utf-8') files[path] = f - repo = parser.repo - committer, date, tz = committer - parents = [str(mark_to_rev(p)) for p in parents] + parents = [mark_to_rev(p) for p in parents] revid = bzrlib.generate_ids.gen_revision_id(committer, date) props = {} - props['branch-nick'] = repo.nick + props['branch-nick'] = branch.nick - mtree = CustomTree(repo, revid, parents, files) + mtree = CustomTree(branch, revid, parents, files) changes = mtree.iter_changes() - repo.lock_write() + branch.lock_write() try: - builder = repo.get_commit_builder(parents, None, date, tz, committer, props, revid) + builder = branch.get_commit_builder(parents, None, date, tz, committer, props, revid) try: list(builder.record_iter_changes(mtree, mtree.last_revision(), changes)) builder.finish_inventory() @@ -590,7 +648,7 @@ def parse_commit(parser): builder.abort() raise finally: - repo.unlock() + branch.unlock() parsed_refs[ref] = revid marks.new_mark(revid, commit_mark) @@ -601,9 +659,6 @@ def parse_reset(parser): ref = parser[1] parser.next() - if ref != 'refs/heads/master': - die("bzr doesn't support multiple branches; use 'master'") - # ugh if parser.check('commit'): parse_commit(parser) @@ -616,7 +671,7 @@ def parse_reset(parser): parsed_refs[ref] = mark_to_rev(from_mark) def do_export(parser): - global parsed_refs, dirname, peer + global parsed_refs, dirname parser.next() @@ -634,20 +689,33 @@ def do_export(parser): else: die('unhandled export command: %s' % line) - repo = parser.repo - for ref, revid in parsed_refs.iteritems(): - if ref == 'refs/heads/master': - repo.generate_revision_history(revid, marks.get_tip('master')) - if peer: + if ref.startswith('refs/heads/'): + name = ref[len('refs/heads/'):] + branch = bzrlib.branch.Branch.open(branches[name]) + branch.generate_revision_history(revid, marks.get_tip(name)) + + if name in peers: + peer = bzrlib.branch.Branch.open(peers[name]) try: - repo.push(peer, stop_revision=revid) + peer.bzrdir.push_branch(branch, revision_id=revid) except bzrlib.errors.DivergedBranches: print "error %s non-fast forward" % ref continue - else: - wt = repo.bzrdir.open_workingtree() + + try: + wt = branch.bzrdir.open_workingtree() wt.update() + except bzrlib.errors.NoWorkingTree: + pass + elif ref.startswith('refs/tags/'): + # TODO: implement tag push + print "error %s pushing tags not supported" % ref + continue + else: + # transport-helper/fast-export bugs + continue + print "ok %s" % ref print @@ -673,9 +741,15 @@ def ref_is_valid(name): def do_list(parser): global tags - print "? refs/heads/%s" % 'master' - branch = parser.repo + master_branch = None + + for name in branches: + if not master_branch: + master_branch = name + print "? refs/heads/%s" % name + + branch = bzrlib.branch.Branch.open(branches[master_branch]) branch.lock_read() for tag, revid in branch.tags.get_tag_dict().items(): try: @@ -687,36 +761,124 @@ def do_list(parser): print "? refs/tags/%s" % tag tags[tag] = revid branch.unlock() - print "@refs/heads/%s HEAD" % 'master' + + print "@refs/heads/%s HEAD" % master_branch print +def get_remote_branch(origin, remote_branch, name): + global dirname, peers + + branch_path = os.path.join(dirname, 'clone', name) + if os.path.exists(branch_path): + # pull + d = bzrlib.bzrdir.BzrDir.open(branch_path) + branch = d.open_branch() + try: + branch.pull(remote_branch, [], None, False) + except bzrlib.errors.DivergedBranches: + # use remote branch for now + return remote_branch + else: + # clone + d = origin.sprout(branch_path, None, + hardlink=True, create_tree_if_local=False, + force_new_repo=False, + source_branch=remote_branch) + branch = d.open_branch() + + return branch + +def find_branches(repo, wanted): + transport = repo.bzrdir.root_transport + + for fn in transport.iter_files_recursive(): + if not fn.endswith('.bzr/branch-format'): + continue + + name = subdir = fn[:-len('/.bzr/branch-format')] + name = name if name != '' else 'master' + name = name.replace('/', '+') + + if wanted and not name in wanted: + continue + + try: + cur = transport.clone(subdir) + branch = bzrlib.branch.Branch.open_from_transport(cur) + except bzrlib.errors.NotBranchError: + continue + else: + yield name, branch + def get_repo(url, alias): - global dirname, peer + global dirname, peer, branches + normal_url = bzrlib.urlutils.normalize_url(url) origin = bzrlib.bzrdir.BzrDir.open(url) - branch = origin.open_branch() + is_local = isinstance(origin.transport, bzrlib.transport.local.LocalTransport) + + shared_path = os.path.join(gitdir, 'bzr') + try: + shared_dir = bzrlib.bzrdir.BzrDir.open(shared_path) + except bzrlib.errors.NotBranchError: + shared_dir = bzrlib.bzrdir.BzrDir.create(shared_path) + try: + shared_repo = shared_dir.open_repository() + except bzrlib.errors.NoRepositoryPresent: + shared_repo = shared_dir.create_repository(shared=True) - if not isinstance(origin.transport, bzrlib.transport.local.LocalTransport): + if not is_local: clone_path = os.path.join(dirname, 'clone') - remote_branch = branch - if os.path.exists(clone_path): - # pull - d = bzrlib.bzrdir.BzrDir.open(clone_path) - branch = d.open_branch() - result = branch.pull(remote_branch, [], None, False) + if not os.path.exists(clone_path): + os.mkdir(clone_path) + else: + # check and remove old organization + try: + bdir = bzrlib.bzrdir.BzrDir.open(clone_path) + bdir.destroy_repository() + except bzrlib.errors.NotBranchError: + pass + except bzrlib.errors.NoRepositoryPresent: + pass + + try: + repo = origin.open_repository() + if not repo.user_transport.listable(): + # this repository is not usable for us + raise bzrlib.errors.NoRepositoryPresent(repo.bzrdir) + except bzrlib.errors.NoRepositoryPresent: + # branch + + name = 'master' + remote_branch = origin.open_branch() + + if not is_local: + peers[name] = remote_branch.base + branch = get_remote_branch(origin, remote_branch, name) else: - # clone - d = origin.sprout(clone_path, None, - hardlink=True, create_tree_if_local=False, - source_branch=remote_branch) - branch = d.open_branch() - branch.bind(remote_branch) - - peer = remote_branch + branch = remote_branch + + branches[name] = branch.base + + return branch.repository else: - peer = None + # repository - return branch + wanted = get_config('remote-bzr.branches').rstrip().split(', ') + # stupid python + wanted = [e for e in wanted if e] + + for name, remote_branch in find_branches(repo, wanted): + + if not is_local: + peers[name] = remote_branch.base + branch = get_remote_branch(origin, remote_branch, name) + else: + branch = remote_branch + + branches[name] = branch.base + + return repo def fix_path(alias, orig_url): url = urlparse.urlparse(orig_url, 'file') @@ -727,12 +889,13 @@ def fix_path(alias, orig_url): subprocess.call(cmd) def main(args): - global marks, prefix, dirname + global marks, prefix, gitdir, dirname global tags, filenodes global blob_marks global parsed_refs global files_cache global is_tmp + global branches, peers alias = args[1] url = args[2] @@ -743,6 +906,8 @@ def main(args): parsed_refs = {} files_cache = {} marks = None + branches = {} + peers = {} if alias[5:] == url: is_tmp = True @@ -760,7 +925,8 @@ def main(args): if not os.path.exists(dirname): os.makedirs(dirname) - bzrlib.ui.ui_factory.be_quiet(True) + if hasattr(bzrlib.ui.ui_factory, 'be_quiet'): + bzrlib.ui.ui_factory.be_quiet(True) repo = get_repo(url, alias) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 06920f28f2..1dd3d7030e 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -25,9 +25,6 @@ import atexit import urlparse, hashlib # -# If you want to switch to hg-git compatibility mode: -# git config --global remote-hg.hg-git-compat true -# # If you are not in hg-git-compat mode and want to disable the tracking of # named branches: # git config --global remote-hg.track-branches false @@ -36,7 +33,10 @@ import urlparse, hashlib # git config --global remote-hg.force-push false # # If you want the equivalent of hg's clone/pull--insecure option: -# git config remote-hg.insecure true +# git config --global remote-hg.insecure true +# +# If you want to switch to hg-git compatibility mode: +# git config --global remote-hg.hg-git-compat true # # git: # Sensible defaults for git. @@ -87,6 +87,15 @@ def get_config(config): output, _ = process.communicate() return output +def get_config_bool(config, default=False): + value = get_config(config).rstrip('\n') + if value == "true": + return True + elif value == "false": + return False + else: + return default + class Marks: def __init__(self, path): @@ -327,11 +336,8 @@ def get_repo(url, alias): myui.setconfig('ui', 'interactive', 'off') myui.fout = sys.stderr - try: - if get_config('remote-hg.insecure') == 'true\n': - myui.setconfig('web', 'cacerts', '') - except subprocess.CalledProcessError: - pass + if get_config_bool('remote-hg.insecure'): + myui.setconfig('web', 'cacerts', '') try: mod = extensions.load(myui, 'hgext.schemes', None) @@ -453,7 +459,6 @@ def export_ref(repo, name, kind, head): count += 1 if (count % 100 == 0): print "progress revision %d '%s' (%d/%d)" % (rev, name, count, len(revs)) - print "#############################################################" # make sure the ref is updated print "reset %s/%s" % (prefix, ename) @@ -539,7 +544,7 @@ def list_head(repo, cur): g_head = (head, node) def do_list(parser): - global branches, bmarks, mode, track_branches + global branches, bmarks, track_branches repo = parser.repo for bmark, node in bookmarks.listbookmarks(repo).iteritems(): @@ -851,7 +856,7 @@ def do_export(parser): continue if peer: - parser.repo.push(peer, force=force_push) + parser.repo.push(peer, force=force_push, newbranch=True) # handle bookmarks for bmark, node in p_bmarks: @@ -868,7 +873,8 @@ def do_export(parser): if bmark == 'master' and 'master' not in parser.repo._bookmarks: # fake bookmark - pass + print "ok %s" % ref + continue elif bookmarks.pushbookmark(parser.repo, bmark, old, new): # updated locally pass @@ -907,20 +913,9 @@ def main(args): url = args[2] peer = None - hg_git_compat = False - track_branches = True - force_push = True - - try: - if get_config('remote-hg.hg-git-compat') == 'true\n': - hg_git_compat = True - track_branches = False - if get_config('remote-hg.track-branches') == 'false\n': - track_branches = False - if get_config('remote-hg.force-push') == 'false\n': - force_push = False - except subprocess.CalledProcessError: - pass + hg_git_compat = get_config_bool('remote-hg.hg-git-compat') + track_branches = get_config_bool('remote-hg.track-branches', True) + force_push = get_config_bool('remote-hg.force-push') if hg_git_compat: mode = 'hg' @@ -959,6 +954,10 @@ def main(args): marks_path = os.path.join(dirname, 'marks-hg') marks = Marks(marks_path) + if sys.platform == 'win32': + import msvcrt + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + parser = Parser(repo) for line in parser: if parser.check('capabilities'): diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh index 34666e1d0f..5dfa070b64 100755 --- a/contrib/remote-helpers/test-bzr.sh +++ b/contrib/remote-helpers/test-bzr.sh @@ -228,4 +228,114 @@ test_expect_success 'push utf-8 filenames' ' test_cmp expected actual ' +test_expect_success 'pushing a merge' ' + mkdir -p tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + ( + bzr init bzrrepo && + cd bzrrepo && + echo one > content && + bzr add content && + bzr commit -m one + ) && + + git clone "bzr::$PWD/bzrrepo" gitrepo && + + ( + cd bzrrepo && + echo two > content && + bzr commit -m two + ) && + + ( + cd gitrepo && + echo three > content && + git commit -a -m three && + git fetch && + git merge origin/master || true && + echo three > content && + git commit -a --no-edit && + git push + ) && + + echo three > expected && + cat bzrrepo/content > actual && + test_cmp expected actual +' + +cat > expected <<EOF +origin/HEAD +origin/branch +origin/trunk +EOF + +test_expect_success 'proper bzr repo' ' + mkdir -p tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + bzr init-repo bzrrepo && + + bzr init bzrrepo/trunk && + ( + cd bzrrepo/trunk && + echo one >> content && + bzr add content && + bzr commit -m one + ) && + + bzr branch bzrrepo/trunk bzrrepo/branch && + ( + cd bzrrepo/branch && + echo two >> content && + bzr commit -m one + ) && + + git clone "bzr::$PWD/bzrrepo" gitrepo && + ( + cd gitrepo && + git for-each-ref --format "%(refname:short)" refs/remotes/origin > ../actual + ) && + + test_cmp ../expected actual +' + +test_expect_success 'strip' ' + # Do not imitate this style; always chdir inside a subshell instead + mkdir -p tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + ( + bzr init bzrrepo && + cd bzrrepo && + + echo one >> content && + bzr add content && + bzr commit -m one && + + echo two >> content && + bzr commit -m two + ) && + + git clone "bzr::$PWD/bzrrepo" gitrepo && + + ( + cd bzrrepo && + bzr uncommit --force && + + echo three >> content && + bzr commit -m three && + + echo four >> content && + bzr commit -m four && + bzr log --line | sed -e "s/^[0-9][0-9]*: //" > ../expected + ) && + + (cd gitrepo && + git fetch && + git log --format="%an %ad %s" --date=short origin/master > ../actual) && + + test_cmp expected actual +' + test_done diff --git a/contrib/remote-helpers/test-hg-hg-git.sh b/contrib/remote-helpers/test-hg-hg-git.sh index 84403415f8..7f579c8436 100755 --- a/contrib/remote-helpers/test-hg-hg-git.sh +++ b/contrib/remote-helpers/test-hg-hg-git.sh @@ -102,6 +102,7 @@ setup () { ) >> "$HOME"/.hgrc && git config --global receive.denycurrentbranch warn git config --global remote-hg.hg-git-compat true + git config --global remote-hg.track-branches false HGEDITOR=/usr/bin/true @@ -455,8 +456,6 @@ test_expect_success 'hg author' ' git_log gitrepo-$x > git-log-$x done && - test_cmp git-log-hg git-log-git && - test_cmp hg-log-hg hg-log-git && test_cmp git-log-hg git-log-git ' diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 8a23f58ba0..51ae932e5e 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # git-subtree.sh: split/join git repositories in subdirectories of this one # @@ -715,7 +715,8 @@ cmd_push() repository=$1 refspec=$2 echo "git push using: " $repository $refspec - git push $repository $(git subtree split --prefix=$prefix):refs/heads/$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'." fi diff --git a/credential-store.c b/credential-store.c index 26f7589a60..f9146e576f 100644 --- a/credential-store.c +++ b/credential-store.c @@ -114,7 +114,7 @@ static int lookup_credential(const char *fn, struct credential *c) return c->username && c->password; } -int main(int argc, const char **argv) +int main(int argc, char **argv) { const char * const usage[] = { "git credential-store [options] <action>", @@ -131,7 +131,7 @@ int main(int argc, const char **argv) umask(077); - argc = parse_options(argc, argv, NULL, options, usage, 0); + argc = parse_options(argc, (const char **)argv, NULL, options, usage, 0); if (argc != 1) usage_with_options(usage, options); op = argv[0]; @@ -711,6 +711,28 @@ int parse_date_basic(const char *date, unsigned long *timestamp, int *offset) return 0; /* success */ } +int parse_expiry_date(const char *date, unsigned long *timestamp) +{ + int errors = 0; + + if (!strcmp(date, "never") || !strcmp(date, "false")) + *timestamp = 0; + else if (!strcmp(date, "all") || !strcmp(date, "now")) + /* + * We take over "now" here, which usually translates + * to the current timestamp. This is because the user + * really means to expire everything she has done in + * the past, and by definition reflogs are the record + * of the past, and there is nothing from the future + * to be kept. + */ + *timestamp = ULONG_MAX; + else + *timestamp = approxidate_careful(date, &errors); + + return errors; +} + int parse_date(const char *date, char *result, int maxlen) { unsigned long timestamp; diff --git a/diff-lib.c b/diff-lib.c index f35de0ffa0..b6f4b21637 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -64,8 +64,9 @@ static int check_removed(const struct cache_entry *ce, struct stat *st) * commits, untracked content and/or modified content). */ static int match_stat_with_submodule(struct diff_options *diffopt, - struct cache_entry *ce, struct stat *st, - unsigned ce_option, unsigned *dirty_submodule) + const struct cache_entry *ce, + struct stat *st, unsigned ce_option, + unsigned *dirty_submodule) { int changed = ce_match_stat(ce, st, ce_option); if (S_ISGITLINK(ce->ce_mode)) { @@ -237,7 +238,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option) /* A file entry went away or appeared */ static void diff_index_show_file(struct rev_info *revs, const char *prefix, - struct cache_entry *ce, + const struct cache_entry *ce, const unsigned char *sha1, int sha1_valid, unsigned int mode, unsigned dirty_submodule) @@ -246,7 +247,7 @@ static void diff_index_show_file(struct rev_info *revs, sha1, sha1_valid, ce->name, dirty_submodule); } -static int get_stat_data(struct cache_entry *ce, +static int get_stat_data(const struct cache_entry *ce, const unsigned char **sha1p, unsigned int *modep, int cached, int match_missing, @@ -283,7 +284,7 @@ static int get_stat_data(struct cache_entry *ce, } static void show_new_file(struct rev_info *revs, - struct cache_entry *new, + const struct cache_entry *new, int cached, int match_missing) { const unsigned char *sha1; @@ -302,8 +303,8 @@ static void show_new_file(struct rev_info *revs, } static int show_modified(struct rev_info *revs, - struct cache_entry *old, - struct cache_entry *new, + const struct cache_entry *old, + const struct cache_entry *new, int report_missing, int cached, int match_missing) { @@ -362,8 +363,8 @@ static int show_modified(struct rev_info *revs, * give you the position and number of entries in the index). */ static void do_oneway_diff(struct unpack_trees_options *o, - struct cache_entry *idx, - struct cache_entry *tree) + const struct cache_entry *idx, + const struct cache_entry *tree) { struct rev_info *revs = o->unpack_data; int match_missing, cached; @@ -423,10 +424,11 @@ static void do_oneway_diff(struct unpack_trees_options *o, * the fairly complex unpack_trees() semantic requirements, including * the skipping, the path matching, the type conflict cases etc. */ -static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o) +static int oneway_diff(const struct cache_entry * const *src, + struct unpack_trees_options *o) { - struct cache_entry *idx = src[0]; - struct cache_entry *tree = src[1]; + const struct cache_entry *idx = src[0]; + const struct cache_entry *tree = src[1]; struct rev_info *revs = o->unpack_data; /* @@ -821,6 +821,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen) dir->basebuf, stk->baselen - 1, dir->basebuf + current, &dt); dir->basebuf[stk->baselen - 1] = '/'; + if (dir->exclude && + dir->exclude->flags & EXC_FLAG_NEGATIVE) + dir->exclude = NULL; if (dir->exclude) { dir->basebuf[stk->baselen] = 0; dir->exclude_stack = stk; @@ -1542,9 +1545,9 @@ void setup_standard_excludes(struct dir_struct *dir) home_config_paths(NULL, &xdg_path, "ignore"); excludes_file = xdg_path; } - if (!access_or_warn(path, R_OK)) + if (!access_or_warn(path, R_OK, 0)) add_excludes_from_file(dir, path); - if (excludes_file && !access_or_warn(excludes_file, R_OK)) + if (excludes_file && !access_or_warn(excludes_file, R_OK, 0)) add_excludes_from_file(dir, excludes_file); } diff --git a/fast-import.c b/fast-import.c index 5f539d7d8f..23f625f561 100644 --- a/fast-import.c +++ b/fast-import.c @@ -297,7 +297,7 @@ static int failure; static FILE *pack_edges; static unsigned int show_stats = 1; static int global_argc; -static const char **global_argv; +static char **global_argv; /* Memory pools */ static size_t mem_pool_alloc = 2*1024*1024 - sizeof(struct mem_pool); @@ -1822,7 +1822,7 @@ static void read_marks(void) *end = 0; mark = strtoumax(line + 1, &end, 10); if (!mark || end == line + 1 - || *end != ' ' || get_sha1(end + 1, sha1)) + || *end != ' ' || get_sha1_hex(end + 1, sha1)) die("corrupt mark line: %s", line); e = find_object(sha1); if (!e) { @@ -3347,7 +3347,7 @@ static void parse_argv(void) read_marks(); } -int main(int argc, const char **argv) +int main(int argc, char **argv) { unsigned int i; diff --git a/fetch-pack.c b/fetch-pack.c index f156dd4fac..abe5ffbba5 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -20,6 +20,8 @@ static int no_done; static int fetch_fsck_objects = -1; static int transfer_fsck_objects = -1; static int agent_supported; +static struct lock_file shallow_lock; +static const char *alternate_shallow_file; #define COMPLETE (1U << 0) #define COMMON (1U << 1) @@ -683,12 +685,13 @@ static int get_pack(struct fetch_pack_args *args, int xd[2], char **pack_lockfile) { struct async demux; - const char *argv[20]; + const char *argv[22]; char keep_arg[256]; char hdr_arg[256]; const char **av; int do_keep = args->keep_pack; struct child_process cmd; + int ret; memset(&demux, 0, sizeof(demux)); if (use_sideband) { @@ -724,6 +727,11 @@ static int get_pack(struct fetch_pack_args *args, do_keep = 1; } + if (alternate_shallow_file) { + *av++ = "--shallow-file"; + *av++ = alternate_shallow_file; + } + if (do_keep) { if (pack_lockfile) cmd.out = -1; @@ -740,11 +748,14 @@ static int get_pack(struct fetch_pack_args *args, strcpy(keep_arg + s, "localhost"); *av++ = keep_arg; } + if (args->check_self_contained_and_connected) + *av++ = "--check-self-contained-and-connected"; } else { *av++ = "unpack-objects"; if (args->quiet || args->no_progress) *av++ = "-q"; + args->check_self_contained_and_connected = 0; } if (*hdr_arg) *av++ = hdr_arg; @@ -765,7 +776,12 @@ static int get_pack(struct fetch_pack_args *args, close(cmd.out); } - if (finish_command(&cmd)) + ret = finish_command(&cmd); + if (!ret || (args->check_self_contained_and_connected && ret == 1)) + args->self_contained_and_connected = + args->check_self_contained_and_connected && + ret == 0; + else die("%s failed", argv[0]); if (use_sideband && finish_async(&demux)) die("error in sideband demultiplexer"); @@ -779,6 +795,27 @@ static int cmp_ref_by_name(const void *a_, const void *b_) return strcmp(a->name, b->name); } +static void setup_alternate_shallow(void) +{ + struct strbuf sb = STRBUF_INIT; + int fd; + + check_shallow_file_for_update(); + fd = hold_lock_file_for_update(&shallow_lock, git_path("shallow"), + LOCK_DIE_ON_ERROR); + if (write_shallow_commits(&sb, 0)) { + if (write_in_full(fd, sb.buf, sb.len) != sb.len) + die_errno("failed to write to %s", shallow_lock.filename); + alternate_shallow_file = shallow_lock.filename; + } else + /* + * is_repository_shallow() sees empty string as "no + * shallow file". + */ + alternate_shallow_file = ""; + strbuf_release(&sb); +} + static struct ref *do_fetch_pack(struct fetch_pack_args *args, int fd[2], const struct ref *orig_ref, @@ -858,6 +895,8 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args, if (args->stateless_rpc) packet_flush(fd[1]); + if (args->depth > 0) + setup_alternate_shallow(); if (get_pack(args, fd, pack_lockfile)) die("git fetch-pack: fetch failed."); @@ -936,15 +975,9 @@ struct ref *fetch_pack(struct fetch_pack_args *args, struct ref **sought, int nr_sought, char **pack_lockfile) { - struct stat st; struct ref *ref_cpy; fetch_pack_setup(); - if (args->depth > 0) { - if (stat(git_path("shallow"), &st)) - st.st_mtime = 0; - } - if (nr_sought) nr_sought = remove_duplicates_in_refs(sought, nr_sought); @@ -954,35 +987,12 @@ struct ref *fetch_pack(struct fetch_pack_args *args, } ref_cpy = do_fetch_pack(args, fd, ref, sought, nr_sought, pack_lockfile); - if (args->depth > 0) { - static struct lock_file lock; - struct cache_time mtime; - struct strbuf sb = STRBUF_INIT; - char *shallow = git_path("shallow"); - int fd; - - mtime.sec = st.st_mtime; - mtime.nsec = ST_MTIME_NSEC(st); - if (stat(shallow, &st)) { - if (mtime.sec) - die("shallow file was removed during fetch"); - } else if (st.st_mtime != mtime.sec -#ifdef USE_NSEC - || ST_MTIME_NSEC(st) != mtime.nsec -#endif - ) - die("shallow file was changed during fetch"); - - fd = hold_lock_file_for_update(&lock, shallow, - LOCK_DIE_ON_ERROR); - if (!write_shallow_commits(&sb, 0) - || write_in_full(fd, sb.buf, sb.len) != sb.len) { - unlink_or_warn(shallow); - rollback_lock_file(&lock); - } else { - commit_lock_file(&lock); - } - strbuf_release(&sb); + if (alternate_shallow_file) { + if (*alternate_shallow_file == '\0') { /* --unshallow */ + unlink_or_warn(git_path("shallow")); + rollback_lock_file(&shallow_lock); + } else + commit_lock_file(&shallow_lock); } reprepare_packed_git(); diff --git a/fetch-pack.h b/fetch-pack.h index dc5266c970..40f08bab24 100644 --- a/fetch-pack.h +++ b/fetch-pack.h @@ -16,7 +16,9 @@ struct fetch_pack_args { verbose:1, no_progress:1, include_tag:1, - stateless_rpc:1; + stateless_rpc:1, + check_self_contained_and_connected:1, + self_contained_and_connected:1; }; /* diff --git a/git-bisect.sh b/git-bisect.sh index d7518e9c3b..9f064b6f4f 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -320,8 +320,8 @@ bisect_next() { elif test $res -eq 2 then echo "# only skipped commits left to test" >>"$GIT_DIR/BISECT_LOG" - good_revs=$(git for-each-ref --format="--not %(objectname)" "refs/bisect/good-*") - for skipped in $(git rev-list refs/bisect/bad $good_revs) + good_revs=$(git for-each-ref --format="%(objectname)" "refs/bisect/good-*") + for skipped in $(git rev-list refs/bisect/bad --not $good_revs) do skipped_commit=$(git show-branch $skipped) echo "# possible first bad commit: $skipped_commit" >>"$GIT_DIR/BISECT_LOG" diff --git a/git-compat-util.h b/git-compat-util.h index eeed506972..ff193f4aa2 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -128,6 +128,9 @@ #else #include <poll.h> #endif + +extern int get_st_mode_bits(const char *path, int *mode); + #if defined(__MINGW32__) /* pull in Windows compatibility stuff */ #include "compat/mingw.h" @@ -164,7 +167,6 @@ typedef long intptr_t; typedef unsigned long uintptr_t; #endif -int get_st_mode_bits(const char *path, int *mode); #if defined(__CYGWIN__) #undef _XOPEN_SOURCE #include <grp.h> @@ -186,6 +188,11 @@ int get_st_mode_bits(const char *path, int *mode); #define probe_utf8_pathname_composition(a,b) #endif +#ifdef NEEDS_CLIPPED_WRITE +ssize_t clipped_write(int fildes, const void *buf, size_t nbyte); +#define write(x,y,z) clipped_write((x),(y),(z)) +#endif + #ifdef MKDIR_WO_TRAILING_SLASH #define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b)) extern int compat_mkdir_wo_trailing_slash(const char*, mode_t); @@ -693,8 +700,9 @@ int remove_or_warn(unsigned int mode, const char *path); * Call access(2), but warn for any error except "missing file" * (ENOENT or ENOTDIR). */ -int access_or_warn(const char *path, int mode); -int access_or_die(const char *path, int mode); +#define ACCESS_EACCES_OK (1U << 0) +int access_or_warn(const char *path, int mode, unsigned flag); +int access_or_die(const char *path, int mode, unsigned flag); /* Warn on an inaccessible file that ought to be accessible */ void warn_on_inaccessible(const char *path); diff --git a/git-difftool.perl b/git-difftool.perl index 67802922cc..e57d3d1295 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -85,11 +85,13 @@ sub exit_cleanup sub use_wt_file { - my ($repo, $workdir, $file, $sha1, $symlinks) = @_; + my ($repo, $workdir, $file, $sha1) = @_; my $null_sha1 = '0' x 40; - if ($sha1 ne $null_sha1 and not $symlinks) { - return 0; + if (! -e "$workdir/$file") { + # If the file doesn't exist in the working tree, we cannot + # use it. + return (0, $null_sha1); } my $wt_sha1 = $repo->command_oneline('hash-object', "$workdir/$file"); @@ -207,8 +209,7 @@ EOF if ($rmode ne $null_mode) { my ($use, $wt_sha1) = use_wt_file($repo, $workdir, - $dst_path, $rsha1, - $symlinks); + $dst_path, $rsha1); if ($use) { push @working_tree, $dst_path; $wtindex .= "$rmode $wt_sha1\t$dst_path\0"; diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 048a140a6f..5822b2c592 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -57,6 +57,9 @@ rewritten="$state_dir"/rewritten dropped="$state_dir"/dropped +end="$state_dir"/end +msgnum="$state_dir"/msgnum + # A script to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, and # GIT_AUTHOR_DATE that will be used for the commit that is currently # being rebased. @@ -109,7 +112,9 @@ mark_action_done () { sed -e 1d < "$todo" >> "$todo".new mv -f "$todo".new "$todo" 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" if test "$last_count" != "$new_count" then last_count=$new_count diff --git a/git-remote-testgit b/git-remote-testgit.sh index e7ed3a33e6..2109070d00 100755 --- a/git-remote-testgit +++ b/git-remote-testgit.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # Copyright (c) 2012 Felipe Contreras alias=$1 @@ -23,7 +23,6 @@ then testgitmarks="$dir/testgit.marks" test -e "$gitmarks" || >"$gitmarks" test -e "$testgitmarks" || >"$testgitmarks" - testgitmarks_args=( "--"{import,export}"-marks=$testgitmarks" ) fi while read line @@ -62,24 +61,55 @@ do echo "feature import-marks=$gitmarks" echo "feature export-marks=$gitmarks" fi + + if test -n "$GIT_REMOTE_TESTGIT_FAILURE" + then + echo "feature done" + exit 1 + fi + echo "feature done" - git fast-export "${testgitmarks_args[@]}" $refs | + git fast-export \ + ${testgitmarks:+"--import-marks=$testgitmarks"} \ + ${testgitmarks:+"--export-marks=$testgitmarks"} \ + $refs | sed -e "s#refs/heads/#${prefix}/heads/#g" echo "done" ;; export) - before=$(git for-each-ref --format='%(refname) %(objectname)') + if test -n "$GIT_REMOTE_TESTGIT_FAILURE" + then + # consume input so fast-export doesn't get SIGPIPE; + # git would also notice that case, but we want + # to make sure we are exercising the later + # error checks + while read line; do + test "done" = "$line" && break + done + exit 1 + fi - git fast-import "${testgitmarks_args[@]}" --quiet + before=$(git for-each-ref --format=' %(refname) %(objectname) ') - after=$(git for-each-ref --format='%(refname) %(objectname)') + git fast-import \ + ${testgitmarks:+"--import-marks=$testgitmarks"} \ + ${testgitmarks:+"--export-marks=$testgitmarks"} \ + --quiet # figure out which refs were updated - join -e 0 -o '0 1.2 2.2' -a 2 <(echo "$before") <(echo "$after") | - while read ref a b + git for-each-ref --format='%(refname) %(objectname)' | + while read ref a do - test $a == $b && continue - echo "ok $ref" + case "$before" in + *" $ref $a "*) + continue ;; # unchanged + esac + if test -z "$GIT_REMOTE_TESTGIT_PUSH_ERROR" + then + echo "ok $ref" + else + echo "error $ref $GIT_REMOTE_TESTGIT_PUSH_ERROR" + fi done echo diff --git a/git-send-email.perl b/git-send-email.perl index bd13cc812d..ec1d6ce4eb 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -203,11 +203,9 @@ my ($compose_encoding); my ($debug_net_smtp) = 0; # Net::SMTP, see send_message() -my $not_set_by_user = "true but not set by the user"; - my %config_bool_settings = ( "thread" => [\$thread, 1], - "chainreplyto" => [\$chain_reply_to, $not_set_by_user], + "chainreplyto" => [\$chain_reply_to, 0], "suppressfrom" => [\$suppress_from, undef], "signedoffbycc" => [\$signed_off_by_cc, undef], "signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated @@ -241,19 +239,6 @@ my %config_path_settings = ( "aliasesfile" => \@alias_files, ); -# Help users prepare for 1.7.0 -sub chain_reply_to { - if (defined $chain_reply_to && - $chain_reply_to eq $not_set_by_user) { - print STDERR - "In git 1.7.0, the default has changed to --no-chain-reply-to\n" . - "Set sendemail.chainreplyto configuration variable to true if\n" . - "you want to keep --chain-reply-to as your default.\n"; - $chain_reply_to = 0; - } - return $chain_reply_to; -} - # Handle Uncouth Termination sub signal_handler { @@ -1437,7 +1422,7 @@ foreach my $t (@files) { # set up for the next message if ($thread && $message_was_sent && - (chain_reply_to() || !defined $reply_to || length($reply_to) == 0 || + ($chain_reply_to || !defined $reply_to || length($reply_to) == 0 || $message_num == 1)) { $reply_to = $message_id; if (length $references > 0) { diff --git a/git-svn.perl b/git-svn.perl index 6c7bd95032..d070de012c 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -113,7 +113,7 @@ my ($_stdin, $_help, $_edit, $_template, $_shared, $_version, $_fetch_all, $_no_rebase, $_fetch_parent, $_before, $_after, - $_merge, $_strategy, $_preserve_merges, $_dry_run, $_local, + $_merge, $_strategy, $_preserve_merges, $_dry_run, $_parents, $_local, $_prefix, $_no_checkout, $_url, $_verbose, $_commit_url, $_tag, $_merge_info, $_interactive); @@ -126,6 +126,7 @@ my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username, 'config-dir=s' => \$Git::SVN::Ra::config_dir, 'no-auth-cache' => \$Git::SVN::Prompt::_no_auth_cache, 'ignore-paths=s' => \$Git::SVN::Fetcher::_ignore_regex, + 'include-paths=s' => \$Git::SVN::Fetcher::_include_regex, 'ignore-refs=s' => \$Git::SVN::Ra::_ignore_refs_regex ); my %fc_opts = ( 'follow-parent|follow!' => \$Git::SVN::_follow_parent, 'authors-file|A=s' => \$_authors, @@ -202,6 +203,7 @@ my %cmd = ( { 'message|m=s' => \$_message, 'destination|d=s' => \$_branch_dest, 'dry-run|n' => \$_dry_run, + 'parents' => \$_parents, 'tag|t' => \$_tag, 'username=s' => \$Git::SVN::Prompt::_username, 'commit-url=s' => \$_commit_url } ], @@ -210,6 +212,7 @@ my %cmd = ( { 'message|m=s' => \$_message, 'destination|d=s' => \$_branch_dest, 'dry-run|n' => \$_dry_run, + 'parents' => \$_parents, 'username=s' => \$Git::SVN::Prompt::_username, 'commit-url=s' => \$_commit_url } ], 'set-tree' => [ \&cmd_set_tree, @@ -470,6 +473,9 @@ sub do_git_init_db { my $ignore_paths_regex = \$Git::SVN::Fetcher::_ignore_regex; command_noisy('config', "$pfx.ignore-paths", $$ignore_paths_regex) if defined $$ignore_paths_regex; + my $include_paths_regex = \$Git::SVN::Fetcher::_include_regex; + command_noisy('config', "$pfx.include-paths", $$include_paths_regex) + if defined $$include_paths_regex; my $ignore_refs_regex = \$Git::SVN::Ra::_ignore_refs_regex; command_noisy('config', "$pfx.ignore-refs", $$ignore_refs_regex) if defined $$ignore_refs_regex; @@ -669,12 +675,14 @@ sub merge_revs_into_hash { } sub merge_merge_info { - my ($mergeinfo_one, $mergeinfo_two) = @_; + my ($mergeinfo_one, $mergeinfo_two, $ignore_branch) = @_; my %result_hash = (); merge_revs_into_hash(\%result_hash, $mergeinfo_one); merge_revs_into_hash(\%result_hash, $mergeinfo_two); + delete $result_hash{$ignore_branch} if $ignore_branch; + my $result = ''; # Sort below is for consistency's sake for my $branchname (sort keys(%result_hash)) { @@ -695,6 +703,7 @@ sub populate_merge_info { my $all_parents_ok = 1; my $aggregate_mergeinfo = ''; my $rooturl = $gs->repos_root; + my ($target_branch) = $gs->full_pushurl =~ /^\Q$rooturl\E(.*)/; if (defined($rewritten_parent)) { # Replace first parent with newly-rewritten version @@ -726,7 +735,8 @@ sub populate_merge_info { # Merge previous mergeinfo values $aggregate_mergeinfo = merge_merge_info($aggregate_mergeinfo, - $par_mergeinfo, 0); + $par_mergeinfo, + $target_branch); next if $parent eq $parents[0]; # Skip first parent # Add new changes being placed in tree by merge @@ -769,7 +779,8 @@ sub populate_merge_info { my $newmergeinfo = "$branchpath:" . join(',', @revsin); $aggregate_mergeinfo = merge_merge_info($aggregate_mergeinfo, - $newmergeinfo, 1); + $newmergeinfo, + $target_branch); } if ($all_parents_ok and $aggregate_mergeinfo) { return $aggregate_mergeinfo; @@ -1163,6 +1174,10 @@ sub cmd_branch { $ctx->ls($dst, 'HEAD', 0); } and die "branch ${branch_name} already exists\n"; + if ($_parents) { + mk_parent_dirs($ctx, $dst); + } + print "Copying ${src} at r${rev} to ${dst}...\n"; $ctx->copy($src, $rev, $dst) unless $_dry_run; @@ -1170,6 +1185,17 @@ sub cmd_branch { $gs->fetch_all; } +sub mk_parent_dirs { + my ($ctx, $parent) = @_; + $parent =~ s{/[^/]*$}{}; + + if (!eval{$ctx->ls($parent, 'HEAD', 0)}) { + mk_parent_dirs($ctx, $parent); + print "Creating parent folder ${parent} ...\n"; + $ctx->mkdir($parent) unless $_dry_run; + } +} + sub cmd_find_rev { my $revision_or_hash = shift or die "SVN or git revision required ", "as a command-line argument\n"; @@ -4,6 +4,7 @@ #include "help.h" #include "quote.h" #include "run-command.h" +#include "commit.h" const char git_usage_string[] = "git [--version] [--help] [-c name=value]\n" @@ -146,6 +147,12 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "0", 1); if (envchanged) *envchanged = 1; + } else if (!strcmp(cmd, "--shallow-file")) { + (*argv)++; + (*argc)--; + set_alternate_shallow_file((*argv)[0]); + if (envchanged) + *envchanged = 1; } else { fprintf(stderr, "Unknown option: %s\n", cmd); usage(git_usage_string); @@ -507,8 +514,9 @@ static int run_argv(int *argcp, const char ***argv) } -int main(int argc, const char **argv) +int main(int argc, char **av) { + const char **argv = (const char **) av; const char *cmd; startup_info = &git_startup_info; diff --git a/git.rc b/git.rc new file mode 100644 index 0000000000..bce6db96a3 --- /dev/null +++ b/git.rc @@ -0,0 +1,22 @@ +1 VERSIONINFO +FILEVERSION MAJOR,MINOR,PATCH,0 +PRODUCTVERSION MAJOR,MINOR,PATCH,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */ + BEGIN + VALUE "CompanyName", "The Git Development Community\0" + VALUE "FileDescription", "Git for Windows\0" + VALUE "InternalName", "git\0" + VALUE "OriginalFilename", "git.exe\0" + VALUE "ProductName", "Git\0" + VALUE "ProductVersion", GIT_VERSION "\0" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/gitk-git/gitk b/gitk-git/gitk index b3706fc9b9..5cd00d80fe 100755 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -1998,6 +1998,9 @@ proc mca {str} { return [string map {&& & & {}} [mc $str]] } +proc cleardropsel {w} { + $w selection clear +} proc makedroplist {w varname args} { global use_ttk if {$use_ttk} { @@ -2007,7 +2010,9 @@ proc makedroplist {w varname args} { if {$cx > $width} {set width $cx} } set gm [ttk::combobox $w -width $width -state readonly\ - -textvariable $varname -values $args] + -textvariable $varname -values $args \ + -exportselection false] + bind $gm <<ComboboxSelected>> [list $gm selection clear] } else { set gm [eval [linsert $args 0 tk_optionMenu $w $varname]] } @@ -2026,6 +2031,9 @@ proc makewindow {} { global highlight_files gdttype global searchstring sstring global bgcolor fgcolor bglist fglist diffcolors selectbgcolor + global uifgcolor uifgdisabledcolor + global filesepbgcolor filesepfgcolor + global mergecolors foundbgcolor currentsearchhitbgcolor global headctxmenu progresscanv progressitem progresscoords statusw global fprogitem fprogcoord lastprogupdate progupdatepending global rprogitem rprogcoord rownumsel numcommits @@ -2177,10 +2185,10 @@ proc makewindow {} { 0x00, 0x38, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0x00, 0x38, 0x00, 0x1c, 0x00, 0x0e, 0x00, 0x07, 0x80, 0x03, 0xc0, 0x01}; } - image create bitmap bm-left -data $bm_left_data - image create bitmap bm-left-gray -data $bm_left_data -foreground "#999" - image create bitmap bm-right -data $bm_right_data - image create bitmap bm-right-gray -data $bm_right_data -foreground "#999" + image create bitmap bm-left -data $bm_left_data -foreground $uifgcolor + image create bitmap bm-left-gray -data $bm_left_data -foreground $uifgdisabledcolor + image create bitmap bm-right -data $bm_right_data -foreground $uifgcolor + image create bitmap bm-right-gray -data $bm_right_data -foreground $uifgdisabledcolor ${NS}::button .tf.bar.leftbut -command goback -state disabled -width 26 if {$use_ttk} { @@ -2245,7 +2253,8 @@ proc makewindow {} { set gm [makedroplist .tf.lbar.gdttype gdttype \ [mc "containing:"] \ [mc "touching paths:"] \ - [mc "adding/removing string:"]] + [mc "adding/removing string:"] \ + [mc "changing lines matching:"]] trace add variable gdttype write gdttype_change pack .tf.lbar.gdttype -side left -fill y @@ -2349,32 +2358,32 @@ proc makewindow {} { lappend fglist $ctext $ctext tag conf comment -wrap $wrapcomment - $ctext tag conf filesep -font textfontbold -back "#aaaaaa" + $ctext tag conf filesep -font textfontbold -fore $filesepfgcolor -back $filesepbgcolor $ctext tag conf hunksep -fore [lindex $diffcolors 2] $ctext tag conf d0 -fore [lindex $diffcolors 0] $ctext tag conf dresult -fore [lindex $diffcolors 1] - $ctext tag conf m0 -fore red - $ctext tag conf m1 -fore blue - $ctext tag conf m2 -fore green - $ctext tag conf m3 -fore purple - $ctext tag conf m4 -fore brown - $ctext tag conf m5 -fore "#009090" - $ctext tag conf m6 -fore magenta - $ctext tag conf m7 -fore "#808000" - $ctext tag conf m8 -fore "#009000" - $ctext tag conf m9 -fore "#ff0080" - $ctext tag conf m10 -fore cyan - $ctext tag conf m11 -fore "#b07070" - $ctext tag conf m12 -fore "#70b0f0" - $ctext tag conf m13 -fore "#70f0b0" - $ctext tag conf m14 -fore "#f0b070" - $ctext tag conf m15 -fore "#ff70b0" + $ctext tag conf m0 -fore [lindex $mergecolors 0] + $ctext tag conf m1 -fore [lindex $mergecolors 1] + $ctext tag conf m2 -fore [lindex $mergecolors 2] + $ctext tag conf m3 -fore [lindex $mergecolors 3] + $ctext tag conf m4 -fore [lindex $mergecolors 4] + $ctext tag conf m5 -fore [lindex $mergecolors 5] + $ctext tag conf m6 -fore [lindex $mergecolors 6] + $ctext tag conf m7 -fore [lindex $mergecolors 7] + $ctext tag conf m8 -fore [lindex $mergecolors 8] + $ctext tag conf m9 -fore [lindex $mergecolors 9] + $ctext tag conf m10 -fore [lindex $mergecolors 10] + $ctext tag conf m11 -fore [lindex $mergecolors 11] + $ctext tag conf m12 -fore [lindex $mergecolors 12] + $ctext tag conf m13 -fore [lindex $mergecolors 13] + $ctext tag conf m14 -fore [lindex $mergecolors 14] + $ctext tag conf m15 -fore [lindex $mergecolors 15] $ctext tag conf mmax -fore darkgrey set mergemax 16 $ctext tag conf mresult -font textfontbold $ctext tag conf msep -font textfontbold - $ctext tag conf found -back yellow - $ctext tag conf currentsearchhit -back orange + $ctext tag conf found -back $foundbgcolor + $ctext tag conf currentsearchhit -back $currentsearchhitbgcolor $ctext tag conf wwrap -wrap word .pwbottom add .bleft @@ -2559,6 +2568,7 @@ proc makewindow {} { {mc "Compare with marked commit" command compare_commits} {mc "Diff this -> marked commit" command {diffvsmark 0}} {mc "Diff marked commit -> this" command {diffvsmark 1}} + {mc "Revert this commit" command revert} } $rowctxmenu configure -tearoff 0 @@ -2721,6 +2731,14 @@ proc savestuff {w} { global viewname viewfiles viewargs viewargscmd viewperm nextviewnum global cmitmode wrapcomment datetimeformat limitdiffs global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor + global uifgcolor uifgdisabledcolor + global headbgcolor headfgcolor headoutlinecolor remotebgcolor + global tagbgcolor tagfgcolor tagoutlinecolor + global reflinecolor filesepbgcolor filesepfgcolor + global mergecolors foundbgcolor currentsearchhitbgcolor + global linehoverbgcolor linehoverfgcolor linehoveroutlinecolor circlecolors + global mainheadcirclecolor workingfilescirclecolor indexcirclecolor + global linkfgcolor circleoutlinecolor global autoselect autosellen extdifftool perfile_attrs markbgcolor use_ttk global hideremotes want_ttk maxrefs @@ -2753,13 +2771,37 @@ proc savestuff {w} { puts $f [list set want_ttk $want_ttk] puts $f [list set bgcolor $bgcolor] puts $f [list set fgcolor $fgcolor] + puts $f [list set uifgcolor $uifgcolor] + puts $f [list set uifgdisabledcolor $uifgdisabledcolor] puts $f [list set colors $colors] puts $f [list set diffcolors $diffcolors] + puts $f [list set mergecolors $mergecolors] puts $f [list set markbgcolor $markbgcolor] puts $f [list set diffcontext $diffcontext] puts $f [list set selectbgcolor $selectbgcolor] + puts $f [list set foundbgcolor $foundbgcolor] + puts $f [list set currentsearchhitbgcolor $currentsearchhitbgcolor] puts $f [list set extdifftool $extdifftool] puts $f [list set perfile_attrs $perfile_attrs] + puts $f [list set headbgcolor $headbgcolor] + puts $f [list set headfgcolor $headfgcolor] + puts $f [list set headoutlinecolor $headoutlinecolor] + puts $f [list set remotebgcolor $remotebgcolor] + puts $f [list set tagbgcolor $tagbgcolor] + puts $f [list set tagfgcolor $tagfgcolor] + puts $f [list set tagoutlinecolor $tagoutlinecolor] + puts $f [list set reflinecolor $reflinecolor] + puts $f [list set filesepbgcolor $filesepbgcolor] + puts $f [list set filesepfgcolor $filesepfgcolor] + puts $f [list set linehoverbgcolor $linehoverbgcolor] + puts $f [list set linehoverfgcolor $linehoverfgcolor] + puts $f [list set linehoveroutlinecolor $linehoveroutlinecolor] + puts $f [list set mainheadcirclecolor $mainheadcirclecolor] + puts $f [list set workingfilescirclecolor $workingfilescirclecolor] + puts $f [list set indexcirclecolor $indexcirclecolor] + puts $f [list set circlecolors $circlecolors] + puts $f [list set linkfgcolor $linkfgcolor] + puts $f [list set circleoutlinecolor $circleoutlinecolor] puts $f "set geometry(main) [wm geometry .]" puts $f "set geometry(state) [wm state .]" @@ -4617,6 +4659,8 @@ proc do_file_hl {serial} { set gdtargs [concat -- $relative_paths] } elseif {$gdttype eq [mc "adding/removing string:"]} { set gdtargs [list "-S$highlight_files"] + } elseif {$gdttype eq [mc "changing lines matching:"]} { + set gdtargs [list "-G$highlight_files"] } else { # must be "containing:", i.e. we're searching commit info return @@ -5925,15 +5969,17 @@ proc drawcmittext {id row col} { global linehtag linentag linedtag selectedline global canvxmax boldids boldnameids fgcolor markedid global mainheadid nullid nullid2 circleitem circlecolors ctxbut + global mainheadcirclecolor workingfilescirclecolor indexcirclecolor + global circleoutlinecolor # listed is 0 for boundary, 1 for normal, 2 for negative, 3 for left, 4 for right set listed $cmitlisted($curview,$id) if {$id eq $nullid} { - set ofill red + set ofill $workingfilescirclecolor } elseif {$id eq $nullid2} { - set ofill green + set ofill $indexcirclecolor } elseif {$id eq $mainheadid} { - set ofill yellow + set ofill $mainheadcirclecolor } else { set ofill [lindex $circlecolors $listed] } @@ -5943,21 +5989,21 @@ proc drawcmittext {id row col} { if {$listed <= 2} { set t [$canv create oval [expr {$x - $orad}] [expr {$y - $orad}] \ [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \ - -fill $ofill -outline $fgcolor -width 1 -tags circle] + -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle] } elseif {$listed == 3} { # triangle pointing left for left-side commits set t [$canv create polygon \ [expr {$x - $orad}] $y \ [expr {$x + $orad - 1}] [expr {$y - $orad}] \ [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \ - -fill $ofill -outline $fgcolor -width 1 -tags circle] + -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle] } else { # triangle pointing right for right-side commits set t [$canv create polygon \ [expr {$x + $orad - 1}] $y \ [expr {$x - $orad}] [expr {$y - $orad}] \ [expr {$x - $orad}] [expr {$y + $orad - 1}] \ - -fill $ofill -outline $fgcolor -width 1 -tags circle] + -fill $ofill -outline $circleoutlinecolor -width 1 -tags circle] } set circleitem($row) $t $canv raise $t @@ -6345,6 +6391,9 @@ proc drawtags {id x xt y1} { global idtags idheads idotherrefs mainhead global linespc lthickness global canv rowtextx curview fgcolor bgcolor ctxbut + global headbgcolor headfgcolor headoutlinecolor remotebgcolor + global tagbgcolor tagfgcolor tagoutlinecolor + global reflinecolor set marks {} set ntags 0 @@ -6382,7 +6431,7 @@ proc drawtags {id x xt y1} { set xt [expr {$xt + $delta + $wid + $lthickness + $linespc}] } set t [$canv create line $x $y1 [lindex $xvals end] $y1 \ - -width $lthickness -fill black -tags tag.$id] + -width $lthickness -fill $reflinecolor -tags tag.$id] $canv lower $t foreach tag $marks x $xvals wid $wvals { set tag_quoted [string map {% %%} $tag] @@ -6393,13 +6442,14 @@ proc drawtags {id x xt y1} { # draw a tag set t [$canv create polygon $x [expr {$yt + $delta}] $xl $yt \ $xr $yt $xr $yb $xl $yb $x [expr {$yb - $delta}] \ - -width 1 -outline black -fill yellow -tags tag.$id] + -width 1 -outline $tagoutlinecolor -fill $tagbgcolor \ + -tags tag.$id] $canv bind $t <1> [list showtag $tag_quoted 1] set rowtextx([rowofcommit $id]) [expr {$xr + $linespc}] } else { # draw a head or other ref if {[incr nheads -1] >= 0} { - set col green + set col $headbgcolor if {$tag eq $mainhead} { set font mainfontbold } @@ -6415,10 +6465,10 @@ proc drawtags {id x xt y1} { set yti [expr {$yt + 1}] set xri [expr {$x + $rwid}] $canv create polygon $xi $yti $xri $yti $xri $yb $xi $yb \ - -width 0 -fill "#ffddaa" -tags tag.$id + -width 0 -fill $remotebgcolor -tags tag.$id } } - set t [$canv create text $xl $y1 -anchor w -text $tag -fill $fgcolor \ + set t [$canv create text $xl $y1 -anchor w -text $tag -fill $headfgcolor \ -font $font -tags [list tag.$id text]] if {$ntags >= 0} { $canv bind $t <1> [list showtag $tag_quoted 1] @@ -6799,6 +6849,7 @@ proc appendwithlinks {text tags} { proc setlink {id lk} { global curview ctext pendinglinks + global linkfgcolor if {[string range $id 0 1] eq "-g"} { set id [string range $id 2 end] @@ -6816,7 +6867,7 @@ proc setlink {id lk} { set known [commitinview $id $curview] } if {$known} { - $ctext tag conf $lk -foreground blue -underline 1 + $ctext tag conf $lk -foreground $linkfgcolor -underline 1 $ctext tag bind $lk <1> [list selbyid $id] $ctext tag bind $lk <Enter> {linkcursor %W 1} $ctext tag bind $lk <Leave> {linkcursor %W -1} @@ -7571,9 +7622,13 @@ proc diffcmd {ids flags} { } proc gettreediffs {ids} { - global treediff treepending + global treediff treepending limitdiffs vfilelimit curview - if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return + set cmd [diffcmd $ids {--no-commit-id}] + if {$limitdiffs && $vfilelimit($curview) ne {}} { + set cmd [concat $cmd -- $vfilelimit($curview)] + } + if {[catch {set gdtf [open $cmd r]}]} return set treepending $ids set treediff {} @@ -7617,17 +7672,7 @@ proc gettreediffline {gdtf ids} { return [expr {$nr >= $max? 2: 1}] } close $gdtf - if {$limitdiffs && $vfilelimit($curview) ne {}} { - set flist {} - foreach f $treediff { - if {[path_filter $vfilelimit($curview) $f]} { - lappend flist $f - } - } - set treediffs($ids) $flist - } else { - set treediffs($ids) $treediff - } + set treediffs($ids) $treediff unset treepending if {$cmitmode eq "tree" && [llength $diffids] == 1} { gettree $diffids @@ -8459,6 +8504,8 @@ proc lineleave {id} { proc linehover {} { global hoverx hovery hoverid hovertimer global canv linespc lthickness + global linehoverbgcolor linehoverfgcolor linehoveroutlinecolor + global commitinfo set text [lindex $commitinfo($hoverid) 0] @@ -8472,10 +8519,11 @@ proc linehover {} { set x1 [expr {$x + [font measure mainfont $text] + 2 * $lthickness}] set y1 [expr {$y + $linespc + 2 * $lthickness}] set t [$canv create rectangle $x0 $y0 $x1 $y1 \ - -fill \#ffff80 -outline black -width 1 -tags hover] + -fill $linehoverbgcolor -outline $linehoveroutlinecolor \ + -width 1 -tags hover] $canv raise $t set t [$canv create text $x $y -anchor nw -text $text -tags hover \ - -font mainfont] + -font mainfont -fill $linehoverfgcolor] $canv raise $t } @@ -9039,12 +9087,13 @@ proc domktag {} { proc redrawtags {id} { global canv linehtag idpos currentid curview cmitlisted markedid global canvxmax iddrawn circleitem mainheadid circlecolors + global mainheadcirclecolor if {![commitinview $id $curview]} return if {![info exists iddrawn($id)]} return set row [rowofcommit $id] if {$id eq $mainheadid} { - set ofill yellow + set ofill $mainheadcirclecolor } else { set ofill [lindex $circlecolors $cmitlisted($curview,$id)] } @@ -9301,6 +9350,67 @@ proc cherrypick {} { notbusy cherrypick } +proc revert {} { + global rowmenuid curview + global mainhead mainheadid + global gitdir + + set oldhead [exec git rev-parse HEAD] + set dheads [descheads $rowmenuid] + if { $dheads eq {} || [lsearch -exact $dheads $oldhead] == -1 } { + set ok [confirm_popup [mc "Commit %s is not\ + included in branch %s -- really revert it?" \ + [string range $rowmenuid 0 7] $mainhead]] + if {!$ok} return + } + nowbusy revert [mc "Reverting"] + update + + if [catch {exec git revert --no-edit $rowmenuid} err] { + notbusy revert + if [regexp {files would be overwritten by merge:(\n(( |\t)+[^\n]+\n)+)}\ + $err match files] { + regsub {\n( |\t)+} $files "\n" files + error_popup [mc "Revert failed because of local changes to\ + the following files:%s Please commit, reset or stash \ + your changes and try again." $files] + } elseif [regexp {error: could not revert} $err] { + if [confirm_popup [mc "Revert failed because of merge conflict.\n\ + Do you wish to run git citool to resolve it?"]] { + # Force citool to read MERGE_MSG + file delete [file join $gitdir "GITGUI_MSG"] + exec_citool {} $rowmenuid + } + } else { error_popup $err } + run updatecommits + return + } + + set newhead [exec git rev-parse HEAD] + if { $newhead eq $oldhead } { + notbusy revert + error_popup [mc "No changes committed"] + return + } + + addnewchild $newhead $oldhead + + if [commitinview $oldhead $curview] { + # XXX this isn't right if we have a path limit... + insertrow $newhead $oldhead $curview + if {$mainhead ne {}} { + movehead $newhead $mainhead + movedhead $newhead $mainhead + } + set mainheadid $newhead + redrawtags $oldhead + redrawtags $newhead + selbyid $newhead + } + + notbusy revert +} + proc resethead {} { global mainhead rowmenuid confirm_ok resettype NS @@ -10780,7 +10890,7 @@ proc showtag {tag isnew} { set linknum 0 if {![info exists cached_tagcontent($tag)]} { catch { - set cached_tagcontent($tag) [exec git cat-file tag $tag] + set cached_tagcontent($tag) [exec git cat-file -p $tag] } } if {[info exists cached_tagcontent($tag)]} { @@ -11641,6 +11751,15 @@ if {[catch {package require Tk 8.4} err]} { exit 1 } +# on OSX bring the current Wish process window to front +if {[tk windowingsystem] eq "aqua"} { + exec osascript -e [format { + tell application "System Events" + set frontmost of processes whose unix id is %d to true + end tell + } [pid] ] +} + # Unset GIT_TRACE var if set if { [info exists ::env(GIT_TRACE)] } { unset ::env(GIT_TRACE) @@ -11728,22 +11847,47 @@ if {[tk windowingsystem] eq "aqua"} { set colors {green red blue magenta darkgrey brown orange} if {[tk windowingsystem] eq "win32"} { set uicolor SystemButtonFace + set uifgcolor SystemButtonText + set uifgdisabledcolor SystemDisabledText set bgcolor SystemWindow - set fgcolor SystemButtonText + set fgcolor SystemWindowText set selectbgcolor SystemHighlight } else { set uicolor grey85 + set uifgcolor black + set uifgdisabledcolor "#999" set bgcolor white set fgcolor black set selectbgcolor gray85 } set diffcolors {red "#00a000" blue} set diffcontext 3 +set mergecolors {red blue green purple brown "#009090" magenta "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"} set ignorespace 0 set worddiff "" set markbgcolor "#e0e0ff" +set headbgcolor green +set headfgcolor black +set headoutlinecolor black +set remotebgcolor #ffddaa +set tagbgcolor yellow +set tagfgcolor black +set tagoutlinecolor black +set reflinecolor black +set filesepbgcolor #aaaaaa +set filesepfgcolor black +set linehoverbgcolor #ffff80 +set linehoverfgcolor black +set linehoveroutlinecolor black +set mainheadcirclecolor yellow +set workingfilescirclecolor red +set indexcirclecolor green set circlecolors {white blue gray blue blue} +set linkfgcolor blue +set circleoutlinecolor $fgcolor +set foundbgcolor yellow +set currentsearchhitbgcolor orange # button for popping up context menus if {[tk windowingsystem] eq "aqua"} { diff --git a/gitk-git/po/sv.po b/gitk-git/po/sv.po index 8cc98dc079..df95e01b90 100644 --- a/gitk-git/po/sv.po +++ b/gitk-git/po/sv.po @@ -1,16 +1,16 @@ # Swedish translation for gitk -# Copyright (C) 2005-2012 Paul Mackerras +# Copyright (C) 2005-2013 Paul Mackerras # This file is distributed under the same license as the gitk package. # # Mikael Magnusson <mikachu@gmail.com>, 2008. -# Peter Krefting <peter@softwolves.pp.se>, 2008, 2009, 2010, 2012. +# Peter Krefting <peter@softwolves.pp.se>, 2008, 2009, 2010, 2012, 2013. # msgid "" msgstr "" "Project-Id-Version: sv\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-03 08:09+0100\n" -"PO-Revision-Date: 2012-10-03 08:13+0100\n" +"POT-Creation-Date: 2013-05-16 08:06+0100\n" +"PO-Revision-Date: 2013-05-16 08:12+0100\n" "Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" @@ -22,11 +22,11 @@ msgstr "" msgid "Couldn't get list of unmerged files:" msgstr "Kunde inte hämta lista över ej sammanslagna filer:" -#: gitk:210 gitk:2317 +#: gitk:210 gitk:2334 msgid "Color words" msgstr "Färga ord" -#: gitk:215 gitk:2317 gitk:7888 gitk:7921 +#: gitk:215 gitk:2334 gitk:7977 gitk:8010 msgid "Markup words" msgstr "Märk upp ord" @@ -60,11 +60,11 @@ msgstr "Fel vid körning av git log:" msgid "Reading" msgstr "Läser" -#: gitk:484 gitk:4353 +#: gitk:484 gitk:4409 msgid "Reading commits..." msgstr "Läser incheckningar..." -#: gitk:487 gitk:1625 gitk:4356 +#: gitk:487 gitk:1625 gitk:4412 msgid "No commits selected" msgstr "Inga incheckningar markerade" @@ -80,278 +80,286 @@ msgstr "Ingen incheckningsinformation är tillgänglig" msgid "mc" msgstr "mc" -#: gitk:1911 gitk:4146 gitk:9282 gitk:10824 gitk:11100 +#: gitk:1911 gitk:4202 gitk:9437 gitk:10979 gitk:11258 msgid "OK" msgstr "OK" -#: gitk:1913 gitk:4148 gitk:8871 gitk:8950 gitk:9065 gitk:9114 gitk:9284 -#: gitk:10825 gitk:11101 +#: gitk:1913 gitk:4204 gitk:8964 gitk:9043 gitk:9159 gitk:9208 gitk:9439 +#: gitk:10980 gitk:11259 msgid "Cancel" msgstr "Avbryt" -#: gitk:2040 +#: gitk:2048 msgid "Update" msgstr "Uppdatera" -#: gitk:2041 +#: gitk:2049 msgid "Reload" msgstr "Ladda om" -#: gitk:2042 +#: gitk:2050 msgid "Reread references" msgstr "Läs om referenser" -#: gitk:2043 +#: gitk:2051 msgid "List references" msgstr "Visa referenser" -#: gitk:2045 +#: gitk:2053 msgid "Start git gui" msgstr "Starta git gui" -#: gitk:2047 +#: gitk:2055 msgid "Quit" msgstr "Avsluta" -#: gitk:2039 +#: gitk:2047 msgid "File" msgstr "Arkiv" -#: gitk:2051 +#: gitk:2059 msgid "Preferences" msgstr "Inställningar" -#: gitk:2050 +#: gitk:2058 msgid "Edit" msgstr "Redigera" -#: gitk:2055 +#: gitk:2063 msgid "New view..." msgstr "Ny vy..." -#: gitk:2056 +#: gitk:2064 msgid "Edit view..." msgstr "Ändra vy..." -#: gitk:2057 +#: gitk:2065 msgid "Delete view" msgstr "Ta bort vy" -#: gitk:2059 +#: gitk:2067 msgid "All files" msgstr "Alla filer" -#: gitk:2054 gitk:3899 +#: gitk:2062 gitk:3955 msgid "View" msgstr "Visa" -#: gitk:2064 gitk:2074 gitk:2869 +#: gitk:2072 gitk:2082 gitk:2925 msgid "About gitk" msgstr "Om gitk" -#: gitk:2065 gitk:2079 +#: gitk:2073 gitk:2087 msgid "Key bindings" msgstr "Tangentbordsbindningar" -#: gitk:2063 gitk:2078 +#: gitk:2071 gitk:2086 msgid "Help" msgstr "Hjälp" -#: gitk:2156 gitk:8330 +#: gitk:2164 gitk:8420 msgid "SHA1 ID:" msgstr "SHA1-id:" -#: gitk:2192 +#: gitk:2208 msgid "Row" msgstr "Rad" -#: gitk:2230 +#: gitk:2246 msgid "Find" msgstr "Sök" -#: gitk:2231 +#: gitk:2247 msgid "next" msgstr "nästa" -#: gitk:2232 +#: gitk:2248 msgid "prev" msgstr "föreg" -#: gitk:2233 +#: gitk:2249 msgid "commit" msgstr "incheckning" -#: gitk:2236 gitk:2238 gitk:4514 gitk:4537 gitk:4561 gitk:6528 gitk:6600 -#: gitk:6685 +#: gitk:2252 gitk:2254 gitk:4570 gitk:4593 gitk:4617 gitk:6592 gitk:6664 +#: gitk:6749 msgid "containing:" msgstr "som innehåller:" -#: gitk:2239 gitk:3381 gitk:3386 gitk:4590 +#: gitk:2255 gitk:3437 gitk:3442 gitk:4646 msgid "touching paths:" msgstr "som rör sökväg:" -#: gitk:2240 gitk:4604 +#: gitk:2256 gitk:4660 msgid "adding/removing string:" msgstr "som lägger/till tar bort sträng:" -#: gitk:2249 gitk:2251 gitk:4593 +#: gitk:2257 gitk:4662 +msgid "changing lines matching:" +msgstr "ändrar rader som matchar:" + +#: gitk:2266 gitk:2268 gitk:4649 msgid "Exact" msgstr "Exakt" -#: gitk:2251 gitk:4679 gitk:6496 +#: gitk:2268 gitk:4737 gitk:6560 msgid "IgnCase" msgstr "IgnVersaler" -#: gitk:2251 gitk:4563 gitk:4677 gitk:6492 +#: gitk:2268 gitk:4619 gitk:4735 gitk:6556 msgid "Regexp" msgstr "Reg.uttr." -#: gitk:2253 gitk:2254 gitk:4699 gitk:4729 gitk:4736 gitk:6621 gitk:6689 +#: gitk:2270 gitk:2271 gitk:4757 gitk:4787 gitk:4794 gitk:6685 gitk:6753 msgid "All fields" msgstr "Alla fält" -#: gitk:2254 gitk:4696 gitk:4729 gitk:6559 +#: gitk:2271 gitk:4754 gitk:4787 gitk:6623 msgid "Headline" msgstr "Rubrik" -#: gitk:2255 gitk:4696 gitk:6559 gitk:6689 gitk:7126 +#: gitk:2272 gitk:4754 gitk:6623 gitk:6753 gitk:7221 msgid "Comments" msgstr "Kommentarer" -#: gitk:2255 gitk:4696 gitk:4701 gitk:4736 gitk:6559 gitk:7061 gitk:8505 -#: gitk:8520 +#: gitk:2272 gitk:4754 gitk:4759 gitk:4794 gitk:6623 gitk:7156 gitk:8598 +#: gitk:8613 msgid "Author" msgstr "Författare" -#: gitk:2255 gitk:4696 gitk:6559 gitk:7063 +#: gitk:2272 gitk:4754 gitk:6623 gitk:7158 msgid "Committer" msgstr "Incheckare" -#: gitk:2286 +#: gitk:2303 msgid "Search" msgstr "Sök" -#: gitk:2294 +#: gitk:2311 msgid "Diff" msgstr "Diff" -#: gitk:2296 +#: gitk:2313 msgid "Old version" msgstr "Gammal version" -#: gitk:2298 +#: gitk:2315 msgid "New version" msgstr "Ny version" -#: gitk:2300 +#: gitk:2317 msgid "Lines of context" msgstr "Rader sammanhang" -#: gitk:2310 +#: gitk:2327 msgid "Ignore space change" msgstr "Ignorera ändringar i blanksteg" -#: gitk:2314 gitk:2316 gitk:7646 gitk:7874 +#: gitk:2331 gitk:2333 gitk:7735 gitk:7963 msgid "Line diff" msgstr "Rad-diff" -#: gitk:2379 +#: gitk:2397 msgid "Patch" msgstr "Patch" -#: gitk:2381 +#: gitk:2399 msgid "Tree" msgstr "Träd" -#: gitk:2540 gitk:2559 +#: gitk:2557 gitk:2577 msgid "Diff this -> selected" msgstr "Diff denna -> markerad" -#: gitk:2541 gitk:2560 +#: gitk:2558 gitk:2578 msgid "Diff selected -> this" msgstr "Diff markerad -> denna" -#: gitk:2542 gitk:2561 +#: gitk:2559 gitk:2579 msgid "Make patch" msgstr "Skapa patch" -#: gitk:2543 gitk:8929 +#: gitk:2560 gitk:9022 msgid "Create tag" msgstr "Skapa tagg" -#: gitk:2544 gitk:9045 +#: gitk:2561 gitk:9139 msgid "Write commit to file" msgstr "Skriv incheckning till fil" -#: gitk:2545 gitk:9102 +#: gitk:2562 gitk:9196 msgid "Create new branch" msgstr "Skapa ny gren" -#: gitk:2546 +#: gitk:2563 msgid "Cherry-pick this commit" msgstr "Plocka denna incheckning" -#: gitk:2547 +#: gitk:2564 msgid "Reset HEAD branch to here" msgstr "Återställ HEAD-grenen hit" -#: gitk:2548 +#: gitk:2565 msgid "Mark this commit" msgstr "Markera denna incheckning" -#: gitk:2549 +#: gitk:2566 msgid "Return to mark" msgstr "Återgå till markering" -#: gitk:2550 +#: gitk:2567 msgid "Find descendant of this and mark" msgstr "Hitta efterföljare till denna och markera" -#: gitk:2551 +#: gitk:2568 msgid "Compare with marked commit" msgstr "Jämför med markerad incheckning" -#: gitk:2552 gitk:2562 +#: gitk:2569 gitk:2580 msgid "Diff this -> marked commit" msgstr "Diff denna -> markerad incheckning" -#: gitk:2553 gitk:2563 +#: gitk:2570 gitk:2581 msgid "Diff marked commit -> this" msgstr "Diff markerad incheckning -> denna" -#: gitk:2569 +#: gitk:2571 +msgid "Revert this commit" +msgstr "Ångra denna incheckning" + +#: gitk:2587 msgid "Check out this branch" msgstr "Checka ut denna gren" -#: gitk:2570 +#: gitk:2588 msgid "Remove this branch" msgstr "Ta bort denna gren" -#: gitk:2577 +#: gitk:2595 msgid "Highlight this too" msgstr "Markera även detta" -#: gitk:2578 +#: gitk:2596 msgid "Highlight this only" msgstr "Markera bara detta" -#: gitk:2579 +#: gitk:2597 msgid "External diff" msgstr "Extern diff" -#: gitk:2580 +#: gitk:2598 msgid "Blame parent commit" msgstr "Klandra föräldraincheckning" -#: gitk:2587 +#: gitk:2605 msgid "Show origin of this line" msgstr "Visa ursprunget för den här raden" -#: gitk:2588 +#: gitk:2606 msgid "Run git gui blame on this line" msgstr "Kör git gui blame på den här raden" -#: gitk:2871 +#: gitk:2927 msgid "" "\n" "Gitk - a commit viewer for git\n" @@ -367,302 +375,302 @@ msgstr "" "\n" "Använd och vidareförmedla enligt villkoren i GNU General Public License" -#: gitk:2879 gitk:2944 gitk:9468 +#: gitk:2935 gitk:3000 gitk:9623 msgid "Close" msgstr "Stäng" -#: gitk:2900 +#: gitk:2956 msgid "Gitk key bindings" msgstr "Tangentbordsbindningar för Gitk" -#: gitk:2903 +#: gitk:2959 msgid "Gitk key bindings:" msgstr "Tangentbordsbindningar för Gitk:" -#: gitk:2905 +#: gitk:2961 #, tcl-format msgid "<%s-Q>\t\tQuit" msgstr "<%s-Q>\t\tAvsluta" -#: gitk:2906 +#: gitk:2962 #, tcl-format msgid "<%s-W>\t\tClose window" msgstr "<%s-W>\t\tStäng fönster" -#: gitk:2907 +#: gitk:2963 msgid "<Home>\t\tMove to first commit" msgstr "<Home>\t\tGå till första incheckning" -#: gitk:2908 +#: gitk:2964 msgid "<End>\t\tMove to last commit" msgstr "<End>\t\tGå till sista incheckning" -#: gitk:2909 +#: gitk:2965 msgid "<Up>, p, k\tMove up one commit" msgstr "<Upp>, p, k\tGå en incheckning upp" -#: gitk:2910 +#: gitk:2966 msgid "<Down>, n, j\tMove down one commit" msgstr "<Ned>, n, j\tGå en incheckning ned" -#: gitk:2911 +#: gitk:2967 msgid "<Left>, z, h\tGo back in history list" msgstr "<Vänster>, z, h\tGå bakåt i historiken" -#: gitk:2912 +#: gitk:2968 msgid "<Right>, x, l\tGo forward in history list" msgstr "<Höger>, x, l\tGå framåt i historiken" -#: gitk:2913 +#: gitk:2969 msgid "<PageUp>\tMove up one page in commit list" msgstr "<PageUp>\tGå upp en sida i incheckningslistan" -#: gitk:2914 +#: gitk:2970 msgid "<PageDown>\tMove down one page in commit list" msgstr "<PageDown>\tGå ned en sida i incheckningslistan" -#: gitk:2915 +#: gitk:2971 #, tcl-format msgid "<%s-Home>\tScroll to top of commit list" msgstr "<%s-Home>\tRulla till början av incheckningslistan" -#: gitk:2916 +#: gitk:2972 #, tcl-format msgid "<%s-End>\tScroll to bottom of commit list" msgstr "<%s-End>\tRulla till slutet av incheckningslistan" -#: gitk:2917 +#: gitk:2973 #, tcl-format msgid "<%s-Up>\tScroll commit list up one line" msgstr "<%s-Upp>\tRulla incheckningslistan upp ett steg" -#: gitk:2918 +#: gitk:2974 #, tcl-format msgid "<%s-Down>\tScroll commit list down one line" msgstr "<%s-Ned>\tRulla incheckningslistan ned ett steg" -#: gitk:2919 +#: gitk:2975 #, tcl-format msgid "<%s-PageUp>\tScroll commit list up one page" msgstr "<%s-PageUp>\tRulla incheckningslistan upp en sida" -#: gitk:2920 +#: gitk:2976 #, tcl-format msgid "<%s-PageDown>\tScroll commit list down one page" msgstr "<%s-PageDown>\tRulla incheckningslistan ned en sida" -#: gitk:2921 +#: gitk:2977 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" msgstr "<Skift-Upp>\tSök bakåt (uppåt, senare incheckningar)" -#: gitk:2922 +#: gitk:2978 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" msgstr "<Skift-Ned>\tSök framåt (nedåt, tidigare incheckningar)" -#: gitk:2923 +#: gitk:2979 msgid "<Delete>, b\tScroll diff view up one page" msgstr "<Delete>, b\tRulla diffvisningen upp en sida" -#: gitk:2924 +#: gitk:2980 msgid "<Backspace>\tScroll diff view up one page" msgstr "<Baksteg>\tRulla diffvisningen upp en sida" -#: gitk:2925 +#: gitk:2981 msgid "<Space>\t\tScroll diff view down one page" msgstr "<Blanksteg>\tRulla diffvisningen ned en sida" -#: gitk:2926 +#: gitk:2982 msgid "u\t\tScroll diff view up 18 lines" msgstr "u\t\tRulla diffvisningen upp 18 rader" -#: gitk:2927 +#: gitk:2983 msgid "d\t\tScroll diff view down 18 lines" msgstr "d\t\tRulla diffvisningen ned 18 rader" -#: gitk:2928 +#: gitk:2984 #, tcl-format msgid "<%s-F>\t\tFind" msgstr "<%s-F>\t\tSök" -#: gitk:2929 +#: gitk:2985 #, tcl-format msgid "<%s-G>\t\tMove to next find hit" msgstr "<%s-G>\t\tGå till nästa sökträff" -#: gitk:2930 +#: gitk:2986 msgid "<Return>\tMove to next find hit" msgstr "<Return>\t\tGå till nästa sökträff" -#: gitk:2931 +#: gitk:2987 msgid "/\t\tFocus the search box" msgstr "/\t\tFokusera sökrutan" -#: gitk:2932 +#: gitk:2988 msgid "?\t\tMove to previous find hit" msgstr "?\t\tGå till föregående sökträff" -#: gitk:2933 +#: gitk:2989 msgid "f\t\tScroll diff view to next file" msgstr "f\t\tRulla diffvisningen till nästa fil" -#: gitk:2934 +#: gitk:2990 #, tcl-format msgid "<%s-S>\t\tSearch for next hit in diff view" msgstr "<%s-S>\t\tGå till nästa sökträff i diffvisningen" -#: gitk:2935 +#: gitk:2991 #, tcl-format msgid "<%s-R>\t\tSearch for previous hit in diff view" msgstr "<%s-R>\t\tGå till föregående sökträff i diffvisningen" -#: gitk:2936 +#: gitk:2992 #, tcl-format msgid "<%s-KP+>\tIncrease font size" msgstr "<%s-Num+>\tÖka teckenstorlek" -#: gitk:2937 +#: gitk:2993 #, tcl-format msgid "<%s-plus>\tIncrease font size" msgstr "<%s-plus>\tÖka teckenstorlek" -#: gitk:2938 +#: gitk:2994 #, tcl-format msgid "<%s-KP->\tDecrease font size" msgstr "<%s-Num->\tMinska teckenstorlek" -#: gitk:2939 +#: gitk:2995 #, tcl-format msgid "<%s-minus>\tDecrease font size" msgstr "<%s-minus>\tMinska teckenstorlek" -#: gitk:2940 +#: gitk:2996 msgid "<F5>\t\tUpdate" msgstr "<F5>\t\tUppdatera" -#: gitk:3395 gitk:3404 +#: gitk:3451 gitk:3460 #, tcl-format msgid "Error creating temporary directory %s:" msgstr "Fel vid skapande av temporär katalog %s:" -#: gitk:3417 +#: gitk:3473 #, tcl-format msgid "Error getting \"%s\" from %s:" msgstr "Fel vid hämtning av \"%s\" från %s:" -#: gitk:3480 +#: gitk:3536 msgid "command failed:" msgstr "kommando misslyckades:" -#: gitk:3629 +#: gitk:3685 msgid "No such commit" msgstr "Incheckning saknas" -#: gitk:3643 +#: gitk:3699 msgid "git gui blame: command failed:" msgstr "git gui blame: kommando misslyckades:" -#: gitk:3674 +#: gitk:3730 #, tcl-format msgid "Couldn't read merge head: %s" msgstr "Kunde inte läsa sammanslagningshuvud: %s" -#: gitk:3682 +#: gitk:3738 #, tcl-format msgid "Error reading index: %s" msgstr "Fel vid läsning av index: %s" -#: gitk:3707 +#: gitk:3763 #, tcl-format msgid "Couldn't start git blame: %s" msgstr "Kunde inte starta git blame: %s" -#: gitk:3710 gitk:6527 +#: gitk:3766 gitk:6591 msgid "Searching" msgstr "Söker" -#: gitk:3742 +#: gitk:3798 #, tcl-format msgid "Error running git blame: %s" msgstr "Fel vid körning av git blame: %s" -#: gitk:3770 +#: gitk:3826 #, tcl-format msgid "That line comes from commit %s, which is not in this view" msgstr "Raden kommer från incheckningen %s, som inte finns i denna vy" -#: gitk:3784 +#: gitk:3840 msgid "External diff viewer failed:" msgstr "Externt diff-verktyg misslyckades:" -#: gitk:3902 +#: gitk:3958 msgid "Gitk view definition" msgstr "Definition av Gitk-vy" -#: gitk:3906 +#: gitk:3962 msgid "Remember this view" msgstr "Spara denna vy" -#: gitk:3907 +#: gitk:3963 msgid "References (space separated list):" msgstr "Referenser (blankstegsavdelad lista):" -#: gitk:3908 +#: gitk:3964 msgid "Branches & tags:" msgstr "Grenar & taggar:" -#: gitk:3909 +#: gitk:3965 msgid "All refs" msgstr "Alla referenser" -#: gitk:3910 +#: gitk:3966 msgid "All (local) branches" msgstr "Alla (lokala) grenar" -#: gitk:3911 +#: gitk:3967 msgid "All tags" msgstr "Alla taggar" -#: gitk:3912 +#: gitk:3968 msgid "All remote-tracking branches" msgstr "Alla fjärrspårande grenar" -#: gitk:3913 +#: gitk:3969 msgid "Commit Info (regular expressions):" msgstr "Incheckningsinfo (reguljära uttryck):" -#: gitk:3914 +#: gitk:3970 msgid "Author:" msgstr "Författare:" -#: gitk:3915 +#: gitk:3971 msgid "Committer:" msgstr "Incheckare:" -#: gitk:3916 +#: gitk:3972 msgid "Commit Message:" msgstr "Incheckningsmeddelande:" -#: gitk:3917 +#: gitk:3973 msgid "Matches all Commit Info criteria" msgstr "Motsvarar alla kriterier för incheckningsinfo" -#: gitk:3918 +#: gitk:3974 msgid "Changes to Files:" msgstr "Ändringar av filer:" -#: gitk:3919 +#: gitk:3975 msgid "Fixed String" msgstr "Fast sträng" -#: gitk:3920 +#: gitk:3976 msgid "Regular Expression" msgstr "Reguljärt uttryck" -#: gitk:3921 +#: gitk:3977 msgid "Search string:" msgstr "Söksträng:" -#: gitk:3922 +#: gitk:3978 msgid "" "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " "15:27:38\"):" @@ -670,197 +678,201 @@ msgstr "" "Incheckingsdatum (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " "15:27:38\"):" -#: gitk:3923 +#: gitk:3979 msgid "Since:" msgstr "Från:" -#: gitk:3924 +#: gitk:3980 msgid "Until:" msgstr "Till:" -#: gitk:3925 +#: gitk:3981 msgid "Limit and/or skip a number of revisions (positive integer):" msgstr "Begränsa och/eller hoppa över ett antal revisioner (positivt heltal):" -#: gitk:3926 +#: gitk:3982 msgid "Number to show:" msgstr "Antal att visa:" -#: gitk:3927 +#: gitk:3983 msgid "Number to skip:" msgstr "Antal att hoppa över:" -#: gitk:3928 +#: gitk:3984 msgid "Miscellaneous options:" msgstr "Diverse alternativ:" -#: gitk:3929 +#: gitk:3985 msgid "Strictly sort by date" msgstr "Strikt datumsortering" -#: gitk:3930 +#: gitk:3986 msgid "Mark branch sides" msgstr "Markera sidogrenar" -#: gitk:3931 +#: gitk:3987 msgid "Limit to first parent" msgstr "Begränsa till första förälder" -#: gitk:3932 +#: gitk:3988 msgid "Simple history" msgstr "Enkel historik" -#: gitk:3933 +#: gitk:3989 msgid "Additional arguments to git log:" msgstr "Ytterligare argument till git log:" -#: gitk:3934 +#: gitk:3990 msgid "Enter files and directories to include, one per line:" msgstr "Ange filer och kataloger att ta med, en per rad:" -#: gitk:3935 +#: gitk:3991 msgid "Command to generate more commits to include:" msgstr "Kommando för att generera fler incheckningar att ta med:" -#: gitk:4059 +#: gitk:4115 msgid "Gitk: edit view" msgstr "Gitk: redigera vy" -#: gitk:4067 +#: gitk:4123 msgid "-- criteria for selecting revisions" msgstr " - kriterier för val av revisioner" -#: gitk:4072 +#: gitk:4128 msgid "View Name" msgstr "Namn på vy" -#: gitk:4147 +#: gitk:4203 msgid "Apply (F5)" msgstr "Använd (F5)" -#: gitk:4185 +#: gitk:4241 msgid "Error in commit selection arguments:" msgstr "Fel i argument för val av incheckningar:" -#: gitk:4238 gitk:4290 gitk:4749 gitk:4763 gitk:6027 gitk:11849 gitk:11850 +#: gitk:4294 gitk:4346 gitk:4807 gitk:4821 gitk:6087 gitk:12041 gitk:12042 msgid "None" msgstr "Inget" -#: gitk:4846 gitk:4851 +#: gitk:4904 gitk:4909 msgid "Descendant" msgstr "Avkomling" -#: gitk:4847 +#: gitk:4905 msgid "Not descendant" msgstr "Inte avkomling" -#: gitk:4854 gitk:4859 +#: gitk:4912 gitk:4917 msgid "Ancestor" msgstr "Förfader" -#: gitk:4855 +#: gitk:4913 msgid "Not ancestor" msgstr "Inte förfader" -#: gitk:5145 +#: gitk:5203 msgid "Local changes checked in to index but not committed" msgstr "Lokala ändringar sparade i indexet men inte incheckade" -#: gitk:5181 +#: gitk:5239 msgid "Local uncommitted changes, not checked in to index" msgstr "Lokala ändringar, ej sparade i indexet" -#: gitk:6882 +#: gitk:6971 +msgid "and many more" +msgstr "med många flera" + +#: gitk:6974 msgid "many" msgstr "många" -#: gitk:7065 +#: gitk:7160 msgid "Tags:" msgstr "Taggar:" -#: gitk:7082 gitk:7088 gitk:8500 +#: gitk:7177 gitk:7183 gitk:8593 msgid "Parent" msgstr "Förälder" -#: gitk:7093 +#: gitk:7188 msgid "Child" msgstr "Barn" -#: gitk:7102 +#: gitk:7197 msgid "Branch" msgstr "Gren" -#: gitk:7105 +#: gitk:7200 msgid "Follows" msgstr "Följer" -#: gitk:7108 +#: gitk:7203 msgid "Precedes" msgstr "Föregår" -#: gitk:7653 +#: gitk:7742 #, tcl-format msgid "Error getting diffs: %s" msgstr "Fel vid hämtning av diff: %s" -#: gitk:8328 +#: gitk:8418 msgid "Goto:" msgstr "Gå till:" -#: gitk:8349 +#: gitk:8439 #, tcl-format msgid "Short SHA1 id %s is ambiguous" msgstr "Förkortat SHA1-id %s är tvetydigt" -#: gitk:8356 +#: gitk:8446 #, tcl-format msgid "Revision %s is not known" msgstr "Revisionen %s är inte känd" -#: gitk:8366 +#: gitk:8456 #, tcl-format msgid "SHA1 id %s is not known" msgstr "SHA-id:t %s är inte känt" -#: gitk:8368 +#: gitk:8458 #, tcl-format msgid "Revision %s is not in the current view" msgstr "Revisionen %s finns inte i den nuvarande vyn" -#: gitk:8507 gitk:8522 +#: gitk:8600 gitk:8615 msgid "Date" msgstr "Datum" -#: gitk:8510 +#: gitk:8603 msgid "Children" msgstr "Barn" -#: gitk:8573 +#: gitk:8666 #, tcl-format msgid "Reset %s branch to here" msgstr "Återställ grenen %s hit" -#: gitk:8575 +#: gitk:8668 msgid "Detached head: can't reset" msgstr "Frånkopplad head: kan inte återställa" -#: gitk:8680 gitk:8686 +#: gitk:8773 gitk:8779 msgid "Skipping merge commit " msgstr "Hoppar över sammanslagningsincheckning " -#: gitk:8695 gitk:8700 +#: gitk:8788 gitk:8793 msgid "Error getting patch ID for " msgstr "Fel vid hämtning av patch-id för " -#: gitk:8696 gitk:8701 +#: gitk:8789 gitk:8794 msgid " - stopping\n" msgstr " - stannar\n" -#: gitk:8706 gitk:8709 gitk:8717 gitk:8731 gitk:8740 +#: gitk:8799 gitk:8802 gitk:8810 gitk:8824 gitk:8833 msgid "Commit " msgstr "Incheckning " -#: gitk:8710 +#: gitk:8803 msgid "" " is the same patch as\n" " " @@ -868,7 +880,7 @@ msgstr "" " är samma patch som\n" " " -#: gitk:8718 +#: gitk:8811 msgid "" " differs from\n" " " @@ -876,7 +888,7 @@ msgstr "" " skiljer sig från\n" " " -#: gitk:8720 +#: gitk:8813 msgid "" "Diff of commits:\n" "\n" @@ -884,131 +896,131 @@ msgstr "" "Skillnad mellan incheckningar:\n" "\n" -#: gitk:8732 gitk:8741 +#: gitk:8825 gitk:8834 #, tcl-format msgid " has %s children - stopping\n" msgstr " har %s barn - stannar\n" -#: gitk:8760 +#: gitk:8853 #, tcl-format msgid "Error writing commit to file: %s" msgstr "Fel vid skrivning av incheckning till fil: %s" -#: gitk:8766 +#: gitk:8859 #, tcl-format msgid "Error diffing commits: %s" msgstr "Fel vid jämförelse av incheckningar: %s" -#: gitk:8812 +#: gitk:8905 msgid "Top" msgstr "Topp" -#: gitk:8813 +#: gitk:8906 msgid "From" msgstr "Från" -#: gitk:8818 +#: gitk:8911 msgid "To" msgstr "Till" -#: gitk:8842 +#: gitk:8935 msgid "Generate patch" msgstr "Generera patch" -#: gitk:8844 +#: gitk:8937 msgid "From:" msgstr "Från:" -#: gitk:8853 +#: gitk:8946 msgid "To:" msgstr "Till:" -#: gitk:8862 +#: gitk:8955 msgid "Reverse" msgstr "Vänd" -#: gitk:8864 gitk:9059 +#: gitk:8957 gitk:9153 msgid "Output file:" msgstr "Utdatafil:" -#: gitk:8870 +#: gitk:8963 msgid "Generate" msgstr "Generera" -#: gitk:8908 +#: gitk:9001 msgid "Error creating patch:" msgstr "Fel vid generering av patch:" -#: gitk:8931 gitk:9047 gitk:9104 +#: gitk:9024 gitk:9141 gitk:9198 msgid "ID:" msgstr "Id:" -#: gitk:8940 +#: gitk:9033 msgid "Tag name:" msgstr "Taggnamn:" -#: gitk:8943 +#: gitk:9036 msgid "Tag message is optional" msgstr "Taggmeddelandet är valfritt" -#: gitk:8945 +#: gitk:9038 msgid "Tag message:" msgstr "Taggmeddelande:" -#: gitk:8949 gitk:9113 +#: gitk:9042 gitk:9207 msgid "Create" msgstr "Skapa" -#: gitk:8967 +#: gitk:9060 msgid "No tag name specified" msgstr "Inget taggnamn angavs" -#: gitk:8971 +#: gitk:9064 #, tcl-format msgid "Tag \"%s\" already exists" msgstr "Taggen \"%s\" finns redan" -#: gitk:8981 +#: gitk:9074 msgid "Error creating tag:" msgstr "Fel vid skapande av tagg:" -#: gitk:9056 +#: gitk:9150 msgid "Command:" msgstr "Kommando:" -#: gitk:9064 +#: gitk:9158 msgid "Write" msgstr "Skriv" -#: gitk:9082 +#: gitk:9176 msgid "Error writing commit:" msgstr "Fel vid skrivning av incheckning:" -#: gitk:9109 +#: gitk:9203 msgid "Name:" msgstr "Namn:" -#: gitk:9132 +#: gitk:9226 msgid "Please specify a name for the new branch" msgstr "Ange ett namn för den nya grenen" -#: gitk:9137 +#: gitk:9231 #, tcl-format msgid "Branch '%s' already exists. Overwrite?" msgstr "Grenen \"%s\" finns redan. Skriva över?" -#: gitk:9204 +#: gitk:9298 #, tcl-format msgid "Commit %s is already included in branch %s -- really re-apply it?" msgstr "" "Incheckningen %s finns redan på grenen %s -- skall den verkligen appliceras " "på nytt?" -#: gitk:9209 +#: gitk:9303 msgid "Cherry-picking" msgstr "Plockar" -#: gitk:9218 +#: gitk:9312 #, tcl-format msgid "" "Cherry-pick failed because of local changes to file '%s'.\n" @@ -1018,7 +1030,7 @@ msgstr "" "Checka in, återställ eller spara undan (stash) dina ändringar och försök " "igen." -#: gitk:9224 +#: gitk:9318 msgid "" "Cherry-pick failed because of merge conflict.\n" "Do you wish to run git citool to resolve it?" @@ -1026,32 +1038,59 @@ msgstr "" "Cherry-pick misslyckades på grund av en sammanslagningskonflikt.\n" "Vill du köra git citool för att lösa den?" -#: gitk:9240 +#: gitk:9334 gitk:9392 msgid "No changes committed" msgstr "Inga ändringar incheckade" -#: gitk:9266 +#: gitk:9361 +#, tcl-format +msgid "Commit %s is not included in branch %s -- really revert it?" +msgstr "Incheckningen %s finns inte på grenen %s -- vill du verkligen ångra?" + +#: gitk:9366 +msgid "Reverting" +msgstr "Ångrar" + +#: gitk:9374 +#, tcl-format +msgid "" +"Revert failed because of local changes to the following files:%s Please " +"commit, reset or stash your changes and try again." +msgstr "" +"Misslyckades med att ångra på grund av lokala ändringar i följande filer:%s. " +"Checka in, återställ eller spara undan (stash) dina ändringar och försök " +"igen." + +#: gitk:9378 +msgid "" +"Revert failed because of merge conflict.\n" +" Do you wish to run git citool to resolve it?" +msgstr "" +"Misslyckades med att ångra på grund av en sammanslagningskonflikt.\n" +" Vill du köra git citool för att lösa den?" + +#: gitk:9421 msgid "Confirm reset" msgstr "Bekräfta återställning" -#: gitk:9268 +#: gitk:9423 #, tcl-format msgid "Reset branch %s to %s?" msgstr "Återställa grenen %s till %s?" -#: gitk:9270 +#: gitk:9425 msgid "Reset type:" msgstr "Typ av återställning:" -#: gitk:9273 +#: gitk:9428 msgid "Soft: Leave working tree and index untouched" msgstr "Mjuk: Rör inte utcheckning och index" -#: gitk:9276 +#: gitk:9431 msgid "Mixed: Leave working tree untouched, reset index" msgstr "Blandad: Rör inte utcheckning, återställ index" -#: gitk:9279 +#: gitk:9434 msgid "" "Hard: Reset working tree and index\n" "(discard ALL local changes)" @@ -1059,19 +1098,19 @@ msgstr "" "Hård: Återställ utcheckning och index\n" "(förkastar ALLA lokala ändringar)" -#: gitk:9296 +#: gitk:9451 msgid "Resetting" msgstr "Återställer" -#: gitk:9356 +#: gitk:9511 msgid "Checking out" msgstr "Checkar ut" -#: gitk:9409 +#: gitk:9564 msgid "Cannot delete the currently checked-out branch" msgstr "Kan inte ta bort den just nu utcheckade grenen" -#: gitk:9415 +#: gitk:9570 #, tcl-format msgid "" "The commits on branch %s aren't on any other branch.\n" @@ -1080,16 +1119,16 @@ msgstr "" "Incheckningarna på grenen %s existerar inte på någon annan gren.\n" "Vill du verkligen ta bort grenen %s?" -#: gitk:9446 +#: gitk:9601 #, tcl-format msgid "Tags and heads: %s" msgstr "Taggar och huvuden: %s" -#: gitk:9461 +#: gitk:9616 msgid "Filter" msgstr "Filter" -#: gitk:9757 +#: gitk:9912 msgid "" "Error reading commit topology information; branch and preceding/following " "tag information will be incomplete." @@ -1097,210 +1136,214 @@ msgstr "" "Fel vid läsning av information om incheckningstopologi; information om " "grenar och föregående/senare taggar kommer inte vara komplett." -#: gitk:10744 +#: gitk:10899 msgid "Tag" msgstr "Tagg" -#: gitk:10744 +#: gitk:10899 msgid "Id" msgstr "Id" -#: gitk:10793 +#: gitk:10948 msgid "Gitk font chooser" msgstr "Teckensnittsväljare för Gitk" -#: gitk:10810 +#: gitk:10965 msgid "B" msgstr "F" -#: gitk:10813 +#: gitk:10968 msgid "I" msgstr "K" -#: gitk:10931 +#: gitk:11086 msgid "Commit list display options" msgstr "Alternativ för incheckningslistvy" -#: gitk:10934 +#: gitk:11089 msgid "Maximum graph width (lines)" msgstr "Maximal grafbredd (rader)" -#: gitk:10937 +#: gitk:11092 #, tcl-format msgid "Maximum graph width (% of pane)" msgstr "Maximal grafbredd (% av ruta)" -#: gitk:10940 +#: gitk:11095 msgid "Show local changes" msgstr "Visa lokala ändringar" -#: gitk:10943 +#: gitk:11098 msgid "Auto-select SHA1 (length)" msgstr "Välj SHA1 (längd) automatiskt" -#: gitk:10947 +#: gitk:11102 msgid "Hide remote refs" msgstr "Dölj fjärr-referenser" -#: gitk:10951 +#: gitk:11106 msgid "Diff display options" msgstr "Alternativ för diffvy" -#: gitk:10953 +#: gitk:11108 msgid "Tab spacing" msgstr "Blanksteg för tabulatortecken" -#: gitk:10956 -msgid "Display nearby tags" -msgstr "Visa närliggande taggar" +#: gitk:11111 +msgid "Display nearby tags/heads" +msgstr "Visa närliggande taggar/huvuden" + +#: gitk:11114 +msgid "Maximum # tags/heads to show" +msgstr "Maximalt antal taggar/huvuden att visa" -#: gitk:10959 +#: gitk:11117 msgid "Limit diffs to listed paths" msgstr "Begränsa diff till listade sökvägar" -#: gitk:10962 +#: gitk:11120 msgid "Support per-file encodings" msgstr "Stöd för filspecifika teckenkodningar" -#: gitk:10968 gitk:11115 +#: gitk:11126 gitk:11273 msgid "External diff tool" msgstr "Externt diff-verktyg" -#: gitk:10969 +#: gitk:11127 msgid "Choose..." msgstr "Välj..." -#: gitk:10974 +#: gitk:11132 msgid "General options" msgstr "Allmänna inställningar" -#: gitk:10977 +#: gitk:11135 msgid "Use themed widgets" msgstr "Använd tema på fönsterelement" -#: gitk:10979 +#: gitk:11137 msgid "(change requires restart)" msgstr "(ändringen kräver omstart)" -#: gitk:10981 +#: gitk:11139 msgid "(currently unavailable)" msgstr "(för närvarande inte tillgängligt)" -#: gitk:10992 +#: gitk:11150 msgid "Colors: press to choose" msgstr "Färger: tryck för att välja" -#: gitk:10995 +#: gitk:11153 msgid "Interface" msgstr "Gränssnitt" -#: gitk:10996 +#: gitk:11154 msgid "interface" msgstr "gränssnitt" -#: gitk:10999 +#: gitk:11157 msgid "Background" msgstr "Bakgrund" -#: gitk:11000 gitk:11030 +#: gitk:11158 gitk:11188 msgid "background" msgstr "bakgrund" -#: gitk:11003 +#: gitk:11161 msgid "Foreground" msgstr "Förgrund" -#: gitk:11004 +#: gitk:11162 msgid "foreground" msgstr "förgrund" -#: gitk:11007 +#: gitk:11165 msgid "Diff: old lines" msgstr "Diff: gamla rader" -#: gitk:11008 +#: gitk:11166 msgid "diff old lines" msgstr "diff gamla rader" -#: gitk:11012 +#: gitk:11170 msgid "Diff: new lines" msgstr "Diff: nya rader" -#: gitk:11013 +#: gitk:11171 msgid "diff new lines" msgstr "diff nya rader" -#: gitk:11017 +#: gitk:11175 msgid "Diff: hunk header" msgstr "Diff: delhuvud" -#: gitk:11019 +#: gitk:11177 msgid "diff hunk header" msgstr "diff delhuvud" -#: gitk:11023 +#: gitk:11181 msgid "Marked line bg" msgstr "Markerad rad bakgrund" -#: gitk:11025 +#: gitk:11183 msgid "marked line background" msgstr "markerad rad bakgrund" -#: gitk:11029 +#: gitk:11187 msgid "Select bg" msgstr "Markerad bakgrund" -#: gitk:11038 +#: gitk:11196 msgid "Fonts: press to choose" msgstr "Teckensnitt: tryck för att välja" -#: gitk:11040 +#: gitk:11198 msgid "Main font" msgstr "Huvudteckensnitt" -#: gitk:11041 +#: gitk:11199 msgid "Diff display font" msgstr "Teckensnitt för diffvisning" -#: gitk:11042 +#: gitk:11200 msgid "User interface font" msgstr "Teckensnitt för användargränssnitt" -#: gitk:11064 +#: gitk:11222 msgid "Gitk preferences" msgstr "Inställningar för Gitk" -#: gitk:11073 +#: gitk:11231 msgid "General" msgstr "Allmänt" -#: gitk:11074 +#: gitk:11232 msgid "Colors" msgstr "Färger" -#: gitk:11075 +#: gitk:11233 msgid "Fonts" msgstr "Teckensnitt" -#: gitk:11125 +#: gitk:11283 #, tcl-format msgid "Gitk: choose color for %s" msgstr "Gitk: välj färg för %s" -#: gitk:11745 +#: gitk:11937 msgid "Cannot find a git repository here." msgstr "Hittar inget git-arkiv här." -#: gitk:11792 +#: gitk:11984 #, tcl-format msgid "Ambiguous argument '%s': both revision and filename" msgstr "Tvetydigt argument \"%s\": både revision och filnamn" -#: gitk:11804 +#: gitk:11996 msgid "Bad arguments to gitk:" msgstr "Felaktiga argument till gitk:" -#: gitk:11907 +#: gitk:12099 msgid "Command line" msgstr "Kommandorad" @@ -7,6 +7,7 @@ #include "string-list.h" #include "column.h" #include "version.h" +#include "refs.h" void add_cmdname(struct cmdnames *cmds, const char *name, int len) { @@ -404,3 +405,52 @@ int cmd_version(int argc, const char **argv, const char *prefix) printf("git version %s\n", git_version_string); return 0; } + +struct similar_ref_cb { + const char *base_ref; + struct string_list *similar_refs; +}; + +static int append_similar_ref(const char *refname, const unsigned char *sha1, + int flags, void *cb_data) +{ + struct similar_ref_cb *cb = (struct similar_ref_cb *)(cb_data); + char *branch = strrchr(refname, '/') + 1; + /* A remote branch of the same name is deemed similar */ + if (!prefixcmp(refname, "refs/remotes/") && + !strcmp(branch, cb->base_ref)) + string_list_append(cb->similar_refs, + refname + strlen("refs/remotes/")); + return 0; +} + +static struct string_list guess_refs(const char *ref) +{ + struct similar_ref_cb ref_cb; + struct string_list similar_refs = STRING_LIST_INIT_NODUP; + + ref_cb.base_ref = ref; + ref_cb.similar_refs = &similar_refs; + for_each_ref(append_similar_ref, &ref_cb); + return similar_refs; +} + +void help_unknown_ref(const char *ref, const char *cmd, const char *error) +{ + int i; + struct string_list suggested_refs = guess_refs(ref); + + fprintf_ln(stderr, _("%s: %s - %s"), cmd, ref, error); + + if (suggested_refs.nr > 0) { + fprintf_ln(stderr, + Q_("\nDid you mean this?", + "\nDid you mean one of these?", + suggested_refs.nr)); + for (i = 0; i < suggested_refs.nr; i++) + fprintf(stderr, "\t%s\n", suggested_refs.items[i].string); + } + + string_list_clear(&suggested_refs, 0); + exit(1); +} @@ -27,4 +27,9 @@ extern void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes); extern int is_in_cmdlist(struct cmdnames *cmds, const char *name); extern void list_commands(unsigned int colopts, struct cmdnames *main_cmds, struct cmdnames *other_cmds); +/* + * call this to die(), when it is suspected that the user mistyped a + * ref to the command, to give suggested "correct" refs. + */ +extern void help_unknown_ref(const char *ref, const char *cmd, const char *error); #endif /* HELP_H */ diff --git a/imap-send.c b/imap-send.c index d9bcfb44dc..d6b65e204c 100644 --- a/imap-send.c +++ b/imap-send.c @@ -29,8 +29,18 @@ #ifdef NO_OPENSSL typedef void *SSL; #else +#ifdef APPLE_COMMON_CRYPTO +#include <CommonCrypto/CommonHMAC.h> +#define HMAC_CTX CCHmacContext +#define HMAC_Init(hmac, key, len, algo) CCHmacInit(hmac, algo, key, len) +#define HMAC_Update CCHmacUpdate +#define HMAC_Final(hmac, hash, ptr) CCHmacFinal(hmac, hash) +#define HMAC_CTX_cleanup(ignore) +#define EVP_md5() kCCHmacAlgMD5 +#else #include <openssl/evp.h> #include <openssl/hmac.h> +#endif #include <openssl/x509v3.h> #endif diff --git a/line-log.c b/line-log.c new file mode 100644 index 0000000000..4bbb09be59 --- /dev/null +++ b/line-log.c @@ -0,0 +1,1273 @@ +#include "git-compat-util.h" +#include "line-range.h" +#include "cache.h" +#include "tag.h" +#include "blob.h" +#include "tree.h" +#include "diff.h" +#include "commit.h" +#include "decorate.h" +#include "revision.h" +#include "xdiff-interface.h" +#include "strbuf.h" +#include "log-tree.h" +#include "graph.h" +#include "userdiff.h" +#include "line-log.h" + +static void range_set_grow(struct range_set *rs, size_t extra) +{ + ALLOC_GROW(rs->ranges, rs->nr + extra, rs->alloc); +} + +/* Either initialization would be fine */ +#define RANGE_SET_INIT {0} + +static void range_set_init(struct range_set *rs, size_t prealloc) +{ + rs->alloc = rs->nr = 0; + rs->ranges = NULL; + if (prealloc) + range_set_grow(rs, prealloc); +} + +static void range_set_release(struct range_set *rs) +{ + free(rs->ranges); + rs->alloc = rs->nr = 0; + rs->ranges = NULL; +} + +/* dst must be uninitialized! */ +static void range_set_copy(struct range_set *dst, struct range_set *src) +{ + range_set_init(dst, src->nr); + memcpy(dst->ranges, src->ranges, src->nr*sizeof(struct range_set)); + dst->nr = src->nr; +} +static void range_set_move(struct range_set *dst, struct range_set *src) +{ + range_set_release(dst); + dst->ranges = src->ranges; + dst->nr = src->nr; + dst->alloc = src->alloc; + src->ranges = NULL; + src->alloc = src->nr = 0; +} + +/* tack on a _new_ range _at the end_ */ +static void range_set_append_unsafe(struct range_set *rs, long a, long b) +{ + assert(a <= b); + range_set_grow(rs, 1); + rs->ranges[rs->nr].start = a; + rs->ranges[rs->nr].end = b; + rs->nr++; +} + +static void range_set_append(struct range_set *rs, long a, long b) +{ + assert(rs->nr == 0 || rs->ranges[rs->nr-1].end <= a); + range_set_append_unsafe(rs, a, b); +} + +static int range_cmp(const void *_r, const void *_s) +{ + const struct range *r = _r; + const struct range *s = _s; + + /* this could be simply 'return r.start-s.start', but for the types */ + if (r->start == s->start) + return 0; + if (r->start < s->start) + return -1; + return 1; +} + +/* + * Check that the ranges are non-empty, sorted and non-overlapping + */ +static void range_set_check_invariants(struct range_set *rs) +{ + int i; + + if (!rs) + return; + + if (rs->nr) + assert(rs->ranges[0].start < rs->ranges[0].end); + + for (i = 1; i < rs->nr; i++) { + assert(rs->ranges[i-1].end < rs->ranges[i].start); + assert(rs->ranges[i].start < rs->ranges[i].end); + } +} + +/* + * In-place pass of sorting and merging the ranges in the range set, + * to establish the invariants when we get the ranges from the user + */ +static void sort_and_merge_range_set(struct range_set *rs) +{ + int i; + int o = 1; /* output cursor */ + + qsort(rs->ranges, rs->nr, sizeof(struct range), range_cmp); + + for (i = 1; i < rs->nr; i++) { + if (rs->ranges[i].start <= rs->ranges[o-1].end) { + rs->ranges[o-1].end = rs->ranges[i].end; + } else { + rs->ranges[o].start = rs->ranges[i].start; + rs->ranges[o].end = rs->ranges[i].end; + o++; + } + } + assert(o <= rs->nr); + rs->nr = o; + + range_set_check_invariants(rs); +} + +/* + * Union of range sets (i.e., sets of line numbers). Used to merge + * them when searches meet at a common ancestor. + * + * This is also where the ranges are consolidated into canonical form: + * overlapping and adjacent ranges are merged, and empty ranges are + * removed. + */ +static void range_set_union(struct range_set *out, + struct range_set *a, struct range_set *b) +{ + int i = 0, j = 0, o = 0; + struct range *ra = a->ranges; + struct range *rb = b->ranges; + /* cannot make an alias of out->ranges: it may change during grow */ + + assert(out->nr == 0); + while (i < a->nr || j < b->nr) { + struct range *new; + if (i < a->nr && j < b->nr) { + if (ra[i].start < rb[j].start) + new = &ra[i++]; + else if (ra[i].start > rb[j].start) + new = &rb[j++]; + else if (ra[i].end < rb[j].end) + new = &ra[i++]; + else + new = &rb[j++]; + } else if (i < a->nr) /* b exhausted */ + new = &ra[i++]; + else /* a exhausted */ + new = &rb[j++]; + if (new->start == new->end) + ; /* empty range */ + else if (!o || out->ranges[o-1].end < new->start) { + range_set_grow(out, 1); + out->ranges[o].start = new->start; + out->ranges[o].end = new->end; + o++; + } else if (out->ranges[o-1].end < new->end) { + out->ranges[o-1].end = new->end; + } + } + out->nr = o; +} + +/* + * Difference of range sets (out = a \ b). Pass the "interesting" + * ranges as 'a' and the target side of the diff as 'b': it removes + * the ranges for which the commit is responsible. + */ +static void range_set_difference(struct range_set *out, + struct range_set *a, struct range_set *b) +{ + int i, j = 0; + for (i = 0; i < a->nr; i++) { + long start = a->ranges[i].start; + long end = a->ranges[i].end; + while (start < end) { + while (j < b->nr && start >= b->ranges[j].end) + /* + * a: |------- + * b: ------| + */ + j++; + if (j >= b->nr || end < b->ranges[j].start) { + /* + * b exhausted, or + * a: ----| + * b: |---- + */ + range_set_append(out, start, end); + break; + } + if (start >= b->ranges[j].start) { + /* + * a: |--???? + * b: |------| + */ + start = b->ranges[j].end; + } else if (end > b->ranges[j].start) { + /* + * a: |-----| + * b: |--????? + */ + if (start < b->ranges[j].start) + range_set_append(out, start, b->ranges[j].start); + start = b->ranges[j].end; + } + } + } +} + +static void diff_ranges_init(struct diff_ranges *diff) +{ + range_set_init(&diff->parent, 0); + range_set_init(&diff->target, 0); +} + +static void diff_ranges_release(struct diff_ranges *diff) +{ + range_set_release(&diff->parent); + range_set_release(&diff->target); +} + +void line_log_data_init(struct line_log_data *r) +{ + memset(r, 0, sizeof(struct line_log_data)); + range_set_init(&r->ranges, 0); +} + +static void line_log_data_clear(struct line_log_data *r) +{ + range_set_release(&r->ranges); + if (r->pair) + diff_free_filepair(r->pair); +} + +static void free_line_log_data(struct line_log_data *r) +{ + while (r) { + struct line_log_data *next = r->next; + line_log_data_clear(r); + free(r); + r = next; + } +} + +static struct line_log_data * +search_line_log_data(struct line_log_data *list, const char *path, + struct line_log_data **insertion_point) +{ + struct line_log_data *p = list; + if (insertion_point) + *insertion_point = NULL; + while (p) { + int cmp = strcmp(p->path, path); + if (!cmp) + return p; + if (insertion_point && cmp < 0) + *insertion_point = p; + p = p->next; + } + return NULL; +} + +/* + * Note: takes ownership of 'path', which happens to be what the only + * caller needs. + */ +static void line_log_data_insert(struct line_log_data **list, + char *path, + long begin, long end) +{ + struct line_log_data *ip; + struct line_log_data *p = search_line_log_data(*list, path, &ip); + + if (p) { + range_set_append_unsafe(&p->ranges, begin, end); + sort_and_merge_range_set(&p->ranges); + free(path); + return; + } + + p = xcalloc(1, sizeof(struct line_log_data)); + p->path = path; + range_set_append(&p->ranges, begin, end); + if (ip) { + p->next = ip->next; + ip->next = p; + } else { + p->next = *list; + *list = p; + } +} + +struct collect_diff_cbdata { + struct diff_ranges *diff; +}; + +static int collect_diff_cb(long start_a, long count_a, + long start_b, long count_b, + void *data) +{ + struct collect_diff_cbdata *d = data; + + if (count_a >= 0) + range_set_append(&d->diff->parent, start_a, start_a + count_a); + if (count_b >= 0) + range_set_append(&d->diff->target, start_b, start_b + count_b); + + return 0; +} + +static void collect_diff(mmfile_t *parent, mmfile_t *target, struct diff_ranges *out) +{ + struct collect_diff_cbdata cbdata = {NULL}; + xpparam_t xpp; + xdemitconf_t xecfg; + xdemitcb_t ecb; + + memset(&xpp, 0, sizeof(xpp)); + memset(&xecfg, 0, sizeof(xecfg)); + xecfg.ctxlen = xecfg.interhunkctxlen = 0; + + cbdata.diff = out; + xecfg.hunk_func = collect_diff_cb; + memset(&ecb, 0, sizeof(ecb)); + ecb.priv = &cbdata; + xdi_diff(parent, target, &xpp, &xecfg, &ecb); +} + +/* + * These are handy for debugging. Removing them with #if 0 silences + * the "unused function" warning. + */ +#if 0 +static void dump_range_set(struct range_set *rs, const char *desc) +{ + int i; + printf("range set %s (%d items):\n", desc, rs->nr); + for (i = 0; i < rs->nr; i++) + printf("\t[%ld,%ld]\n", rs->ranges[i].start, rs->ranges[i].end); +} + +static void dump_line_log_data(struct line_log_data *r) +{ + char buf[4096]; + while (r) { + snprintf(buf, 4096, "file %s\n", r->path); + dump_range_set(&r->ranges, buf); + r = r->next; + } +} + +static void dump_diff_ranges(struct diff_ranges *diff, const char *desc) +{ + int i; + assert(diff->parent.nr == diff->target.nr); + printf("diff ranges %s (%d items):\n", desc, diff->parent.nr); + printf("\tparent\ttarget\n"); + for (i = 0; i < diff->parent.nr; i++) { + printf("\t[%ld,%ld]\t[%ld,%ld]\n", + diff->parent.ranges[i].start, + diff->parent.ranges[i].end, + diff->target.ranges[i].start, + diff->target.ranges[i].end); + } +} +#endif + + +static int ranges_overlap(struct range *a, struct range *b) +{ + return !(a->end <= b->start || b->end <= a->start); +} + +/* + * Given a diff and the set of interesting ranges, determine all hunks + * of the diff which touch (overlap) at least one of the interesting + * ranges in the target. + */ +static void diff_ranges_filter_touched(struct diff_ranges *out, + struct diff_ranges *diff, + struct range_set *rs) +{ + int i, j = 0; + + assert(out->target.nr == 0); + + for (i = 0; i < diff->target.nr; i++) { + while (diff->target.ranges[i].start > rs->ranges[j].end) { + j++; + if (j == rs->nr) + return; + } + if (ranges_overlap(&diff->target.ranges[i], &rs->ranges[j])) { + range_set_append(&out->parent, + diff->parent.ranges[i].start, + diff->parent.ranges[i].end); + range_set_append(&out->target, + diff->target.ranges[i].start, + diff->target.ranges[i].end); + } + } +} + +/* + * Adjust the line counts in 'rs' to account for the lines + * added/removed in the diff. + */ +static void range_set_shift_diff(struct range_set *out, + struct range_set *rs, + struct diff_ranges *diff) +{ + int i, j = 0; + long offset = 0; + struct range *src = rs->ranges; + struct range *target = diff->target.ranges; + struct range *parent = diff->parent.ranges; + + for (i = 0; i < rs->nr; i++) { + while (j < diff->target.nr && src[i].start >= target[j].start) { + offset += (parent[j].end-parent[j].start) + - (target[j].end-target[j].start); + j++; + } + range_set_append(out, src[i].start+offset, src[i].end+offset); + } +} + +/* + * Given a diff and the set of interesting ranges, map the ranges + * across the diff. That is: observe that the target commit takes + * blame for all the + (target-side) ranges. So for every pair of + * ranges in the diff that was touched, we remove the latter and add + * its parent side. + */ +static void range_set_map_across_diff(struct range_set *out, + struct range_set *rs, + struct diff_ranges *diff, + struct diff_ranges **touched_out) +{ + struct diff_ranges *touched = xmalloc(sizeof(*touched)); + struct range_set tmp1 = RANGE_SET_INIT; + struct range_set tmp2 = RANGE_SET_INIT; + + diff_ranges_init(touched); + diff_ranges_filter_touched(touched, diff, rs); + range_set_difference(&tmp1, rs, &touched->target); + range_set_shift_diff(&tmp2, &tmp1, diff); + range_set_union(out, &tmp2, &touched->parent); + range_set_release(&tmp1); + range_set_release(&tmp2); + + *touched_out = touched; +} + +static struct commit *check_single_commit(struct rev_info *revs) +{ + struct object *commit = NULL; + int found = -1; + int i; + + for (i = 0; i < revs->pending.nr; i++) { + struct object *obj = revs->pending.objects[i].item; + if (obj->flags & UNINTERESTING) + continue; + while (obj->type == OBJ_TAG) + obj = deref_tag(obj, NULL, 0); + if (obj->type != OBJ_COMMIT) + die("Non commit %s?", revs->pending.objects[i].name); + if (commit) + die("More than one commit to dig from: %s and %s?", + revs->pending.objects[i].name, + revs->pending.objects[found].name); + commit = obj; + found = i; + } + + if (!commit) + die("No commit specified?"); + + return (struct commit *) commit; +} + +static void fill_blob_sha1(struct commit *commit, struct diff_filespec *spec) +{ + unsigned mode; + unsigned char sha1[20]; + + if (get_tree_entry(commit->object.sha1, spec->path, + sha1, &mode)) + die("There is no path %s in the commit", spec->path); + fill_filespec(spec, sha1, 1, mode); + + return; +} + +static void fill_line_ends(struct diff_filespec *spec, long *lines, + unsigned long **line_ends) +{ + int num = 0, size = 50; + long cur = 0; + unsigned long *ends = NULL; + char *data = NULL; + + if (diff_populate_filespec(spec, 0)) + die("Cannot read blob %s", sha1_to_hex(spec->sha1)); + + ends = xmalloc(size * sizeof(*ends)); + ends[cur++] = 0; + data = spec->data; + while (num < spec->size) { + if (data[num] == '\n' || num == spec->size - 1) { + ALLOC_GROW(ends, (cur + 1), size); + ends[cur++] = num; + } + num++; + } + + /* shrink the array to fit the elements */ + ends = xrealloc(ends, cur * sizeof(*ends)); + *lines = cur-1; + *line_ends = ends; +} + +struct nth_line_cb { + struct diff_filespec *spec; + long lines; + unsigned long *line_ends; +}; + +static const char *nth_line(void *data, long line) +{ + struct nth_line_cb *d = data; + assert(d && line <= d->lines); + assert(d->spec && d->spec->data); + + if (line == 0) + return (char *)d->spec->data; + else + return (char *)d->spec->data + d->line_ends[line] + 1; +} + +static struct line_log_data * +parse_lines(struct commit *commit, const char *prefix, struct string_list *args) +{ + long lines = 0; + unsigned long *ends = NULL; + struct nth_line_cb cb_data; + struct string_list_item *item; + struct line_log_data *ranges = NULL; + + for_each_string_list_item(item, args) { + const char *name_part, *range_part; + char *full_name; + struct diff_filespec *spec; + long begin = 0, end = 0; + + name_part = skip_range_arg(item->string); + if (!name_part || *name_part != ':' || !name_part[1]) + die("-L argument '%s' not of the form start,end:file", + item->string); + range_part = xstrndup(item->string, name_part - item->string); + name_part++; + + full_name = prefix_path(prefix, prefix ? strlen(prefix) : 0, + name_part); + + spec = alloc_filespec(full_name); + fill_blob_sha1(commit, spec); + fill_line_ends(spec, &lines, &ends); + cb_data.spec = spec; + cb_data.lines = lines; + cb_data.line_ends = ends; + + if (parse_range_arg(range_part, nth_line, &cb_data, + lines, &begin, &end, + full_name)) + die("malformed -L argument '%s'", range_part); + if (begin < 1) + begin = 1; + if (end < 1) + end = lines; + begin--; + if (lines < end || lines < begin) + die("file %s has only %ld lines", name_part, lines); + line_log_data_insert(&ranges, full_name, begin, end); + + free_filespec(spec); + free(ends); + ends = NULL; + } + + return ranges; +} + +static struct line_log_data *line_log_data_copy_one(struct line_log_data *r) +{ + struct line_log_data *ret = xmalloc(sizeof(*ret)); + + assert(r); + line_log_data_init(ret); + range_set_copy(&ret->ranges, &r->ranges); + + ret->path = xstrdup(r->path); + + return ret; +} + +static struct line_log_data * +line_log_data_copy(struct line_log_data *r) +{ + struct line_log_data *ret = NULL; + struct line_log_data *tmp = NULL, *prev = NULL; + + assert(r); + ret = tmp = prev = line_log_data_copy_one(r); + r = r->next; + while (r) { + tmp = line_log_data_copy_one(r); + prev->next = tmp; + prev = tmp; + r = r->next; + } + + return ret; +} + +/* merge two range sets across files */ +static struct line_log_data *line_log_data_merge(struct line_log_data *a, + struct line_log_data *b) +{ + struct line_log_data *head = NULL, **pp = &head; + + while (a || b) { + struct line_log_data *src; + struct line_log_data *src2 = NULL; + struct line_log_data *d; + int cmp; + if (!a) + cmp = 1; + else if (!b) + cmp = -1; + else + cmp = strcmp(a->path, b->path); + if (cmp < 0) { + src = a; + a = a->next; + } else if (cmp == 0) { + src = a; + a = a->next; + src2 = b; + b = b->next; + } else { + src = b; + b = b->next; + } + d = xmalloc(sizeof(struct line_log_data)); + line_log_data_init(d); + d->path = xstrdup(src->path); + *pp = d; + pp = &d->next; + if (src2) + range_set_union(&d->ranges, &src->ranges, &src2->ranges); + else + range_set_copy(&d->ranges, &src->ranges); + } + + return head; +} + +static void add_line_range(struct rev_info *revs, struct commit *commit, + struct line_log_data *range) +{ + struct line_log_data *old = NULL; + struct line_log_data *new = NULL; + + old = lookup_decoration(&revs->line_log_data, &commit->object); + if (old && range) { + new = line_log_data_merge(old, range); + free_line_log_data(old); + } else if (range) + new = line_log_data_copy(range); + + if (new) + add_decoration(&revs->line_log_data, &commit->object, new); +} + +static void clear_commit_line_range(struct rev_info *revs, struct commit *commit) +{ + struct line_log_data *r; + r = lookup_decoration(&revs->line_log_data, &commit->object); + if (!r) + return; + free_line_log_data(r); + add_decoration(&revs->line_log_data, &commit->object, NULL); +} + +static struct line_log_data *lookup_line_range(struct rev_info *revs, + struct commit *commit) +{ + struct line_log_data *ret = NULL; + struct line_log_data *d; + + ret = lookup_decoration(&revs->line_log_data, &commit->object); + + for (d = ret; d; d = d->next) + range_set_check_invariants(&d->ranges); + + return ret; +} + +void line_log_init(struct rev_info *rev, const char *prefix, struct string_list *args) +{ + struct commit *commit = NULL; + struct line_log_data *range; + + commit = check_single_commit(rev); + range = parse_lines(commit, prefix, args); + add_line_range(rev, commit, range); + + if (!rev->diffopt.detect_rename) { + int i, count = 0; + struct line_log_data *r = range; + const char **paths; + while (r) { + count++; + r = r->next; + } + paths = xmalloc((count+1)*sizeof(char *)); + r = range; + for (i = 0; i < count; i++) { + paths[i] = xstrdup(r->path); + r = r->next; + } + paths[count] = NULL; + init_pathspec(&rev->diffopt.pathspec, paths); + free(paths); + } +} + +static void load_tree_desc(struct tree_desc *desc, void **tree, + const unsigned char *sha1) +{ + unsigned long size; + *tree = read_object_with_reference(sha1, tree_type, &size, NULL); + if (!*tree) + die("Unable to read tree (%s)", sha1_to_hex(sha1)); + init_tree_desc(desc, *tree, size); +} + +static int count_parents(struct commit *commit) +{ + struct commit_list *parents = commit->parents; + int count = 0; + while (parents) { + count++; + parents = parents->next; + } + return count; +} + +static void move_diff_queue(struct diff_queue_struct *dst, + struct diff_queue_struct *src) +{ + assert(src != dst); + memcpy(dst, src, sizeof(struct diff_queue_struct)); + DIFF_QUEUE_CLEAR(src); +} + +static void filter_diffs_for_paths(struct line_log_data *range, int keep_deletions) +{ + int i; + struct diff_queue_struct outq; + DIFF_QUEUE_CLEAR(&outq); + + for (i = 0; i < diff_queued_diff.nr; i++) { + struct diff_filepair *p = diff_queued_diff.queue[i]; + struct line_log_data *rg = NULL; + + if (!DIFF_FILE_VALID(p->two)) { + if (keep_deletions) + diff_q(&outq, p); + else + diff_free_filepair(p); + continue; + } + for (rg = range; rg; rg = rg->next) { + if (!strcmp(rg->path, p->two->path)) + break; + } + if (rg) + diff_q(&outq, p); + else + diff_free_filepair(p); + } + free(diff_queued_diff.queue); + diff_queued_diff = outq; +} + +static inline int diff_might_be_rename(void) +{ + int i; + for (i = 0; i < diff_queued_diff.nr; i++) + if (!DIFF_FILE_VALID(diff_queued_diff.queue[i]->one)) { + /* fprintf(stderr, "diff_might_be_rename found creation of: %s\n", */ + /* diff_queued_diff.queue[i]->two->path); */ + return 1; + } + return 0; +} + +static void queue_diffs(struct line_log_data *range, + struct diff_options *opt, + struct diff_queue_struct *queue, + struct commit *commit, struct commit *parent) +{ + void *tree1 = NULL, *tree2 = NULL; + struct tree_desc desc1, desc2; + + assert(commit); + load_tree_desc(&desc2, &tree2, commit->tree->object.sha1); + if (parent) + load_tree_desc(&desc1, &tree1, parent->tree->object.sha1); + else + init_tree_desc(&desc1, "", 0); + + DIFF_QUEUE_CLEAR(&diff_queued_diff); + diff_tree(&desc1, &desc2, "", opt); + if (opt->detect_rename) { + filter_diffs_for_paths(range, 1); + if (diff_might_be_rename()) + diffcore_std(opt); + filter_diffs_for_paths(range, 0); + } + move_diff_queue(queue, &diff_queued_diff); + + if (tree1) + free(tree1); + if (tree2) + free(tree2); +} + +static char *get_nth_line(long line, unsigned long *ends, void *data) +{ + if (line == 0) + return (char *)data; + else + return (char *)data + ends[line] + 1; +} + +static void print_line(const char *prefix, char first, + long line, unsigned long *ends, void *data, + const char *color, const char *reset) +{ + char *begin = get_nth_line(line, ends, data); + char *end = get_nth_line(line+1, ends, data); + int had_nl = 0; + + if (end > begin && end[-1] == '\n') { + end--; + had_nl = 1; + } + + fputs(prefix, stdout); + fputs(color, stdout); + putchar(first); + fwrite(begin, 1, end-begin, stdout); + fputs(reset, stdout); + putchar('\n'); + if (!had_nl) + fputs("\\ No newline at end of file\n", stdout); +} + +static char *output_prefix(struct diff_options *opt) +{ + char *prefix = ""; + + if (opt->output_prefix) { + struct strbuf *sb = opt->output_prefix(opt, opt->output_prefix_data); + prefix = sb->buf; + } + + return prefix; +} + +static void dump_diff_hacky_one(struct rev_info *rev, struct line_log_data *range) +{ + int i, j = 0; + long p_lines, t_lines; + unsigned long *p_ends = NULL, *t_ends = NULL; + struct diff_filepair *pair = range->pair; + struct diff_ranges *diff = &range->diff; + + struct diff_options *opt = &rev->diffopt; + char *prefix = output_prefix(opt); + const char *c_reset = diff_get_color(opt->use_color, DIFF_RESET); + const char *c_frag = diff_get_color(opt->use_color, DIFF_FRAGINFO); + const char *c_meta = diff_get_color(opt->use_color, DIFF_METAINFO); + const char *c_old = diff_get_color(opt->use_color, DIFF_FILE_OLD); + const char *c_new = diff_get_color(opt->use_color, DIFF_FILE_NEW); + const char *c_plain = diff_get_color(opt->use_color, DIFF_PLAIN); + + if (!pair || !diff) + return; + + if (pair->one->sha1_valid) + fill_line_ends(pair->one, &p_lines, &p_ends); + fill_line_ends(pair->two, &t_lines, &t_ends); + + printf("%s%sdiff --git a/%s b/%s%s\n", prefix, c_meta, pair->one->path, pair->two->path, c_reset); + printf("%s%s--- %s%s%s\n", prefix, c_meta, + pair->one->sha1_valid ? "a/" : "", + pair->one->sha1_valid ? pair->one->path : "/dev/null", + c_reset); + printf("%s%s+++ b/%s%s\n", prefix, c_meta, pair->two->path, c_reset); + for (i = 0; i < range->ranges.nr; i++) { + long p_start, p_end; + long t_start = range->ranges.ranges[i].start; + long t_end = range->ranges.ranges[i].end; + long t_cur = t_start; + int j_last; + + while (j < diff->target.nr && diff->target.ranges[j].end < t_start) + j++; + if (j == diff->target.nr || diff->target.ranges[j].start > t_end) + continue; + + /* Scan ahead to determine the last diff that falls in this range */ + j_last = j; + while (j_last < diff->target.nr && diff->target.ranges[j_last].start < t_end) + j_last++; + if (j_last > j) + j_last--; + + /* + * Compute parent hunk headers: we know that the diff + * has the correct line numbers (but not all hunks). + * So it suffices to shift the start/end according to + * the line numbers of the first/last hunk(s) that + * fall in this range. + */ + if (t_start < diff->target.ranges[j].start) + p_start = diff->parent.ranges[j].start - (diff->target.ranges[j].start-t_start); + else + p_start = diff->parent.ranges[j].start; + if (t_end > diff->target.ranges[j_last].end) + p_end = diff->parent.ranges[j_last].end + (t_end-diff->target.ranges[j_last].end); + else + p_end = diff->parent.ranges[j_last].end; + + if (!p_start && !p_end) { + p_start = -1; + p_end = -1; + } + + /* Now output a diff hunk for this range */ + printf("%s%s@@ -%ld,%ld +%ld,%ld @@%s\n", + prefix, c_frag, + p_start+1, p_end-p_start, t_start+1, t_end-t_start, + c_reset); + while (j < diff->target.nr && diff->target.ranges[j].start < t_end) { + int k; + for (; t_cur < diff->target.ranges[j].start; t_cur++) + print_line(prefix, ' ', t_cur, t_ends, pair->two->data, + c_plain, c_reset); + for (k = diff->parent.ranges[j].start; k < diff->parent.ranges[j].end; k++) + print_line(prefix, '-', k, p_ends, pair->one->data, + c_old, c_reset); + for (; t_cur < diff->target.ranges[j].end && t_cur < t_end; t_cur++) + print_line(prefix, '+', t_cur, t_ends, pair->two->data, + c_new, c_reset); + j++; + } + for (; t_cur < t_end; t_cur++) + print_line(prefix, ' ', t_cur, t_ends, pair->two->data, + c_plain, c_reset); + } + + free(p_ends); + free(t_ends); +} + +/* + * NEEDSWORK: manually building a diff here is not the Right + * Thing(tm). log -L should be built into the diff pipeline. + */ +static void dump_diff_hacky(struct rev_info *rev, struct line_log_data *range) +{ + puts(output_prefix(&rev->diffopt)); + while (range) { + dump_diff_hacky_one(rev, range); + range = range->next; + } +} + +/* + * Unlike most other functions, this destructively operates on + * 'range'. + */ +static int process_diff_filepair(struct rev_info *rev, + struct diff_filepair *pair, + struct line_log_data *range, + struct diff_ranges **diff_out) +{ + struct line_log_data *rg = range; + struct range_set tmp; + struct diff_ranges diff; + mmfile_t file_parent, file_target; + + assert(pair->two->path); + while (rg) { + assert(rg->path); + if (!strcmp(rg->path, pair->two->path)) + break; + rg = rg->next; + } + + if (!rg) + return 0; + if (rg->ranges.nr == 0) + return 0; + + assert(pair->two->sha1_valid); + diff_populate_filespec(pair->two, 0); + file_target.ptr = pair->two->data; + file_target.size = pair->two->size; + + if (pair->one->sha1_valid) { + diff_populate_filespec(pair->one, 0); + file_parent.ptr = pair->one->data; + file_parent.size = pair->one->size; + } else { + file_parent.ptr = ""; + file_parent.size = 0; + } + + diff_ranges_init(&diff); + collect_diff(&file_parent, &file_target, &diff); + + /* NEEDSWORK should apply some heuristics to prevent mismatches */ + free(rg->path); + rg->path = xstrdup(pair->one->path); + + range_set_init(&tmp, 0); + range_set_map_across_diff(&tmp, &rg->ranges, &diff, diff_out); + range_set_release(&rg->ranges); + range_set_move(&rg->ranges, &tmp); + + diff_ranges_release(&diff); + + return ((*diff_out)->parent.nr > 0); +} + +static struct diff_filepair *diff_filepair_dup(struct diff_filepair *pair) +{ + struct diff_filepair *new = xmalloc(sizeof(struct diff_filepair)); + new->one = pair->one; + new->two = pair->two; + new->one->count++; + new->two->count++; + return new; +} + +static void free_diffqueues(int n, struct diff_queue_struct *dq) +{ + int i, j; + for (i = 0; i < n; i++) + for (j = 0; j < dq[i].nr; j++) + diff_free_filepair(dq[i].queue[j]); + free(dq); +} + +static int process_all_files(struct line_log_data **range_out, + struct rev_info *rev, + struct diff_queue_struct *queue, + struct line_log_data *range) +{ + int i, changed = 0; + + *range_out = line_log_data_copy(range); + + for (i = 0; i < queue->nr; i++) { + struct diff_ranges *pairdiff = NULL; + struct diff_filepair *pair = queue->queue[i]; + if (process_diff_filepair(rev, pair, *range_out, &pairdiff)) { + /* + * Store away the diff for later output. We + * tuck it in the ranges we got as _input_, + * since that's the commit that caused the + * diff. + * + * NEEDSWORK not enough when we get around to + * doing something interesting with merges; + * currently each invocation on a merge parent + * trashes the previous one's diff. + * + * NEEDSWORK tramples over data structures not owned here + */ + struct line_log_data *rg = range; + changed++; + while (rg && strcmp(rg->path, pair->two->path)) + rg = rg->next; + assert(rg); + rg->pair = diff_filepair_dup(queue->queue[i]); + memcpy(&rg->diff, pairdiff, sizeof(struct diff_ranges)); + } + } + + return changed; +} + +int line_log_print(struct rev_info *rev, struct commit *commit) +{ + struct line_log_data *range = lookup_line_range(rev, commit); + + show_log(rev); + dump_diff_hacky(rev, range); + return 1; +} + +static int process_ranges_ordinary_commit(struct rev_info *rev, struct commit *commit, + struct line_log_data *range) +{ + struct commit *parent = NULL; + struct diff_queue_struct queue; + struct line_log_data *parent_range; + int changed; + + if (commit->parents) + parent = commit->parents->item; + + queue_diffs(range, &rev->diffopt, &queue, commit, parent); + changed = process_all_files(&parent_range, rev, &queue, range); + if (parent) + add_line_range(rev, parent, parent_range); + return changed; +} + +static int process_ranges_merge_commit(struct rev_info *rev, struct commit *commit, + struct line_log_data *range) +{ + struct diff_queue_struct *diffqueues; + struct line_log_data **cand; + struct commit **parents; + struct commit_list *p; + int i; + int nparents = count_parents(commit); + + diffqueues = xmalloc(nparents * sizeof(*diffqueues)); + cand = xmalloc(nparents * sizeof(*cand)); + parents = xmalloc(nparents * sizeof(*parents)); + + p = commit->parents; + for (i = 0; i < nparents; i++) { + parents[i] = p->item; + p = p->next; + queue_diffs(range, &rev->diffopt, &diffqueues[i], commit, parents[i]); + } + + for (i = 0; i < nparents; i++) { + int changed; + cand[i] = NULL; + changed = process_all_files(&cand[i], rev, &diffqueues[i], range); + if (!changed) { + /* + * This parent can take all the blame, so we + * don't follow any other path in history + */ + add_line_range(rev, parents[i], cand[i]); + clear_commit_line_range(rev, commit); + commit->parents = xmalloc(sizeof(struct commit_list)); + commit->parents->item = parents[i]; + commit->parents->next = NULL; + free(parents); + free(cand); + free_diffqueues(nparents, diffqueues); + /* NEEDSWORK leaking like a sieve */ + return 0; + } + } + + /* + * No single parent took the blame. We add the candidates + * from the above loop to the parents. + */ + for (i = 0; i < nparents; i++) { + add_line_range(rev, parents[i], cand[i]); + } + + clear_commit_line_range(rev, commit); + free(parents); + free(cand); + free_diffqueues(nparents, diffqueues); + return 1; + + /* NEEDSWORK evil merge detection stuff */ + /* NEEDSWORK leaking like a sieve */ +} + +static int process_ranges_arbitrary_commit(struct rev_info *rev, struct commit *commit) +{ + struct line_log_data *range = lookup_line_range(rev, commit); + int changed = 0; + + if (range) { + if (!commit->parents || !commit->parents->next) + changed = process_ranges_ordinary_commit(rev, commit, range); + else + changed = process_ranges_merge_commit(rev, commit, range); + } + + if (!changed) + commit->object.flags |= TREESAME; + + return changed; +} + +static enum rewrite_result line_log_rewrite_one(struct rev_info *rev, struct commit **pp) +{ + for (;;) { + struct commit *p = *pp; + if (p->parents && p->parents->next) + return rewrite_one_ok; + if (p->object.flags & UNINTERESTING) + return rewrite_one_ok; + if (!(p->object.flags & TREESAME)) + return rewrite_one_ok; + if (!p->parents) + return rewrite_one_noparents; + *pp = p->parents->item; + } +} + +int line_log_filter(struct rev_info *rev) +{ + struct commit *commit; + struct commit_list *list = rev->commits; + struct commit_list *out = NULL, **pp = &out; + + while (list) { + struct commit_list *to_free = NULL; + commit = list->item; + if (process_ranges_arbitrary_commit(rev, commit)) { + *pp = list; + pp = &list->next; + } else + to_free = list; + list = list->next; + free(to_free); + } + *pp = NULL; + + for (list = out; list; list = list->next) + rewrite_parents(rev, list->item, line_log_rewrite_one); + + rev->commits = out; + + return 0; +} diff --git a/line-log.h b/line-log.h new file mode 100644 index 0000000000..8bea45fd78 --- /dev/null +++ b/line-log.h @@ -0,0 +1,53 @@ +#ifndef LINE_LOG_H +#define LINE_LOG_H + +#include "diffcore.h" + +struct rev_info; +struct commit; + +/* A range [start,end]. Lines are numbered starting at 0, and the + * ranges include start but exclude end. */ +struct range { + long start, end; +}; + +/* A set of ranges. The ranges must always be disjoint and sorted. */ +struct range_set { + int alloc, nr; + struct range *ranges; +}; + +/* A diff, encoded as the set of pre- and post-image ranges where the + * files differ. A pair of ranges corresponds to a hunk. */ +struct diff_ranges { + struct range_set parent; + struct range_set target; +}; + +/* Linked list of interesting files and their associated ranges. The + * list must be kept sorted by path. + * + * For simplicity, even though this is highly redundant, each + * line_log_data owns its 'path'. + */ +struct line_log_data { + struct line_log_data *next; + char *path; + char status; + struct range_set ranges; + int arg_alloc, arg_nr; + const char **args; + struct diff_filepair *pair; + struct diff_ranges diff; +}; + +extern void line_log_data_init(struct line_log_data *r); + +extern void line_log_init(struct rev_info *rev, const char *prefix, struct string_list *args); + +extern int line_log_filter(struct rev_info *rev); + +extern int line_log_print(struct rev_info *rev, struct commit *commit); + +#endif /* LINE_LOG_H */ diff --git a/line-range.c b/line-range.c new file mode 100644 index 0000000000..8faf943745 --- /dev/null +++ b/line-range.c @@ -0,0 +1,243 @@ +#include "git-compat-util.h" +#include "line-range.h" +#include "xdiff-interface.h" +#include "strbuf.h" +#include "userdiff.h" + +/* + * Parse one item in the -L option + */ +static const char *parse_loc(const char *spec, nth_line_fn_t nth_line, + void *data, long lines, long begin, long *ret) +{ + char *term; + const char *line; + long num; + int reg_error; + regex_t regexp; + regmatch_t match[1]; + + /* Allow "-L <something>,+20" to mean starting at <something> + * for 20 lines, or "-L <something>,-5" for 5 lines ending at + * <something>. + */ + if (1 < begin && (spec[0] == '+' || spec[0] == '-')) { + num = strtol(spec + 1, &term, 10); + if (term != spec + 1) { + if (!ret) + return term; + if (spec[0] == '-') + num = 0 - num; + if (0 < num) + *ret = begin + num - 2; + else if (!num) + *ret = begin; + else + *ret = begin + num; + return term; + } + return spec; + } + num = strtol(spec, &term, 10); + if (term != spec) { + if (ret) + *ret = num; + return term; + } + if (spec[0] != '/') + return spec; + + /* it could be a regexp of form /.../ */ + for (term = (char *) spec + 1; *term && *term != '/'; term++) { + if (*term == '\\') + term++; + } + if (*term != '/') + return spec; + + /* in the scan-only case we are not interested in the regex */ + if (!ret) + return term+1; + + /* try [spec+1 .. term-1] as regexp */ + *term = 0; + begin--; /* input is in human terms */ + line = nth_line(data, begin); + + if (!(reg_error = regcomp(®exp, spec + 1, REG_NEWLINE)) && + !(reg_error = regexec(®exp, line, 1, match, 0))) { + const char *cp = line + match[0].rm_so; + const char *nline; + + while (begin++ < lines) { + nline = nth_line(data, begin); + if (line <= cp && cp < nline) + break; + line = nline; + } + *ret = begin; + regfree(®exp); + *term++ = '/'; + return term; + } + else { + char errbuf[1024]; + regerror(reg_error, ®exp, errbuf, 1024); + die("-L parameter '%s': %s", spec + 1, errbuf); + } +} + +static int match_funcname(xdemitconf_t *xecfg, const char *bol, const char *eol) +{ + if (xecfg) { + char buf[1]; + return xecfg->find_func(bol, eol - bol, buf, 1, + xecfg->find_func_priv) >= 0; + } + + if (bol == eol) + return 0; + if (isalpha(*bol) || *bol == '_' || *bol == '$') + return 1; + return 0; +} + +static const char *find_funcname_matching_regexp(xdemitconf_t *xecfg, const char *start, + regex_t *regexp) +{ + int reg_error; + regmatch_t match[1]; + while (1) { + const char *bol, *eol; + reg_error = regexec(regexp, start, 1, match, 0); + if (reg_error == REG_NOMATCH) + return NULL; + else if (reg_error) { + char errbuf[1024]; + regerror(reg_error, regexp, errbuf, 1024); + die("-L parameter: regexec() failed: %s", errbuf); + } + /* determine extent of line matched */ + bol = start+match[0].rm_so; + eol = start+match[0].rm_eo; + while (bol > start && *bol != '\n') + bol--; + if (*bol == '\n') + bol++; + while (*eol && *eol != '\n') + eol++; + if (*eol == '\n') + eol++; + /* is it a funcname line? */ + if (match_funcname(xecfg, (char*) bol, (char*) eol)) + return bol; + start = eol; + } +} + +static const char *parse_range_funcname(const char *arg, nth_line_fn_t nth_line_cb, + void *cb_data, long lines, long *begin, long *end, + const char *path) +{ + char *pattern; + const char *term; + struct userdiff_driver *drv; + xdemitconf_t *xecfg = NULL; + const char *start; + const char *p; + int reg_error; + regex_t regexp; + + assert(*arg == ':'); + term = arg+1; + while (*term && *term != ':') { + if (*term == '\\' && *(term+1)) + term++; + term++; + } + if (term == arg+1) + return NULL; + if (!begin) /* skip_range_arg case */ + return term; + + pattern = xstrndup(arg+1, term-(arg+1)); + + start = nth_line_cb(cb_data, 0); + + drv = userdiff_find_by_path(path); + if (drv && drv->funcname.pattern) { + const struct userdiff_funcname *pe = &drv->funcname; + xecfg = xcalloc(1, sizeof(*xecfg)); + xdiff_set_find_func(xecfg, pe->pattern, pe->cflags); + } + + reg_error = regcomp(®exp, pattern, REG_NEWLINE); + if (reg_error) { + char errbuf[1024]; + regerror(reg_error, ®exp, errbuf, 1024); + die("-L parameter '%s': %s", pattern, errbuf); + } + + p = find_funcname_matching_regexp(xecfg, (char*) start, ®exp); + if (!p) + die("-L parameter '%s': no match", pattern); + *begin = 0; + while (p > nth_line_cb(cb_data, *begin)) + (*begin)++; + + if (*begin >= lines) + die("-L parameter '%s' matches at EOF", pattern); + + *end = *begin+1; + while (*end < lines) { + const char *bol = nth_line_cb(cb_data, *end); + const char *eol = nth_line_cb(cb_data, *end+1); + if (match_funcname(xecfg, bol, eol)) + break; + (*end)++; + } + + regfree(®exp); + free(xecfg); + free(pattern); + + /* compensate for 1-based numbering */ + (*begin)++; + + return term; +} + +int parse_range_arg(const char *arg, nth_line_fn_t nth_line_cb, + void *cb_data, long lines, long *begin, long *end, + const char *path) +{ + if (*arg == ':') { + arg = parse_range_funcname(arg, nth_line_cb, cb_data, lines, begin, end, path); + if (!arg || *arg) + return -1; + return 0; + } + + arg = parse_loc(arg, nth_line_cb, cb_data, lines, 1, begin); + + if (*arg == ',') + arg = parse_loc(arg + 1, nth_line_cb, cb_data, lines, *begin + 1, end); + + if (*arg) + return -1; + + return 0; +} + +const char *skip_range_arg(const char *arg) +{ + if (*arg == ':') + return parse_range_funcname(arg, NULL, NULL, 0, NULL, NULL, NULL); + + arg = parse_loc(arg, NULL, NULL, 0, -1, NULL); + + if (*arg == ',') + arg = parse_loc(arg+1, NULL, NULL, 0, 0, NULL); + + return arg; +} diff --git a/line-range.h b/line-range.h new file mode 100644 index 0000000000..ae3d0123b4 --- /dev/null +++ b/line-range.h @@ -0,0 +1,36 @@ +#ifndef LINE_RANGE_H +#define LINE_RANGE_H + +/* + * Parse one item in an -L begin,end option w.r.t. the notional file + * object 'cb_data' consisting of 'lines' lines. + * + * The 'nth_line_cb' callback is used to determine the start of the + * line 'lno' inside the 'cb_data'. The caller is expected to already + * have a suitable map at hand to make this a constant-time lookup. + * + * Returns 0 in case of success and -1 if there was an error. The + * actual range is stored in *begin and *end. The counting starts + * at 1! In case of error, the caller should show usage message. + */ + +typedef const char *(*nth_line_fn_t)(void *data, long lno); + +extern int parse_range_arg(const char *arg, + nth_line_fn_t nth_line_cb, + void *cb_data, long lines, + long *begin, long *end, + const char *path); + +/* + * Scan past a range argument that could be parsed by + * 'parse_range_arg', to help the caller determine the start of the + * filename in '-L n,m:file' syntax. + * + * Returns a pointer to the first character after the 'n,m' part, or + * NULL in case the argument is obviously malformed. + */ + +extern const char *skip_range_arg(const char *arg); + +#endif /* LINE_RANGE_H */ diff --git a/log-tree.c b/log-tree.c index 1946e9ce8d..2eb69bcfed 100644 --- a/log-tree.c +++ b/log-tree.c @@ -10,6 +10,7 @@ #include "color.h" #include "gpg-interface.h" #include "sequencer.h" +#include "line-log.h" struct decoration name_decoration = { "object names" }; @@ -796,6 +797,9 @@ int log_tree_commit(struct rev_info *opt, struct commit *commit) log.parent = NULL; opt->loginfo = &log; + if (opt->line_level_traverse) + return line_log_print(opt, commit); + shown = log_tree_diff(opt, commit, &log); if (!shown && opt->loginfo && opt->always_show_header) { log.parent = NULL; diff --git a/mergetools/kdiff3 b/mergetools/kdiff3 index 28fead428b..a30034f116 100644 --- a/mergetools/kdiff3 +++ b/mergetools/kdiff3 @@ -1,5 +1,5 @@ diff_cmd () { - "$merge_tool_path" --auto \ + "$merge_tool_path" \ --L1 "$MERGED (A)" --L2 "$MERGED (B)" \ "$LOCAL" "$REMOTE" >/dev/null 2>&1 } @@ -71,13 +71,13 @@ static unsigned int hashtable_index(const unsigned char *sha1) struct object *lookup_object(const unsigned char *sha1) { - unsigned int i; + unsigned int i, first; struct object *obj; if (!obj_hash) return NULL; - i = hashtable_index(sha1); + first = i = hashtable_index(sha1); while ((obj = obj_hash[i]) != NULL) { if (!hashcmp(sha1, obj->sha1)) break; @@ -85,6 +85,16 @@ struct object *lookup_object(const unsigned char *sha1) if (i == obj_hash_size) i = 0; } + if (obj && i != first) { + /* + * Move object to where we started to look for it so + * that we do not need to walk the hash table the next + * time we look for it. + */ + struct object *tmp = obj_hash[i]; + obj_hash[i] = obj_hash[first]; + obj_hash[first] = tmp; + } return obj; } diff --git a/pack-refs.c b/pack-refs.c deleted file mode 100644 index 4461f71a37..0000000000 --- a/pack-refs.c +++ /dev/null @@ -1,148 +0,0 @@ -#include "cache.h" -#include "refs.h" -#include "tag.h" -#include "pack-refs.h" - -struct ref_to_prune { - struct ref_to_prune *next; - unsigned char sha1[20]; - char name[FLEX_ARRAY]; -}; - -struct pack_refs_cb_data { - unsigned int flags; - struct ref_to_prune *ref_to_prune; - FILE *refs_file; -}; - -static int do_not_prune(int flags) -{ - /* If it is already packed or if it is a symref, - * do not prune it. - */ - return (flags & (REF_ISSYMREF|REF_ISPACKED)); -} - -static int handle_one_ref(const char *path, const unsigned char *sha1, - int flags, void *cb_data) -{ - struct pack_refs_cb_data *cb = cb_data; - struct object *o; - int is_tag_ref; - - /* Do not pack the symbolic refs */ - if ((flags & REF_ISSYMREF)) - return 0; - is_tag_ref = !prefixcmp(path, "refs/tags/"); - - /* ALWAYS pack refs that were already packed or are tags */ - if (!(cb->flags & PACK_REFS_ALL) && !is_tag_ref && !(flags & REF_ISPACKED)) - return 0; - - fprintf(cb->refs_file, "%s %s\n", sha1_to_hex(sha1), path); - - o = parse_object_or_die(sha1, path); - if (o->type == OBJ_TAG) { - o = deref_tag(o, path, 0); - if (o) - fprintf(cb->refs_file, "^%s\n", - sha1_to_hex(o->sha1)); - } - - if ((cb->flags & PACK_REFS_PRUNE) && !do_not_prune(flags)) { - int namelen = strlen(path) + 1; - struct ref_to_prune *n = xcalloc(1, sizeof(*n) + namelen); - hashcpy(n->sha1, sha1); - strcpy(n->name, path); - n->next = cb->ref_to_prune; - cb->ref_to_prune = n; - } - return 0; -} - -/* - * Remove empty parents, but spare refs/ and immediate subdirs. - * Note: munges *name. - */ -static void try_remove_empty_parents(char *name) -{ - char *p, *q; - int i; - p = name; - for (i = 0; i < 2; i++) { /* refs/{heads,tags,...}/ */ - while (*p && *p != '/') - p++; - /* tolerate duplicate slashes; see check_refname_format() */ - while (*p == '/') - p++; - } - for (q = p; *q; q++) - ; - while (1) { - while (q > p && *q != '/') - q--; - while (q > p && *(q-1) == '/') - q--; - if (q == p) - break; - *q = '\0'; - if (rmdir(git_path("%s", name))) - break; - } -} - -/* make sure nobody touched the ref, and unlink */ -static void prune_ref(struct ref_to_prune *r) -{ - struct ref_lock *lock = lock_ref_sha1(r->name + 5, r->sha1); - - if (lock) { - unlink_or_warn(git_path("%s", r->name)); - unlock_ref(lock); - try_remove_empty_parents(r->name); - } -} - -static void prune_refs(struct ref_to_prune *r) -{ - while (r) { - prune_ref(r); - r = r->next; - } -} - -static struct lock_file packed; - -int pack_refs(unsigned int flags) -{ - int fd; - struct pack_refs_cb_data cbdata; - - memset(&cbdata, 0, sizeof(cbdata)); - cbdata.flags = flags; - - fd = hold_lock_file_for_update(&packed, git_path("packed-refs"), - LOCK_DIE_ON_ERROR); - cbdata.refs_file = fdopen(fd, "w"); - if (!cbdata.refs_file) - die_errno("unable to create ref-pack file structure"); - - /* perhaps other traits later as well */ - fprintf(cbdata.refs_file, "# pack-refs with: peeled fully-peeled \n"); - - for_each_ref(handle_one_ref, &cbdata); - if (ferror(cbdata.refs_file)) - die("failed to write ref-pack file"); - if (fflush(cbdata.refs_file) || fsync(fd) || fclose(cbdata.refs_file)) - die_errno("failed to write ref-pack file"); - /* - * Since the lock file was fdopen()'ed and then fclose()'ed above, - * assign -1 to the lock file descriptor so that commit_lock_file() - * won't try to close() it. - */ - packed.fd = -1; - if (commit_lock_file(&packed) < 0) - die_errno("unable to overwrite old ref-pack file"); - prune_refs(cbdata.ref_to_prune); - return 0; -} diff --git a/pack-refs.h b/pack-refs.h deleted file mode 100644 index 518acfb370..0000000000 --- a/pack-refs.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PACK_REFS_H -#define PACK_REFS_H - -/* - * Flags for controlling behaviour of pack_refs() - * PACK_REFS_PRUNE: Prune loose refs after packing - * PACK_REFS_ALL: Pack _all_ refs, not just tags and already packed refs - */ -#define PACK_REFS_PRUNE 0x0001 -#define PACK_REFS_ALL 0x0002 - -/* - * Write a packed-refs file for the current repository. - * flags: Combination of the above PACK_REFS_* flags. - */ -int pack_refs(unsigned int flags); - -#endif /* PACK_REFS_H */ diff --git a/parse-options-cb.c b/parse-options-cb.c index 0de5fb168a..be8c413cfe 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -33,6 +33,12 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg, return 0; } +int parse_opt_expiry_date_cb(const struct option *opt, const char *arg, + int unset) +{ + return parse_expiry_date(arg, (unsigned long *)opt->value); +} + int parse_opt_color_flag_cb(const struct option *opt, const char *arg, int unset) { diff --git a/parse-options.h b/parse-options.h index 1c8bd8d5a0..c378b75b13 100644 --- a/parse-options.h +++ b/parse-options.h @@ -140,6 +140,9 @@ struct option { #define OPT_DATE(s, l, v, h) \ { OPTION_CALLBACK, (s), (l), (v), N_("time"),(h), 0, \ parse_opt_approxidate_cb } +#define OPT_EXPIRY_DATE(s, l, v, h) \ + { OPTION_CALLBACK, (s), (l), (v), N_("expiry date"),(h), 0, \ + parse_opt_expiry_date_cb } #define OPT_CALLBACK(s, l, v, a, h, f) \ { OPTION_CALLBACK, (s), (l), (v), (a), (h), 0, (f) } #define OPT_NUMBER_CALLBACK(v, h, f) \ @@ -219,6 +222,7 @@ extern int parse_options_concat(struct option *dst, size_t, struct option *src); /*----- some often used options -----*/ extern int parse_opt_abbrev_cb(const struct option *, const char *, int); extern int parse_opt_approxidate_cb(const struct option *, const char *, int); +extern int parse_opt_expiry_date_cb(const struct option *, const char *, int); extern int parse_opt_color_flag_cb(const struct option *, const char *, int); extern int parse_opt_verbosity_cb(const struct option *, const char *, int); extern int parse_opt_with_commit(const struct option *, const char *, int); diff --git a/perl/Git.pm b/perl/Git.pm index dc48159cca..7a252ef872 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1265,7 +1265,7 @@ sub _temp_cache { $tmpdir = $self->repo_path(); } - ($$temp_fd, $fname) = File::Temp->tempfile( + ($$temp_fd, $fname) = File::Temp::tempfile( 'Git_XXXXXX', UNLINK => 1, DIR => $tmpdir, ) or throw Error::Simple("couldn't open new temp file"); diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm index fa0d3c6cdd..b3bcd476da 100644 --- a/perl/Git/SVN/Editor.pm +++ b/perl/Git/SVN/Editor.pm @@ -499,6 +499,8 @@ sub apply_diff { 1; __END__ +=head1 NAME + Git::SVN::Editor - commit driver for "git svn set-tree" and dcommit =head1 SYNOPSIS diff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm index 046a7a2f31..bd174189b9 100644 --- a/perl/Git/SVN/Fetcher.pm +++ b/perl/Git/SVN/Fetcher.pm @@ -1,6 +1,7 @@ package Git::SVN::Fetcher; -use vars qw/@ISA $_ignore_regex $_preserve_empty_dirs $_placeholder_filename - @deleted_gpath %added_placeholder $repo_id/; +use vars qw/@ISA $_ignore_regex $_include_regex $_preserve_empty_dirs + $_placeholder_filename @deleted_gpath %added_placeholder + $repo_id/; use strict; use warnings; use SVN::Delta; @@ -33,6 +34,10 @@ sub new { my $v = eval { command_oneline('config', '--get', $k) }; $self->{ignore_regex} = $v; + $k = "svn-remote.$repo_id.include-paths"; + $v = eval { command_oneline('config', '--get', $k) }; + $self->{include_regex} = $v; + $k = "svn-remote.$repo_id.preserve-empty-dirs"; $v = eval { command_oneline('config', '--get', '--bool', $k) }; if ($v && $v eq 'true') { @@ -117,11 +122,18 @@ sub in_dot_git { } # return value: 0 -- don't ignore, 1 -- ignore +# This will also check whether the path is explicitly included sub is_path_ignored { my ($self, $path) = @_; return 1 if in_dot_git($path); return 1 if defined($self->{ignore_regex}) && $path =~ m!$self->{ignore_regex}!; + return 0 if defined($self->{include_regex}) && + $path =~ m!$self->{include_regex}!; + return 0 if defined($_include_regex) && + $path =~ m!$_include_regex!; + return 1 if defined($self->{include_regex}); + return 1 if defined($_include_regex); return 0 unless defined($_ignore_regex); return 1 if $path =~ m!$_ignore_regex!o; return 0; @@ -512,6 +524,8 @@ sub stash_placeholder_list { 1; __END__ +=head1 NAME + Git::SVN::Fetcher - tree delta consumer for "git svn fetch" =head1 SYNOPSIS diff --git a/perl/Git/SVN/Prompt.pm b/perl/Git/SVN/Prompt.pm index 74daa7a597..e940b08505 100644 --- a/perl/Git/SVN/Prompt.pm +++ b/perl/Git/SVN/Prompt.pm @@ -125,6 +125,8 @@ sub _read_password { 1; __END__ +=head1 NAME + Git::SVN::Prompt - authentication callbacks for git-svn =head1 SYNOPSIS diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm index 6a212eb7a8..75ecc425b6 100644 --- a/perl/Git/SVN/Ra.pm +++ b/perl/Git/SVN/Ra.pm @@ -627,6 +627,8 @@ sub skip_unknown_revs { 1; __END__ +=head1 NAME + Git::SVN::Ra - Subversion remote access functions for git-svn =head1 SYNOPSIS @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: git 1.8.2\n" +"Project-Id-Version: git 1.8.3\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2013-04-10 15:16+0800\n" +"POT-Creation-Date: 2013-04-30 08:25+0800\n" "PO-Revision-Date: 2012-10-02 19:35+0200\n" "Last-Translator: Ralf Thielow <ralf.thielow@gmail.com>\n" "Language-Team: German <>\n" @@ -65,7 +65,7 @@ msgstr "Format" msgid "archive format" msgstr "Ausgabeformat" -#: archive.c:324 builtin/log.c:1117 +#: archive.c:324 builtin/log.c:1126 msgid "prefix" msgstr "Prefix" @@ -73,10 +73,10 @@ msgstr "Prefix" msgid "prepend prefix to each pathname in the archive" msgstr "stellt einen Präfix vor jeden Pfadnamen in der Ausgabe" -#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2366 -#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:659 -#: builtin/fast-export.c:661 builtin/grep.c:715 builtin/hash-object.c:77 -#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536 +#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 +#: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 +#: builtin/fast-export.c:667 builtin/grep.c:715 builtin/hash-object.c:77 +#: builtin/ls-files.c:490 builtin/ls-files.c:493 builtin/notes.c:536 #: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149 msgid "file" msgstr "Datei" @@ -133,11 +133,84 @@ msgstr "" "Verneinende Muster werden in Git-Attributen ignoriert.\n" "Benutzen Sie '\\!' für führende Ausrufezeichen." +#: branch.c:60 +#, c-format +msgid "Not setting branch %s as its own upstream." +msgstr "Zweig %s kann nicht sein eigener Übernahmezweig sein." + +#: branch.c:82 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s by rebasing." +msgstr "Zweig %s konfiguriert zum Folgen von externem Zweig %s von %s durch " +"Neuaufbau." + +#: branch.c:83 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s." +msgstr "Zweig %s konfiguriert zum Folgen von externem Zweig %s von %s." + +#: branch.c:87 +#, c-format +msgid "Branch %s set up to track local branch %s by rebasing." +msgstr "Zweig %s konfiguriert zum Folgen von lokalem Zweig %s durch Neuaufbau." + +#: branch.c:88 +#, c-format +msgid "Branch %s set up to track local branch %s." +msgstr "Zweig %s konfiguriert zum Folgen von lokalem Zweig %s." + +#: branch.c:92 +#, c-format +msgid "Branch %s set up to track remote ref %s by rebasing." +msgstr "Zweig %s konfiguriert zum Folgen von externer Referenz %s durch " +"Neuaufbau." + +#: branch.c:93 +#, c-format +msgid "Branch %s set up to track remote ref %s." +msgstr "Zweig %s konfiguriert zum Folgen von externer Referenz %s." + +#: branch.c:97 +#, c-format +msgid "Branch %s set up to track local ref %s by rebasing." +msgstr "Zweig %s konfiguriert zum Folgen von lokaler Referenz %s durch " +"Neuaufbau." + +#: branch.c:98 +#, c-format +msgid "Branch %s set up to track local ref %s." +msgstr "Zweig %s konfiguriert zum Folgen von lokaler Referenz %s." + +#: branch.c:118 +#, c-format +msgid "Tracking not set up: name too long: %s" +msgstr "Konfiguration zum Folgen von Zweig nicht eingerichtet. Name zu lang: %s" + +#: branch.c:137 +#, c-format +msgid "Not tracking: ambiguous information for ref %s" +msgstr "Konfiguration zum Folgen von Zweig nicht eingerichtet. Referenz %s ist mehrdeutig." + +#: branch.c:182 +#, c-format +msgid "'%s' is not a valid branch name." +msgstr "'%s' ist kein gültiger Zweigname." + +#: branch.c:187 +#, c-format +msgid "A branch named '%s' already exists." +msgstr "Zweig '%s' existiert bereits." + +#: branch.c:195 +msgid "Cannot force update the current branch." +msgstr "Kann Aktualisierung des aktuellen Zweiges nicht erzwingen." + #: branch.c:201 #, c-format msgid "Cannot setup tracking information; starting point '%s' is not a branch." -msgstr "Kann Informationen zum Übernahmezweig nicht einrichten; " -"Startpunkt '%s' ist kein Zweig." +msgstr "" +"Kann Informationen zum Übernahmezweig nicht einrichten; Startpunkt '%s' ist " +"kein Zweig." #: branch.c:203 #, c-format @@ -165,6 +238,29 @@ msgstr "" "\"git push -u\" verwenden, um den externen Übernahmezweig\n" "beim Versand zu konfigurieren." +#: branch.c:250 +#, c-format +msgid "Not a valid object name: '%s'." +msgstr "Ungültiger Objekt-Name: '%s'" + +#: branch.c:270 +#, c-format +msgid "Ambiguous object name: '%s'." +msgstr "mehrdeutiger Objekt-Name: '%s'" + +#: branch.c:275 +#, c-format +msgid "Not a valid branch point: '%s'." +msgstr "Ungültiger Verzweigungspunkt: '%s'" + +#: branch.c:281 +msgid "Failed to lock ref for update" +msgstr "Fehler beim Sperren der Referenz zur Aktualisierung." + +#: branch.c:299 +msgid "Failed to write ref" +msgstr "Fehler beim Schreiben der Referenz." + #: bundle.c:36 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -184,9 +280,9 @@ msgstr "Konnte '%s' nicht öffnen" msgid "Repository lacks these prerequisite commits:" msgstr "Dem Projektarchiv fehlen folgende vorausgesetzte Versionen:" -#: bundle.c:164 sequencer.c:651 sequencer.c:1083 builtin/log.c:300 -#: builtin/log.c:754 builtin/log.c:1350 builtin/log.c:1566 builtin/merge.c:349 -#: builtin/shortlog.c:157 +#: bundle.c:164 sequencer.c:651 sequencer.c:1101 builtin/log.c:300 +#: builtin/log.c:770 builtin/log.c:1344 builtin/log.c:1570 builtin/merge.c:349 +#: builtin/shortlog.c:155 msgid "revision walk setup failed" msgstr "Einrichtung des Revisionsgangs fehlgeschlagen" @@ -212,7 +308,7 @@ msgstr[1] "Das Paket benötigt diese %d Referenzen:" msgid "rev-list died" msgstr "\"rev-list\" abgebrochen" -#: bundle.c:300 builtin/log.c:1246 builtin/shortlog.c:260 +#: bundle.c:300 builtin/log.c:1255 builtin/shortlog.c:258 #, c-format msgid "unrecognized argument: %s" msgstr "nicht erkanntes Argument: %s" @@ -363,7 +459,7 @@ msgstr "" "Fehler in 'diff.dirstat' Konfigurationsvariable gefunden:\n" "%s" -#: diff.c:3480 +#: diff.c:3481 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -372,7 +468,7 @@ msgstr "" "Fehler beim Parsen des --dirstat/-X Optionsparameters:\n" "%s" -#: diff.c:3494 +#: diff.c:3495 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "Fehler beim Parsen des --submodule Optionsparameters: '%s'" @@ -477,8 +573,8 @@ msgstr[1] "" msgid "failed to read the cache" msgstr "Lesen des Zwischenspeichers fehlgeschlagen" -#: merge.c:110 builtin/checkout.c:362 builtin/checkout.c:563 -#: builtin/clone.c:635 +#: merge.c:110 builtin/checkout.c:365 builtin/checkout.c:566 +#: builtin/clone.c:645 msgid "unable to write new index file" msgstr "Konnte neue Bereitstellungsdatei nicht schreiben." @@ -527,7 +623,7 @@ msgstr "kann Objekt %s '%s' nicht lesen" msgid "blob expected for %s '%s'" msgstr "Blob erwartet für %s '%s'" -#: merge-recursive.c:773 builtin/clone.c:303 +#: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" msgstr "Fehler beim Öffnen von '%s'" @@ -1064,11 +1160,21 @@ msgstr "" msgid "Could not format %s." msgstr "Konnte %s nicht formatieren." -#: sequencer.c:1101 +#: sequencer.c:1083 +#, c-format +msgid "%s: can't cherry-pick a %s" +msgstr "%s: %s kann nicht in \"cherry-pick\" benutzt werden" + +#: sequencer.c:1085 +#, c-format +msgid "%s: bad revision" +msgstr "%s: ungültige Revision" + +#: sequencer.c:1119 msgid "Can't revert as initial commit" msgstr "Rücknahme-Version kann nicht initial sein." -#: sequencer.c:1102 +#: sequencer.c:1120 msgid "Can't cherry-pick into empty head" msgstr "Kann \"cherry-pick\" nicht in einem leeren Zweig ausführen." @@ -1267,76 +1373,76 @@ msgstr "nicht zusammengeführt: %s" msgid "bug: unhandled diff status %c" msgstr "Fehler: unbehandelter Differenz-Status %c" -#: wt-status.c:805 +#: wt-status.c:803 msgid "You have unmerged paths." msgstr "Sie haben nicht zusammengeführte Pfade." -#: wt-status.c:808 wt-status.c:960 +#: wt-status.c:806 wt-status.c:958 msgid " (fix conflicts and run \"git commit\")" msgstr " (beheben Sie die Konflikte und führen Sie \"git commit\" aus)" -#: wt-status.c:811 +#: wt-status.c:809 msgid "All conflicts fixed but you are still merging." msgstr "" "Alle Konflikte sind behoben, aber Sie sind immer noch beim Zusammenführen." -#: wt-status.c:814 +#: wt-status.c:812 msgid " (use \"git commit\" to conclude merge)" msgstr " (benutzen Sie \"git commit\" um die Zusammenführung abzuschließen)" -#: wt-status.c:824 +#: wt-status.c:822 msgid "You are in the middle of an am session." msgstr "Eine \"am\"-Sitzung ist im Gange." -#: wt-status.c:827 +#: wt-status.c:825 msgid "The current patch is empty." msgstr "Der aktuelle Patch ist leer." -#: wt-status.c:831 +#: wt-status.c:829 msgid " (fix conflicts and then run \"git am --resolved\")" msgstr "" " (beheben Sie die Konflikte und führen Sie dann \"git am --resolved\" aus)" -#: wt-status.c:833 +#: wt-status.c:831 msgid " (use \"git am --skip\" to skip this patch)" msgstr " (benutzen Sie \"git am --skip\" um diesen Patch auszulassen)" -#: wt-status.c:835 +#: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" msgstr "" " (benutzen Sie \"git am --abort\" um den ursprünglichen Zweig " "wiederherzustellen)" -#: wt-status.c:895 wt-status.c:912 +#: wt-status.c:893 wt-status.c:910 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "Sie sind gerade beim Neuaufbau von Zweig '%s' auf '%s'." -#: wt-status.c:900 wt-status.c:917 +#: wt-status.c:898 wt-status.c:915 msgid "You are currently rebasing." msgstr "Sie sind gerade beim Neuaufbau." -#: wt-status.c:903 +#: wt-status.c:901 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr "" " (beheben Sie die Konflikte und führen Sie dann \"git rebase --continue\" " "aus)" -#: wt-status.c:905 +#: wt-status.c:903 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr " (benutzen Sie \"git rebase --skip\" um diesen Patch auszulassen)" -#: wt-status.c:907 +#: wt-status.c:905 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr "" " (benutzen Sie \"git rebase --abort\" um den ursprünglichen Zweig " "auszuchecken)" -#: wt-status.c:920 +#: wt-status.c:918 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr " (alle Konflikte behoben: führen Sie \"git rebase --continue\" aus)" -#: wt-status.c:924 +#: wt-status.c:922 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." @@ -1344,150 +1450,147 @@ msgstr "" "Sie teilen gerade eine Version auf, während ein Neuaufbau von Zweig '%s' auf " "'%s' im Gange ist." -#: wt-status.c:929 +#: wt-status.c:927 msgid "You are currently splitting a commit during a rebase." msgstr "Sie teilen gerade eine Version während eines Neuaufbaus auf." -#: wt-status.c:932 +#: wt-status.c:930 msgid " (Once your working directory is clean, run \"git rebase --continue\")" msgstr "" " (Sobald Ihr Arbeitsverzeichnis sauber ist, führen Sie \"git rebase --" "continue\" aus)" -#: wt-status.c:936 +#: wt-status.c:934 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "" "Sie editieren gerade eine Version während eines Neuaufbaus von Zweig '%s' " "auf '%s'." -#: wt-status.c:941 +#: wt-status.c:939 msgid "You are currently editing a commit during a rebase." msgstr "Sie editieren gerade eine Version während eines Neuaufbaus." -#: wt-status.c:944 +#: wt-status.c:942 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr "" " (benutzen Sie \"git commit --amend\" um die aktuelle Version nachzubessern)" -#: wt-status.c:946 +#: wt-status.c:944 msgid "" " (use \"git rebase --continue\" once you are satisfied with your changes)" msgstr "" " (benutzen Sie \"git rebase --continue\" sobald Ihre Änderungen " "abgeschlossen sind)" -#: wt-status.c:956 +#: wt-status.c:954 msgid "You are currently cherry-picking." msgstr "Sie führen gerade \"cherry-pick\" aus." -#: wt-status.c:963 +#: wt-status.c:961 msgid " (all conflicts fixed: run \"git commit\")" msgstr " (alle Konflikte behoben: führen Sie \"git commit\" aus)" -#: wt-status.c:972 +#: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." msgstr "Sie nehmen gerade Version '%s' zurück." -#: wt-status.c:977 +#: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" msgstr "" " (beheben Sie die Konflikte und führen Sie dann \"git revert --continue\" " "aus)" -#: wt-status.c:980 +#: wt-status.c:978 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr " (alle Konflikte behoben: führen Sie \"git revert --continue\" aus)" -#: wt-status.c:982 +#: wt-status.c:980 msgid " (use \"git revert --abort\" to cancel the revert operation)" msgstr "" " (benutzen Sie \"git revert --abort\" um die Umkehroperation abzubrechen)" -#: wt-status.c:993 +#: wt-status.c:991 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "Sie sind gerade bei einer binären Suche, gestartet von Zweig '%s'." -#: wt-status.c:997 +#: wt-status.c:995 msgid "You are currently bisecting." msgstr "Sie sind gerade bei einer binären Suche." -#: wt-status.c:1000 +#: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr "" " (benutzen Sie \"git bisect reset\" um zum ursprünglichen Zweig " "zurückzukehren)" -#: wt-status.c:1175 +#: wt-status.c:1173 msgid "On branch " msgstr "Auf Zweig " -#: wt-status.c:1186 +#: wt-status.c:1184 msgid "HEAD detached at " msgstr "Zweigspitze (HEAD) losgelöst bei " -#: wt-status.c:1188 +#: wt-status.c:1186 msgid "HEAD detached from " msgstr "Zweigspitze (HEAD) losgelöst von " -#: wt-status.c:1191 +#: wt-status.c:1189 msgid "Not currently on any branch." msgstr "Im Moment auf keinem Zweig." -#: wt-status.c:1208 +#: wt-status.c:1206 msgid "Initial commit" msgstr "Initiale Version" -#: wt-status.c:1222 +#: wt-status.c:1220 msgid "Untracked files" msgstr "Unbeobachtete Dateien" -#: wt-status.c:1224 +#: wt-status.c:1222 msgid "Ignored files" msgstr "Ignorierte Dateien" -#: wt-status.c:1228 +#: wt-status.c:1226 #, c-format -msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" -msgstr "Es dauerte %.2f Sekunden die unbeobachteten Dateien zu bestimmen." -"'status -uno'" +msgid "" +"It took %.2f seconds to enumerate untracked files. 'status -uno'\n" +"may speed it up, but you have to be careful not to forget to add\n" +"new files yourself (see 'git help status')." +msgstr "" +"Es dauerte %.2f Sekunden die unbeobachteten Dateien zu bestimmen.\n" +"'status -uno' könnte das beschleunigen, aber Sie müssen darauf achten,\n" +"neue Dateien selbstständig hinzuzufügen (siehe 'git help status')." #: wt-status.c:1232 -msgid "may speed it up, but you have to be careful not to forget to add" -msgstr "könnte das beschleunigen, aber Sie müssen darauf achten, neue" - -#: wt-status.c:1235 -msgid "new files yourself (see 'git help status')." -msgstr "Dateien selbstständig hinzuzufügen (siehe 'git help status')." - -#: wt-status.c:1238 #, c-format msgid "Untracked files not listed%s" msgstr "Unbeobachtete Dateien nicht aufgelistet%s" -#: wt-status.c:1240 +#: wt-status.c:1234 msgid " (use -u option to show untracked files)" msgstr " (benutzen Sie die Option -u um unbeobachteten Dateien anzuzeigen)" -#: wt-status.c:1246 +#: wt-status.c:1240 msgid "No changes" msgstr "Keine Änderungen" -#: wt-status.c:1251 +#: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" msgstr "" "keine Änderungen zum Eintragen hinzugefügt (benutzen Sie \"git add\" und/" "oder \"git commit -a\")\n" -#: wt-status.c:1254 +#: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" msgstr "keine Änderungen zum Eintragen hinzugefügt\n" -#: wt-status.c:1257 +#: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " @@ -1496,56 +1599,56 @@ msgstr "" "nichts zum Eintragen hinzugefügt, aber es gibt unbeobachtete Dateien " "(benutzen Sie \"git add\" zum Beobachten)\n" -#: wt-status.c:1260 +#: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" msgstr "nichts zum Eintragen hinzugefügt, aber es gibt unbeobachtete Dateien\n" -#: wt-status.c:1263 +#: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" msgstr "" "nichts einzutragen (Erstellen/Kopieren Sie Dateien und benutzen Sie \"git add" "\" zum Beobachten)\n" -#: wt-status.c:1266 wt-status.c:1271 +#: wt-status.c:1260 wt-status.c:1265 #, c-format msgid "nothing to commit\n" msgstr "nichts einzutragen\n" -#: wt-status.c:1269 +#: wt-status.c:1263 #, c-format msgid "nothing to commit (use -u to show untracked files)\n" msgstr "" "nichts einzutragen (benutzen Sie die Option -u, um unbeobachtete Dateien " "anzuzeigen)\n" -#: wt-status.c:1273 +#: wt-status.c:1267 #, c-format msgid "nothing to commit, working directory clean\n" msgstr "nichts einzutragen, Arbeitsverzeichnis sauber\n" -#: wt-status.c:1381 +#: wt-status.c:1375 msgid "HEAD (no branch)" msgstr "HEAD (kein Zweig)" -#: wt-status.c:1387 +#: wt-status.c:1381 msgid "Initial commit on " msgstr "Initiale Version auf " -#: wt-status.c:1402 +#: wt-status.c:1396 msgid "behind " msgstr "hinterher " -#: wt-status.c:1405 wt-status.c:1408 +#: wt-status.c:1399 wt-status.c:1402 msgid "ahead " msgstr "voraus " -#: wt-status.c:1410 +#: wt-status.c:1404 msgid ", behind " msgstr ", hinterher " -#: compat/precompose_utf8.c:58 builtin/clone.c:342 +#: compat/precompose_utf8.c:58 builtin/clone.c:352 #, c-format msgid "failed to unlink '%s'" msgstr "Konnte '%s' nicht entfernen." @@ -1554,201 +1657,236 @@ msgstr "Konnte '%s' nicht entfernen." msgid "git add [options] [--] <pathspec>..." msgstr "git add [Optionen] [--] [<Pfadspezifikation>...]" -#: builtin/add.c:63 +#. +#. * To be consistent with "git add -p" and most Git +#. * commands, we should default to being tree-wide, but +#. * this is not the original behavior and can't be +#. * changed until users trained themselves not to type +#. * "git add -u" or "git add -A". For now, we warn and +#. * keep the old behavior. Later, the behavior can be changed +#. * to tree-wide, keeping the warning for a while, and +#. * eventually we can drop the warning. +#. +#: builtin/add.c:58 +#, c-format +msgid "" +"The behavior of 'git add %s (or %s)' with no path argument from a\n" +"subdirectory of the tree will change in Git 2.0 and should not be used " +"anymore.\n" +"To add content for the whole tree, run:\n" +"\n" +" git add %s :/\n" +" (or git add %s :/)\n" +"\n" +"To restrict the command to the current directory, run:\n" +"\n" +" git add %s .\n" +" (or git add %s .)\n" +"\n" +"With the current Git version, the command is restricted to the current " +"directory.\n" +msgstr "" +"Das Verhalten von 'git add %s (oder %s)' ohne ein Pfad-Argument von\n" +"einem Unterverzeichnis aus wird in Git 2.0 geändert und sollte nicht\n" +"mehr verwendet werden.\n" +"Um Dateien des gesamten Projektverzeichnisses hinzuzufügen, führen Sie aus:\n" +"\n" +" git add %s :/\n" +" (oder git add %s :/)\n" +"\n" +"Zur Einschränkung auf das aktuelle Verzeichnis führen Sie aus:\n" +"\n" +" git add %s .\n" +" (oder git add %s .)\n" +"\n" +"Mit der aktuellen Version von Git ist das Kommando auf das aktuelle\n" +"Verzeichnis beschränkt.\n" + +#: builtin/add.c:100 +#, c-format +msgid "" +"You ran 'git add' with neither '-A (--all)' or '--ignore-removal',\n" +"whose behaviour will change in Git 2.0 with respect to paths you removed.\n" +"Paths like '%s' that are\n" +"removed from your working tree are ignored with this version of Git.\n" +"\n" +"* 'git add --ignore-removal <pathspec>', which is the current default,\n" +" ignores paths you removed from your working tree.\n" +"\n" +"* 'git add --all <pathspec>' will let you also record the removals.\n" +"\n" +"Run 'git status' to check the paths you removed from your working tree.\n" +msgstr "" +"Sie haben 'git add' weder mit '-A (--all)' noch mit '--ignore-removal'\n" +"ausgeführt. Das Verhalten des Kommandos ändert sich in Git 2.0 durch\n" +"Berücksichtigung der gelöschten Pfade.\n" +"Pfade wie '%s', die im Arbeitsverzeichnis gelöscht wurden, werden in\n" +"dieser Version von Git ignoriert.\n" +"\n" +"* 'git add --ignore-removal <Pfadspezifikation>', was der aktuelle\n" +" Standardwert ist, ignoriert gelöschte Pfade im Arbeitsverzeichnis." +"\n" +"* 'git add --all <Pfadspezifikation>' berücksichtigt ebenfalls gelöschte\n" +" Pfade." +"\n" +"Führen Sie 'git status' aus, um die gelöschten Pfade zu überprüfen.\n" + +#: builtin/add.c:144 #, c-format msgid "unexpected diff status %c" msgstr "unerwarteter Differenz-Status %c" -#: builtin/add.c:68 builtin/commit.c:233 +#: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" msgstr "Aktualisierung der Dateien fehlgeschlagen" -#: builtin/add.c:78 +#: builtin/add.c:163 #, c-format msgid "remove '%s'\n" msgstr "lösche '%s'\n" -#: builtin/add.c:148 +#: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" msgstr "" "Nicht bereitgestellte Änderungen nach Aktualisierung der Bereitstellung:" -#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275 +#: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format msgid "pathspec '%s' did not match any files" msgstr "Pfadspezifikation '%s' stimmt mit keinen Dateien überein" -#: builtin/add.c:234 +#: builtin/add.c:339 msgid "Could not read the index" msgstr "Konnte die Bereitstellung nicht lesen" -#: builtin/add.c:244 +#: builtin/add.c:349 #, c-format msgid "Could not open '%s' for writing." msgstr "Konnte '%s' nicht zum Schreiben öffnen." -#: builtin/add.c:248 +#: builtin/add.c:353 msgid "Could not write patch" msgstr "Konnte Patch nicht schreiben" -#: builtin/add.c:253 +#: builtin/add.c:358 #, c-format msgid "Could not stat '%s'" msgstr "Konnte Verzeichnis '%s' nicht lesen" -#: builtin/add.c:255 +#: builtin/add.c:360 msgid "Empty patch. Aborted." msgstr "Leerer Patch. Abgebrochen." -#: builtin/add.c:261 +#: builtin/add.c:366 #, c-format msgid "Could not apply '%s'" msgstr "Konnte '%s' nicht anwenden." -#: builtin/add.c:271 +#: builtin/add.c:376 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "" "Die folgenden Pfade werden durch eine Ihrer \".gitignore\" Dateien " "ignoriert:\n" -#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 +#: builtin/add.c:393 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 #: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253 #: builtin/rm.c:206 msgid "dry run" msgstr "Probelauf" -#: builtin/add.c:278 builtin/apply.c:4409 builtin/check-ignore.c:19 +#: builtin/add.c:394 builtin/apply.c:4409 builtin/check-ignore.c:19 #: builtin/commit.c:1152 builtin/count-objects.c:95 builtin/fsck.c:613 -#: builtin/log.c:1514 builtin/mv.c:62 builtin/read-tree.c:112 +#: builtin/log.c:1518 builtin/mv.c:62 builtin/read-tree.c:112 msgid "be verbose" msgstr "erweiterte Ausgaben" -#: builtin/add.c:280 +#: builtin/add.c:396 msgid "interactive picking" msgstr "interaktives Auswählen" -#: builtin/add.c:281 builtin/checkout.c:1060 builtin/reset.c:258 +#: builtin/add.c:397 builtin/checkout.c:1063 builtin/reset.c:258 msgid "select hunks interactively" msgstr "interaktiv Bereiche auswählen" -#: builtin/add.c:282 +#: builtin/add.c:398 msgid "edit current diff and apply" msgstr "aktuelle Unterschiede editieren und anwenden" -#: builtin/add.c:283 +#: builtin/add.c:399 msgid "allow adding otherwise ignored files" msgstr "erlaubt das Hinzufügen andernfalls ignorierter Dateien" -#: builtin/add.c:284 +#: builtin/add.c:400 msgid "update tracked files" msgstr "aktualisiert beobachtete Dateien" -#: builtin/add.c:285 +#: builtin/add.c:401 msgid "record only the fact that the path will be added later" msgstr "speichert nur, dass der Pfad später hinzugefügt werden soll" -#: builtin/add.c:286 +#: builtin/add.c:402 msgid "add changes from all tracked and untracked files" msgstr "" "fügt Änderungen von allen beobachteten und unbeobachteten Dateien hinzu" -#: builtin/add.c:287 +#. takes no arguments +#: builtin/add.c:405 +msgid "ignore paths removed in the working tree (same as --no-all)" +msgstr "ignoriert gelöschte Pfade im Arbeitsverzeichnis (genau wie " +"--no-all)" + +#: builtin/add.c:407 msgid "don't add, only refresh the index" msgstr "fügt nichts hinzu, aktualisiert nur die Bereitstellung" -#: builtin/add.c:288 +#: builtin/add.c:408 msgid "just skip files which cannot be added because of errors" msgstr "" "überspringt Dateien, die aufgrund von Fehlern nicht hinzugefügt werden " "konnten" -#: builtin/add.c:289 +#: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" msgstr "prüft ob - auch fehlende - Dateien im Probelauf ignoriert werden" -#: builtin/add.c:311 +#: builtin/add.c:431 #, c-format msgid "Use -f if you really want to add them.\n" msgstr "Verwenden Sie -f wenn Sie diese wirklich hinzufügen möchten.\n" -#: builtin/add.c:312 +#: builtin/add.c:432 msgid "no files added" msgstr "keine Dateien hinzugefügt" -#: builtin/add.c:318 +#: builtin/add.c:438 msgid "adding files failed" msgstr "Hinzufügen von Dateien fehlgeschlagen" -#. -#. * To be consistent with "git add -p" and most Git -#. * commands, we should default to being tree-wide, but -#. * this is not the original behavior and can't be -#. * changed until users trained themselves not to type -#. * "git add -u" or "git add -A". For now, we warn and -#. * keep the old behavior. Later, the behavior can be changed -#. * to tree-wide, keeping the warning for a while, and -#. * eventually we can drop the warning. -#. -#: builtin/add.c:335 -#, c-format -msgid "" -"The behavior of 'git add %s (or %s)' with no path argument from a\n" -"subdirectory of the tree will change in Git 2.0 and should not be used " -"anymore.\n" -"To add content for the whole tree, run:\n" -"\n" -" git add %s :/\n" -" (or git add %s :/)\n" -"\n" -"To restrict the command to the current directory, run:\n" -"\n" -" git add %s .\n" -" (or git add %s .)\n" -"\n" -"With the current Git version, the command is restricted to the current " -"directory." -msgstr "" -"Das Verhalten von 'git add %s (oder %s)' ohne ein Pfad-Argument von\n" -"einem Unterverzeichnis aus wird in Git 2.0 geändert und sollte nicht\n" -"mehr verwendet werden.\n" -"Um Dateien des gesamten Projektverzeichnisses hinzuzufügen, führen Sie aus:\n" -"\n" -" git add %s :/\n" -" (oder git add %s :/)\n" -"\n" -"Zur Einschränkung auf das aktuelle Verzeichnis führen Sie aus:\n" -"\n" -" git add %s .\n" -" (oder git add %s .)\n" -"\n" -"Mit der aktuellen Version von Git ist das Kommando auf das aktuelle\n" -"Verzeichnis beschränkt." - -#: builtin/add.c:381 +#: builtin/add.c:477 msgid "-A and -u are mutually incompatible" msgstr "Die Optionen -A und -u sind zueinander inkompatibel." -#: builtin/add.c:383 +#: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "" "Die Option --ignore-missing kann nur zusammen mit --dry-run verwendet werden." -#: builtin/add.c:414 +#: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" msgstr "Nichts spezifiziert, nichts hinzugefügt.\n" -#: builtin/add.c:415 +#: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "Wollten Sie vielleicht 'git add .' sagen?\n" -#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204 +#: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 msgid "index file corrupt" msgstr "Bereitstellungsdatei beschädigt" -#: builtin/add.c:481 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 +#: builtin/add.c:604 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 msgid "Unable to write new index file" msgstr "Konnte neue Bereitstellungsdatei nicht schreiben." @@ -2006,7 +2144,7 @@ msgstr "%s: Patch konnte nicht angewendet werden" msgid "Checking patch %s..." msgstr "Prüfe Patch %s..." -#: builtin/apply.c:3679 builtin/checkout.c:215 builtin/reset.c:124 +#: builtin/apply.c:3679 builtin/checkout.c:216 builtin/reset.c:124 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "make_cache_entry für Pfad '%s' fehlgeschlagen" @@ -2161,7 +2299,7 @@ msgstr "" "erstellt eine temporäre Bereitstellung basierend auf den integrierten " "Bereitstellungsinformationen" -#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:463 +#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" msgstr "Pfade sind getrennt durch NUL Zeichen" @@ -2302,100 +2440,100 @@ msgstr "aktualisiert BISECT_HEAD, anstatt die aktuelle Version auszuchecken" msgid "git blame [options] [rev-opts] [rev] [--] file" msgstr "git blame [Optionen] [rev-opts] [rev] [--] Datei" -#: builtin/blame.c:30 builtin/shortlog.c:15 +#: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" msgstr "[rev-opts] sind dokumentiert in git-rev-list(1)" -#: builtin/blame.c:2350 +#: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" msgstr "Zeigt \"blame\"-Einträge schrittweise, während wir sie generieren" -#: builtin/blame.c:2351 +#: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "Zeigt leere SHA-1 für Grenzversionen (Standard: aus)" -#: builtin/blame.c:2352 +#: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "Behandelt Ursprungsversionen nicht als Grenzen (Standard: aus)" -#: builtin/blame.c:2353 +#: builtin/blame.c:2358 msgid "Show work cost statistics" msgstr "Zeigt Statistiken zum Arbeitsaufwand" -#: builtin/blame.c:2354 +#: builtin/blame.c:2359 msgid "Show output score for blame entries" msgstr "Zeigt Ausgabebewertung für \"blame\"-Einträge" -#: builtin/blame.c:2355 +#: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" msgstr "Zeigt ursprünglichen Dateinamen (Standard: auto)" -#: builtin/blame.c:2356 +#: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" msgstr "Zeigt ursprüngliche Zeilennummer (Standard: aus)" -#: builtin/blame.c:2357 +#: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" msgstr "Anzeige in einem Format für maschinelle Auswertung" -#: builtin/blame.c:2358 +#: builtin/blame.c:2363 msgid "Show porcelain format with per-line commit information" msgstr "" "Anzeige in Format für Fremdprogramme mit Versionsinformationen pro Zeile" -#: builtin/blame.c:2359 +#: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "Benutzt den gleichen Ausgabemodus wie \"git-annotate\" (Standard: aus)" -#: builtin/blame.c:2360 +#: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" msgstr "Zeigt unbearbeiteten Zeitstempel (Standard: aus)" -#: builtin/blame.c:2361 +#: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" msgstr "Zeigt langen Versions-SHA1 (Standard: aus)" -#: builtin/blame.c:2362 +#: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" msgstr "Unterdrückt den Namen des Autors und den Zeitstempel (Standard: aus)" -#: builtin/blame.c:2363 +#: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" msgstr "Zeigt anstatt des Namens die Email-Adresse des Autors (Standard: aus)" -#: builtin/blame.c:2364 +#: builtin/blame.c:2369 msgid "Ignore whitespace differences" msgstr "Ignoriert Unterschiede in Leerzeichen" -#: builtin/blame.c:2365 +#: builtin/blame.c:2370 msgid "Spend extra cycles to find better match" msgstr "arbeite länger, um bessere Übereinstimmungen zu finden" -#: builtin/blame.c:2366 +#: builtin/blame.c:2371 msgid "Use revisions from <file> instead of calling git-rev-list" msgstr "Benutzt Revisionen von <Datei> anstatt \"git-rev-list\" aufzurufen" -#: builtin/blame.c:2367 +#: builtin/blame.c:2372 msgid "Use <file>'s contents as the final image" msgstr "Benutzt Inhalte der <Datei>en als entgültiges Abbild" -#: builtin/blame.c:2368 builtin/blame.c:2369 +#: builtin/blame.c:2373 builtin/blame.c:2374 msgid "score" msgstr "Bewertung" -#: builtin/blame.c:2368 +#: builtin/blame.c:2373 msgid "Find line copies within and across files" msgstr "Findet kopierte Zeilen innerhalb oder zwischen Dateien" -#: builtin/blame.c:2369 +#: builtin/blame.c:2374 msgid "Find line movements within and across files" msgstr "Findet verschobene Zeilen innerhalb oder zwischen Dateien" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "n,m" msgstr "n,m" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "Process only line range n,m, counting from 1" msgstr "Verarbeitet nur Zeilen im Bereich n,m, gezählt von 1" @@ -2415,7 +2553,7 @@ msgstr "git branch [Optionen] [-r] (-d | -D) <Zweigname>..." msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" msgstr "git branch [Optionen] (-m | -M) [<alterZweig>] <neuerZweig>" -#: builtin/branch.c:146 +#: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" @@ -2425,7 +2563,7 @@ msgstr "" " '%s', aber noch nicht mit der Zweigspitze (HEAD) zusammengeführt " "wurde." -#: builtin/branch.c:150 +#: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" @@ -2434,12 +2572,12 @@ msgstr "" "entferne Zweig '%s' nicht, der noch nicht zusammengeführt wurde mit\n" " '%s', obwohl er mit der Zweigspitze (HEAD) zusammengeführt wurde." -#: builtin/branch.c:164 +#: builtin/branch.c:168 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "Konnte Versionsobjekt für '%s' nicht nachschlagen." -#: builtin/branch.c:168 +#: builtin/branch.c:172 #, c-format msgid "" "The branch '%s' is not fully merged.\n" @@ -2449,296 +2587,296 @@ msgstr "" "Wenn Sie sicher sind diesen Zweig zu entfernen, führen Sie 'git branch -D " "%s' aus." -#: builtin/branch.c:181 +#: builtin/branch.c:185 msgid "Update of config-file failed" msgstr "Aktualisierung der Konfigurationsdatei fehlgeschlagen." -#: builtin/branch.c:209 +#: builtin/branch.c:213 msgid "cannot use -a with -d" msgstr "kann -a nicht mit -d benutzen" -#: builtin/branch.c:215 +#: builtin/branch.c:219 msgid "Couldn't look up commit object for HEAD" msgstr "Konnte Versionsobjekt für Zweigspitze (HEAD) nicht nachschlagen." -#: builtin/branch.c:223 +#: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "" "Kann Zweig '%s' nicht entfernen, da Sie sich gerade auf diesem befinden." -#: builtin/branch.c:236 +#: builtin/branch.c:240 #, c-format msgid "remote branch '%s' not found." msgstr "externer Zweig '%s' nicht gefunden" -#: builtin/branch.c:237 +#: builtin/branch.c:241 #, c-format msgid "branch '%s' not found." msgstr "Zweig '%s' nicht gefunden." -#: builtin/branch.c:251 +#: builtin/branch.c:255 #, c-format msgid "Error deleting remote branch '%s'" msgstr "Fehler beim Entfernen des externen Zweiges '%s'" -#: builtin/branch.c:252 +#: builtin/branch.c:256 #, c-format msgid "Error deleting branch '%s'" msgstr "Fehler beim Entfernen des Zweiges '%s'" -#: builtin/branch.c:259 +#: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" msgstr "Externer Zweig %s entfernt (war %s).\n" -#: builtin/branch.c:260 +#: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "Zweig %s entfernt (war %s).\n" -#: builtin/branch.c:362 +#: builtin/branch.c:366 #, c-format msgid "branch '%s' does not point at a commit" msgstr "Zweig '%s' zeigt auf keine Version" -#: builtin/branch.c:434 +#: builtin/branch.c:453 #, c-format msgid "[%s: behind %d]" msgstr "[%s: %d hinterher]" -#: builtin/branch.c:436 +#: builtin/branch.c:455 #, c-format msgid "[behind %d]" msgstr "[%d hinterher]" -#: builtin/branch.c:440 +#: builtin/branch.c:459 #, c-format msgid "[%s: ahead %d]" msgstr "[%s: %d voraus]" -#: builtin/branch.c:442 +#: builtin/branch.c:461 #, c-format msgid "[ahead %d]" msgstr "[%d voraus]" -#: builtin/branch.c:445 +#: builtin/branch.c:464 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "[%s: %d voraus, %d hinterher]" -#: builtin/branch.c:448 +#: builtin/branch.c:467 #, c-format msgid "[ahead %d, behind %d]" msgstr "[%d voraus, %d hinterher]" -#: builtin/branch.c:470 +#: builtin/branch.c:490 msgid " **** invalid ref ****" msgstr " **** ungültige Referenz ****" -#: builtin/branch.c:562 +#: builtin/branch.c:582 #, c-format msgid "(no branch, rebasing %s)" msgstr "(kein Zweig, Neuaufbau von Zweig %s im Gange)" -#: builtin/branch.c:565 +#: builtin/branch.c:585 #, c-format msgid "(no branch, bisect started on %s)" msgstr "(kein Zweig, Neuaufbau begonnen bei %s)" -#: builtin/branch.c:568 +#: builtin/branch.c:588 #, c-format msgid "(detached from %s)" msgstr "(losgelöst von %s)" -#: builtin/branch.c:571 +#: builtin/branch.c:591 msgid "(no branch)" msgstr "(kein Zweig)" -#: builtin/branch.c:617 +#: builtin/branch.c:637 #, c-format msgid "object '%s' does not point to a commit" msgstr "Objekt '%s' zeigt auf keine Version" -#: builtin/branch.c:649 +#: builtin/branch.c:669 msgid "some refs could not be read" msgstr "Konnte einige Referenzen nicht lesen" -#: builtin/branch.c:662 +#: builtin/branch.c:682 msgid "cannot rename the current branch while not on any." msgstr "" "Kann aktuellen Zweig nicht umbenennen, solange Sie sich auf keinem befinden." -#: builtin/branch.c:672 +#: builtin/branch.c:692 #, c-format msgid "Invalid branch name: '%s'" msgstr "Ungültiger Zweig-Name: '%s'" -#: builtin/branch.c:687 +#: builtin/branch.c:707 msgid "Branch rename failed" msgstr "Umbenennung des Zweiges fehlgeschlagen" -#: builtin/branch.c:691 +#: builtin/branch.c:711 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "falsch benannten Zweig '%s' umbenannt" -#: builtin/branch.c:695 +#: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "Zweig umbenannt zu %s, aber Zweigspitze (HEAD) ist nicht aktualisiert!" -#: builtin/branch.c:702 +#: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" msgstr "" "Zweig ist umbenannt, aber die Aktualisierung der Konfigurationsdatei ist " "fehlgeschlagen." -#: builtin/branch.c:717 +#: builtin/branch.c:737 #, c-format msgid "malformed object name %s" msgstr "Missgebildeter Objektname %s" -#: builtin/branch.c:741 +#: builtin/branch.c:761 #, c-format msgid "could not write branch description template: %s" msgstr "Konnte Beschreibungsvorlage für Zweig nicht schreiben: %s" -#: builtin/branch.c:771 +#: builtin/branch.c:791 msgid "Generic options" msgstr "Allgemeine Optionen" -#: builtin/branch.c:773 +#: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" msgstr "Zeigt Hash und Betreff; -vv: zusätzlich externen Übernahmezweig" -#: builtin/branch.c:774 +#: builtin/branch.c:794 msgid "suppress informational messages" msgstr "unterdrückt Informationsmeldungen" -#: builtin/branch.c:775 +#: builtin/branch.c:795 msgid "set up tracking mode (see git-pull(1))" msgstr "stellt den Übernahmemodus ein (siehe git-pull(1))" -#: builtin/branch.c:777 +#: builtin/branch.c:797 msgid "change upstream info" msgstr "ändert Informationen zum externen Übernahmezweig" -#: builtin/branch.c:781 +#: builtin/branch.c:801 msgid "use colored output" msgstr "verwendet farbliche Ausgaben" -#: builtin/branch.c:782 +#: builtin/branch.c:802 msgid "act on remote-tracking branches" msgstr "wirkt auf externe Übernahmezweige" -#: builtin/branch.c:785 builtin/branch.c:791 builtin/branch.c:812 -#: builtin/branch.c:818 builtin/commit.c:1368 builtin/commit.c:1369 +#: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 +#: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 #: builtin/commit.c:1370 builtin/commit.c:1371 builtin/tag.c:468 msgid "commit" msgstr "Version" -#: builtin/branch.c:786 builtin/branch.c:792 +#: builtin/branch.c:806 builtin/branch.c:812 msgid "print only branches that contain the commit" msgstr "gibt nur Zweige aus, welche diese Version beinhalten" -#: builtin/branch.c:798 +#: builtin/branch.c:818 msgid "Specific git-branch actions:" msgstr "spezifische Aktionen für \"git-branch\":" -#: builtin/branch.c:799 +#: builtin/branch.c:819 msgid "list both remote-tracking and local branches" msgstr "listet externe Übernahmezweige und lokale Zweige auf" -#: builtin/branch.c:801 +#: builtin/branch.c:821 msgid "delete fully merged branch" msgstr "entfernt vollständig zusammengeführten Zweig" -#: builtin/branch.c:802 +#: builtin/branch.c:822 msgid "delete branch (even if not merged)" msgstr "löscht Zweig (auch wenn nicht zusammengeführt)" -#: builtin/branch.c:803 +#: builtin/branch.c:823 msgid "move/rename a branch and its reflog" msgstr "verschiebt/benennt einen Zweig und dessen Referenzprotokoll um" -#: builtin/branch.c:804 +#: builtin/branch.c:824 msgid "move/rename a branch, even if target exists" msgstr "" "verschiebt/benennt einen Zweig um, auch wenn das Ziel bereits existiert" -#: builtin/branch.c:805 +#: builtin/branch.c:825 msgid "list branch names" msgstr "listet Zweignamen auf" -#: builtin/branch.c:806 +#: builtin/branch.c:826 msgid "create the branch's reflog" msgstr "erzeugt das Referenzprotokoll des Zweiges" -#: builtin/branch.c:808 +#: builtin/branch.c:828 msgid "edit the description for the branch" msgstr "bearbeitet die Beschreibung für den Zweig" -#: builtin/branch.c:809 +#: builtin/branch.c:829 msgid "force creation (when already exists)" msgstr "erzeuge auch, wenn der Zweig bereits existiert" -#: builtin/branch.c:812 +#: builtin/branch.c:832 msgid "print only not merged branches" msgstr "gibt nur Zweige aus, die nicht zusammengeführt sind" -#: builtin/branch.c:818 +#: builtin/branch.c:838 msgid "print only merged branches" msgstr "gibt nur Zweige aus, die zusammengeführt sind" -#: builtin/branch.c:822 +#: builtin/branch.c:842 msgid "list branches in columns" msgstr "listet Zweige in Spalten auf" -#: builtin/branch.c:835 +#: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." msgstr "Konnte Zweigspitze (HEAD) nicht als gültige Referenz auflösen." -#: builtin/branch.c:840 builtin/clone.c:609 +#: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" msgstr "Zweigspitze (HEAD) wurde nicht unter \"refs/heads\" gefunden!" -#: builtin/branch.c:863 +#: builtin/branch.c:883 msgid "--column and --verbose are incompatible" msgstr "Die Optionen --column und --verbose sind inkompatibel." -#: builtin/branch.c:869 builtin/branch.c:908 +#: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" msgstr "Zweigname erforderlich" -#: builtin/branch.c:884 +#: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" msgstr "" "zu losgelöster Zweigspitze (HEAD) kann keine Beschreibung hinterlegt werden" -#: builtin/branch.c:889 +#: builtin/branch.c:909 msgid "cannot edit description of more than one branch" msgstr "Beschreibung von mehr als einem Zweig kann nicht bearbeitet werden" -#: builtin/branch.c:896 +#: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." msgstr "Noch keine Version in Zweig '%s'." -#: builtin/branch.c:899 +#: builtin/branch.c:919 #, c-format msgid "No branch named '%s'." msgstr "Zweig '%s' nicht vorhanden." -#: builtin/branch.c:914 +#: builtin/branch.c:934 msgid "too many branches for a rename operation" msgstr "zu viele Zweige für eine Umbenennen-Operation angegeben" -#: builtin/branch.c:919 +#: builtin/branch.c:939 msgid "too many branches to set new upstream" msgstr "zu viele Zweige angegeben um neuen Übernahmezweig zu setzen" -#: builtin/branch.c:923 +#: builtin/branch.c:943 #, c-format msgid "" "could not set upstream of HEAD to %s when it does not point to any branch." @@ -2746,41 +2884,43 @@ msgstr "" "Konnte keinen neuen Übernahmezweig von Zweigspitze (HEAD) zu %s setzen,\n" "da diese auf keinen Zweig zeigt." -#: builtin/branch.c:926 builtin/branch.c:948 builtin/branch.c:970 +#: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" msgstr "Kein solcher Zweig '%s'" -#: builtin/branch.c:930 +#: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" msgstr "Zweig '%s' existiert nicht" -#: builtin/branch.c:942 +#: builtin/branch.c:962 msgid "too many branches to unset upstream" -msgstr "zu viele Zweige angegeben um Konfiguration zu Übernahmezweig zu entfernen" +msgstr "" +"zu viele Zweige angegeben um Konfiguration zu Übernahmezweig zu entfernen" -#: builtin/branch.c:946 +#: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." -msgstr "Konnte Konfiguration zum Übernahmezweig von Zweigspitze (HEAD) nicht\n" +msgstr "" +"Konnte Konfiguration zum Übernahmezweig von Zweigspitze (HEAD) nicht\n" "entfernen, da diese auf keinen Zweig zeigt." -#: builtin/branch.c:952 +#: builtin/branch.c:972 #, c-format msgid "Branch '%s' has no upstream information" msgstr "Zweig '%s' hat keinen externen Übernahmezweig gesetzt" -#: builtin/branch.c:967 +#: builtin/branch.c:987 msgid "it does not make sense to create 'HEAD' manually" msgstr "'HEAD' darf nicht manuell erstellt werden" -#: builtin/branch.c:973 +#: builtin/branch.c:993 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "" "Die Optionen -a und -r bei 'git branch' können nicht gemeimsam mit einem " "Zweignamen verwendet werden." -#: builtin/branch.c:976 +#: builtin/branch.c:996 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" @@ -2789,7 +2929,7 @@ msgstr "" "Die --set-upstream Option ist veraltet und wird entfernt. Benutzen Sie --" "track oder --set-upstream-to\n" -#: builtin/branch.c:993 +#: builtin/branch.c:1013 #, c-format msgid "" "\n" @@ -2800,12 +2940,12 @@ msgstr "" "Wenn Sie wollten, dass '%s' den Zweig '%s' als externen Übernahmezweig hat, " "führen Sie aus:\n" -#: builtin/branch.c:994 +#: builtin/branch.c:1014 #, c-format msgid " git branch -d %s\n" msgstr " git branch -d %s\n" -#: builtin/branch.c:995 +#: builtin/branch.c:1015 #, c-format msgid " git branch --set-upstream-to %s\n" msgstr " git branch --set-upstream-to %s\n" @@ -2823,45 +2963,45 @@ msgstr "Um ein Paket zu erstellen wird ein Projektarchiv benötigt." msgid "Need a repository to unbundle." msgstr "Zum Entpacken wird ein Projektarchiv benötigt." -#: builtin/cat-file.c:247 +#: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" msgstr "git cat-file (-t|-s|-e|-p|<Art>|--textconv) <Objekt>" -#: builtin/cat-file.c:248 +#: builtin/cat-file.c:177 msgid "git cat-file (--batch|--batch-check) < <list_of_objects>" msgstr "git cat-file (--batch|--batch-check) < <Liste_von_Objekten>" -#: builtin/cat-file.c:266 +#: builtin/cat-file.c:195 msgid "<type> can be one of: blob, tree, commit, tag" msgstr "<Art> kann sein: blob, tree, commit, tag" -#: builtin/cat-file.c:267 +#: builtin/cat-file.c:196 msgid "show object type" msgstr "zeigt Objektart" -#: builtin/cat-file.c:268 +#: builtin/cat-file.c:197 msgid "show object size" msgstr "zeigt Objektgröße" -#: builtin/cat-file.c:270 +#: builtin/cat-file.c:199 msgid "exit with zero when there's no error" msgstr "beendet mit Rückgabewert 0, wenn kein Fehler aufgetreten ist" -#: builtin/cat-file.c:271 +#: builtin/cat-file.c:200 msgid "pretty-print object's content" msgstr "ansprechende Anzeige des Objektinhaltes" -#: builtin/cat-file.c:273 +#: builtin/cat-file.c:202 msgid "for blob objects, run textconv on object's content" msgstr "führt eine Textkonvertierung auf den Inhalt von Blob-Objekten aus" -#: builtin/cat-file.c:275 +#: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" msgstr "" "Anzeige von Informationen und Inhalt von Objekten, gelesen von der Standard-" "Eingabe" -#: builtin/cat-file.c:278 +#: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" msgstr "" "Anzeige von Informationen über Objekte, gelesen von der Standard-Eingabe" @@ -2891,27 +3031,27 @@ msgstr "liest Dateinamen von der Standard-Eingabe" msgid "input paths are terminated by a null character" msgstr "Eingabepfade sind durch ein NUL Zeichen abgeschlossen" -#: builtin/check-ignore.c:18 builtin/checkout.c:1041 builtin/gc.c:177 +#: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" msgstr "unterdrückt Fortschrittsanzeige" -#: builtin/check-ignore.c:151 +#: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" msgstr "Angabe von Pfadnamen kann nicht gemeinsam mit --stdin verwendet werden" -#: builtin/check-ignore.c:154 +#: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" msgstr "Die Option -z kann nur mit --stdin verwendet werden." -#: builtin/check-ignore.c:156 +#: builtin/check-ignore.c:151 msgid "no path specified" msgstr "kein Pfad angegeben" -#: builtin/check-ignore.c:160 +#: builtin/check-ignore.c:155 msgid "--quiet is only valid with a single pathname" msgstr "Die Option --quiet ist nur mit einem einzelnen Pfadnamen gültig." -#: builtin/check-ignore.c:162 +#: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" msgstr "" "Die Optionen --quiet und --verbose können nicht gemeinsam verwendet werden." @@ -2971,106 +3111,106 @@ msgstr "git checkout [Optionen] <Zweig>" msgid "git checkout [options] [<branch>] -- <file>..." msgstr "git checkout [Optionen] [Zweig>] -- <Datei>..." -#: builtin/checkout.c:116 builtin/checkout.c:149 +#: builtin/checkout.c:117 builtin/checkout.c:150 #, c-format msgid "path '%s' does not have our version" msgstr "Pfad '%s' hat nicht unsere Version." -#: builtin/checkout.c:118 builtin/checkout.c:151 +#: builtin/checkout.c:119 builtin/checkout.c:152 #, c-format msgid "path '%s' does not have their version" msgstr "Pfad '%s' hat nicht deren Version." -#: builtin/checkout.c:134 +#: builtin/checkout.c:135 #, c-format msgid "path '%s' does not have all necessary versions" msgstr "Pfad '%s' hat nicht alle notwendigen Versionen." -#: builtin/checkout.c:178 +#: builtin/checkout.c:179 #, c-format msgid "path '%s' does not have necessary versions" msgstr "Pfad '%s' hat nicht die notwendigen Versionen." -#: builtin/checkout.c:195 +#: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" msgstr "Pfad '%s': kann nicht zusammenführen" -#: builtin/checkout.c:212 +#: builtin/checkout.c:213 #, c-format msgid "Unable to add merge result for '%s'" msgstr "Konnte Ergebnis der Zusammenführung von '%s' nicht hinzufügen." -#: builtin/checkout.c:236 builtin/checkout.c:239 builtin/checkout.c:242 -#: builtin/checkout.c:245 +#: builtin/checkout.c:237 builtin/checkout.c:240 builtin/checkout.c:243 +#: builtin/checkout.c:246 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "'%s' kann nicht mit Pfaden verwendet werden" -#: builtin/checkout.c:248 builtin/checkout.c:251 +#: builtin/checkout.c:249 builtin/checkout.c:252 #, c-format msgid "'%s' cannot be used with %s" msgstr "'%s' kann nicht mit '%s' verwendet werden" -#: builtin/checkout.c:254 +#: builtin/checkout.c:255 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "Kann nicht gleichzeitig Pfade aktualisieren und zu Zweig '%s' wechseln" -#: builtin/checkout.c:265 builtin/checkout.c:455 +#: builtin/checkout.c:266 builtin/checkout.c:458 msgid "corrupt index file" msgstr "beschädigte Bereitstellungsdatei" -#: builtin/checkout.c:326 builtin/checkout.c:333 +#: builtin/checkout.c:329 builtin/checkout.c:336 #, c-format msgid "path '%s' is unmerged" msgstr "Pfad '%s' ist nicht zusammengeführt." -#: builtin/checkout.c:477 +#: builtin/checkout.c:480 msgid "you need to resolve your current index first" msgstr "Sie müssen zuerst Ihre aktuelle Bereitstellung auflösen." -#: builtin/checkout.c:598 +#: builtin/checkout.c:601 #, c-format msgid "Can not do reflog for '%s'\n" msgstr "Konnte \"reflog\" für '%s' nicht durchführen\n" -#: builtin/checkout.c:631 +#: builtin/checkout.c:634 msgid "HEAD is now at" msgstr "Zweigspitze (HEAD) ist jetzt bei" -#: builtin/checkout.c:638 +#: builtin/checkout.c:641 #, c-format msgid "Reset branch '%s'\n" msgstr "Setze Zweig '%s' neu\n" -#: builtin/checkout.c:641 +#: builtin/checkout.c:644 #, c-format msgid "Already on '%s'\n" msgstr "Bereits auf '%s'\n" -#: builtin/checkout.c:645 +#: builtin/checkout.c:648 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "Gewechselt zu neu gesetztem Zweig '%s'\n" -#: builtin/checkout.c:647 builtin/checkout.c:984 +#: builtin/checkout.c:650 builtin/checkout.c:987 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "Gewechselt zu einem neuen Zweig '%s'\n" -#: builtin/checkout.c:649 +#: builtin/checkout.c:652 #, c-format msgid "Switched to branch '%s'\n" msgstr "Gewechselt zu Zweig '%s'\n" -#: builtin/checkout.c:705 +#: builtin/checkout.c:708 #, c-format msgid " ... and %d more.\n" msgstr " ... und %d weitere.\n" #. The singular version -#: builtin/checkout.c:711 +#: builtin/checkout.c:714 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -3093,7 +3233,7 @@ msgstr[1] "" "\n" "%s\n" -#: builtin/checkout.c:729 +#: builtin/checkout.c:732 #, c-format msgid "" "If you want to keep them by creating a new branch, this may be a good time\n" @@ -3108,132 +3248,136 @@ msgstr "" " git branch neuer_zweig_name %s\n" "\n" -#: builtin/checkout.c:759 +#: builtin/checkout.c:762 msgid "internal error in revision walk" msgstr "interner Fehler im Revisionsgang" -#: builtin/checkout.c:763 +#: builtin/checkout.c:766 msgid "Previous HEAD position was" msgstr "Vorherige Position der Zweigspitze (HEAD) war" -#: builtin/checkout.c:790 builtin/checkout.c:979 +#: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" msgstr "Sie sind auf einem Zweig, der noch geboren wird" #. case (1) -#: builtin/checkout.c:915 +#: builtin/checkout.c:918 #, c-format msgid "invalid reference: %s" msgstr "Ungültige Referenz: %s" #. case (1): want a tree -#: builtin/checkout.c:954 +#: builtin/checkout.c:957 #, c-format msgid "reference is not a tree: %s" msgstr "Referenz ist kein Baum: %s" -#: builtin/checkout.c:993 +#: builtin/checkout.c:996 msgid "paths cannot be used with switching branches" msgstr "Pfade können nicht beim Wechseln von Zweigen verwendet werden" -#: builtin/checkout.c:996 builtin/checkout.c:1000 +#: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "'%s' kann nicht beim Wechseln von Zweigen verwendet werden" -#: builtin/checkout.c:1004 builtin/checkout.c:1007 builtin/checkout.c:1012 -#: builtin/checkout.c:1015 +#: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 +#: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "'%s' kann nicht mit '%s' verwendet werden" -#: builtin/checkout.c:1020 +#: builtin/checkout.c:1023 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "Kann Zweig nicht zu Nicht-Version '%s' wechseln" -#: builtin/checkout.c:1042 builtin/checkout.c:1044 builtin/clone.c:90 +#: builtin/checkout.c:1045 builtin/checkout.c:1047 builtin/clone.c:90 #: builtin/remote.c:169 builtin/remote.c:171 msgid "branch" msgstr "Zweig" -#: builtin/checkout.c:1043 +#: builtin/checkout.c:1046 msgid "create and checkout a new branch" msgstr "erzeugt und checkt einen neuen Zweig aus" -#: builtin/checkout.c:1045 +#: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" msgstr "erzeugt/setzt neu und checkt einen Zweig aus" -#: builtin/checkout.c:1046 +#: builtin/checkout.c:1049 msgid "create reflog for new branch" msgstr "erzeugt Referenzprotokoll für den neuen Zweig" -#: builtin/checkout.c:1047 +#: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" msgstr "setzt die Zweigspitze (HEAD) zu benannter Version" -#: builtin/checkout.c:1048 +#: builtin/checkout.c:1051 msgid "set upstream info for new branch" msgstr "setzt Informationen zum externen Übernahmezweig für den neuen Zweig" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new branch" msgstr "neuer Zweig" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new unparented branch" msgstr "neuer Zweig ohne Elternversion" -#: builtin/checkout.c:1051 +#: builtin/checkout.c:1054 msgid "checkout our version for unmerged files" msgstr "checkt unsere Variante für nicht zusammengeführte Dateien aus" -#: builtin/checkout.c:1053 +#: builtin/checkout.c:1056 msgid "checkout their version for unmerged files" msgstr "checkt ihre Variante für nicht zusammengeführte Dateien aus" -#: builtin/checkout.c:1055 +#: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" msgstr "erzwingt Auschecken (verwirft lokale Änderungen)" -#: builtin/checkout.c:1056 +#: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" msgstr "führt eine 3-Wege-Zusammenführung mit dem neuen Zweig aus" -#: builtin/checkout.c:1057 builtin/merge.c:217 +#: builtin/checkout.c:1060 builtin/merge.c:217 msgid "update ignored files (default)" msgstr "aktualisiert ignorierte Dateien (Standard)" -#: builtin/checkout.c:1058 builtin/log.c:1149 parse-options.h:245 +#: builtin/checkout.c:1061 builtin/log.c:1158 parse-options.h:245 msgid "style" msgstr "Stil" -#: builtin/checkout.c:1059 +#: builtin/checkout.c:1062 msgid "conflict style (merge or diff3)" msgstr "Konfliktstil (merge oder diff3)" -#: builtin/checkout.c:1062 +#: builtin/checkout.c:1065 +msgid "do not limit pathspecs to sparse entries only" +msgstr "Pfadspezifikationen ignorieren Einstellungen zum partiellen Auschecken" + +#: builtin/checkout.c:1067 msgid "second guess 'git checkout no-such-branch'" msgstr "second guess 'git checkout no-such-branch'" -#: builtin/checkout.c:1086 +#: builtin/checkout.c:1091 msgid "-b, -B and --orphan are mutually exclusive" msgstr "Die Optionen -b, -B und --orphan schließen sich gegenseitig aus." -#: builtin/checkout.c:1103 +#: builtin/checkout.c:1108 msgid "--track needs a branch name" msgstr "Bei der Option --track muss ein Zweigname angegeben werden." -#: builtin/checkout.c:1110 +#: builtin/checkout.c:1115 msgid "Missing branch name; try -b" msgstr "Vermisse Zweignamen; versuchen Sie -b" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1150 msgid "invalid path specification" msgstr "ungültige Pfadspezifikation" -#: builtin/checkout.c:1152 +#: builtin/checkout.c:1157 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" @@ -3243,12 +3387,12 @@ msgstr "" "Haben Sie beabsichtigt '%s' auszuchecken, welcher nicht als Version " "aufgelöst werden kann?" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "git checkout: --detach nimmt kein Pfad-Argument '%s'" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -3298,7 +3442,7 @@ msgid "remove whole directories" msgstr "löscht ganze Verzeichnisse" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 -#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182 +#: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" msgstr "Muster" @@ -3427,47 +3571,47 @@ msgstr "Schlüssel=Wert" msgid "set config inside the new repository" msgstr "setzt Konfiguration innerhalb des neuen Projektarchivs" -#: builtin/clone.c:244 +#: builtin/clone.c:254 #, c-format -msgid "reference repository '%s' is not a local directory." -msgstr "Referenziertes Projektarchiv '%s' ist kein lokales Verzeichnis." +msgid "reference repository '%s' is not a local repository." +msgstr "Referenziertes Projektarchiv '%s' ist kein lokales Projektarchiv." -#: builtin/clone.c:307 +#: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" msgstr "Fehler beim Erstellen von Verzeichnis '%s'" -#: builtin/clone.c:309 builtin/diff.c:77 +#: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" msgstr "Konnte '%s' nicht lesen" -#: builtin/clone.c:311 +#: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" msgstr "%s existiert und ist kein Verzeichnis" -#: builtin/clone.c:325 +#: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" msgstr "Konnte %s nicht lesen\n" -#: builtin/clone.c:347 +#: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" msgstr "Konnte Verknüpfung '%s' nicht erstellen" -#: builtin/clone.c:351 +#: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" msgstr "Konnte Datei nicht nach '%s' kopieren" -#: builtin/clone.c:374 +#: builtin/clone.c:384 #, c-format msgid "done.\n" msgstr "Fertig.\n" -#: builtin/clone.c:387 +#: builtin/clone.c:397 msgid "" "Clone succeeded, but checkout failed.\n" "You can inspect what was checked out with 'git status'\n" @@ -3477,94 +3621,94 @@ msgstr "" "Sie können mit 'git status' prüfen, was ausgecheckt worden ist\n" "und das Auschecken mit 'git checkout -f HEAD' erneut versuchen.\n" -#: builtin/clone.c:466 +#: builtin/clone.c:476 #, c-format msgid "Could not find remote branch %s to clone." msgstr "Konnte zu klonenden externer Zweig %s nicht finden." -#: builtin/clone.c:540 +#: builtin/clone.c:550 msgid "remote did not send all necessary objects" msgstr "Fernarchiv hat nicht alle erforderlichen Objekte gesendet." -#: builtin/clone.c:600 +#: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "" "Externe Zweigspitze (HEAD) bezieht sich auf eine nicht existierende Referenz " "und kann nicht ausgecheckt werden.\n" -#: builtin/clone.c:631 +#: builtin/clone.c:641 msgid "unable to checkout working tree" msgstr "Arbeitsbaum konnte nicht ausgecheckt werden" -#: builtin/clone.c:739 +#: builtin/clone.c:749 msgid "Too many arguments." msgstr "Zu viele Argumente." -#: builtin/clone.c:743 +#: builtin/clone.c:753 msgid "You must specify a repository to clone." msgstr "Sie müssen ein Projektarchiv zum Klonen angeben." -#: builtin/clone.c:754 +#: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "Die Optionen --bare und --origin %s sind inkompatibel." -#: builtin/clone.c:757 +#: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." msgstr "Die Optionen --bare und --separate-git-dir sind inkompatibel." -#: builtin/clone.c:770 +#: builtin/clone.c:780 #, c-format msgid "repository '%s' does not exist" msgstr "Projektarchiv '%s' existiert nicht." -#: builtin/clone.c:775 +#: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." msgstr "" "Die Option --depth wird in lokalen Klonen ignoriert; benutzen Sie " "stattdessen file://" -#: builtin/clone.c:785 +#: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "Zielpfad '%s' existiert bereits und ist kein leeres Verzeichnis." -#: builtin/clone.c:795 +#: builtin/clone.c:805 #, c-format msgid "working tree '%s' already exists." msgstr "Arbeitsbaum '%s' existiert bereits." -#: builtin/clone.c:808 builtin/clone.c:820 +#: builtin/clone.c:818 builtin/clone.c:830 #, c-format msgid "could not create leading directories of '%s'" msgstr "Konnte führende Verzeichnisse von '%s' nicht erstellen." -#: builtin/clone.c:811 +#: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." msgstr "Konnte Arbeitsverzeichnis '%s' nicht erstellen." -#: builtin/clone.c:830 +#: builtin/clone.c:840 #, c-format msgid "Cloning into bare repository '%s'...\n" msgstr "Klone in bloßes Projektarchiv '%s'...\n" -#: builtin/clone.c:832 +#: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" msgstr "Klone nach '%s'...\n" -#: builtin/clone.c:867 +#: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" msgstr "Weiß nicht wie %s zu klonen ist." -#: builtin/clone.c:916 +#: builtin/clone.c:926 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "externer Zweig %s nicht im anderen Projektarchiv %s gefunden" -#: builtin/clone.c:923 +#: builtin/clone.c:933 msgid "You appear to have cloned an empty repository." msgstr "Sie scheinen ein leeres Projektarchiv geklont zu haben." @@ -3716,7 +3860,7 @@ msgstr "Fehlerhafte Identifikations-String: '%s'" msgid "could not lookup commit %s" msgstr "Konnte Version %s nicht nachschlagen" -#: builtin/commit.c:612 builtin/shortlog.c:272 +#: builtin/commit.c:612 builtin/shortlog.c:270 #, c-format msgid "(reading log message from standard input)\n" msgstr "(lese Log-Nachricht von Standard-Eingabe)\n" @@ -3930,8 +4074,8 @@ msgstr "zeigt Status im Langformat (Standard)" msgid "terminate entries with NUL" msgstr "schließt Einträge mit NUL-Zeichen ab" -#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:653 -#: builtin/fast-export.c:656 builtin/tag.c:459 +#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:659 +#: builtin/fast-export.c:662 builtin/tag.c:459 msgid "mode" msgstr "Modus" @@ -4042,7 +4186,7 @@ msgstr "" msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "Setzt Sie als Autor der Version (verwendet mit -C/-c/--amend)" -#: builtin/commit.c:1373 builtin/log.c:1104 builtin/revert.c:109 +#: builtin/commit.c:1373 builtin/log.c:1113 builtin/revert.c:109 msgid "add Signed-off-by:" msgstr "fügt 'Signed-off-by:'-Zeile hinzu" @@ -4297,8 +4441,12 @@ msgid "respect include directives on lookup" msgstr "beachtet \"include\"-Direktiven beim Nachschlagen" #: builtin/count-objects.c:82 -msgid "git count-objects [-v]" -msgstr "git count-objects [-v]" +msgid "git count-objects [-v] [-H | --human-readable]" +msgstr "git count-objects [-v] [-H | --human-readable]" + +#: builtin/count-objects.c:97 +msgid "print sizes in human readable format" +msgstr "gibt Größenangaben in menschenlesbaren Format aus" #: builtin/describe.c:15 msgid "git describe [options] <committish>*" @@ -4475,40 +4623,40 @@ msgstr "unbehandeltes Objekt '%s' angegeben" msgid "git fast-export [rev-list-opts]" msgstr "git fast-export [rev-list-opts]" -#: builtin/fast-export.c:652 +#: builtin/fast-export.c:658 msgid "show progress after <n> objects" msgstr "zeigt Fortschritt nach <n> Objekten an" -#: builtin/fast-export.c:654 +#: builtin/fast-export.c:660 msgid "select handling of signed tags" msgstr "wählt Behandlung von signierten Markierungen" -#: builtin/fast-export.c:657 +#: builtin/fast-export.c:663 msgid "select handling of tags that tag filtered objects" msgstr "wählt Behandlung von Markierungen, die gefilterte Objekte markieren" -#: builtin/fast-export.c:660 +#: builtin/fast-export.c:666 msgid "Dump marks to this file" msgstr "Schreibt Kennzeichen in diese Datei" -#: builtin/fast-export.c:662 +#: builtin/fast-export.c:668 msgid "Import marks from this file" msgstr "Importiert Kennzeichen von dieser Datei" -#: builtin/fast-export.c:664 +#: builtin/fast-export.c:670 msgid "Fake a tagger when tags lack one" msgstr "" "erzeugt künstlich einen Markierungsersteller, wenn die Markierung keinen hat" -#: builtin/fast-export.c:666 +#: builtin/fast-export.c:672 msgid "Output full tree for each commit" msgstr "gibt für jede Version den gesamten Baum aus" -#: builtin/fast-export.c:668 +#: builtin/fast-export.c:674 msgid "Use the done feature to terminate the stream" msgstr "Benutzt die \"done\"-Funktion um den Strom abzuschließen" -#: builtin/fast-export.c:669 +#: builtin/fast-export.c:675 msgid "Skip output of blob data" msgstr "Überspringt Ausgabe von Blob-Daten" @@ -4585,7 +4733,7 @@ msgstr "vertieft die Historie eines flachen Klon" msgid "convert to a complete repository" msgstr "konvertiert zu einem vollständigen Projektarchiv" -#: builtin/fetch.c:88 builtin/log.c:1121 +#: builtin/fetch.c:88 builtin/log.c:1130 msgid "dir" msgstr "Verzeichnis" @@ -4773,29 +4921,29 @@ msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" msgstr "" "git fmt-merge-msg [-m <Beschreibung>] [--log[=<n>]|--no-log] [--file <Datei>]" -#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701 -#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175 +#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:701 +#: builtin/merge.c:188 builtin/show-branch.c:655 builtin/show-ref.c:175 #: builtin/tag.c:446 parse-options.h:133 parse-options.h:239 msgid "n" msgstr "Anzahl" -#: builtin/fmt-merge-msg.c:660 +#: builtin/fmt-merge-msg.c:664 msgid "populate log with at most <n> entries from shortlog" msgstr "fügt Historie mit höchstens <n> Einträgen von \"shortlog\" hinzu" -#: builtin/fmt-merge-msg.c:663 +#: builtin/fmt-merge-msg.c:667 msgid "alias for --log (deprecated)" msgstr "Alias für --log (veraltet)" -#: builtin/fmt-merge-msg.c:666 +#: builtin/fmt-merge-msg.c:670 msgid "text" msgstr "Text" -#: builtin/fmt-merge-msg.c:667 +#: builtin/fmt-merge-msg.c:671 msgid "use <text> as start of message" msgstr "verwendet <Text> als Beschreibungsanfang" -#: builtin/fmt-merge-msg.c:668 +#: builtin/fmt-merge-msg.c:672 msgid "file to read from" msgstr "Datei zum Einlesen" @@ -5199,50 +5347,54 @@ msgstr "speichert Datei wie sie ist, ohne Filter" msgid "process file as it were from this path" msgstr "verarbeitet Datei, als ob sie von diesem Pfad wäre" -#: builtin/help.c:42 +#: builtin/help.c:43 msgid "print all available commands" msgstr "Anzeige aller vorhandenen Kommandos" -#: builtin/help.c:43 +#: builtin/help.c:44 +msgid "print list of useful guides" +msgstr "zeigt Liste von allgemein verwendeten Anleitungen" + +#: builtin/help.c:45 msgid "show man page" msgstr "zeigt Handbuch" -#: builtin/help.c:44 +#: builtin/help.c:46 msgid "show manual in web browser" msgstr "zeigt Handbuch in einem Webbrowser" -#: builtin/help.c:46 +#: builtin/help.c:48 msgid "show info page" msgstr "zeigt Info-Seite" -#: builtin/help.c:52 -msgid "git help [--all] [--man|--web|--info] [command]" -msgstr "git help [--all] [--man|--web|--info] [Kommando]" +#: builtin/help.c:54 +msgid "git help [--all] [--guides] [--man|--web|--info] [command]" +msgstr "git help [--all] [--guides] [--man|--web|--info] [Kommando]" -#: builtin/help.c:64 +#: builtin/help.c:66 #, c-format msgid "unrecognized help format '%s'" msgstr "nicht erkanntes Hilfeformat: %s" -#: builtin/help.c:92 +#: builtin/help.c:94 msgid "Failed to start emacsclient." msgstr "Konnte emacsclient nicht starten." -#: builtin/help.c:105 +#: builtin/help.c:107 msgid "Failed to parse emacsclient version." msgstr "Konnte Version des emacsclient nicht parsen." -#: builtin/help.c:113 +#: builtin/help.c:115 #, c-format msgid "emacsclient version '%d' too old (< 22)." msgstr "Version des emacsclient '%d' ist zu alt (< 22)." -#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176 +#: builtin/help.c:133 builtin/help.c:161 builtin/help.c:170 builtin/help.c:178 #, c-format msgid "failed to exec '%s': %s" msgstr "Fehler beim Ausführen von '%s': %s" -#: builtin/help.c:216 +#: builtin/help.c:218 #, c-format msgid "" "'%s': path for unsupported man viewer.\n" @@ -5251,7 +5403,7 @@ msgstr "" "'%s': Pfad für nicht unterstützten Handbuchbetrachter.\n" "Sie könnten stattdessen 'man.<Werkzeug>.cmd' benutzen." -#: builtin/help.c:228 +#: builtin/help.c:230 #, c-format msgid "" "'%s': cmd for supported man viewer.\n" @@ -5260,25 +5412,57 @@ msgstr "" "'%s': Kommando für unterstützten Handbuchbetrachter.\n" "Sie könnten stattdessen 'man.<Werkzeug>.path' benutzen." -#: builtin/help.c:349 +#: builtin/help.c:351 #, c-format msgid "'%s': unknown man viewer." msgstr "'%s': unbekannter Handbuch-Betrachter." -#: builtin/help.c:366 +#: builtin/help.c:368 msgid "no man viewer handled the request" msgstr "kein Handbuch-Betrachter konnte mit dieser Anfrage umgehen" -#: builtin/help.c:374 +#: builtin/help.c:376 msgid "no info viewer handled the request" msgstr "kein Informations-Betrachter konnte mit dieser Anfrage umgehen" -#: builtin/help.c:429 builtin/help.c:436 +#: builtin/help.c:422 +msgid "Defining attributes per path" +msgstr "Definition von Attributen pro Pfad" + +#: builtin/help.c:423 +msgid "A Git glossary" +msgstr "Ein Git-Glossar" + +#: builtin/help.c:424 +msgid "Specifies intentionally untracked files to ignore" +msgstr "Spezifikation von bewusst ignorierten, unbeobachteten Dateien" + +#: builtin/help.c:425 +msgid "Defining submodule properties" +msgstr "Definition von Unterprojekt-Eigenschaften" + +#: builtin/help.c:426 +msgid "Specifying revisions and ranges for Git" +msgstr "Spezifikation von Revisionen und Bereichen für Git" + +#: builtin/help.c:427 +msgid "A tutorial introduction to Git (for version 1.5.1 or newer)" +msgstr "Eine einführende Anleitung zu Git (für Version 1.5.1 oder neuer)" + +#: builtin/help.c:428 +msgid "An overview of recommended workflows with Git" +msgstr "Eine Übersicht über empfohlene Arbeitsabläufe mit Git" + +#: builtin/help.c:440 +msgid "The common Git guides are:\n" +msgstr "Die allgemein verwendeten Git-Anleitungen sind:\n" + +#: builtin/help.c:462 builtin/help.c:478 #, c-format msgid "usage: %s%s" msgstr "Verwendung: %s%s" -#: builtin/help.c:452 +#: builtin/help.c:494 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "für `git %s' wurde der Alias `%s' angelegt" @@ -5727,8 +5911,8 @@ msgid "Cannot access work tree '%s'" msgstr "Kann nicht auf Arbeitsbaum '%s' zugreifen." #: builtin/log.c:40 -msgid "git log [<options>] [<since>..<until>] [[--] <path>...]\n" -msgstr "git log [<Optionen>] [<seit>..<bis>] [[--] <Pfad>...]\n" +msgid "git log [<options>] [<revision range>] [[--] <path>...]\n" +msgstr "git log [<Optionen>] [Revisionsbereich>] [[--] <Pfad>...]\n" #: builtin/log.c:41 msgid " or: git show [options] <object>..." @@ -5765,203 +5949,203 @@ msgstr "Kann Objekt %s nicht lesen." msgid "Unknown type: %d" msgstr "Unbekannter Typ: %d" -#: builtin/log.c:630 +#: builtin/log.c:638 msgid "format.headers without value" msgstr "format.headers ohne Wert" -#: builtin/log.c:704 +#: builtin/log.c:720 msgid "name of output directory is too long" msgstr "Name des Ausgabeverzeichnisses ist zu lang." -#: builtin/log.c:720 +#: builtin/log.c:736 #, c-format msgid "Cannot open patch file %s" msgstr "Kann Patch-Datei %s nicht öffnen" -#: builtin/log.c:734 +#: builtin/log.c:750 msgid "Need exactly one range." msgstr "Brauche genau einen Versionsbereich." -#: builtin/log.c:742 +#: builtin/log.c:758 msgid "Not a range." msgstr "Kein Versionsbereich." -#: builtin/log.c:815 +#: builtin/log.c:860 msgid "Cover letter needs email format" msgstr "Anschreiben benötigt E-Mail-Format" -#: builtin/log.c:888 +#: builtin/log.c:936 #, c-format msgid "insane in-reply-to: %s" msgstr "ungültiges in-reply-to: %s" -#: builtin/log.c:916 +#: builtin/log.c:964 msgid "git format-patch [options] [<since> | <revision range>]" msgstr "git format-patch [Optionen] [<seit> | <Revisionsbereich>]" -#: builtin/log.c:961 +#: builtin/log.c:1009 msgid "Two output directories?" msgstr "Zwei Ausgabeverzeichnisse?" -#: builtin/log.c:1099 +#: builtin/log.c:1108 msgid "use [PATCH n/m] even with a single patch" msgstr "verwendet [PATCH n/m] auch mit einzelnem Patch" -#: builtin/log.c:1102 +#: builtin/log.c:1111 msgid "use [PATCH] even with multiple patches" msgstr "verwendet [PATCH] auch mit mehreren Patches" -#: builtin/log.c:1106 +#: builtin/log.c:1115 msgid "print patches to standard out" msgstr "Ausgabe der Patches in Standard-Ausgabe" -#: builtin/log.c:1108 +#: builtin/log.c:1117 msgid "generate a cover letter" msgstr "erzeugt ein Deckblatt" -#: builtin/log.c:1110 +#: builtin/log.c:1119 msgid "use simple number sequence for output file names" msgstr "verwendet einfache Nummernfolge für die Namen der Ausgabedateien" -#: builtin/log.c:1111 +#: builtin/log.c:1120 msgid "sfx" msgstr "Dateiendung" -#: builtin/log.c:1112 +#: builtin/log.c:1121 msgid "use <sfx> instead of '.patch'" msgstr "verwendet <Dateiendung> anstatt '.patch'" -#: builtin/log.c:1114 +#: builtin/log.c:1123 msgid "start numbering patches at <n> instead of 1" msgstr "beginnt die Nummerierung der Patches bei <n> anstatt bei 1" -#: builtin/log.c:1116 +#: builtin/log.c:1125 msgid "mark the series as Nth re-roll" msgstr "kennzeichnet die Serie als n-te Fassung" -#: builtin/log.c:1118 +#: builtin/log.c:1127 msgid "Use [<prefix>] instead of [PATCH]" msgstr "verwendet [<Prefix>] anstatt [PATCH]" -#: builtin/log.c:1121 +#: builtin/log.c:1130 msgid "store resulting files in <dir>" msgstr "speichert erzeugte Dateien in <Verzeichnis>" -#: builtin/log.c:1124 +#: builtin/log.c:1133 msgid "don't strip/add [PATCH]" msgstr "[PATCH] wird nicht entfernt/hinzugefügt" -#: builtin/log.c:1127 +#: builtin/log.c:1136 msgid "don't output binary diffs" msgstr "gibt keine binären Unterschiede aus" -#: builtin/log.c:1129 +#: builtin/log.c:1138 msgid "don't include a patch matching a commit upstream" msgstr "" "schließt keine Patches ein, die einer Version im Übernahmezweig entsprechen" -#: builtin/log.c:1131 +#: builtin/log.c:1140 msgid "show patch format instead of default (patch + stat)" msgstr "zeigt Patchformat anstatt des Standards (Patch + Zusammenfassung)" -#: builtin/log.c:1133 +#: builtin/log.c:1142 msgid "Messaging" msgstr "Email-Einstellungen" -#: builtin/log.c:1134 +#: builtin/log.c:1143 msgid "header" msgstr "Header" -#: builtin/log.c:1135 +#: builtin/log.c:1144 msgid "add email header" msgstr "fügt Email-Header hinzu" -#: builtin/log.c:1136 builtin/log.c:1138 +#: builtin/log.c:1145 builtin/log.c:1147 msgid "email" msgstr "Email" -#: builtin/log.c:1136 +#: builtin/log.c:1145 msgid "add To: header" msgstr "fügt \"To:\"-Header hinzu" -#: builtin/log.c:1138 +#: builtin/log.c:1147 msgid "add Cc: header" msgstr "fügt \"Cc:\"-Header hinzu" -#: builtin/log.c:1140 +#: builtin/log.c:1149 msgid "message-id" msgstr "message-id" -#: builtin/log.c:1141 +#: builtin/log.c:1150 msgid "make first mail a reply to <message-id>" msgstr "macht aus erster Email eine Antwort zu <message-id>" -#: builtin/log.c:1142 builtin/log.c:1145 +#: builtin/log.c:1151 builtin/log.c:1154 msgid "boundary" msgstr "Grenze" -#: builtin/log.c:1143 +#: builtin/log.c:1152 msgid "attach the patch" msgstr "hängt einen Patch an" -#: builtin/log.c:1146 +#: builtin/log.c:1155 msgid "inline the patch" msgstr "fügt den Patch direkt in die Nachricht ein" -#: builtin/log.c:1150 +#: builtin/log.c:1159 msgid "enable message threading, styles: shallow, deep" msgstr "aktiviert Nachrichtenverkettung, Stile: shallow, deep" -#: builtin/log.c:1152 +#: builtin/log.c:1161 msgid "signature" msgstr "Signatur" -#: builtin/log.c:1153 +#: builtin/log.c:1162 msgid "add a signature" msgstr "fügt eine Signatur hinzu" -#: builtin/log.c:1155 +#: builtin/log.c:1164 msgid "don't print the patch filenames" msgstr "zeigt keine Dateinamen der Patches" -#: builtin/log.c:1239 +#: builtin/log.c:1248 msgid "-n and -k are mutually exclusive." msgstr "Die Optionen -n und -k schließen sich gegenseitig aus." -#: builtin/log.c:1241 +#: builtin/log.c:1250 msgid "--subject-prefix and -k are mutually exclusive." msgstr "Die Optionen --subject-prefix und -k schließen sich gegenseitig aus." -#: builtin/log.c:1249 +#: builtin/log.c:1258 msgid "--name-only does not make sense" msgstr "Die Option --name-only kann nicht verwendet werden." -#: builtin/log.c:1251 +#: builtin/log.c:1260 msgid "--name-status does not make sense" msgstr "Die Option --name-status kann nicht verwendet werden." -#: builtin/log.c:1253 +#: builtin/log.c:1262 msgid "--check does not make sense" msgstr "Die Option --check kann nicht verwendet werden." -#: builtin/log.c:1276 +#: builtin/log.c:1285 msgid "standard output, or directory, which one?" msgstr "Standard-Ausgabe oder Verzeichnis, welches von beidem?" -#: builtin/log.c:1278 +#: builtin/log.c:1287 #, c-format msgid "Could not create directory '%s'" msgstr "Konnte Verzeichnis '%s' nicht erstellen." -#: builtin/log.c:1431 +#: builtin/log.c:1435 msgid "Failed to create output files" msgstr "Fehler beim Erstellen der Ausgabedateien." -#: builtin/log.c:1480 +#: builtin/log.c:1484 msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]" msgstr "git cherry [-v] [<Übernahmezweig> [<Arbeitszweig> [<Limit>]]]" -#: builtin/log.c:1535 +#: builtin/log.c:1539 #, c-format msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" @@ -5969,105 +6153,105 @@ msgstr "" "Konnte gefolgten, externen Zweig nicht finden, bitte geben Sie <upstream> " "manuell an.\n" -#: builtin/log.c:1548 builtin/log.c:1550 builtin/log.c:1562 +#: builtin/log.c:1552 builtin/log.c:1554 builtin/log.c:1566 #, c-format msgid "Unknown commit %s" msgstr "Unbekannte Version %s" -#: builtin/ls-files.c:409 +#: builtin/ls-files.c:402 msgid "git ls-files [options] [<file>...]" msgstr "git ls-files [Optionen] [<Datei>...]" -#: builtin/ls-files.c:466 +#: builtin/ls-files.c:459 msgid "identify the file status with tags" msgstr "zeigt den Dateistatus mit Markierungen" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:461 msgid "use lowercase letters for 'assume unchanged' files" msgstr "" "verwendet Kleinbuchstaben für Dateien mit 'assume unchanged' Markierung" -#: builtin/ls-files.c:470 +#: builtin/ls-files.c:463 msgid "show cached files in the output (default)" msgstr "zeigt zwischengespeicherten Dateien in der Ausgabe an (Standard)" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:465 msgid "show deleted files in the output" msgstr "zeigt entfernte Dateien in der Ausgabe an" -#: builtin/ls-files.c:474 +#: builtin/ls-files.c:467 msgid "show modified files in the output" msgstr "zeigt geänderte Dateien in der Ausgabe an" -#: builtin/ls-files.c:476 +#: builtin/ls-files.c:469 msgid "show other files in the output" msgstr "zeigt sonstige Dateien in der Ausgabe an" -#: builtin/ls-files.c:478 +#: builtin/ls-files.c:471 msgid "show ignored files in the output" msgstr "zeigt ignorierte Dateien in der Ausgabe an" -#: builtin/ls-files.c:481 +#: builtin/ls-files.c:474 msgid "show staged contents' object name in the output" msgstr "zeigt Objektnamen von Inhalten in der Bereitstellung in der Ausgabe an" -#: builtin/ls-files.c:483 +#: builtin/ls-files.c:476 msgid "show files on the filesystem that need to be removed" msgstr "zeigt Dateien im Dateisystem, die gelöscht werden müssen, an" -#: builtin/ls-files.c:485 +#: builtin/ls-files.c:478 msgid "show 'other' directories' name only" msgstr "zeigt nur Namen von 'sonstigen' Verzeichnissen an" -#: builtin/ls-files.c:488 +#: builtin/ls-files.c:481 msgid "don't show empty directories" msgstr "zeigt keine leeren Verzeichnisse an" -#: builtin/ls-files.c:491 +#: builtin/ls-files.c:484 msgid "show unmerged files in the output" msgstr "zeigt nicht zusammengeführte Dateien in der Ausgabe an" -#: builtin/ls-files.c:493 +#: builtin/ls-files.c:486 msgid "show resolve-undo information" msgstr "zeigt 'resolve-undo' Informationen an" -#: builtin/ls-files.c:495 +#: builtin/ls-files.c:488 msgid "skip files matching pattern" msgstr "lässt Dateien aus, die einem Muster entsprechen" -#: builtin/ls-files.c:498 +#: builtin/ls-files.c:491 msgid "exclude patterns are read from <file>" msgstr "schließt Muster, gelesen von <Datei>, aus" -#: builtin/ls-files.c:501 +#: builtin/ls-files.c:494 msgid "read additional per-directory exclude patterns in <file>" msgstr "liest zusätzliche pro-Verzeichnis Auschlussmuster aus <Datei>" -#: builtin/ls-files.c:503 +#: builtin/ls-files.c:496 msgid "add the standard git exclusions" msgstr "fügt die standardmäßigen Git-Ausschlüsse hinzu" -#: builtin/ls-files.c:506 +#: builtin/ls-files.c:499 msgid "make the output relative to the project top directory" msgstr "Ausgabe relativ zum Projektverzeichnis" -#: builtin/ls-files.c:509 +#: builtin/ls-files.c:502 msgid "if any <file> is not in the index, treat this as an error" msgstr "" "behandle es als Fehler, wenn sich eine <Datei> nicht in der Bereitstellung " "befindet" -#: builtin/ls-files.c:510 +#: builtin/ls-files.c:503 msgid "tree-ish" msgstr "Versionsreferenz" -#: builtin/ls-files.c:511 +#: builtin/ls-files.c:504 msgid "pretend that paths removed since <tree-ish> are still present" msgstr "" "gibt vor, dass Pfade, die seit <Versionsreferenz> gelöscht wurden, immer " "noch vorhanden sind" -#: builtin/ls-files.c:513 +#: builtin/ls-files.c:506 msgid "show debugging data" msgstr "zeigt Ausgaben zur Fehlersuche an" @@ -6415,8 +6599,8 @@ msgstr "" #: builtin/merge.c:1265 #, c-format msgid "Commit %s has an untrusted GPG signature, allegedly by %s." -msgstr "Version %s hat eine nicht vertrauenswürdige GPG-Signatur, " -"angeblich von %s." +msgstr "" +"Version %s hat eine nicht vertrauenswürdige GPG-Signatur, angeblich von %s." #: builtin/merge.c:1268 #, c-format @@ -8339,16 +8523,16 @@ msgstr "" "erster Verwendung aus." #: builtin/revert.c:22 -msgid "git revert [options] <commit-ish>" -msgstr "git revert [options] <Versionsangabe>" +msgid "git revert [options] <commit-ish>..." +msgstr "git revert [Optionen] <Versionsangabe>..." #: builtin/revert.c:23 msgid "git revert <subcommand>" msgstr "git revert <Unterkommando>" #: builtin/revert.c:28 -msgid "git cherry-pick [options] <commit-ish>" -msgstr "git cherry-pick [Optionen] <Versionsangabe>" +msgid "git cherry-pick [options] <commit-ish>..." +msgstr "git cherry-pick [Optionen] <Versionsangabe>..." #: builtin/revert.c:29 msgid "git cherry-pick <subcommand>" @@ -8502,33 +8686,31 @@ msgid "git rm: unable to remove %s" msgstr "git rm: konnte %s nicht löschen" #: builtin/shortlog.c:13 -msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" -msgstr "" -"git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] " -"[<Versionsidentifikation>... ]" +msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" +msgstr "git shortlog [<Optionen>] [Revisionsbereich] [[--] <Pfad>...]" -#: builtin/shortlog.c:133 +#: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" msgstr "fehlender Autor: %s" -#: builtin/shortlog.c:229 +#: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" msgstr "sortiert die Ausgabe entsprechend der Anzahl von Versionen pro Autor" -#: builtin/shortlog.c:231 +#: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" msgstr "Unterdrückt Versionsbeschreibungen, liefert nur Anzahl der Versionen" -#: builtin/shortlog.c:233 +#: builtin/shortlog.c:231 msgid "Show the email address of each author" msgstr "Zeigt die Email-Adresse von jedem Autor" -#: builtin/shortlog.c:234 +#: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" msgstr "w[,i1[,i2]]" -#: builtin/shortlog.c:235 +#: builtin/shortlog.c:233 msgid "Linewrap output" msgstr "Ausgabe mit Zeilenumbrüchen" @@ -8548,68 +8730,68 @@ msgstr "" msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" msgstr "git show-branch (-g|--reflog)[=<n>[,<Basis>]] [--list] [<Referenz>]" -#: builtin/show-branch.c:651 +#: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" msgstr "zeigt externe Übernahmezweige und lokale Zweige an" -#: builtin/show-branch.c:653 +#: builtin/show-branch.c:652 msgid "show remote-tracking branches" msgstr "zeigt externe Übernahmezweige an" -#: builtin/show-branch.c:655 +#: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" msgstr "färbt '*!+-' entsprechend des Zweiges ein" -#: builtin/show-branch.c:657 +#: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" msgstr "zeigt <n> weitere Versionen nach dem gemeinsamen Vorfahren" -#: builtin/show-branch.c:659 +#: builtin/show-branch.c:658 msgid "synonym to more=-1" msgstr "Synonym für more=-1" -#: builtin/show-branch.c:660 +#: builtin/show-branch.c:659 msgid "suppress naming strings" msgstr "unterdrückt Namen" -#: builtin/show-branch.c:662 +#: builtin/show-branch.c:661 msgid "include the current branch" msgstr "bezieht den aktuellen Zweig ein" -#: builtin/show-branch.c:664 +#: builtin/show-branch.c:663 msgid "name commits with their object names" msgstr "benennt Versionen nach ihren Objektnamen" -#: builtin/show-branch.c:666 +#: builtin/show-branch.c:665 msgid "show possible merge bases" msgstr "zeigt mögliche Basen für Zusammenführung" -#: builtin/show-branch.c:668 +#: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" msgstr "zeigt Referenzen die unerreichbar von allen anderen Referenzen sind" -#: builtin/show-branch.c:670 +#: builtin/show-branch.c:669 msgid "show commits in topological order" msgstr "zeigt Versionen in topologischer Ordnung" -#: builtin/show-branch.c:672 +#: builtin/show-branch.c:671 msgid "show only commits not on the first branch" msgstr "zeigt nur Versionen, die sich nicht im ersten Zweig befinden" -#: builtin/show-branch.c:674 +#: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" msgstr "" "zeigt Zusammenführungen, die nur von einer Zweigspitze aus erreichbar sind" -#: builtin/show-branch.c:676 +#: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" msgstr "zeigt Versionen, wo kein Elternteil vor seinem Kind kommt" -#: builtin/show-branch.c:678 +#: builtin/show-branch.c:677 msgid "<n>[,<base>]" msgstr "<n>[,<Basis>]" -#: builtin/show-branch.c:679 +#: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" msgstr "" "zeigt die <n> jüngsten Einträge im Referenzprotokoll beginnend an der Basis" @@ -9082,10 +9264,15 @@ msgid "only useful for debugging" msgstr "nur nützlich für Fehlersuche" #: git.c:16 -msgid "See 'git help <command>' for more information on a specific command." +msgid "" +"'git help -a' and 'git help -g' lists available subcommands and some\n" +"concept guides. See 'git help <command>' or 'git help <concept>'\n" +"to read about a specific subcommand or concept." msgstr "" -"Siehe 'git help <Kommando>' für weitere Informationen zu einem spezifischen " -"Kommando" +"'git help -a' und 'git help -g' listet verfügbare Unterkommandos und\n" +"einige Anleitungen zu Git-Konzepten auf. Benutzen Sie 'git help <Kommando>'\n" +"oder 'git help <Konzept>' um mehr über ein spezifisches Kommando oder\n" +"Konzept zu erfahren." #: parse-options.h:156 msgid "no-op (backward compatibility)" @@ -9472,16 +9659,16 @@ msgstr "" "angeben.\n" "(Sie können dafür \"git bisect bad\" und \"git bisect good\" benutzen.)" -#: git-bisect.sh:347 git-bisect.sh:474 +#: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." msgstr "keine binäre Suche im Gange" -#: git-bisect.sh:354 +#: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" msgstr "'$invalid' ist keine gültige Version" -#: git-bisect.sh:363 +#: git-bisect.sh:379 #, sh-format msgid "" "Could not check out original HEAD '$branch'.\n" @@ -9490,25 +9677,25 @@ msgstr "" "Konnte die ursprüngliche Zweigspitze (HEAD) '$branch' nicht auschecken.\n" "Versuchen Sie 'git bisect reset <Version>'." -#: git-bisect.sh:390 +#: git-bisect.sh:406 msgid "No logfile given" msgstr "Keine Log-Datei gegeben" -#: git-bisect.sh:391 +#: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" msgstr "kann $file nicht für das Abspielen lesen" -#: git-bisect.sh:408 +#: git-bisect.sh:424 msgid "?? what are you talking about?" msgstr "?? Was reden Sie da?" -#: git-bisect.sh:420 +#: git-bisect.sh:436 #, sh-format msgid "running $command" msgstr "führe $command aus" -#: git-bisect.sh:427 +#: git-bisect.sh:443 #, sh-format msgid "" "bisect run failed:\n" @@ -9517,11 +9704,11 @@ msgstr "" "'bisect run' fehlgeschlagen:\n" "Rückkehrwert $res von '$command' ist < 0 oder >= 128" -#: git-bisect.sh:453 +#: git-bisect.sh:469 msgid "bisect run cannot continue any more" msgstr "'bisect run' kann nicht mehr fortgesetzt werden" -#: git-bisect.sh:459 +#: git-bisect.sh:475 #, sh-format msgid "" "bisect run failed:\n" @@ -9530,7 +9717,7 @@ msgstr "" "'bisect run' fehlgeschlagen:\n" "'bisect_state $state' wurde mit Fehlerwert $res beendet" -#: git-bisect.sh:466 +#: git-bisect.sh:482 msgid "bisect run success" msgstr "'bisect run' erfolgreich ausgeführt" @@ -9946,7 +10133,8 @@ msgstr "Hinzufügen von Unterprojekt '$sm_path' fehlgeschlagen" #: git-submodule.sh:431 #, sh-format msgid "Failed to register submodule '$sm_path'" -msgstr "Fehler beim Eintragen von Unterprojekt '$sm_path' in die Konfiguration." +msgstr "" +"Fehler beim Eintragen von Unterprojekt '$sm_path' in die Konfiguration." #: git-submodule.sh:474 #, sh-format @@ -9966,31 +10154,36 @@ msgstr "Keine URL für Unterprojekt-Pfad '$sm_path' in .gitmodules gefunden" #: git-submodule.sh:541 #, sh-format msgid "Failed to register url for submodule path '$sm_path'" -msgstr "Fehler beim Eintragen der URL für Unterprojekt-Pfad '$sm_path' in die" -" Konfiguration." +msgstr "" +"Fehler beim Eintragen der URL für Unterprojekt-Pfad '$sm_path' in die " +"Konfiguration." #: git-submodule.sh:543 #, sh-format msgid "Submodule '$name' ($url) registered for path '$sm_path'" -msgstr "Unterprojekt '$name' ($url) für Pfad '$sm_path' in die Konfiguration " +msgstr "" +"Unterprojekt '$name' ($url) für Pfad '$sm_path' in die Konfiguration " "eingetragen" #: git-submodule.sh:551 #, sh-format msgid "Failed to register update mode for submodule path '$sm_path'" -msgstr "Fehler bei Änderung des Aktualisierungsmodus für Unterprojekt-Pfad " +msgstr "" +"Fehler bei Änderung des Aktualisierungsmodus für Unterprojekt-Pfad " "'$sm_path' in der Konfiguration." #: git-submodule.sh:588 #, sh-format msgid "Use '.' if you really want to deinitialize all submodules" -msgstr "Verwenden Sie '.' wenn Sie wirklich alle Unterprojekte\n" +msgstr "" +"Verwenden Sie '.' wenn Sie wirklich alle Unterprojekte\n" "deinitialisieren möchten." #: git-submodule.sh:603 #, sh-format msgid "Submodule work tree '$sm_path' contains a .git directory" -msgstr "Arbeitsbaum des Unterprojekts in '$sm_path' enthält ein .git-Verzeichnis" +msgstr "" +"Arbeitsbaum des Unterprojekts in '$sm_path' enthält ein .git-Verzeichnis" #: git-submodule.sh:604 #, sh-format @@ -10022,13 +10215,15 @@ msgstr "Konnte Arbeitsbaum des Unterprojektes in '$sm_path' nicht löschen." #: git-submodule.sh:617 #, sh-format msgid "Could not create empty submodule directory '$sm_path'" -msgstr "Konnte kein leeres Verzeichnis für Unterprojekt in '$sm_path' erstellen." +msgstr "" +"Konnte kein leeres Verzeichnis für Unterprojekt in '$sm_path' erstellen." #: git-submodule.sh:626 #, sh-format msgid "Submodule '$name' ($url) unregistered for path '$sm_path'" -msgstr "Unterprojekt '$name' ($url) für Pfad '$sm_path' wurde aus der " -"Konfiguration entfernt." +msgstr "" +"Unterprojekt '$name' ($url) für Pfad '$sm_path' wurde aus der Konfiguration " +"entfernt." #: git-submodule.sh:731 #, sh-format @@ -10042,7 +10237,8 @@ msgstr "" #: git-submodule.sh:744 #, sh-format msgid "Unable to find current revision in submodule path '$prefix$sm_path'" -msgstr "Konnte aktuelle Revision in Unterprojekt-Pfad '$prefix$sm_path' nicht finden." +msgstr "" +"Konnte aktuelle Revision in Unterprojekt-Pfad '$prefix$sm_path' nicht finden." #: git-submodule.sh:753 #, sh-format @@ -10057,7 +10253,8 @@ msgstr "Konnte in Unterprojekt-Pfad '$prefix$sm_path' nicht anfordern" #: git-submodule.sh:791 #, sh-format msgid "Unable to rebase '$sha1' in submodule path '$prefix$sm_path'" -msgstr "Neuaufbau von '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' nicht möglich" +msgstr "" +"Neuaufbau von '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' nicht möglich" #: git-submodule.sh:792 #, sh-format @@ -10068,7 +10265,8 @@ msgstr "Unterprojekt-Pfad '$prefix$sm_path': neu aufgebaut in '$sha1'" #, sh-format msgid "Unable to merge '$sha1' in submodule path '$prefix$sm_path'" msgstr "" -"Zusammenführung von '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' fehlgeschlagen" +"Zusammenführung von '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' " +"fehlgeschlagen" #: git-submodule.sh:798 #, sh-format @@ -10078,7 +10276,8 @@ msgstr "Unterprojekt-Pfad '$prefix$sm_path': zusammengeführt in '$sha1'" #: git-submodule.sh:803 #, sh-format msgid "Unable to checkout '$sha1' in submodule path '$prefix$sm_path'" -msgstr "Konnte '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' nicht auschecken." +msgstr "" +"Konnte '$sha1' in Unterprojekt-Pfad '$prefix$sm_path' nicht auschecken." #: git-submodule.sh:804 #, sh-format @@ -10139,6 +10338,27 @@ msgstr "Fehler bei Rekursion in Unterprojekt-Pfad '$sm_path'" msgid "Synchronizing submodule url for '$prefix$sm_path'" msgstr "Synchronisiere Unterprojekt-URL für '$prefix$sm_path'" +#~ msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" +#~ msgstr "" +#~ "Es dauerte %.2f Sekunden die unbeobachteten Dateien zu bestimmen.'status -" +#~ "uno'" + +#~ msgid "may speed it up, but you have to be careful not to forget to add" +#~ msgstr "könnte das beschleunigen, aber Sie müssen darauf achten, neue" + +#~ msgid "new files yourself (see 'git help status')." +#~ msgstr "Dateien selbstständig hinzuzufügen (siehe 'git help status')." + +#~ msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +#~ msgstr "" +#~ "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] " +#~ "[<Versionsidentifikation>... ]" + +#~ msgid "See 'git help <command>' for more information on a specific command." +#~ msgstr "" +#~ "Siehe 'git help <Kommando>' für weitere Informationen zu einem " +#~ "spezifischen Kommando" + #~ msgid "use any ref in .git/refs" #~ msgstr "verwendet alle Referenzen in .git/refs" diff --git a/po/git.pot b/po/git.pot index 9a3e0a8ccc..4a9d4efed9 100644 --- a/po/git.pot +++ b/po/git.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2013-04-10 15:16+0800\n" +"POT-Creation-Date: 2013-04-30 08:25+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -60,7 +60,7 @@ msgstr "" msgid "archive format" msgstr "" -#: archive.c:324 builtin/log.c:1117 +#: archive.c:324 builtin/log.c:1126 msgid "prefix" msgstr "" @@ -68,10 +68,10 @@ msgstr "" msgid "prepend prefix to each pathname in the archive" msgstr "" -#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2366 -#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:659 -#: builtin/fast-export.c:661 builtin/grep.c:715 builtin/hash-object.c:77 -#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536 +#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 +#: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 +#: builtin/fast-export.c:667 builtin/grep.c:715 builtin/hash-object.c:77 +#: builtin/ls-files.c:490 builtin/ls-files.c:493 builtin/notes.c:536 #: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149 msgid "file" msgstr "" @@ -126,6 +126,75 @@ msgid "" "Use '\\!' for literal leading exclamation." msgstr "" +#: branch.c:60 +#, c-format +msgid "Not setting branch %s as its own upstream." +msgstr "" + +#: branch.c:82 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s by rebasing." +msgstr "" + +#: branch.c:83 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s." +msgstr "" + +#: branch.c:87 +#, c-format +msgid "Branch %s set up to track local branch %s by rebasing." +msgstr "" + +#: branch.c:88 +#, c-format +msgid "Branch %s set up to track local branch %s." +msgstr "" + +#: branch.c:92 +#, c-format +msgid "Branch %s set up to track remote ref %s by rebasing." +msgstr "" + +#: branch.c:93 +#, c-format +msgid "Branch %s set up to track remote ref %s." +msgstr "" + +#: branch.c:97 +#, c-format +msgid "Branch %s set up to track local ref %s by rebasing." +msgstr "" + +#: branch.c:98 +#, c-format +msgid "Branch %s set up to track local ref %s." +msgstr "" + +#: branch.c:118 +#, c-format +msgid "Tracking not set up: name too long: %s" +msgstr "" + +#: branch.c:137 +#, c-format +msgid "Not tracking: ambiguous information for ref %s" +msgstr "" + +#: branch.c:182 +#, c-format +msgid "'%s' is not a valid branch name." +msgstr "" + +#: branch.c:187 +#, c-format +msgid "A branch named '%s' already exists." +msgstr "" + +#: branch.c:195 +msgid "Cannot force update the current branch." +msgstr "" + #: branch.c:201 #, c-format msgid "Cannot setup tracking information; starting point '%s' is not a branch." @@ -148,6 +217,29 @@ msgid "" "\"git push -u\" to set the upstream config as you push." msgstr "" +#: branch.c:250 +#, c-format +msgid "Not a valid object name: '%s'." +msgstr "" + +#: branch.c:270 +#, c-format +msgid "Ambiguous object name: '%s'." +msgstr "" + +#: branch.c:275 +#, c-format +msgid "Not a valid branch point: '%s'." +msgstr "" + +#: branch.c:281 +msgid "Failed to lock ref for update" +msgstr "" + +#: branch.c:299 +msgid "Failed to write ref" +msgstr "" + #: bundle.c:36 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -167,9 +259,9 @@ msgstr "" msgid "Repository lacks these prerequisite commits:" msgstr "" -#: bundle.c:164 sequencer.c:651 sequencer.c:1083 builtin/log.c:300 -#: builtin/log.c:754 builtin/log.c:1350 builtin/log.c:1566 builtin/merge.c:349 -#: builtin/shortlog.c:157 +#: bundle.c:164 sequencer.c:651 sequencer.c:1101 builtin/log.c:300 +#: builtin/log.c:770 builtin/log.c:1344 builtin/log.c:1570 builtin/merge.c:349 +#: builtin/shortlog.c:155 msgid "revision walk setup failed" msgstr "" @@ -195,7 +287,7 @@ msgstr[1] "" msgid "rev-list died" msgstr "" -#: bundle.c:300 builtin/log.c:1246 builtin/shortlog.c:260 +#: bundle.c:300 builtin/log.c:1255 builtin/shortlog.c:258 #, c-format msgid "unrecognized argument: %s" msgstr "" @@ -343,14 +435,14 @@ msgid "" "%s" msgstr "" -#: diff.c:3480 +#: diff.c:3481 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" "%s" msgstr "" -#: diff.c:3494 +#: diff.c:3495 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "" @@ -447,8 +539,8 @@ msgstr[1] "" msgid "failed to read the cache" msgstr "" -#: merge.c:110 builtin/checkout.c:362 builtin/checkout.c:563 -#: builtin/clone.c:635 +#: merge.c:110 builtin/checkout.c:365 builtin/checkout.c:566 +#: builtin/clone.c:645 msgid "unable to write new index file" msgstr "" @@ -497,7 +589,7 @@ msgstr "" msgid "blob expected for %s '%s'" msgstr "" -#: merge-recursive.c:773 builtin/clone.c:303 +#: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" msgstr "" @@ -1000,11 +1092,21 @@ msgstr "" msgid "Could not format %s." msgstr "" -#: sequencer.c:1101 +#: sequencer.c:1083 +#, c-format +msgid "%s: can't cherry-pick a %s" +msgstr "" + +#: sequencer.c:1085 +#, c-format +msgid "%s: bad revision" +msgstr "" + +#: sequencer.c:1119 msgid "Can't revert as initial commit" msgstr "" -#: sequencer.c:1102 +#: sequencer.c:1120 msgid "Can't cherry-pick into empty head" msgstr "" @@ -1190,254 +1292,249 @@ msgstr "" msgid "bug: unhandled diff status %c" msgstr "" -#: wt-status.c:805 +#: wt-status.c:803 msgid "You have unmerged paths." msgstr "" -#: wt-status.c:808 wt-status.c:960 +#: wt-status.c:806 wt-status.c:958 msgid " (fix conflicts and run \"git commit\")" msgstr "" -#: wt-status.c:811 +#: wt-status.c:809 msgid "All conflicts fixed but you are still merging." msgstr "" -#: wt-status.c:814 +#: wt-status.c:812 msgid " (use \"git commit\" to conclude merge)" msgstr "" -#: wt-status.c:824 +#: wt-status.c:822 msgid "You are in the middle of an am session." msgstr "" -#: wt-status.c:827 +#: wt-status.c:825 msgid "The current patch is empty." msgstr "" -#: wt-status.c:831 +#: wt-status.c:829 msgid " (fix conflicts and then run \"git am --resolved\")" msgstr "" -#: wt-status.c:833 +#: wt-status.c:831 msgid " (use \"git am --skip\" to skip this patch)" msgstr "" -#: wt-status.c:835 +#: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" msgstr "" -#: wt-status.c:895 wt-status.c:912 +#: wt-status.c:893 wt-status.c:910 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "" -#: wt-status.c:900 wt-status.c:917 +#: wt-status.c:898 wt-status.c:915 msgid "You are currently rebasing." msgstr "" -#: wt-status.c:903 +#: wt-status.c:901 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr "" -#: wt-status.c:905 +#: wt-status.c:903 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr "" -#: wt-status.c:907 +#: wt-status.c:905 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr "" -#: wt-status.c:920 +#: wt-status.c:918 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr "" -#: wt-status.c:924 +#: wt-status.c:922 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." msgstr "" -#: wt-status.c:929 +#: wt-status.c:927 msgid "You are currently splitting a commit during a rebase." msgstr "" -#: wt-status.c:932 +#: wt-status.c:930 msgid " (Once your working directory is clean, run \"git rebase --continue\")" msgstr "" -#: wt-status.c:936 +#: wt-status.c:934 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "" -#: wt-status.c:941 +#: wt-status.c:939 msgid "You are currently editing a commit during a rebase." msgstr "" -#: wt-status.c:944 +#: wt-status.c:942 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr "" -#: wt-status.c:946 +#: wt-status.c:944 msgid "" " (use \"git rebase --continue\" once you are satisfied with your changes)" msgstr "" -#: wt-status.c:956 +#: wt-status.c:954 msgid "You are currently cherry-picking." msgstr "" -#: wt-status.c:963 +#: wt-status.c:961 msgid " (all conflicts fixed: run \"git commit\")" msgstr "" -#: wt-status.c:972 +#: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." msgstr "" -#: wt-status.c:977 +#: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" msgstr "" -#: wt-status.c:980 +#: wt-status.c:978 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr "" -#: wt-status.c:982 +#: wt-status.c:980 msgid " (use \"git revert --abort\" to cancel the revert operation)" msgstr "" -#: wt-status.c:993 +#: wt-status.c:991 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "" -#: wt-status.c:997 +#: wt-status.c:995 msgid "You are currently bisecting." msgstr "" -#: wt-status.c:1000 +#: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr "" -#: wt-status.c:1175 +#: wt-status.c:1173 msgid "On branch " msgstr "" -#: wt-status.c:1186 +#: wt-status.c:1184 msgid "HEAD detached at " msgstr "" -#: wt-status.c:1188 +#: wt-status.c:1186 msgid "HEAD detached from " msgstr "" -#: wt-status.c:1191 +#: wt-status.c:1189 msgid "Not currently on any branch." msgstr "" -#: wt-status.c:1208 +#: wt-status.c:1206 msgid "Initial commit" msgstr "" -#: wt-status.c:1222 +#: wt-status.c:1220 msgid "Untracked files" msgstr "" -#: wt-status.c:1224 +#: wt-status.c:1222 msgid "Ignored files" msgstr "" -#: wt-status.c:1228 +#: wt-status.c:1226 #, c-format -msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" +msgid "" +"It took %.2f seconds to enumerate untracked files. 'status -uno'\n" +"may speed it up, but you have to be careful not to forget to add\n" +"new files yourself (see 'git help status')." msgstr "" #: wt-status.c:1232 -msgid "may speed it up, but you have to be careful not to forget to add" -msgstr "" - -#: wt-status.c:1235 -msgid "new files yourself (see 'git help status')." -msgstr "" - -#: wt-status.c:1238 #, c-format msgid "Untracked files not listed%s" msgstr "" -#: wt-status.c:1240 +#: wt-status.c:1234 msgid " (use -u option to show untracked files)" msgstr "" -#: wt-status.c:1246 +#: wt-status.c:1240 msgid "No changes" msgstr "" -#: wt-status.c:1251 +#: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" msgstr "" -#: wt-status.c:1254 +#: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" msgstr "" -#: wt-status.c:1257 +#: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " "track)\n" msgstr "" -#: wt-status.c:1260 +#: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" msgstr "" -#: wt-status.c:1263 +#: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" msgstr "" -#: wt-status.c:1266 wt-status.c:1271 +#: wt-status.c:1260 wt-status.c:1265 #, c-format msgid "nothing to commit\n" msgstr "" -#: wt-status.c:1269 +#: wt-status.c:1263 #, c-format msgid "nothing to commit (use -u to show untracked files)\n" msgstr "" -#: wt-status.c:1273 +#: wt-status.c:1267 #, c-format msgid "nothing to commit, working directory clean\n" msgstr "" -#: wt-status.c:1381 +#: wt-status.c:1375 msgid "HEAD (no branch)" msgstr "" -#: wt-status.c:1387 +#: wt-status.c:1381 msgid "Initial commit on " msgstr "" -#: wt-status.c:1402 +#: wt-status.c:1396 msgid "behind " msgstr "" -#: wt-status.c:1405 wt-status.c:1408 +#: wt-status.c:1399 wt-status.c:1402 msgid "ahead " msgstr "" -#: wt-status.c:1410 +#: wt-status.c:1404 msgid ", behind " msgstr "" -#: compat/precompose_utf8.c:58 builtin/clone.c:342 +#: compat/precompose_utf8.c:58 builtin/clone.c:352 #, c-format msgid "failed to unlink '%s'" msgstr "" @@ -1446,179 +1543,200 @@ msgstr "" msgid "git add [options] [--] <pathspec>..." msgstr "" -#: builtin/add.c:63 +#. +#. * To be consistent with "git add -p" and most Git +#. * commands, we should default to being tree-wide, but +#. * this is not the original behavior and can't be +#. * changed until users trained themselves not to type +#. * "git add -u" or "git add -A". For now, we warn and +#. * keep the old behavior. Later, the behavior can be changed +#. * to tree-wide, keeping the warning for a while, and +#. * eventually we can drop the warning. +#. +#: builtin/add.c:58 +#, c-format +msgid "" +"The behavior of 'git add %s (or %s)' with no path argument from a\n" +"subdirectory of the tree will change in Git 2.0 and should not be used " +"anymore.\n" +"To add content for the whole tree, run:\n" +"\n" +" git add %s :/\n" +" (or git add %s :/)\n" +"\n" +"To restrict the command to the current directory, run:\n" +"\n" +" git add %s .\n" +" (or git add %s .)\n" +"\n" +"With the current Git version, the command is restricted to the current " +"directory.\n" +msgstr "" + +#: builtin/add.c:100 +#, c-format +msgid "" +"You ran 'git add' with neither '-A (--all)' or '--ignore-removal',\n" +"whose behaviour will change in Git 2.0 with respect to paths you removed.\n" +"Paths like '%s' that are\n" +"removed from your working tree are ignored with this version of Git.\n" +"\n" +"* 'git add --ignore-removal <pathspec>', which is the current default,\n" +" ignores paths you removed from your working tree.\n" +"\n" +"* 'git add --all <pathspec>' will let you also record the removals.\n" +"\n" +"Run 'git status' to check the paths you removed from your working tree.\n" +msgstr "" + +#: builtin/add.c:144 #, c-format msgid "unexpected diff status %c" msgstr "" -#: builtin/add.c:68 builtin/commit.c:233 +#: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" msgstr "" -#: builtin/add.c:78 +#: builtin/add.c:163 #, c-format msgid "remove '%s'\n" msgstr "" -#: builtin/add.c:148 +#: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" msgstr "" -#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275 +#: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format msgid "pathspec '%s' did not match any files" msgstr "" -#: builtin/add.c:234 +#: builtin/add.c:339 msgid "Could not read the index" msgstr "" -#: builtin/add.c:244 +#: builtin/add.c:349 #, c-format msgid "Could not open '%s' for writing." msgstr "" -#: builtin/add.c:248 +#: builtin/add.c:353 msgid "Could not write patch" msgstr "" -#: builtin/add.c:253 +#: builtin/add.c:358 #, c-format msgid "Could not stat '%s'" msgstr "" -#: builtin/add.c:255 +#: builtin/add.c:360 msgid "Empty patch. Aborted." msgstr "" -#: builtin/add.c:261 +#: builtin/add.c:366 #, c-format msgid "Could not apply '%s'" msgstr "" -#: builtin/add.c:271 +#: builtin/add.c:376 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "" -#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 +#: builtin/add.c:393 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 #: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253 #: builtin/rm.c:206 msgid "dry run" msgstr "" -#: builtin/add.c:278 builtin/apply.c:4409 builtin/check-ignore.c:19 +#: builtin/add.c:394 builtin/apply.c:4409 builtin/check-ignore.c:19 #: builtin/commit.c:1152 builtin/count-objects.c:95 builtin/fsck.c:613 -#: builtin/log.c:1514 builtin/mv.c:62 builtin/read-tree.c:112 +#: builtin/log.c:1518 builtin/mv.c:62 builtin/read-tree.c:112 msgid "be verbose" msgstr "" -#: builtin/add.c:280 +#: builtin/add.c:396 msgid "interactive picking" msgstr "" -#: builtin/add.c:281 builtin/checkout.c:1060 builtin/reset.c:258 +#: builtin/add.c:397 builtin/checkout.c:1063 builtin/reset.c:258 msgid "select hunks interactively" msgstr "" -#: builtin/add.c:282 +#: builtin/add.c:398 msgid "edit current diff and apply" msgstr "" -#: builtin/add.c:283 +#: builtin/add.c:399 msgid "allow adding otherwise ignored files" msgstr "" -#: builtin/add.c:284 +#: builtin/add.c:400 msgid "update tracked files" msgstr "" -#: builtin/add.c:285 +#: builtin/add.c:401 msgid "record only the fact that the path will be added later" msgstr "" -#: builtin/add.c:286 +#: builtin/add.c:402 msgid "add changes from all tracked and untracked files" msgstr "" -#: builtin/add.c:287 +#. takes no arguments +#: builtin/add.c:405 +msgid "ignore paths removed in the working tree (same as --no-all)" +msgstr "" + +#: builtin/add.c:407 msgid "don't add, only refresh the index" msgstr "" -#: builtin/add.c:288 +#: builtin/add.c:408 msgid "just skip files which cannot be added because of errors" msgstr "" -#: builtin/add.c:289 +#: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" msgstr "" -#: builtin/add.c:311 +#: builtin/add.c:431 #, c-format msgid "Use -f if you really want to add them.\n" msgstr "" -#: builtin/add.c:312 +#: builtin/add.c:432 msgid "no files added" msgstr "" -#: builtin/add.c:318 +#: builtin/add.c:438 msgid "adding files failed" msgstr "" -#. -#. * To be consistent with "git add -p" and most Git -#. * commands, we should default to being tree-wide, but -#. * this is not the original behavior and can't be -#. * changed until users trained themselves not to type -#. * "git add -u" or "git add -A". For now, we warn and -#. * keep the old behavior. Later, the behavior can be changed -#. * to tree-wide, keeping the warning for a while, and -#. * eventually we can drop the warning. -#. -#: builtin/add.c:335 -#, c-format -msgid "" -"The behavior of 'git add %s (or %s)' with no path argument from a\n" -"subdirectory of the tree will change in Git 2.0 and should not be used " -"anymore.\n" -"To add content for the whole tree, run:\n" -"\n" -" git add %s :/\n" -" (or git add %s :/)\n" -"\n" -"To restrict the command to the current directory, run:\n" -"\n" -" git add %s .\n" -" (or git add %s .)\n" -"\n" -"With the current Git version, the command is restricted to the current " -"directory." -msgstr "" - -#: builtin/add.c:381 +#: builtin/add.c:477 msgid "-A and -u are mutually incompatible" msgstr "" -#: builtin/add.c:383 +#: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "" -#: builtin/add.c:414 +#: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" msgstr "" -#: builtin/add.c:415 +#: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "" -#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204 +#: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 msgid "index file corrupt" msgstr "" -#: builtin/add.c:481 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 +#: builtin/add.c:604 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 msgid "Unable to write new index file" msgstr "" @@ -1864,7 +1982,7 @@ msgstr "" msgid "Checking patch %s..." msgstr "" -#: builtin/apply.c:3679 builtin/checkout.c:215 builtin/reset.c:124 +#: builtin/apply.c:3679 builtin/checkout.c:216 builtin/reset.c:124 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "" @@ -2005,7 +2123,7 @@ msgstr "" msgid "build a temporary index based on embedded index information" msgstr "" -#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:463 +#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" msgstr "" @@ -2139,99 +2257,99 @@ msgstr "" msgid "git blame [options] [rev-opts] [rev] [--] file" msgstr "" -#: builtin/blame.c:30 builtin/shortlog.c:15 +#: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" msgstr "" -#: builtin/blame.c:2350 +#: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" msgstr "" -#: builtin/blame.c:2351 +#: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "" -#: builtin/blame.c:2352 +#: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "" -#: builtin/blame.c:2353 +#: builtin/blame.c:2358 msgid "Show work cost statistics" msgstr "" -#: builtin/blame.c:2354 +#: builtin/blame.c:2359 msgid "Show output score for blame entries" msgstr "" -#: builtin/blame.c:2355 +#: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" msgstr "" -#: builtin/blame.c:2356 +#: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" msgstr "" -#: builtin/blame.c:2357 +#: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" msgstr "" -#: builtin/blame.c:2358 +#: builtin/blame.c:2363 msgid "Show porcelain format with per-line commit information" msgstr "" -#: builtin/blame.c:2359 +#: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "" -#: builtin/blame.c:2360 +#: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" msgstr "" -#: builtin/blame.c:2361 +#: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" msgstr "" -#: builtin/blame.c:2362 +#: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" msgstr "" -#: builtin/blame.c:2363 +#: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" msgstr "" -#: builtin/blame.c:2364 +#: builtin/blame.c:2369 msgid "Ignore whitespace differences" msgstr "" -#: builtin/blame.c:2365 +#: builtin/blame.c:2370 msgid "Spend extra cycles to find better match" msgstr "" -#: builtin/blame.c:2366 +#: builtin/blame.c:2371 msgid "Use revisions from <file> instead of calling git-rev-list" msgstr "" -#: builtin/blame.c:2367 +#: builtin/blame.c:2372 msgid "Use <file>'s contents as the final image" msgstr "" -#: builtin/blame.c:2368 builtin/blame.c:2369 +#: builtin/blame.c:2373 builtin/blame.c:2374 msgid "score" msgstr "" -#: builtin/blame.c:2368 +#: builtin/blame.c:2373 msgid "Find line copies within and across files" msgstr "" -#: builtin/blame.c:2369 +#: builtin/blame.c:2374 msgid "Find line movements within and across files" msgstr "" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "n,m" msgstr "" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "Process only line range n,m, counting from 1" msgstr "" @@ -2251,360 +2369,360 @@ msgstr "" msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" msgstr "" -#: builtin/branch.c:146 +#: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD." msgstr "" -#: builtin/branch.c:150 +#: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" " '%s', even though it is merged to HEAD." msgstr "" -#: builtin/branch.c:164 +#: builtin/branch.c:168 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "" -#: builtin/branch.c:168 +#: builtin/branch.c:172 #, c-format msgid "" "The branch '%s' is not fully merged.\n" "If you are sure you want to delete it, run 'git branch -D %s'." msgstr "" -#: builtin/branch.c:181 +#: builtin/branch.c:185 msgid "Update of config-file failed" msgstr "" -#: builtin/branch.c:209 +#: builtin/branch.c:213 msgid "cannot use -a with -d" msgstr "" -#: builtin/branch.c:215 +#: builtin/branch.c:219 msgid "Couldn't look up commit object for HEAD" msgstr "" -#: builtin/branch.c:223 +#: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "" -#: builtin/branch.c:236 +#: builtin/branch.c:240 #, c-format msgid "remote branch '%s' not found." msgstr "" -#: builtin/branch.c:237 +#: builtin/branch.c:241 #, c-format msgid "branch '%s' not found." msgstr "" -#: builtin/branch.c:251 +#: builtin/branch.c:255 #, c-format msgid "Error deleting remote branch '%s'" msgstr "" -#: builtin/branch.c:252 +#: builtin/branch.c:256 #, c-format msgid "Error deleting branch '%s'" msgstr "" -#: builtin/branch.c:259 +#: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" msgstr "" -#: builtin/branch.c:260 +#: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "" -#: builtin/branch.c:362 +#: builtin/branch.c:366 #, c-format msgid "branch '%s' does not point at a commit" msgstr "" -#: builtin/branch.c:434 +#: builtin/branch.c:453 #, c-format msgid "[%s: behind %d]" msgstr "" -#: builtin/branch.c:436 +#: builtin/branch.c:455 #, c-format msgid "[behind %d]" msgstr "" -#: builtin/branch.c:440 +#: builtin/branch.c:459 #, c-format msgid "[%s: ahead %d]" msgstr "" -#: builtin/branch.c:442 +#: builtin/branch.c:461 #, c-format msgid "[ahead %d]" msgstr "" -#: builtin/branch.c:445 +#: builtin/branch.c:464 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "" -#: builtin/branch.c:448 +#: builtin/branch.c:467 #, c-format msgid "[ahead %d, behind %d]" msgstr "" -#: builtin/branch.c:470 +#: builtin/branch.c:490 msgid " **** invalid ref ****" msgstr "" -#: builtin/branch.c:562 +#: builtin/branch.c:582 #, c-format msgid "(no branch, rebasing %s)" msgstr "" -#: builtin/branch.c:565 +#: builtin/branch.c:585 #, c-format msgid "(no branch, bisect started on %s)" msgstr "" -#: builtin/branch.c:568 +#: builtin/branch.c:588 #, c-format msgid "(detached from %s)" msgstr "" -#: builtin/branch.c:571 +#: builtin/branch.c:591 msgid "(no branch)" msgstr "" -#: builtin/branch.c:617 +#: builtin/branch.c:637 #, c-format msgid "object '%s' does not point to a commit" msgstr "" -#: builtin/branch.c:649 +#: builtin/branch.c:669 msgid "some refs could not be read" msgstr "" -#: builtin/branch.c:662 +#: builtin/branch.c:682 msgid "cannot rename the current branch while not on any." msgstr "" -#: builtin/branch.c:672 +#: builtin/branch.c:692 #, c-format msgid "Invalid branch name: '%s'" msgstr "" -#: builtin/branch.c:687 +#: builtin/branch.c:707 msgid "Branch rename failed" msgstr "" -#: builtin/branch.c:691 +#: builtin/branch.c:711 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "" -#: builtin/branch.c:695 +#: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "" -#: builtin/branch.c:702 +#: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" msgstr "" -#: builtin/branch.c:717 +#: builtin/branch.c:737 #, c-format msgid "malformed object name %s" msgstr "" -#: builtin/branch.c:741 +#: builtin/branch.c:761 #, c-format msgid "could not write branch description template: %s" msgstr "" -#: builtin/branch.c:771 +#: builtin/branch.c:791 msgid "Generic options" msgstr "" -#: builtin/branch.c:773 +#: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" msgstr "" -#: builtin/branch.c:774 +#: builtin/branch.c:794 msgid "suppress informational messages" msgstr "" -#: builtin/branch.c:775 +#: builtin/branch.c:795 msgid "set up tracking mode (see git-pull(1))" msgstr "" -#: builtin/branch.c:777 +#: builtin/branch.c:797 msgid "change upstream info" msgstr "" -#: builtin/branch.c:781 +#: builtin/branch.c:801 msgid "use colored output" msgstr "" -#: builtin/branch.c:782 +#: builtin/branch.c:802 msgid "act on remote-tracking branches" msgstr "" -#: builtin/branch.c:785 builtin/branch.c:791 builtin/branch.c:812 -#: builtin/branch.c:818 builtin/commit.c:1368 builtin/commit.c:1369 +#: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 +#: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 #: builtin/commit.c:1370 builtin/commit.c:1371 builtin/tag.c:468 msgid "commit" msgstr "" -#: builtin/branch.c:786 builtin/branch.c:792 +#: builtin/branch.c:806 builtin/branch.c:812 msgid "print only branches that contain the commit" msgstr "" -#: builtin/branch.c:798 +#: builtin/branch.c:818 msgid "Specific git-branch actions:" msgstr "" -#: builtin/branch.c:799 +#: builtin/branch.c:819 msgid "list both remote-tracking and local branches" msgstr "" -#: builtin/branch.c:801 +#: builtin/branch.c:821 msgid "delete fully merged branch" msgstr "" -#: builtin/branch.c:802 +#: builtin/branch.c:822 msgid "delete branch (even if not merged)" msgstr "" -#: builtin/branch.c:803 +#: builtin/branch.c:823 msgid "move/rename a branch and its reflog" msgstr "" -#: builtin/branch.c:804 +#: builtin/branch.c:824 msgid "move/rename a branch, even if target exists" msgstr "" -#: builtin/branch.c:805 +#: builtin/branch.c:825 msgid "list branch names" msgstr "" -#: builtin/branch.c:806 +#: builtin/branch.c:826 msgid "create the branch's reflog" msgstr "" -#: builtin/branch.c:808 +#: builtin/branch.c:828 msgid "edit the description for the branch" msgstr "" -#: builtin/branch.c:809 +#: builtin/branch.c:829 msgid "force creation (when already exists)" msgstr "" -#: builtin/branch.c:812 +#: builtin/branch.c:832 msgid "print only not merged branches" msgstr "" -#: builtin/branch.c:818 +#: builtin/branch.c:838 msgid "print only merged branches" msgstr "" -#: builtin/branch.c:822 +#: builtin/branch.c:842 msgid "list branches in columns" msgstr "" -#: builtin/branch.c:835 +#: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." msgstr "" -#: builtin/branch.c:840 builtin/clone.c:609 +#: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" msgstr "" -#: builtin/branch.c:863 +#: builtin/branch.c:883 msgid "--column and --verbose are incompatible" msgstr "" -#: builtin/branch.c:869 builtin/branch.c:908 +#: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" msgstr "" -#: builtin/branch.c:884 +#: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" msgstr "" -#: builtin/branch.c:889 +#: builtin/branch.c:909 msgid "cannot edit description of more than one branch" msgstr "" -#: builtin/branch.c:896 +#: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." msgstr "" -#: builtin/branch.c:899 +#: builtin/branch.c:919 #, c-format msgid "No branch named '%s'." msgstr "" -#: builtin/branch.c:914 +#: builtin/branch.c:934 msgid "too many branches for a rename operation" msgstr "" -#: builtin/branch.c:919 +#: builtin/branch.c:939 msgid "too many branches to set new upstream" msgstr "" -#: builtin/branch.c:923 +#: builtin/branch.c:943 #, c-format msgid "" "could not set upstream of HEAD to %s when it does not point to any branch." msgstr "" -#: builtin/branch.c:926 builtin/branch.c:948 builtin/branch.c:970 +#: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" msgstr "" -#: builtin/branch.c:930 +#: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" msgstr "" -#: builtin/branch.c:942 +#: builtin/branch.c:962 msgid "too many branches to unset upstream" msgstr "" -#: builtin/branch.c:946 +#: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." msgstr "" -#: builtin/branch.c:952 +#: builtin/branch.c:972 #, c-format msgid "Branch '%s' has no upstream information" msgstr "" -#: builtin/branch.c:967 +#: builtin/branch.c:987 msgid "it does not make sense to create 'HEAD' manually" msgstr "" -#: builtin/branch.c:973 +#: builtin/branch.c:993 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "" -#: builtin/branch.c:976 +#: builtin/branch.c:996 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" "track or --set-upstream-to\n" msgstr "" -#: builtin/branch.c:993 +#: builtin/branch.c:1013 #, c-format msgid "" "\n" @@ -2612,12 +2730,12 @@ msgid "" "\n" msgstr "" -#: builtin/branch.c:994 +#: builtin/branch.c:1014 #, c-format msgid " git branch -d %s\n" msgstr "" -#: builtin/branch.c:995 +#: builtin/branch.c:1015 #, c-format msgid " git branch --set-upstream-to %s\n" msgstr "" @@ -2635,43 +2753,43 @@ msgstr "" msgid "Need a repository to unbundle." msgstr "" -#: builtin/cat-file.c:247 +#: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" msgstr "" -#: builtin/cat-file.c:248 +#: builtin/cat-file.c:177 msgid "git cat-file (--batch|--batch-check) < <list_of_objects>" msgstr "" -#: builtin/cat-file.c:266 +#: builtin/cat-file.c:195 msgid "<type> can be one of: blob, tree, commit, tag" msgstr "" -#: builtin/cat-file.c:267 +#: builtin/cat-file.c:196 msgid "show object type" msgstr "" -#: builtin/cat-file.c:268 +#: builtin/cat-file.c:197 msgid "show object size" msgstr "" -#: builtin/cat-file.c:270 +#: builtin/cat-file.c:199 msgid "exit with zero when there's no error" msgstr "" -#: builtin/cat-file.c:271 +#: builtin/cat-file.c:200 msgid "pretty-print object's content" msgstr "" -#: builtin/cat-file.c:273 +#: builtin/cat-file.c:202 msgid "for blob objects, run textconv on object's content" msgstr "" -#: builtin/cat-file.c:275 +#: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" msgstr "" -#: builtin/cat-file.c:278 +#: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" msgstr "" @@ -2699,27 +2817,27 @@ msgstr "" msgid "input paths are terminated by a null character" msgstr "" -#: builtin/check-ignore.c:18 builtin/checkout.c:1041 builtin/gc.c:177 +#: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" msgstr "" -#: builtin/check-ignore.c:151 +#: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" msgstr "" -#: builtin/check-ignore.c:154 +#: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" msgstr "" -#: builtin/check-ignore.c:156 +#: builtin/check-ignore.c:151 msgid "no path specified" msgstr "" -#: builtin/check-ignore.c:160 +#: builtin/check-ignore.c:155 msgid "--quiet is only valid with a single pathname" msgstr "" -#: builtin/check-ignore.c:162 +#: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" msgstr "" @@ -2775,106 +2893,106 @@ msgstr "" msgid "git checkout [options] [<branch>] -- <file>..." msgstr "" -#: builtin/checkout.c:116 builtin/checkout.c:149 +#: builtin/checkout.c:117 builtin/checkout.c:150 #, c-format msgid "path '%s' does not have our version" msgstr "" -#: builtin/checkout.c:118 builtin/checkout.c:151 +#: builtin/checkout.c:119 builtin/checkout.c:152 #, c-format msgid "path '%s' does not have their version" msgstr "" -#: builtin/checkout.c:134 +#: builtin/checkout.c:135 #, c-format msgid "path '%s' does not have all necessary versions" msgstr "" -#: builtin/checkout.c:178 +#: builtin/checkout.c:179 #, c-format msgid "path '%s' does not have necessary versions" msgstr "" -#: builtin/checkout.c:195 +#: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" msgstr "" -#: builtin/checkout.c:212 +#: builtin/checkout.c:213 #, c-format msgid "Unable to add merge result for '%s'" msgstr "" -#: builtin/checkout.c:236 builtin/checkout.c:239 builtin/checkout.c:242 -#: builtin/checkout.c:245 +#: builtin/checkout.c:237 builtin/checkout.c:240 builtin/checkout.c:243 +#: builtin/checkout.c:246 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "" -#: builtin/checkout.c:248 builtin/checkout.c:251 +#: builtin/checkout.c:249 builtin/checkout.c:252 #, c-format msgid "'%s' cannot be used with %s" msgstr "" -#: builtin/checkout.c:254 +#: builtin/checkout.c:255 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "" -#: builtin/checkout.c:265 builtin/checkout.c:455 +#: builtin/checkout.c:266 builtin/checkout.c:458 msgid "corrupt index file" msgstr "" -#: builtin/checkout.c:326 builtin/checkout.c:333 +#: builtin/checkout.c:329 builtin/checkout.c:336 #, c-format msgid "path '%s' is unmerged" msgstr "" -#: builtin/checkout.c:477 +#: builtin/checkout.c:480 msgid "you need to resolve your current index first" msgstr "" -#: builtin/checkout.c:598 +#: builtin/checkout.c:601 #, c-format msgid "Can not do reflog for '%s'\n" msgstr "" -#: builtin/checkout.c:631 +#: builtin/checkout.c:634 msgid "HEAD is now at" msgstr "" -#: builtin/checkout.c:638 +#: builtin/checkout.c:641 #, c-format msgid "Reset branch '%s'\n" msgstr "" -#: builtin/checkout.c:641 +#: builtin/checkout.c:644 #, c-format msgid "Already on '%s'\n" msgstr "" -#: builtin/checkout.c:645 +#: builtin/checkout.c:648 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "" -#: builtin/checkout.c:647 builtin/checkout.c:984 +#: builtin/checkout.c:650 builtin/checkout.c:987 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "" -#: builtin/checkout.c:649 +#: builtin/checkout.c:652 #, c-format msgid "Switched to branch '%s'\n" msgstr "" -#: builtin/checkout.c:705 +#: builtin/checkout.c:708 #, c-format msgid " ... and %d more.\n" msgstr "" #. The singular version -#: builtin/checkout.c:711 +#: builtin/checkout.c:714 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -2889,7 +3007,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: builtin/checkout.c:729 +#: builtin/checkout.c:732 #, c-format msgid "" "If you want to keep them by creating a new branch, this may be a good time\n" @@ -2899,144 +3017,148 @@ msgid "" "\n" msgstr "" -#: builtin/checkout.c:759 +#: builtin/checkout.c:762 msgid "internal error in revision walk" msgstr "" -#: builtin/checkout.c:763 +#: builtin/checkout.c:766 msgid "Previous HEAD position was" msgstr "" -#: builtin/checkout.c:790 builtin/checkout.c:979 +#: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" msgstr "" #. case (1) -#: builtin/checkout.c:915 +#: builtin/checkout.c:918 #, c-format msgid "invalid reference: %s" msgstr "" #. case (1): want a tree -#: builtin/checkout.c:954 +#: builtin/checkout.c:957 #, c-format msgid "reference is not a tree: %s" msgstr "" -#: builtin/checkout.c:993 +#: builtin/checkout.c:996 msgid "paths cannot be used with switching branches" msgstr "" -#: builtin/checkout.c:996 builtin/checkout.c:1000 +#: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "" -#: builtin/checkout.c:1004 builtin/checkout.c:1007 builtin/checkout.c:1012 -#: builtin/checkout.c:1015 +#: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 +#: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "" -#: builtin/checkout.c:1020 +#: builtin/checkout.c:1023 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "" -#: builtin/checkout.c:1042 builtin/checkout.c:1044 builtin/clone.c:90 +#: builtin/checkout.c:1045 builtin/checkout.c:1047 builtin/clone.c:90 #: builtin/remote.c:169 builtin/remote.c:171 msgid "branch" msgstr "" -#: builtin/checkout.c:1043 +#: builtin/checkout.c:1046 msgid "create and checkout a new branch" msgstr "" -#: builtin/checkout.c:1045 +#: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" msgstr "" -#: builtin/checkout.c:1046 +#: builtin/checkout.c:1049 msgid "create reflog for new branch" msgstr "" -#: builtin/checkout.c:1047 +#: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" msgstr "" -#: builtin/checkout.c:1048 +#: builtin/checkout.c:1051 msgid "set upstream info for new branch" msgstr "" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new branch" msgstr "" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new unparented branch" msgstr "" -#: builtin/checkout.c:1051 +#: builtin/checkout.c:1054 msgid "checkout our version for unmerged files" msgstr "" -#: builtin/checkout.c:1053 +#: builtin/checkout.c:1056 msgid "checkout their version for unmerged files" msgstr "" -#: builtin/checkout.c:1055 +#: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" msgstr "" -#: builtin/checkout.c:1056 +#: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" msgstr "" -#: builtin/checkout.c:1057 builtin/merge.c:217 +#: builtin/checkout.c:1060 builtin/merge.c:217 msgid "update ignored files (default)" msgstr "" -#: builtin/checkout.c:1058 builtin/log.c:1149 parse-options.h:245 +#: builtin/checkout.c:1061 builtin/log.c:1158 parse-options.h:245 msgid "style" msgstr "" -#: builtin/checkout.c:1059 +#: builtin/checkout.c:1062 msgid "conflict style (merge or diff3)" msgstr "" -#: builtin/checkout.c:1062 +#: builtin/checkout.c:1065 +msgid "do not limit pathspecs to sparse entries only" +msgstr "" + +#: builtin/checkout.c:1067 msgid "second guess 'git checkout no-such-branch'" msgstr "" -#: builtin/checkout.c:1086 +#: builtin/checkout.c:1091 msgid "-b, -B and --orphan are mutually exclusive" msgstr "" -#: builtin/checkout.c:1103 +#: builtin/checkout.c:1108 msgid "--track needs a branch name" msgstr "" -#: builtin/checkout.c:1110 +#: builtin/checkout.c:1115 msgid "Missing branch name; try -b" msgstr "" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1150 msgid "invalid path specification" msgstr "" -#: builtin/checkout.c:1152 +#: builtin/checkout.c:1157 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" "Did you intend to checkout '%s' which can not be resolved as commit?" msgstr "" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -3084,7 +3206,7 @@ msgid "remove whole directories" msgstr "" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 -#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182 +#: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" msgstr "" @@ -3208,137 +3330,137 @@ msgstr "" msgid "set config inside the new repository" msgstr "" -#: builtin/clone.c:244 +#: builtin/clone.c:254 #, c-format -msgid "reference repository '%s' is not a local directory." +msgid "reference repository '%s' is not a local repository." msgstr "" -#: builtin/clone.c:307 +#: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" msgstr "" -#: builtin/clone.c:309 builtin/diff.c:77 +#: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" msgstr "" -#: builtin/clone.c:311 +#: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" msgstr "" -#: builtin/clone.c:325 +#: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" msgstr "" -#: builtin/clone.c:347 +#: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" msgstr "" -#: builtin/clone.c:351 +#: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" msgstr "" -#: builtin/clone.c:374 +#: builtin/clone.c:384 #, c-format msgid "done.\n" msgstr "" -#: builtin/clone.c:387 +#: builtin/clone.c:397 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 "" -#: builtin/clone.c:466 +#: builtin/clone.c:476 #, c-format msgid "Could not find remote branch %s to clone." msgstr "" -#: builtin/clone.c:540 +#: builtin/clone.c:550 msgid "remote did not send all necessary objects" msgstr "" -#: builtin/clone.c:600 +#: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "" -#: builtin/clone.c:631 +#: builtin/clone.c:641 msgid "unable to checkout working tree" msgstr "" -#: builtin/clone.c:739 +#: builtin/clone.c:749 msgid "Too many arguments." msgstr "" -#: builtin/clone.c:743 +#: builtin/clone.c:753 msgid "You must specify a repository to clone." msgstr "" -#: builtin/clone.c:754 +#: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "" -#: builtin/clone.c:757 +#: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." msgstr "" -#: builtin/clone.c:770 +#: builtin/clone.c:780 #, c-format msgid "repository '%s' does not exist" msgstr "" -#: builtin/clone.c:775 +#: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." msgstr "" -#: builtin/clone.c:785 +#: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "" -#: builtin/clone.c:795 +#: builtin/clone.c:805 #, c-format msgid "working tree '%s' already exists." msgstr "" -#: builtin/clone.c:808 builtin/clone.c:820 +#: builtin/clone.c:818 builtin/clone.c:830 #, c-format msgid "could not create leading directories of '%s'" msgstr "" -#: builtin/clone.c:811 +#: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." msgstr "" -#: builtin/clone.c:830 +#: builtin/clone.c:840 #, c-format msgid "Cloning into bare repository '%s'...\n" msgstr "" -#: builtin/clone.c:832 +#: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" msgstr "" -#: builtin/clone.c:867 +#: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" msgstr "" -#: builtin/clone.c:916 +#: builtin/clone.c:926 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "" -#: builtin/clone.c:923 +#: builtin/clone.c:933 msgid "You appear to have cloned an empty repository." msgstr "" @@ -3464,7 +3586,7 @@ msgstr "" msgid "could not lookup commit %s" msgstr "" -#: builtin/commit.c:612 builtin/shortlog.c:272 +#: builtin/commit.c:612 builtin/shortlog.c:270 #, c-format msgid "(reading log message from standard input)\n" msgstr "" @@ -3648,8 +3770,8 @@ msgstr "" msgid "terminate entries with NUL" msgstr "" -#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:653 -#: builtin/fast-export.c:656 builtin/tag.c:459 +#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:659 +#: builtin/fast-export.c:662 builtin/tag.c:459 msgid "mode" msgstr "" @@ -3752,7 +3874,7 @@ msgstr "" msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "" -#: builtin/commit.c:1373 builtin/log.c:1104 builtin/revert.c:109 +#: builtin/commit.c:1373 builtin/log.c:1113 builtin/revert.c:109 msgid "add Signed-off-by:" msgstr "" @@ -4002,7 +4124,11 @@ msgid "respect include directives on lookup" msgstr "" #: builtin/count-objects.c:82 -msgid "git count-objects [-v]" +msgid "git count-objects [-v] [-H | --human-readable]" +msgstr "" + +#: builtin/count-objects.c:97 +msgid "print sizes in human readable format" msgstr "" #: builtin/describe.c:15 @@ -4173,39 +4299,39 @@ msgstr "" msgid "git fast-export [rev-list-opts]" msgstr "" -#: builtin/fast-export.c:652 +#: builtin/fast-export.c:658 msgid "show progress after <n> objects" msgstr "" -#: builtin/fast-export.c:654 +#: builtin/fast-export.c:660 msgid "select handling of signed tags" msgstr "" -#: builtin/fast-export.c:657 +#: builtin/fast-export.c:663 msgid "select handling of tags that tag filtered objects" msgstr "" -#: builtin/fast-export.c:660 +#: builtin/fast-export.c:666 msgid "Dump marks to this file" msgstr "" -#: builtin/fast-export.c:662 +#: builtin/fast-export.c:668 msgid "Import marks from this file" msgstr "" -#: builtin/fast-export.c:664 +#: builtin/fast-export.c:670 msgid "Fake a tagger when tags lack one" msgstr "" -#: builtin/fast-export.c:666 +#: builtin/fast-export.c:672 msgid "Output full tree for each commit" msgstr "" -#: builtin/fast-export.c:668 +#: builtin/fast-export.c:674 msgid "Use the done feature to terminate the stream" msgstr "" -#: builtin/fast-export.c:669 +#: builtin/fast-export.c:675 msgid "Skip output of blob data" msgstr "" @@ -4281,7 +4407,7 @@ msgstr "" msgid "convert to a complete repository" msgstr "" -#: builtin/fetch.c:88 builtin/log.c:1121 +#: builtin/fetch.c:88 builtin/log.c:1130 msgid "dir" msgstr "" @@ -4456,29 +4582,29 @@ msgstr "" msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" msgstr "" -#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701 -#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175 +#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:701 +#: builtin/merge.c:188 builtin/show-branch.c:655 builtin/show-ref.c:175 #: builtin/tag.c:446 parse-options.h:133 parse-options.h:239 msgid "n" msgstr "" -#: builtin/fmt-merge-msg.c:660 +#: builtin/fmt-merge-msg.c:664 msgid "populate log with at most <n> entries from shortlog" msgstr "" -#: builtin/fmt-merge-msg.c:663 +#: builtin/fmt-merge-msg.c:667 msgid "alias for --log (deprecated)" msgstr "" -#: builtin/fmt-merge-msg.c:666 +#: builtin/fmt-merge-msg.c:670 msgid "text" msgstr "" -#: builtin/fmt-merge-msg.c:667 +#: builtin/fmt-merge-msg.c:671 msgid "use <text> as start of message" msgstr "" -#: builtin/fmt-merge-msg.c:668 +#: builtin/fmt-merge-msg.c:672 msgid "file to read from" msgstr "" @@ -4864,82 +4990,118 @@ msgstr "" msgid "process file as it were from this path" msgstr "" -#: builtin/help.c:42 +#: builtin/help.c:43 msgid "print all available commands" msgstr "" -#: builtin/help.c:43 +#: builtin/help.c:44 +msgid "print list of useful guides" +msgstr "" + +#: builtin/help.c:45 msgid "show man page" msgstr "" -#: builtin/help.c:44 +#: builtin/help.c:46 msgid "show manual in web browser" msgstr "" -#: builtin/help.c:46 +#: builtin/help.c:48 msgid "show info page" msgstr "" -#: builtin/help.c:52 -msgid "git help [--all] [--man|--web|--info] [command]" +#: builtin/help.c:54 +msgid "git help [--all] [--guides] [--man|--web|--info] [command]" msgstr "" -#: builtin/help.c:64 +#: builtin/help.c:66 #, c-format msgid "unrecognized help format '%s'" msgstr "" -#: builtin/help.c:92 +#: builtin/help.c:94 msgid "Failed to start emacsclient." msgstr "" -#: builtin/help.c:105 +#: builtin/help.c:107 msgid "Failed to parse emacsclient version." msgstr "" -#: builtin/help.c:113 +#: builtin/help.c:115 #, c-format msgid "emacsclient version '%d' too old (< 22)." msgstr "" -#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176 +#: builtin/help.c:133 builtin/help.c:161 builtin/help.c:170 builtin/help.c:178 #, c-format msgid "failed to exec '%s': %s" msgstr "" -#: builtin/help.c:216 +#: builtin/help.c:218 #, c-format msgid "" "'%s': path for unsupported man viewer.\n" "Please consider using 'man.<tool>.cmd' instead." msgstr "" -#: builtin/help.c:228 +#: builtin/help.c:230 #, c-format msgid "" "'%s': cmd for supported man viewer.\n" "Please consider using 'man.<tool>.path' instead." msgstr "" -#: builtin/help.c:349 +#: builtin/help.c:351 #, c-format msgid "'%s': unknown man viewer." msgstr "" -#: builtin/help.c:366 +#: builtin/help.c:368 msgid "no man viewer handled the request" msgstr "" -#: builtin/help.c:374 +#: builtin/help.c:376 msgid "no info viewer handled the request" msgstr "" -#: builtin/help.c:429 builtin/help.c:436 +#: builtin/help.c:422 +msgid "Defining attributes per path" +msgstr "" + +#: builtin/help.c:423 +msgid "A Git glossary" +msgstr "" + +#: builtin/help.c:424 +msgid "Specifies intentionally untracked files to ignore" +msgstr "" + +#: builtin/help.c:425 +msgid "Defining submodule properties" +msgstr "" + +#: builtin/help.c:426 +msgid "Specifying revisions and ranges for Git" +msgstr "" + +#: builtin/help.c:427 +msgid "A tutorial introduction to Git (for version 1.5.1 or newer)" +msgstr "" + +#: builtin/help.c:428 +msgid "An overview of recommended workflows with Git" +msgstr "" + +#: builtin/help.c:440 +msgid "The common Git guides are:\n" +msgstr "" + +#: builtin/help.c:462 builtin/help.c:478 #, c-format msgid "usage: %s%s" msgstr "" -#: builtin/help.c:452 +#: builtin/help.c:494 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "" @@ -5382,7 +5544,7 @@ msgid "Cannot access work tree '%s'" msgstr "" #: builtin/log.c:40 -msgid "git log [<options>] [<since>..<until>] [[--] <path>...]\n" +msgid "git log [<options>] [<revision range>] [[--] <path>...]\n" msgstr "" #: builtin/log.c:41 @@ -5420,301 +5582,301 @@ msgstr "" msgid "Unknown type: %d" msgstr "" -#: builtin/log.c:630 +#: builtin/log.c:638 msgid "format.headers without value" msgstr "" -#: builtin/log.c:704 +#: builtin/log.c:720 msgid "name of output directory is too long" msgstr "" -#: builtin/log.c:720 +#: builtin/log.c:736 #, c-format msgid "Cannot open patch file %s" msgstr "" -#: builtin/log.c:734 +#: builtin/log.c:750 msgid "Need exactly one range." msgstr "" -#: builtin/log.c:742 +#: builtin/log.c:758 msgid "Not a range." msgstr "" -#: builtin/log.c:815 +#: builtin/log.c:860 msgid "Cover letter needs email format" msgstr "" -#: builtin/log.c:888 +#: builtin/log.c:936 #, c-format msgid "insane in-reply-to: %s" msgstr "" -#: builtin/log.c:916 +#: builtin/log.c:964 msgid "git format-patch [options] [<since> | <revision range>]" msgstr "" -#: builtin/log.c:961 +#: builtin/log.c:1009 msgid "Two output directories?" msgstr "" -#: builtin/log.c:1099 +#: builtin/log.c:1108 msgid "use [PATCH n/m] even with a single patch" msgstr "" -#: builtin/log.c:1102 +#: builtin/log.c:1111 msgid "use [PATCH] even with multiple patches" msgstr "" -#: builtin/log.c:1106 +#: builtin/log.c:1115 msgid "print patches to standard out" msgstr "" -#: builtin/log.c:1108 +#: builtin/log.c:1117 msgid "generate a cover letter" msgstr "" -#: builtin/log.c:1110 +#: builtin/log.c:1119 msgid "use simple number sequence for output file names" msgstr "" -#: builtin/log.c:1111 +#: builtin/log.c:1120 msgid "sfx" msgstr "" -#: builtin/log.c:1112 +#: builtin/log.c:1121 msgid "use <sfx> instead of '.patch'" msgstr "" -#: builtin/log.c:1114 +#: builtin/log.c:1123 msgid "start numbering patches at <n> instead of 1" msgstr "" -#: builtin/log.c:1116 +#: builtin/log.c:1125 msgid "mark the series as Nth re-roll" msgstr "" -#: builtin/log.c:1118 +#: builtin/log.c:1127 msgid "Use [<prefix>] instead of [PATCH]" msgstr "" -#: builtin/log.c:1121 +#: builtin/log.c:1130 msgid "store resulting files in <dir>" msgstr "" -#: builtin/log.c:1124 +#: builtin/log.c:1133 msgid "don't strip/add [PATCH]" msgstr "" -#: builtin/log.c:1127 +#: builtin/log.c:1136 msgid "don't output binary diffs" msgstr "" -#: builtin/log.c:1129 +#: builtin/log.c:1138 msgid "don't include a patch matching a commit upstream" msgstr "" -#: builtin/log.c:1131 +#: builtin/log.c:1140 msgid "show patch format instead of default (patch + stat)" msgstr "" -#: builtin/log.c:1133 +#: builtin/log.c:1142 msgid "Messaging" msgstr "" -#: builtin/log.c:1134 +#: builtin/log.c:1143 msgid "header" msgstr "" -#: builtin/log.c:1135 +#: builtin/log.c:1144 msgid "add email header" msgstr "" -#: builtin/log.c:1136 builtin/log.c:1138 +#: builtin/log.c:1145 builtin/log.c:1147 msgid "email" msgstr "" -#: builtin/log.c:1136 +#: builtin/log.c:1145 msgid "add To: header" msgstr "" -#: builtin/log.c:1138 +#: builtin/log.c:1147 msgid "add Cc: header" msgstr "" -#: builtin/log.c:1140 +#: builtin/log.c:1149 msgid "message-id" msgstr "" -#: builtin/log.c:1141 +#: builtin/log.c:1150 msgid "make first mail a reply to <message-id>" msgstr "" -#: builtin/log.c:1142 builtin/log.c:1145 +#: builtin/log.c:1151 builtin/log.c:1154 msgid "boundary" msgstr "" -#: builtin/log.c:1143 +#: builtin/log.c:1152 msgid "attach the patch" msgstr "" -#: builtin/log.c:1146 +#: builtin/log.c:1155 msgid "inline the patch" msgstr "" -#: builtin/log.c:1150 +#: builtin/log.c:1159 msgid "enable message threading, styles: shallow, deep" msgstr "" -#: builtin/log.c:1152 +#: builtin/log.c:1161 msgid "signature" msgstr "" -#: builtin/log.c:1153 +#: builtin/log.c:1162 msgid "add a signature" msgstr "" -#: builtin/log.c:1155 +#: builtin/log.c:1164 msgid "don't print the patch filenames" msgstr "" -#: builtin/log.c:1239 +#: builtin/log.c:1248 msgid "-n and -k are mutually exclusive." msgstr "" -#: builtin/log.c:1241 +#: builtin/log.c:1250 msgid "--subject-prefix and -k are mutually exclusive." msgstr "" -#: builtin/log.c:1249 +#: builtin/log.c:1258 msgid "--name-only does not make sense" msgstr "" -#: builtin/log.c:1251 +#: builtin/log.c:1260 msgid "--name-status does not make sense" msgstr "" -#: builtin/log.c:1253 +#: builtin/log.c:1262 msgid "--check does not make sense" msgstr "" -#: builtin/log.c:1276 +#: builtin/log.c:1285 msgid "standard output, or directory, which one?" msgstr "" -#: builtin/log.c:1278 +#: builtin/log.c:1287 #, c-format msgid "Could not create directory '%s'" msgstr "" -#: builtin/log.c:1431 +#: builtin/log.c:1435 msgid "Failed to create output files" msgstr "" -#: builtin/log.c:1480 +#: builtin/log.c:1484 msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]" msgstr "" -#: builtin/log.c:1535 +#: builtin/log.c:1539 #, c-format msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" msgstr "" -#: builtin/log.c:1548 builtin/log.c:1550 builtin/log.c:1562 +#: builtin/log.c:1552 builtin/log.c:1554 builtin/log.c:1566 #, c-format msgid "Unknown commit %s" msgstr "" -#: builtin/ls-files.c:409 +#: builtin/ls-files.c:402 msgid "git ls-files [options] [<file>...]" msgstr "" -#: builtin/ls-files.c:466 +#: builtin/ls-files.c:459 msgid "identify the file status with tags" msgstr "" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:461 msgid "use lowercase letters for 'assume unchanged' files" msgstr "" -#: builtin/ls-files.c:470 +#: builtin/ls-files.c:463 msgid "show cached files in the output (default)" msgstr "" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:465 msgid "show deleted files in the output" msgstr "" -#: builtin/ls-files.c:474 +#: builtin/ls-files.c:467 msgid "show modified files in the output" msgstr "" -#: builtin/ls-files.c:476 +#: builtin/ls-files.c:469 msgid "show other files in the output" msgstr "" -#: builtin/ls-files.c:478 +#: builtin/ls-files.c:471 msgid "show ignored files in the output" msgstr "" -#: builtin/ls-files.c:481 +#: builtin/ls-files.c:474 msgid "show staged contents' object name in the output" msgstr "" -#: builtin/ls-files.c:483 +#: builtin/ls-files.c:476 msgid "show files on the filesystem that need to be removed" msgstr "" -#: builtin/ls-files.c:485 +#: builtin/ls-files.c:478 msgid "show 'other' directories' name only" msgstr "" -#: builtin/ls-files.c:488 +#: builtin/ls-files.c:481 msgid "don't show empty directories" msgstr "" -#: builtin/ls-files.c:491 +#: builtin/ls-files.c:484 msgid "show unmerged files in the output" msgstr "" -#: builtin/ls-files.c:493 +#: builtin/ls-files.c:486 msgid "show resolve-undo information" msgstr "" -#: builtin/ls-files.c:495 +#: builtin/ls-files.c:488 msgid "skip files matching pattern" msgstr "" -#: builtin/ls-files.c:498 +#: builtin/ls-files.c:491 msgid "exclude patterns are read from <file>" msgstr "" -#: builtin/ls-files.c:501 +#: builtin/ls-files.c:494 msgid "read additional per-directory exclude patterns in <file>" msgstr "" -#: builtin/ls-files.c:503 +#: builtin/ls-files.c:496 msgid "add the standard git exclusions" msgstr "" -#: builtin/ls-files.c:506 +#: builtin/ls-files.c:499 msgid "make the output relative to the project top directory" msgstr "" -#: builtin/ls-files.c:509 +#: builtin/ls-files.c:502 msgid "if any <file> is not in the index, treat this as an error" msgstr "" -#: builtin/ls-files.c:510 +#: builtin/ls-files.c:503 msgid "tree-ish" msgstr "" -#: builtin/ls-files.c:511 +#: builtin/ls-files.c:504 msgid "pretend that paths removed since <tree-ish> are still present" msgstr "" -#: builtin/ls-files.c:513 +#: builtin/ls-files.c:506 msgid "show debugging data" msgstr "" @@ -7780,7 +7942,7 @@ msgid "" msgstr "" #: builtin/revert.c:22 -msgid "git revert [options] <commit-ish>" +msgid "git revert [options] <commit-ish>..." msgstr "" #: builtin/revert.c:23 @@ -7788,7 +7950,7 @@ msgid "git revert <subcommand>" msgstr "" #: builtin/revert.c:28 -msgid "git cherry-pick [options] <commit-ish>" +msgid "git cherry-pick [options] <commit-ish>..." msgstr "" #: builtin/revert.c:29 @@ -7931,31 +8093,31 @@ msgid "git rm: unable to remove %s" msgstr "" #: builtin/shortlog.c:13 -msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" msgstr "" -#: builtin/shortlog.c:133 +#: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" msgstr "" -#: builtin/shortlog.c:229 +#: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" msgstr "" -#: builtin/shortlog.c:231 +#: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" msgstr "" -#: builtin/shortlog.c:233 +#: builtin/shortlog.c:231 msgid "Show the email address of each author" msgstr "" -#: builtin/shortlog.c:234 +#: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" msgstr "" -#: builtin/shortlog.c:235 +#: builtin/shortlog.c:233 msgid "Linewrap output" msgstr "" @@ -7971,67 +8133,67 @@ msgstr "" msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" msgstr "" -#: builtin/show-branch.c:651 +#: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" msgstr "" -#: builtin/show-branch.c:653 +#: builtin/show-branch.c:652 msgid "show remote-tracking branches" msgstr "" -#: builtin/show-branch.c:655 +#: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" msgstr "" -#: builtin/show-branch.c:657 +#: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" msgstr "" -#: builtin/show-branch.c:659 +#: builtin/show-branch.c:658 msgid "synonym to more=-1" msgstr "" -#: builtin/show-branch.c:660 +#: builtin/show-branch.c:659 msgid "suppress naming strings" msgstr "" -#: builtin/show-branch.c:662 +#: builtin/show-branch.c:661 msgid "include the current branch" msgstr "" -#: builtin/show-branch.c:664 +#: builtin/show-branch.c:663 msgid "name commits with their object names" msgstr "" -#: builtin/show-branch.c:666 +#: builtin/show-branch.c:665 msgid "show possible merge bases" msgstr "" -#: builtin/show-branch.c:668 +#: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" msgstr "" -#: builtin/show-branch.c:670 +#: builtin/show-branch.c:669 msgid "show commits in topological order" msgstr "" -#: builtin/show-branch.c:672 +#: builtin/show-branch.c:671 msgid "show only commits not on the first branch" msgstr "" -#: builtin/show-branch.c:674 +#: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" msgstr "" -#: builtin/show-branch.c:676 +#: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" msgstr "" -#: builtin/show-branch.c:678 +#: builtin/show-branch.c:677 msgid "<n>[,<base>]" msgstr "" -#: builtin/show-branch.c:679 +#: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" msgstr "" @@ -8478,7 +8640,10 @@ msgid "only useful for debugging" msgstr "" #: git.c:16 -msgid "See 'git help <command>' for more information on a specific command." +msgid "" +"'git help -a' and 'git help -g' lists available subcommands and some\n" +"concept guides. See 'git help <command>' or 'git help <concept>'\n" +"to read about a specific subcommand or concept." msgstr "" #: parse-options.h:156 @@ -8815,59 +8980,59 @@ msgid "" "(You can use \"git bisect bad\" and \"git bisect good\" for that.)" msgstr "" -#: git-bisect.sh:347 git-bisect.sh:474 +#: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." msgstr "" -#: git-bisect.sh:354 +#: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" msgstr "" -#: git-bisect.sh:363 +#: git-bisect.sh:379 #, sh-format msgid "" "Could not check out original HEAD '$branch'.\n" "Try 'git bisect reset <commit>'." msgstr "" -#: git-bisect.sh:390 +#: git-bisect.sh:406 msgid "No logfile given" msgstr "" -#: git-bisect.sh:391 +#: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" msgstr "" -#: git-bisect.sh:408 +#: git-bisect.sh:424 msgid "?? what are you talking about?" msgstr "" -#: git-bisect.sh:420 +#: git-bisect.sh:436 #, sh-format msgid "running $command" msgstr "" -#: git-bisect.sh:427 +#: git-bisect.sh:443 #, sh-format msgid "" "bisect run failed:\n" "exit code $res from '$command' is < 0 or >= 128" msgstr "" -#: git-bisect.sh:453 +#: git-bisect.sh:469 msgid "bisect run cannot continue any more" msgstr "" -#: git-bisect.sh:459 +#: git-bisect.sh:475 #, sh-format msgid "" "bisect run failed:\n" "'bisect_state $state' exited with error code $res" msgstr "" -#: git-bisect.sh:466 +#: git-bisect.sh:482 msgid "bisect run success" msgstr "" @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: git 1.8.3\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2013-04-10 15:16+0800\n" -"PO-Revision-Date: 2013-04-11 11:56+0100\n" +"POT-Creation-Date: 2013-04-30 08:25+0800\n" +"PO-Revision-Date: 2013-04-30 12:22+0100\n" "Last-Translator: Peter Krefting <peter@softwolves.pp.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" @@ -65,7 +65,7 @@ msgstr "fmt" msgid "archive format" msgstr "arkivformat" -#: archive.c:324 builtin/log.c:1117 +#: archive.c:324 builtin/log.c:1126 msgid "prefix" msgstr "prefix" @@ -73,10 +73,10 @@ msgstr "prefix" msgid "prepend prefix to each pathname in the archive" msgstr "lägg till prefix till varje sökväg i arkivet" -#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2366 -#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:659 -#: builtin/fast-export.c:661 builtin/grep.c:715 builtin/hash-object.c:77 -#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536 +#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 +#: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 +#: builtin/fast-export.c:667 builtin/grep.c:715 builtin/hash-object.c:77 +#: builtin/ls-files.c:490 builtin/ls-files.c:493 builtin/notes.c:536 #: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149 msgid "file" msgstr "fil" @@ -133,6 +133,77 @@ msgstr "" "Negativa mönster ignoreras i git-attribut\n" "Använd '\\!' för att inleda med ett utropstecken." +#: branch.c:60 +#, c-format +msgid "Not setting branch %s as its own upstream." +msgstr "Ställer inte in grenen %s som sin egen uppströmsgren." + +#: branch.c:82 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s by rebasing." +msgstr "" +"Grenen %s ställdes in att spåra fjärrgrenen %s från %s genom ombasering." + +#: branch.c:83 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s." +msgstr "Grenen %s ställdes in att spåra fjärrgrenen %s från %s." + +#: branch.c:87 +#, c-format +msgid "Branch %s set up to track local branch %s by rebasing." +msgstr "Grenen %s ställdes in att spåra den lokala grenen %s genom ombasering." + +#: branch.c:88 +#, c-format +msgid "Branch %s set up to track local branch %s." +msgstr "Grenen %s ställdes in att spåra den lokala grenen %s." + +#: branch.c:92 +#, c-format +msgid "Branch %s set up to track remote ref %s by rebasing." +msgstr "Grenen %s ställdes in att spåra fjärreferensen %s genom ombasering." + +#: branch.c:93 +#, c-format +msgid "Branch %s set up to track remote ref %s." +msgstr "Grenen %s ställdes in att spåra fjärreferensen %s." + +#: branch.c:97 +#, c-format +msgid "Branch %s set up to track local ref %s by rebasing." +msgstr "" +"Grenen %s ställdes in att spåra den lokala referensen %s genom ombasering." + +#: branch.c:98 +#, c-format +msgid "Branch %s set up to track local ref %s." +msgstr "Grenen %s ställdes in att spåra den lokala referensen %s." + +#: branch.c:118 +#, c-format +msgid "Tracking not set up: name too long: %s" +msgstr "Spårning har inte ställts in: namnet för långt: %s" + +#: branch.c:137 +#, c-format +msgid "Not tracking: ambiguous information for ref %s" +msgstr "Spårar inte: tvetydig information för referensen %s" + +#: branch.c:182 +#, c-format +msgid "'%s' is not a valid branch name." +msgstr "\"%s\" är inte ett giltigt grennamn." + +#: branch.c:187 +#, c-format +msgid "A branch named '%s' already exists." +msgstr "Det finns redan en gren som heter \"%s\"" + +#: branch.c:195 +msgid "Cannot force update the current branch." +msgstr "Kan inte tvinga uppdatering av aktuell gren." + #: branch.c:201 #, c-format msgid "Cannot setup tracking information; starting point '%s' is not a branch." @@ -163,6 +234,29 @@ msgstr "" "spåra dess fjärrmotsvarighet kan du använda \"git push -u\"\n" "för att ställa in uppströmskonfigurationen när du sänder in." +#: branch.c:250 +#, c-format +msgid "Not a valid object name: '%s'." +msgstr "Objektnamnet är inte giltigt: \"%s\"." + +#: branch.c:270 +#, c-format +msgid "Ambiguous object name: '%s'." +msgstr "Objektnamnet är tvetydigt: \"%s\"." + +#: branch.c:275 +#, c-format +msgid "Not a valid branch point: '%s'." +msgstr "Avgreningspunkten är inte giltig: \"%s\"" + +#: branch.c:281 +msgid "Failed to lock ref for update" +msgstr "Misslyckades låsa referens för uppdatering" + +#: branch.c:299 +msgid "Failed to write ref" +msgstr "Misslyckades skriva referens" + #: bundle.c:36 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -182,9 +276,9 @@ msgstr "kunde inte öppna \"%s\"" msgid "Repository lacks these prerequisite commits:" msgstr "Arkivet saknar dessa nödvändiga incheckningar:" -#: bundle.c:164 sequencer.c:651 sequencer.c:1083 builtin/log.c:300 -#: builtin/log.c:754 builtin/log.c:1350 builtin/log.c:1566 builtin/merge.c:349 -#: builtin/shortlog.c:157 +#: bundle.c:164 sequencer.c:651 sequencer.c:1101 builtin/log.c:300 +#: builtin/log.c:770 builtin/log.c:1344 builtin/log.c:1570 builtin/merge.c:349 +#: builtin/shortlog.c:155 msgid "revision walk setup failed" msgstr "misslyckades skapa revisionstraversering" @@ -210,7 +304,7 @@ msgstr[1] "Paketet (bundlen) kräver dessa %d referenser:" msgid "rev-list died" msgstr "rev-list dog" -#: bundle.c:300 builtin/log.c:1246 builtin/shortlog.c:260 +#: bundle.c:300 builtin/log.c:1255 builtin/shortlog.c:258 #, c-format msgid "unrecognized argument: %s" msgstr "okänt argument: %s" @@ -360,7 +454,7 @@ msgstr "" "Hittade fel i konfigurationsvariabeln \"diff.dirstat\":\n" "%s" -#: diff.c:3480 +#: diff.c:3481 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -369,7 +463,7 @@ msgstr "" "Misslyckades tolka argument till flaggan --dirstat/-X;\n" "%s" -#: diff.c:3494 +#: diff.c:3495 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "Misslyckades tolka argument till flaggan --submodule: \"%s\"" @@ -474,8 +568,8 @@ msgstr[1] "" msgid "failed to read the cache" msgstr "misslyckads läsa cachen" -#: merge.c:110 builtin/checkout.c:362 builtin/checkout.c:563 -#: builtin/clone.c:635 +#: merge.c:110 builtin/checkout.c:365 builtin/checkout.c:566 +#: builtin/clone.c:645 msgid "unable to write new index file" msgstr "kunde inte skriva ny indexfil" @@ -524,7 +618,7 @@ msgstr "kan inte läsa objektet %s: \"%s\"" msgid "blob expected for %s '%s'" msgstr "blob förväntades för %s \"%s\"" -#: merge-recursive.c:773 builtin/clone.c:303 +#: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" msgstr "misslyckades öppna \"%s\"" @@ -1046,11 +1140,21 @@ msgstr "sparad HEAD-fil från före \"cherry-pick\", \"%s\", är trasig" msgid "Could not format %s." msgstr "Kunde inte formatera %s." -#: sequencer.c:1101 +#: sequencer.c:1083 +#, c-format +msgid "%s: can't cherry-pick a %s" +msgstr "%s: kan inte göra \"cherry-pick\" på typen \"%s\"" + +#: sequencer.c:1085 +#, c-format +msgid "%s: bad revision" +msgstr "%s: felaktig revision" + +#: sequencer.c:1119 msgid "Can't revert as initial commit" msgstr "Kan inte ångra som första incheckning" -#: sequencer.c:1102 +#: sequencer.c:1120 msgid "Can't cherry-pick into empty head" msgstr "Kan inte göra \"cherry-pick\" i ett tomt huvud" @@ -1242,68 +1346,68 @@ msgstr "osammansl.: %s" msgid "bug: unhandled diff status %c" msgstr "programfel: diff-status %c ej hanterad" -#: wt-status.c:805 +#: wt-status.c:803 msgid "You have unmerged paths." msgstr "Du har ej sammanslagna sökvägar." -#: wt-status.c:808 wt-status.c:960 +#: wt-status.c:806 wt-status.c:958 msgid " (fix conflicts and run \"git commit\")" msgstr " (rätta konflikter och kör \"git commit\")" -#: wt-status.c:811 +#: wt-status.c:809 msgid "All conflicts fixed but you are still merging." msgstr "Alla konflikter har rättats men du är fortfarande i en sammanslagning." -#: wt-status.c:814 +#: wt-status.c:812 msgid " (use \"git commit\" to conclude merge)" msgstr " (använd \"git commit\" för att slutföra sammanslagningen)" -#: wt-status.c:824 +#: wt-status.c:822 msgid "You are in the middle of an am session." msgstr "Du är i mitten av en körning av \"git am\"." -#: wt-status.c:827 +#: wt-status.c:825 msgid "The current patch is empty." msgstr "Aktuell patch är tom." -#: wt-status.c:831 +#: wt-status.c:829 msgid " (fix conflicts and then run \"git am --resolved\")" msgstr " (rätta konflikter och kör sedan \"git am --resolved\")" -#: wt-status.c:833 +#: wt-status.c:831 msgid " (use \"git am --skip\" to skip this patch)" msgstr " (använd \"git am --skip\" för att hoppa över patchen)" -#: wt-status.c:835 +#: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" msgstr " (använd \"git am --abort\" för att återställa ursprungsgrenen)" -#: wt-status.c:895 wt-status.c:912 +#: wt-status.c:893 wt-status.c:910 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "Du håller på att ombasera grenen \"%s\" ovanpå \"%s\"." -#: wt-status.c:900 wt-status.c:917 +#: wt-status.c:898 wt-status.c:915 msgid "You are currently rebasing." msgstr "Du håller på med en ombasering." -#: wt-status.c:903 +#: wt-status.c:901 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr " (rätta konflikter och kör sedan \"git rebase --continue\")" -#: wt-status.c:905 +#: wt-status.c:903 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr " (använd \"git rebase --skip\" för att hoppa över patchen)" -#: wt-status.c:907 +#: wt-status.c:905 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr " (använd \"git rebase --abort\" för att checka ut ursprungsgrenen)" -#: wt-status.c:920 +#: wt-status.c:918 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr " (alla konflikter rättade: kör \"git rebase --continue\")" -#: wt-status.c:924 +#: wt-status.c:922 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." @@ -1311,142 +1415,140 @@ msgstr "" "Du håller på att dela upp en incheckning medan du ombaserar grenen \"%s\" " "ovanpå \"%s\"." -#: wt-status.c:929 +#: wt-status.c:927 msgid "You are currently splitting a commit during a rebase." msgstr "Du håller på att dela upp en incheckning i en ombasering." -#: wt-status.c:932 +#: wt-status.c:930 msgid " (Once your working directory is clean, run \"git rebase --continue\")" msgstr " (Så fort din arbetskatalog är ren, kör \"git rebase --continue\")" -#: wt-status.c:936 +#: wt-status.c:934 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "" "Du håller på att redigera en incheckning medan du ombaserar grenen \"%s\" " "ovanpå \"%s\"." -#: wt-status.c:941 +#: wt-status.c:939 msgid "You are currently editing a commit during a rebase." msgstr "Du håller på att redigera en incheckning under en ombasering." -#: wt-status.c:944 +#: wt-status.c:942 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr "" " (använd \"git commit --amend\" för att lägga till på aktuell incheckning)" -#: wt-status.c:946 +#: wt-status.c:944 msgid "" " (use \"git rebase --continue\" once you are satisfied with your changes)" msgstr " (använd \"git rebase --continue\" när du är nöjd med dina ändringar)" -#: wt-status.c:956 +#: wt-status.c:954 msgid "You are currently cherry-picking." msgstr "Du håller på med en \"cherry-pick\"." -#: wt-status.c:963 +#: wt-status.c:961 msgid " (all conflicts fixed: run \"git commit\")" msgstr " (alla konflikter har rättats: kör \"git commit\")" -#: wt-status.c:972 +#: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." msgstr "Du håller på med att ångra incheckningen %s." -#: wt-status.c:977 +#: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" msgstr " (rätta konflikter och kör sedan \"git revert --continue\")" -#: wt-status.c:980 +#: wt-status.c:978 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr " (alla konflikter rättade: kör \"git revert --continue\")" -#: wt-status.c:982 +#: wt-status.c:980 msgid " (use \"git revert --abort\" to cancel the revert operation)" msgstr " (använd \"git revert --abort\" för att avbryta ångrandet)" -#: wt-status.c:993 +#: wt-status.c:991 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "Du håller på med en \"bisect\", startad från grenen \"%s\"." -#: wt-status.c:997 +#: wt-status.c:995 msgid "You are currently bisecting." msgstr "Du håller på med en \"bisect\"." -#: wt-status.c:1000 +#: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr "" " (använd \"git bisect reset\" för att komma tillbaka till ursprungsgrenen)" -#: wt-status.c:1175 +#: wt-status.c:1173 msgid "On branch " msgstr "På grenen " -#: wt-status.c:1186 +#: wt-status.c:1184 msgid "HEAD detached at " msgstr "HEAD frånkopplad vid " -#: wt-status.c:1188 +#: wt-status.c:1186 msgid "HEAD detached from " msgstr "HEAD frånkopplad från " -#: wt-status.c:1191 +#: wt-status.c:1189 msgid "Not currently on any branch." msgstr "Inte på någon gren för närvarande." -#: wt-status.c:1208 +#: wt-status.c:1206 msgid "Initial commit" msgstr "Första incheckning" -#: wt-status.c:1222 +#: wt-status.c:1220 msgid "Untracked files" msgstr "Ospårade filer" -#: wt-status.c:1224 +#: wt-status.c:1222 msgid "Ignored files" msgstr "Ignorerade filer" -#: wt-status.c:1228 +#: wt-status.c:1226 #, c-format -msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" -msgstr "Det tog %.2f sekunder att räkna ospårade filer. \"status -uno\"" - -#: wt-status.c:1232 -msgid "may speed it up, but you have to be careful not to forget to add" -msgstr "kanske gör det snabbare, men du måste vara försiktig så att du" - -#: wt-status.c:1235 -msgid "new files yourself (see 'git help status')." -msgstr "inte glömmer lägga till filer själv (se \"git help status\")" +msgid "" +"It took %.2f seconds to enumerate untracked files. 'status -uno'\n" +"may speed it up, but you have to be careful not to forget to add\n" +"new files yourself (see 'git help status')." +msgstr "" +"Det tog %.2f sekunder att räkna upp ospårade filer. \"status -uno\"\n" +"kan gå snabbare, men du måste vara försiktig så du inte glömmer\n" +"lägga till nya filer själv (se \"git help status\")." # %s är nästa sträng eller tom. -#: wt-status.c:1238 +#: wt-status.c:1232 #, c-format msgid "Untracked files not listed%s" msgstr "Ospårade filer visas ej%s" -#: wt-status.c:1240 +#: wt-status.c:1234 msgid " (use -u option to show untracked files)" msgstr " (använd flaggan -u för att visa ospårade filer)" -#: wt-status.c:1246 +#: wt-status.c:1240 msgid "No changes" msgstr "Inga ändringar" -#: wt-status.c:1251 +#: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" msgstr "" "inga ändringar att checka in (använd \"git add\" och/eller \"git commit -a" "\")\n" -#: wt-status.c:1254 +#: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" msgstr "inga ändringar att checka in\n" -#: wt-status.c:1257 +#: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " @@ -1455,52 +1557,52 @@ msgstr "" "inget köat för incheckning, men ospårade filer finns (spåra med \"git add" "\")\n" -#: wt-status.c:1260 +#: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" msgstr "inget köat för incheckning, men ospårade filer finns\n" -#: wt-status.c:1263 +#: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" msgstr "inget att checka in (skapa/kopiera filer och spåra med \"git add\")\n" -#: wt-status.c:1266 wt-status.c:1271 +#: wt-status.c:1260 wt-status.c:1265 #, c-format msgid "nothing to commit\n" msgstr "inget att checka in\n" -#: wt-status.c:1269 +#: wt-status.c:1263 #, c-format msgid "nothing to commit (use -u to show untracked files)\n" msgstr "inget att checka in (använd -u för att visa ospårade filer)\n" -#: wt-status.c:1273 +#: wt-status.c:1267 #, c-format msgid "nothing to commit, working directory clean\n" msgstr "inget att checka in, arbetskatalogen ren\n" -#: wt-status.c:1381 +#: wt-status.c:1375 msgid "HEAD (no branch)" msgstr "HEAD (ingen gren)" -#: wt-status.c:1387 +#: wt-status.c:1381 msgid "Initial commit on " msgstr "Första incheckning på " -#: wt-status.c:1402 +#: wt-status.c:1396 msgid "behind " msgstr "efter " -#: wt-status.c:1405 wt-status.c:1408 +#: wt-status.c:1399 wt-status.c:1402 msgid "ahead " msgstr "före " -#: wt-status.c:1410 +#: wt-status.c:1404 msgid ", behind " msgstr ", efter " -#: compat/precompose_utf8.c:58 builtin/clone.c:342 +#: compat/precompose_utf8.c:58 builtin/clone.c:352 #, c-format msgid "failed to unlink '%s'" msgstr "misslyckades ta bort länken \"%s\"" @@ -1509,193 +1611,226 @@ msgstr "misslyckades ta bort länken \"%s\"" msgid "git add [options] [--] <pathspec>..." msgstr "git add [flaggor] [--] <sökväg>..." -#: builtin/add.c:63 +#. +#. * To be consistent with "git add -p" and most Git +#. * commands, we should default to being tree-wide, but +#. * this is not the original behavior and can't be +#. * changed until users trained themselves not to type +#. * "git add -u" or "git add -A". For now, we warn and +#. * keep the old behavior. Later, the behavior can be changed +#. * to tree-wide, keeping the warning for a while, and +#. * eventually we can drop the warning. +#. +#: builtin/add.c:58 +#, c-format +msgid "" +"The behavior of 'git add %s (or %s)' with no path argument from a\n" +"subdirectory of the tree will change in Git 2.0 and should not be used " +"anymore.\n" +"To add content for the whole tree, run:\n" +"\n" +" git add %s :/\n" +" (or git add %s :/)\n" +"\n" +"To restrict the command to the current directory, run:\n" +"\n" +" git add %s .\n" +" (or git add %s .)\n" +"\n" +"With the current Git version, the command is restricted to the current " +"directory.\n" +msgstr "" +"Beteendet för \"git add %s (eller %s)\" utan sökvägsargument från en\n" +"underkatalog i ett träd kommer ändras i Git 2.0 och bör inte längre " +"användas.\n" +"För att lägga till innehållet för hela trädet, använd:\n" +"\n" +" git add %s :/\n" +" (eller git add %s :/)\n" +"\n" +"För att begränsa kommandot till aktuell katalog, använd:\n" +"\n" +" git add %s .\n" +" (eller git add %s .)\n" +"\n" +"I nuvarande version av Git begränsas kommandot till aktuell katalog.\n" + +#: builtin/add.c:100 +#, c-format +msgid "" +"You ran 'git add' with neither '-A (--all)' or '--ignore-removal',\n" +"whose behaviour will change in Git 2.0 with respect to paths you removed.\n" +"Paths like '%s' that are\n" +"removed from your working tree are ignored with this version of Git.\n" +"\n" +"* 'git add --ignore-removal <pathspec>', which is the current default,\n" +" ignores paths you removed from your working tree.\n" +"\n" +"* 'git add --all <pathspec>' will let you also record the removals.\n" +"\n" +"Run 'git status' to check the paths you removed from your working tree.\n" +msgstr "" +"Du körde \"git add\" utan varken \"-A (--all)\" eller \"--ignore-removal\".\n" +"Beteendet kommer ändras i Git 2.0 vad gäller sökvägar du tagit bort.\n" +"Sökvägar som \"%s\", som har\n" +"tagits bort från din arbetskatalog ignoreras i den här versionen av Git.\n" +"\n" +"* \"git add --ignore-removal <sökväg>\", som är förvalet just nu,\n" +" ignorerar sökvägar du har tagit bort från arbetskatalogen.\n" +"\n" +"* \"git add --all <sökväg>\" låter dig även registrera borttagningarna.\n" +"\n" +"Kör \"git status\" för att kontrollera sökvägarna du tagit bort från\n" +"arbetskatalogen.\n" + +#: builtin/add.c:144 #, c-format msgid "unexpected diff status %c" msgstr "diff-status %c förväntades inte" -#: builtin/add.c:68 builtin/commit.c:233 +#: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" msgstr "misslyckades uppdatera filer" -#: builtin/add.c:78 +#: builtin/add.c:163 #, c-format msgid "remove '%s'\n" msgstr "ta bort \"%s\"\n" -#: builtin/add.c:148 +#: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" msgstr "Ospårade ändringar efter att ha uppdaterat indexet:" -#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275 +#: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format msgid "pathspec '%s' did not match any files" msgstr "sökvägsangivelsen \"%s\" motsvarade inte några filer" -#: builtin/add.c:234 +#: builtin/add.c:339 msgid "Could not read the index" msgstr "Kunde inte läsa indexet" -#: builtin/add.c:244 +#: builtin/add.c:349 #, c-format msgid "Could not open '%s' for writing." msgstr "Kunde inte öppna \"%s\" för skrivning" -#: builtin/add.c:248 +#: builtin/add.c:353 msgid "Could not write patch" msgstr "Kunde inte skriva patch" -#: builtin/add.c:253 +#: builtin/add.c:358 #, c-format msgid "Could not stat '%s'" msgstr "Kunde inte ta status på \"%s\"" -#: builtin/add.c:255 +#: builtin/add.c:360 msgid "Empty patch. Aborted." msgstr "Tom patch. Avbryter." -#: builtin/add.c:261 +#: builtin/add.c:366 #, c-format msgid "Could not apply '%s'" msgstr "Kunde inte tillämpa \"%s\"" -#: builtin/add.c:271 +#: builtin/add.c:376 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "Följande sökvägar ignoreras av en av dina .gitignore-filer:\n" -#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 +#: builtin/add.c:393 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 #: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253 #: builtin/rm.c:206 msgid "dry run" msgstr "testkörning" -#: builtin/add.c:278 builtin/apply.c:4409 builtin/check-ignore.c:19 +#: builtin/add.c:394 builtin/apply.c:4409 builtin/check-ignore.c:19 #: builtin/commit.c:1152 builtin/count-objects.c:95 builtin/fsck.c:613 -#: builtin/log.c:1514 builtin/mv.c:62 builtin/read-tree.c:112 +#: builtin/log.c:1518 builtin/mv.c:62 builtin/read-tree.c:112 msgid "be verbose" msgstr "var pratsam" -#: builtin/add.c:280 +#: builtin/add.c:396 msgid "interactive picking" msgstr "plocka interaktivt" -#: builtin/add.c:281 builtin/checkout.c:1060 builtin/reset.c:258 +#: builtin/add.c:397 builtin/checkout.c:1063 builtin/reset.c:258 msgid "select hunks interactively" msgstr "välj stycken interaktivt" -#: builtin/add.c:282 +#: builtin/add.c:398 msgid "edit current diff and apply" msgstr "redigera aktuell diff och applicera" -#: builtin/add.c:283 +#: builtin/add.c:399 msgid "allow adding otherwise ignored files" msgstr "tillåt lägga till annars ignorerade filer" -#: builtin/add.c:284 +#: builtin/add.c:400 msgid "update tracked files" msgstr "uppdatera spårade filer" -#: builtin/add.c:285 +#: builtin/add.c:401 msgid "record only the fact that the path will be added later" msgstr "registrera endast att sökvägen kommer läggas till senare" -#: builtin/add.c:286 +#: builtin/add.c:402 msgid "add changes from all tracked and untracked files" msgstr "lägg till ändringar från alla spårade och ospårade filer" -#: builtin/add.c:287 +#. takes no arguments +#: builtin/add.c:405 +msgid "ignore paths removed in the working tree (same as --no-all)" +msgstr "ignorera sökvägar borttagna i arbetskatalogen (samma som --no-all)" + +#: builtin/add.c:407 msgid "don't add, only refresh the index" msgstr "lägg inte till, uppdatera endast indexet" -#: builtin/add.c:288 +#: builtin/add.c:408 msgid "just skip files which cannot be added because of errors" msgstr "hoppa bara över filer som inte kan läggas till på grund av fel" -#: builtin/add.c:289 +#: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" msgstr "se om - även saknade - filer ignoreras i testkörning" -#: builtin/add.c:311 +#: builtin/add.c:431 #, c-format msgid "Use -f if you really want to add them.\n" msgstr "Använd -f om du verkligen vill lägga till dem.\n" -#: builtin/add.c:312 +#: builtin/add.c:432 msgid "no files added" msgstr "inga filer har lagts till" -#: builtin/add.c:318 +#: builtin/add.c:438 msgid "adding files failed" msgstr "misslyckades lägga till filer" -#. -#. * To be consistent with "git add -p" and most Git -#. * commands, we should default to being tree-wide, but -#. * this is not the original behavior and can't be -#. * changed until users trained themselves not to type -#. * "git add -u" or "git add -A". For now, we warn and -#. * keep the old behavior. Later, the behavior can be changed -#. * to tree-wide, keeping the warning for a while, and -#. * eventually we can drop the warning. -#. -#: builtin/add.c:335 -#, c-format -msgid "" -"The behavior of 'git add %s (or %s)' with no path argument from a\n" -"subdirectory of the tree will change in Git 2.0 and should not be used " -"anymore.\n" -"To add content for the whole tree, run:\n" -"\n" -" git add %s :/\n" -" (or git add %s :/)\n" -"\n" -"To restrict the command to the current directory, run:\n" -"\n" -" git add %s .\n" -" (or git add %s .)\n" -"\n" -"With the current Git version, the command is restricted to the current " -"directory." -msgstr "" -"Beteendet för \"git add %s (eller %s)\" utan sökvägsargument från en\n" -"underkatalog i ett träd kommer ändras i Git 2.0 och bör inte längre " -"användas.\n" -"För att lägga till innehållet för hela trädet, använd:\n" -"\n" -" git add %s :/\n" -" (eller git add %s :/)\n" -"\n" -"För att begränsa kommandot till aktuell katalog, använd:\n" -"\n" -" git add %s .\n" -" (eller git add %s .)\n" -"\n" -"I nuvarande version av Git begränsas kommandot till aktuell katalog." - -#: builtin/add.c:381 +#: builtin/add.c:477 msgid "-A and -u are mutually incompatible" msgstr "-A och -u är ömsesidigt inkompatibla" -#: builtin/add.c:383 +#: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "Flaggan --ignore-missing kan endast användas tillsammans med --dry-run" -#: builtin/add.c:414 +#: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" msgstr "Inget angivet, inget tillagt.\n" -#: builtin/add.c:415 +#: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "Kanske menade du att skriva \"git add .\"?\n" -#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204 +#: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 msgid "index file corrupt" msgstr "indexfilen trasig" -#: builtin/add.c:481 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 +#: builtin/add.c:604 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 msgid "Unable to write new index file" msgstr "Kunde inte skriva ny indexfil" @@ -1948,7 +2083,7 @@ msgstr "%s: patchen kan inte tillämpas" msgid "Checking patch %s..." msgstr "Kontrollerar patchen %s..." -#: builtin/apply.c:3679 builtin/checkout.c:215 builtin/reset.c:124 +#: builtin/apply.c:3679 builtin/checkout.c:216 builtin/reset.c:124 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "make_cache_entry misslyckades för sökvägen \"%s\"" @@ -2089,7 +2224,7 @@ msgstr "försök en trevägssammanslagning om patchen inte kan tillämpas" msgid "build a temporary index based on embedded index information" msgstr "bygg ett temporärt index baserat på inbyggd indexinformation" -#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:463 +#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" msgstr "sökvägar avdelas med NUL-tecken" @@ -2223,99 +2358,99 @@ msgstr "uppdatera BISECT_HEAD istället för att checka ut aktuell incheckning" msgid "git blame [options] [rev-opts] [rev] [--] file" msgstr "git blame [flaggor] [rev-flaggor] [rev] [--] fil" -#: builtin/blame.c:30 builtin/shortlog.c:15 +#: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" msgstr "[rev-flaggor] dokumenteras i git-rev-list(1)" -#: builtin/blame.c:2350 +#: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" msgstr "Visa klandringsposter när vi hittar dem, interaktivt" -#: builtin/blame.c:2351 +#: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "Visa blank SHA-1 för gränsincheckningar (Standard: av)" -#: builtin/blame.c:2352 +#: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "Behandla inte rotincheckningar som gränser (Standard: av)" -#: builtin/blame.c:2353 +#: builtin/blame.c:2358 msgid "Show work cost statistics" msgstr "Visa statistik över arbetskostnad" -#: builtin/blame.c:2354 +#: builtin/blame.c:2359 msgid "Show output score for blame entries" msgstr "Visa utdatapoäng för klandringsposter" -#: builtin/blame.c:2355 +#: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" msgstr "Visa originalfilnamn (Standard: auto)" -#: builtin/blame.c:2356 +#: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" msgstr "Visa ursprungligt radnummer (Standard: av)" -#: builtin/blame.c:2357 +#: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" msgstr "Visa i ett format avsett för maskinkonsumtion" -#: builtin/blame.c:2358 +#: builtin/blame.c:2363 msgid "Show porcelain format with per-line commit information" msgstr "Visa porslinsformat med per-rad-incheckningsinformation" -#: builtin/blame.c:2359 +#: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "Använd samma utdataläge som git-annotate (Standard: av)" -#: builtin/blame.c:2360 +#: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" msgstr "Visa rå tidsstämpel (Standard: av)" -#: builtin/blame.c:2361 +#: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" msgstr "Visa lång inchecknings-SHA1 (Standard: av)" -#: builtin/blame.c:2362 +#: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" msgstr "Undertryck författarnamn och tidsstämpel (Standard: av)" -#: builtin/blame.c:2363 +#: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" msgstr "Visa författarens e-post istället för namn (Standard: av)" -#: builtin/blame.c:2364 +#: builtin/blame.c:2369 msgid "Ignore whitespace differences" msgstr "Ignorera ändringar i blanksteg" -#: builtin/blame.c:2365 +#: builtin/blame.c:2370 msgid "Spend extra cycles to find better match" msgstr "Slösa extra cykler med att hitta bättre träff" -#: builtin/blame.c:2366 +#: builtin/blame.c:2371 msgid "Use revisions from <file> instead of calling git-rev-list" msgstr "Använd revisioner från <fil> istället för att anropa git-rev-list" -#: builtin/blame.c:2367 +#: builtin/blame.c:2372 msgid "Use <file>'s contents as the final image" msgstr "Använd <fil>s innehåll som slutgiltig bild" -#: builtin/blame.c:2368 builtin/blame.c:2369 +#: builtin/blame.c:2373 builtin/blame.c:2374 msgid "score" msgstr "poäng" -#: builtin/blame.c:2368 +#: builtin/blame.c:2373 msgid "Find line copies within and across files" msgstr "Hitta kopierade rader inuti och mellan filer" -#: builtin/blame.c:2369 +#: builtin/blame.c:2374 msgid "Find line movements within and across files" msgstr "Hitta flyttade rader inuti och mellan filer" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "n,m" msgstr "n,m" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "Process only line range n,m, counting from 1" msgstr "Behandla endast radintervallet n,m, med början på 1" @@ -2335,7 +2470,7 @@ msgstr "git branch [flaggor] [-r] (-d | -D) <grennamn>..." msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" msgstr "git branch [flaggor] (-m | -M) [<gammal_gren>] <ny_gren>" -#: builtin/branch.c:146 +#: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" @@ -2344,7 +2479,7 @@ msgstr "" "tar bort grenen \"%s\" som har slagits ihop med\n" " \"%s\", men ännu inte slagits ihop med HEAD." -#: builtin/branch.c:150 +#: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" @@ -2353,12 +2488,12 @@ msgstr "" "tar inte bort grenen \"%s\" som inte har slagits ihop med\n" " \"%s\", trots att den har slagits ihop med HEAD." -#: builtin/branch.c:164 +#: builtin/branch.c:168 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "Kunde inte slå upp incheckningsobjekt för \"%s\"" -#: builtin/branch.c:168 +#: builtin/branch.c:172 #, c-format msgid "" "The branch '%s' is not fully merged.\n" @@ -2367,332 +2502,332 @@ msgstr "" "Grenen \"%s\" har inte slagits samman i sin helhet.\n" "Om du är säker på att du vill ta bort den, kör \"git branch -D %s\"." -#: builtin/branch.c:181 +#: builtin/branch.c:185 msgid "Update of config-file failed" msgstr "Misslyckades uppdatera konfigurationsfil" -#: builtin/branch.c:209 +#: builtin/branch.c:213 msgid "cannot use -a with -d" msgstr "kan inte ange -a med -d" -#: builtin/branch.c:215 +#: builtin/branch.c:219 msgid "Couldn't look up commit object for HEAD" msgstr "Kunde inte slå upp incheckningsobjekt för HEAD" -#: builtin/branch.c:223 +#: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "Kan inte ta bort grenen \"%s\" som du befinner dig på för närvarande." -#: builtin/branch.c:236 +#: builtin/branch.c:240 #, c-format msgid "remote branch '%s' not found." msgstr "fjärrgrenen \"%s\" hittades inte." -#: builtin/branch.c:237 +#: builtin/branch.c:241 #, c-format msgid "branch '%s' not found." msgstr "grenen \"%s\" hittades inte." -#: builtin/branch.c:251 +#: builtin/branch.c:255 #, c-format msgid "Error deleting remote branch '%s'" msgstr "Fel vid borttagning av fjärrgrenen \"%s\"" -#: builtin/branch.c:252 +#: builtin/branch.c:256 #, c-format msgid "Error deleting branch '%s'" msgstr "Fel vid borttagning av grenen \"%s\"" -#: builtin/branch.c:259 +#: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" msgstr "Tog bort fjärrgrenen %s (var %s).\n" -#: builtin/branch.c:260 +#: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "Tog bort grenen %s (var %s).\n" -#: builtin/branch.c:362 +#: builtin/branch.c:366 #, c-format msgid "branch '%s' does not point at a commit" msgstr "grenen \"%s\" pekar inte på en incheckning" -#: builtin/branch.c:434 +#: builtin/branch.c:453 #, c-format msgid "[%s: behind %d]" msgstr "[%s: bakom %d] " -#: builtin/branch.c:436 +#: builtin/branch.c:455 #, c-format msgid "[behind %d]" msgstr "[bakom %d] " -#: builtin/branch.c:440 +#: builtin/branch.c:459 #, c-format msgid "[%s: ahead %d]" msgstr "[%s: före %d] " -#: builtin/branch.c:442 +#: builtin/branch.c:461 #, c-format msgid "[ahead %d]" msgstr "[före %d] " -#: builtin/branch.c:445 +#: builtin/branch.c:464 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "[%s: före %d, bakom %d] " -#: builtin/branch.c:448 +#: builtin/branch.c:467 #, c-format msgid "[ahead %d, behind %d]" msgstr "[före %d, bakom %d] " -#: builtin/branch.c:470 +#: builtin/branch.c:490 msgid " **** invalid ref ****" msgstr " **** ogiltig ref ****" -#: builtin/branch.c:562 +#: builtin/branch.c:582 #, c-format msgid "(no branch, rebasing %s)" msgstr "(ingen gren, ombaserar %s)" -#: builtin/branch.c:565 +#: builtin/branch.c:585 #, c-format msgid "(no branch, bisect started on %s)" msgstr "(ingen gren, \"bisect\" startad på %s)" -#: builtin/branch.c:568 +#: builtin/branch.c:588 #, c-format msgid "(detached from %s)" msgstr "(frånkopplad från %s)" -#: builtin/branch.c:571 +#: builtin/branch.c:591 msgid "(no branch)" msgstr "(ingen gren)" -#: builtin/branch.c:617 +#: builtin/branch.c:637 #, c-format msgid "object '%s' does not point to a commit" msgstr "objektet \"%s\" pekar på en incheckning" -#: builtin/branch.c:649 +#: builtin/branch.c:669 msgid "some refs could not be read" msgstr "vissa referenser kunde inte läsas" -#: builtin/branch.c:662 +#: builtin/branch.c:682 msgid "cannot rename the current branch while not on any." msgstr "" "kunde inte byta namn på aktuell gren när du inte befinner dig på någon." -#: builtin/branch.c:672 +#: builtin/branch.c:692 #, c-format msgid "Invalid branch name: '%s'" msgstr "Felaktigt namn på gren: \"%s\"" -#: builtin/branch.c:687 +#: builtin/branch.c:707 msgid "Branch rename failed" msgstr "Misslyckades byta namn på gren" -#: builtin/branch.c:691 +#: builtin/branch.c:711 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "Bytte bort namn på en felaktigt namngiven gren \"%s\"" -#: builtin/branch.c:695 +#: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "Grenen namnbytt till %s, men HEAD har inte uppdaterats!" -#: builtin/branch.c:702 +#: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" msgstr "Grenen namnbytt, men misslyckades uppdatera konfigurationsfilen" -#: builtin/branch.c:717 +#: builtin/branch.c:737 #, c-format msgid "malformed object name %s" msgstr "felformat objektnamn %s" -#: builtin/branch.c:741 +#: builtin/branch.c:761 #, c-format msgid "could not write branch description template: %s" msgstr "kunde inte skriva grenbeskrivningsmall: %s" -#: builtin/branch.c:771 +#: builtin/branch.c:791 msgid "Generic options" msgstr "Allmänna flaggor" -#: builtin/branch.c:773 +#: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" msgstr "visa hash och ärenderad, ange två gånger för uppströmsgren" -#: builtin/branch.c:774 +#: builtin/branch.c:794 msgid "suppress informational messages" msgstr "undertryck informationsmeddelanden" -#: builtin/branch.c:775 +#: builtin/branch.c:795 msgid "set up tracking mode (see git-pull(1))" msgstr "ställ in spårningsläge (se git-pull(1))" -#: builtin/branch.c:777 +#: builtin/branch.c:797 msgid "change upstream info" msgstr "ändra uppströmsinformation" -#: builtin/branch.c:781 +#: builtin/branch.c:801 msgid "use colored output" msgstr "använd färgad utdata" -#: builtin/branch.c:782 +#: builtin/branch.c:802 msgid "act on remote-tracking branches" msgstr "arbeta på fjärrspårande grenar" -#: builtin/branch.c:785 builtin/branch.c:791 builtin/branch.c:812 -#: builtin/branch.c:818 builtin/commit.c:1368 builtin/commit.c:1369 +#: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 +#: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 #: builtin/commit.c:1370 builtin/commit.c:1371 builtin/tag.c:468 msgid "commit" msgstr "incheckning" -#: builtin/branch.c:786 builtin/branch.c:792 +#: builtin/branch.c:806 builtin/branch.c:812 msgid "print only branches that contain the commit" msgstr "visa endast grenar som innehåller incheckningen" -#: builtin/branch.c:798 +#: builtin/branch.c:818 msgid "Specific git-branch actions:" msgstr "Specifika git-branch-åtgärder:" -#: builtin/branch.c:799 +#: builtin/branch.c:819 msgid "list both remote-tracking and local branches" msgstr "visa både fjärrspårande och lokala grenar" -#: builtin/branch.c:801 +#: builtin/branch.c:821 msgid "delete fully merged branch" msgstr "ta bort helt sammanslagen gren" -#: builtin/branch.c:802 +#: builtin/branch.c:822 msgid "delete branch (even if not merged)" msgstr "ta bort gren (även om inte helt sammanslagen)" -#: builtin/branch.c:803 +#: builtin/branch.c:823 msgid "move/rename a branch and its reflog" msgstr "flytta/ta bort en gren och dess reflogg" -#: builtin/branch.c:804 +#: builtin/branch.c:824 msgid "move/rename a branch, even if target exists" msgstr "flytta/ta bort en gren, även om målet finns" -#: builtin/branch.c:805 +#: builtin/branch.c:825 msgid "list branch names" msgstr "lista namn på grenar" -#: builtin/branch.c:806 +#: builtin/branch.c:826 msgid "create the branch's reflog" msgstr "skapa grenens reflogg" -#: builtin/branch.c:808 +#: builtin/branch.c:828 msgid "edit the description for the branch" msgstr "redigera beskrivning för grenen" -#: builtin/branch.c:809 +#: builtin/branch.c:829 msgid "force creation (when already exists)" msgstr "tvinga skapande (när den redan finns)" -#: builtin/branch.c:812 +#: builtin/branch.c:832 msgid "print only not merged branches" msgstr "visa endast ej sammanslagna grenar" -#: builtin/branch.c:818 +#: builtin/branch.c:838 msgid "print only merged branches" msgstr "visa endast sammanslagna grenar" -#: builtin/branch.c:822 +#: builtin/branch.c:842 msgid "list branches in columns" msgstr "visa grenar i spalter" -#: builtin/branch.c:835 +#: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." msgstr "Misslyckades slå upp HEAD som giltig referens" -#: builtin/branch.c:840 builtin/clone.c:609 +#: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" msgstr "HEAD hittades inte under refs/heads!" -#: builtin/branch.c:863 +#: builtin/branch.c:883 msgid "--column and --verbose are incompatible" msgstr "--column och --verbose är inkompatibla" -#: builtin/branch.c:869 builtin/branch.c:908 +#: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" msgstr "grennamn krävs" -#: builtin/branch.c:884 +#: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" msgstr "Kan inte beskriva frånkopplad HEAD" -#: builtin/branch.c:889 +#: builtin/branch.c:909 msgid "cannot edit description of more than one branch" msgstr "kan inte redigera beskrivning för mer än en gren" -#: builtin/branch.c:896 +#: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." msgstr "Inga incheckningar på grenen \"%s\" ännu" -#: builtin/branch.c:899 +#: builtin/branch.c:919 #, c-format msgid "No branch named '%s'." msgstr "Ingen gren vid namnet \"%s\"." -#: builtin/branch.c:914 +#: builtin/branch.c:934 msgid "too many branches for a rename operation" msgstr "för många grenar för namnbyte" -#: builtin/branch.c:919 +#: builtin/branch.c:939 msgid "too many branches to set new upstream" msgstr "för många grenar för att byta uppström" -#: builtin/branch.c:923 +#: builtin/branch.c:943 #, c-format msgid "" "could not set upstream of HEAD to %s when it does not point to any branch." msgstr "" "kunde inte sätta uppström för HEAD till %s när det inte pekar mot någon gren." -#: builtin/branch.c:926 builtin/branch.c:948 builtin/branch.c:970 +#: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" msgstr "okänd gren \"%s\"" -#: builtin/branch.c:930 +#: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" msgstr "grenen \"%s\" finns inte" -#: builtin/branch.c:942 +#: builtin/branch.c:962 msgid "too many branches to unset upstream" msgstr "för många grenar för att ta bort uppström" -#: builtin/branch.c:946 +#: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." msgstr "" "kunde inte ta bort uppström för HEAD när det inte pekar mot någon gren." -#: builtin/branch.c:952 +#: builtin/branch.c:972 #, c-format msgid "Branch '%s' has no upstream information" msgstr "Grenen \"%s\" har ingen uppströmsinformation" -#: builtin/branch.c:967 +#: builtin/branch.c:987 msgid "it does not make sense to create 'HEAD' manually" msgstr "kan inte skapa \"HEAD\" manuellt" -#: builtin/branch.c:973 +#: builtin/branch.c:993 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "" "flaggorna -a och -r på \"git branch\" kan inte anges tillsammans med ett " "grennamn" -#: builtin/branch.c:976 +#: builtin/branch.c:996 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" @@ -2701,7 +2836,7 @@ msgstr "" "Flaggan --set-upstream rekommenderas ej och kommer tas bort. Använd --track " "eller --set-upstream-to\n" -#: builtin/branch.c:993 +#: builtin/branch.c:1013 #, c-format msgid "" "\n" @@ -2712,12 +2847,12 @@ msgstr "" "Om du vill göra så att \"%s\" spårar \"%s\" gör du så här:\n" "\n" -#: builtin/branch.c:994 +#: builtin/branch.c:1014 #, c-format msgid " git branch -d %s\n" msgstr " git branch -d %s\n" -#: builtin/branch.c:995 +#: builtin/branch.c:1015 #, c-format msgid " git branch --set-upstream-to %s\n" msgstr " git branch --set-upstream-to %s\n" @@ -2735,43 +2870,43 @@ msgstr "Behöver ett arkiv för att skapa ett paket (bundle)." msgid "Need a repository to unbundle." msgstr "Behöver ett arkiv för att packa upp ett paket (bundle)." -#: builtin/cat-file.c:247 +#: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" msgstr "git cat-file (-t|-s|-e|-p|<typ>|--textconv) <objekt>" -#: builtin/cat-file.c:248 +#: builtin/cat-file.c:177 msgid "git cat-file (--batch|--batch-check) < <list_of_objects>" msgstr "git cat-file (--batch|--batch-check) < <objektlista>" -#: builtin/cat-file.c:266 +#: builtin/cat-file.c:195 msgid "<type> can be one of: blob, tree, commit, tag" msgstr "<typ> kan vara en av: blob, tree, commit, tag" -#: builtin/cat-file.c:267 +#: builtin/cat-file.c:196 msgid "show object type" msgstr "visa objekttyp" -#: builtin/cat-file.c:268 +#: builtin/cat-file.c:197 msgid "show object size" msgstr "visa objektstorlek" -#: builtin/cat-file.c:270 +#: builtin/cat-file.c:199 msgid "exit with zero when there's no error" msgstr "avsluta med noll när det inte uppstått något fel" -#: builtin/cat-file.c:271 +#: builtin/cat-file.c:200 msgid "pretty-print object's content" msgstr "visa objektets innehåll snyggt" -#: builtin/cat-file.c:273 +#: builtin/cat-file.c:202 msgid "for blob objects, run textconv on object's content" msgstr "för blob-objekt, kör textconv på objektets innehåll" -#: builtin/cat-file.c:275 +#: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" msgstr "visa information och innehåll för objekt som listas på standard in" -#: builtin/cat-file.c:278 +#: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" msgstr "visa information för objekt som listas på standard in" @@ -2799,27 +2934,27 @@ msgstr "läs filnamn från standard in" msgid "input paths are terminated by a null character" msgstr "sökvägar avdelas med null-tecken" -#: builtin/check-ignore.c:18 builtin/checkout.c:1041 builtin/gc.c:177 +#: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" msgstr "undertryck förloppsrapportering" -#: builtin/check-ignore.c:151 +#: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" msgstr "kan inte ange sökvägsnamn med --stdin" -#: builtin/check-ignore.c:154 +#: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" msgstr "-z kan endast användas tillsammans med --stdin" -#: builtin/check-ignore.c:156 +#: builtin/check-ignore.c:151 msgid "no path specified" msgstr "ingen sökväg angavs" -#: builtin/check-ignore.c:160 +#: builtin/check-ignore.c:155 msgid "--quiet is only valid with a single pathname" msgstr "--quiet kan endast användas med ett enkelt sökvägsnamn" -#: builtin/check-ignore.c:162 +#: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" msgstr "kan inte använda både --quiet och --verbose" @@ -2875,106 +3010,106 @@ msgstr "git checkout [flaggor] <gren>" msgid "git checkout [options] [<branch>] -- <file>..." msgstr "git checkout [flaggor] [<gren>] -- <fil>..." -#: builtin/checkout.c:116 builtin/checkout.c:149 +#: builtin/checkout.c:117 builtin/checkout.c:150 #, c-format msgid "path '%s' does not have our version" msgstr "sökvägen \"%s\" har inte vår version" -#: builtin/checkout.c:118 builtin/checkout.c:151 +#: builtin/checkout.c:119 builtin/checkout.c:152 #, c-format msgid "path '%s' does not have their version" msgstr "sökvägen \"%s\" har inte deras version" -#: builtin/checkout.c:134 +#: builtin/checkout.c:135 #, c-format msgid "path '%s' does not have all necessary versions" msgstr "sökvägen \"%s\" innehåller inte alla nödvändiga versioner" -#: builtin/checkout.c:178 +#: builtin/checkout.c:179 #, c-format msgid "path '%s' does not have necessary versions" msgstr "sökvägen \"%s\" innehåller inte nödvändiga versioner" -#: builtin/checkout.c:195 +#: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" msgstr "sökväg \"%s\": kan inte slå ihop" -#: builtin/checkout.c:212 +#: builtin/checkout.c:213 #, c-format msgid "Unable to add merge result for '%s'" msgstr "Kunde inte lägga till sammanslagningsresultat för \"%s\"" -#: builtin/checkout.c:236 builtin/checkout.c:239 builtin/checkout.c:242 -#: builtin/checkout.c:245 +#: builtin/checkout.c:237 builtin/checkout.c:240 builtin/checkout.c:243 +#: builtin/checkout.c:246 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "\"%s\" kan inte användas vid uppdatering av sökvägar" -#: builtin/checkout.c:248 builtin/checkout.c:251 +#: builtin/checkout.c:249 builtin/checkout.c:252 #, c-format msgid "'%s' cannot be used with %s" msgstr "\"%s\" kan inte användas med %s" -#: builtin/checkout.c:254 +#: builtin/checkout.c:255 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "Kan inte uppdatera sökvägar och växla till grenen \"%s\" samtidigt." -#: builtin/checkout.c:265 builtin/checkout.c:455 +#: builtin/checkout.c:266 builtin/checkout.c:458 msgid "corrupt index file" msgstr "indexfilen är trasig" -#: builtin/checkout.c:326 builtin/checkout.c:333 +#: builtin/checkout.c:329 builtin/checkout.c:336 #, c-format msgid "path '%s' is unmerged" msgstr "sökvägen \"%s\" har inte slagits ihop" -#: builtin/checkout.c:477 +#: builtin/checkout.c:480 msgid "you need to resolve your current index first" msgstr "du måste lösa ditt befintliga index först" -#: builtin/checkout.c:598 +#: builtin/checkout.c:601 #, c-format msgid "Can not do reflog for '%s'\n" msgstr "Kan inte skapa referenslog för \"%s\"\n" -#: builtin/checkout.c:631 +#: builtin/checkout.c:634 msgid "HEAD is now at" msgstr "HEAD är nu på" -#: builtin/checkout.c:638 +#: builtin/checkout.c:641 #, c-format msgid "Reset branch '%s'\n" msgstr "Återställ gren \"%s\"\n" -#: builtin/checkout.c:641 +#: builtin/checkout.c:644 #, c-format msgid "Already on '%s'\n" msgstr "Redan på \"%s\"\n" -#: builtin/checkout.c:645 +#: builtin/checkout.c:648 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "Växlade till och nollställde grenen \"%s\"\n" -#: builtin/checkout.c:647 builtin/checkout.c:984 +#: builtin/checkout.c:650 builtin/checkout.c:987 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "Växlade till en ny gren \"%s\"\n" -#: builtin/checkout.c:649 +#: builtin/checkout.c:652 #, c-format msgid "Switched to branch '%s'\n" msgstr "Växlade till grenen \"%s\"\n" -#: builtin/checkout.c:705 +#: builtin/checkout.c:708 #, c-format msgid " ... and %d more.\n" msgstr " ... och %d till.\n" #. The singular version -#: builtin/checkout.c:711 +#: builtin/checkout.c:714 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -2997,7 +3132,7 @@ msgstr[1] "" "\n" "%s\n" -#: builtin/checkout.c:729 +#: builtin/checkout.c:732 #, c-format msgid "" "If you want to keep them by creating a new branch, this may be a good time\n" @@ -3012,132 +3147,136 @@ msgstr "" " git branch nytt_grennamn %s\n" "\n" -#: builtin/checkout.c:759 +#: builtin/checkout.c:762 msgid "internal error in revision walk" msgstr "internt fel vid genomgång av revisioner (revision walk)" -#: builtin/checkout.c:763 +#: builtin/checkout.c:766 msgid "Previous HEAD position was" msgstr "Tidigare position för HEAD var" -#: builtin/checkout.c:790 builtin/checkout.c:979 +#: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" msgstr "Du är på en gren som ännu inte är född" #. case (1) -#: builtin/checkout.c:915 +#: builtin/checkout.c:918 #, c-format msgid "invalid reference: %s" msgstr "felaktig referens: %s" #. case (1): want a tree -#: builtin/checkout.c:954 +#: builtin/checkout.c:957 #, c-format msgid "reference is not a tree: %s" msgstr "referensen är inte ett träd: %s" -#: builtin/checkout.c:993 +#: builtin/checkout.c:996 msgid "paths cannot be used with switching branches" msgstr "sökvägar kan inte användas vid byte av gren" -#: builtin/checkout.c:996 builtin/checkout.c:1000 +#: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "\"%s\" kan inte användas vid byte av gren" -#: builtin/checkout.c:1004 builtin/checkout.c:1007 builtin/checkout.c:1012 -#: builtin/checkout.c:1015 +#: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 +#: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "\"%s\" kan inte användas med \"%s\"" -#: builtin/checkout.c:1020 +#: builtin/checkout.c:1023 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "Kan inte växla gren till icke-incheckningen \"%s\"" -#: builtin/checkout.c:1042 builtin/checkout.c:1044 builtin/clone.c:90 +#: builtin/checkout.c:1045 builtin/checkout.c:1047 builtin/clone.c:90 #: builtin/remote.c:169 builtin/remote.c:171 msgid "branch" msgstr "gren" -#: builtin/checkout.c:1043 +#: builtin/checkout.c:1046 msgid "create and checkout a new branch" msgstr "skapa och checka ut en ny gren" -#: builtin/checkout.c:1045 +#: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" msgstr "skapa/nollställ och checka ut en gren" -#: builtin/checkout.c:1046 +#: builtin/checkout.c:1049 msgid "create reflog for new branch" msgstr "skapa reflogg för ny gren" -#: builtin/checkout.c:1047 +#: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" msgstr "koppla från HEAD vid namngiven incheckning" -#: builtin/checkout.c:1048 +#: builtin/checkout.c:1051 msgid "set upstream info for new branch" msgstr "sätt uppströmsinformation för ny gren" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new branch" msgstr "ny gren" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new unparented branch" msgstr "ny gren utan förälder" -#: builtin/checkout.c:1051 +#: builtin/checkout.c:1054 msgid "checkout our version for unmerged files" msgstr "checka ut vår version för ej sammanslagna filer" -#: builtin/checkout.c:1053 +#: builtin/checkout.c:1056 msgid "checkout their version for unmerged files" msgstr "checka ut deras version för ej sammanslagna filer" -#: builtin/checkout.c:1055 +#: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" msgstr "tvinga utcheckning (kasta bort lokala ändringar)" -#: builtin/checkout.c:1056 +#: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" msgstr "utför en 3-vägssammanslagning för den nya grenen" -#: builtin/checkout.c:1057 builtin/merge.c:217 +#: builtin/checkout.c:1060 builtin/merge.c:217 msgid "update ignored files (default)" msgstr "uppdatera ignorerade filer (standard)" -#: builtin/checkout.c:1058 builtin/log.c:1149 parse-options.h:245 +#: builtin/checkout.c:1061 builtin/log.c:1158 parse-options.h:245 msgid "style" msgstr "stil" -#: builtin/checkout.c:1059 +#: builtin/checkout.c:1062 msgid "conflict style (merge or diff3)" msgstr "konfliktstil (merge eller diff3)" -#: builtin/checkout.c:1062 +#: builtin/checkout.c:1065 +msgid "do not limit pathspecs to sparse entries only" +msgstr "begränsa inte sökvägar till endast glesa poster" + +#: builtin/checkout.c:1067 msgid "second guess 'git checkout no-such-branch'" msgstr "förutspå \"git checkout gren-saknas\"" -#: builtin/checkout.c:1086 +#: builtin/checkout.c:1091 msgid "-b, -B and --orphan are mutually exclusive" msgstr "-b, -B och --orphan är ömsesidigt uteslutande" -#: builtin/checkout.c:1103 +#: builtin/checkout.c:1108 msgid "--track needs a branch name" msgstr "--track behöver ett namn på en gren" -#: builtin/checkout.c:1110 +#: builtin/checkout.c:1115 msgid "Missing branch name; try -b" msgstr "Grennamn saknas; försök med -b" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1150 msgid "invalid path specification" msgstr "felaktig sökvägsangivelse" -#: builtin/checkout.c:1152 +#: builtin/checkout.c:1157 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" @@ -3146,12 +3285,12 @@ msgstr "" "Kan inte uppdatera sökvägar och växla till grenen \"%s\" samtidigt.\n" "Ville du checka ut \"%s\" som inte kan lösas som en utcheckning?" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "git checkout: --detach tar inte en sökväg som argument \"%s\"" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -3202,7 +3341,7 @@ msgid "remove whole directories" msgstr "ta bort hela kataloger" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 -#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182 +#: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" msgstr "mönster" @@ -3330,47 +3469,47 @@ msgstr "nyckel=värde" msgid "set config inside the new repository" msgstr "ställ in konfiguration i det nya arkivet" -#: builtin/clone.c:244 +#: builtin/clone.c:254 #, c-format -msgid "reference repository '%s' is not a local directory." -msgstr "referensarkivet \"%s\" är inte en lokal katalog." +msgid "reference repository '%s' is not a local repository." +msgstr "referensarkivet \"%s\" är inte ett lokalt arkiv." -#: builtin/clone.c:307 +#: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" msgstr "misslyckades skapa katalogen \"%s\"" -#: builtin/clone.c:309 builtin/diff.c:77 +#: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" msgstr "misslyckades ta status på \"%s\"" -#: builtin/clone.c:311 +#: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" msgstr "%s finns och är ingen katalog" -#: builtin/clone.c:325 +#: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" msgstr "misslyckades ta status på %s\n" -#: builtin/clone.c:347 +#: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" msgstr "misslyckades skapa länken \"%s\"" -#: builtin/clone.c:351 +#: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" msgstr "misslyckades kopiera filen till \"%s\"" -#: builtin/clone.c:374 +#: builtin/clone.c:384 #, c-format msgid "done.\n" msgstr "klart.\n" -#: builtin/clone.c:387 +#: builtin/clone.c:397 msgid "" "Clone succeeded, but checkout failed.\n" "You can inspect what was checked out with 'git status'\n" @@ -3380,91 +3519,91 @@ msgstr "" "Du kan inspektera det som checkades ut med \"git status\"\n" "och försöka checka ut igen med \"git checkout -f HEAD\"\n" -#: builtin/clone.c:466 +#: builtin/clone.c:476 #, c-format msgid "Could not find remote branch %s to clone." msgstr "Kunde inte hitta fjärrgrenen %s för att klona." -#: builtin/clone.c:540 +#: builtin/clone.c:550 msgid "remote did not send all necessary objects" msgstr "fjärren sände inte alla nödvändiga objekt" -#: builtin/clone.c:600 +#: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "" "HEAD hos fjärren pekar på en obefintlig referens, kan inte checka ut.\n" -#: builtin/clone.c:631 +#: builtin/clone.c:641 msgid "unable to checkout working tree" msgstr "kunde inte checka ut arbetskatalogen" -#: builtin/clone.c:739 +#: builtin/clone.c:749 msgid "Too many arguments." msgstr "För många argument." -#: builtin/clone.c:743 +#: builtin/clone.c:753 msgid "You must specify a repository to clone." msgstr "Du måste ange ett arkiv att klona." -#: builtin/clone.c:754 +#: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "flaggorna --bare och --origin %s är inkompatibla." -#: builtin/clone.c:757 +#: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." msgstr "flaggorna --bare och --separate-git-dir är inkompatibla." -#: builtin/clone.c:770 +#: builtin/clone.c:780 #, c-format msgid "repository '%s' does not exist" msgstr "arkivet \"%s\" finns inte" -#: builtin/clone.c:775 +#: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." msgstr "--depth ignoreras i lokala kloningar; använd file:// istället" -#: builtin/clone.c:785 +#: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "destinationssökvägen \"%s\" finns redan och är inte en tom katalog." -#: builtin/clone.c:795 +#: builtin/clone.c:805 #, c-format msgid "working tree '%s' already exists." msgstr "arbetsträdet \"%s\" finns redan." -#: builtin/clone.c:808 builtin/clone.c:820 +#: builtin/clone.c:818 builtin/clone.c:830 #, c-format msgid "could not create leading directories of '%s'" msgstr "kunde inte skapa inledande kataloger för \"%s\"" -#: builtin/clone.c:811 +#: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." msgstr "kunde inte skapa arbetskatalogen \"%s\"" -#: builtin/clone.c:830 +#: builtin/clone.c:840 #, c-format msgid "Cloning into bare repository '%s'...\n" msgstr "Klonar till ett naket arkiv \"%s\"...\n" -#: builtin/clone.c:832 +#: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" msgstr "Klonar till \"%s\"...\n" -#: builtin/clone.c:867 +#: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" msgstr "Vet inte hur man klonar %s" -#: builtin/clone.c:916 +#: builtin/clone.c:926 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "Fjärrgrenen %s hittades inte i uppströmsarkivet %s" -#: builtin/clone.c:923 +#: builtin/clone.c:933 msgid "You appear to have cloned an empty repository." msgstr "Du verkar ha klonat ett tomt arkiv." @@ -3610,7 +3749,7 @@ msgstr "Felaktig indragningssträng: \"%s\"" msgid "could not lookup commit %s" msgstr "kunde inte slå upp incheckningen %s" -#: builtin/commit.c:612 builtin/shortlog.c:272 +#: builtin/commit.c:612 builtin/shortlog.c:270 #, c-format msgid "(reading log message from standard input)\n" msgstr "(läser loggmeddelande från standard in)\n" @@ -3811,8 +3950,8 @@ msgstr "visa status i långt format (standard)" msgid "terminate entries with NUL" msgstr "terminera poster med NUL" -#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:653 -#: builtin/fast-export.c:656 builtin/tag.c:459 +#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:659 +#: builtin/fast-export.c:662 builtin/tag.c:459 msgid "mode" msgstr "läge" @@ -3920,7 +4059,7 @@ msgstr "" msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "jag är nu författare av incheckningen (används med -C/-c/--amend)" -#: builtin/commit.c:1373 builtin/log.c:1104 builtin/revert.c:109 +#: builtin/commit.c:1373 builtin/log.c:1113 builtin/revert.c:109 msgid "add Signed-off-by:" msgstr "lägg till Signed-off-by:" @@ -4174,8 +4313,12 @@ msgid "respect include directives on lookup" msgstr "respektera inkluderingsdirektiv vid uppslag" #: builtin/count-objects.c:82 -msgid "git count-objects [-v]" -msgstr "git count-objects [-v]" +msgid "git count-objects [-v] [-H | --human-readable]" +msgstr "git count-objects [-v] [-H | --human-readable]" + +#: builtin/count-objects.c:97 +msgid "print sizes in human readable format" +msgstr "skriv storlekar i människoläsbart format" #: builtin/describe.c:15 msgid "git describe [options] <committish>*" @@ -4351,39 +4494,39 @@ msgstr "ej hanterat objekt \"%s\" angavs." msgid "git fast-export [rev-list-opts]" msgstr "git fast-export [rev-list-flaggor]" -#: builtin/fast-export.c:652 +#: builtin/fast-export.c:658 msgid "show progress after <n> objects" msgstr "visa förlopp efter <n> objekt" -#: builtin/fast-export.c:654 +#: builtin/fast-export.c:660 msgid "select handling of signed tags" msgstr "välj hantering av signerade taggar" -#: builtin/fast-export.c:657 +#: builtin/fast-export.c:663 msgid "select handling of tags that tag filtered objects" msgstr "välj hantering av taggar som har taggfiltrerade objekt" -#: builtin/fast-export.c:660 +#: builtin/fast-export.c:666 msgid "Dump marks to this file" msgstr "Dump märken till filen" -#: builtin/fast-export.c:662 +#: builtin/fast-export.c:668 msgid "Import marks from this file" msgstr "Importera märken från filen" -#: builtin/fast-export.c:664 +#: builtin/fast-export.c:670 msgid "Fake a tagger when tags lack one" msgstr "Fejka taggare när taggen saknar en" -#: builtin/fast-export.c:666 +#: builtin/fast-export.c:672 msgid "Output full tree for each commit" msgstr "Skriv ut hela trädet för varje incheckning" -#: builtin/fast-export.c:668 +#: builtin/fast-export.c:674 msgid "Use the done feature to terminate the stream" msgstr "Använd done-funktionen för att avsluta strömmen" -#: builtin/fast-export.c:669 +#: builtin/fast-export.c:675 msgid "Skip output of blob data" msgstr "Hoppa över skrivning av blob-data" @@ -4459,7 +4602,7 @@ msgstr "fördjupa historik för grund klon" msgid "convert to a complete repository" msgstr "konvertera till komplett arkiv" -#: builtin/fetch.c:88 builtin/log.c:1121 +#: builtin/fetch.c:88 builtin/log.c:1130 msgid "dir" msgstr "kat" @@ -4639,29 +4782,29 @@ msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" msgstr "" "git fmt-merge-msg [-m <meddelande>] [--log[=<n>]|--no-log] [--file <fil>]" -#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701 -#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175 +#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:701 +#: builtin/merge.c:188 builtin/show-branch.c:655 builtin/show-ref.c:175 #: builtin/tag.c:446 parse-options.h:133 parse-options.h:239 msgid "n" msgstr "n" -#: builtin/fmt-merge-msg.c:660 +#: builtin/fmt-merge-msg.c:664 msgid "populate log with at most <n> entries from shortlog" msgstr "fyll i loggen med som mest <n> poster från shortlog" -#: builtin/fmt-merge-msg.c:663 +#: builtin/fmt-merge-msg.c:667 msgid "alias for --log (deprecated)" msgstr "alias för --log (avråds)" -#: builtin/fmt-merge-msg.c:666 +#: builtin/fmt-merge-msg.c:670 msgid "text" msgstr "text" -#: builtin/fmt-merge-msg.c:667 +#: builtin/fmt-merge-msg.c:671 msgid "use <text> as start of message" msgstr "inled meddelande med <text>" -#: builtin/fmt-merge-msg.c:668 +#: builtin/fmt-merge-msg.c:672 msgid "file to read from" msgstr "fil att läsa från" @@ -5053,50 +5196,54 @@ msgstr "spara filen som den är utan filer" msgid "process file as it were from this path" msgstr "hantera filen som om den kom från sökvägen" -#: builtin/help.c:42 +#: builtin/help.c:43 msgid "print all available commands" msgstr "visa alla tillgängliga kommandon" -#: builtin/help.c:43 +#: builtin/help.c:44 +msgid "print list of useful guides" +msgstr "lista användbara vägledningar" + +#: builtin/help.c:45 msgid "show man page" msgstr "visa manualsida" -#: builtin/help.c:44 +#: builtin/help.c:46 msgid "show manual in web browser" msgstr "visa manual i webbläsare" -#: builtin/help.c:46 +#: builtin/help.c:48 msgid "show info page" msgstr "visa info-sida" -#: builtin/help.c:52 -msgid "git help [--all] [--man|--web|--info] [command]" -msgstr "git help [--all] [--man|--web|--info] [kommando]" +#: builtin/help.c:54 +msgid "git help [--all] [--guides] [--man|--web|--info] [command]" +msgstr "git help [--all] [--guides] [--man|--web|--info] [kommando]" -#: builtin/help.c:64 +#: builtin/help.c:66 #, c-format msgid "unrecognized help format '%s'" msgstr "okänt hjälpformat: %s" -#: builtin/help.c:92 +#: builtin/help.c:94 msgid "Failed to start emacsclient." msgstr "Misslyckades starta emacsclient." -#: builtin/help.c:105 +#: builtin/help.c:107 msgid "Failed to parse emacsclient version." msgstr "Kunde inte tolka emacsclient-version." -#: builtin/help.c:113 +#: builtin/help.c:115 #, c-format msgid "emacsclient version '%d' too old (< 22)." msgstr "emacsclient version \"%d\" för gammal (< 22)." -#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176 +#: builtin/help.c:133 builtin/help.c:161 builtin/help.c:170 builtin/help.c:178 #, c-format msgid "failed to exec '%s': %s" msgstr "exec misslyckades för \"%s\": %s" -#: builtin/help.c:216 +#: builtin/help.c:218 #, c-format msgid "" "'%s': path for unsupported man viewer.\n" @@ -5105,7 +5252,7 @@ msgstr "" "\"%s\": sökväg för man-visare som ej stöds.\n" "Använd \"man.<verktyg>.cmd\" istället." -#: builtin/help.c:228 +#: builtin/help.c:230 #, c-format msgid "" "'%s': cmd for supported man viewer.\n" @@ -5114,25 +5261,57 @@ msgstr "" "\"%s\": kommando för man-visare som stöds.\n" "Använd \"man.<verktyg>.path\" istället." -#: builtin/help.c:349 +#: builtin/help.c:351 #, c-format msgid "'%s': unknown man viewer." msgstr "\"%s\": okänd man-visare." -#: builtin/help.c:366 +#: builtin/help.c:368 msgid "no man viewer handled the request" msgstr "ingen man-visare hanterade förfrågan" -#: builtin/help.c:374 +#: builtin/help.c:376 msgid "no info viewer handled the request" msgstr "ingen info-visare hanterade förfrågan" -#: builtin/help.c:429 builtin/help.c:436 +#: builtin/help.c:422 +msgid "Defining attributes per path" +msgstr "Definierar attribut per sökväg" + +#: builtin/help.c:423 +msgid "A Git glossary" +msgstr "En Git-ordlista" + +#: builtin/help.c:424 +msgid "Specifies intentionally untracked files to ignore" +msgstr "Ange avsiktligen ospårade filer att ignorera" + +#: builtin/help.c:425 +msgid "Defining submodule properties" +msgstr "Ange egenskaper för undermoduler" + +#: builtin/help.c:426 +msgid "Specifying revisions and ranges for Git" +msgstr "Ange versioner och intervall i Git" + +#: builtin/help.c:427 +msgid "A tutorial introduction to Git (for version 1.5.1 or newer)" +msgstr "Introduktion till Git (för version 1.5.1 och senare)" + +#: builtin/help.c:428 +msgid "An overview of recommended workflows with Git" +msgstr "Översikt över rekommenderade arbetsflöden med Git" + +#: builtin/help.c:440 +msgid "The common Git guides are:\n" +msgstr "De vanliga Git-vägledningarna är:\n" + +#: builtin/help.c:462 builtin/help.c:478 #, c-format msgid "usage: %s%s" msgstr "användning: %s%s" -#: builtin/help.c:452 +#: builtin/help.c:494 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "\"git %s\" är ett alias för \"%s\"" @@ -5579,8 +5758,8 @@ msgid "Cannot access work tree '%s'" msgstr "Kan inte komma åt arbetskatalogen \"%s\"" #: builtin/log.c:40 -msgid "git log [<options>] [<since>..<until>] [[--] <path>...]\n" -msgstr "git log [<flaggor>] [<sedan>..<till>] [[--] <sökväg>...]\n" +msgid "git log [<options>] [<revision range>] [[--] <path>...]\n" +msgstr "git log [<flaggor>] [<versionsintervall>] [[--] <sökväg>...]\n" #: builtin/log.c:41 msgid " or: git show [options] <object>..." @@ -5617,301 +5796,301 @@ msgstr "Kunde inte läsa objektet %s" msgid "Unknown type: %d" msgstr "Okänd typ: %d" -#: builtin/log.c:630 +#: builtin/log.c:638 msgid "format.headers without value" msgstr "format.headers utan värde" -#: builtin/log.c:704 +#: builtin/log.c:720 msgid "name of output directory is too long" msgstr "namnet på utdatakatalogen är för långt" -#: builtin/log.c:720 +#: builtin/log.c:736 #, c-format msgid "Cannot open patch file %s" msgstr "Kan inte öppna patchfilen %s" -#: builtin/log.c:734 +#: builtin/log.c:750 msgid "Need exactly one range." msgstr "Behöver precis ett intervall." -#: builtin/log.c:742 +#: builtin/log.c:758 msgid "Not a range." msgstr "Inte ett intervall." -#: builtin/log.c:815 +#: builtin/log.c:860 msgid "Cover letter needs email format" msgstr "Omslagsbrevet behöver e-postformat" -#: builtin/log.c:888 +#: builtin/log.c:936 #, c-format msgid "insane in-reply-to: %s" msgstr "tokigt in-reply-to: %s" -#: builtin/log.c:916 +#: builtin/log.c:964 msgid "git format-patch [options] [<since> | <revision range>]" msgstr "git format-patch [flaggor] [<sedan> | <revisionsintervall>]" -#: builtin/log.c:961 +#: builtin/log.c:1009 msgid "Two output directories?" msgstr "Två utdatakataloger?" -#: builtin/log.c:1099 +#: builtin/log.c:1108 msgid "use [PATCH n/m] even with a single patch" msgstr "använd [PATCH n/m] även för en ensam patch" -#: builtin/log.c:1102 +#: builtin/log.c:1111 msgid "use [PATCH] even with multiple patches" msgstr "använd [PATCH] även för flera patchar" -#: builtin/log.c:1106 +#: builtin/log.c:1115 msgid "print patches to standard out" msgstr "skriv patcharna på stnadard ut" -#: builtin/log.c:1108 +#: builtin/log.c:1117 msgid "generate a cover letter" msgstr "generera ett följebrev" -#: builtin/log.c:1110 +#: builtin/log.c:1119 msgid "use simple number sequence for output file names" msgstr "använd enkel nummersekvens för utdatafilnamn" -#: builtin/log.c:1111 +#: builtin/log.c:1120 msgid "sfx" msgstr "sfx" -#: builtin/log.c:1112 +#: builtin/log.c:1121 msgid "use <sfx> instead of '.patch'" msgstr "använd <sfx> istället för \".patch\"" -#: builtin/log.c:1114 +#: builtin/log.c:1123 msgid "start numbering patches at <n> instead of 1" msgstr "börja numrera patchar på <n> istället för 1" -#: builtin/log.c:1116 +#: builtin/log.c:1125 msgid "mark the series as Nth re-roll" msgstr "markera serien som N:te försök" -#: builtin/log.c:1118 +#: builtin/log.c:1127 msgid "Use [<prefix>] instead of [PATCH]" msgstr "Använd [<prefix>] istället för [PATCH]" -#: builtin/log.c:1121 +#: builtin/log.c:1130 msgid "store resulting files in <dir>" msgstr "spara filerna i <katalog>" -#: builtin/log.c:1124 +#: builtin/log.c:1133 msgid "don't strip/add [PATCH]" msgstr "ta inte bort eller lägg till [PATCH]" -#: builtin/log.c:1127 +#: builtin/log.c:1136 msgid "don't output binary diffs" msgstr "skriv inte binära diffar" -#: builtin/log.c:1129 +#: builtin/log.c:1138 msgid "don't include a patch matching a commit upstream" msgstr "ta inte med patchar som motsvarar en uppströmsincheckning" -#: builtin/log.c:1131 +#: builtin/log.c:1140 msgid "show patch format instead of default (patch + stat)" msgstr "visa patchformat istället för standard (patch + stat)" -#: builtin/log.c:1133 +#: builtin/log.c:1142 msgid "Messaging" msgstr "E-post" -#: builtin/log.c:1134 +#: builtin/log.c:1143 msgid "header" msgstr "huvud" -#: builtin/log.c:1135 +#: builtin/log.c:1144 msgid "add email header" msgstr "lägg till e-posthuvud" -#: builtin/log.c:1136 builtin/log.c:1138 +#: builtin/log.c:1145 builtin/log.c:1147 msgid "email" msgstr "epost" -#: builtin/log.c:1136 +#: builtin/log.c:1145 msgid "add To: header" msgstr "Lägg till mottagarhuvud (\"To:\")" -#: builtin/log.c:1138 +#: builtin/log.c:1147 msgid "add Cc: header" msgstr "Lägg till kopiehuvud (\"Cc:\")" -#: builtin/log.c:1140 +#: builtin/log.c:1149 msgid "message-id" msgstr "meddelande-id" -#: builtin/log.c:1141 +#: builtin/log.c:1150 msgid "make first mail a reply to <message-id>" msgstr "Gör det första brevet ett svar till <meddelande-id>" -#: builtin/log.c:1142 builtin/log.c:1145 +#: builtin/log.c:1151 builtin/log.c:1154 msgid "boundary" msgstr "gräns" -#: builtin/log.c:1143 +#: builtin/log.c:1152 msgid "attach the patch" msgstr "bifoga patchen" -#: builtin/log.c:1146 +#: builtin/log.c:1155 msgid "inline the patch" msgstr "gör patchen ett inline-objekt" -#: builtin/log.c:1150 +#: builtin/log.c:1159 msgid "enable message threading, styles: shallow, deep" msgstr "aktivera brevtrådning, typer: shallow, deep" -#: builtin/log.c:1152 +#: builtin/log.c:1161 msgid "signature" msgstr "signatur" -#: builtin/log.c:1153 +#: builtin/log.c:1162 msgid "add a signature" msgstr "lägg till signatur" -#: builtin/log.c:1155 +#: builtin/log.c:1164 msgid "don't print the patch filenames" msgstr "visa inte filnamn för patchar" -#: builtin/log.c:1239 +#: builtin/log.c:1248 msgid "-n and -k are mutually exclusive." msgstr "-n och -k kan inte användas samtidigt." -#: builtin/log.c:1241 +#: builtin/log.c:1250 msgid "--subject-prefix and -k are mutually exclusive." msgstr "--subject-prefix och -k kan inte användas samtidigt." -#: builtin/log.c:1249 +#: builtin/log.c:1258 msgid "--name-only does not make sense" msgstr "kan inte använda --name-only" -#: builtin/log.c:1251 +#: builtin/log.c:1260 msgid "--name-status does not make sense" msgstr "kan inte använda --name-status" -#: builtin/log.c:1253 +#: builtin/log.c:1262 msgid "--check does not make sense" msgstr "kan inte använda --check" -#: builtin/log.c:1276 +#: builtin/log.c:1285 msgid "standard output, or directory, which one?" msgstr "standard ut, eller katalog, vilken skall det vara?" -#: builtin/log.c:1278 +#: builtin/log.c:1287 #, c-format msgid "Could not create directory '%s'" msgstr "Kunde inte skapa katalogen \"%s\"" -#: builtin/log.c:1431 +#: builtin/log.c:1435 msgid "Failed to create output files" msgstr "Misslyckades skapa utdatafiler" -#: builtin/log.c:1480 +#: builtin/log.c:1484 msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]" msgstr "git cherry [-v] [<uppström> [<huvud> [<gräns>]]]" -#: builtin/log.c:1535 +#: builtin/log.c:1539 #, c-format msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" msgstr "Kunde inte hitta en spårad fjärrgren, ange <uppström> manuellt.\n" -#: builtin/log.c:1548 builtin/log.c:1550 builtin/log.c:1562 +#: builtin/log.c:1552 builtin/log.c:1554 builtin/log.c:1566 #, c-format msgid "Unknown commit %s" msgstr "Okänd incheckning %s" -#: builtin/ls-files.c:409 +#: builtin/ls-files.c:402 msgid "git ls-files [options] [<file>...]" msgstr "git ls-files [flaggor] [<fil>...]" -#: builtin/ls-files.c:466 +#: builtin/ls-files.c:459 msgid "identify the file status with tags" msgstr "identifiera filstatus med taggar" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:461 msgid "use lowercase letters for 'assume unchanged' files" msgstr "använd små bokstäver för \"anta oförändrade\"-filer" -#: builtin/ls-files.c:470 +#: builtin/ls-files.c:463 msgid "show cached files in the output (default)" msgstr "visa cachade filer i utdata (standard)" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:465 msgid "show deleted files in the output" msgstr "visa borttagna filer i utdata" -#: builtin/ls-files.c:474 +#: builtin/ls-files.c:467 msgid "show modified files in the output" msgstr "visa modifierade filer i utdata" -#: builtin/ls-files.c:476 +#: builtin/ls-files.c:469 msgid "show other files in the output" msgstr "visa andra filer i utdata" -#: builtin/ls-files.c:478 +#: builtin/ls-files.c:471 msgid "show ignored files in the output" msgstr "visa ignorerade filer i utdata" -#: builtin/ls-files.c:481 +#: builtin/ls-files.c:474 msgid "show staged contents' object name in the output" msgstr "visa köat innehålls objektnamn i utdata" -#: builtin/ls-files.c:483 +#: builtin/ls-files.c:476 msgid "show files on the filesystem that need to be removed" msgstr "visa filer i filsystemet som behöver tas bort" -#: builtin/ls-files.c:485 +#: builtin/ls-files.c:478 msgid "show 'other' directories' name only" msgstr "visa endast namn för \"andra\" kataloger" -#: builtin/ls-files.c:488 +#: builtin/ls-files.c:481 msgid "don't show empty directories" msgstr "visa inte tomma kataloger" -#: builtin/ls-files.c:491 +#: builtin/ls-files.c:484 msgid "show unmerged files in the output" msgstr "visa ej sammanslagna filer i utdata" -#: builtin/ls-files.c:493 +#: builtin/ls-files.c:486 msgid "show resolve-undo information" msgstr "visa \"resolve-undo\"-information" -#: builtin/ls-files.c:495 +#: builtin/ls-files.c:488 msgid "skip files matching pattern" msgstr "hoppa över filer som motsvarar mönster" -#: builtin/ls-files.c:498 +#: builtin/ls-files.c:491 msgid "exclude patterns are read from <file>" msgstr "exkludera mönster som läses från <fil>" -#: builtin/ls-files.c:501 +#: builtin/ls-files.c:494 msgid "read additional per-directory exclude patterns in <file>" msgstr "läs ytterligare per-katalog-exkluderingsmönster från <fil>" -#: builtin/ls-files.c:503 +#: builtin/ls-files.c:496 msgid "add the standard git exclusions" msgstr "lägg till git:s standardexkluderingar" -#: builtin/ls-files.c:506 +#: builtin/ls-files.c:499 msgid "make the output relative to the project top directory" msgstr "gör utdata relativ till projektets toppkatalog" -#: builtin/ls-files.c:509 +#: builtin/ls-files.c:502 msgid "if any <file> is not in the index, treat this as an error" msgstr "om en <fil> inte är indexet, betrakta det som ett fel" -#: builtin/ls-files.c:510 +#: builtin/ls-files.c:503 msgid "tree-ish" msgstr "träd-igt" -#: builtin/ls-files.c:511 +#: builtin/ls-files.c:504 msgid "pretend that paths removed since <tree-ish> are still present" msgstr "låtsas att sökvägar borttagna sedan <träd-igt> fortfarande finns" -#: builtin/ls-files.c:513 +#: builtin/ls-files.c:506 msgid "show debugging data" msgstr "visa felsökningsutdata" @@ -8109,16 +8288,16 @@ msgstr "" "varianten." #: builtin/revert.c:22 -msgid "git revert [options] <commit-ish>" -msgstr "git revert [flaggor] <incheckning-igt>" +msgid "git revert [options] <commit-ish>..." +msgstr "git revert [flaggor] <incheckning-igt>..." #: builtin/revert.c:23 msgid "git revert <subcommand>" msgstr "git revert <underkommando>" #: builtin/revert.c:28 -msgid "git cherry-pick [options] <commit-ish>" -msgstr "git cherry-pick [flaggor] <incheckning-igt>" +msgid "git cherry-pick [options] <commit-ish>..." +msgstr "git cherry-pick [flaggor] <incheckning-igt>..." #: builtin/revert.c:29 msgid "git cherry-pick <subcommand>" @@ -8269,32 +8448,31 @@ msgid "git rm: unable to remove %s" msgstr "git rm: kan inte ta bort %s" #: builtin/shortlog.c:13 -msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" -msgstr "" -"git shortlog [-n] [-s] [-e] [-w] [rev-flaggor] [--] [<incheckning-id>... ]" +msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" +msgstr "git shortlog [<flaggor>] [<versionsintervall>] [[--] <sökväg>...]" -#: builtin/shortlog.c:133 +#: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" msgstr "Författare saknas: %s" -#: builtin/shortlog.c:229 +#: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" msgstr "sortera utdata enligt antal incheckningar per författare" -#: builtin/shortlog.c:231 +#: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" msgstr "Undertryck beskrivningar, visa bara antal incheckningar" -#: builtin/shortlog.c:233 +#: builtin/shortlog.c:231 msgid "Show the email address of each author" msgstr "Visa e-postadress för varje författare" -#: builtin/shortlog.c:234 +#: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" msgstr "w[,i1[,i2]]" -#: builtin/shortlog.c:235 +#: builtin/shortlog.c:233 msgid "Linewrap output" msgstr "Radbryt utdata" @@ -8314,67 +8492,67 @@ msgstr "" msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" msgstr "git show-branch (-g|--reflog)[=<n>[,<bas>]] [--list] [<ref>]" -#: builtin/show-branch.c:651 +#: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" msgstr "visa fjärrspårande och lokala grenar" -#: builtin/show-branch.c:653 +#: builtin/show-branch.c:652 msgid "show remote-tracking branches" msgstr "visa fjärrspårande grenar" -#: builtin/show-branch.c:655 +#: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" msgstr "färga \"*!+-\" enligt grenen" -#: builtin/show-branch.c:657 +#: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" msgstr "visa <n> ytterligare incheckningar efter gemensam anfader" -#: builtin/show-branch.c:659 +#: builtin/show-branch.c:658 msgid "synonym to more=-1" msgstr "synonym till more=-1" -#: builtin/show-branch.c:660 +#: builtin/show-branch.c:659 msgid "suppress naming strings" msgstr "undertyck namnsträngar" -#: builtin/show-branch.c:662 +#: builtin/show-branch.c:661 msgid "include the current branch" msgstr "inkludera aktuell gren" -#: builtin/show-branch.c:664 +#: builtin/show-branch.c:663 msgid "name commits with their object names" msgstr "namnge incheckningar med deras objektnamn" -#: builtin/show-branch.c:666 +#: builtin/show-branch.c:665 msgid "show possible merge bases" msgstr "visa möjliga sammanslaningsbaser" -#: builtin/show-branch.c:668 +#: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" msgstr "visa referenser som inte kan nås från någon annan referens" -#: builtin/show-branch.c:670 +#: builtin/show-branch.c:669 msgid "show commits in topological order" msgstr "visa incheckningar i topologisk ordning" -#: builtin/show-branch.c:672 +#: builtin/show-branch.c:671 msgid "show only commits not on the first branch" msgstr "visa endast incheckningar inte på den första grenen" -#: builtin/show-branch.c:674 +#: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" msgstr "visa sammanslagningar som endast kan nås från en spets" -#: builtin/show-branch.c:676 +#: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" msgstr "visa incheckningar där ingen förälder kommer före dess barn" -#: builtin/show-branch.c:678 +#: builtin/show-branch.c:677 msgid "<n>[,<base>]" msgstr "<n>[,<bas>]" -#: builtin/show-branch.c:679 +#: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" msgstr "visa <n> nyaste refloggposter med början på bas" @@ -8834,9 +9012,14 @@ msgid "only useful for debugging" msgstr "endast användbart vid felsökning" #: git.c:16 -msgid "See 'git help <command>' for more information on a specific command." +msgid "" +"'git help -a' and 'git help -g' lists available subcommands and some\n" +"concept guides. See 'git help <command>' or 'git help <concept>'\n" +"to read about a specific subcommand or concept." msgstr "" -"Se \"git help <kommando>\" för mer information om ett specifikt kommando." +"\"git help -a\" och \"git help -g\" visar tillgängliga underkommandon och\n" +"några konceptvägledningar. Se \"git help <kommando>\" eller \"git help\n" +"<koncept>\" för att läsa mer om specifika underkommandon och koncept." #: parse-options.h:156 msgid "no-op (backward compatibility)" @@ -9203,16 +9386,16 @@ msgstr "" "Du måste sedan ange åtminstone en bra och en dålig version.\n" "(Du kan använda \"git bisect bad\" och \"git bisect good\" för detta.)" -#: git-bisect.sh:347 git-bisect.sh:474 +#: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." msgstr "Vi utför ingen bisect för tillfället." -#: git-bisect.sh:354 +#: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" msgstr "\"$invalid\" är inte en giltig incheckning" -#: git-bisect.sh:363 +#: git-bisect.sh:379 #, sh-format msgid "" "Could not check out original HEAD '$branch'.\n" @@ -9221,25 +9404,25 @@ msgstr "" "Kunde inte checka ut original-HEAD \"$branch\".\n" "Försök \"git bisect reset <incheckning>\"." -#: git-bisect.sh:390 +#: git-bisect.sh:406 msgid "No logfile given" msgstr "Ingen loggfil angiven" -#: git-bisect.sh:391 +#: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" msgstr "kan inte läsa $file för uppspelning" -#: git-bisect.sh:408 +#: git-bisect.sh:424 msgid "?? what are you talking about?" msgstr "?? vad menar du?" -#: git-bisect.sh:420 +#: git-bisect.sh:436 #, sh-format msgid "running $command" msgstr "kör $command" -#: git-bisect.sh:427 +#: git-bisect.sh:443 #, sh-format msgid "" "bisect run failed:\n" @@ -9248,11 +9431,11 @@ msgstr "" "\"bisect\"-körningen misslyckades:\n" "felkod $res från \"$command\" är < 0 eller >= 128" -#: git-bisect.sh:453 +#: git-bisect.sh:469 msgid "bisect run cannot continue any more" msgstr "\"bisect\"-körningen kan inte fortsätta längre" -#: git-bisect.sh:459 +#: git-bisect.sh:475 #, sh-format msgid "" "bisect run failed:\n" @@ -9261,7 +9444,7 @@ msgstr "" "\"bisect\"-körningen misslyckades:\n" "\"bisect_state $state\" avslutades med felkoden $res" -#: git-bisect.sh:466 +#: git-bisect.sh:482 msgid "bisect run success" msgstr "\"bisect\"-körningen lyckades" @@ -9845,6 +10028,23 @@ msgstr "Misslyckades rekursera in i undermodulsökvägen \"$sm_path\"" msgid "Synchronizing submodule url for '$prefix$sm_path'" msgstr "Synkroniserar undermodul-url för \"$prefix$sm_path\"" +#~ msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" +#~ msgstr "Det tog %.2f sekunder att räkna ospårade filer. \"status -uno\"" + +#~ msgid "may speed it up, but you have to be careful not to forget to add" +#~ msgstr "kanske gör det snabbare, men du måste vara försiktig så att du" + +#~ msgid "new files yourself (see 'git help status')." +#~ msgstr "inte glömmer lägga till filer själv (se \"git help status\")" + +#~ msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +#~ msgstr "" +#~ "git shortlog [-n] [-s] [-e] [-w] [rev-flaggor] [--] [<incheckning-id>... ]" + +#~ msgid "See 'git help <command>' for more information on a specific command." +#~ msgstr "" +#~ "Se \"git help <kommando>\" för mer information om ett specifikt kommando." + #~ msgid "use any ref in .git/refs" #~ msgstr "använd alla referenser i .git/refs" @@ -9964,9 +10164,6 @@ msgstr "Synkroniserar undermodul-url för \"$prefix$sm_path\"" #~ msgid "# Changed but not updated:" #~ msgstr "# Ändrade men inte uppdaterade:" -#~ msgid "A branch named '%s' already exists." -#~ msgstr "Det finns redan en gren som heter \"%s\"" - #~ msgid "path '%s' does not have all 3 versions" #~ msgstr "sökvägen \"%s\" har inte alla 3 versionerna" @@ -10029,9 +10226,6 @@ msgstr "Synkroniserar undermodul-url för \"$prefix$sm_path\"" #~ msgid "Could not extract author time from %s" #~ msgstr "Kunde inte hämta författartid från %s" -#~ msgid "No author information found in %s" -#~ msgstr "Hittade ingen författarinformation i %s" - #~ msgid "cherry-pick --ff cannot be used with --signoff" #~ msgstr "cherry-pick --ff kan inte användas med --signoff" @@ -6,10 +6,10 @@ # msgid "" msgstr "" -"Project-Id-Version: git-v1.8.2.1-342-gfa728\n" +"Project-Id-Version: git-v1.8.3-rc0-20-gc6bc7\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2013-04-10 15:16+0800\n" -"PO-Revision-Date: 2013-04-11 14:21+0700\n" +"POT-Creation-Date: 2013-04-30 08:25+0800\n" +"PO-Revision-Date: 2013-05-01 14:26+0700\n" "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n" "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n" "Language: vi\n" @@ -70,7 +70,7 @@ msgstr "fmt" msgid "archive format" msgstr "định dạng lưu trữ" -#: archive.c:324 builtin/log.c:1117 +#: archive.c:324 builtin/log.c:1126 msgid "prefix" msgstr "tiền tố" @@ -78,10 +78,10 @@ msgstr "tiền tố" msgid "prepend prefix to each pathname in the archive" msgstr "nối thêm tiền tố vào từng đường dẫn tập tin trong kho lưu" -#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2366 -#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:659 -#: builtin/fast-export.c:661 builtin/grep.c:715 builtin/hash-object.c:77 -#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536 +#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 +#: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 +#: builtin/fast-export.c:667 builtin/grep.c:715 builtin/hash-object.c:77 +#: builtin/ls-files.c:490 builtin/ls-files.c:493 builtin/notes.c:536 #: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149 msgid "file" msgstr "tập-tin" @@ -96,7 +96,7 @@ msgstr "đọc .gitattributes trong thư mục làm việc" #: archive.c:330 msgid "report archived files on stderr" -msgstr "liệt kê các tập tin được lưu trữ vào stderr (đầu ra lỗi chuẩn)" +msgstr "liệt kê các tập tin được lưu trữ vào stderr (đầu ra lỗi tiêu chuẩn)" #: archive.c:331 msgid "store only" @@ -138,11 +138,82 @@ msgstr "" "Các mẫu dạng phủ định bị cấm dùng cho các thuộc tính của git\n" "Dùng “\\!” cho các chuỗi văn bản có dấu chấm than dẫn đầu." +#: branch.c:60 +#, c-format +msgid "Not setting branch %s as its own upstream." +msgstr "Chưa cài đặt nhánh %s như là thượng nguồn (upstream) của nó." + +#: branch.c:82 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s by rebasing." +msgstr "" +"Nhánh %s cài đặt để theo dõi vết nhánh máy chủ %s từ %s bằng cách rebase." + +#: branch.c:83 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s." +msgstr "Nhánh %s cài đặt để theo vết nhánh máy chủ %s từ %s." + +#: branch.c:87 +#, c-format +msgid "Branch %s set up to track local branch %s by rebasing." +msgstr "Nhánh %s cài đặt để theo vết nhánh nội bộ %s bằng cách rebase." + +#: branch.c:88 +#, c-format +msgid "Branch %s set up to track local branch %s." +msgstr "Nhánh %s cài đặt để theo vết nhánh nội bộ %s." + +#: branch.c:92 +#, c-format +msgid "Branch %s set up to track remote ref %s by rebasing." +msgstr "Nhánh %s cài đặt để theo vết nhánh máy chủ %s bằng cách rebase." + +#: branch.c:93 +#, c-format +msgid "Branch %s set up to track remote ref %s." +msgstr "Nhánh %s cài đặt để theo vết tham chiếu máy chủ %s." + +#: branch.c:97 +#, c-format +msgid "Branch %s set up to track local ref %s by rebasing." +msgstr "" +"Nhánh %s cài đặt để theo dõi vết tham chiếu nội bộ %s bằng cách rebase." + +#: branch.c:98 +#, c-format +msgid "Branch %s set up to track local ref %s." +msgstr "Nhánh %s cài đặt để theo dõi tham chiếu nội bộ %s." + +#: branch.c:118 +#, c-format +msgid "Tracking not set up: name too long: %s" +msgstr "Theo vết chưa được cài đặt: tên quá dài: %s" + +#: branch.c:137 +#, c-format +msgid "Not tracking: ambiguous information for ref %s" +msgstr "Không theo vết: thông tin chưa rõ ràng cho tham chiếu %s" + +#: branch.c:182 +#, c-format +msgid "'%s' is not a valid branch name." +msgstr "“%s” không phải là một tên nhánh hợp lệ." + +#: branch.c:187 +#, c-format +msgid "A branch named '%s' already exists." +msgstr "Đã có nhánh mang tên “%s”." + +#: branch.c:195 +msgid "Cannot force update the current branch." +msgstr "Không thể ép buộc cập nhật nhánh hiện hành." + #: branch.c:201 #, c-format msgid "Cannot setup tracking information; starting point '%s' is not a branch." msgstr "" -"Không thể cài đặt thông tin theo vết; điểm bắt đầu '%s' không phải là một " +"Không thể cài đặt thông tin theo vết; điểm bắt đầu “%s” không phải là một " "nhánh." #: branch.c:203 @@ -170,6 +241,29 @@ msgstr "" "sẽ theo dõi bản đối chiếu máy chủ của nó, bạn cần dùng lệnh\n" "\"git push -u\" để đặt cấu hình dòng ngược bạn muốn push." +#: branch.c:250 +#, c-format +msgid "Not a valid object name: '%s'." +msgstr "Không phải tên đối tượng hợp lệ: “%s”." + +#: branch.c:270 +#, c-format +msgid "Ambiguous object name: '%s'." +msgstr "Tên đối tượng chưa rõ ràng: “%s”." + +#: branch.c:275 +#, c-format +msgid "Not a valid branch point: '%s'." +msgstr "Nhánh không hợp lệ: “%s”." + +#: branch.c:281 +msgid "Failed to lock ref for update" +msgstr "Gặp lỗi khi khóa tham chiếu (ref) để cập nhật" + +#: branch.c:299 +msgid "Failed to write ref" +msgstr "Gặp lỗi khi ghi tham chiếu (ref)" + #: bundle.c:36 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -189,9 +283,9 @@ msgstr "không thể mở “%s”" msgid "Repository lacks these prerequisite commits:" msgstr "Kho chứa thiếu những lần chuyển giao (commit) cần trước hết này:" -#: bundle.c:164 sequencer.c:651 sequencer.c:1083 builtin/log.c:300 -#: builtin/log.c:754 builtin/log.c:1350 builtin/log.c:1566 builtin/merge.c:349 -#: builtin/shortlog.c:157 +#: bundle.c:164 sequencer.c:651 sequencer.c:1101 builtin/log.c:300 +#: builtin/log.c:770 builtin/log.c:1344 builtin/log.c:1570 builtin/merge.c:349 +#: builtin/shortlog.c:155 msgid "revision walk setup failed" msgstr "cài đặt việc di chuyển qua các điểm xét lại gặp lỗi" @@ -217,7 +311,7 @@ msgstr[1] "Lệnh bundle yêu cầu %d tham chiếu (refs) này:" msgid "rev-list died" msgstr "rev-list đã chết" -#: bundle.c:300 builtin/log.c:1246 builtin/shortlog.c:260 +#: bundle.c:300 builtin/log.c:1255 builtin/shortlog.c:258 #, c-format msgid "unrecognized argument: %s" msgstr "đối số không được thừa nhận: %s" @@ -367,7 +461,7 @@ msgstr "" "Tìm thấy các lỗi trong biến cấu hình “diff.dirstat”:\n" "%s" -#: diff.c:3480 +#: diff.c:3481 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -376,7 +470,7 @@ msgstr "" "Gặp lỗi khi phân tích đối số tùy chọn --dirstat/-X:\n" "%s" -#: diff.c:3494 +#: diff.c:3495 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "Gặp lỗi khi phân tích đối số tùy chọn --submodule: “%s”" @@ -481,8 +575,8 @@ msgstr[1] "" msgid "failed to read the cache" msgstr "gặp lỗi khi đọc bộ nhớ tạm" -#: merge.c:110 builtin/checkout.c:362 builtin/checkout.c:563 -#: builtin/clone.c:635 +#: merge.c:110 builtin/checkout.c:365 builtin/checkout.c:566 +#: builtin/clone.c:645 msgid "unable to write new index file" msgstr "không thể ghi tập tin lưu bảng mục lục mới" @@ -531,7 +625,7 @@ msgstr "không thể đọc đối tượng %s “%s”" msgid "blob expected for %s '%s'" msgstr "đối tượng blob được mong đợi cho %s “%s”" -#: merge-recursive.c:773 builtin/clone.c:303 +#: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" msgstr "gặp lỗi khi mở “%s”" @@ -927,8 +1021,8 @@ msgstr "Lần chuyển giao (commit) %s không có cha mẹ %d" #, c-format msgid "Mainline was specified but commit %s is not a merge." msgstr "" -"Luồng chính được chỉ ra nhưng lần chuyển giao (commit) %s không phải là một " -"lần hòa trộn." +"Luồng chính đã được chỉ ra nhưng lần chuyển giao (commit) %s không phải là " +"một lần hòa trộn." #. TRANSLATORS: The first %s will be "revert" or #. "cherry-pick", the second %s a SHA1 @@ -1064,11 +1158,21 @@ msgstr "tập tin HEAD “pre-cherry-pick” đã lưu “%s” bị hỏng" msgid "Could not format %s." msgstr "Không thể định dạng %s." -#: sequencer.c:1101 +#: sequencer.c:1083 +#, c-format +msgid "%s: can't cherry-pick a %s" +msgstr "%s: không thể cherry-pick một %s" + +#: sequencer.c:1085 +#, c-format +msgid "%s: bad revision" +msgstr "%s: điểm xét duyệt sai" + +#: sequencer.c:1119 msgid "Can't revert as initial commit" msgstr "Không thể revert một lần chuyển giao (commit) khởi tạo" -#: sequencer.c:1102 +#: sequencer.c:1120 msgid "Can't cherry-pick into empty head" msgstr "Không thể cherry-pick vào một đầu (head) trống rỗng" @@ -1268,69 +1372,69 @@ msgstr "chưa hòa trộn: %s" msgid "bug: unhandled diff status %c" msgstr "lỗi: không lấy được trạng thái lệnh diff %c" -#: wt-status.c:805 +#: wt-status.c:803 msgid "You have unmerged paths." msgstr "Bạn có những đường dẫn chưa được hòa trộn." -#: wt-status.c:808 wt-status.c:960 +#: wt-status.c:806 wt-status.c:958 msgid " (fix conflicts and run \"git commit\")" msgstr " (sửa các xung đột sau đó chạy \"git commit\")" -#: wt-status.c:811 +#: wt-status.c:809 msgid "All conflicts fixed but you are still merging." msgstr "Tất cả các xung đột đã được giải quyết nhưng bạn vẫn đang hòa trộn." -#: wt-status.c:814 +#: wt-status.c:812 msgid " (use \"git commit\" to conclude merge)" msgstr " (dùng \"git commit\" để hoàn tất việc hòa trộn)" -#: wt-status.c:824 +#: wt-status.c:822 msgid "You are in the middle of an am session." msgstr "Bạn đang ở giữa của một phiên “am”." -#: wt-status.c:827 +#: wt-status.c:825 msgid "The current patch is empty." msgstr "Miếng vá hiện tại bị trống rỗng." -#: wt-status.c:831 +#: wt-status.c:829 msgid " (fix conflicts and then run \"git am --resolved\")" msgstr " (sửa các xung đột và sau đó chạy lệnh \"git am --resolved\")" -#: wt-status.c:833 +#: wt-status.c:831 msgid " (use \"git am --skip\" to skip this patch)" msgstr " (dùng \"git am --skip\" để bỏ qua miếng vá này)" -#: wt-status.c:835 +#: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" msgstr " (dùng \"git am --abort\" để phục hồi lại nhánh nguyên thủy)" -#: wt-status.c:895 wt-status.c:912 +#: wt-status.c:893 wt-status.c:910 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "Bạn hiện nay đang thực hiện việc rebase nhánh “%s” trên “%s”." -#: wt-status.c:900 wt-status.c:917 +#: wt-status.c:898 wt-status.c:915 msgid "You are currently rebasing." msgstr "Bạn hiện nay đang thực hiện việc rebase (tái cấu trúc)." -#: wt-status.c:903 +#: wt-status.c:901 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr " (sửa các xung đột và sau đó chạy lệnh \"git rebase --continue\")" -#: wt-status.c:905 +#: wt-status.c:903 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr " (dùng \"git rebase --skip\" để bỏ qua lần vá này)" -#: wt-status.c:907 +#: wt-status.c:905 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr " (dùng \"git rebase --abort\" để check-out nhánh nguyên thủy)" -#: wt-status.c:920 +#: wt-status.c:918 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr "" " (khi tất cả các xung đột đã sửa xong: chạy lệnh \"git rebase --continue\")" -#: wt-status.c:924 +#: wt-status.c:922 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." @@ -1338,150 +1442,148 @@ msgstr "" "Bạn hiện nay đang thực hiện việc chia tách một lần chuyển giao (commit) " "trong khi đang rebase nhánh “%s” trên “%s”." -#: wt-status.c:929 +#: wt-status.c:927 msgid "You are currently splitting a commit during a rebase." msgstr "" "Bạn hiện tại đang cắt đôi một lần chuyển giao trong khi đang thực hiện việc " "rebase." -#: wt-status.c:932 +#: wt-status.c:930 msgid " (Once your working directory is clean, run \"git rebase --continue\")" msgstr "" " (Một khi thư mục làm việc của bạn đã gọn gàng, chạy \"git rebase --continue" "\")" -#: wt-status.c:936 +#: wt-status.c:934 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "" "Bạn hiện nay đang thực hiện việc sửa chữa một lần chuyển giao (commit) trong " "khi đang rebase nhánh “%s” trên “%s”." -#: wt-status.c:941 +#: wt-status.c:939 msgid "You are currently editing a commit during a rebase." msgstr "Bạn hiện đang sửa một lần chuyển giao trong khi bạn thực hiện rebase." -#: wt-status.c:944 +#: wt-status.c:942 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr "" " (dùng \"git commit --amend\" để tu bổ lần chuyển giao (commit) hiện tại)" -#: wt-status.c:946 +#: wt-status.c:944 msgid "" " (use \"git rebase --continue\" once you are satisfied with your changes)" msgstr "" " (dùng \"git rebase --continue\" một khi bạn cảm thấy hài lòng về những " "thay đổi của mình)" -#: wt-status.c:956 +#: wt-status.c:954 msgid "You are currently cherry-picking." msgstr "Bạn hiện nay đang thực hiện việc cherry-pick." -#: wt-status.c:963 +#: wt-status.c:961 msgid " (all conflicts fixed: run \"git commit\")" msgstr " (khi tất cả các xung đột đã sửa xong: chạy lệnh \"git commit\")" -#: wt-status.c:972 +#: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." msgstr "Bạn hiện nay đang thực hiện thao tác revert lần chuyển giao “%s”." -#: wt-status.c:977 +#: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" msgstr " (sửa các xung đột và sau đó chạy lệnh \"git revert --continue\")" -#: wt-status.c:980 +#: wt-status.c:978 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr "" " (khi tất cả các xung đột đã sửa xong: chạy lệnh \"git revert --continue\")" -#: wt-status.c:982 +#: wt-status.c:980 msgid " (use \"git revert --abort\" to cancel the revert operation)" msgstr " (dùng \"git revert --abort\" để hủy bỏ thao tác revert)" -#: wt-status.c:993 +#: wt-status.c:991 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "" "Bạn hiện nay đang thực hiện thao tác di chuyển nửa bước (bisect), bắt đầu từ " "nhánh “%s”." -#: wt-status.c:997 +#: wt-status.c:995 msgid "You are currently bisecting." msgstr "Bạn hiện tại đang thực hiện việc bisect (chia đôi)." -#: wt-status.c:1000 +#: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr " (dùng \"git bisect reset\" để quay trở lại nhánh nguyên thủy)" -#: wt-status.c:1175 +#: wt-status.c:1173 msgid "On branch " msgstr "Trên nhánh " -#: wt-status.c:1186 +#: wt-status.c:1184 msgid "HEAD detached at " msgstr "HEAD được tách rời tại" -#: wt-status.c:1188 +#: wt-status.c:1186 msgid "HEAD detached from " msgstr "HEAD được tách rời từ" -#: wt-status.c:1191 +#: wt-status.c:1189 msgid "Not currently on any branch." msgstr "Hiện tại chẳng ở nhánh nào cả." -#: wt-status.c:1208 +#: wt-status.c:1206 msgid "Initial commit" msgstr "Lần chuyển giao (commit) khởi đầu" -#: wt-status.c:1222 +#: wt-status.c:1220 msgid "Untracked files" msgstr "Những tập tin chưa được theo dõi" -#: wt-status.c:1224 +#: wt-status.c:1222 msgid "Ignored files" msgstr "Những tập tin bị lờ đi" -#: wt-status.c:1228 +#: wt-status.c:1226 #, c-format -msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" -msgstr "Cần %.2f giây để đếm các tập tin chưa được theo vết. 'status -uno'" - -#: wt-status.c:1232 -msgid "may speed it up, but you have to be careful not to forget to add" +msgid "" +"It took %.2f seconds to enumerate untracked files. 'status -uno'\n" +"may speed it up, but you have to be careful not to forget to add\n" +"new files yourself (see 'git help status')." msgstr "" -"có thể làm nó nhanh lên, nhưng bạn phải cẩn trọng đừng quên thêm nó vào" - -#: wt-status.c:1235 -msgid "new files yourself (see 'git help status')." -msgstr "tập tin mới của chính bạn (xem 'git help status')." +"Cần %.2f giây để liệt kê tất cả các tập tin chưa được theo dõi. “status -" +"uno”\n" +"có lẽ làm nó nhanh hơn, nhưng bạn phải cẩn thận đừng quên mình phải\n" +"tự thêm các tập tin mới (xem “git help status”.." -#: wt-status.c:1238 +#: wt-status.c:1232 #, c-format msgid "Untracked files not listed%s" msgstr "Những tập tin không bị theo vết không được liệt kê ra %s" -#: wt-status.c:1240 +#: wt-status.c:1234 msgid " (use -u option to show untracked files)" msgstr " (dùng tùy chọn -u để hiển thị các tập tin chưa được theo dõi)" -#: wt-status.c:1246 +#: wt-status.c:1240 msgid "No changes" msgstr "Không có thay đổi nào" -#: wt-status.c:1251 +#: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" msgstr "" "không có thay đổi nào được thêm vào commit (dùng \"git add\" và/hoặc \"git " "commit -a\")\n" -#: wt-status.c:1254 +#: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" msgstr "không có thay đổi nào được thêm vào lần chuyển giao (commit)\n" -#: wt-status.c:1257 +#: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " @@ -1490,58 +1592,58 @@ msgstr "" "không có gì được thêm vào lần chuyển giao (commit) nhưng có những tập tin " "không được theo dấu vết hiện diện (dùng \"git add\" để đưa vào theo dõi)\n" -#: wt-status.c:1260 +#: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" msgstr "" "không có gì được thêm vào lần chuyển giao (commit) nhưng có những tập tin " "không được theo dấu vết hiện diện\n" -#: wt-status.c:1263 +#: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" msgstr "" " không có gì để commit (tạo/sao-chép các tập tin và dùng \"git add\" để theo " "dõi dấu vết)\n" -#: wt-status.c:1266 wt-status.c:1271 +#: wt-status.c:1260 wt-status.c:1265 #, c-format msgid "nothing to commit\n" msgstr "không có gì để chuyển giao (commit)\n" -#: wt-status.c:1269 +#: wt-status.c:1263 #, c-format msgid "nothing to commit (use -u to show untracked files)\n" msgstr "" "không có gì để chuyển giao (commit) (dùng -u để bỏ các tập tin cần theo dấu " "vết)\n" -#: wt-status.c:1273 +#: wt-status.c:1267 #, c-format msgid "nothing to commit, working directory clean\n" msgstr "không có gì để chuyển giao (commit), thư mục làm việc sạch sẽ\n" -#: wt-status.c:1381 +#: wt-status.c:1375 msgid "HEAD (no branch)" msgstr "HEAD (không nhánh)" -#: wt-status.c:1387 +#: wt-status.c:1381 msgid "Initial commit on " msgstr "Lần chuyển giao (commit) khởi tạo trên " -#: wt-status.c:1402 +#: wt-status.c:1396 msgid "behind " msgstr "đằng sau " -#: wt-status.c:1405 wt-status.c:1408 +#: wt-status.c:1399 wt-status.c:1402 msgid "ahead " msgstr "phía trước " -#: wt-status.c:1410 +#: wt-status.c:1404 msgid ", behind " msgstr ", đằng sau " -#: compat/precompose_utf8.c:58 builtin/clone.c:342 +#: compat/precompose_utf8.c:58 builtin/clone.c:352 #, c-format msgid "failed to unlink '%s'" msgstr "bỏ liên kết (unlink) %s không thành công" @@ -1550,200 +1652,235 @@ msgstr "bỏ liên kết (unlink) %s không thành công" msgid "git add [options] [--] <pathspec>..." msgstr "git add [các-tùy-chọn] [--] <pathspec>..." -#: builtin/add.c:63 +#. +#. * To be consistent with "git add -p" and most Git +#. * commands, we should default to being tree-wide, but +#. * this is not the original behavior and can't be +#. * changed until users trained themselves not to type +#. * "git add -u" or "git add -A". For now, we warn and +#. * keep the old behavior. Later, the behavior can be changed +#. * to tree-wide, keeping the warning for a while, and +#. * eventually we can drop the warning. +#. +#: builtin/add.c:58 +#, c-format +msgid "" +"The behavior of 'git add %s (or %s)' with no path argument from a\n" +"subdirectory of the tree will change in Git 2.0 and should not be used " +"anymore.\n" +"To add content for the whole tree, run:\n" +"\n" +" git add %s :/\n" +" (or git add %s :/)\n" +"\n" +"To restrict the command to the current directory, run:\n" +"\n" +" git add %s .\n" +" (or git add %s .)\n" +"\n" +"With the current Git version, the command is restricted to the current " +"directory.\n" +msgstr "" +"Cách ứng xử của lệnh “git add %s (hay %s)” khi không có tham số đường dẫn " +"từ\n" +"thư-mục con của cây sẽ thay đổi kể từ Git 2.0 và không thể sử dụng như thế " +"nữa.\n" +"Để thêm nội dung cho toàn bộ cây, chạy:\n" +"\n" +" git add %s :/\n" +" (hay git add %s :/)\n" +"\n" +"Để hạn chế lệnh cho thư-mục hiện tại, chạy:\n" +"\n" +" git add %s .\n" +" (hay git add %s .)\n" +"\n" +"Với phiên bản hiện tại của Git, lệnh bị hạn chế cho thư-mục hiện tại.\n" + +#: builtin/add.c:100 +#, c-format +msgid "" +"You ran 'git add' with neither '-A (--all)' or '--ignore-removal',\n" +"whose behaviour will change in Git 2.0 with respect to paths you removed.\n" +"Paths like '%s' that are\n" +"removed from your working tree are ignored with this version of Git.\n" +"\n" +"* 'git add --ignore-removal <pathspec>', which is the current default,\n" +" ignores paths you removed from your working tree.\n" +"\n" +"* 'git add --all <pathspec>' will let you also record the removals.\n" +"\n" +"Run 'git status' to check the paths you removed from your working tree.\n" +msgstr "" +"Bạn chạy “git add” mà không có “-A (--all)” cũng không “--ignore-removal”,\n" +"cách ứng xử của nó sẽ thay đổi kể từ Git 2.0: nó quan tâm đến các đường dẫn " +"mà\n" +"bạn đã gỡ bỏ. Các đường dẫn như là “%s” cái mà\n" +"bị gỡ bỏ từ cây làm việc của bạn thì bị bỏ qua với phiên bản này của Git.\n" +"\n" +"* “git add --ignore-removal <pathspec>”, cái hiện tại là mặc định,\n" +" bỏ qua các đường dẫn bạn đã gỡ bỏ từ cây làm việc của bạn.\n" +"\n" +"* “git add --all <pathspec>” sẽ đồng thời giúp bạn ghi lại việc dời đi.\n" +"\n" +"Chạy “git status” để kiểm tra các đường dẫn bạn đã gỡ bỏ từ cây làm việc của " +"bạn.\n" + +#: builtin/add.c:144 #, c-format msgid "unexpected diff status %c" msgstr "trạng thái lệnh diff không như mong đợi %c" -#: builtin/add.c:68 builtin/commit.c:233 +#: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" msgstr "Cập nhật tập tin gặp lỗi" -#: builtin/add.c:78 +#: builtin/add.c:163 #, c-format msgid "remove '%s'\n" msgstr "gỡ bỏ “%s”\n" -#: builtin/add.c:148 +#: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" msgstr "" "Các thay đổi không được lưu trạng thái sau khi làm tươi mới lại bảng mục lục:" -#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275 +#: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format msgid "pathspec '%s' did not match any files" msgstr "pathspec “%s” không khớp với bất kỳ tập tin nào" -#: builtin/add.c:234 +#: builtin/add.c:339 msgid "Could not read the index" msgstr "Không thể đọc bảng mục lục" -#: builtin/add.c:244 +#: builtin/add.c:349 #, c-format msgid "Could not open '%s' for writing." msgstr "Không thể mở “%s” để ghi." -#: builtin/add.c:248 +#: builtin/add.c:353 msgid "Could not write patch" msgstr "Không thể ghi ra miếng vá" -#: builtin/add.c:253 +#: builtin/add.c:358 #, c-format msgid "Could not stat '%s'" msgstr "không thể lấy trạng thái về “%s”" -#: builtin/add.c:255 +#: builtin/add.c:360 msgid "Empty patch. Aborted." msgstr "Miếng vá trống rỗng. Đã bỏ qua." -#: builtin/add.c:261 +#: builtin/add.c:366 #, c-format msgid "Could not apply '%s'" msgstr "Không thể apply (áp dụng miếng vá) “%s”" -#: builtin/add.c:271 +#: builtin/add.c:376 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "" "Các đường dẫn theo sau đây sẽ bị lờ đi bởi một trong các tập tin .gitignore " "của bạn:\n" -#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 +#: builtin/add.c:393 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 #: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253 #: builtin/rm.c:206 msgid "dry run" msgstr "chạy thử" -#: builtin/add.c:278 builtin/apply.c:4409 builtin/check-ignore.c:19 +#: builtin/add.c:394 builtin/apply.c:4409 builtin/check-ignore.c:19 #: builtin/commit.c:1152 builtin/count-objects.c:95 builtin/fsck.c:613 -#: builtin/log.c:1514 builtin/mv.c:62 builtin/read-tree.c:112 +#: builtin/log.c:1518 builtin/mv.c:62 builtin/read-tree.c:112 msgid "be verbose" msgstr "chi tiết" -#: builtin/add.c:280 +#: builtin/add.c:396 msgid "interactive picking" msgstr "sửa bằng cách tương tác" -#: builtin/add.c:281 builtin/checkout.c:1060 builtin/reset.c:258 +#: builtin/add.c:397 builtin/checkout.c:1063 builtin/reset.c:258 msgid "select hunks interactively" msgstr "chọn “hunks” một cách tương tác" -#: builtin/add.c:282 +#: builtin/add.c:398 msgid "edit current diff and apply" msgstr "sửa diff hiện nay và áp dụng nó" -#: builtin/add.c:283 +#: builtin/add.c:399 msgid "allow adding otherwise ignored files" msgstr "cho phép thêm các tập tin bị bỏ qua khác" -#: builtin/add.c:284 +#: builtin/add.c:400 msgid "update tracked files" msgstr "cập nhật các tập tin được theo vết" -#: builtin/add.c:285 +#: builtin/add.c:401 msgid "record only the fact that the path will be added later" msgstr "chỉ ghi lại sự việc mà đường dẫn sẽ được thêm vào sau" -#: builtin/add.c:286 +#: builtin/add.c:402 msgid "add changes from all tracked and untracked files" msgstr "" "thêm các thay đổi từ tất cả các tập tin có cũng như không được theo dõi dấu " "vết" -#: builtin/add.c:287 +#. takes no arguments +#: builtin/add.c:405 +msgid "ignore paths removed in the working tree (same as --no-all)" +msgstr "" +"lờ đi các đường dẫn bị gỡ bỏ trong cây thư mục làm việc (giống với --no-all)" + +#: builtin/add.c:407 msgid "don't add, only refresh the index" msgstr "không thêm, chỉ làm tươi mới bảng mục lục" -#: builtin/add.c:288 +#: builtin/add.c:408 msgid "just skip files which cannot be added because of errors" msgstr "chie bỏ qua những tập tin mà nó không thể được thêm vào bởi vì gặp lỗi" -#: builtin/add.c:289 +#: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" msgstr "" "kiểm tra xem - thậm chí thiếu - tập tin bị bỏ qua trong quá trình chạy thử" -#: builtin/add.c:311 +#: builtin/add.c:431 #, c-format msgid "Use -f if you really want to add them.\n" msgstr "Sử dụng tùy chọn -f nếu bạn thực sự muốn thêm chúng vào.\n" -#: builtin/add.c:312 +#: builtin/add.c:432 msgid "no files added" msgstr "chưa có tập tin nào được thêm vào" -#: builtin/add.c:318 +#: builtin/add.c:438 msgid "adding files failed" msgstr "thêm tập tin gặp lỗi" -#. -#. * To be consistent with "git add -p" and most Git -#. * commands, we should default to being tree-wide, but -#. * this is not the original behavior and can't be -#. * changed until users trained themselves not to type -#. * "git add -u" or "git add -A". For now, we warn and -#. * keep the old behavior. Later, the behavior can be changed -#. * to tree-wide, keeping the warning for a while, and -#. * eventually we can drop the warning. -#. -#: builtin/add.c:335 -#, c-format -msgid "" -"The behavior of 'git add %s (or %s)' with no path argument from a\n" -"subdirectory of the tree will change in Git 2.0 and should not be used " -"anymore.\n" -"To add content for the whole tree, run:\n" -"\n" -" git add %s :/\n" -" (or git add %s :/)\n" -"\n" -"To restrict the command to the current directory, run:\n" -"\n" -" git add %s .\n" -" (or git add %s .)\n" -"\n" -"With the current Git version, the command is restricted to the current " -"directory." -msgstr "" -"Cách ứng xử của lệnh “git add %s (hay %s)” khi không có tham số đường dẫn " -"từ\n" -"thư-mục con của cây sẽ thay đổi kể từ Git 2.0 và không thể sử dụng như thế " -"nữa.\n" -"Để thêm nội dung cho toàn bộ cây, chạy:\n" -"\n" -" git add %s :/\n" -" (hay git add %s :/)\n" -"\n" -"Để hạn chế lệnh cho thư-mục hiện tại, chạy:\n" -"\n" -" git add %s .\n" -" (hay git add %s .)\n" -"\n" -"Với phiên bản hiện tại của Git, lệnh bị hạn chế cho thư-mục hiện tại." - -#: builtin/add.c:381 +#: builtin/add.c:477 msgid "-A and -u are mutually incompatible" msgstr "-A và -u xung khắc nhau" -#: builtin/add.c:383 +#: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "Tùy chọn --ignore-missing chỉ có thể được dùng cùng với --dry-run" -#: builtin/add.c:414 +#: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" msgstr "Không có gì được chỉ ra, không có gì được thêm vào.\n" -#: builtin/add.c:415 +#: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "Có lẽ bạn muốn là “git add .” phải không?\n" -#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204 +#: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 msgid "index file corrupt" msgstr "tập tin ghi bảng mục lục bị hỏng" -#: builtin/add.c:481 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 +#: builtin/add.c:604 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 msgid "Unable to write new index file" msgstr "Không thể ghi tập tin lưu bảng mục lục mới" @@ -1999,7 +2136,7 @@ msgstr "%s: miếng vá không được áp dụng" msgid "Checking patch %s..." msgstr "Đang kiểm tra miếng vá %s..." -#: builtin/apply.c:3679 builtin/checkout.c:215 builtin/reset.c:124 +#: builtin/apply.c:3679 builtin/checkout.c:216 builtin/reset.c:124 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "make_cache_entry gặp lỗi đối với đường dẫn “%s”" @@ -2144,7 +2281,7 @@ msgid "build a temporary index based on embedded index information" msgstr "" "xây dựng bảng mục lục tạm thời trên cơ sở thông tin bảng mục lục được nhúng" -#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:463 +#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" msgstr "các đường dẫn bị ngăn cách bởi ký tự NULL" @@ -2281,101 +2418,101 @@ msgstr "" msgid "git blame [options] [rev-opts] [rev] [--] file" msgstr "git blame [các-tùy-chọn] [rev-opts] [rev] [--] tập-tin" -#: builtin/blame.c:30 builtin/shortlog.c:15 +#: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" msgstr "[rev-opts] được mô tả trong git-rev-list(1)" -#: builtin/blame.c:2350 +#: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" msgstr "Hiển thị các mục “blame” như là chúng ta thấy chúng, tăng dần" -#: builtin/blame.c:2351 +#: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "" "Hiển thị SHA-1 trắng cho những lần chuyển giao biên giới (Mặc định: off)" -#: builtin/blame.c:2352 +#: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "Không coi các lần chuyển giao gốc là giới hạn (Mặc định: off)" -#: builtin/blame.c:2353 +#: builtin/blame.c:2358 msgid "Show work cost statistics" msgstr "Hiển thị thống kê công sức làm việc" -#: builtin/blame.c:2354 +#: builtin/blame.c:2359 msgid "Show output score for blame entries" msgstr "Hiển thị kết xuất điểm số có các mục tin “blame”" -#: builtin/blame.c:2355 +#: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" msgstr "Hiển thị tên tập tin gốc (Mặc định: auto)" -#: builtin/blame.c:2356 +#: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" msgstr "Hiển thị số dòng gốc (Mặc định: off)" -#: builtin/blame.c:2357 +#: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" msgstr "Hiển thị ở định dạng đã thiết kế cho sự tiêu dùng bằng máy" -#: builtin/blame.c:2358 +#: builtin/blame.c:2363 msgid "Show porcelain format with per-line commit information" msgstr "Hiển thị định dạng “porcelain” với thông tin chuyển giao mỗi dòng" -#: builtin/blame.c:2359 +#: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "Dùng cùng chế độ xuất ra vóigit-annotate (Mặc định: off)" -#: builtin/blame.c:2360 +#: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" msgstr "Hiển thị dấu vết thời gian dạng thô (Mặc định: off)" -#: builtin/blame.c:2361 +#: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" msgstr "Hiển thị SHA1 của lần chuyển giao (commit) dạng dài (Mặc định: off)" -#: builtin/blame.c:2362 +#: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" msgstr "Không hiển thị tên tác giả và dấu vết thời gian (Mặc định: off)" -#: builtin/blame.c:2363 +#: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" msgstr "Hiển thị thư điện tử của tác giả thay vì tên (Mặc định: off)" -#: builtin/blame.c:2364 +#: builtin/blame.c:2369 msgid "Ignore whitespace differences" msgstr "Bỏ qua các khác biệt do khoảng trắng gây ra" -#: builtin/blame.c:2365 +#: builtin/blame.c:2370 msgid "Spend extra cycles to find better match" msgstr "Tiêu thụ thêm năng tài nguyên máy móc để tìm kiếm tốt hơn nữa" -#: builtin/blame.c:2366 +#: builtin/blame.c:2371 msgid "Use revisions from <file> instead of calling git-rev-list" msgstr "" "Sử dụng điểm xét duyệt (revision) từ <tập tin> thay vì gọi “git-rev-list”" -#: builtin/blame.c:2367 +#: builtin/blame.c:2372 msgid "Use <file>'s contents as the final image" msgstr "Sử dụng nội dung của <tập tin> như là ảnh cuối cùng" -#: builtin/blame.c:2368 builtin/blame.c:2369 +#: builtin/blame.c:2373 builtin/blame.c:2374 msgid "score" msgstr "điểm số" -#: builtin/blame.c:2368 +#: builtin/blame.c:2373 msgid "Find line copies within and across files" msgstr "Tìm các bản sao chép dòng trong và ngang qua tập tin" -#: builtin/blame.c:2369 +#: builtin/blame.c:2374 msgid "Find line movements within and across files" msgstr "Tìm các di chuyển dòng trong và ngang qua tập tin" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "n,m" msgstr "n,m" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "Process only line range n,m, counting from 1" msgstr "Xử lý chỉ dòng vùng n,m, tính từ 1" @@ -2395,7 +2532,7 @@ msgstr "git branch [các-tùy-chọn] [-r] (-d | -D) <tên-nhánh> ..." msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" msgstr "git branch [các-tùy-chọn] (-m | -M) [<nhánh-cũ>] <nhánh-mới>" -#: builtin/branch.c:146 +#: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" @@ -2404,7 +2541,7 @@ msgstr "" "đang xóa nhánh “%s” mà nó lại đã được hòa trộn vào\n" " “%s”, nhưng vẫn chưa được hòa trộn vào HEAD." -#: builtin/branch.c:150 +#: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" @@ -2413,12 +2550,12 @@ msgstr "" "không xóa nhánh “%s” cái mà chưa được hòa trộn vào\n" " “%s”, cho dù là nó đã được hòa trộn vào HEAD." -#: builtin/branch.c:164 +#: builtin/branch.c:168 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "Không thể tìm kiếm đối tượng chuyển giao (commit) cho “%s”" -#: builtin/branch.c:168 +#: builtin/branch.c:172 #, c-format msgid "" "The branch '%s' is not fully merged.\n" @@ -2427,290 +2564,290 @@ msgstr "" "Nhánh “%s” không được trộn một cách đầy đủ.\n" "Nếu bạn thực sự muốn xóa nó, thì chạy lệnh “git branch -D %s”." -#: builtin/branch.c:181 +#: builtin/branch.c:185 msgid "Update of config-file failed" msgstr "Cập nhật tập tin cấu hình gặp lỗi" -#: builtin/branch.c:209 +#: builtin/branch.c:213 msgid "cannot use -a with -d" msgstr "không thể dùng tùy chọn -a với -d" -#: builtin/branch.c:215 +#: builtin/branch.c:219 msgid "Couldn't look up commit object for HEAD" msgstr "Không thể tìm kiếm đối tượng chuyển giao (commit) cho HEAD" -#: builtin/branch.c:223 +#: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "Không thể xóa nhánh “%s” cái mà bạn hiện nay đang ở." -#: builtin/branch.c:236 +#: builtin/branch.c:240 #, c-format msgid "remote branch '%s' not found." msgstr "không tìm thấy nhánh máy chủ “%s”." -#: builtin/branch.c:237 +#: builtin/branch.c:241 #, c-format msgid "branch '%s' not found." msgstr "không tìm thấy nhánh “%s”." -#: builtin/branch.c:251 +#: builtin/branch.c:255 #, c-format msgid "Error deleting remote branch '%s'" msgstr "Gặp lỗi khi đang xóa nhánh trên máy chủ “%s”" -#: builtin/branch.c:252 +#: builtin/branch.c:256 #, c-format msgid "Error deleting branch '%s'" msgstr "Lỗi khi xoá bỏ nhánh “%s”" -#: builtin/branch.c:259 +#: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" msgstr "Nhánh trên máy chủ \"%s\" đã bị xóa (từng là %s).\n" -#: builtin/branch.c:260 +#: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "Nhánh “%s” đã bị xóa (từng là %s)\n" -#: builtin/branch.c:362 +#: builtin/branch.c:366 #, c-format msgid "branch '%s' does not point at a commit" msgstr "nhánh “%s” không chỉ đến một lần chuyển giao (commit) nào cả" -#: builtin/branch.c:434 +#: builtin/branch.c:453 #, c-format msgid "[%s: behind %d]" msgstr "[%s: đằng sau %d]" -#: builtin/branch.c:436 +#: builtin/branch.c:455 #, c-format msgid "[behind %d]" msgstr "[đằng sau %d]" -#: builtin/branch.c:440 +#: builtin/branch.c:459 #, c-format msgid "[%s: ahead %d]" msgstr "[%s: phía trước %d]" -#: builtin/branch.c:442 +#: builtin/branch.c:461 #, c-format msgid "[ahead %d]" msgstr "[phía trước %d]" -#: builtin/branch.c:445 +#: builtin/branch.c:464 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "[%s: trước %d, sau %d]" -#: builtin/branch.c:448 +#: builtin/branch.c:467 #, c-format msgid "[ahead %d, behind %d]" msgstr "[trước %d, sau %d]" -#: builtin/branch.c:470 +#: builtin/branch.c:490 msgid " **** invalid ref ****" msgstr " **** tham chiếu sai ****" -#: builtin/branch.c:562 +#: builtin/branch.c:582 #, c-format msgid "(no branch, rebasing %s)" msgstr "(không nhánh, đang rebase %s)" -#: builtin/branch.c:565 +#: builtin/branch.c:585 #, c-format msgid "(no branch, bisect started on %s)" msgstr "(không nhánh, bisect được bắt đầu tại %s)" -#: builtin/branch.c:568 +#: builtin/branch.c:588 #, c-format msgid "(detached from %s)" msgstr "(được tách rời từ %s)" -#: builtin/branch.c:571 +#: builtin/branch.c:591 msgid "(no branch)" msgstr "(không nhánh)" -#: builtin/branch.c:617 +#: builtin/branch.c:637 #, c-format msgid "object '%s' does not point to a commit" msgstr "đối tượng “%s” không chỉ đến một lần chuyển giao (commit) nào cả" -#: builtin/branch.c:649 +#: builtin/branch.c:669 msgid "some refs could not be read" msgstr "một số tham chiếu đã không thể đọc được" -#: builtin/branch.c:662 +#: builtin/branch.c:682 msgid "cannot rename the current branch while not on any." msgstr "không thể đổi tên nhánh hiện hành trong khi nó chẳng ở đâu cả." -#: builtin/branch.c:672 +#: builtin/branch.c:692 #, c-format msgid "Invalid branch name: '%s'" msgstr "Sai tên nhánh: “%s”" -#: builtin/branch.c:687 +#: builtin/branch.c:707 msgid "Branch rename failed" msgstr "Đổi tên nhánh gặp lỗi" -#: builtin/branch.c:691 +#: builtin/branch.c:711 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "Đã đổi tên nhánh khuyết danh “%s” đi" -#: builtin/branch.c:695 +#: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "Nhánh bị đổi tên thành %s, nhưng HEAD lại không được cập nhật!" -#: builtin/branch.c:702 +#: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" msgstr "Nhánh bị đổi tên, nhưng cập nhật tập tin cấu hình gặp lỗi" -#: builtin/branch.c:717 +#: builtin/branch.c:737 #, c-format msgid "malformed object name %s" msgstr "tên đối tượng dị hình %s" -#: builtin/branch.c:741 +#: builtin/branch.c:761 #, c-format msgid "could not write branch description template: %s" msgstr "không thể ghi vào mẫu mô tả nhánh: %s" -#: builtin/branch.c:771 +#: builtin/branch.c:791 msgid "Generic options" msgstr "Tùy chọn chung" -#: builtin/branch.c:773 +#: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" msgstr "hiển thị mã băm và chủ đề, đưa ra hai lần cho nhánh thượng nguồn" -#: builtin/branch.c:774 +#: builtin/branch.c:794 msgid "suppress informational messages" msgstr "Thu hồi các thông điệp thông tin" -#: builtin/branch.c:775 +#: builtin/branch.c:795 msgid "set up tracking mode (see git-pull(1))" msgstr "cài đặt chế độ theo vết (xem git-pull(1))" -#: builtin/branch.c:777 +#: builtin/branch.c:797 msgid "change upstream info" msgstr "thay đổi thông tin thượng nguồn (upstream)" -#: builtin/branch.c:781 +#: builtin/branch.c:801 msgid "use colored output" msgstr "sử dụng kết xuất có tô màu" -#: builtin/branch.c:782 +#: builtin/branch.c:802 msgid "act on remote-tracking branches" msgstr "thao tác trên nhánh “remote-tracking”" -#: builtin/branch.c:785 builtin/branch.c:791 builtin/branch.c:812 -#: builtin/branch.c:818 builtin/commit.c:1368 builtin/commit.c:1369 +#: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 +#: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 #: builtin/commit.c:1370 builtin/commit.c:1371 builtin/tag.c:468 msgid "commit" msgstr "commit" -#: builtin/branch.c:786 builtin/branch.c:792 +#: builtin/branch.c:806 builtin/branch.c:812 msgid "print only branches that contain the commit" msgstr "chỉ hiển thị những nhánh mà nó chứa lần chuyển giao" -#: builtin/branch.c:798 +#: builtin/branch.c:818 msgid "Specific git-branch actions:" msgstr "Hành động git-branch:" -#: builtin/branch.c:799 +#: builtin/branch.c:819 msgid "list both remote-tracking and local branches" msgstr "liệt kê cả nhánh “remote-tracking” và nội bộ" -#: builtin/branch.c:801 +#: builtin/branch.c:821 msgid "delete fully merged branch" msgstr "xóa một cách đầy đủ nhánh đã hòa trộn" -#: builtin/branch.c:802 +#: builtin/branch.c:822 msgid "delete branch (even if not merged)" msgstr "xoá nhánh (cho dù là chưa được hòa trộn)" -#: builtin/branch.c:803 +#: builtin/branch.c:823 msgid "move/rename a branch and its reflog" msgstr "di chuyển hay đổi tên một nhánh và reflog của nó" -#: builtin/branch.c:804 +#: builtin/branch.c:824 msgid "move/rename a branch, even if target exists" msgstr "di chuyển hoặc đổi tên một nhánh, thậm chí cả khi đích đã có sẵn" -#: builtin/branch.c:805 +#: builtin/branch.c:825 msgid "list branch names" msgstr "liệt kê các tên nhánh" -#: builtin/branch.c:806 +#: builtin/branch.c:826 msgid "create the branch's reflog" msgstr "tạo reflog của nhánh" -#: builtin/branch.c:808 +#: builtin/branch.c:828 msgid "edit the description for the branch" msgstr "sửa mô tả cho nhánh" -#: builtin/branch.c:809 +#: builtin/branch.c:829 msgid "force creation (when already exists)" msgstr "ép buộc tạo (khi đã sẵn tồn tại rồi)" -#: builtin/branch.c:812 +#: builtin/branch.c:832 msgid "print only not merged branches" msgstr "chỉ hiển thị các nhánh chưa được hòa trộn" -#: builtin/branch.c:818 +#: builtin/branch.c:838 msgid "print only merged branches" msgstr "chỉ hiển thị các nhánh được hòa trộn" -#: builtin/branch.c:822 +#: builtin/branch.c:842 msgid "list branches in columns" msgstr "liệt kê các nhánh trong các cột" -#: builtin/branch.c:835 +#: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." msgstr "Gặp lỗi khi phân giải HEAD như là một tham chiếu (ref) hợp lệ." -#: builtin/branch.c:840 builtin/clone.c:609 +#: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" msgstr "không tìm thấy HEAD ở dưới refs/heads!" -#: builtin/branch.c:863 +#: builtin/branch.c:883 msgid "--column and --verbose are incompatible" msgstr "--column và --verbose xung khắc nhau" -#: builtin/branch.c:869 builtin/branch.c:908 +#: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" msgstr "cần tên nhánh" -#: builtin/branch.c:884 +#: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" msgstr "Không thể đưa ra mô tả HEAD đã tách rời" -#: builtin/branch.c:889 +#: builtin/branch.c:909 msgid "cannot edit description of more than one branch" msgstr "không thể sửa mô tả cho nhiều hơn một nhánh" -#: builtin/branch.c:896 +#: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." msgstr "Vẫn chưa chuyển giao trên nhánh “%s”." -#: builtin/branch.c:899 +#: builtin/branch.c:919 #, c-format msgid "No branch named '%s'." msgstr "Không có nhánh nào có tên “%s”." -#: builtin/branch.c:914 +#: builtin/branch.c:934 msgid "too many branches for a rename operation" msgstr "quá nhiều nhánh dành cho thao tác đổi tên" -#: builtin/branch.c:919 +#: builtin/branch.c:939 msgid "too many branches to set new upstream" msgstr "quá nhiều nhánh được đặt cho dòng ngược (upstream) mới" -#: builtin/branch.c:923 +#: builtin/branch.c:943 #, c-format msgid "" "could not set upstream of HEAD to %s when it does not point to any branch." @@ -2718,42 +2855,42 @@ msgstr "" "không thể đặt dòng ngược (upstream) của HEAD thành %s khi mà nó chẳng chỉ " "đến nhánh nào cả." -#: builtin/branch.c:926 builtin/branch.c:948 builtin/branch.c:970 +#: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" msgstr "không có nhánh nào như thế “%s”" -#: builtin/branch.c:930 +#: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" msgstr "nhánh “%s” chưa sẵn có" -#: builtin/branch.c:942 +#: builtin/branch.c:962 msgid "too many branches to unset upstream" msgstr "quá nhiều nhánh để bỏ đặt ngược dòng (upstream)" -#: builtin/branch.c:946 +#: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." msgstr "" "không thể bỏ đặt ngược dòng (upstream) của HEAD không chỉ đến một nhánh nào " "cả." -#: builtin/branch.c:952 +#: builtin/branch.c:972 #, c-format msgid "Branch '%s' has no upstream information" msgstr "Nhánh “%s” không có thông tin thượng nguồn (upstream)" -#: builtin/branch.c:967 +#: builtin/branch.c:987 msgid "it does not make sense to create 'HEAD' manually" -msgstr "không hợp lý khi tạo 'HEAD' thủ công " +msgstr "không hợp lý khi tạo “HEAD” thủ công " -#: builtin/branch.c:973 +#: builtin/branch.c:993 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "" "hai tùy chọn -a và -r áp dụng cho lệnh “git branch” không hợp lý đối với tên " "nhánh" -#: builtin/branch.c:976 +#: builtin/branch.c:996 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" @@ -2762,7 +2899,7 @@ msgstr "" "Cờ --set-upstream bị phản đối và sẽ bị xóa bỏ. Nên dùng --track hoặc --set-" "upstream-to\n" -#: builtin/branch.c:993 +#: builtin/branch.c:1013 #, c-format msgid "" "\n" @@ -2773,12 +2910,12 @@ msgstr "" "Nếu bạn muốn “%s” theo dõi “%s”, thực hiện lệnh sau:\n" "\n" -#: builtin/branch.c:994 +#: builtin/branch.c:1014 #, c-format msgid " git branch -d %s\n" msgstr " git branch -d %s\n" -#: builtin/branch.c:995 +#: builtin/branch.c:1015 #, c-format msgid " git branch --set-upstream-to %s\n" msgstr " git branch --set-upstream-to %s\n" @@ -2796,44 +2933,44 @@ msgstr "Cần một kho chứa để mà tạo một bundle." msgid "Need a repository to unbundle." msgstr "Cần một kho chứa để mà bung một bundle." -#: builtin/cat-file.c:247 +#: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" msgstr "git cat-file (-t|-s|-e|-p|<kiểu>|--textconv) <đối tượng>" -#: builtin/cat-file.c:248 +#: builtin/cat-file.c:177 msgid "git cat-file (--batch|--batch-check) < <list_of_objects>" msgstr "git cat-file (--batch|--batch-check) < <danh-sách-đối-tượng>" -#: builtin/cat-file.c:266 +#: builtin/cat-file.c:195 msgid "<type> can be one of: blob, tree, commit, tag" msgstr "<kiểu> là một trong số: blob, tree, commit, tag" -#: builtin/cat-file.c:267 +#: builtin/cat-file.c:196 msgid "show object type" msgstr "hiển thị kiểu đối tượng" -#: builtin/cat-file.c:268 +#: builtin/cat-file.c:197 msgid "show object size" msgstr "hiển thị kích thước đối tượng" -#: builtin/cat-file.c:270 +#: builtin/cat-file.c:199 msgid "exit with zero when there's no error" msgstr "thoát với 0 khi không có lỗi" -#: builtin/cat-file.c:271 +#: builtin/cat-file.c:200 msgid "pretty-print object's content" msgstr "in nội dung đối tượng dạng dễ đọc" -#: builtin/cat-file.c:273 +#: builtin/cat-file.c:202 msgid "for blob objects, run textconv on object's content" msgstr "với đối tượng blob, chạy lệnh textconv trên nội dung của đối tượng" -#: builtin/cat-file.c:275 +#: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" msgstr "" "hiển thị thông tin và nội dung của các đối tượng lấy từ đầu vào tiêu chuẩn" -#: builtin/cat-file.c:278 +#: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" msgstr "hiển thị các thông tin về đối tượng fed từ đầu vào tiêu chuẩn" @@ -2862,27 +2999,27 @@ msgstr "đọc tên tập tin từ đầu vào tiêu chuẩn" msgid "input paths are terminated by a null character" msgstr "các đường dẫn được ngăn cách bởi ký tự null" -#: builtin/check-ignore.c:18 builtin/checkout.c:1041 builtin/gc.c:177 +#: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" msgstr "chặn các báo cáo tiến trình hoạt động" -#: builtin/check-ignore.c:151 +#: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" msgstr "không thể chỉ định các tên đường dẫn với --stdin" -#: builtin/check-ignore.c:154 +#: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" msgstr "-z chỉ hợp lý với --stdin" -#: builtin/check-ignore.c:156 +#: builtin/check-ignore.c:151 msgid "no path specified" msgstr "chưa ghi rõ đường dẫn" -#: builtin/check-ignore.c:160 +#: builtin/check-ignore.c:155 msgid "--quiet is only valid with a single pathname" msgstr "--quiet chỉ hợp lệ với tên đường dẫn đơn" -#: builtin/check-ignore.c:162 +#: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" msgstr "không thể dùng cả hai tùy chọn --quiet và --verbose" @@ -2939,107 +3076,107 @@ msgstr "git checkout [các-tùy-chọn] <nhánh>" msgid "git checkout [options] [<branch>] -- <file>..." msgstr "git checkout [các-tùy-chọn] [<nhánh>] -- <tập-tin>..." -#: builtin/checkout.c:116 builtin/checkout.c:149 +#: builtin/checkout.c:117 builtin/checkout.c:150 #, c-format msgid "path '%s' does not have our version" msgstr "đường dẫn “%s” không có các phiên bản của chúng ta" -#: builtin/checkout.c:118 builtin/checkout.c:151 +#: builtin/checkout.c:119 builtin/checkout.c:152 #, c-format msgid "path '%s' does not have their version" msgstr "đường dẫn “%s” không có các phiên bản của chúng" -#: builtin/checkout.c:134 +#: builtin/checkout.c:135 #, c-format msgid "path '%s' does not have all necessary versions" msgstr "đường dẫn “%s” không có tất cả các phiên bản cần thiết" -#: builtin/checkout.c:178 +#: builtin/checkout.c:179 #, c-format msgid "path '%s' does not have necessary versions" msgstr "đường dẫn “%s” không có các phiên bản cần thiết" -#: builtin/checkout.c:195 +#: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" msgstr "đường dẫn “%s”: không thể hòa trộn" -#: builtin/checkout.c:212 +#: builtin/checkout.c:213 #, c-format msgid "Unable to add merge result for '%s'" msgstr "Không thể thêm kết quả hòa trộn cho “%s”" -#: builtin/checkout.c:236 builtin/checkout.c:239 builtin/checkout.c:242 -#: builtin/checkout.c:245 +#: builtin/checkout.c:237 builtin/checkout.c:240 builtin/checkout.c:243 +#: builtin/checkout.c:246 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "“%s” không thể được sử dụng với các đường dẫn cập nhật" -#: builtin/checkout.c:248 builtin/checkout.c:251 +#: builtin/checkout.c:249 builtin/checkout.c:252 #, c-format msgid "'%s' cannot be used with %s" msgstr "“%s” không thể được sử dụng với %s" -#: builtin/checkout.c:254 +#: builtin/checkout.c:255 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "" "Không thể cập nhật các đường dẫn và chuyển đến nhánh “%s” cùng một lúc." -#: builtin/checkout.c:265 builtin/checkout.c:455 +#: builtin/checkout.c:266 builtin/checkout.c:458 msgid "corrupt index file" msgstr "tập tin ghi bảng mục lục bị hỏng" -#: builtin/checkout.c:326 builtin/checkout.c:333 +#: builtin/checkout.c:329 builtin/checkout.c:336 #, c-format msgid "path '%s' is unmerged" msgstr "đường dẫn “%s” không được hòa trộn" -#: builtin/checkout.c:477 +#: builtin/checkout.c:480 msgid "you need to resolve your current index first" msgstr "bạn cần phải phân giải bảng mục lục hiện tại của bạn trước đã" -#: builtin/checkout.c:598 +#: builtin/checkout.c:601 #, c-format msgid "Can not do reflog for '%s'\n" msgstr "Không thể thực hiện reflog cho “%s”\n" -#: builtin/checkout.c:631 +#: builtin/checkout.c:634 msgid "HEAD is now at" msgstr "HEAD hiện giờ tại" -#: builtin/checkout.c:638 +#: builtin/checkout.c:641 #, c-format msgid "Reset branch '%s'\n" msgstr "Đặt lại nhánh “%s”\n" -#: builtin/checkout.c:641 +#: builtin/checkout.c:644 #, c-format msgid "Already on '%s'\n" msgstr "Đã sẵn sàng trên “%s”\n" -#: builtin/checkout.c:645 +#: builtin/checkout.c:648 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "Đã chuyển tới và reset nhánh “%s”\n" -#: builtin/checkout.c:647 builtin/checkout.c:984 +#: builtin/checkout.c:650 builtin/checkout.c:987 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "Đã chuyển đến nhánh mới “%s”\n" -#: builtin/checkout.c:649 +#: builtin/checkout.c:652 #, c-format msgid "Switched to branch '%s'\n" msgstr "Đã chuyển đến nhánh “%s”\n" -#: builtin/checkout.c:705 +#: builtin/checkout.c:708 #, c-format msgid " ... and %d more.\n" msgstr " ... và nhiều hơn %d.\n" #. The singular version -#: builtin/checkout.c:711 +#: builtin/checkout.c:714 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -3064,7 +3201,7 @@ msgstr[1] "" "\n" "%s\n" -#: builtin/checkout.c:729 +#: builtin/checkout.c:732 #, c-format msgid "" "If you want to keep them by creating a new branch, this may be a good time\n" @@ -3080,134 +3217,138 @@ msgstr "" " git branch tên_nhánh_mới %s\n" "\n" -#: builtin/checkout.c:759 +#: builtin/checkout.c:762 msgid "internal error in revision walk" msgstr "lỗi nội bộ trong khi di chuyển qua các điểm xét lại" -#: builtin/checkout.c:763 +#: builtin/checkout.c:766 msgid "Previous HEAD position was" msgstr "Vị trí kế trước của HEAD là" -#: builtin/checkout.c:790 builtin/checkout.c:979 +#: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" msgstr "Bạn tại nhánh mà nó chưa hề được sinh ra" #. case (1) -#: builtin/checkout.c:915 +#: builtin/checkout.c:918 #, c-format msgid "invalid reference: %s" msgstr "tham chiếu sai: %s" #. case (1): want a tree -#: builtin/checkout.c:954 +#: builtin/checkout.c:957 #, c-format msgid "reference is not a tree: %s" msgstr "tham chiếu không phải là một cây (tree):%s" -#: builtin/checkout.c:993 +#: builtin/checkout.c:996 msgid "paths cannot be used with switching branches" msgstr "các đường dẫn không thể dùng cùng với các nhánh chuyển" -#: builtin/checkout.c:996 builtin/checkout.c:1000 +#: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "“%s” không thể được sử dụng với các nhánh chuyển" -#: builtin/checkout.c:1004 builtin/checkout.c:1007 builtin/checkout.c:1012 -#: builtin/checkout.c:1015 +#: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 +#: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "“%s” không thể được sử dụng với “%s”" -#: builtin/checkout.c:1020 +#: builtin/checkout.c:1023 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "Không thể chuyển nhánh đến một non-commit “%s”" -#: builtin/checkout.c:1042 builtin/checkout.c:1044 builtin/clone.c:90 +#: builtin/checkout.c:1045 builtin/checkout.c:1047 builtin/clone.c:90 #: builtin/remote.c:169 builtin/remote.c:171 msgid "branch" msgstr "nhánh" -#: builtin/checkout.c:1043 +#: builtin/checkout.c:1046 msgid "create and checkout a new branch" msgstr "tạo và checkout một nhánh mới" -#: builtin/checkout.c:1045 +#: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" msgstr "create/reset và checkout một nhánh" -#: builtin/checkout.c:1046 +#: builtin/checkout.c:1049 msgid "create reflog for new branch" msgstr "tạo reflog cho nhánh mới" -#: builtin/checkout.c:1047 +#: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" msgstr "rời bỏ HEAD tại lần chuyển giao danh nghĩa" -#: builtin/checkout.c:1048 +#: builtin/checkout.c:1051 msgid "set upstream info for new branch" msgstr "đặt thông tin thượng nguồn (upstream) cho nhánh mới" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new branch" msgstr "nhánh mới" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new unparented branch" msgstr "nhánh mồ côi mới" -#: builtin/checkout.c:1051 +#: builtin/checkout.c:1054 msgid "checkout our version for unmerged files" msgstr "" "lấy ra (checkout) phiên bản của chúng ta cho các tập tin chưa được hòa trộn" -#: builtin/checkout.c:1053 +#: builtin/checkout.c:1056 msgid "checkout their version for unmerged files" msgstr "" "lấy ra (checkout) phiên bản của chúng họ cho các tập tin chưa được hòa trộn" -#: builtin/checkout.c:1055 +#: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" msgstr "ép buộc lấy ra (checkout) (bỏ đi những thay đổi nội bộ)" -#: builtin/checkout.c:1056 +#: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" msgstr "thực hiện hòa trộn kiểu 3-way với nhánh mới" -#: builtin/checkout.c:1057 builtin/merge.c:217 +#: builtin/checkout.c:1060 builtin/merge.c:217 msgid "update ignored files (default)" msgstr "cập nhật các tập tin bị bỏ qua (mặc định)" -#: builtin/checkout.c:1058 builtin/log.c:1149 parse-options.h:245 +#: builtin/checkout.c:1061 builtin/log.c:1158 parse-options.h:245 msgid "style" msgstr "kiểu" -#: builtin/checkout.c:1059 +#: builtin/checkout.c:1062 msgid "conflict style (merge or diff3)" msgstr "xung đột kiểu (hòa trộn hay diff3)" -#: builtin/checkout.c:1062 +#: builtin/checkout.c:1065 +msgid "do not limit pathspecs to sparse entries only" +msgstr "không giới hạn pathspecs chỉ thành các mục thưa thớt" + +#: builtin/checkout.c:1067 msgid "second guess 'git checkout no-such-branch'" msgstr "gợi ý thứ hai “git checkout không-nhánh-nào-như-vậy”" -#: builtin/checkout.c:1086 +#: builtin/checkout.c:1091 msgid "-b, -B and --orphan are mutually exclusive" msgstr "Tùy chọn -b|-B và --orphan loại từ lẫn nhau" -#: builtin/checkout.c:1103 +#: builtin/checkout.c:1108 msgid "--track needs a branch name" msgstr "--track cần tên một nhánh" -#: builtin/checkout.c:1110 +#: builtin/checkout.c:1115 msgid "Missing branch name; try -b" msgstr "Thiếu tên nhánh; hãy thử -b" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1150 msgid "invalid path specification" msgstr "đường dẫn đã cho không hợp lệ" -#: builtin/checkout.c:1152 +#: builtin/checkout.c:1157 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" @@ -3217,12 +3358,12 @@ msgstr "" "Bạn đã có ý định checkout “%s” cái mà không thể được phân giải như là lần " "chuyển giao (commit)?" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "git checkout: --detach không nhận một đối số đường dẫn “%s”" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -3272,7 +3413,7 @@ msgid "remove whole directories" msgstr "gỡ bỏ toàn bộ thư mục" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 -#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182 +#: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" msgstr "mẫu" @@ -3400,140 +3541,140 @@ msgstr "khóa=giá trị" msgid "set config inside the new repository" msgstr "đặt cấu hình bên trong một kho chứa mới" -#: builtin/clone.c:244 +#: builtin/clone.c:254 #, c-format -msgid "reference repository '%s' is not a local directory." -msgstr "kho tham chiếu “%s” không phải là một thư mục nội bộ." +msgid "reference repository '%s' is not a local repository." +msgstr "kho tham chiếu “%s” không phải là một kho nội bộ." -#: builtin/clone.c:307 +#: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" msgstr "tạo thư mục \"%s\" gặp lỗi" -#: builtin/clone.c:309 builtin/diff.c:77 +#: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" msgstr "gặp lỗi stat (lấy trạng thái về) “%s”" -#: builtin/clone.c:311 +#: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" msgstr "%s tồn tại nhưng không phải là một thư mục" -#: builtin/clone.c:325 +#: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" msgstr "lỗi stat (lấy trạng thái về) %s\n" -#: builtin/clone.c:347 +#: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" msgstr "gặp lỗi khi tạo được liên kết mềm %s" -#: builtin/clone.c:351 +#: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" msgstr "gặp lỗi khi chép tập tin tới “%s”" -#: builtin/clone.c:374 +#: builtin/clone.c:384 #, c-format msgid "done.\n" msgstr "hoàn tất.\n" -#: builtin/clone.c:387 +#: builtin/clone.c:397 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 "" "Việc nhân bản thành công, nhưng checkout gặp lỗi.\n" -"Bạn kiểm tra kỹ xem cái gì được lấy ra bằng lệnh 'git status'\n" -"và thử checkout với lệnh 'git checkout -f HEAD'\n" +"Bạn kiểm tra kỹ xem cái gì được lấy ra bằng lệnh “git status”\n" +"và thử checkout với lệnh “git checkout -f HEAD”\n" -#: builtin/clone.c:466 +#: builtin/clone.c:476 #, c-format msgid "Could not find remote branch %s to clone." msgstr "Không tìm thấy nhánh máy chủ %s để nhân bản (clone)." -#: builtin/clone.c:540 +#: builtin/clone.c:550 msgid "remote did not send all necessary objects" msgstr "máy chủ đã không gửi tất cả các đối tượng cần thiết" -#: builtin/clone.c:600 +#: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "refers HEAD máy chủ chỉ đến ref không tồn tại, không thể checkout.\n" -#: builtin/clone.c:631 +#: builtin/clone.c:641 msgid "unable to checkout working tree" msgstr "không thể lấy ra (checkout) cây làm việc" -#: builtin/clone.c:739 +#: builtin/clone.c:749 msgid "Too many arguments." msgstr "Có quá nhiều đối số." -#: builtin/clone.c:743 +#: builtin/clone.c:753 msgid "You must specify a repository to clone." msgstr "Bạn phải chỉ định một kho để mà nhân bản (clone)." -#: builtin/clone.c:754 +#: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "tùy chọn --bare và --origin %s xung khắc nhau." -#: builtin/clone.c:757 +#: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." msgstr "tùy chọn --bare và --separate-git-dir xung khắc nhau." -#: builtin/clone.c:770 +#: builtin/clone.c:780 #, c-format msgid "repository '%s' does not exist" msgstr "kho chứa “%s” chưa tồn tại" -#: builtin/clone.c:775 +#: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." msgstr "--depth bị lờ đi khi nhân bản nội bộ; hãy sử dụng file:// để thay thế." -#: builtin/clone.c:785 +#: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "đường dẫn đích “%s” đã có từ trước và không phải là một thư mục rỗng." -#: builtin/clone.c:795 +#: builtin/clone.c:805 #, c-format msgid "working tree '%s' already exists." msgstr "cây làm việc “%s” đã sẵn tồn tại rồi." -#: builtin/clone.c:808 builtin/clone.c:820 +#: builtin/clone.c:818 builtin/clone.c:830 #, c-format msgid "could not create leading directories of '%s'" msgstr "không thể tạo các thư mục dẫn đầu của “%s”" -#: builtin/clone.c:811 +#: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." msgstr "không thể tạo cây thư mục làm việc dir “%s”." -#: builtin/clone.c:830 +#: builtin/clone.c:840 #, c-format msgid "Cloning into bare repository '%s'...\n" msgstr "Đang nhân bản thành kho chứa bare “%s”...\n" -#: builtin/clone.c:832 +#: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" msgstr "Đang nhân bản thành “%s”...\n" -#: builtin/clone.c:867 +#: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" msgstr "Không biết làm cách nào để nhân bản (clone) %s" -#: builtin/clone.c:916 +#: builtin/clone.c:926 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "Nhánh máy chủ %s không tìm thấy trong thượng nguồn (upstream) %s" -#: builtin/clone.c:923 +#: builtin/clone.c:933 msgid "You appear to have cloned an empty repository." msgstr "Bạn hình như là đã nhân bản một kho trống rỗng." @@ -3690,7 +3831,7 @@ msgstr "Chuỗi thụt lề đầu dòng dị hình: “%s”" msgid "could not lookup commit %s" msgstr "không thể tìm kiếm commit (lần chuyển giao) %s" -#: builtin/commit.c:612 builtin/shortlog.c:272 +#: builtin/commit.c:612 builtin/shortlog.c:270 #, c-format msgid "(reading log message from standard input)\n" msgstr "(đang đọc thông điệp nhật ký từ đầu vào tiêu chuẩn)\n" @@ -3900,8 +4041,8 @@ msgstr "hiển thị trạng thái ở định dạng dài (mặc định)" msgid "terminate entries with NUL" msgstr "chấm dứt các mục bằng NUL" -#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:653 -#: builtin/fast-export.c:656 builtin/tag.c:459 +#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:659 +#: builtin/fast-export.c:662 builtin/tag.c:459 msgid "mode" msgstr "chế độ" @@ -4014,7 +4155,7 @@ msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "" "lần chuyển giao nhận tôi là tác giả (được dùng với tùy chọn -C/-c/--amend)" -#: builtin/commit.c:1373 builtin/log.c:1104 builtin/revert.c:109 +#: builtin/commit.c:1373 builtin/log.c:1113 builtin/revert.c:109 msgid "add Signed-off-by:" msgstr "thêm dòng Signed-off-by:" @@ -4271,8 +4412,12 @@ msgid "respect include directives on lookup" msgstr "tôn trọng kể cà các hướng trong tìm kiếm" #: builtin/count-objects.c:82 -msgid "git count-objects [-v]" -msgstr "git count-objects [-v]" +msgid "git count-objects [-v] [-H | --human-readable]" +msgstr "git count-objects [-v] [-H | --human-readable]" + +#: builtin/count-objects.c:97 +msgid "print sizes in human readable format" +msgstr "hiển thị kích cỡ theo định dạng dành cho người đọc" #: builtin/describe.c:15 msgid "git describe [options] <committish>*" @@ -4368,7 +4513,7 @@ msgstr "dùng ref bất kỳ" #: builtin/describe.c:405 msgid "use any tag, even unannotated" -msgstr "dùng thẻ bất kỳ, cả khi `unannotated'" +msgstr "dùng thẻ bất kỳ, cả khi “unannotated”" #: builtin/describe.c:406 msgid "always use long format" @@ -4448,39 +4593,39 @@ msgstr "đã cho đối tượng không thể nắm giữ “%s”." msgid "git fast-export [rev-list-opts]" msgstr "git fast-export [rev-list-opts]" -#: builtin/fast-export.c:652 +#: builtin/fast-export.c:658 msgid "show progress after <n> objects" msgstr "hiển thị tiến triển sau <n> đối tượng" -#: builtin/fast-export.c:654 +#: builtin/fast-export.c:660 msgid "select handling of signed tags" msgstr "chọn điều khiển của thẻ đã ký" -#: builtin/fast-export.c:657 +#: builtin/fast-export.c:663 msgid "select handling of tags that tag filtered objects" msgstr "chọn sự xử lý của các thẻ, cái mà đánh thẻ các đối tượng được lọc ra" -#: builtin/fast-export.c:660 +#: builtin/fast-export.c:666 msgid "Dump marks to this file" msgstr "Đổ các đánh dấu này vào tập-tin" -#: builtin/fast-export.c:662 +#: builtin/fast-export.c:668 msgid "Import marks from this file" msgstr "nhập vào đánh dấu từ tập tin này" -#: builtin/fast-export.c:664 +#: builtin/fast-export.c:670 msgid "Fake a tagger when tags lack one" msgstr "Làm giả một cái thẻ khi thẻ bị thiếu một cái" -#: builtin/fast-export.c:666 +#: builtin/fast-export.c:672 msgid "Output full tree for each commit" msgstr "Xuất ra toàn bộ cây cho mỗi lần chuyển giao" -#: builtin/fast-export.c:668 +#: builtin/fast-export.c:674 msgid "Use the done feature to terminate the stream" msgstr "Sử dụng tính năng done để chấm dứt luồng dữ liệu" -#: builtin/fast-export.c:669 +#: builtin/fast-export.c:675 msgid "Skip output of blob data" msgstr "Bỏ qua kết xuất của dữ liệu blob" @@ -4558,7 +4703,7 @@ msgstr "làm sâu hơn lịch sử của bản sao" msgid "convert to a complete repository" msgstr "chuyển đổi hoàn toàn sang kho git" -#: builtin/fetch.c:88 builtin/log.c:1121 +#: builtin/fetch.c:88 builtin/log.c:1130 msgid "dir" msgstr "tmục" @@ -4740,29 +4885,29 @@ msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" msgstr "" "git fmt-merge-msg [-m <thông điệp>] [--log[=<n>]|--no-log] [--file <tập-tin>]" -#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701 -#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175 +#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:701 +#: builtin/merge.c:188 builtin/show-branch.c:655 builtin/show-ref.c:175 #: builtin/tag.c:446 parse-options.h:133 parse-options.h:239 msgid "n" msgstr "n" -#: builtin/fmt-merge-msg.c:660 +#: builtin/fmt-merge-msg.c:664 msgid "populate log with at most <n> entries from shortlog" msgstr "gắn nhật ký với ít nhất <n> mục từ lệnh “shortlog”" -#: builtin/fmt-merge-msg.c:663 +#: builtin/fmt-merge-msg.c:667 msgid "alias for --log (deprecated)" msgstr "bí danh cho --log (không được dùng)" -#: builtin/fmt-merge-msg.c:666 +#: builtin/fmt-merge-msg.c:670 msgid "text" msgstr "văn bản" -#: builtin/fmt-merge-msg.c:667 +#: builtin/fmt-merge-msg.c:671 msgid "use <text> as start of message" msgstr "dùng <văn bản thường> để bắt đầu ghi chú" -#: builtin/fmt-merge-msg.c:668 +#: builtin/fmt-merge-msg.c:672 msgid "file to read from" msgstr "tập tin để đọc dữ liệu từ đó" @@ -5158,50 +5303,54 @@ msgstr "lưu các tập tin mà nó không có các bộ lọc" msgid "process file as it were from this path" msgstr "xử lý tập tin như là nó đang ở thư mục này" -#: builtin/help.c:42 +#: builtin/help.c:43 msgid "print all available commands" msgstr "hiển thị danh sách các câu lệnh người dùng có thể sử dụng" -#: builtin/help.c:43 +#: builtin/help.c:44 +msgid "print list of useful guides" +msgstr "hiển thị danh sách các hướng dẫn hữu dụng" + +#: builtin/help.c:45 msgid "show man page" msgstr "hiển thị trang man" -#: builtin/help.c:44 +#: builtin/help.c:46 msgid "show manual in web browser" msgstr "hiển thị hướng dẫn sử dụng trong trình duyệt web" -#: builtin/help.c:46 +#: builtin/help.c:48 msgid "show info page" msgstr "hiện trang info" -#: builtin/help.c:52 -msgid "git help [--all] [--man|--web|--info] [command]" -msgstr "git help [--all] [--man|--web|--info] [lệnh]" +#: builtin/help.c:54 +msgid "git help [--all] [--guides] [--man|--web|--info] [command]" +msgstr "git help [--all] [--guides] [--man|--web|--info] [lệnh]" -#: builtin/help.c:64 +#: builtin/help.c:66 #, c-format msgid "unrecognized help format '%s'" msgstr "không nhận ra định dạng trợ giúp “%s”" -#: builtin/help.c:92 +#: builtin/help.c:94 msgid "Failed to start emacsclient." msgstr "Lỗi khởi chạy emacsclient." -#: builtin/help.c:105 +#: builtin/help.c:107 msgid "Failed to parse emacsclient version." msgstr "Gặp lỗi khi phân tích phiên bản emacsclient." -#: builtin/help.c:113 +#: builtin/help.c:115 #, c-format msgid "emacsclient version '%d' too old (< 22)." msgstr "phiên bản của emacsclient “%d” quá cũ (< 22)." -#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176 +#: builtin/help.c:133 builtin/help.c:161 builtin/help.c:170 builtin/help.c:178 #, c-format msgid "failed to exec '%s': %s" msgstr "gặp lỗi khi thực thi “%s”: %s" -#: builtin/help.c:216 +#: builtin/help.c:218 #, c-format msgid "" "'%s': path for unsupported man viewer.\n" @@ -5210,7 +5359,7 @@ msgstr "" "“%s”: đường dẫn không hỗ trợ bộ trình chiếu man.\n" "Hãy cân nhắc đến việc sử dụng “man.<tool>.cmd” để thay thế." -#: builtin/help.c:228 +#: builtin/help.c:230 #, c-format msgid "" "'%s': cmd for supported man viewer.\n" @@ -5219,25 +5368,57 @@ msgstr "" "“%s”: cmd (lệnh) hỗ trợ bộ trình chiếu man.\n" "Hãy cân nhắc đến việc sử dụng “man.<tool>.path” để thay thế." -#: builtin/help.c:349 +#: builtin/help.c:351 #, c-format msgid "'%s': unknown man viewer." msgstr "“%s”: không rõ chương trình xem man." -#: builtin/help.c:366 +#: builtin/help.c:368 msgid "no man viewer handled the request" msgstr "không có trình xem trợ giúp dạng manpage tiếp hợp với yêu cầu" -#: builtin/help.c:374 +#: builtin/help.c:376 msgid "no info viewer handled the request" msgstr "không có trình xem trợ giúp dạng info tiếp hợp với yêu cầu" -#: builtin/help.c:429 builtin/help.c:436 +#: builtin/help.c:422 +msgid "Defining attributes per path" +msgstr "Định nghĩa các thuộc tính cho mỗi đường dẫn" + +#: builtin/help.c:423 +msgid "A Git glossary" +msgstr "Thuật ngữ chuyên môn Git" + +#: builtin/help.c:424 +msgid "Specifies intentionally untracked files to ignore" +msgstr "Chỉ định các tập tin chưa theo dõi dấu vết bị bỏ qua một cách cố ý" + +#: builtin/help.c:425 +msgid "Defining submodule properties" +msgstr "Định nghĩa thuộc tính mô-đun-con" + +#: builtin/help.c:426 +msgid "Specifying revisions and ranges for Git" +msgstr "Chỉ định điểm xét duyệt và vùng cho Git" + +#: builtin/help.c:427 +msgid "A tutorial introduction to Git (for version 1.5.1 or newer)" +msgstr "Hướng dẫn cách dùng Git ở mức cơ bản (dành cho bản 1.5.1 hay mới hơn)" + +#: builtin/help.c:428 +msgid "An overview of recommended workflows with Git" +msgstr "Tổng quan về luồng công việc khuyến nghị nên dùng với Git." + +#: builtin/help.c:440 +msgid "The common Git guides are:\n" +msgstr "Các chỉ dẫn chung về cách dùng Git là:\n" + +#: builtin/help.c:462 builtin/help.c:478 #, c-format msgid "usage: %s%s" msgstr "cách sử dụng: %s%s" -#: builtin/help.c:452 +#: builtin/help.c:494 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "“git %s” được đặt bí danh thành “%s”" @@ -5684,8 +5865,8 @@ msgid "Cannot access work tree '%s'" msgstr "không thể truy cập cây (tree) làm việc “%s”" #: builtin/log.c:40 -msgid "git log [<options>] [<since>..<until>] [[--] <path>...]\n" -msgstr "git log [<các-tùy-chọn>] [<kể-từ>..<cho-đến>] [[--] <đường-dẫn>...]\n" +msgid "git log [<options>] [<revision range>] [[--] <path>...]\n" +msgstr "git log [<các-tùy-chọn>] [<vùng xem xét>] [[--] <đường-dẫn>...]\n" #: builtin/log.c:41 msgid " or: git show [options] <object>..." @@ -5722,202 +5903,202 @@ msgstr "Không thể đọc đối tượng %s" msgid "Unknown type: %d" msgstr "Không nhận ra kiểu: %d" -#: builtin/log.c:630 +#: builtin/log.c:638 msgid "format.headers without value" msgstr "format.headers không có giá trị cụ thể" -#: builtin/log.c:704 +#: builtin/log.c:720 msgid "name of output directory is too long" msgstr "tên của thư mục kết xuất quá dài" -#: builtin/log.c:720 +#: builtin/log.c:736 #, c-format msgid "Cannot open patch file %s" msgstr "Không thể mở tập tin miếng vá: %s" -#: builtin/log.c:734 +#: builtin/log.c:750 msgid "Need exactly one range." msgstr "Cần chính xác một vùng." -#: builtin/log.c:742 +#: builtin/log.c:758 msgid "Not a range." msgstr "Không phải là một vùng." -#: builtin/log.c:815 +#: builtin/log.c:860 msgid "Cover letter needs email format" msgstr "”Cover letter” cần cho định dạng thư" -#: builtin/log.c:888 +#: builtin/log.c:936 #, c-format msgid "insane in-reply-to: %s" msgstr "in-reply-to điên rồ: %s" -#: builtin/log.c:916 +#: builtin/log.c:964 msgid "git format-patch [options] [<since> | <revision range>]" msgstr "git format-patch [các-tùy-chọn] [<kể-từ> | <vùng-xem-xét>]" -#: builtin/log.c:961 +#: builtin/log.c:1009 msgid "Two output directories?" msgstr "Hai thư mục kết xuất?" -#: builtin/log.c:1099 +#: builtin/log.c:1108 msgid "use [PATCH n/m] even with a single patch" msgstr "dùng [PATCH n/m] ngay cả với miếng vá đơn" -#: builtin/log.c:1102 +#: builtin/log.c:1111 msgid "use [PATCH] even with multiple patches" msgstr "dùng [VÁ] ngay cả với các miếng vá phức tạp" -#: builtin/log.c:1106 +#: builtin/log.c:1115 msgid "print patches to standard out" msgstr "hiển thị miếng vá ra đầu ra chuẩn" -#: builtin/log.c:1108 +#: builtin/log.c:1117 msgid "generate a cover letter" msgstr "tạo bì thư" -#: builtin/log.c:1110 +#: builtin/log.c:1119 msgid "use simple number sequence for output file names" msgstr "sử dụng chỗi dãy số dạng đơn giản cho tên tập-tin xuất ra" -#: builtin/log.c:1111 +#: builtin/log.c:1120 msgid "sfx" msgstr "sfx" -#: builtin/log.c:1112 +#: builtin/log.c:1121 msgid "use <sfx> instead of '.patch'" msgstr "sử dụng <sfx> thay cho “.patch”" -#: builtin/log.c:1114 +#: builtin/log.c:1123 msgid "start numbering patches at <n> instead of 1" msgstr "bắt đầu đánh số miếng vá từ <n> thay vì 1" -#: builtin/log.c:1116 +#: builtin/log.c:1125 msgid "mark the series as Nth re-roll" msgstr "đánh dấu chuỗi nối tiếp dạng thứ-N re-roll" -#: builtin/log.c:1118 +#: builtin/log.c:1127 msgid "Use [<prefix>] instead of [PATCH]" msgstr "Dùng [<tiền-tố>] thay cho [VÁ]" -#: builtin/log.c:1121 +#: builtin/log.c:1130 msgid "store resulting files in <dir>" msgstr "lưu các tập tin kết quả trong <t.mục>" -#: builtin/log.c:1124 +#: builtin/log.c:1133 msgid "don't strip/add [PATCH]" msgstr "không strip/add [VÁ]" -#: builtin/log.c:1127 +#: builtin/log.c:1136 msgid "don't output binary diffs" msgstr "không kết xuất diff (những khác biệt) nhị phân" -#: builtin/log.c:1129 +#: builtin/log.c:1138 msgid "don't include a patch matching a commit upstream" msgstr "không bao gồm miếng vá khớp với một lần chuyển giao thượng nguồn" -#: builtin/log.c:1131 +#: builtin/log.c:1140 msgid "show patch format instead of default (patch + stat)" msgstr "hiển thị định dạng miếng vá thay vì mặc định (miếng vá + thống kê)" -#: builtin/log.c:1133 +#: builtin/log.c:1142 msgid "Messaging" msgstr "Lời nhắn" -#: builtin/log.c:1134 +#: builtin/log.c:1143 msgid "header" msgstr "đầu đề thư" -#: builtin/log.c:1135 +#: builtin/log.c:1144 msgid "add email header" msgstr "thêm đầu đề thư" -#: builtin/log.c:1136 builtin/log.c:1138 +#: builtin/log.c:1145 builtin/log.c:1147 msgid "email" msgstr "thư điện tử" -#: builtin/log.c:1136 +#: builtin/log.c:1145 msgid "add To: header" msgstr "thêm To: đầu đề thư" -#: builtin/log.c:1138 +#: builtin/log.c:1147 msgid "add Cc: header" msgstr "thêm Cc: đầu đề thư" -#: builtin/log.c:1140 +#: builtin/log.c:1149 msgid "message-id" msgstr "message-id" -#: builtin/log.c:1141 +#: builtin/log.c:1150 msgid "make first mail a reply to <message-id>" msgstr "dùng thư đầu tiên để trả lời <message-id>" -#: builtin/log.c:1142 builtin/log.c:1145 +#: builtin/log.c:1151 builtin/log.c:1154 msgid "boundary" msgstr "ranh giới" -#: builtin/log.c:1143 +#: builtin/log.c:1152 msgid "attach the patch" msgstr "đính kèm miếng vá" -#: builtin/log.c:1146 +#: builtin/log.c:1155 msgid "inline the patch" msgstr "dùng miếng vá làm nội dung" -#: builtin/log.c:1150 +#: builtin/log.c:1159 msgid "enable message threading, styles: shallow, deep" msgstr "cho phép luồng lời nhắn, kiểu: “shallow”, “deep”" -#: builtin/log.c:1152 +#: builtin/log.c:1161 msgid "signature" msgstr "chữ ký" -#: builtin/log.c:1153 +#: builtin/log.c:1162 msgid "add a signature" msgstr "thêm chữ ký" -#: builtin/log.c:1155 +#: builtin/log.c:1164 msgid "don't print the patch filenames" msgstr "không hiển thị các tên tập tin của miếng vá" -#: builtin/log.c:1239 +#: builtin/log.c:1248 msgid "-n and -k are mutually exclusive." msgstr "-n và -k loại từ lẫn nhau." -#: builtin/log.c:1241 +#: builtin/log.c:1250 msgid "--subject-prefix and -k are mutually exclusive." msgstr "--subject-prefix và -k xung khắc nhau." -#: builtin/log.c:1249 +#: builtin/log.c:1258 msgid "--name-only does not make sense" msgstr "--name-only không hợp lý" -#: builtin/log.c:1251 +#: builtin/log.c:1260 msgid "--name-status does not make sense" msgstr "--name-status không hợp lý" -#: builtin/log.c:1253 +#: builtin/log.c:1262 msgid "--check does not make sense" msgstr "--check không hợp lý" -#: builtin/log.c:1276 +#: builtin/log.c:1285 msgid "standard output, or directory, which one?" msgstr "đầu ra chuẩn, hay thư mục, chọn cái nào?" -#: builtin/log.c:1278 +#: builtin/log.c:1287 #, c-format msgid "Could not create directory '%s'" msgstr "Không thể tạo thư mục “%s”" -#: builtin/log.c:1431 +#: builtin/log.c:1435 msgid "Failed to create output files" msgstr "Gặp lỗi khi tạo các tập tin kết xuất" -#: builtin/log.c:1480 +#: builtin/log.c:1484 msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]" msgstr "git cherry [-v] [<thượng-nguồn> [<head> [<giới-hạn>]]]" -#: builtin/log.c:1535 +#: builtin/log.c:1539 #, c-format msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" @@ -5925,103 +6106,103 @@ msgstr "" "Không tìm thấy nhánh mạng bị theo vết, hãy chỉ định <thượng-nguồn> một cách " "thủ công.\n" -#: builtin/log.c:1548 builtin/log.c:1550 builtin/log.c:1562 +#: builtin/log.c:1552 builtin/log.c:1554 builtin/log.c:1566 #, c-format msgid "Unknown commit %s" msgstr "Không hiểu lần chuyển giao (commit) %s" -#: builtin/ls-files.c:409 +#: builtin/ls-files.c:402 msgid "git ls-files [options] [<file>...]" msgstr "git ls-files [các-tùy-chọn] [<tập-tin>...]" -#: builtin/ls-files.c:466 +#: builtin/ls-files.c:459 msgid "identify the file status with tags" msgstr "nhận dạng các trạng thái tập tin với thẻ" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:461 msgid "use lowercase letters for 'assume unchanged' files" msgstr "" "dùng chữ cái viết thường cho các tập tin “assume unchanged” (giả định không " "thay đổi)" -#: builtin/ls-files.c:470 +#: builtin/ls-files.c:463 msgid "show cached files in the output (default)" msgstr "hiển thị các tập tin được nhớ tạm vào đầu ra (mặc định)" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:465 msgid "show deleted files in the output" msgstr "hiển thị các tập tin đã xóa trong kết xuất" -#: builtin/ls-files.c:474 +#: builtin/ls-files.c:467 msgid "show modified files in the output" msgstr "hiển thị các tập tin đã bị sửa đổi ra kết xuất" -#: builtin/ls-files.c:476 +#: builtin/ls-files.c:469 msgid "show other files in the output" msgstr "hiển thị các tập tin khác trong kết xuất" -#: builtin/ls-files.c:478 +#: builtin/ls-files.c:471 msgid "show ignored files in the output" msgstr "hiển thị các tập tin bị bỏ qua trong kết xuất" -#: builtin/ls-files.c:481 +#: builtin/ls-files.c:474 msgid "show staged contents' object name in the output" msgstr "hiển thị tên đối tượng của nội dung được lưu trạng thái ở kết xuất" -#: builtin/ls-files.c:483 +#: builtin/ls-files.c:476 msgid "show files on the filesystem that need to be removed" msgstr "hiển thị các tập tin trên hệ thống tập tin mà nó cần được gỡ bỏ" -#: builtin/ls-files.c:485 +#: builtin/ls-files.c:478 msgid "show 'other' directories' name only" msgstr "chỉ hiển thị tên của các thư mục “khác”" -#: builtin/ls-files.c:488 +#: builtin/ls-files.c:481 msgid "don't show empty directories" msgstr "không hiển thị thư mục rỗng" -#: builtin/ls-files.c:491 +#: builtin/ls-files.c:484 msgid "show unmerged files in the output" msgstr "hiển thị các tập tin chưa hòa trộn trong kết xuất" -#: builtin/ls-files.c:493 +#: builtin/ls-files.c:486 msgid "show resolve-undo information" msgstr "hiển thị thông tin resolve-undo" -#: builtin/ls-files.c:495 +#: builtin/ls-files.c:488 msgid "skip files matching pattern" msgstr "bỏ qua những tập tin khớp với một mẫu" -#: builtin/ls-files.c:498 +#: builtin/ls-files.c:491 msgid "exclude patterns are read from <file>" msgstr "mẫu loại trừ được đọc từ <tập tin>" -#: builtin/ls-files.c:501 +#: builtin/ls-files.c:494 msgid "read additional per-directory exclude patterns in <file>" msgstr "đọc thêm các mẫu ngoại trừ mỗi thư mục trong <tập tin>" -#: builtin/ls-files.c:503 +#: builtin/ls-files.c:496 msgid "add the standard git exclusions" msgstr "thêm loại trừ tiêu chuẩn kiểu git" -#: builtin/ls-files.c:506 +#: builtin/ls-files.c:499 msgid "make the output relative to the project top directory" msgstr "làm cho kết xuất liên quan đến thư mục ở mức cao nhất (gốc) của dự án" -#: builtin/ls-files.c:509 +#: builtin/ls-files.c:502 msgid "if any <file> is not in the index, treat this as an error" msgstr "nếu <tập tin> bất kỳ không ở trong bảng mục lục, xử lý nó như một lỗi" -#: builtin/ls-files.c:510 +#: builtin/ls-files.c:503 msgid "tree-ish" msgstr "tree-ish" -#: builtin/ls-files.c:511 +#: builtin/ls-files.c:504 msgid "pretend that paths removed since <tree-ish> are still present" msgstr "" "giả định rằng các đường dẫn đã bị gỡ bỏ kể từ <tree-ish> nay vẫn hiện diện" -#: builtin/ls-files.c:513 +#: builtin/ls-files.c:506 msgid "show debugging data" msgstr "hiển thị dữ liệu gỡ lỗi" @@ -8251,16 +8432,16 @@ msgstr "" "Chạy lệnh \"git rev-parse --parseopt -h\" để có thêm thông tin về cách dùng." #: builtin/revert.c:22 -msgid "git revert [options] <commit-ish>" -msgstr "git revert [các-tùy-chọn] <commit-ish>" +msgid "git revert [options] <commit-ish>..." +msgstr "git revert [các-tùy-chọn] <commit-ish>..." #: builtin/revert.c:23 msgid "git revert <subcommand>" msgstr "git revert <lệnh-con>" #: builtin/revert.c:28 -msgid "git cherry-pick [options] <commit-ish>" -msgstr "git cherry-pick [các-tùy-chọn] <commit-ish>" +msgid "git cherry-pick [options] <commit-ish>..." +msgstr "git cherry-pick [các-tùy-chọn] <commit-ish>..." #: builtin/revert.c:29 msgid "git cherry-pick <subcommand>" @@ -8411,31 +8592,31 @@ msgid "git rm: unable to remove %s" msgstr "git rm: không thể gỡ bỏ %s" #: builtin/shortlog.c:13 -msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" -msgstr "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" +msgstr "git shortlog [các-tùy-chọn] [<vùng-xem-xét>] [[--] [<đường-dẫn>...]]" -#: builtin/shortlog.c:133 +#: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" msgstr "Thiếu tên tác giả: %s" -#: builtin/shortlog.c:229 +#: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" msgstr "sắp xếp kết xuất tuân theo số lượng chuyển giao trên mỗi tác giả" -#: builtin/shortlog.c:231 +#: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" msgstr "Chặn mọi mô tả lần chuyển giao, chỉ đưa ra số lượng lần chuyển giao" -#: builtin/shortlog.c:233 +#: builtin/shortlog.c:231 msgid "Show the email address of each author" msgstr "Hiển thị thư điện tử cho từng tác giả" -#: builtin/shortlog.c:234 +#: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" msgstr "w[,i1[,i2]]" -#: builtin/shortlog.c:235 +#: builtin/shortlog.c:233 msgid "Linewrap output" msgstr "Ngắt dòng khi quá dài" @@ -8455,67 +8636,67 @@ msgstr "" msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" msgstr "git show-branch (-g|--reflog)[=<n>[,<nền>]] [--list] [<ref>]" -#: builtin/show-branch.c:651 +#: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" msgstr "hiển thị các nhánh remote-tracking và nội bộ" -#: builtin/show-branch.c:653 +#: builtin/show-branch.c:652 msgid "show remote-tracking branches" msgstr "hiển thị các nhánh remote-tracking" -#: builtin/show-branch.c:655 +#: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" msgstr "màu “*!+-” tương ứng với nhánh" -#: builtin/show-branch.c:657 +#: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" msgstr "hiển thị thêm <n> lần chuyển giao sau cha mẹ chung" -#: builtin/show-branch.c:659 +#: builtin/show-branch.c:658 msgid "synonym to more=-1" msgstr "đồng nghĩa với more=-1" -#: builtin/show-branch.c:660 +#: builtin/show-branch.c:659 msgid "suppress naming strings" msgstr "chặn các chuỗi đặt tên" -#: builtin/show-branch.c:662 +#: builtin/show-branch.c:661 msgid "include the current branch" msgstr "bao gồm nhánh hiện hành" -#: builtin/show-branch.c:664 +#: builtin/show-branch.c:663 msgid "name commits with their object names" msgstr "đặt tên các lần chuyển giao bằng các tên của đối tượng của chúng" -#: builtin/show-branch.c:666 +#: builtin/show-branch.c:665 msgid "show possible merge bases" msgstr "hiển thị mọi cơ sở có thể dùng để hòa trộn" -#: builtin/show-branch.c:668 +#: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" msgstr "hiển thị các tham chiếu không thể được đọc bởi bất kỳ tham chiếu khác" -#: builtin/show-branch.c:670 +#: builtin/show-branch.c:669 msgid "show commits in topological order" msgstr "hiển thị các lần chuyển giao theo thứ tự tôpô" -#: builtin/show-branch.c:672 +#: builtin/show-branch.c:671 msgid "show only commits not on the first branch" msgstr "chỉ hiển thị các lần chuyển giao không nằm trên nhánh đầu tiên" -#: builtin/show-branch.c:674 +#: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" msgstr "hiển thị các lần hòa trộn có thể đọc được chỉ từ một đầu mút" -#: builtin/show-branch.c:676 +#: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" msgstr "hiển thị các lần chuyển giao nơi mà cha mẹ đến trước con của nó" -#: builtin/show-branch.c:678 +#: builtin/show-branch.c:677 msgid "<n>[,<base>]" msgstr "<n>[,<cơ sở>]" -#: builtin/show-branch.c:679 +#: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" msgstr "hiển thị <n> các mục “ref-log” gần nhất kể từ nền (base)" @@ -8984,9 +9165,15 @@ msgid "only useful for debugging" msgstr "chỉ hữu ích khi cần gỡ lỗi" #: git.c:16 -msgid "See 'git help <command>' for more information on a specific command." +msgid "" +"'git help -a' and 'git help -g' lists available subcommands and some\n" +"concept guides. See 'git help <command>' or 'git help <concept>'\n" +"to read about a specific subcommand or concept." msgstr "" -"Chạy lệnh “git help <tên-lệnh>” để có thêm thông tin về lệnh được chỉ ra." +"“git help -a” và “git help -g” liệt kê các câu lệnh con sẵn có và một số\n" +"hướng dẫn khái niệm cơ bản. Xem “git help <lệnh>” hay “git help <khái " +"niệm>”\n" +"để đọc các đặc tả cho lệnh hay khái niệm đó." #: parse-options.h:156 msgid "no-op (backward compatibility)" @@ -9368,16 +9555,16 @@ msgstr "" "sai.\n" "(Bạn có thể sử dụng \"git bisect bad\" và \"git bisect good\" cho chúng.)" -#: git-bisect.sh:347 git-bisect.sh:474 +#: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." msgstr "Chúng tôi không bisect." -#: git-bisect.sh:354 +#: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" msgstr "”$invalid” không phải là lần chuyển giao (commit) hợp lệ" -#: git-bisect.sh:363 +#: git-bisect.sh:379 #, sh-format msgid "" "Could not check out original HEAD '$branch'.\n" @@ -9386,25 +9573,25 @@ msgstr "" "Không thể check-out HEAD nguyên thủy của “$branch”.\n" "Hãy thử “git bisect reset <lần-chuyển-giao>”." -#: git-bisect.sh:390 +#: git-bisect.sh:406 msgid "No logfile given" msgstr "Chưa chỉ ra tập tin ghi nhật ký" -#: git-bisect.sh:391 +#: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" msgstr "không thể đọc $file để thao diễn lại" -#: git-bisect.sh:408 +#: git-bisect.sh:424 msgid "?? what are you talking about?" msgstr "?? bạn đang nói gì thế?" -#: git-bisect.sh:420 +#: git-bisect.sh:436 #, sh-format msgid "running $command" msgstr "đang chạy lệnh $command" -#: git-bisect.sh:427 +#: git-bisect.sh:443 #, sh-format msgid "" "bisect run failed:\n" @@ -9413,11 +9600,11 @@ msgstr "" "chạy bisect gặp lỗi:\n" "mã trả về $res từ lệnh “$command” là < 0 hoặc >= 128" -#: git-bisect.sh:453 +#: git-bisect.sh:469 msgid "bisect run cannot continue any more" msgstr "bisect không thể tiếp tục thêm được nữa" -#: git-bisect.sh:459 +#: git-bisect.sh:475 #, sh-format msgid "" "bisect run failed:\n" @@ -9426,7 +9613,7 @@ msgstr "" "chạy bisect gặp lỗi:\n" "”bisect_state $state” đã thoát ra với mã lỗi $res" -#: git-bisect.sh:466 +#: git-bisect.sh:482 msgid "bisect run success" msgstr "bisect chạy thành công" @@ -9877,12 +10064,12 @@ msgstr "" #: git-submodule.sh:588 #, sh-format msgid "Use '.' if you really want to deinitialize all submodules" -msgstr "Dùng '.' nếu bạn thực sự muốn gỡ bỏ mọi mô-đun-con" +msgstr "Dùng “.” nếu bạn thực sự muốn gỡ bỏ mọi mô-đun-con" #: git-submodule.sh:603 #, sh-format msgid "Submodule work tree '$sm_path' contains a .git directory" -msgstr "Cây làm việc mô-đun-con '$sm_path' có chứa thư mục .git" +msgstr "Cây làm việc mô-đun-con “$sm_path” có chứa thư mục .git" #: git-submodule.sh:604 #, sh-format @@ -9898,7 +10085,7 @@ msgid "" "Submodule work tree '$sm_path' contains local modifications; use '-f' to " "discard them" msgstr "" -"Cây làm việc mô-đun-con '$sm_path' chứa các thay đổi nội bộ; hãy dùng '-f' " +"Cây làm việc mô-đun-con “$sm_path” chứa các thay đổi nội bộ; hãy dùng “-f” " "để loại bỏ chúng đi" #: git-submodule.sh:613 @@ -10034,6 +10221,23 @@ msgstr "Gặp lỗi khi đệ quy vào trong đường dẫn mô-đun-con “$sm msgid "Synchronizing submodule url for '$prefix$sm_path'" msgstr "Url Mô-đun-con đồng bộ hóa cho “$prefix$sm_path”" +#~ msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" +#~ msgstr "Cần %.2f giây để đếm các tập tin chưa được theo vết. “status -uno”" + +#~ msgid "may speed it up, but you have to be careful not to forget to add" +#~ msgstr "" +#~ "có thể làm nó nhanh lên, nhưng bạn phải cẩn trọng đừng quên thêm nó vào" + +#~ msgid "new files yourself (see 'git help status')." +#~ msgstr "tập tin mới của chính bạn (xem “git help status”.." + +#~ msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +#~ msgstr "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" + +#~ msgid "See 'git help <command>' for more information on a specific command." +#~ msgstr "" +#~ "Chạy lệnh “git help <tên-lệnh>” để có thêm thông tin về lệnh được chỉ ra." + #~ msgid "use any ref in .git/refs" #~ msgstr "sử dụng bất kỳ ref nào trong .git/refs" diff --git a/po/zh_CN.po b/po/zh_CN.po index 9a13defda5..ba757d9afd 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Git\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2013-04-10 15:16+0800\n" +"POT-Creation-Date: 2013-04-30 08:25+0800\n" "PO-Revision-Date: 2013-04-12 09:23+0800\n" "Last-Translator: Jiang Xin <worldhello.net@gmail.com>\n" "Language-Team: GitHub <https://github.com/gotgit/git/>\n" @@ -68,7 +68,7 @@ msgstr "格式" msgid "archive format" msgstr "归档格式" -#: archive.c:324 builtin/log.c:1117 +#: archive.c:324 builtin/log.c:1126 msgid "prefix" msgstr "前缀" @@ -76,10 +76,10 @@ msgstr "前缀" msgid "prepend prefix to each pathname in the archive" msgstr "为归档中每个路径名加上前缀" -#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2366 -#: builtin/blame.c:2367 builtin/config.c:55 builtin/fast-export.c:659 -#: builtin/fast-export.c:661 builtin/grep.c:715 builtin/hash-object.c:77 -#: builtin/ls-files.c:497 builtin/ls-files.c:500 builtin/notes.c:536 +#: archive.c:326 builtin/archive.c:88 builtin/blame.c:2371 +#: builtin/blame.c:2372 builtin/config.c:55 builtin/fast-export.c:665 +#: builtin/fast-export.c:667 builtin/grep.c:715 builtin/hash-object.c:77 +#: builtin/ls-files.c:490 builtin/ls-files.c:493 builtin/notes.c:536 #: builtin/notes.c:693 builtin/read-tree.c:107 parse-options.h:149 msgid "file" msgstr "文件" @@ -136,6 +136,75 @@ msgstr "" "负值模版在 git attributes 中被忽略\n" "当字符串确实要以感叹号开始时,使用 '\\!'。" +#: branch.c:60 +#, c-format +msgid "Not setting branch %s as its own upstream." +msgstr "未设置分支 %s 作为它自己的上游。" + +#: branch.c:82 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s by rebasing." +msgstr "分支 %1$s 设置为使用变基来跟踪来自 %3$s 的远程分支 %2$s。" + +#: branch.c:83 +#, c-format +msgid "Branch %s set up to track remote branch %s from %s." +msgstr "分支 %1$s 设置为跟踪来自 %3$s 的远程分支 %2$s。" + +#: branch.c:87 +#, c-format +msgid "Branch %s set up to track local branch %s by rebasing." +msgstr "分支 %s 设置为使用变基来跟踪本地分支 %s。" + +#: branch.c:88 +#, c-format +msgid "Branch %s set up to track local branch %s." +msgstr "分支 %s 设置为跟踪本地分支 %s。" + +#: branch.c:92 +#, c-format +msgid "Branch %s set up to track remote ref %s by rebasing." +msgstr "分支 %s 设置为使用变基来跟踪远程引用 %s。" + +#: branch.c:93 +#, c-format +msgid "Branch %s set up to track remote ref %s." +msgstr "分支 %s 设置为跟踪远程引用 %s。" + +#: branch.c:97 +#, c-format +msgid "Branch %s set up to track local ref %s by rebasing." +msgstr "分支 %s 设置为使用变基来跟踪本地引用 %s。" + +#: branch.c:98 +#, c-format +msgid "Branch %s set up to track local ref %s." +msgstr "分支 %s 设置为跟踪本地引用 %s。" + +#: branch.c:118 +#, c-format +msgid "Tracking not set up: name too long: %s" +msgstr "跟踪未设置:名字太长:%s" + +#: branch.c:137 +#, c-format +msgid "Not tracking: ambiguous information for ref %s" +msgstr "未跟踪:引用 %s 有歧义" + +#: branch.c:182 +#, c-format +msgid "'%s' is not a valid branch name." +msgstr "'%s' 不是一个有效的分支名称。" + +#: branch.c:187 +#, c-format +msgid "A branch named '%s' already exists." +msgstr "一个分支名 '%s' 已经存在。" + +#: branch.c:195 +msgid "Cannot force update the current branch." +msgstr "无法强制更新当前分支。" + #: branch.c:201 #, c-format msgid "Cannot setup tracking information; starting point '%s' is not a branch." @@ -164,6 +233,29 @@ msgstr "" "如果您正计划推送一个能与对应远程分支建立跟踪的新的本地分支,\n" "您可能需要使用 \"git push -u\" 推送分支并配置和上游的关联。" +#: branch.c:250 +#, c-format +msgid "Not a valid object name: '%s'." +msgstr "不是一个有效的对象名:'%s'。" + +#: branch.c:270 +#, c-format +msgid "Ambiguous object name: '%s'." +msgstr "歧义的对象名:'%s'。" + +#: branch.c:275 +#, c-format +msgid "Not a valid branch point: '%s'." +msgstr "无效的分支点:'%s'。" + +#: branch.c:281 +msgid "Failed to lock ref for update" +msgstr "无法为更新锁定引用" + +#: branch.c:299 +msgid "Failed to write ref" +msgstr "不能写引用" + #: bundle.c:36 #, c-format msgid "'%s' does not look like a v2 bundle file" @@ -183,9 +275,9 @@ msgstr "不能打开 '%s'" msgid "Repository lacks these prerequisite commits:" msgstr "版本库缺少这些必备的提交:" -#: bundle.c:164 sequencer.c:651 sequencer.c:1083 builtin/log.c:300 -#: builtin/log.c:754 builtin/log.c:1350 builtin/log.c:1566 builtin/merge.c:349 -#: builtin/shortlog.c:157 +#: bundle.c:164 sequencer.c:651 sequencer.c:1101 builtin/log.c:300 +#: builtin/log.c:770 builtin/log.c:1344 builtin/log.c:1570 builtin/merge.c:349 +#: builtin/shortlog.c:155 msgid "revision walk setup failed" msgstr "版本遍历设置失败" @@ -211,7 +303,7 @@ msgstr[1] "这个包需要 %d 个引用:" msgid "rev-list died" msgstr "rev-list 终止" -#: bundle.c:300 builtin/log.c:1246 builtin/shortlog.c:260 +#: bundle.c:300 builtin/log.c:1255 builtin/shortlog.c:258 #, c-format msgid "unrecognized argument: %s" msgstr "未能识别的参数:%s" @@ -363,7 +455,7 @@ msgstr "" "发现配置变量 'diff.dirstat' 中的错误:\n" "%s" -#: diff.c:3480 +#: diff.c:3481 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -372,7 +464,7 @@ msgstr "" "无法解析 --dirstat/-X 选项的参数:\n" "%s" -#: diff.c:3494 +#: diff.c:3495 #, c-format msgid "Failed to parse --submodule option parameter: '%s'" msgstr "无法解析 --submodule 选项的参数:'%s'" @@ -477,8 +569,8 @@ msgstr[1] "" msgid "failed to read the cache" msgstr "无法读取缓存" -#: merge.c:110 builtin/checkout.c:362 builtin/checkout.c:563 -#: builtin/clone.c:635 +#: merge.c:110 builtin/checkout.c:365 builtin/checkout.c:566 +#: builtin/clone.c:645 msgid "unable to write new index file" msgstr "无法写新的索引文件" @@ -527,7 +619,7 @@ msgstr "不能读取对象 %s '%s'" msgid "blob expected for %s '%s'" msgstr "%s '%s' 应为数据(blob)对象" -#: merge-recursive.c:773 builtin/clone.c:303 +#: merge-recursive.c:773 builtin/clone.c:313 #, c-format msgid "failed to open '%s'" msgstr "无法打开 '%s'" @@ -1049,11 +1141,21 @@ msgstr "保存拣选提交前的 HEAD 文件 '%s' 损坏" msgid "Could not format %s." msgstr "不能格式化 %s。" -#: sequencer.c:1101 +#: sequencer.c:1083 +#, c-format +msgid "%s: can't cherry-pick a %s" +msgstr "%s:不能拣选一个%s" + +#: sequencer.c:1085 +#, c-format +msgid "%s: bad revision" +msgstr "%s:错误的版本" + +#: sequencer.c:1119 msgid "Can't revert as initial commit" msgstr "不能作为初始提交还原" -#: sequencer.c:1102 +#: sequencer.c:1120 msgid "Can't cherry-pick into empty head" msgstr "不能拣选到空分支" @@ -1260,281 +1362,276 @@ msgstr "未合并: %s" msgid "bug: unhandled diff status %c" msgstr "bug:未处理的差异状态 %c" -#: wt-status.c:805 +#: wt-status.c:803 msgid "You have unmerged paths." msgstr "您有尚未合并的路径。" # 译者:注意保持前导空格 -#: wt-status.c:808 wt-status.c:960 +#: wt-status.c:806 wt-status.c:958 msgid " (fix conflicts and run \"git commit\")" msgstr " (解决冲突并运行 \"git commit\")" -#: wt-status.c:811 +#: wt-status.c:809 msgid "All conflicts fixed but you are still merging." msgstr "所有冲突已解决但您仍处于合并中。" # 译者:注意保持前导空格 -#: wt-status.c:814 +#: wt-status.c:812 msgid " (use \"git commit\" to conclude merge)" msgstr " (使用 \"git commit\" 结束合并)" -#: wt-status.c:824 +#: wt-status.c:822 msgid "You are in the middle of an am session." msgstr "您正处于一个 am 过程中。" -#: wt-status.c:827 +#: wt-status.c:825 msgid "The current patch is empty." msgstr "当前的补丁为空。" # 译者:注意保持前导空格 -#: wt-status.c:831 +#: wt-status.c:829 msgid " (fix conflicts and then run \"git am --resolved\")" msgstr " (解决冲突,然后运行 \"git am --resolved\")" # 译者:注意保持前导空格 -#: wt-status.c:833 +#: wt-status.c:831 msgid " (use \"git am --skip\" to skip this patch)" msgstr " (使用 \"git am --skip\" 跳过此补丁)" # 译者:注意保持前导空格 -#: wt-status.c:835 +#: wt-status.c:833 msgid " (use \"git am --abort\" to restore the original branch)" msgstr " (使用 \"git am --abort\" 恢复原有分支)" -#: wt-status.c:895 wt-status.c:912 +#: wt-status.c:893 wt-status.c:910 #, c-format msgid "You are currently rebasing branch '%s' on '%s'." msgstr "您正在将分支 '%s' 变基到 '%s'。" -#: wt-status.c:900 wt-status.c:917 +#: wt-status.c:898 wt-status.c:915 msgid "You are currently rebasing." msgstr "您正在变基。" # 译者:注意保持前导空格 -#: wt-status.c:903 +#: wt-status.c:901 msgid " (fix conflicts and then run \"git rebase --continue\")" msgstr " (解决冲突,然后运行 \"git rebase --continue\")" # 译者:注意保持前导空格 -#: wt-status.c:905 +#: wt-status.c:903 msgid " (use \"git rebase --skip\" to skip this patch)" msgstr " (使用 \"git rebase --skip\" 跳过此补丁)" # 译者:注意保持前导空格 -#: wt-status.c:907 +#: wt-status.c:905 msgid " (use \"git rebase --abort\" to check out the original branch)" msgstr " (使用 \"git rebase --abort\" 以检出原有分支)" # 译者:注意保持前导空格 -#: wt-status.c:920 +#: wt-status.c:918 msgid " (all conflicts fixed: run \"git rebase --continue\")" msgstr " (所有冲突已解决:运行 \"git rebase --continue\")" -#: wt-status.c:924 +#: wt-status.c:922 #, c-format msgid "" "You are currently splitting a commit while rebasing branch '%s' on '%s'." msgstr "您正在将分支 '%s' 变基到 '%s' 过程中拆分一个提交。" -#: wt-status.c:929 +#: wt-status.c:927 msgid "You are currently splitting a commit during a rebase." msgstr "您正在变基过程中拆分一个提交。" # 译者:注意保持前导空格 -#: wt-status.c:932 +#: wt-status.c:930 msgid " (Once your working directory is clean, run \"git rebase --continue\")" msgstr " (一旦您工作目录提交干净后,运行 \"git rebase --continue\")" -#: wt-status.c:936 +#: wt-status.c:934 #, c-format msgid "You are currently editing a commit while rebasing branch '%s' on '%s'." msgstr "您正在将分支 '%s' 变基到 '%s' 过程中编辑一个提交。" -#: wt-status.c:941 +#: wt-status.c:939 msgid "You are currently editing a commit during a rebase." msgstr "您正在变基过程中编辑一个提交。" # 译者:注意保持前导空格 -#: wt-status.c:944 +#: wt-status.c:942 msgid " (use \"git commit --amend\" to amend the current commit)" msgstr " (使用 \"git commit --amend\" 修补当前提交)" # 译者:注意保持前导空格 -#: wt-status.c:946 +#: wt-status.c:944 msgid "" " (use \"git rebase --continue\" once you are satisfied with your changes)" msgstr " (当您对您的修改满意后执行 \"git rebase --continue\")" -#: wt-status.c:956 +#: wt-status.c:954 msgid "You are currently cherry-picking." msgstr "您正在做拣选操作。" # 译者:注意保持前导空格 -#: wt-status.c:963 +#: wt-status.c:961 msgid " (all conflicts fixed: run \"git commit\")" msgstr " (解决所有冲突后,执行 \"git commit\")" -#: wt-status.c:972 +#: wt-status.c:970 #, c-format msgid "You are currently reverting commit %s." msgstr "您正在反转提交 %s 。" # 译者:注意保持前导空格 -#: wt-status.c:977 +#: wt-status.c:975 msgid " (fix conflicts and run \"git revert --continue\")" msgstr " (解决冲突并运行 \"git revert --continue\")" # 译者:注意保持前导空格 -#: wt-status.c:980 +#: wt-status.c:978 msgid " (all conflicts fixed: run \"git revert --continue\")" msgstr " (所有冲突已解决:运行 \"git revert --continue\")" # 译者:注意保持前导空格 -#: wt-status.c:982 +#: wt-status.c:980 msgid " (use \"git revert --abort\" to cancel the revert operation)" msgstr " (使用 \"git revert --abort\" 以取消反转提交操作)" -#: wt-status.c:993 +#: wt-status.c:991 #, c-format msgid "You are currently bisecting, started from branch '%s'." msgstr "您正在从分支 '%s' 开始做二分查找。" -#: wt-status.c:997 +#: wt-status.c:995 msgid "You are currently bisecting." msgstr "您正在做二分查找。" # 译者:注意保持前导空格 -#: wt-status.c:1000 +#: wt-status.c:998 msgid " (use \"git bisect reset\" to get back to the original branch)" msgstr " (使用 \"git bisect reset\" 以回到原有分支)" -#: wt-status.c:1175 +#: wt-status.c:1173 msgid "On branch " msgstr "位于分支 " -#: wt-status.c:1186 +#: wt-status.c:1184 msgid "HEAD detached at " msgstr "头指针分离于 " -#: wt-status.c:1188 +#: wt-status.c:1186 msgid "HEAD detached from " msgstr "头指针分离自 " -#: wt-status.c:1191 +#: wt-status.c:1189 msgid "Not currently on any branch." msgstr "当前不在任何分支上。" -#: wt-status.c:1208 +#: wt-status.c:1206 msgid "Initial commit" msgstr "初始提交" -#: wt-status.c:1222 +#: wt-status.c:1220 msgid "Untracked files" msgstr "未跟踪的文件" -#: wt-status.c:1224 +#: wt-status.c:1222 msgid "Ignored files" msgstr "忽略的文件" -# 译者:以下三条实际为一个段落 -#: wt-status.c:1228 +#: wt-status.c:1226 #, c-format -msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" -msgstr "耗费了 %.2f 秒以枚举未跟踪的文件。'status -uno'" +msgid "" +"It took %.2f seconds to enumerate untracked files. 'status -uno'\n" +"may speed it up, but you have to be careful not to forget to add\n" +"new files yourself (see 'git help status')." +msgstr "" +"耗费了 %.2f 秒以枚举未跟踪的文件。'status -uno' 也许能提高速度,\n" +"但您需要小心不要忘了添加新文件(参见 'git help status')。" -# 译者:为对齐,下面两句内容有调整 #: wt-status.c:1232 -msgid "may speed it up, but you have to be careful not to forget to add" -msgstr "也许能提高速度,但您需要小心不要忘了添加新文件" - -#: wt-status.c:1235 -msgid "new files yourself (see 'git help status')." -msgstr "(参见 'git help status')。" - -#: wt-status.c:1238 #, c-format msgid "Untracked files not listed%s" msgstr "未跟踪的文件没有列出%s" # 译者:中文字符串拼接,可删除前导空格 -#: wt-status.c:1240 +#: wt-status.c:1234 msgid " (use -u option to show untracked files)" msgstr "(使用 -u 参数显示未跟踪的文件)" -#: wt-status.c:1246 +#: wt-status.c:1240 msgid "No changes" msgstr "没有修改" -#: wt-status.c:1251 +#: wt-status.c:1245 #, c-format msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n" msgstr "修改尚未加入提交(使用 \"git add\" 和/或 \"git commit -a\")\n" -#: wt-status.c:1254 +#: wt-status.c:1248 #, c-format msgid "no changes added to commit\n" msgstr "修改尚未加入提交\n" -#: wt-status.c:1257 +#: wt-status.c:1251 #, c-format msgid "" "nothing added to commit but untracked files present (use \"git add\" to " "track)\n" msgstr "提交为空,但是存在尚未跟踪的文件(使用 \"git add\" 建立跟踪)\n" -#: wt-status.c:1260 +#: wt-status.c:1254 #, c-format msgid "nothing added to commit but untracked files present\n" msgstr "提交为空,但是存在尚未跟踪的文件\n" # 译者:中文字符串拼接,可删除前导空格 -#: wt-status.c:1263 +#: wt-status.c:1257 #, c-format msgid "nothing to commit (create/copy files and use \"git add\" to track)\n" msgstr "无文件要提交(创建/拷贝文件并使用 \"git add\" 建立跟踪)\n" -#: wt-status.c:1266 wt-status.c:1271 +#: wt-status.c:1260 wt-status.c:1265 #, c-format msgid "nothing to commit\n" msgstr "无文件要提交\n" # 译者:中文字符串拼接,可删除前导空格 -#: wt-status.c:1269 +#: wt-status.c:1263 #, c-format msgid "nothing to commit (use -u to show untracked files)\n" msgstr "无文件要提交(使用 -u 显示未跟踪的文件)\n" # 译者:中文字符串拼接,可删除前导空格 -#: wt-status.c:1273 +#: wt-status.c:1267 #, c-format msgid "nothing to commit, working directory clean\n" msgstr "无文件要提交,干净的工作区\n" -#: wt-status.c:1381 +#: wt-status.c:1375 msgid "HEAD (no branch)" msgstr "HEAD(非分支)" # 译者:注意保持句尾空格 -#: wt-status.c:1387 +#: wt-status.c:1381 msgid "Initial commit on " msgstr "初始提交于 " # 译者:注意保持句尾空格 -#: wt-status.c:1402 +#: wt-status.c:1396 msgid "behind " msgstr "落后 " # 译者:注意保持句尾空格 -#: wt-status.c:1405 wt-status.c:1408 +#: wt-status.c:1399 wt-status.c:1402 msgid "ahead " msgstr "领先 " # 译者:注意保持句尾空格 -#: wt-status.c:1410 +#: wt-status.c:1404 msgid ", behind " msgstr ",落后 " -#: compat/precompose_utf8.c:58 builtin/clone.c:342 +#: compat/precompose_utf8.c:58 builtin/clone.c:352 #, c-format msgid "failed to unlink '%s'" msgstr "无法删除 '%s'" @@ -1543,193 +1640,225 @@ msgstr "无法删除 '%s'" msgid "git add [options] [--] <pathspec>..." msgstr "git add [选项] [--] <路径匹配>..." -#: builtin/add.c:63 +# 译者:字符串首行行首要添加“warning: ”字串,故此首行要较其余行短 +#. +#. * To be consistent with "git add -p" and most Git +#. * commands, we should default to being tree-wide, but +#. * this is not the original behavior and can't be +#. * changed until users trained themselves not to type +#. * "git add -u" or "git add -A". For now, we warn and +#. * keep the old behavior. Later, the behavior can be changed +#. * to tree-wide, keeping the warning for a while, and +#. * eventually we can drop the warning. +#. +#: builtin/add.c:58 +#, c-format +msgid "" +"The behavior of 'git add %s (or %s)' with no path argument from a\n" +"subdirectory of the tree will change in Git 2.0 and should not be used " +"anymore.\n" +"To add content for the whole tree, run:\n" +"\n" +" git add %s :/\n" +" (or git add %s :/)\n" +"\n" +"To restrict the command to the current directory, run:\n" +"\n" +" git add %s .\n" +" (or git add %s .)\n" +"\n" +"With the current Git version, the command is restricted to the current " +"directory.\n" +msgstr "" +"在 Git 2.0 版本,位于一个子目录下不带任何路径参数地执行命令\n" +"'git add %s (或 %s)' 的行为将被改变,不要再继续使用了。\n" +"如果要添加整个目录树的内容,执行:\n" +"\n" +" git add %s :/\n" +" (或 git add %s :/)\n" +"\n" +"如果要限制该命令只作用于当前目录,执行:\n" +"\n" +" git add %s .\n" +" (或 git add %s .)\n" +"\n" +"对于当前版本的 Git,这条命令只作用于当前目录。\n" + +#: builtin/add.c:100 +#, c-format +msgid "" +"You ran 'git add' with neither '-A (--all)' or '--ignore-removal',\n" +"whose behaviour will change in Git 2.0 with respect to paths you removed.\n" +"Paths like '%s' that are\n" +"removed from your working tree are ignored with this version of Git.\n" +"\n" +"* 'git add --ignore-removal <pathspec>', which is the current default,\n" +" ignores paths you removed from your working tree.\n" +"\n" +"* 'git add --all <pathspec>' will let you also record the removals.\n" +"\n" +"Run 'git status' to check the paths you removed from your working tree.\n" +msgstr "" +"您在运行 'git add' 时没有指定 '-A (--all)' 或 '--ignore-removal',\n" +"针对其中本地移除路径的行为将在 Git 2.0 版本库发生变化。\n" +"像本地工作区移除的路径 '%s'\n" +"在此版本的 Git 中被忽略。\n" +"\n" +"* 'git add --ignore-removal <pathspec>',是当前版本的默认操作,\n" +" 忽略您本地工作区中移除的文件。\n" +"\n" +"* 'git add --all <pathspec>' 将让您同时对删除操作进行记录。\n" +"\n" +"运行 'git status' 来检查您本地工作区中移除的路径。\n" + +#: builtin/add.c:144 #, c-format msgid "unexpected diff status %c" msgstr "意外的差异状态 %c" -#: builtin/add.c:68 builtin/commit.c:233 +#: builtin/add.c:149 builtin/commit.c:233 msgid "updating files failed" msgstr "更新文件失败" -#: builtin/add.c:78 +#: builtin/add.c:163 #, c-format msgid "remove '%s'\n" msgstr "删除 '%s'\n" -#: builtin/add.c:148 +#: builtin/add.c:253 msgid "Unstaged changes after refreshing the index:" msgstr "刷新索引之后尚未被暂存的变更:" -#: builtin/add.c:151 builtin/add.c:460 builtin/rm.c:275 +#: builtin/add.c:256 builtin/add.c:572 builtin/rm.c:275 #, c-format msgid "pathspec '%s' did not match any files" msgstr "路径 '%s' 未匹配任何文件" -#: builtin/add.c:234 +#: builtin/add.c:339 msgid "Could not read the index" msgstr "不能读取索引" -#: builtin/add.c:244 +#: builtin/add.c:349 #, c-format msgid "Could not open '%s' for writing." msgstr "不能打开 '%s' 以写入。" -#: builtin/add.c:248 +#: builtin/add.c:353 msgid "Could not write patch" msgstr "不能生成补丁" -#: builtin/add.c:253 +#: builtin/add.c:358 #, c-format msgid "Could not stat '%s'" msgstr "不能查看文件状态 '%s'" -#: builtin/add.c:255 +#: builtin/add.c:360 msgid "Empty patch. Aborted." msgstr "空补丁。异常终止。" -#: builtin/add.c:261 +#: builtin/add.c:366 #, c-format msgid "Could not apply '%s'" msgstr "不能应用 '%s'" -#: builtin/add.c:271 +#: builtin/add.c:376 msgid "The following paths are ignored by one of your .gitignore files:\n" msgstr "下列路径根据您的一个 .gitignore 文件而被忽略:\n" -#: builtin/add.c:277 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 +#: builtin/add.c:393 builtin/clean.c:161 builtin/fetch.c:78 builtin/mv.c:63 #: builtin/prune-packed.c:76 builtin/push.c:425 builtin/remote.c:1253 #: builtin/rm.c:206 msgid "dry run" msgstr "演习" -#: builtin/add.c:278 builtin/apply.c:4409 builtin/check-ignore.c:19 +#: builtin/add.c:394 builtin/apply.c:4409 builtin/check-ignore.c:19 #: builtin/commit.c:1152 builtin/count-objects.c:95 builtin/fsck.c:613 -#: builtin/log.c:1514 builtin/mv.c:62 builtin/read-tree.c:112 +#: builtin/log.c:1518 builtin/mv.c:62 builtin/read-tree.c:112 msgid "be verbose" msgstr "冗长输出" -#: builtin/add.c:280 +#: builtin/add.c:396 msgid "interactive picking" msgstr "交互式拣选" -#: builtin/add.c:281 builtin/checkout.c:1060 builtin/reset.c:258 +#: builtin/add.c:397 builtin/checkout.c:1063 builtin/reset.c:258 msgid "select hunks interactively" msgstr "交互式挑选数据块" -#: builtin/add.c:282 +#: builtin/add.c:398 msgid "edit current diff and apply" msgstr "编辑当前差异并应用" -#: builtin/add.c:283 +#: builtin/add.c:399 msgid "allow adding otherwise ignored files" msgstr "允许添加忽略的文件" -#: builtin/add.c:284 +#: builtin/add.c:400 msgid "update tracked files" msgstr "更新已跟踪的文件" -#: builtin/add.c:285 +#: builtin/add.c:401 msgid "record only the fact that the path will be added later" msgstr "只记录,该路径稍后再添加" -#: builtin/add.c:286 +#: builtin/add.c:402 msgid "add changes from all tracked and untracked files" msgstr "添加所有改变的已跟踪文件和未跟踪文件" -#: builtin/add.c:287 +#. takes no arguments +#: builtin/add.c:405 +msgid "ignore paths removed in the working tree (same as --no-all)" +msgstr "忽略工作区中移除的路径(和 --no-all 相同)" + +#: builtin/add.c:407 msgid "don't add, only refresh the index" msgstr "不添加,只刷新索引" -#: builtin/add.c:288 +#: builtin/add.c:408 msgid "just skip files which cannot be added because of errors" msgstr "跳过因出错不能添加的文件" -#: builtin/add.c:289 +#: builtin/add.c:409 msgid "check if - even missing - files are ignored in dry run" msgstr "检查在演习模式下文件(即使不存在)是否被忽略" -#: builtin/add.c:311 +#: builtin/add.c:431 #, c-format msgid "Use -f if you really want to add them.\n" msgstr "使用 -f 参数如果您确实要添加它们。\n" -#: builtin/add.c:312 +#: builtin/add.c:432 msgid "no files added" msgstr "没有文件被添加" -#: builtin/add.c:318 +#: builtin/add.c:438 msgid "adding files failed" msgstr "添加文件失败" -# 译者:字符串首行行首要添加“warning: ”字串,故此首行要较其余行短 -#. -#. * To be consistent with "git add -p" and most Git -#. * commands, we should default to being tree-wide, but -#. * this is not the original behavior and can't be -#. * changed until users trained themselves not to type -#. * "git add -u" or "git add -A". For now, we warn and -#. * keep the old behavior. Later, the behavior can be changed -#. * to tree-wide, keeping the warning for a while, and -#. * eventually we can drop the warning. -#. -#: builtin/add.c:335 -#, c-format -msgid "" -"The behavior of 'git add %s (or %s)' with no path argument from a\n" -"subdirectory of the tree will change in Git 2.0 and should not be used " -"anymore.\n" -"To add content for the whole tree, run:\n" -"\n" -" git add %s :/\n" -" (or git add %s :/)\n" -"\n" -"To restrict the command to the current directory, run:\n" -"\n" -" git add %s .\n" -" (or git add %s .)\n" -"\n" -"With the current Git version, the command is restricted to the current " -"directory." -msgstr "" -"在 Git 2.0 版本,将不再允许在一个子目录下不带任何路径参数地执行\n" -"命令 'git add %s (或 %s)'。所以不要再继续使用了。\n" -"如果要添加整个目录树的内容,执行:\n" -"\n" -" git add %s :/\n" -" (或 git add %s :/)\n" -"\n" -"如果要限制该命令只作用于当前目录,执行:\n" -"\n" -" git add %s .\n" -" (或 git add %s .)\n" -"\n" -"对于当前版本的 Git,这条命令只作用于当前目录。" - -#: builtin/add.c:381 +#: builtin/add.c:477 msgid "-A and -u are mutually incompatible" msgstr "-A 和 -u 选项互斥" -#: builtin/add.c:383 +#: builtin/add.c:495 msgid "Option --ignore-missing can only be used together with --dry-run" msgstr "选项 --ignore-missing 只能和 --dry-run 同时使用" -#: builtin/add.c:414 +#: builtin/add.c:525 #, c-format msgid "Nothing specified, nothing added.\n" msgstr "没有指定文件,也没有文件被添加。\n" -#: builtin/add.c:415 +#: builtin/add.c:526 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" msgstr "也许您想要执行 'git add .'?\n" -#: builtin/add.c:421 builtin/check-ignore.c:67 builtin/clean.c:204 +#: builtin/add.c:532 builtin/check-ignore.c:66 builtin/clean.c:204 #: builtin/commit.c:293 builtin/mv.c:82 builtin/rm.c:235 msgid "index file corrupt" msgstr "索引文件损坏" -#: builtin/add.c:481 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 +#: builtin/add.c:604 builtin/apply.c:4505 builtin/mv.c:229 builtin/rm.c:370 msgid "Unable to write new index file" msgstr "无法写入新索引文件" @@ -1977,7 +2106,7 @@ msgstr "%s:补丁未应用" msgid "Checking patch %s..." msgstr "检查补丁 %s..." -#: builtin/apply.c:3679 builtin/checkout.c:215 builtin/reset.c:124 +#: builtin/apply.c:3679 builtin/checkout.c:216 builtin/reset.c:124 #, c-format msgid "make_cache_entry failed for path '%s'" msgstr "对路径 '%s' 的 make_cache_entry 操作失败" @@ -2118,7 +2247,7 @@ msgstr "如果一个补丁不能应用则尝试三路合并" msgid "build a temporary index based on embedded index information" msgstr "创建一个临时索引基于嵌入的索引信息" -#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:463 +#: builtin/apply.c:4388 builtin/checkout-index.c:197 builtin/ls-files.c:456 msgid "paths are separated with NUL character" msgstr "路径以 NUL 字符分隔" @@ -2252,99 +2381,99 @@ msgstr "更新 BISECT_HEAD 而非检出当前提交" msgid "git blame [options] [rev-opts] [rev] [--] file" msgstr "git blame [选项] [版本选项] [版本] [--] 文件" -#: builtin/blame.c:30 builtin/shortlog.c:15 +#: builtin/blame.c:30 msgid "[rev-opts] are documented in git-rev-list(1)" msgstr "[版本选项] 的文档记录在 git-rev-list(1) 中" -#: builtin/blame.c:2350 +#: builtin/blame.c:2355 msgid "Show blame entries as we find them, incrementally" msgstr "增量式地显示发现的 blame 条目" -#: builtin/blame.c:2351 +#: builtin/blame.c:2356 msgid "Show blank SHA-1 for boundary commits (Default: off)" msgstr "边界提交显示空的 SHA-1(默认:关闭)" -#: builtin/blame.c:2352 +#: builtin/blame.c:2357 msgid "Do not treat root commits as boundaries (Default: off)" msgstr "不把根提交作为边界(默认:关闭)" -#: builtin/blame.c:2353 +#: builtin/blame.c:2358 msgid "Show work cost statistics" msgstr "显示命令消耗统计" -#: builtin/blame.c:2354 +#: builtin/blame.c:2359 msgid "Show output score for blame entries" msgstr "显示判断 blame 条目位移的得分诊断信息" -#: builtin/blame.c:2355 +#: builtin/blame.c:2360 msgid "Show original filename (Default: auto)" msgstr "显示原始文件名(默认:自动)" -#: builtin/blame.c:2356 +#: builtin/blame.c:2361 msgid "Show original linenumber (Default: off)" msgstr "显示原始的行号(默认:关闭)" -#: builtin/blame.c:2357 +#: builtin/blame.c:2362 msgid "Show in a format designed for machine consumption" msgstr "显示为一个适合机器读取的格式" -#: builtin/blame.c:2358 +#: builtin/blame.c:2363 msgid "Show porcelain format with per-line commit information" msgstr "为每一行显示机器适用的提交信息" -#: builtin/blame.c:2359 +#: builtin/blame.c:2364 msgid "Use the same output mode as git-annotate (Default: off)" msgstr "使用和 git-annotate 相同的输出模式(默认:关闭)" -#: builtin/blame.c:2360 +#: builtin/blame.c:2365 msgid "Show raw timestamp (Default: off)" msgstr "显示原始时间戳(默认:关闭)" -#: builtin/blame.c:2361 +#: builtin/blame.c:2366 msgid "Show long commit SHA1 (Default: off)" msgstr "显示长的SHA1提交号(默认:关闭)" -#: builtin/blame.c:2362 +#: builtin/blame.c:2367 msgid "Suppress author name and timestamp (Default: off)" msgstr "隐藏作者名字和时间戳(默认:关闭)" -#: builtin/blame.c:2363 +#: builtin/blame.c:2368 msgid "Show author email instead of name (Default: off)" msgstr "显示作者的邮箱而不是名字(默认:关闭)" -#: builtin/blame.c:2364 +#: builtin/blame.c:2369 msgid "Ignore whitespace differences" msgstr "忽略空白差异" -#: builtin/blame.c:2365 +#: builtin/blame.c:2370 msgid "Spend extra cycles to find better match" msgstr "花费额外的循环来找到更好的匹配" -#: builtin/blame.c:2366 +#: builtin/blame.c:2371 msgid "Use revisions from <file> instead of calling git-rev-list" msgstr "使用来自 <file> 的修订集而不是调用 git-rev-list" -#: builtin/blame.c:2367 +#: builtin/blame.c:2372 msgid "Use <file>'s contents as the final image" msgstr "使用 <file> 的内容作为最终的图片" -#: builtin/blame.c:2368 builtin/blame.c:2369 +#: builtin/blame.c:2373 builtin/blame.c:2374 msgid "score" msgstr "得分" -#: builtin/blame.c:2368 +#: builtin/blame.c:2373 msgid "Find line copies within and across files" msgstr "找到文件内及跨文件的行拷贝" -#: builtin/blame.c:2369 +#: builtin/blame.c:2374 msgid "Find line movements within and across files" msgstr "找到文件内及跨文件的行移动" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "n,m" msgstr "n,m" -#: builtin/blame.c:2370 +#: builtin/blame.c:2375 msgid "Process only line range n,m, counting from 1" msgstr "只处理行范围在 n 和 m 之间的,从 1 开始" @@ -2365,7 +2494,7 @@ msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>" msgstr "git branch [选项] (-m | -M) [<旧分支>] <新分支>" # 译者:保持原换行格式,在输出时 %s 的替代内容会让字符串变长 -#: builtin/branch.c:146 +#: builtin/branch.c:150 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" @@ -2375,7 +2504,7 @@ msgstr "" " '%s',但未合并到 HEAD。" # 译者:保持原换行格式,在输出时 %s 的替代内容会让字符串变长 -#: builtin/branch.c:150 +#: builtin/branch.c:154 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" @@ -2384,12 +2513,12 @@ msgstr "" "并未删除分支 '%s', 虽然它已经合并到 HEAD,\n" " 然而却尚未被合并到分支 '%s' 。" -#: builtin/branch.c:164 +#: builtin/branch.c:168 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "无法查询 '%s' 指向的提交对象" -#: builtin/branch.c:168 +#: builtin/branch.c:172 #, c-format msgid "" "The branch '%s' is not fully merged.\n" @@ -2398,327 +2527,327 @@ msgstr "" "分支 '%s' 没有完全合并。\n" "如果您确认要删除它,执行 'git branch -D %s'。" -#: builtin/branch.c:181 +#: builtin/branch.c:185 msgid "Update of config-file failed" msgstr "无法更新 config 文件" -#: builtin/branch.c:209 +#: builtin/branch.c:213 msgid "cannot use -a with -d" msgstr "不能将 -a 和 -d 同时使用" -#: builtin/branch.c:215 +#: builtin/branch.c:219 msgid "Couldn't look up commit object for HEAD" msgstr "无法查询 HEAD 指向的提交对象" -#: builtin/branch.c:223 +#: builtin/branch.c:227 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "无法删除您当前所在的分支 '%s'。" -#: builtin/branch.c:236 +#: builtin/branch.c:240 #, c-format msgid "remote branch '%s' not found." msgstr "远程分支 '%s' 未发现。" -#: builtin/branch.c:237 +#: builtin/branch.c:241 #, c-format msgid "branch '%s' not found." msgstr "分支 '%s' 未发现。" -#: builtin/branch.c:251 +#: builtin/branch.c:255 #, c-format msgid "Error deleting remote branch '%s'" msgstr "删除远程分支 '%s' 时出错" -#: builtin/branch.c:252 +#: builtin/branch.c:256 #, c-format msgid "Error deleting branch '%s'" msgstr "删除分支 '%s' 时出错" -#: builtin/branch.c:259 +#: builtin/branch.c:263 #, c-format msgid "Deleted remote branch %s (was %s).\n" msgstr "已删除远程分支 %s(曾为 %s)。\n" -#: builtin/branch.c:260 +#: builtin/branch.c:264 #, c-format msgid "Deleted branch %s (was %s).\n" msgstr "已删除分支 %s(曾为 %s)。\n" -#: builtin/branch.c:362 +#: builtin/branch.c:366 #, c-format msgid "branch '%s' does not point at a commit" msgstr "分支 '%s' 未指向一个提交" -#: builtin/branch.c:434 +#: builtin/branch.c:453 #, c-format msgid "[%s: behind %d]" msgstr "[%s:落后 %d]" -#: builtin/branch.c:436 +#: builtin/branch.c:455 #, c-format msgid "[behind %d]" msgstr "[落后 %d]" -#: builtin/branch.c:440 +#: builtin/branch.c:459 #, c-format msgid "[%s: ahead %d]" msgstr "[%s:领先 %d]" -#: builtin/branch.c:442 +#: builtin/branch.c:461 #, c-format msgid "[ahead %d]" msgstr "[领先 %d]" -#: builtin/branch.c:445 +#: builtin/branch.c:464 #, c-format msgid "[%s: ahead %d, behind %d]" msgstr "[%s:领先 %d,落后 %d]" -#: builtin/branch.c:448 +#: builtin/branch.c:467 #, c-format msgid "[ahead %d, behind %d]" msgstr "[领先 %d,落后 %d]" -#: builtin/branch.c:470 +#: builtin/branch.c:490 msgid " **** invalid ref ****" msgstr " **** 无效引用 ****" -#: builtin/branch.c:562 +#: builtin/branch.c:582 #, c-format msgid "(no branch, rebasing %s)" msgstr "(非分支,正变基 %s)" -#: builtin/branch.c:565 +#: builtin/branch.c:585 #, c-format msgid "(no branch, bisect started on %s)" msgstr "(非分支,二分查找开始于 %s)" -#: builtin/branch.c:568 +#: builtin/branch.c:588 #, c-format msgid "(detached from %s)" msgstr "(分离自 %s)" -#: builtin/branch.c:571 +#: builtin/branch.c:591 msgid "(no branch)" msgstr "(非分支)" -#: builtin/branch.c:617 +#: builtin/branch.c:637 #, c-format msgid "object '%s' does not point to a commit" msgstr "对象 '%s' 没有指向一个提交" -#: builtin/branch.c:649 +#: builtin/branch.c:669 msgid "some refs could not be read" msgstr "一些引用不能读取" -#: builtin/branch.c:662 +#: builtin/branch.c:682 msgid "cannot rename the current branch while not on any." msgstr "无法重命名当前分支因为不处于任何分支上。" -#: builtin/branch.c:672 +#: builtin/branch.c:692 #, c-format msgid "Invalid branch name: '%s'" msgstr "无效的分支名:'%s'" -#: builtin/branch.c:687 +#: builtin/branch.c:707 msgid "Branch rename failed" msgstr "分支重命名失败" -#: builtin/branch.c:691 +#: builtin/branch.c:711 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "重命名掉一个错误命名的旧分支 '%s'" -#: builtin/branch.c:695 +#: builtin/branch.c:715 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "分支重命名为 %s,但 HEAD 没有更新!" -#: builtin/branch.c:702 +#: builtin/branch.c:722 msgid "Branch is renamed, but update of config-file failed" msgstr "分支被重命名,但更新 config 文件失败" -#: builtin/branch.c:717 +#: builtin/branch.c:737 #, c-format msgid "malformed object name %s" msgstr "非法的对象名 %s" -#: builtin/branch.c:741 +#: builtin/branch.c:761 #, c-format msgid "could not write branch description template: %s" msgstr "不能写分支描述模版:%s" -#: builtin/branch.c:771 +#: builtin/branch.c:791 msgid "Generic options" msgstr "通用选项" -#: builtin/branch.c:773 +#: builtin/branch.c:793 msgid "show hash and subject, give twice for upstream branch" msgstr "显示哈希值和主题,若参数出现两次则显示上游分支" -#: builtin/branch.c:774 +#: builtin/branch.c:794 msgid "suppress informational messages" msgstr "不显示信息" -#: builtin/branch.c:775 +#: builtin/branch.c:795 msgid "set up tracking mode (see git-pull(1))" msgstr "设置跟踪模式(参见 git-pull(1))" -#: builtin/branch.c:777 +#: builtin/branch.c:797 msgid "change upstream info" msgstr "改变上游信息" -#: builtin/branch.c:781 +#: builtin/branch.c:801 msgid "use colored output" msgstr "使用彩色输出" -#: builtin/branch.c:782 +#: builtin/branch.c:802 msgid "act on remote-tracking branches" msgstr "作用于远程跟踪分支" -#: builtin/branch.c:785 builtin/branch.c:791 builtin/branch.c:812 -#: builtin/branch.c:818 builtin/commit.c:1368 builtin/commit.c:1369 +#: builtin/branch.c:805 builtin/branch.c:811 builtin/branch.c:832 +#: builtin/branch.c:838 builtin/commit.c:1368 builtin/commit.c:1369 #: builtin/commit.c:1370 builtin/commit.c:1371 builtin/tag.c:468 msgid "commit" msgstr "提交" -#: builtin/branch.c:786 builtin/branch.c:792 +#: builtin/branch.c:806 builtin/branch.c:812 msgid "print only branches that contain the commit" msgstr "只打印包含该提交的分支" -#: builtin/branch.c:798 +#: builtin/branch.c:818 msgid "Specific git-branch actions:" msgstr "具体的 git-branch 动作:" -#: builtin/branch.c:799 +#: builtin/branch.c:819 msgid "list both remote-tracking and local branches" msgstr "列出远程跟踪及本地分支" -#: builtin/branch.c:801 +#: builtin/branch.c:821 msgid "delete fully merged branch" msgstr "删除完全合并的分支" -#: builtin/branch.c:802 +#: builtin/branch.c:822 msgid "delete branch (even if not merged)" msgstr "删除分支(即使没有合并)" -#: builtin/branch.c:803 +#: builtin/branch.c:823 msgid "move/rename a branch and its reflog" msgstr "移动/重命名一个分支,以及它的引用日志" -#: builtin/branch.c:804 +#: builtin/branch.c:824 msgid "move/rename a branch, even if target exists" msgstr "移动/重命名一个分支,即使目标已存在" -#: builtin/branch.c:805 +#: builtin/branch.c:825 msgid "list branch names" msgstr "列出分支名" -#: builtin/branch.c:806 +#: builtin/branch.c:826 msgid "create the branch's reflog" msgstr "创建分支的引用日志" -#: builtin/branch.c:808 +#: builtin/branch.c:828 msgid "edit the description for the branch" msgstr "标记分支的描述" -#: builtin/branch.c:809 +#: builtin/branch.c:829 msgid "force creation (when already exists)" msgstr "强制创建(当已经存在)" -#: builtin/branch.c:812 +#: builtin/branch.c:832 msgid "print only not merged branches" msgstr "只打印没有合并的分支" -#: builtin/branch.c:818 +#: builtin/branch.c:838 msgid "print only merged branches" msgstr "只打印合并的分支" -#: builtin/branch.c:822 +#: builtin/branch.c:842 msgid "list branches in columns" msgstr "以列的方式显示分支" -#: builtin/branch.c:835 +#: builtin/branch.c:855 msgid "Failed to resolve HEAD as a valid ref." msgstr "无法将 HEAD 解析为有效引用。" -#: builtin/branch.c:840 builtin/clone.c:609 +#: builtin/branch.c:860 builtin/clone.c:619 msgid "HEAD not found below refs/heads!" msgstr "HEAD 没有位于 /refs/heads 之下!" -#: builtin/branch.c:863 +#: builtin/branch.c:883 msgid "--column and --verbose are incompatible" msgstr "--column 和 --verbose 不兼容" -#: builtin/branch.c:869 builtin/branch.c:908 +#: builtin/branch.c:889 builtin/branch.c:928 msgid "branch name required" msgstr "必须提供分支名" -#: builtin/branch.c:884 +#: builtin/branch.c:904 msgid "Cannot give description to detached HEAD" msgstr "不能向分离头指针提供描述" -#: builtin/branch.c:889 +#: builtin/branch.c:909 msgid "cannot edit description of more than one branch" msgstr "不能为一个以上的分支编辑描述" -#: builtin/branch.c:896 +#: builtin/branch.c:916 #, c-format msgid "No commit on branch '%s' yet." msgstr "分支 '%s' 尚无提交。" -#: builtin/branch.c:899 +#: builtin/branch.c:919 #, c-format msgid "No branch named '%s'." msgstr "没有分支 '%s'。" -#: builtin/branch.c:914 +#: builtin/branch.c:934 msgid "too many branches for a rename operation" msgstr "为重命名操作提供了太多的分支名" -#: builtin/branch.c:919 +#: builtin/branch.c:939 msgid "too many branches to set new upstream" msgstr "为设置新上游提供了太多的分支名" -#: builtin/branch.c:923 +#: builtin/branch.c:943 #, c-format msgid "" "could not set upstream of HEAD to %s when it does not point to any branch." msgstr "无法设置 HEAD 的上游为 %s,因为 HEAD 没有指向任何分支。" -#: builtin/branch.c:926 builtin/branch.c:948 builtin/branch.c:970 +#: builtin/branch.c:946 builtin/branch.c:968 builtin/branch.c:990 #, c-format msgid "no such branch '%s'" msgstr "没有此分支 '%s'" -#: builtin/branch.c:930 +#: builtin/branch.c:950 #, c-format msgid "branch '%s' does not exist" msgstr "分支 '%s' 不存在" -#: builtin/branch.c:942 +#: builtin/branch.c:962 msgid "too many branches to unset upstream" msgstr "为取消上游设置操作提供了太多的分支名" -#: builtin/branch.c:946 +#: builtin/branch.c:966 msgid "could not unset upstream of HEAD when it does not point to any branch." msgstr "无法取消 HEAD 的上游设置因为它没有指向一个分支" -#: builtin/branch.c:952 +#: builtin/branch.c:972 #, c-format msgid "Branch '%s' has no upstream information" msgstr "分支 '%s' 没有上游信息" -#: builtin/branch.c:967 +#: builtin/branch.c:987 msgid "it does not make sense to create 'HEAD' manually" msgstr "手工创建 'HEAD' 没有意义" -#: builtin/branch.c:973 +#: builtin/branch.c:993 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "'git branch' 的 -a 和 -r 选项带一个分支名参数没有意义" -#: builtin/branch.c:976 +#: builtin/branch.c:996 #, c-format msgid "" "The --set-upstream flag is deprecated and will be removed. Consider using --" @@ -2726,7 +2855,7 @@ msgid "" msgstr "" "选项 --set-upstream 已弃用并将被移除。考虑使用 --track 或 --set-upstream-to\n" -#: builtin/branch.c:993 +#: builtin/branch.c:1013 #, c-format msgid "" "\n" @@ -2737,12 +2866,12 @@ msgstr "" "如果你想用 '%s' 跟踪 '%s', 这么做:\n" "\n" -#: builtin/branch.c:994 +#: builtin/branch.c:1014 #, c-format msgid " git branch -d %s\n" msgstr " git branch -d %s\n" -#: builtin/branch.c:995 +#: builtin/branch.c:1015 #, c-format msgid " git branch --set-upstream-to %s\n" msgstr " git branch --set-upstream-to %s\n" @@ -2760,43 +2889,43 @@ msgstr "需要一个版本库来创建包。" msgid "Need a repository to unbundle." msgstr "需要一个版本库来解包。" -#: builtin/cat-file.c:247 +#: builtin/cat-file.c:176 msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>" msgstr "git cat-file (-t|-s|-e|-p|<类型>|--textconv) <对象>" -#: builtin/cat-file.c:248 +#: builtin/cat-file.c:177 msgid "git cat-file (--batch|--batch-check) < <list_of_objects>" msgstr "git cat-file (--batch|--batch-check) < <对象列表>" -#: builtin/cat-file.c:266 +#: builtin/cat-file.c:195 msgid "<type> can be one of: blob, tree, commit, tag" msgstr "<类型> 可以是其中之一:blob、tree、commit、tag" -#: builtin/cat-file.c:267 +#: builtin/cat-file.c:196 msgid "show object type" msgstr "显示对象类型" -#: builtin/cat-file.c:268 +#: builtin/cat-file.c:197 msgid "show object size" msgstr "显示对象大小" -#: builtin/cat-file.c:270 +#: builtin/cat-file.c:199 msgid "exit with zero when there's no error" msgstr "当没有错误时退出并返回零" -#: builtin/cat-file.c:271 +#: builtin/cat-file.c:200 msgid "pretty-print object's content" msgstr "美观地打印对象的内容" -#: builtin/cat-file.c:273 +#: builtin/cat-file.c:202 msgid "for blob objects, run textconv on object's content" msgstr "对于数据(blob)对象,对其内容执行 textconv" -#: builtin/cat-file.c:275 +#: builtin/cat-file.c:204 msgid "show info and content of objects fed from the standard input" msgstr "显示从标准输入提供的对象的信息和内容" -#: builtin/cat-file.c:278 +#: builtin/cat-file.c:207 msgid "show info about objects fed from the standard input" msgstr "显示从标准输入提供的对象的信息" @@ -2824,27 +2953,27 @@ msgstr "从标准输入读出文件名" msgid "input paths are terminated by a null character" msgstr "输入路径以null字符终止" -#: builtin/check-ignore.c:18 builtin/checkout.c:1041 builtin/gc.c:177 +#: builtin/check-ignore.c:18 builtin/checkout.c:1044 builtin/gc.c:177 msgid "suppress progress reporting" msgstr "不显示进度报告" -#: builtin/check-ignore.c:151 +#: builtin/check-ignore.c:146 msgid "cannot specify pathnames with --stdin" msgstr "不能同时提供路径及 --stdin 参数" -#: builtin/check-ignore.c:154 +#: builtin/check-ignore.c:149 msgid "-z only makes sense with --stdin" msgstr "-z 需要和 --stdin 参数共用才有意义" -#: builtin/check-ignore.c:156 +#: builtin/check-ignore.c:151 msgid "no path specified" msgstr "未指定路径" -#: builtin/check-ignore.c:160 +#: builtin/check-ignore.c:155 msgid "--quiet is only valid with a single pathname" msgstr "参数 --quiet 只在提供一个路径名时有效" -#: builtin/check-ignore.c:162 +#: builtin/check-ignore.c:157 msgid "cannot have both --quiet and --verbose" msgstr "不能同时提供 --quiet 和 --verbose 参数" @@ -2900,107 +3029,107 @@ msgstr "git checkout [选项] <分支>" msgid "git checkout [options] [<branch>] -- <file>..." msgstr "git checkout [选项] [<分支>] -- <文件>..." -#: builtin/checkout.c:116 builtin/checkout.c:149 +#: builtin/checkout.c:117 builtin/checkout.c:150 #, c-format msgid "path '%s' does not have our version" msgstr "路径 '%s' 没有我们的版本" -#: builtin/checkout.c:118 builtin/checkout.c:151 +#: builtin/checkout.c:119 builtin/checkout.c:152 #, c-format msgid "path '%s' does not have their version" msgstr "路径 '%s' 没有他们的版本" -#: builtin/checkout.c:134 +#: builtin/checkout.c:135 #, c-format msgid "path '%s' does not have all necessary versions" msgstr "路径 '%s' 没有全部必须的版本" -#: builtin/checkout.c:178 +#: builtin/checkout.c:179 #, c-format msgid "path '%s' does not have necessary versions" msgstr "路径 '%s' 没有必须的版本" -#: builtin/checkout.c:195 +#: builtin/checkout.c:196 #, c-format msgid "path '%s': cannot merge" msgstr "path '%s':无法合并" -#: builtin/checkout.c:212 +#: builtin/checkout.c:213 #, c-format msgid "Unable to add merge result for '%s'" msgstr "无法为 '%s' 添加合并结果" -#: builtin/checkout.c:236 builtin/checkout.c:239 builtin/checkout.c:242 -#: builtin/checkout.c:245 +#: builtin/checkout.c:237 builtin/checkout.c:240 builtin/checkout.c:243 +#: builtin/checkout.c:246 #, c-format msgid "'%s' cannot be used with updating paths" msgstr "'%s' 不能在更新路径时使用" -#: builtin/checkout.c:248 builtin/checkout.c:251 +#: builtin/checkout.c:249 builtin/checkout.c:252 #, c-format msgid "'%s' cannot be used with %s" msgstr "'%s' 不能和 %s 同时使用" -#: builtin/checkout.c:254 +#: builtin/checkout.c:255 #, c-format msgid "Cannot update paths and switch to branch '%s' at the same time." msgstr "不能同时更新路径并切换到分支'%s'。" -#: builtin/checkout.c:265 builtin/checkout.c:455 +#: builtin/checkout.c:266 builtin/checkout.c:458 msgid "corrupt index file" msgstr "损坏的索引文件" -#: builtin/checkout.c:326 builtin/checkout.c:333 +#: builtin/checkout.c:329 builtin/checkout.c:336 #, c-format msgid "path '%s' is unmerged" msgstr "路径 '%s' 未合并" -#: builtin/checkout.c:477 +#: builtin/checkout.c:480 msgid "you need to resolve your current index first" msgstr "您需要先解决当前索引的冲突" -#: builtin/checkout.c:598 +#: builtin/checkout.c:601 #, c-format msgid "Can not do reflog for '%s'\n" msgstr "不能对 '%s' 执行 reflog 操作\n" -#: builtin/checkout.c:631 +#: builtin/checkout.c:634 msgid "HEAD is now at" msgstr "HEAD 目前位于" -#: builtin/checkout.c:638 +#: builtin/checkout.c:641 #, c-format msgid "Reset branch '%s'\n" msgstr "重置分支 '%s'\n" -#: builtin/checkout.c:641 +#: builtin/checkout.c:644 #, c-format msgid "Already on '%s'\n" msgstr "已经位于 '%s'\n" -#: builtin/checkout.c:645 +#: builtin/checkout.c:648 #, c-format msgid "Switched to and reset branch '%s'\n" msgstr "切换并重置分支 '%s'\n" -#: builtin/checkout.c:647 builtin/checkout.c:984 +#: builtin/checkout.c:650 builtin/checkout.c:987 #, c-format msgid "Switched to a new branch '%s'\n" msgstr "切换到一个新分支 '%s'\n" -#: builtin/checkout.c:649 +#: builtin/checkout.c:652 #, c-format msgid "Switched to branch '%s'\n" msgstr "切换到分支 '%s'\n" # 译者:注意保持前导空格 -#: builtin/checkout.c:705 +#: builtin/checkout.c:708 #, c-format msgid " ... and %d more.\n" msgstr " ... 及其它 %d 个。\n" #. The singular version -#: builtin/checkout.c:711 +#: builtin/checkout.c:714 #, c-format msgid "" "Warning: you are leaving %d commit behind, not connected to\n" @@ -3021,7 +3150,7 @@ msgstr[1] "" "\n" "%s\n" -#: builtin/checkout.c:729 +#: builtin/checkout.c:732 #, c-format msgid "" "If you want to keep them by creating a new branch, this may be a good time\n" @@ -3036,132 +3165,136 @@ msgstr "" " git branch new_branch_name %s\n" "\n" -#: builtin/checkout.c:759 +#: builtin/checkout.c:762 msgid "internal error in revision walk" msgstr "在版本遍历时遇到内部错误" -#: builtin/checkout.c:763 +#: builtin/checkout.c:766 msgid "Previous HEAD position was" msgstr "之前的 HEAD 位置是" -#: builtin/checkout.c:790 builtin/checkout.c:979 +#: builtin/checkout.c:793 builtin/checkout.c:982 msgid "You are on a branch yet to be born" msgstr "您位于一个尚未初始化的分支" #. case (1) -#: builtin/checkout.c:915 +#: builtin/checkout.c:918 #, c-format msgid "invalid reference: %s" msgstr "无效引用:%s" #. case (1): want a tree -#: builtin/checkout.c:954 +#: builtin/checkout.c:957 #, c-format msgid "reference is not a tree: %s" msgstr "引用不是一个树:%s" -#: builtin/checkout.c:993 +#: builtin/checkout.c:996 msgid "paths cannot be used with switching branches" msgstr "路径不能和切换分支同时使用" -#: builtin/checkout.c:996 builtin/checkout.c:1000 +#: builtin/checkout.c:999 builtin/checkout.c:1003 #, c-format msgid "'%s' cannot be used with switching branches" msgstr "'%s' 不能和切换分支同时使用" -#: builtin/checkout.c:1004 builtin/checkout.c:1007 builtin/checkout.c:1012 -#: builtin/checkout.c:1015 +#: builtin/checkout.c:1007 builtin/checkout.c:1010 builtin/checkout.c:1015 +#: builtin/checkout.c:1018 #, c-format msgid "'%s' cannot be used with '%s'" msgstr "'%s' 不能和 '%s' 同时使用" -#: builtin/checkout.c:1020 +#: builtin/checkout.c:1023 #, c-format msgid "Cannot switch branch to a non-commit '%s'" msgstr "不能切换分支到一个非提交 '%s'" -#: builtin/checkout.c:1042 builtin/checkout.c:1044 builtin/clone.c:90 +#: builtin/checkout.c:1045 builtin/checkout.c:1047 builtin/clone.c:90 #: builtin/remote.c:169 builtin/remote.c:171 msgid "branch" msgstr "分支" -#: builtin/checkout.c:1043 +#: builtin/checkout.c:1046 msgid "create and checkout a new branch" msgstr "创建并检出一个新的分支" -#: builtin/checkout.c:1045 +#: builtin/checkout.c:1048 msgid "create/reset and checkout a branch" msgstr "创建/重置并检出一个分支" -#: builtin/checkout.c:1046 +#: builtin/checkout.c:1049 msgid "create reflog for new branch" msgstr "为新的分支创建引用日志" -#: builtin/checkout.c:1047 +#: builtin/checkout.c:1050 msgid "detach the HEAD at named commit" msgstr "成为指向该提交的分离头指针" -#: builtin/checkout.c:1048 +#: builtin/checkout.c:1051 msgid "set upstream info for new branch" msgstr "为新的分支设置上游信息" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new branch" msgstr "新分支" -#: builtin/checkout.c:1050 +#: builtin/checkout.c:1053 msgid "new unparented branch" msgstr "新的没有父提交的分支" -#: builtin/checkout.c:1051 +#: builtin/checkout.c:1054 msgid "checkout our version for unmerged files" msgstr "对尚未合并的文件检出我们的版本" -#: builtin/checkout.c:1053 +#: builtin/checkout.c:1056 msgid "checkout their version for unmerged files" msgstr "对尚未合并的文件检出他们的版本" -#: builtin/checkout.c:1055 +#: builtin/checkout.c:1058 msgid "force checkout (throw away local modifications)" msgstr "强制检出(丢弃本地修改)" -#: builtin/checkout.c:1056 +#: builtin/checkout.c:1059 msgid "perform a 3-way merge with the new branch" msgstr "和新的分支执行三路合并" -#: builtin/checkout.c:1057 builtin/merge.c:217 +#: builtin/checkout.c:1060 builtin/merge.c:217 msgid "update ignored files (default)" msgstr "更新忽略的文件(默认)" -#: builtin/checkout.c:1058 builtin/log.c:1149 parse-options.h:245 +#: builtin/checkout.c:1061 builtin/log.c:1158 parse-options.h:245 msgid "style" msgstr "风格" -#: builtin/checkout.c:1059 +#: builtin/checkout.c:1062 msgid "conflict style (merge or diff3)" msgstr "冲突输出风格(merge 或 diff3)" -#: builtin/checkout.c:1062 +#: builtin/checkout.c:1065 +msgid "do not limit pathspecs to sparse entries only" +msgstr "对路径不做稀疏检出的限制" + +#: builtin/checkout.c:1067 msgid "second guess 'git checkout no-such-branch'" msgstr "再者猜测'git checkout no-such-branch'" -#: builtin/checkout.c:1086 +#: builtin/checkout.c:1091 msgid "-b, -B and --orphan are mutually exclusive" msgstr "-b、-B 和 --orphan 是互斥的" -#: builtin/checkout.c:1103 +#: builtin/checkout.c:1108 msgid "--track needs a branch name" msgstr "--track 需要一个分支名" -#: builtin/checkout.c:1110 +#: builtin/checkout.c:1115 msgid "Missing branch name; try -b" msgstr "缺少分支名;尝试 -b" -#: builtin/checkout.c:1145 +#: builtin/checkout.c:1150 msgid "invalid path specification" msgstr "无效的路径规格" -#: builtin/checkout.c:1152 +#: builtin/checkout.c:1157 #, c-format msgid "" "Cannot update paths and switch to branch '%s' at the same time.\n" @@ -3170,12 +3303,12 @@ msgstr "" "不能同时更新路径并切换到分支'%s'。\n" "您是想要检出 '%s' 但其未能解析为提交么?" -#: builtin/checkout.c:1157 +#: builtin/checkout.c:1162 #, c-format msgid "git checkout: --detach does not take a path argument '%s'" msgstr "git checkout:--detach 不能接收路径参数 '%s'" -#: builtin/checkout.c:1161 +#: builtin/checkout.c:1166 msgid "" "git checkout: --ours/--theirs, --force and --merge are incompatible when\n" "checking out of the index." @@ -3224,7 +3357,7 @@ msgid "remove whole directories" msgstr "删除整个目录" #: builtin/clean.c:165 builtin/describe.c:412 builtin/grep.c:717 -#: builtin/ls-files.c:494 builtin/name-rev.c:231 builtin/show-ref.c:182 +#: builtin/ls-files.c:487 builtin/name-rev.c:231 builtin/show-ref.c:182 msgid "pattern" msgstr "模式" @@ -3350,47 +3483,47 @@ msgstr "key=value" msgid "set config inside the new repository" msgstr "在新版本库中设置配置信息" -#: builtin/clone.c:244 +#: builtin/clone.c:254 #, c-format -msgid "reference repository '%s' is not a local directory." -msgstr "引用版本库 '%s' 不是一个本地目录。" +msgid "reference repository '%s' is not a local repository." +msgstr "引用版本库 '%s' 不是一个本地版本库。" -#: builtin/clone.c:307 +#: builtin/clone.c:317 #, c-format msgid "failed to create directory '%s'" msgstr "无法创建目录 '%s'" -#: builtin/clone.c:309 builtin/diff.c:77 +#: builtin/clone.c:319 builtin/diff.c:77 #, c-format msgid "failed to stat '%s'" msgstr "无法枚举 '%s' 状态" -#: builtin/clone.c:311 +#: builtin/clone.c:321 #, c-format msgid "%s exists and is not a directory" msgstr "%s 存在且不是一个目录" -#: builtin/clone.c:325 +#: builtin/clone.c:335 #, c-format msgid "failed to stat %s\n" msgstr "无法枚举 %s 状态\n" -#: builtin/clone.c:347 +#: builtin/clone.c:357 #, c-format msgid "failed to create link '%s'" msgstr "无法创建链接 '%s'" -#: builtin/clone.c:351 +#: builtin/clone.c:361 #, c-format msgid "failed to copy file to '%s'" msgstr "无法拷贝文件至 '%s'" -#: builtin/clone.c:374 +#: builtin/clone.c:384 #, c-format msgid "done.\n" msgstr "完成。\n" -#: builtin/clone.c:387 +#: builtin/clone.c:397 msgid "" "Clone succeeded, but checkout failed.\n" "You can inspect what was checked out with 'git status'\n" @@ -3400,90 +3533,90 @@ msgstr "" "您可以通过 'git status' 检查哪些已被检出,然后使用命令\n" "'git checkout -f HEAD' 重试\n" -#: builtin/clone.c:466 +#: builtin/clone.c:476 #, c-format msgid "Could not find remote branch %s to clone." msgstr "不能发现要克隆的远程分支 %s。" -#: builtin/clone.c:540 +#: builtin/clone.c:550 msgid "remote did not send all necessary objects" msgstr "远程没有发送所有必须的对象" -#: builtin/clone.c:600 +#: builtin/clone.c:610 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "远程 HEAD 指向一个不存在的引用,无法检出。\n" -#: builtin/clone.c:631 +#: builtin/clone.c:641 msgid "unable to checkout working tree" msgstr "不能检出工作区" -#: builtin/clone.c:739 +#: builtin/clone.c:749 msgid "Too many arguments." msgstr "太多参数。" -#: builtin/clone.c:743 +#: builtin/clone.c:753 msgid "You must specify a repository to clone." msgstr "您必须指定一个版本库来克隆。" -#: builtin/clone.c:754 +#: builtin/clone.c:764 #, c-format msgid "--bare and --origin %s options are incompatible." msgstr "--bare 和 --origin %s 选项不兼容。" -#: builtin/clone.c:757 +#: builtin/clone.c:767 msgid "--bare and --separate-git-dir are incompatible." msgstr "--bare 和 --separate-git-dir 选项不兼容。" -#: builtin/clone.c:770 +#: builtin/clone.c:780 #, c-format msgid "repository '%s' does not exist" msgstr "版本库 '%s' 不存在" -#: builtin/clone.c:775 +#: builtin/clone.c:785 msgid "--depth is ignored in local clones; use file:// instead." msgstr "--depth 在本地克隆被忽略,改为 file:// 协议试试。" -#: builtin/clone.c:785 +#: builtin/clone.c:795 #, c-format msgid "destination path '%s' already exists and is not an empty directory." msgstr "目标路径 '%s' 已经存在,并且不是一个空目录。" -#: builtin/clone.c:795 +#: builtin/clone.c:805 #, c-format msgid "working tree '%s' already exists." msgstr "工作区 '%s' 已经存在。" -#: builtin/clone.c:808 builtin/clone.c:820 +#: builtin/clone.c:818 builtin/clone.c:830 #, c-format msgid "could not create leading directories of '%s'" msgstr "不能为 '%s' 创建先导目录" -#: builtin/clone.c:811 +#: builtin/clone.c:821 #, c-format msgid "could not create work tree dir '%s'." msgstr "不能为 '%s' 创建工作区目录。" -#: builtin/clone.c:830 +#: builtin/clone.c:840 #, c-format msgid "Cloning into bare repository '%s'...\n" msgstr "克隆到裸版本库 '%s'...\n" -#: builtin/clone.c:832 +#: builtin/clone.c:842 #, c-format msgid "Cloning into '%s'...\n" msgstr "正克隆到 '%s'...\n" -#: builtin/clone.c:867 +#: builtin/clone.c:877 #, c-format msgid "Don't know how to clone %s" msgstr "不知道如何克隆 %s" -#: builtin/clone.c:916 +#: builtin/clone.c:926 #, c-format msgid "Remote branch %s not found in upstream %s" msgstr "远程分支 %s 在上游 %s 未发现" -#: builtin/clone.c:923 +#: builtin/clone.c:933 msgid "You appear to have cloned an empty repository." msgstr "您似乎克隆了一个空版本库。" @@ -3626,7 +3759,7 @@ msgstr "非法的身份字符串:'%s'" msgid "could not lookup commit %s" msgstr "不能查询提交 %s" -#: builtin/commit.c:612 builtin/shortlog.c:272 +#: builtin/commit.c:612 builtin/shortlog.c:270 #, c-format msgid "(reading log message from standard input)\n" msgstr "(正从标准输入中读取日志信息)\n" @@ -3824,8 +3957,8 @@ msgstr "以长格式显示状态(默认)" msgid "terminate entries with NUL" msgstr "条目以NUL字符结尾" -#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:653 -#: builtin/fast-export.c:656 builtin/tag.c:459 +#: builtin/commit.c:1166 builtin/commit.c:1402 builtin/fast-export.c:659 +#: builtin/fast-export.c:662 builtin/tag.c:459 msgid "mode" msgstr "模式" @@ -3930,7 +4063,7 @@ msgstr "使用 autosquash 格式的提交说明用以压缩至指定的提交" msgid "the commit is authored by me now (used with -C/-c/--amend)" msgstr "现在将该提交的作者改为我(和 -C/-c/--amend 参数共用)" -#: builtin/commit.c:1373 builtin/log.c:1104 builtin/revert.c:109 +#: builtin/commit.c:1373 builtin/log.c:1113 builtin/revert.c:109 msgid "add Signed-off-by:" msgstr "添加 Signed-off-by: 签名" @@ -4183,8 +4316,12 @@ msgid "respect include directives on lookup" msgstr "查询时参照 include 指令递归查找" #: builtin/count-objects.c:82 -msgid "git count-objects [-v]" -msgstr "git count-objects [-v]" +msgid "git count-objects [-v] [-H | --human-readable]" +msgstr "git count-objects [-v] [-H | --human-readable]" + +#: builtin/count-objects.c:97 +msgid "print sizes in human readable format" +msgstr "以用户可读的格式显示大小" #: builtin/describe.c:15 msgid "git describe [options] <committish>*" @@ -4360,39 +4497,39 @@ msgstr "提供了无法处理的对象 '%s'。" msgid "git fast-export [rev-list-opts]" msgstr "git fast-export [rev-list-opts]" -#: builtin/fast-export.c:652 +#: builtin/fast-export.c:658 msgid "show progress after <n> objects" msgstr "在 <n> 个对象之后显示进度" -#: builtin/fast-export.c:654 +#: builtin/fast-export.c:660 msgid "select handling of signed tags" msgstr "选择如何处理签名 tags" -#: builtin/fast-export.c:657 +#: builtin/fast-export.c:663 msgid "select handling of tags that tag filtered objects" msgstr "选择当 tag 指向被过滤时 tags 的处理方式" -#: builtin/fast-export.c:660 +#: builtin/fast-export.c:666 msgid "Dump marks to this file" msgstr "把标记存储到这个文件" -#: builtin/fast-export.c:662 +#: builtin/fast-export.c:668 msgid "Import marks from this file" msgstr "从这个文件导入标记" -#: builtin/fast-export.c:664 +#: builtin/fast-export.c:670 msgid "Fake a tagger when tags lack one" msgstr "当 tags 缺少标记者字段时,假装提供一个" -#: builtin/fast-export.c:666 +#: builtin/fast-export.c:672 msgid "Output full tree for each commit" msgstr "每次提交都输出整个树" -#: builtin/fast-export.c:668 +#: builtin/fast-export.c:674 msgid "Use the done feature to terminate the stream" msgstr "使用 done 功能来终止流" -#: builtin/fast-export.c:669 +#: builtin/fast-export.c:675 msgid "Skip output of blob data" msgstr "跳过数据对象的输出" @@ -4469,7 +4606,7 @@ msgstr "深化浅克隆的历史" msgid "convert to a complete repository" msgstr "转换为一个完整的版本库" -#: builtin/fetch.c:88 builtin/log.c:1121 +#: builtin/fetch.c:88 builtin/log.c:1130 msgid "dir" msgstr "目录" @@ -4650,29 +4787,29 @@ msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" msgstr "" "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]" -#: builtin/fmt-merge-msg.c:659 builtin/fmt-merge-msg.c:662 builtin/grep.c:701 -#: builtin/merge.c:188 builtin/show-branch.c:656 builtin/show-ref.c:175 +#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:701 +#: builtin/merge.c:188 builtin/show-branch.c:655 builtin/show-ref.c:175 #: builtin/tag.c:446 parse-options.h:133 parse-options.h:239 msgid "n" msgstr "n" -#: builtin/fmt-merge-msg.c:660 +#: builtin/fmt-merge-msg.c:664 msgid "populate log with at most <n> entries from shortlog" msgstr "向提交说明中最多复制指定条目(合并而来的提交)的简短说明" -#: builtin/fmt-merge-msg.c:663 +#: builtin/fmt-merge-msg.c:667 msgid "alias for --log (deprecated)" msgstr "参数 --log 的别名(已弃用)" -#: builtin/fmt-merge-msg.c:666 +#: builtin/fmt-merge-msg.c:670 msgid "text" msgstr "文本" -#: builtin/fmt-merge-msg.c:667 +#: builtin/fmt-merge-msg.c:671 msgid "use <text> as start of message" msgstr "使用 <文本> 作为提交说明的开始" -#: builtin/fmt-merge-msg.c:668 +#: builtin/fmt-merge-msg.c:672 msgid "file to read from" msgstr "从文件中读取" @@ -5063,50 +5200,54 @@ msgstr "原样存储文件不使用过滤器" msgid "process file as it were from this path" msgstr "处理文件并假设其来自于此路径" -#: builtin/help.c:42 +#: builtin/help.c:43 msgid "print all available commands" msgstr "打印所有可用的命令" -#: builtin/help.c:43 +#: builtin/help.c:44 +msgid "print list of useful guides" +msgstr "显示有用的指南列表" + +#: builtin/help.c:45 msgid "show man page" msgstr "显示 man 手册" -#: builtin/help.c:44 +#: builtin/help.c:46 msgid "show manual in web browser" msgstr "在 web 浏览器中显示手册" -#: builtin/help.c:46 +#: builtin/help.c:48 msgid "show info page" msgstr "显示 info 手册" -#: builtin/help.c:52 -msgid "git help [--all] [--man|--web|--info] [command]" -msgstr "git help [--all] [--man|--web|--info] [命令]" +#: builtin/help.c:54 +msgid "git help [--all] [--guides] [--man|--web|--info] [command]" +msgstr "git help [--all] [--guides] [--man|--web|--info] [命令]" -#: builtin/help.c:64 +#: builtin/help.c:66 #, c-format msgid "unrecognized help format '%s'" msgstr "未能识别的帮助格式 '%s'" -#: builtin/help.c:92 +#: builtin/help.c:94 msgid "Failed to start emacsclient." msgstr "无法启动 emacsclient。" -#: builtin/help.c:105 +#: builtin/help.c:107 msgid "Failed to parse emacsclient version." msgstr "无法解析 emacsclient 版本。" -#: builtin/help.c:113 +#: builtin/help.c:115 #, c-format msgid "emacsclient version '%d' too old (< 22)." msgstr "emacsclient 版本 '%d' 太老(< 22)。" -#: builtin/help.c:131 builtin/help.c:159 builtin/help.c:168 builtin/help.c:176 +#: builtin/help.c:133 builtin/help.c:161 builtin/help.c:170 builtin/help.c:178 #, c-format msgid "failed to exec '%s': %s" msgstr "无法执行 '%s':%s" -#: builtin/help.c:216 +#: builtin/help.c:218 #, c-format msgid "" "'%s': path for unsupported man viewer.\n" @@ -5115,7 +5256,7 @@ msgstr "" "'%s':不支持的 man 手册查看器的路径。\n" "请使用 'man.<tool>.cmd'。" -#: builtin/help.c:228 +#: builtin/help.c:230 #, c-format msgid "" "'%s': cmd for supported man viewer.\n" @@ -5124,25 +5265,57 @@ msgstr "" "'%s': 支持的 man 手册查看器命令。\n" "请使用 'man.<tool>.path'。" -#: builtin/help.c:349 +#: builtin/help.c:351 #, c-format msgid "'%s': unknown man viewer." msgstr "'%s':未知的 man 查看器。" -#: builtin/help.c:366 +#: builtin/help.c:368 msgid "no man viewer handled the request" msgstr "没有 man 查看器处理此请求" -#: builtin/help.c:374 +#: builtin/help.c:376 msgid "no info viewer handled the request" msgstr "没有 info 查看器处理此请求" -#: builtin/help.c:429 builtin/help.c:436 +#: builtin/help.c:422 +msgid "Defining attributes per path" +msgstr "定义路径的属性" + +#: builtin/help.c:423 +msgid "A Git glossary" +msgstr "Git 词汇表" + +#: builtin/help.c:424 +msgid "Specifies intentionally untracked files to ignore" +msgstr "忽略指定的未跟踪文件" + +#: builtin/help.c:425 +msgid "Defining submodule properties" +msgstr "定义子模组属性" + +#: builtin/help.c:426 +msgid "Specifying revisions and ranges for Git" +msgstr "指定 Git 的版本和版本范围" + +#: builtin/help.c:427 +msgid "A tutorial introduction to Git (for version 1.5.1 or newer)" +msgstr "一个 Git 教程(针对 1.5.1 或更新版本)" + +#: builtin/help.c:428 +msgid "An overview of recommended workflows with Git" +msgstr "Git 推荐的工作流概览" + +#: builtin/help.c:440 +msgid "The common Git guides are:\n" +msgstr "最常用的 Git 向导有:\n" + +#: builtin/help.c:462 builtin/help.c:478 #, c-format msgid "usage: %s%s" msgstr "用法:%s%s" -#: builtin/help.c:452 +#: builtin/help.c:494 #, c-format msgid "`git %s' is aliased to `%s'" msgstr "`git %s' 是 `%s' 的别名" @@ -5590,8 +5763,8 @@ msgid "Cannot access work tree '%s'" msgstr "不能访问工作区 '%s'" #: builtin/log.c:40 -msgid "git log [<options>] [<since>..<until>] [[--] <path>...]\n" -msgstr "git log [<选项>] [<从>..<到>] [[--] <路径>...]\n" +msgid "git log [<options>] [<revision range>] [[--] <path>...]\n" +msgstr "git log [<选项>] [<版本范围>] [[--] <路径>...]\n" #: builtin/log.c:41 msgid " or: git show [options] <object>..." @@ -5628,301 +5801,301 @@ msgstr "不能读取对象 %s" msgid "Unknown type: %d" msgstr "未知类型:%d" -#: builtin/log.c:630 +#: builtin/log.c:638 msgid "format.headers without value" msgstr "format.headers 没有值" -#: builtin/log.c:704 +#: builtin/log.c:720 msgid "name of output directory is too long" msgstr "输出目录名太长" -#: builtin/log.c:720 +#: builtin/log.c:736 #, c-format msgid "Cannot open patch file %s" msgstr "无法打开补丁文件 %s" -#: builtin/log.c:734 +#: builtin/log.c:750 msgid "Need exactly one range." msgstr "只需要一个范围。" -#: builtin/log.c:742 +#: builtin/log.c:758 msgid "Not a range." msgstr "不是一个范围。" -#: builtin/log.c:815 +#: builtin/log.c:860 msgid "Cover letter needs email format" msgstr "信封需要邮件地址格式" -#: builtin/log.c:888 +#: builtin/log.c:936 #, c-format msgid "insane in-reply-to: %s" msgstr "不正常的 in-reply-to:%s" -#: builtin/log.c:916 +#: builtin/log.c:964 msgid "git format-patch [options] [<since> | <revision range>]" msgstr "git format-patch [选项] [<从> | <修订集范围>]" -#: builtin/log.c:961 +#: builtin/log.c:1009 msgid "Two output directories?" msgstr "两个输出目录?" -#: builtin/log.c:1099 +#: builtin/log.c:1108 msgid "use [PATCH n/m] even with a single patch" msgstr "使用 [PATCH n/m],即使只有一个补丁" -#: builtin/log.c:1102 +#: builtin/log.c:1111 msgid "use [PATCH] even with multiple patches" msgstr "使用 [PATCH],即使有多个补丁" -#: builtin/log.c:1106 +#: builtin/log.c:1115 msgid "print patches to standard out" msgstr "打印补丁到标准输出" -#: builtin/log.c:1108 +#: builtin/log.c:1117 msgid "generate a cover letter" msgstr "生成一封附信" -#: builtin/log.c:1110 +#: builtin/log.c:1119 msgid "use simple number sequence for output file names" msgstr "使用简单的数字序列作为输出文件名" -#: builtin/log.c:1111 +#: builtin/log.c:1120 msgid "sfx" msgstr "后缀" -#: builtin/log.c:1112 +#: builtin/log.c:1121 msgid "use <sfx> instead of '.patch'" msgstr "使用 <后缀> 代替 '.patch'" -#: builtin/log.c:1114 +#: builtin/log.c:1123 msgid "start numbering patches at <n> instead of 1" msgstr "补丁以 <n> 开始编号,而不是1" -#: builtin/log.c:1116 +#: builtin/log.c:1125 msgid "mark the series as Nth re-roll" msgstr "标记补丁系列是第几次重制" -#: builtin/log.c:1118 +#: builtin/log.c:1127 msgid "Use [<prefix>] instead of [PATCH]" msgstr "使用 [<前缀>] 代替 [PATCH]" -#: builtin/log.c:1121 +#: builtin/log.c:1130 msgid "store resulting files in <dir>" msgstr "把结果文件存储在 <dir>" -#: builtin/log.c:1124 +#: builtin/log.c:1133 msgid "don't strip/add [PATCH]" msgstr "不删除/添加 [PATCH]" -#: builtin/log.c:1127 +#: builtin/log.c:1136 msgid "don't output binary diffs" msgstr "不输出二进制差异" -#: builtin/log.c:1129 +#: builtin/log.c:1138 msgid "don't include a patch matching a commit upstream" msgstr "不包含已在上游提交中的补丁" -#: builtin/log.c:1131 +#: builtin/log.c:1140 msgid "show patch format instead of default (patch + stat)" msgstr "显示纯补丁格式而非默认的(补丁+状态)" -#: builtin/log.c:1133 +#: builtin/log.c:1142 msgid "Messaging" msgstr "邮件发送" -#: builtin/log.c:1134 +#: builtin/log.c:1143 msgid "header" msgstr "header" -#: builtin/log.c:1135 +#: builtin/log.c:1144 msgid "add email header" msgstr "添加邮件头" -#: builtin/log.c:1136 builtin/log.c:1138 +#: builtin/log.c:1145 builtin/log.c:1147 msgid "email" msgstr "邮件地址" -#: builtin/log.c:1136 +#: builtin/log.c:1145 msgid "add To: header" msgstr "添加收件人" -#: builtin/log.c:1138 +#: builtin/log.c:1147 msgid "add Cc: header" msgstr "添加抄送" -#: builtin/log.c:1140 +#: builtin/log.c:1149 msgid "message-id" msgstr "message-id" -#: builtin/log.c:1141 +#: builtin/log.c:1150 msgid "make first mail a reply to <message-id>" msgstr "使第一封邮件作为对 <message-id> 的回复" -#: builtin/log.c:1142 builtin/log.c:1145 +#: builtin/log.c:1151 builtin/log.c:1154 msgid "boundary" msgstr "边界" -#: builtin/log.c:1143 +#: builtin/log.c:1152 msgid "attach the patch" msgstr "附件方式添加补丁" -#: builtin/log.c:1146 +#: builtin/log.c:1155 msgid "inline the patch" msgstr "内联显示补丁" -#: builtin/log.c:1150 +#: builtin/log.c:1159 msgid "enable message threading, styles: shallow, deep" msgstr "启用邮件线索,风格:浅,深" -#: builtin/log.c:1152 +#: builtin/log.c:1161 msgid "signature" msgstr "签名" -#: builtin/log.c:1153 +#: builtin/log.c:1162 msgid "add a signature" msgstr "添加一个签名" -#: builtin/log.c:1155 +#: builtin/log.c:1164 msgid "don't print the patch filenames" msgstr "不要打印补丁文件名" -#: builtin/log.c:1239 +#: builtin/log.c:1248 msgid "-n and -k are mutually exclusive." msgstr "-n 和 -k 互斥。" -#: builtin/log.c:1241 +#: builtin/log.c:1250 msgid "--subject-prefix and -k are mutually exclusive." msgstr "--subject-prefix 和 -k 互斥。" -#: builtin/log.c:1249 +#: builtin/log.c:1258 msgid "--name-only does not make sense" msgstr "--name-only 无意义" -#: builtin/log.c:1251 +#: builtin/log.c:1260 msgid "--name-status does not make sense" msgstr "--name-status 无意义" -#: builtin/log.c:1253 +#: builtin/log.c:1262 msgid "--check does not make sense" msgstr "--check 无意义" -#: builtin/log.c:1276 +#: builtin/log.c:1285 msgid "standard output, or directory, which one?" msgstr "标准输出或目录,哪一个?" -#: builtin/log.c:1278 +#: builtin/log.c:1287 #, c-format msgid "Could not create directory '%s'" msgstr "不能创建目录 '%s'" -#: builtin/log.c:1431 +#: builtin/log.c:1435 msgid "Failed to create output files" msgstr "无法创建输出文件" -#: builtin/log.c:1480 +#: builtin/log.c:1484 msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]" msgstr "git cherry [-v] [<上游> [<头> [<限制>]]]" -#: builtin/log.c:1535 +#: builtin/log.c:1539 #, c-format msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" msgstr "不能找到跟踪的远程分支,请手工指定 <upstream>。\n" -#: builtin/log.c:1548 builtin/log.c:1550 builtin/log.c:1562 +#: builtin/log.c:1552 builtin/log.c:1554 builtin/log.c:1566 #, c-format msgid "Unknown commit %s" msgstr "未知提交 %s" -#: builtin/ls-files.c:409 +#: builtin/ls-files.c:402 msgid "git ls-files [options] [<file>...]" msgstr "git ls-files [选项] [<文件>...]" -#: builtin/ls-files.c:466 +#: builtin/ls-files.c:459 msgid "identify the file status with tags" msgstr "用标签标识文件的状态" -#: builtin/ls-files.c:468 +#: builtin/ls-files.c:461 msgid "use lowercase letters for 'assume unchanged' files" msgstr "使用小写字母表示 '假设未改变的' 文件" -#: builtin/ls-files.c:470 +#: builtin/ls-files.c:463 msgid "show cached files in the output (default)" msgstr "显示缓存的文件(默认)" -#: builtin/ls-files.c:472 +#: builtin/ls-files.c:465 msgid "show deleted files in the output" msgstr "显示已删除的文件" -#: builtin/ls-files.c:474 +#: builtin/ls-files.c:467 msgid "show modified files in the output" msgstr "显示已修改的文件" -#: builtin/ls-files.c:476 +#: builtin/ls-files.c:469 msgid "show other files in the output" msgstr "显示其它文件" -#: builtin/ls-files.c:478 +#: builtin/ls-files.c:471 msgid "show ignored files in the output" msgstr "显示忽略的文件" -#: builtin/ls-files.c:481 +#: builtin/ls-files.c:474 msgid "show staged contents' object name in the output" msgstr "显示暂存区内容的对象名称" -#: builtin/ls-files.c:483 +#: builtin/ls-files.c:476 msgid "show files on the filesystem that need to be removed" msgstr "显示文件系统需要删除的文件" -#: builtin/ls-files.c:485 +#: builtin/ls-files.c:478 msgid "show 'other' directories' name only" msgstr "只显示“其他”目录的名称" -#: builtin/ls-files.c:488 +#: builtin/ls-files.c:481 msgid "don't show empty directories" msgstr "不显示空目录" -#: builtin/ls-files.c:491 +#: builtin/ls-files.c:484 msgid "show unmerged files in the output" msgstr "显示未合并的文件" -#: builtin/ls-files.c:493 +#: builtin/ls-files.c:486 msgid "show resolve-undo information" msgstr "显示 resolve-undo 信息" -#: builtin/ls-files.c:495 +#: builtin/ls-files.c:488 msgid "skip files matching pattern" msgstr "匹配排除文件的模式" -#: builtin/ls-files.c:498 +#: builtin/ls-files.c:491 msgid "exclude patterns are read from <file>" msgstr "从 <文件> 中读取排除模式" -#: builtin/ls-files.c:501 +#: builtin/ls-files.c:494 msgid "read additional per-directory exclude patterns in <file>" msgstr "从 <文件> 读取额外的每个目录的排除模式" -#: builtin/ls-files.c:503 +#: builtin/ls-files.c:496 msgid "add the standard git exclusions" msgstr "添加标准的 git 排除" -#: builtin/ls-files.c:506 +#: builtin/ls-files.c:499 msgid "make the output relative to the project top directory" msgstr "显示相对于顶级目录的文件名" -#: builtin/ls-files.c:509 +#: builtin/ls-files.c:502 msgid "if any <file> is not in the index, treat this as an error" msgstr "如果任何 <文件> 都不在索引区,视为错误" -#: builtin/ls-files.c:510 +#: builtin/ls-files.c:503 msgid "tree-ish" msgstr "树或提交" -#: builtin/ls-files.c:511 +#: builtin/ls-files.c:504 msgid "pretend that paths removed since <tree-ish> are still present" msgstr "假装自从 <树或提交> 之后删除的路径仍然存在" -#: builtin/ls-files.c:513 +#: builtin/ls-files.c:506 msgid "show debugging data" msgstr "显示调试数据" @@ -8084,16 +8257,16 @@ msgstr "" "初次使用时执行 \"git rev-parse --parseopt -h\" 来获得更多信息。" #: builtin/revert.c:22 -msgid "git revert [options] <commit-ish>" -msgstr "git revert [选项] <提交号>" +msgid "git revert [options] <commit-ish>..." +msgstr "git revert [选项] <提交号>..." #: builtin/revert.c:23 msgid "git revert <subcommand>" msgstr "git revert <子命令>" #: builtin/revert.c:28 -msgid "git cherry-pick [options] <commit-ish>" -msgstr "git cherry-pick [选项] <提交号>" +msgid "git cherry-pick [options] <commit-ish>..." +msgstr "git cherry-pick [选项] <提交号>..." #: builtin/revert.c:29 msgid "git cherry-pick <subcommand>" @@ -8243,31 +8416,31 @@ msgid "git rm: unable to remove %s" msgstr "git rm:不能删除 %s" #: builtin/shortlog.c:13 -msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" -msgstr "git shortlog [-n] [-s] [-e] [-w] [版本选项] [--] [<提交号>... ]" +msgid "git shortlog [<options>] [<revision range>] [[--] [<path>...]]" +msgstr "git shortlog [<选项>] [<版本范围>] [[--] [<路径>...]]" -#: builtin/shortlog.c:133 +#: builtin/shortlog.c:131 #, c-format msgid "Missing author: %s" msgstr "缺少作者:%s" -#: builtin/shortlog.c:229 +#: builtin/shortlog.c:227 msgid "sort output according to the number of commits per author" msgstr "根据每个作者的提交数量排序" -#: builtin/shortlog.c:231 +#: builtin/shortlog.c:229 msgid "Suppress commit descriptions, only provides commit count" msgstr "隐藏提交说明,只提供提交数量" -#: builtin/shortlog.c:233 +#: builtin/shortlog.c:231 msgid "Show the email address of each author" msgstr "显示每个作者的电子邮件地址" -#: builtin/shortlog.c:234 +#: builtin/shortlog.c:232 msgid "w[,i1[,i2]]" msgstr "w[,i1[,i2]]" -#: builtin/shortlog.c:235 +#: builtin/shortlog.c:233 msgid "Linewrap output" msgstr "折行输出" @@ -8287,67 +8460,67 @@ msgstr "" msgid "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" msgstr "git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]" -#: builtin/show-branch.c:651 +#: builtin/show-branch.c:650 msgid "show remote-tracking and local branches" msgstr "显示远程跟踪的和本地的分支" -#: builtin/show-branch.c:653 +#: builtin/show-branch.c:652 msgid "show remote-tracking branches" msgstr "显示远程跟踪的分支" -#: builtin/show-branch.c:655 +#: builtin/show-branch.c:654 msgid "color '*!+-' corresponding to the branch" msgstr "着色 '*!+-' 到相应的分支" -#: builtin/show-branch.c:657 +#: builtin/show-branch.c:656 msgid "show <n> more commits after the common ancestor" msgstr "显示共同祖先后的 <n> 个提交" -#: builtin/show-branch.c:659 +#: builtin/show-branch.c:658 msgid "synonym to more=-1" msgstr "和 more=-1 同义" -#: builtin/show-branch.c:660 +#: builtin/show-branch.c:659 msgid "suppress naming strings" msgstr "不显示字符串命名" -#: builtin/show-branch.c:662 +#: builtin/show-branch.c:661 msgid "include the current branch" msgstr "包括当前分支" -#: builtin/show-branch.c:664 +#: builtin/show-branch.c:663 msgid "name commits with their object names" msgstr "以对象名字命名提交" -#: builtin/show-branch.c:666 +#: builtin/show-branch.c:665 msgid "show possible merge bases" msgstr "显示可能合并的基线" -#: builtin/show-branch.c:668 +#: builtin/show-branch.c:667 msgid "show refs unreachable from any other ref" msgstr "显示没有任何引用的的引用" -#: builtin/show-branch.c:670 +#: builtin/show-branch.c:669 msgid "show commits in topological order" msgstr "以拓扑顺序显示提交" -#: builtin/show-branch.c:672 +#: builtin/show-branch.c:671 msgid "show only commits not on the first branch" msgstr "只显示不在第一个分支上的提交" -#: builtin/show-branch.c:674 +#: builtin/show-branch.c:673 msgid "show merges reachable from only one tip" msgstr "显示仅一个分支可访问的合并提交" -#: builtin/show-branch.c:676 +#: builtin/show-branch.c:675 msgid "show commits where no parent comes before its children" msgstr "显示提交时以时间为序且父提交不能领先子提交" -#: builtin/show-branch.c:678 +#: builtin/show-branch.c:677 msgid "<n>[,<base>]" msgstr "<n>[,<base>]" -#: builtin/show-branch.c:679 +#: builtin/show-branch.c:678 msgid "show <n> most recent ref-log entries starting at base" msgstr "显示从 base 开始的 <n> 条最近的引用日志记录" @@ -8804,8 +8977,13 @@ msgid "only useful for debugging" msgstr "只对调试有用" #: git.c:16 -msgid "See 'git help <command>' for more information on a specific command." -msgstr "参见 'git help <command>' 以获得该特定命令的详细信息。" +msgid "" +"'git help -a' and 'git help -g' lists available subcommands and some\n" +"concept guides. See 'git help <command>' or 'git help <concept>'\n" +"to read about a specific subcommand or concept." +msgstr "" +"命令 'git help -a' 和 'git help -g' 显示可用的子命令和一些指南。参见\n" +"'git help <命令>' 或 'git help <指南>' 来查看给定的子命令帮助或指南。" #: parse-options.h:156 msgid "no-op (backward compatibility)" @@ -9164,16 +9342,16 @@ msgstr "" "然后需要提供我至少一个好版本和一个坏版本。\n" "(您可以用 \"git bisect bad\" 和 \"git bisect good\" 命令来标识。)" -#: git-bisect.sh:347 git-bisect.sh:474 +#: git-bisect.sh:363 git-bisect.sh:490 msgid "We are not bisecting." msgstr "我们没有在二分查找。" -#: git-bisect.sh:354 +#: git-bisect.sh:370 #, sh-format msgid "'$invalid' is not a valid commit" msgstr "'$invalid' 不是一个有效的提交" -#: git-bisect.sh:363 +#: git-bisect.sh:379 #, sh-format msgid "" "Could not check out original HEAD '$branch'.\n" @@ -9182,25 +9360,25 @@ msgstr "" "不能检出原始 HEAD '$branch'。\n" "尝试 'git bisect reset <提交>'。" -#: git-bisect.sh:390 +#: git-bisect.sh:406 msgid "No logfile given" msgstr "未提供日志文件" -#: git-bisect.sh:391 +#: git-bisect.sh:407 #, sh-format msgid "cannot read $file for replaying" msgstr "不能读取 $file 来重放" -#: git-bisect.sh:408 +#: git-bisect.sh:424 msgid "?? what are you talking about?" msgstr "?? 您在说什么?" -#: git-bisect.sh:420 +#: git-bisect.sh:436 #, sh-format msgid "running $command" msgstr "运行 $command" -#: git-bisect.sh:427 +#: git-bisect.sh:443 #, sh-format msgid "" "bisect run failed:\n" @@ -9209,11 +9387,11 @@ msgstr "" "二分查找运行失败:\n" "命令 '$command' 的退出码 $res 小于 0 或大于等于 128" -#: git-bisect.sh:453 +#: git-bisect.sh:469 msgid "bisect run cannot continue any more" msgstr "二分查找不能继续运行" -#: git-bisect.sh:459 +#: git-bisect.sh:475 #, sh-format msgid "" "bisect run failed:\n" @@ -9222,7 +9400,7 @@ msgstr "" "二分查找运行失败:\n" "'bisect_state $state' 退出码为 $res" -#: git-bisect.sh:466 +#: git-bisect.sh:482 msgid "bisect run success" msgstr "二分查找运行成功" @@ -9793,6 +9971,26 @@ msgstr "无法递归进子模组路径 '$sm_path'" msgid "Synchronizing submodule url for '$prefix$sm_path'" msgstr "为 '$prefix$sm_path' 同步子模组 url" +#~ msgid "git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [<commit-id>... ]" +#~ msgstr "git shortlog [-n] [-s] [-e] [-w] [版本选项] [--] [<提交号>... ]" + +#~ msgid "See 'git help <command>' for more information on a specific command." +#~ msgstr "参见 'git help <command>' 以获得该特定命令的详细信息。" + +#~ msgid "BUG: impossible combination of %d and %p" +#~ msgstr "BUG: 无法组合 %d 和 %p" + +# 译者:以下三条实际为一个段落 +#~ msgid "It took %.2f seconds to enumerate untracked files. 'status -uno'" +#~ msgstr "耗费了 %.2f 秒以枚举未跟踪的文件。'status -uno'" + +# 译者:为对齐,下面两句内容有调整 +#~ msgid "may speed it up, but you have to be careful not to forget to add" +#~ msgstr "也许能提高速度,但您需要小心不要忘了添加新文件" + +#~ msgid "new files yourself (see 'git help status')." +#~ msgstr "(参见 'git help status')。" + #, fuzzy #~ msgid "aaaSynchronizing submodule url for '$prefix$sm_path'" #~ msgstr "为 '$prefix$sm_path' 同步子模组 url" @@ -410,10 +410,7 @@ void pp_user_info(const struct pretty_print_context *pp, const char *what, struct strbuf *sb, const char *line, const char *encoding) { - struct strbuf name; - struct strbuf mail; struct ident_split ident; - int linelen; char *line_end; const char *mailbuf, *namebuf; size_t namelen, maillen; @@ -422,18 +419,10 @@ void pp_user_info(const struct pretty_print_context *pp, if (pp->fmt == CMIT_FMT_ONELINE) return; - line_end = strchr(line, '\n'); - if (!line_end) { - line_end = strchr(line, '\0'); - if (!line_end) - return; - } - - linelen = ++line_end - line; - if (split_ident_line(&ident, line, linelen)) + line_end = strchrnul(line, '\n'); + if (split_ident_line(&ident, line, line_end - line)) return; - mailbuf = ident.mail_begin; maillen = ident.mail_end - ident.mail_begin; namebuf = ident.name_begin; @@ -442,43 +431,33 @@ void pp_user_info(const struct pretty_print_context *pp, if (pp->mailmap) map_user(pp->mailmap, &mailbuf, &maillen, &namebuf, &namelen); - strbuf_init(&mail, 0); - strbuf_init(&name, 0); - - strbuf_add(&mail, mailbuf, maillen); - strbuf_add(&name, namebuf, namelen); - - namelen = name.len + mail.len + 3; /* ' ' + '<' + '>' */ - if (pp->fmt == CMIT_FMT_EMAIL) { strbuf_addstr(sb, "From: "); - if (needs_rfc2047_encoding(name.buf, name.len, RFC2047_ADDRESS)) { - add_rfc2047(sb, name.buf, name.len, + if (needs_rfc2047_encoding(namebuf, namelen, RFC2047_ADDRESS)) { + add_rfc2047(sb, namebuf, namelen, encoding, RFC2047_ADDRESS); max_length = 76; /* per rfc2047 */ - } else if (needs_rfc822_quoting(name.buf, name.len)) { + } else if (needs_rfc822_quoting(namebuf, namelen)) { struct strbuf quoted = STRBUF_INIT; - add_rfc822_quoted("ed, name.buf, name.len); + add_rfc822_quoted("ed, namebuf, namelen); strbuf_add_wrapped_bytes(sb, quoted.buf, quoted.len, -6, 1, max_length); strbuf_release("ed); } else { - strbuf_add_wrapped_bytes(sb, name.buf, name.len, + strbuf_add_wrapped_bytes(sb, namebuf, namelen, -6, 1, max_length); } - if (namelen - name.len + last_line_length(sb) > max_length) - strbuf_addch(sb, '\n'); - strbuf_addf(sb, " <%s>\n", mail.buf); + if (max_length < + last_line_length(sb) + strlen(" <") + maillen + strlen(">")) + strbuf_addch(sb, '\n'); + strbuf_addf(sb, " <%.*s>\n", (int)maillen, mailbuf); } else { - strbuf_addf(sb, "%s: %.*s%s <%s>\n", what, - (pp->fmt == CMIT_FMT_FULLER) ? 4 : 0, - " ", name.buf, mail.buf); + strbuf_addf(sb, "%s: %.*s%.*s <%.*s>\n", what, + (pp->fmt == CMIT_FMT_FULLER) ? 4 : 0, " ", + (int)namelen, namebuf, (int)maillen, mailbuf); } - strbuf_release(&mail); - strbuf_release(&name); - switch (pp->fmt) { case CMIT_FMT_MEDIUM: strbuf_addf(sb, "Date: %s\n", diff --git a/read-cache.c b/read-cache.c index 04ed561bfe..e6e046687e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -91,7 +91,7 @@ void fill_stat_cache_info(struct cache_entry *ce, struct stat *st) ce_mark_uptodate(ce); } -static int ce_compare_data(struct cache_entry *ce, struct stat *st) +static int ce_compare_data(const struct cache_entry *ce, struct stat *st) { int match = -1; int fd = open(ce->name, O_RDONLY); @@ -105,7 +105,7 @@ static int ce_compare_data(struct cache_entry *ce, struct stat *st) return match; } -static int ce_compare_link(struct cache_entry *ce, size_t expected_size) +static int ce_compare_link(const struct cache_entry *ce, size_t expected_size) { int match = -1; void *buffer; @@ -126,7 +126,7 @@ static int ce_compare_link(struct cache_entry *ce, size_t expected_size) return match; } -static int ce_compare_gitlink(struct cache_entry *ce) +static int ce_compare_gitlink(const struct cache_entry *ce) { unsigned char sha1[20]; @@ -143,7 +143,7 @@ static int ce_compare_gitlink(struct cache_entry *ce) return hashcmp(sha1, ce->sha1); } -static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st) +static int ce_modified_check_fs(const struct cache_entry *ce, struct stat *st) { switch (st->st_mode & S_IFMT) { case S_IFREG: @@ -163,7 +163,7 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st) return 0; } -static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) +static int ce_match_stat_basic(const struct cache_entry *ce, struct stat *st) { unsigned int changed = 0; @@ -239,7 +239,8 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) return changed; } -static int is_racy_timestamp(const struct index_state *istate, struct cache_entry *ce) +static int is_racy_timestamp(const struct index_state *istate, + const struct cache_entry *ce) { return (!S_ISGITLINK(ce->ce_mode) && istate->timestamp.sec && @@ -255,7 +256,7 @@ static int is_racy_timestamp(const struct index_state *istate, struct cache_entr } int ie_match_stat(const struct index_state *istate, - struct cache_entry *ce, struct stat *st, + const struct cache_entry *ce, struct stat *st, unsigned int options) { unsigned int changed; @@ -311,7 +312,8 @@ int ie_match_stat(const struct index_state *istate, } int ie_modified(const struct index_state *istate, - struct cache_entry *ce, struct stat *st, unsigned int options) + const struct cache_entry *ce, + struct stat *st, unsigned int options) { int changed, changed_fs; @@ -109,7 +109,20 @@ struct ref_entry; * (ref_entry->flag & REF_DIR) is zero. */ struct ref_value { + /* + * The name of the object to which this reference resolves + * (which may be a tag object). If REF_ISBROKEN, this is + * null. If REF_ISSYMREF, then this is the name of the object + * referred to by the last reference in the symlink chain. + */ unsigned char sha1[20]; + + /* + * If REF_KNOWS_PEELED, then this field holds the peeled value + * of this reference, or null if the reference is known not to + * be peelable. See the documentation for peel_ref() for an + * exact definition of "peelable". + */ unsigned char peeled[20]; }; @@ -158,7 +171,17 @@ struct ref_dir { struct ref_entry **entries; }; -/* ISSYMREF=0x01, ISPACKED=0x02, and ISBROKEN=0x04 are public interfaces */ +/* + * Bit values for ref_entry::flag. REF_ISSYMREF=0x01, + * REF_ISPACKED=0x02, and REF_ISBROKEN=0x04 are public values; see + * refs.h. + */ + +/* + * The field ref_entry->u.value.peeled of this value entry contains + * the correct peeled value for the reference, which might be + * null_sha1 if the reference is not a tag or if it is broken. + */ #define REF_KNOWS_PEELED 0x08 /* ref_entry represents a directory of references */ @@ -343,18 +366,17 @@ static int ref_entry_cmp_sslice(const void *key_, const void *ent_) } /* - * Return the entry with the given refname from the ref_dir - * (non-recursively), sorting dir if necessary. Return NULL if no - * such entry is found. dir must already be complete. + * Return the index of the entry with the given refname from the + * ref_dir (non-recursively), sorting dir if necessary. Return -1 if + * no such entry is found. dir must already be complete. */ -static struct ref_entry *search_ref_dir(struct ref_dir *dir, - const char *refname, size_t len) +static int search_ref_dir(struct ref_dir *dir, const char *refname, size_t len) { struct ref_entry **r; struct string_slice key; if (refname == NULL || !dir->nr) - return NULL; + return -1; sort_ref_dir(dir); key.len = len; @@ -363,9 +385,9 @@ static struct ref_entry *search_ref_dir(struct ref_dir *dir, ref_entry_cmp_sslice); if (r == NULL) - return NULL; + return -1; - return *r; + return r - dir->entries; } /* @@ -379,8 +401,9 @@ static struct ref_dir *search_for_subdir(struct ref_dir *dir, const char *subdirname, size_t len, int mkdir) { - struct ref_entry *entry = search_ref_dir(dir, subdirname, len); - if (!entry) { + int entry_index = search_ref_dir(dir, subdirname, len); + struct ref_entry *entry; + if (entry_index == -1) { if (!mkdir) return NULL; /* @@ -391,6 +414,8 @@ static struct ref_dir *search_for_subdir(struct ref_dir *dir, */ entry = create_dir_entry(dir->ref_cache, subdirname, len, 0); add_entry_to_dir(dir, entry); + } else { + entry = dir->entries[entry_index]; } return get_ref_dir(entry); } @@ -429,12 +454,67 @@ static struct ref_dir *find_containing_dir(struct ref_dir *dir, */ static struct ref_entry *find_ref(struct ref_dir *dir, const char *refname) { + int entry_index; struct ref_entry *entry; dir = find_containing_dir(dir, refname, 0); if (!dir) return NULL; - entry = search_ref_dir(dir, refname, strlen(refname)); - return (entry && !(entry->flag & REF_DIR)) ? entry : NULL; + entry_index = search_ref_dir(dir, refname, strlen(refname)); + if (entry_index == -1) + return NULL; + entry = dir->entries[entry_index]; + return (entry->flag & REF_DIR) ? NULL : entry; +} + +/* + * Remove the entry with the given name from dir, recursing into + * subdirectories as necessary. If refname is the name of a directory + * (i.e., ends with '/'), then remove the directory and its contents. + * If the removal was successful, return the number of entries + * remaining in the directory entry that contained the deleted entry. + * If the name was not found, return -1. Please note that this + * function only deletes the entry from the cache; it does not delete + * it from the filesystem or ensure that other cache entries (which + * might be symbolic references to the removed entry) are updated. + * Nor does it remove any containing dir entries that might be made + * empty by the removal. dir must represent the top-level directory + * and must already be complete. + */ +static int remove_entry(struct ref_dir *dir, const char *refname) +{ + int refname_len = strlen(refname); + int entry_index; + struct ref_entry *entry; + int is_dir = refname[refname_len - 1] == '/'; + if (is_dir) { + /* + * refname represents a reference directory. Remove + * the trailing slash; otherwise we will get the + * directory *representing* refname rather than the + * one *containing* it. + */ + char *dirname = xmemdupz(refname, refname_len - 1); + dir = find_containing_dir(dir, dirname, 0); + free(dirname); + } else { + dir = find_containing_dir(dir, refname, 0); + } + if (!dir) + return -1; + entry_index = search_ref_dir(dir, refname, refname_len); + if (entry_index == -1) + return -1; + entry = dir->entries[entry_index]; + + memmove(&dir->entries[entry_index], + &dir->entries[entry_index + 1], + (dir->nr - entry_index - 1) * sizeof(*dir->entries) + ); + dir->nr--; + if (dir->sorted > entry_index) + dir->sorted--; + free_ref_entry(entry); + return dir->nr; } /* @@ -503,27 +583,64 @@ static void sort_ref_dir(struct ref_dir *dir) dir->sorted = dir->nr = i; } -#define DO_FOR_EACH_INCLUDE_BROKEN 01 +/* Include broken references in a do_for_each_ref*() iteration: */ +#define DO_FOR_EACH_INCLUDE_BROKEN 0x01 + +/* + * Return true iff the reference described by entry can be resolved to + * an object in the database. Emit a warning if the referred-to + * object does not exist. + */ +static int ref_resolves_to_object(struct ref_entry *entry) +{ + if (entry->flag & REF_ISBROKEN) + return 0; + if (!has_sha1_file(entry->u.value.sha1)) { + error("%s does not point to a valid object!", entry->name); + return 0; + } + return 1; +} +/* + * current_ref is a performance hack: when iterating over references + * using the for_each_ref*() functions, current_ref is set to the + * current reference's entry before calling the callback function. If + * the callback function calls peel_ref(), then peel_ref() first + * checks whether the reference to be peeled is the current reference + * (it usually is) and if so, returns that reference's peeled version + * if it is available. This avoids a refname lookup in a common case. + */ static struct ref_entry *current_ref; -static int do_one_ref(const char *base, each_ref_fn fn, int trim, - int flags, void *cb_data, struct ref_entry *entry) +typedef int each_ref_entry_fn(struct ref_entry *entry, void *cb_data); + +struct ref_entry_cb { + const char *base; + int trim; + int flags; + each_ref_fn *fn; + void *cb_data; +}; + +/* + * Handle one reference in a do_for_each_ref*()-style iteration, + * calling an each_ref_fn for each entry. + */ +static int do_one_ref(struct ref_entry *entry, void *cb_data) { + struct ref_entry_cb *data = cb_data; int retval; - if (prefixcmp(entry->name, base)) + if (prefixcmp(entry->name, data->base)) + return 0; + + if (!(data->flags & DO_FOR_EACH_INCLUDE_BROKEN) && + !ref_resolves_to_object(entry)) return 0; - if (!(flags & DO_FOR_EACH_INCLUDE_BROKEN)) { - if (entry->flag & REF_ISBROKEN) - return 0; /* ignore broken refs e.g. dangling symref */ - if (!has_sha1_file(entry->u.value.sha1)) { - error("%s does not point to a valid object!", entry->name); - return 0; - } - } current_ref = entry; - retval = fn(entry->name + trim, entry->u.value.sha1, entry->flag, cb_data); + retval = data->fn(entry->name + data->trim, entry->u.value.sha1, + entry->flag, data->cb_data); current_ref = NULL; return retval; } @@ -532,11 +649,11 @@ static int do_one_ref(const char *base, each_ref_fn fn, int trim, * Call fn for each reference in dir that has index in the range * offset <= index < dir->nr. Recurse into subdirectories that are in * that index range, sorting them before iterating. This function - * does not sort dir itself; it should be sorted beforehand. + * does not sort dir itself; it should be sorted beforehand. fn is + * called for all references, including broken ones. */ -static int do_for_each_ref_in_dir(struct ref_dir *dir, int offset, - const char *base, - each_ref_fn fn, int trim, int flags, void *cb_data) +static int do_for_each_entry_in_dir(struct ref_dir *dir, int offset, + each_ref_entry_fn fn, void *cb_data) { int i; assert(dir->sorted == dir->nr); @@ -546,10 +663,9 @@ static int do_for_each_ref_in_dir(struct ref_dir *dir, int offset, if (entry->flag & REF_DIR) { struct ref_dir *subdir = get_ref_dir(entry); sort_ref_dir(subdir); - retval = do_for_each_ref_in_dir(subdir, 0, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dir(subdir, 0, fn, cb_data); } else { - retval = do_one_ref(base, fn, trim, flags, cb_data, entry); + retval = fn(entry, cb_data); } if (retval) return retval; @@ -562,12 +678,12 @@ static int do_for_each_ref_in_dir(struct ref_dir *dir, int offset, * by refname. Recurse into subdirectories. If a value entry appears * in both dir1 and dir2, then only process the version that is in * dir2. The input dirs must already be sorted, but subdirs will be - * sorted as needed. + * sorted as needed. fn is called for all references, including + * broken ones. */ -static int do_for_each_ref_in_dirs(struct ref_dir *dir1, - struct ref_dir *dir2, - const char *base, each_ref_fn fn, int trim, - int flags, void *cb_data) +static int do_for_each_entry_in_dirs(struct ref_dir *dir1, + struct ref_dir *dir2, + each_ref_entry_fn fn, void *cb_data) { int retval; int i1 = 0, i2 = 0; @@ -578,12 +694,10 @@ static int do_for_each_ref_in_dirs(struct ref_dir *dir1, struct ref_entry *e1, *e2; int cmp; if (i1 == dir1->nr) { - return do_for_each_ref_in_dir(dir2, i2, - base, fn, trim, flags, cb_data); + return do_for_each_entry_in_dir(dir2, i2, fn, cb_data); } if (i2 == dir2->nr) { - return do_for_each_ref_in_dir(dir1, i1, - base, fn, trim, flags, cb_data); + return do_for_each_entry_in_dir(dir1, i1, fn, cb_data); } e1 = dir1->entries[i1]; e2 = dir2->entries[i2]; @@ -595,14 +709,13 @@ static int do_for_each_ref_in_dirs(struct ref_dir *dir1, struct ref_dir *subdir2 = get_ref_dir(e2); sort_ref_dir(subdir1); sort_ref_dir(subdir2); - retval = do_for_each_ref_in_dirs( - subdir1, subdir2, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dirs( + subdir1, subdir2, fn, cb_data); i1++; i2++; } else if (!(e1->flag & REF_DIR) && !(e2->flag & REF_DIR)) { /* Both are references; ignore the one from dir1. */ - retval = do_one_ref(base, fn, trim, flags, cb_data, e2); + retval = fn(e2, cb_data); i1++; i2++; } else { @@ -621,23 +734,15 @@ static int do_for_each_ref_in_dirs(struct ref_dir *dir1, if (e->flag & REF_DIR) { struct ref_dir *subdir = get_ref_dir(e); sort_ref_dir(subdir); - retval = do_for_each_ref_in_dir( - subdir, 0, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dir( + subdir, 0, fn, cb_data); } else { - retval = do_one_ref(base, fn, trim, flags, cb_data, e); + retval = fn(e, cb_data); } } if (retval) return retval; } - if (i1 < dir1->nr) - return do_for_each_ref_in_dir(dir1, i1, - base, fn, trim, flags, cb_data); - if (i2 < dir2->nr) - return do_for_each_ref_in_dir(dir2, i2, - base, fn, trim, flags, cb_data); - return 0; } /* @@ -661,14 +766,13 @@ struct name_conflict_cb { const char *conflicting_refname; }; -static int name_conflict_fn(const char *existingrefname, const unsigned char *sha1, - int flags, void *cb_data) +static int name_conflict_fn(struct ref_entry *entry, void *cb_data) { struct name_conflict_cb *data = (struct name_conflict_cb *)cb_data; - if (data->oldrefname && !strcmp(data->oldrefname, existingrefname)) + if (data->oldrefname && !strcmp(data->oldrefname, entry->name)) return 0; - if (names_conflict(data->refname, existingrefname)) { - data->conflicting_refname = existingrefname; + if (names_conflict(data->refname, entry->name)) { + data->conflicting_refname = entry->name; return 1; } return 0; @@ -676,7 +780,7 @@ static int name_conflict_fn(const char *existingrefname, const unsigned char *sh /* * Return true iff a reference named refname could be created without - * conflicting with the name of an existing reference in array. If + * conflicting with the name of an existing reference in dir. If * oldrefname is non-NULL, ignore potential conflicts with oldrefname * (e.g., because oldrefname is scheduled for deletion in the same * operation). @@ -690,9 +794,7 @@ static int is_refname_available(const char *refname, const char *oldrefname, data.conflicting_refname = NULL; sort_ref_dir(dir); - if (do_for_each_ref_in_dir(dir, 0, "", name_conflict_fn, - 0, DO_FOR_EACH_INCLUDE_BROKEN, - &data)) { + if (do_for_each_entry_in_dir(dir, 0, name_conflict_fn, &data)) { error("'%s' exists; cannot create '%s'", data.conflicting_refname, refname); return 0; @@ -708,9 +810,13 @@ static struct ref_cache { struct ref_cache *next; struct ref_entry *loose; struct ref_entry *packed; - /* The submodule name, or "" for the main repo. */ - char name[FLEX_ARRAY]; -} *ref_cache; + /* + * The submodule name, or "" for the main repo. We allocate + * length 1 rather than FLEX_ARRAY so that the main ref_cache + * is initialized correctly. + */ + char name[1]; +} ref_cache, *submodule_ref_caches; static void clear_packed_ref_cache(struct ref_cache *refs) { @@ -748,18 +854,18 @@ static struct ref_cache *create_ref_cache(const char *submodule) */ static struct ref_cache *get_ref_cache(const char *submodule) { - struct ref_cache *refs = ref_cache; - if (!submodule) - submodule = ""; - while (refs) { + struct ref_cache *refs; + + if (!submodule || !*submodule) + return &ref_cache; + + for (refs = submodule_ref_caches; refs; refs = refs->next) if (!strcmp(submodule, refs->name)) return refs; - refs = refs->next; - } refs = create_ref_cache(submodule); - refs->next = ref_cache; - ref_cache = refs; + refs->next = submodule_ref_caches; + submodule_ref_caches = refs; return refs; } @@ -770,6 +876,16 @@ void invalidate_ref_cache(const char *submodule) clear_loose_ref_cache(refs); } +/* The length of a peeled reference line in packed-refs, including EOL: */ +#define PEELED_LINE_LENGTH 42 + +/* + * The packed-refs header line that we write out. Perhaps other + * traits will be added later. The trailing space is required. + */ +static const char PACKED_REFS_HEADER[] = + "# pack-refs with: peeled fully-peeled \n"; + /* * Parse one line from a packed-refs file. Write the SHA1 to sha1. * Return a pointer to the refname within the line (null-terminated), @@ -862,8 +978,8 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir) } if (last && refline[0] == '^' && - strlen(refline) == 42 && - refline[41] == '\n' && + strlen(refline) == PEELED_LINE_LENGTH && + refline[PEELED_LINE_LENGTH - 1] == '\n' && !get_sha1_hex(refline + 1, sha1)) { hashcpy(last->u.value.peeled, sha1); /* @@ -898,8 +1014,8 @@ static struct ref_dir *get_packed_refs(struct ref_cache *refs) void add_packed_ref(const char *refname, const unsigned char *sha1) { - add_ref(get_packed_refs(get_ref_cache(NULL)), - create_ref_entry(refname, sha1, REF_ISPACKED, 1)); + add_ref(get_packed_refs(&ref_cache), + create_ref_entry(refname, sha1, REF_ISPACKED, 1)); } /* @@ -1069,18 +1185,12 @@ int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *sh } /* - * Try to read ref from the packed references. On success, set sha1 - * and return 0; otherwise, return -1. + * Return the ref_entry for the given refname from the packed + * references. If it does not exist, return NULL. */ -static int get_packed_ref(const char *refname, unsigned char *sha1) +static struct ref_entry *get_packed_ref(const char *refname) { - struct ref_dir *packed = get_packed_refs(get_ref_cache(NULL)); - struct ref_entry *entry = find_ref(packed, refname); - if (entry) { - hashcpy(sha1, entry->u.value.sha1); - return 0; - } - return -1; + return find_ref(get_packed_refs(&ref_cache), refname); } const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int reading, int *flag) @@ -1108,13 +1218,17 @@ const char *resolve_ref_unsafe(const char *refname, unsigned char *sha1, int rea git_snpath(path, sizeof(path), "%s", refname); if (lstat(path, &st) < 0) { + struct ref_entry *entry; + if (errno != ENOENT) return NULL; /* * The loose reference file does not exist; * check for a packed reference. */ - if (!get_packed_ref(refname, sha1)) { + entry = get_packed_ref(refname); + if (entry) { + hashcpy(sha1, entry->u.value.sha1); if (flag) *flag |= REF_ISPACKED; return refname; @@ -1231,54 +1345,130 @@ static int filter_refs(const char *refname, const unsigned char *sha1, int flags return filter->fn(refname, sha1, flags, filter->cb_data); } +enum peel_status { + /* object was peeled successfully: */ + PEEL_PEELED = 0, + + /* + * object cannot be peeled because the named object (or an + * object referred to by a tag in the peel chain), does not + * exist. + */ + PEEL_INVALID = -1, + + /* object cannot be peeled because it is not a tag: */ + PEEL_NON_TAG = -2, + + /* ref_entry contains no peeled value because it is a symref: */ + PEEL_IS_SYMREF = -3, + + /* + * ref_entry cannot be peeled because it is broken (i.e., the + * symbolic reference cannot even be resolved to an object + * name): + */ + PEEL_BROKEN = -4 +}; + +/* + * Peel the named object; i.e., if the object is a tag, resolve the + * tag recursively until a non-tag is found. If successful, store the + * result to sha1 and return PEEL_PEELED. If the object is not a tag + * or is not valid, return PEEL_NON_TAG or PEEL_INVALID, respectively, + * and leave sha1 unchanged. + */ +static enum peel_status peel_object(const unsigned char *name, unsigned char *sha1) +{ + struct object *o = lookup_unknown_object(name); + + if (o->type == OBJ_NONE) { + int type = sha1_object_info(name, NULL); + if (type < 0) + return PEEL_INVALID; + o->type = type; + } + + if (o->type != OBJ_TAG) + return PEEL_NON_TAG; + + o = deref_tag_noverify(o); + if (!o) + return PEEL_INVALID; + + hashcpy(sha1, o->sha1); + return PEEL_PEELED; +} + +/* + * Peel the entry (if possible) and return its new peel_status. If + * repeel is true, re-peel the entry even if there is an old peeled + * value that is already stored in it. + * + * It is OK to call this function with a packed reference entry that + * might be stale and might even refer to an object that has since + * been garbage-collected. In such a case, if the entry has + * REF_KNOWS_PEELED then leave the status unchanged and return + * PEEL_PEELED or PEEL_NON_TAG; otherwise, return PEEL_INVALID. + */ +static enum peel_status peel_entry(struct ref_entry *entry, int repeel) +{ + enum peel_status status; + + if (entry->flag & REF_KNOWS_PEELED) { + if (repeel) { + entry->flag &= ~REF_KNOWS_PEELED; + hashclr(entry->u.value.peeled); + } else { + return is_null_sha1(entry->u.value.peeled) ? + PEEL_NON_TAG : PEEL_PEELED; + } + } + if (entry->flag & REF_ISBROKEN) + return PEEL_BROKEN; + if (entry->flag & REF_ISSYMREF) + return PEEL_IS_SYMREF; + + status = peel_object(entry->u.value.sha1, entry->u.value.peeled); + if (status == PEEL_PEELED || status == PEEL_NON_TAG) + entry->flag |= REF_KNOWS_PEELED; + return status; +} + int peel_ref(const char *refname, unsigned char *sha1) { int flag; unsigned char base[20]; - struct object *o; if (current_ref && (current_ref->name == refname - || !strcmp(current_ref->name, refname))) { - if (current_ref->flag & REF_KNOWS_PEELED) { - if (is_null_sha1(current_ref->u.value.peeled)) - return -1; - hashcpy(sha1, current_ref->u.value.peeled); - return 0; - } - hashcpy(base, current_ref->u.value.sha1); - goto fallback; + || !strcmp(current_ref->name, refname))) { + if (peel_entry(current_ref, 0)) + return -1; + hashcpy(sha1, current_ref->u.value.peeled); + return 0; } if (read_ref_full(refname, base, 1, &flag)) return -1; - if ((flag & REF_ISPACKED)) { - struct ref_dir *dir = get_packed_refs(get_ref_cache(NULL)); - struct ref_entry *r = find_ref(dir, refname); - - if (r != NULL && r->flag & REF_KNOWS_PEELED) { + /* + * If the reference is packed, read its ref_entry from the + * cache in the hope that we already know its peeled value. + * We only try this optimization on packed references because + * (a) forcing the filling of the loose reference cache could + * be expensive and (b) loose references anyway usually do not + * have REF_KNOWS_PEELED. + */ + if (flag & REF_ISPACKED) { + struct ref_entry *r = get_packed_ref(refname); + if (r) { + if (peel_entry(r, 0)) + return -1; hashcpy(sha1, r->u.value.peeled); return 0; } } -fallback: - o = lookup_unknown_object(base); - if (o->type == OBJ_NONE) { - int type = sha1_object_info(base, NULL); - if (type < 0) - return -1; - o->type = type; - } - - if (o->type == OBJ_TAG) { - o = deref_tag_noverify(o); - if (o) { - hashcpy(sha1, o->sha1); - return 0; - } - } - return -1; + return peel_object(base, sha1); } struct warn_if_dangling_data { @@ -1316,10 +1506,16 @@ void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname) for_each_rawref(warn_if_dangling_symref, &data); } -static int do_for_each_ref(const char *submodule, const char *base, each_ref_fn fn, - int trim, int flags, void *cb_data) +/* + * Call fn for each reference in the specified ref_cache, omitting + * references not in the containing_dir of base. fn is called for all + * references, including broken ones. If fn ever returns a non-zero + * value, stop the iteration and return that value; otherwise, return + * 0. + */ +static int do_for_each_entry(struct ref_cache *refs, const char *base, + each_ref_entry_fn fn, void *cb_data) { - struct ref_cache *refs = get_ref_cache(submodule); struct ref_dir *packed_dir = get_packed_refs(refs); struct ref_dir *loose_dir = get_loose_refs(refs); int retval = 0; @@ -1332,24 +1528,43 @@ static int do_for_each_ref(const char *submodule, const char *base, each_ref_fn if (packed_dir && loose_dir) { sort_ref_dir(packed_dir); sort_ref_dir(loose_dir); - retval = do_for_each_ref_in_dirs( - packed_dir, loose_dir, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dirs( + packed_dir, loose_dir, fn, cb_data); } else if (packed_dir) { sort_ref_dir(packed_dir); - retval = do_for_each_ref_in_dir( - packed_dir, 0, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dir( + packed_dir, 0, fn, cb_data); } else if (loose_dir) { sort_ref_dir(loose_dir); - retval = do_for_each_ref_in_dir( - loose_dir, 0, - base, fn, trim, flags, cb_data); + retval = do_for_each_entry_in_dir( + loose_dir, 0, fn, cb_data); } return retval; } +/* + * Call fn for each reference in the specified ref_cache for which the + * refname begins with base. If trim is non-zero, then trim that many + * characters off the beginning of each refname before passing the + * refname to fn. flags can be DO_FOR_EACH_INCLUDE_BROKEN to include + * broken references in the iteration. If fn ever returns a non-zero + * value, stop the iteration and return that value; otherwise, return + * 0. + */ +static int do_for_each_ref(struct ref_cache *refs, const char *base, + each_ref_fn fn, int trim, int flags, void *cb_data) +{ + struct ref_entry_cb data; + data.base = base; + data.trim = trim; + data.flags = flags; + data.fn = fn; + data.cb_data = cb_data; + + return do_for_each_entry(refs, base, do_one_ref, &data); +} + static int do_head_ref(const char *submodule, each_ref_fn fn, void *cb_data) { unsigned char sha1[20]; @@ -1380,23 +1595,23 @@ int head_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data) int for_each_ref(each_ref_fn fn, void *cb_data) { - return do_for_each_ref(NULL, "", fn, 0, 0, cb_data); + return do_for_each_ref(&ref_cache, "", fn, 0, 0, cb_data); } int for_each_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data) { - return do_for_each_ref(submodule, "", fn, 0, 0, cb_data); + return do_for_each_ref(get_ref_cache(submodule), "", fn, 0, 0, cb_data); } int for_each_ref_in(const char *prefix, each_ref_fn fn, void *cb_data) { - return do_for_each_ref(NULL, prefix, fn, strlen(prefix), 0, cb_data); + return do_for_each_ref(&ref_cache, prefix, fn, strlen(prefix), 0, cb_data); } int for_each_ref_in_submodule(const char *submodule, const char *prefix, each_ref_fn fn, void *cb_data) { - return do_for_each_ref(submodule, prefix, fn, strlen(prefix), 0, cb_data); + return do_for_each_ref(get_ref_cache(submodule), prefix, fn, strlen(prefix), 0, cb_data); } int for_each_tag_ref(each_ref_fn fn, void *cb_data) @@ -1431,7 +1646,7 @@ int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *c int for_each_replace_ref(each_ref_fn fn, void *cb_data) { - return do_for_each_ref(NULL, "refs/replace/", fn, 13, 0, cb_data); + return do_for_each_ref(&ref_cache, "refs/replace/", fn, 13, 0, cb_data); } int head_ref_namespaced(each_ref_fn fn, void *cb_data) @@ -1454,7 +1669,7 @@ int for_each_namespaced_ref(each_ref_fn fn, void *cb_data) struct strbuf buf = STRBUF_INIT; int ret; strbuf_addf(&buf, "%srefs/", get_git_namespace()); - ret = do_for_each_ref(NULL, buf.buf, fn, 0, 0, cb_data); + ret = do_for_each_ref(&ref_cache, buf.buf, fn, 0, 0, cb_data); strbuf_release(&buf); return ret; } @@ -1496,7 +1711,7 @@ int for_each_glob_ref(each_ref_fn fn, const char *pattern, void *cb_data) int for_each_rawref(each_ref_fn fn, void *cb_data) { - return do_for_each_ref(NULL, "", fn, 0, + return do_for_each_ref(&ref_cache, "", fn, 0, DO_FOR_EACH_INCLUDE_BROKEN, cb_data); } @@ -1702,7 +1917,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname, * name is a proper prefix of our refname. */ if (missing && - !is_refname_available(refname, NULL, get_packed_refs(get_ref_cache(NULL)))) { + !is_refname_available(refname, NULL, get_packed_refs(&ref_cache))) { last_errno = ENOTDIR; goto error_return; } @@ -1754,47 +1969,224 @@ struct ref_lock *lock_any_ref_for_update(const char *refname, return lock_ref_sha1_basic(refname, old_sha1, flags, NULL); } -struct repack_without_ref_sb { - const char *refname; - int fd; -}; - -static int repack_without_ref_fn(const char *refname, const unsigned char *sha1, - int flags, void *cb_data) +/* + * Write an entry to the packed-refs file for the specified refname. + * If peeled is non-NULL, write it as the entry's peeled value. + */ +static void write_packed_entry(int fd, char *refname, unsigned char *sha1, + unsigned char *peeled) { - struct repack_without_ref_sb *data = cb_data; char line[PATH_MAX + 100]; int len; - if (!strcmp(data->refname, refname)) - return 0; len = snprintf(line, sizeof(line), "%s %s\n", sha1_to_hex(sha1), refname); /* this should not happen but just being defensive */ if (len > sizeof(line)) die("too long a refname '%s'", refname); - write_or_die(data->fd, line, len); + write_or_die(fd, line, len); + + if (peeled) { + if (snprintf(line, sizeof(line), "^%s\n", + sha1_to_hex(peeled)) != PEELED_LINE_LENGTH) + die("internal error"); + write_or_die(fd, line, PEELED_LINE_LENGTH); + } +} + +struct ref_to_prune { + struct ref_to_prune *next; + unsigned char sha1[20]; + char name[FLEX_ARRAY]; +}; + +struct pack_refs_cb_data { + unsigned int flags; + struct ref_to_prune *ref_to_prune; + int fd; +}; + +static int pack_one_ref(struct ref_entry *entry, void *cb_data) +{ + struct pack_refs_cb_data *cb = cb_data; + enum peel_status peel_status; + int is_tag_ref = !prefixcmp(entry->name, "refs/tags/"); + + /* ALWAYS pack refs that were already packed or are tags */ + if (!(cb->flags & PACK_REFS_ALL) && !is_tag_ref && + !(entry->flag & REF_ISPACKED)) + return 0; + + /* Do not pack symbolic or broken refs: */ + if ((entry->flag & REF_ISSYMREF) || !ref_resolves_to_object(entry)) + return 0; + + peel_status = peel_entry(entry, 1); + if (peel_status != PEEL_PEELED && peel_status != PEEL_NON_TAG) + die("internal error peeling reference %s (%s)", + entry->name, sha1_to_hex(entry->u.value.sha1)); + write_packed_entry(cb->fd, entry->name, entry->u.value.sha1, + peel_status == PEEL_PEELED ? + entry->u.value.peeled : NULL); + + /* If the ref was already packed, there is no need to prune it. */ + if ((cb->flags & PACK_REFS_PRUNE) && !(entry->flag & REF_ISPACKED)) { + int namelen = strlen(entry->name) + 1; + struct ref_to_prune *n = xcalloc(1, sizeof(*n) + namelen); + hashcpy(n->sha1, entry->u.value.sha1); + strcpy(n->name, entry->name); + n->next = cb->ref_to_prune; + cb->ref_to_prune = n; + } return 0; } +/* + * Remove empty parents, but spare refs/ and immediate subdirs. + * Note: munges *name. + */ +static void try_remove_empty_parents(char *name) +{ + char *p, *q; + int i; + p = name; + for (i = 0; i < 2; i++) { /* refs/{heads,tags,...}/ */ + while (*p && *p != '/') + p++; + /* tolerate duplicate slashes; see check_refname_format() */ + while (*p == '/') + p++; + } + for (q = p; *q; q++) + ; + while (1) { + while (q > p && *q != '/') + q--; + while (q > p && *(q-1) == '/') + q--; + if (q == p) + break; + *q = '\0'; + if (rmdir(git_path("%s", name))) + break; + } +} + +/* make sure nobody touched the ref, and unlink */ +static void prune_ref(struct ref_to_prune *r) +{ + struct ref_lock *lock = lock_ref_sha1(r->name + 5, r->sha1); + + if (lock) { + unlink_or_warn(git_path("%s", r->name)); + unlock_ref(lock); + try_remove_empty_parents(r->name); + } +} + +static void prune_refs(struct ref_to_prune *r) +{ + while (r) { + prune_ref(r); + r = r->next; + } +} + static struct lock_file packlock; -static int repack_without_ref(const char *refname) +int pack_refs(unsigned int flags) { - struct repack_without_ref_sb data; - struct ref_cache *refs = get_ref_cache(NULL); - struct ref_dir *packed = get_packed_refs(refs); - if (find_ref(packed, refname) == NULL) + struct pack_refs_cb_data cbdata; + + memset(&cbdata, 0, sizeof(cbdata)); + cbdata.flags = flags; + + cbdata.fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), + LOCK_DIE_ON_ERROR); + + write_or_die(cbdata.fd, PACKED_REFS_HEADER, strlen(PACKED_REFS_HEADER)); + + do_for_each_entry(&ref_cache, "", pack_one_ref, &cbdata); + if (commit_lock_file(&packlock) < 0) + die_errno("unable to overwrite old ref-pack file"); + prune_refs(cbdata.ref_to_prune); + return 0; +} + +static int repack_ref_fn(struct ref_entry *entry, void *cb_data) +{ + int *fd = cb_data; + enum peel_status peel_status; + + if (entry->flag & REF_ISBROKEN) { + /* This shouldn't happen to packed refs. */ + error("%s is broken!", entry->name); return 0; - data.refname = refname; - data.fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0); - if (data.fd < 0) { + } + if (!has_sha1_file(entry->u.value.sha1)) { + unsigned char sha1[20]; + int flags; + + if (read_ref_full(entry->name, sha1, 0, &flags)) + /* We should at least have found the packed ref. */ + die("Internal error"); + if ((flags & REF_ISSYMREF) || !(flags & REF_ISPACKED)) + /* + * This packed reference is overridden by a + * loose reference, so it is OK that its value + * is no longer valid; for example, it might + * refer to an object that has been garbage + * collected. For this purpose we don't even + * care whether the loose reference itself is + * invalid, broken, symbolic, etc. Silently + * omit the packed reference from the output. + */ + return 0; + /* + * There is no overriding loose reference, so the fact + * that this reference doesn't refer to a valid object + * indicates some kind of repository corruption. + * Report the problem, then omit the reference from + * the output. + */ + error("%s does not point to a valid object!", entry->name); + return 0; + } + + peel_status = peel_entry(entry, 0); + write_packed_entry(*fd, entry->name, entry->u.value.sha1, + peel_status == PEEL_PEELED ? + entry->u.value.peeled : NULL); + + return 0; +} + +static int repack_without_ref(const char *refname) +{ + int fd; + struct ref_dir *packed; + + if (!get_packed_ref(refname)) + return 0; /* refname does not exist in packed refs */ + + fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0); + if (fd < 0) { unable_to_lock_error(git_path("packed-refs"), errno); return error("cannot delete '%s' from packed refs", refname); } - clear_packed_ref_cache(refs); - packed = get_packed_refs(refs); - do_for_each_ref_in_dir(packed, 0, "", repack_without_ref_fn, 0, 0, &data); + clear_packed_ref_cache(&ref_cache); + packed = get_packed_refs(&ref_cache); + /* Remove refname from the cache. */ + if (remove_entry(packed, refname) == -1) { + /* + * The packed entry disappeared while we were + * acquiring the lock. + */ + rollback_lock_file(&packlock); + return 0; + } + write_or_die(fd, PACKED_REFS_HEADER, strlen(PACKED_REFS_HEADER)); + do_for_each_entry_in_dir(packed, 0, repack_ref_fn, &fd); return commit_lock_file(&packlock); } @@ -1823,7 +2215,7 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt) ret |= repack_without_ref(lock->ref_name); unlink_or_warn(git_path("logs/%s", lock->ref_name)); - invalidate_ref_cache(NULL); + clear_loose_ref_cache(&ref_cache); unlock_ref(lock); return ret; } @@ -1845,7 +2237,6 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms struct stat loginfo; int log = !lstat(git_path("logs/%s", oldrefname), &loginfo); const char *symref = NULL; - struct ref_cache *refs = get_ref_cache(NULL); if (log && S_ISLNK(loginfo.st_mode)) return error("reflog for %s is a symlink", oldrefname); @@ -1857,10 +2248,10 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms if (!symref) return error("refname %s not found", oldrefname); - if (!is_refname_available(newrefname, oldrefname, get_packed_refs(refs))) + if (!is_refname_available(newrefname, oldrefname, get_packed_refs(&ref_cache))) return 1; - if (!is_refname_available(newrefname, oldrefname, get_loose_refs(refs))) + if (!is_refname_available(newrefname, oldrefname, get_loose_refs(&ref_cache))) return 1; if (log && rename(git_path("logs/%s", oldrefname), git_path(TMP_RENAMED_LOG))) @@ -2116,7 +2507,7 @@ int write_ref_sha1(struct ref_lock *lock, unlock_ref(lock); return -1; } - clear_loose_ref_cache(get_ref_cache(NULL)); + clear_loose_ref_cache(&ref_cache); if (log_ref_write(lock->ref_name, lock->old_sha1, sha1, logmsg) < 0 || (strcmp(lock->ref_name, lock->orig_ref_name) && log_ref_write(lock->orig_ref_name, lock->old_sha1, sha1, logmsg) < 0)) { @@ -10,8 +10,21 @@ struct ref_lock { int force_write; }; +/* + * Bit values set in the flags argument passed to each_ref_fn(): + */ + +/* Reference is a symbolic reference. */ #define REF_ISSYMREF 0x01 + +/* Reference is a packed reference. */ #define REF_ISPACKED 0x02 + +/* + * Reference cannot be resolved to an object name: dangling symbolic + * reference (directly or indirectly), corrupt reference file, or + * symbolic reference refers to ill-formatted reference name. + */ #define REF_ISBROKEN 0x04 /* @@ -59,8 +72,30 @@ extern void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refn */ extern void add_packed_ref(const char *refname, const unsigned char *sha1); +/* + * Flags for controlling behaviour of pack_refs() + * PACK_REFS_PRUNE: Prune loose refs after packing + * PACK_REFS_ALL: Pack _all_ refs, not just tags and already packed refs + */ +#define PACK_REFS_PRUNE 0x0001 +#define PACK_REFS_ALL 0x0002 + +/* + * Write a packed-refs file for the current repository. + * flags: Combination of the above PACK_REFS_* flags. + */ +int pack_refs(unsigned int flags); + extern int ref_exists(const char *); +/* + * If refname is a non-symbolic reference that refers to a tag object, + * and the tag can be (recursively) dereferenced to a non-tag object, + * store the SHA1 of the referred-to object to sha1 and return 0. If + * any of these conditions are not met, return a non-zero value. + * Symbolic references are considered unpeelable, even if they + * ultimately resolve to a peelable tag. + */ extern int peel_ref(const char *refname, unsigned char *sha1); /** Locks a "refs/" ref returning the lock on success and NULL on failure. **/ diff --git a/remote-testsvn.c b/remote-testsvn.c index 5ddf11cc61..d7cd5d272f 100644 --- a/remote-testsvn.c +++ b/remote-testsvn.c @@ -286,7 +286,7 @@ static int do_command(struct strbuf *line) return 0; } -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct strbuf buf = STRBUF_INIT, url_sb = STRBUF_INIT, private_ref_sb = STRBUF_INIT, marksfilename_sb = STRBUF_INIT, @@ -1474,8 +1474,7 @@ struct branch *branch_get(const char *name) ret->remote = remote_get(ret->remote_name); if (ret->merge_nr) { int i; - ret->merge = xcalloc(sizeof(*ret->merge), - ret->merge_nr); + ret->merge = xcalloc(ret->merge_nr, sizeof(*ret->merge)); for (i = 0; i < ret->merge_nr; i++) { ret->merge[i] = xcalloc(1, sizeof(**ret->merge)); ret->merge[i]->src = xstrdup(ret->merge_name[i]); diff --git a/revision.c b/revision.c index a67b615bfc..518cd08693 100644 --- a/revision.c +++ b/revision.c @@ -13,6 +13,7 @@ #include "decorate.h" #include "log-tree.h" #include "string-list.h" +#include "line-log.h" #include "mailmap.h" volatile show_early_output_fn_t show_early_output; @@ -915,6 +916,19 @@ static void add_rev_cmdline(struct rev_info *revs, info->nr++; } +static void add_rev_cmdline_list(struct rev_info *revs, + struct commit_list *commit_list, + int whence, + unsigned flags) +{ + while (commit_list) { + struct object *object = &commit_list->item->object; + add_rev_cmdline(revs, object, sha1_to_hex(object->sha1), + whence, flags); + commit_list = commit_list->next; + } +} + struct all_refs_cb { int all_flags; int warned_bad_reflog; @@ -1092,6 +1106,7 @@ static void prepare_show_merge(struct rev_info *revs) add_pending_object(revs, &head->object, "HEAD"); add_pending_object(revs, &other->object, "MERGE_HEAD"); bases = get_merge_bases(head, other, 1); + add_rev_cmdline_list(revs, bases, REV_CMD_MERGE_BASE, UNINTERESTING); add_pending_commit_list(revs, bases, UNINTERESTING); free_commit_list(bases); head->object.flags |= SYMMETRIC_LEFT; @@ -1179,6 +1194,9 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi if (symmetric) { exclude = get_merge_bases(a, b, 1); + add_rev_cmdline_list(revs, exclude, + REV_CMD_MERGE_BASE, + flags_exclude); add_pending_commit_list(revs, exclude, flags_exclude); free_commit_list(exclude); @@ -1897,6 +1915,12 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s if (revs->combine_merges) revs->ignore_merges = 0; revs->diffopt.abbrev = revs->abbrev; + + if (revs->line_level_traverse) { + revs->limited = 1; + revs->topo_order = 1; + } + diff_setup_done(&revs->diffopt); grep_commit_pattern_type(GREP_PATTERN_TYPE_UNSPECIFIED, @@ -2168,6 +2192,8 @@ int prepare_revision_walk(struct rev_info *revs) return -1; if (revs->topo_order) sort_in_topological_order(&revs->commits, revs->lifo); + if (revs->line_level_traverse) + line_log_filter(revs); if (revs->simplify_merges) simplify_merges(revs); if (revs->children.name) @@ -2175,12 +2201,6 @@ int prepare_revision_walk(struct rev_info *revs) return 0; } -enum rewrite_result { - rewrite_one_ok, - rewrite_one_noparents, - rewrite_one_error -}; - static enum rewrite_result rewrite_one(struct rev_info *revs, struct commit **pp) { struct commit_list *cache = NULL; @@ -2202,12 +2222,13 @@ static enum rewrite_result rewrite_one(struct rev_info *revs, struct commit **pp } } -static int rewrite_parents(struct rev_info *revs, struct commit *commit) +int rewrite_parents(struct rev_info *revs, struct commit *commit, + rewrite_parent_fn_t rewrite_parent) { struct commit_list **pp = &commit->parents; while (*pp) { struct commit_list *parent = *pp; - switch (rewrite_one(revs, &parent->item)) { + switch (rewrite_parent(revs, &parent->item)) { case rewrite_one_ok: break; case rewrite_one_noparents: @@ -2373,7 +2394,7 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) if (action == commit_show && !revs->show_all && revs->prune && revs->dense && want_ancestry(revs)) { - if (rewrite_parents(revs, commit) < 0) + if (rewrite_parents(revs, commit, rewrite_one) < 0) return commit_error; } return action; diff --git a/revision.h b/revision.h index 01bd2b7c07..a313a13405 100644 --- a/revision.h +++ b/revision.h @@ -35,6 +35,7 @@ struct rev_cmdline_info { REV_CMD_PARENTS_ONLY, REV_CMD_LEFT, REV_CMD_RIGHT, + REV_CMD_MERGE_BASE, REV_CMD_REV } whence; unsigned flags; @@ -96,7 +97,8 @@ struct rev_info { cherry_mark:1, bisect:1, ancestry_path:1, - first_parent_only:1; + first_parent_only:1, + line_level_traverse:1; /* Diff flags */ unsigned int diff:1, @@ -175,6 +177,9 @@ struct rev_info { int count_left; int count_right; int count_same; + + /* line level range that we are chasing */ + struct decoration line_log_data; }; #define REV_TREE_SAME 0 @@ -241,4 +246,14 @@ enum commit_action { extern enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit); extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit); +enum rewrite_result { + rewrite_one_ok, + rewrite_one_noparents, + rewrite_one_error +}; + +typedef enum rewrite_result (*rewrite_parent_fn_t)(struct rev_info *revs, struct commit **pp); + +extern int rewrite_parents(struct rev_info *revs, struct commit *commit, + rewrite_parent_fn_t rewrite_parent); #endif diff --git a/sequencer.c b/sequencer.c index cf8fbeb8d5..ab6f8a722d 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1077,10 +1077,10 @@ int sequencer_pick_revisions(struct replay_opts *opts) continue; if (!get_sha1(name, sha1)) { - enum object_type type = sha1_object_info(sha1, NULL); - - if (type > 0 && type != OBJ_COMMIT) + if (!lookup_commit_reference_gently(sha1, 1)) { + enum object_type type = sha1_object_info(sha1, NULL); die(_("%s: can't cherry-pick a %s"), name, typename(type)); + } } else die(_("%s: bad revision"), name); } diff --git a/sha1_file.c b/sha1_file.c index 64228a26d0..b114cc922d 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2128,7 +2128,6 @@ void *unpack_entry(struct packed_git *p, off_t obj_offset, error("failed to unpack compressed delta " "at offset %"PRIuMAX" from %s", (uintmax_t)curpos, p->pack_name); - free(base); data = NULL; continue; } @@ -2139,7 +2138,7 @@ void *unpack_entry(struct packed_git *p, off_t obj_offset, if (!data) die("failed to apply delta"); - free (delta_data); + free(delta_data); } *final_type = type; diff --git a/sha1_name.c b/sha1_name.c index 3820f28ae7..b3a90e6f05 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -517,12 +517,21 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1) } if (read_ref_at(real_ref, at_time, nth, sha1, NULL, &co_time, &co_tz, &co_cnt)) { + if (!len) { + if (!prefixcmp(real_ref, "refs/heads/")) { + str = real_ref + 11; + len = strlen(real_ref + 11); + } else { + /* detached HEAD */ + str = "HEAD"; + len = 4; + } + } if (at_time) warning("Log for '%.*s' only goes " "back to %s.", len, str, show_date(co_time, co_tz, DATE_RFC2822)); else { - free(real_ref); die("Log for '%.*s' only has %d entries.", len, str, co_cnt); } @@ -1033,14 +1042,15 @@ int interpret_branch_name(const char *name, struct strbuf *buf) * points to something different than a branch. */ if (!upstream) - return error(_("HEAD does not point to a branch")); + die(_("HEAD does not point to a branch")); if (!upstream->merge || !upstream->merge[0]->dst) { if (!ref_exists(upstream->refname)) - return error(_("No such branch: '%s'"), cp); - if (!upstream->merge) - return error(_("No upstream configured for branch '%s'"), - upstream->name); - return error( + die(_("No such branch: '%s'"), cp); + if (!upstream->merge) { + die(_("No upstream configured for branch '%s'"), + upstream->name); + } + die( _("Upstream branch '%s' not stored as a remote-tracking branch"), upstream->merge[0]->src); } @@ -1055,9 +1065,13 @@ int interpret_branch_name(const char *name, struct strbuf *buf) int strbuf_branchname(struct strbuf *sb, const char *name) { int len = strlen(name); - if (interpret_branch_name(name, sb) == len) + int used = interpret_branch_name(name, sb); + + if (used == len) return 0; - strbuf_add(sb, name, len); + if (used < 0) + used = 0; + strbuf_add(sb, name + used, len - used); return len; } @@ -3,6 +3,16 @@ #include "tag.h" static int is_shallow = -1; +static struct stat shallow_stat; +static char *alternate_shallow_file; + +void set_alternate_shallow_file(const char *path) +{ + if (is_shallow != -1) + die("BUG: is_repository_shallow must not be called before set_alternate_shallow_file"); + free(alternate_shallow_file); + alternate_shallow_file = path ? xstrdup(path) : NULL; +} int register_shallow(const unsigned char *sha1) { @@ -21,12 +31,21 @@ int is_repository_shallow(void) { FILE *fp; char buf[1024]; + const char *path = alternate_shallow_file; if (is_shallow >= 0) return is_shallow; - fp = fopen(git_path("shallow"), "r"); - if (!fp) { + if (!path) + path = git_path("shallow"); + /* + * fetch-pack sets '--shallow-file ""' as an indicator that no + * shallow file should be used. We could just open it and it + * will likely fail. But let's do an explicit check instead. + */ + if (!*path || + stat(path, &shallow_stat) || + (fp = fopen(path, "r")) == NULL) { is_shallow = 0; return is_shallow; } @@ -108,3 +127,22 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth, return result; } + +void check_shallow_file_for_update(void) +{ + struct stat st; + + if (!is_shallow) + return; + else if (is_shallow == -1) + die("BUG: shallow must be initialized by now"); + + if (stat(git_path("shallow"), &st)) + die("shallow file was removed during fetch"); + else if (st.st_mtime != shallow_stat.st_mtime +#ifdef USE_NSEC + || ST_MTIME_NSEC(st) != ST_MTIME_NSEC(shallow_stat) +#endif + ) + die("shallow file was changed during fetch"); +} diff --git a/submodule.c b/submodule.c index e728025f60..1821a5b316 100644 --- a/submodule.c +++ b/submodule.c @@ -603,9 +603,8 @@ int fetch_populated_submodules(const struct argv_array *options, if (!work_tree) goto out; - if (!the_index.initialized) - if (read_cache() < 0) - die("index file corrupt"); + if (read_cache() < 0) + die("index file corrupt"); argv_array_push(&argv, "fetch"); for (i = 0; i < options->argc; i++) diff --git a/t/Makefile b/t/Makefile index 1923cc104b..2373a04f7a 100644 --- a/t/Makefile +++ b/t/Makefile @@ -15,9 +15,16 @@ PROVE ?= prove DEFAULT_TEST_TARGET ?= test TEST_LINT ?= test-lint-duplicates test-lint-executable +ifdef TEST_OUTPUT_DIRECTORY +TEST_RESULTS_DIRECTORY = $(TEST_OUTPUT_DIRECTORY)/test-results +else +TEST_RESULTS_DIRECTORY = test-results +endif + # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) +TEST_RESULTS_DIRECTORY_SQ = $(subst ','\'',$(TEST_RESULTS_DIRECTORY)) T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)) TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh)) @@ -36,10 +43,10 @@ $(T): @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS) pre-clean: - $(RM) -r test-results + $(RM) -r '$(TEST_RESULTS_DIRECTORY_SQ)' clean-except-prove-cache: - $(RM) -r 'trash directory'.* test-results + $(RM) -r 'trash directory'.* '$(TEST_RESULTS_DIRECTORY_SQ)' $(RM) -r valgrind/bin clean: clean-except-prove-cache @@ -65,7 +72,7 @@ aggregate-results-and-cleanup: $(T) $(MAKE) clean aggregate-results: - for f in test-results/t*-*.counts; do \ + for f in '$(TEST_RESULTS_DIRECTORY_SQ)'/t*-*.counts; do \ echo "$$f"; \ done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh @@ -83,42 +90,4 @@ valgrind: perf: $(MAKE) -C perf/ all -# Smoke testing targets --include ../GIT-VERSION-FILE -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo unknown') -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo unknown') - -test-results: - mkdir -p test-results - -test-results/git-smoke.tar.gz: test-results - '$(PERL_PATH_SQ)' ./harness \ - --archive="test-results/git-smoke.tar.gz" \ - $(T) - -smoke: test-results/git-smoke.tar.gz - -SMOKE_UPLOAD_FLAGS = -ifdef SMOKE_USERNAME - SMOKE_UPLOAD_FLAGS += -F username="$(SMOKE_USERNAME)" -F password="$(SMOKE_PASSWORD)" -endif -ifdef SMOKE_COMMENT - SMOKE_UPLOAD_FLAGS += -F comments="$(SMOKE_COMMENT)" -endif -ifdef SMOKE_TAGS - SMOKE_UPLOAD_FLAGS += -F tags="$(SMOKE_TAGS)" -endif - -smoke_report: smoke - curl \ - -H "Expect: " \ - -F project=Git \ - -F architecture="$(uname_M)" \ - -F platform="$(uname_S)" \ - -F revision="$(GIT_VERSION)" \ - -F report_file=@test-results/git-smoke.tar.gz \ - $(SMOKE_UPLOAD_FLAGS) \ - http://smoke.git.nix.is/app/projects/process_add_report/1 \ - | grep -v ^Redirecting - .PHONY: pre-clean $(T) aggregate-results clean valgrind perf @@ -324,6 +324,9 @@ Don't: use 'test_must_fail git cmd'. This will signal a failure if git dies in an unexpected way (e.g. segfault). + On the other hand, don't use test_must_fail for running regular + platform commands; just use '! cmd'. + - use perl without spelling it as "$PERL_PATH". This is to help our friends on Windows where the platform Perl often adds CR before the end of line, and they bundle Git with a version of Perl that diff --git a/t/perf/p4211-line-log.sh b/t/perf/p4211-line-log.sh new file mode 100755 index 0000000000..3d074b0e41 --- /dev/null +++ b/t/perf/p4211-line-log.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +test_description='Tests log -L performance' +. ./perf-lib.sh + +test_perf_default_repo + +# Pick a file to log pseudo-randomly. The sort key is the blob hash, +# so it is stable. +test_expect_success 'select a file' ' + git ls-tree HEAD | grep ^100644 | + sort -k 3 | head -1 | cut -f 2 >filelist +' + +file=$(cat filelist) +export file + +test_perf 'git rev-list --topo-order (baseline)' ' + git rev-list --topo-order HEAD >/dev/null +' + +test_perf 'git log --follow (baseline for -M)' ' + git log --oneline --follow -- "$file" >/dev/null +' + +test_perf 'git log -L' ' + git log -L 1:"$file" >/dev/null +' + +test_perf 'git log -M -L' ' + git log -M -L 1:"$file" >/dev/null +' + +test_done diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index 9c1bde1fd6..a56db804cb 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -66,16 +66,23 @@ test_check_ignore () { init_vars && rm -f "$HOME/stdout" "$HOME/stderr" "$HOME/cmd" && - echo git $global_args check-ignore $quiet_opt $verbose_opt $args \ + echo git $global_args check-ignore $quiet_opt $verbose_opt $non_matching_opt $args \ >"$HOME/cmd" && + echo "$expect_code" >"$HOME/expected-exit-code" && test_expect_code "$expect_code" \ - git $global_args check-ignore $quiet_opt $verbose_opt $args \ + git $global_args check-ignore $quiet_opt $verbose_opt $non_matching_opt $args \ >"$HOME/stdout" 2>"$HOME/stderr" && test_cmp "$HOME/expected-stdout" "$HOME/stdout" && stderr_empty_on_success "$expect_code" } -# Runs the same code with 3 different levels of output verbosity, +# Runs the same code with 4 different levels of output verbosity: +# +# 1. with -q / --quiet +# 2. with default verbosity +# 3. with -v / --verbose +# 4. with -v / --verbose, *and* -n / --non-matching +# # expecting success each time. Takes advantage of the fact that # check-ignore --verbose output is the same as normal output except # for the extra first column. @@ -83,7 +90,9 @@ test_check_ignore () { # Arguments: # - (optional) prereqs for this test, e.g. 'SYMLINKS' # - test name -# - output to expect from -v / --verbose mode +# - output to expect from the fourth verbosity mode (the output +# from the other verbosity modes is automatically inferred +# from this value) # - code to run (should invoke test_check_ignore) test_expect_success_multi () { prereq= @@ -92,8 +101,9 @@ test_expect_success_multi () { prereq=$1 shift fi - testname="$1" expect_verbose="$2" code="$3" + testname="$1" expect_all="$2" code="$3" + expect_verbose=$( echo "$expect_all" | grep -v '^:: ' ) expect=$( echo "$expect_verbose" | sed -e 's/.* //' ) test_expect_success $prereq "$testname" ' @@ -101,23 +111,40 @@ test_expect_success_multi () { eval "$code" ' - for quiet_opt in '-q' '--quiet' - do - test_expect_success $prereq "$testname${quiet_opt:+ with $quiet_opt}" " + # --quiet is only valid when a single pattern is passed + if test $( echo "$expect_all" | wc -l ) = 1 + then + for quiet_opt in '-q' '--quiet' + do + test_expect_success $prereq "$testname${quiet_opt:+ with $quiet_opt}" " expect '' && $code " - done - quiet_opt= + done + quiet_opt= + fi for verbose_opt in '-v' '--verbose' do - test_expect_success $prereq "$testname${verbose_opt:+ with $verbose_opt}" " - expect '$expect_verbose' && - $code - " + for non_matching_opt in '' ' -n' ' --non-matching' + do + if test -n "$non_matching_opt" + then + my_expect="$expect_all" + else + my_expect="$expect_verbose" + fi + + test_code=" + expect '$my_expect' && + $code + " + opts="$verbose_opt$non_matching_opt" + test_expect_success $prereq "$testname${opts:+ with $opts}" "$test_code" + done done verbose_opt= + non_matching_opt= } test_expect_success 'setup' ' @@ -178,7 +205,7 @@ test_expect_success 'setup' ' # # test invalid inputs -test_expect_success_multi '. corner-case' '' ' +test_expect_success_multi '. corner-case' ':: .' ' test_check_ignore . 1 ' @@ -189,11 +216,7 @@ test_expect_success_multi 'empty command line' '' ' test_expect_success_multi '--stdin with empty STDIN' '' ' test_check_ignore "--stdin" 1 </dev/null && - if test -n "$quiet_opt"; then - test_stderr "" - else - test_stderr "no pathspec given." - fi + test_stderr "" ' test_expect_success '-q with multiple args' ' @@ -276,27 +299,39 @@ do where="in subdir $subdir" fi - test_expect_success_multi "non-existent file $where not ignored" '' " - test_check_ignore '${subdir}non-existent' 1 - " + test_expect_success_multi "non-existent file $where not ignored" \ + ":: ${subdir}non-existent" \ + "test_check_ignore '${subdir}non-existent' 1" test_expect_success_multi "non-existent file $where ignored" \ - ".gitignore:1:one ${subdir}one" " - test_check_ignore '${subdir}one' - " + ".gitignore:1:one ${subdir}one" \ + "test_check_ignore '${subdir}one'" - test_expect_success_multi "existing untracked file $where not ignored" '' " - test_check_ignore '${subdir}not-ignored' 1 - " + test_expect_success_multi "existing untracked file $where not ignored" \ + ":: ${subdir}not-ignored" \ + "test_check_ignore '${subdir}not-ignored' 1" - test_expect_success_multi "existing tracked file $where not ignored" '' " - test_check_ignore '${subdir}ignored-but-in-index' 1 - " + test_expect_success_multi "existing tracked file $where not ignored" \ + ":: ${subdir}ignored-but-in-index" \ + "test_check_ignore '${subdir}ignored-but-in-index' 1" test_expect_success_multi "existing untracked file $where ignored" \ - ".gitignore:2:ignored-* ${subdir}ignored-and-untracked" " - test_check_ignore '${subdir}ignored-and-untracked' - " + ".gitignore:2:ignored-* ${subdir}ignored-and-untracked" \ + "test_check_ignore '${subdir}ignored-and-untracked'" + + test_expect_success_multi "mix of file types $where" \ +":: ${subdir}non-existent +.gitignore:1:one ${subdir}one +:: ${subdir}not-ignored +:: ${subdir}ignored-but-in-index +.gitignore:2:ignored-* ${subdir}ignored-and-untracked" \ + "test_check_ignore ' + ${subdir}non-existent + ${subdir}one + ${subdir}not-ignored + ${subdir}ignored-but-in-index + ${subdir}ignored-and-untracked' + " done # Having established the above, from now on we mostly test against @@ -391,7 +426,7 @@ test_expect_success 'cd to ignored sub-directory with -v' ' # # test handling of symlinks -test_expect_success_multi SYMLINKS 'symlink' '' ' +test_expect_success_multi SYMLINKS 'symlink' ':: a/symlink' ' test_check_ignore "a/symlink" 1 ' @@ -574,37 +609,34 @@ cat <<-\EOF >stdin globaltwo b/globaltwo ../b/globaltwo + c/not-ignored EOF -cat <<-\EOF >expected-default - ../one - one - b/on - b/one - b/one one - b/one two - "b/one\"three" - b/two - b/twooo - ../globaltwo - globaltwo - b/globaltwo - ../b/globaltwo -EOF -cat <<-EOF >expected-verbose +# N.B. we deliberately end STDIN with a non-matching pattern in order +# to test that the exit code indicates that one or more of the +# provided paths is ignored - in other words, that it represents an +# aggregation of all the results, not just the final result. + +cat <<-EOF >expected-all .gitignore:1:one ../one + :: ../not-ignored .gitignore:1:one one + :: not-ignored a/b/.gitignore:8:!on* b/on a/b/.gitignore:8:!on* b/one a/b/.gitignore:8:!on* b/one one a/b/.gitignore:8:!on* b/one two a/b/.gitignore:8:!on* "b/one\"three" a/b/.gitignore:9:!two b/two + :: b/not-ignored a/.gitignore:1:two* b/twooo $global_excludes:2:!globaltwo ../globaltwo $global_excludes:2:!globaltwo globaltwo $global_excludes:2:!globaltwo b/globaltwo $global_excludes:2:!globaltwo ../b/globaltwo + :: c/not-ignored EOF +grep -v '^:: ' expected-all >expected-verbose +sed -e 's/.* //' expected-verbose >expected-default sed -e 's/^"//' -e 's/\\//' -e 's/"$//' stdin | \ tr "\n" "\0" >stdin0 @@ -629,6 +661,14 @@ test_expect_success '--stdin from subdirectory with -v' ' ) ' +test_expect_success '--stdin from subdirectory with -v -n' ' + expect_from_stdin <expected-all && + ( + cd a && + test_check_ignore "--stdin -v -n" <../stdin + ) +' + for opts in '--stdin -z' '-z --stdin' do test_expect_success "$opts from subdirectory" ' @@ -648,5 +688,23 @@ do ' done +test_expect_success PIPE 'streaming support for --stdin' ' + mkfifo in out && + (git check-ignore -n -v --stdin <in >out &) && + + # We cannot just "echo >in" because check-ignore would get EOF + # after echo exited; instead we open the descriptor in our + # shell, and then echo to the fd. We make sure to close it at + # the end, so that the subprocess does get EOF and dies + # properly. + exec 9>in && + test_when_finished "exec 9>&-" && + echo >&9 one && + read response <out && + echo "$response" | grep "^\.gitignore:1:one one" && + echo >&9 two && + read response <out && + echo "$response" | grep "^:: two" +' test_done diff --git a/t/t0100-previous.sh b/t/t0100-previous.sh index 315b9b3f10..e0a6940232 100755 --- a/t/t0100-previous.sh +++ b/t/t0100-previous.sh @@ -27,6 +27,7 @@ test_expect_success 'merge @{-1}' ' test_commit B && git checkout A && test_commit C && + test_commit D && git branch -f master B && git branch -f other && git checkout other && @@ -35,14 +36,24 @@ test_expect_success 'merge @{-1}' ' git cat-file commit HEAD | grep "Merge branch '\''other'\''" ' -test_expect_success 'merge @{-1} when there is not enough switches yet' ' +test_expect_success 'merge @{-1}~1' ' + git checkout master && + git reset --hard B && + git checkout other && + git checkout master && + git merge @{-1}~1 && + git cat-file commit HEAD >actual && + grep "Merge branch '\''other'\''" actual +' + +test_expect_success 'merge @{-100} before checking out that many branches yet' ' git reflog expire --expire=now && git checkout -f master && git reset --hard B && git branch -f other C && git checkout other && git checkout master && - test_must_fail git merge @{-12} + test_must_fail git merge @{-100} ' test_done diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh index b27a7209f7..2a19e797eb 100755 --- a/t/t1507-rev-parse-upstream.sh +++ b/t/t1507-rev-parse-upstream.sh @@ -129,8 +129,7 @@ test_expect_success 'branch@{u} works when tracking a local branch' ' test_expect_success 'branch@{u} error message when no upstream' ' cat >expect <<-EOF && - error: No upstream configured for branch ${sq}non-tracking${sq} - fatal: Needed a single revision + fatal: No upstream configured for branch ${sq}non-tracking${sq} EOF error_message non-tracking@{u} 2>actual && test_i18ncmp expect actual @@ -138,8 +137,7 @@ test_expect_success 'branch@{u} error message when no upstream' ' test_expect_success '@{u} error message when no upstream' ' cat >expect <<-EOF && - error: No upstream configured for branch ${sq}master${sq} - fatal: Needed a single revision + fatal: No upstream configured for branch ${sq}master${sq} EOF test_must_fail git rev-parse --verify @{u} 2>actual && test_i18ncmp expect actual @@ -147,8 +145,7 @@ test_expect_success '@{u} error message when no upstream' ' test_expect_success 'branch@{u} error message with misspelt branch' ' cat >expect <<-EOF && - error: No such branch: ${sq}no-such-branch${sq} - fatal: Needed a single revision + fatal: No such branch: ${sq}no-such-branch${sq} EOF error_message no-such-branch@{u} 2>actual && test_i18ncmp expect actual @@ -156,8 +153,7 @@ test_expect_success 'branch@{u} error message with misspelt branch' ' test_expect_success '@{u} error message when not on a branch' ' cat >expect <<-EOF && - error: HEAD does not point to a branch - fatal: Needed a single revision + fatal: HEAD does not point to a branch EOF git checkout HEAD^0 && test_must_fail git rev-parse --verify @{u} 2>actual && @@ -166,8 +162,7 @@ test_expect_success '@{u} error message when not on a branch' ' test_expect_success 'branch@{u} error message if upstream branch not fetched' ' cat >expect <<-EOF && - error: Upstream branch ${sq}refs/heads/side${sq} not stored as a remote-tracking branch - fatal: Needed a single revision + fatal: Upstream branch ${sq}refs/heads/side${sq} not stored as a remote-tracking branch EOF error_message bad-upstream@{u} 2>actual && test_i18ncmp expect actual diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh new file mode 100755 index 0000000000..dee55e428f --- /dev/null +++ b/t/t2024-checkout-dwim.sh @@ -0,0 +1,167 @@ +#!/bin/sh + +test_description='checkout <branch> + +Ensures that checkout on an unborn branch does what the user expects' + +. ./test-lib.sh + +# Is the current branch "refs/heads/$1"? +test_branch () { + printf "%s\n" "refs/heads/$1" >expect.HEAD && + git symbolic-ref HEAD >actual.HEAD && + test_cmp expect.HEAD actual.HEAD +} + +# Is branch "refs/heads/$1" set to pull from "$2/$3"? +test_branch_upstream () { + printf "%s\n" "$2" "refs/heads/$3" >expect.upstream && + { + git config "branch.$1.remote" && + git config "branch.$1.merge" + } >actual.upstream && + test_cmp expect.upstream actual.upstream +} + +test_expect_success 'setup' ' + test_commit my_master && + git init repo_a && + ( + cd repo_a && + test_commit a_master && + git checkout -b foo && + test_commit a_foo && + git checkout -b bar && + test_commit a_bar + ) && + git init repo_b && + ( + cd repo_b && + test_commit b_master && + git checkout -b foo && + test_commit b_foo && + git checkout -b baz && + test_commit b_baz + ) && + git remote add repo_a repo_a && + git remote add repo_b repo_b && + git config remote.repo_b.fetch \ + "+refs/heads/*:refs/remotes/other_b/*" && + git fetch --all +' + +test_expect_success 'checkout of non-existing branch fails' ' + git checkout -B master && + test_might_fail git branch -D xyzzy && + + test_must_fail git checkout xyzzy && + test_must_fail git rev-parse --verify refs/heads/xyzzy && + test_branch master +' + +test_expect_success 'checkout of branch from multiple remotes fails #1' ' + git checkout -B master && + test_might_fail git branch -D foo && + + test_must_fail git checkout foo && + test_must_fail git rev-parse --verify refs/heads/foo && + test_branch master +' + +test_expect_success 'checkout of branch from a single remote succeeds #1' ' + git checkout -B master && + test_might_fail git branch -D bar && + + git checkout bar && + test_branch bar && + test_cmp_rev remotes/repo_a/bar HEAD && + test_branch_upstream bar repo_a bar +' + +test_expect_success 'checkout of branch from a single remote succeeds #2' ' + git checkout -B master && + test_might_fail git branch -D baz && + + git checkout baz && + test_branch baz && + test_cmp_rev remotes/other_b/baz HEAD && + test_branch_upstream baz repo_b baz +' + +test_expect_success '--no-guess suppresses branch auto-vivification' ' + git checkout -B master && + test_might_fail git branch -D bar && + + test_must_fail git checkout --no-guess bar && + test_must_fail git rev-parse --verify refs/heads/bar && + test_branch master +' + +test_expect_success 'setup more remotes with unconventional refspecs' ' + git checkout -B master && + git init repo_c && + ( + cd repo_c && + test_commit c_master && + git checkout -b bar && + test_commit c_bar + git checkout -b spam && + test_commit c_spam + ) && + git init repo_d && + ( + cd repo_d && + test_commit d_master && + git checkout -b baz && + test_commit f_baz + git checkout -b eggs && + test_commit c_eggs + ) && + git remote add repo_c repo_c && + git config remote.repo_c.fetch \ + "+refs/heads/*:refs/remotes/extra_dir/repo_c/extra_dir/*" && + git remote add repo_d repo_d && + git config remote.repo_d.fetch \ + "+refs/heads/*:refs/repo_d/*" && + git fetch --all +' + +test_expect_success 'checkout of branch from multiple remotes fails #2' ' + git checkout -B master && + test_might_fail git branch -D bar && + + test_must_fail git checkout bar && + test_must_fail git rev-parse --verify refs/heads/bar && + test_branch master +' + +test_expect_success 'checkout of branch from multiple remotes fails #3' ' + git checkout -B master && + test_might_fail git branch -D baz && + + test_must_fail git checkout baz && + test_must_fail git rev-parse --verify refs/heads/baz && + test_branch master +' + +test_expect_success 'checkout of branch from a single remote succeeds #3' ' + git checkout -B master && + test_might_fail git branch -D spam && + + git checkout spam && + test_branch spam && + test_cmp_rev refs/remotes/extra_dir/repo_c/extra_dir/spam HEAD && + test_branch_upstream spam repo_c spam +' + +test_expect_success 'checkout of branch from a single remote succeeds #4' ' + git checkout -B master && + test_might_fail git branch -D eggs && + + git checkout eggs && + test_branch eggs && + test_cmp_rev refs/repo_d/eggs HEAD && + test_branch_upstream eggs repo_d eggs +' + +test_done diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index 4e3735f0cb..f0421c09c7 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -175,6 +175,24 @@ test_expect_success 'negated exclude matches can override previous ones' ' grep "^a.1" output ' +test_expect_success 'excluded directory overrides content patterns' ' + + git ls-files --others --exclude="one" --exclude="!one/a.1" >output && + if grep "^one/a.1" output + then + false + fi +' + +test_expect_success 'negated directory doesn'\''t affect content patterns' ' + + git ls-files --others --exclude="!one" --exclude="one/a.1" >output && + if grep "^one/a.1" output + then + false + fi +' + test_expect_success 'subdirectory ignore (setup)' ' mkdir -p top/l1/l2 && ( diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index d969f0ecd8..44ec6a45f4 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -317,13 +317,13 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' ' test $(git config branch.my4.merge) = refs/heads/master ' -test_expect_success 'test tracking setup (non-wildcard, not matching)' ' +test_expect_success 'tracking setup fails on non-matching refspec' ' git config remote.local.url . && git config remote.local.fetch refs/heads/s:refs/remotes/local/s && (git show-ref -q refs/remotes/local/master || git fetch local) && - git branch --track my5 local/master && - ! test "$(git config branch.my5.remote)" = local && - ! test "$(git config branch.my5.merge)" = refs/heads/master + test_must_fail git branch --track my5 local/master && + test_must_fail git config branch.my5.remote && + test_must_fail git config branch.my5.merge ' test_expect_success 'test tracking setup via config' ' diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index cd04361df8..1a2080e3dc 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -118,4 +118,37 @@ test_expect_success 'pack, prune and repack' ' test_cmp all-of-them again ' +test_expect_success 'explicit pack-refs with dangling packed reference' ' + git commit --allow-empty -m "soon to be garbage-collected" && + git pack-refs --all && + git reset --hard HEAD^ && + git reflog expire --expire=all --all && + git prune --expire=all && + git pack-refs --all 2>result && + test_cmp /dev/null result +' + +test_expect_success 'delete ref with dangling packed version' ' + git checkout -b lamb && + git commit --allow-empty -m "future garbage" && + git pack-refs --all && + git reset --hard HEAD^ && + git checkout master && + git reflog expire --expire=all --all && + git prune --expire=all && + git branch -d lamb 2>result && + test_cmp /dev/null result +' + +test_expect_success 'delete ref while another dangling packed ref' ' + git branch lamb && + git commit --allow-empty -m "future garbage" && + git pack-refs --all && + git reset --hard HEAD^ && + git reflog expire --expire=all --all && + git prune --expire=all && + git branch -d lamb 2>result && + test_cmp /dev/null result +' + test_done diff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh index d4d7792eae..3b7caca421 100755 --- a/t/t3211-peel-ref.sh +++ b/t/t3211-peel-ref.sh @@ -61,4 +61,13 @@ test_expect_success 'refs are peeled outside of refs/tags (old packed)' ' test_cmp expect actual ' +test_expect_success 'peeled refs survive deletion of packed ref' ' + git pack-refs --all && + cp .git/packed-refs fully-peeled && + git branch yadda && + git pack-refs --all && + git branch -d yadda && + test_cmp fully-peeled .git/packed-refs +' + test_done diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh index 826500bd18..3968020e64 100755 --- a/t/t3403-rebase-skip.sh +++ b/t/t3403-rebase-skip.sh @@ -64,10 +64,11 @@ test_expect_success 'rebase with --merge' ' test_expect_success 'rebase --skip with --merge' ' git rebase --skip - ' +' -test_expect_success 'merge and reference trees equal' \ - 'test -z "`git diff-tree skip-merge skip-reference`"' +test_expect_success 'merge and reference trees equal' ' + test -z "`git diff-tree skip-merge skip-reference`" +' test_expect_success 'moved back to branch correctly' ' test refs/heads/skip-merge = $(git symbolic-ref HEAD) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index a58406d12f..79e8d3c596 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -692,7 +692,7 @@ test_expect_success 'rebase -i can copy notes' ' test_commit n2 && test_commit n3 && git notes add -m"a note" n3 && - git rebase --onto n1 n2 && + git rebase -i --onto n1 n2 && test "a note" = "$(git notes show HEAD)" ' diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh index a0c6e30d80..fbdc47cfbd 100755 --- a/t/t3505-cherry-pick-empty.sh +++ b/t/t3505-cherry-pick-empty.sh @@ -28,29 +28,21 @@ test_expect_success setup ' ' test_expect_success 'cherry-pick an empty commit' ' - git checkout master && { - git cherry-pick empty-branch^ - test "$?" = 1 - } + git checkout master && + test_expect_code 1 git cherry-pick empty-branch^ ' test_expect_success 'index lockfile was removed' ' - test ! -f .git/index.lock - ' test_expect_success 'cherry-pick a commit with an empty message' ' - git checkout master && { - git cherry-pick empty-branch - test "$?" = 1 - } + git checkout master && + test_expect_code 1 git cherry-pick empty-branch ' test_expect_success 'index lockfile was removed' ' - test ! -f .git/index.lock - ' test_expect_success 'cherry-pick a commit with an empty message with --allow-empty-message' ' @@ -101,7 +93,7 @@ test_expect_success 'cherry-pick a no-op with --keep-redundant' ' git reset --hard && git checkout fork^0 && git cherry-pick --keep-redundant-commits master && - git show -s --format='%s' >actual && + git show -s --format=%s >actual && echo "add file2 on master" >expect && test_cmp expect actual ' diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh index 1261dbbdf5..1019d7b35f 100755 --- a/t/t4038-diff-combined.sh +++ b/t/t4038-diff-combined.sh @@ -353,4 +353,52 @@ test_expect_failure 'combine diff coalesce three parents' ' compare_diff_patch expected actual ' +# Test for a bug reported at +# http://thread.gmane.org/gmane.comp.version-control.git/224410 +# where a delete lines were missing from combined diff output when they +# occurred exactly before the context lines of a later change. +test_expect_success 'combine diff missing delete bug' ' + git commit -m initial --allow-empty && + cat <<-\EOF >test && + 1 + 2 + 3 + 4 + EOF + git add test && + git commit -a -m side1 && + git checkout -B side1 && + git checkout HEAD^ && + cat <<-\EOF >test && + 0 + 1 + 2 + 3 + 4modified + EOF + git add test && + git commit -m side2 && + git branch -f side2 && + test_must_fail git merge --no-commit side1 && + cat <<-\EOF >test && + 1 + 2 + 3 + 4modified + EOF + git add test && + git commit -a -m merge && + git diff-tree -c -p HEAD >actual.tmp && + sed -e "1,/^@@@/d" < actual.tmp >actual && + tr -d Q <<-\EOF >expected && + - 0 + 1 + 2 + 3 + -4 + +4modified + EOF + compare_diff_patch expected actual +' + test_done diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh new file mode 100755 index 0000000000..7776f93e3d --- /dev/null +++ b/t/t4211-line-log.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +test_description='test log -L' +. ./test-lib.sh + +test_expect_success 'setup (import history)' ' + git fast-import < "$TEST_DIRECTORY"/t4211/history.export && + git reset --hard +' + +canned_test_1 () { + test_expect_$1 "$2" " + git log $2 >actual && + test_cmp \"\$TEST_DIRECTORY\"/t4211/expect.$3 actual + " +} + +canned_test () { + canned_test_1 success "$@" +} +canned_test_failure () { + canned_test_1 failure "$@" +} + +test_bad_opts () { + test_expect_success "invalid args: $1" " + test_must_fail git log $1 2>errors && + grep '$2' errors + " +} + +canned_test "-L 4,12:a.c simple" simple-f +canned_test "-L 4,+9:a.c simple" simple-f +canned_test "-L '/long f/,/^}/:a.c' simple" simple-f +canned_test "-L :f:a.c simple" simple-f-to-main + +canned_test "-L '/main/,/^}/:a.c' simple" simple-main +canned_test "-L :main:a.c simple" simple-main-to-end + +canned_test "-L 1,+4:a.c simple" beginning-of-file + +canned_test "-L 20:a.c simple" end-of-file + +canned_test "-L '/long f/',/^}/:a.c -L /main/,/^}/:a.c simple" two-ranges +canned_test "-L 24,+1:a.c simple" vanishes-early + +canned_test "-M -L '/long f/,/^}/:b.c' move-support" move-support-f +canned_test "-M -L ':f:b.c' parallel-change" parallel-change-f-to-main + +canned_test "-L 4,12:a.c -L :main:a.c simple" multiple +canned_test "-L 4,18:a.c -L :main:a.c simple" multiple-overlapping +canned_test "-L :main:a.c -L 4,18:a.c simple" multiple-overlapping +canned_test "-L 4:a.c -L 8,12:a.c simple" multiple-superset +canned_test "-L 8,12:a.c -L 4:a.c simple" multiple-superset + +test_bad_opts "-L" "switch.*requires a value" +test_bad_opts "-L b.c" "argument.*not of the form" +test_bad_opts "-L 1:" "argument.*not of the form" +test_bad_opts "-L 1:nonexistent" "There is no path" +test_bad_opts "-L 1:simple" "There is no path" +test_bad_opts "-L '/foo:b.c'" "argument.*not of the form" +test_bad_opts "-L 1000:b.c" "has only.*lines" +test_bad_opts "-L 1,1000:b.c" "has only.*lines" +test_bad_opts "-L :b.c" "argument.*not of the form" +test_bad_opts "-L :foo:b.c" "no match" + +test_done diff --git a/t/t4211/expect.beginning-of-file b/t/t4211/expect.beginning-of-file new file mode 100644 index 0000000000..91b4054898 --- /dev/null +++ b/t/t4211/expect.beginning-of-file @@ -0,0 +1,43 @@ +commit 4a23ae5c98d59a58c6da036156959f2dc9f472ad +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:47:40 2013 +0100 + + change at very beginning + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -1,3 +1,4 @@ ++#include <unistd.h> + #include <stdio.h> + + long f(long x) + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -1,3 +1,3 @@ + #include <stdio.h> + +-int f(int x) ++long f(long x) + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +1,3 @@ ++#include <stdio.h> ++ ++int f(int x) diff --git a/t/t4211/expect.end-of-file b/t/t4211/expect.end-of-file new file mode 100644 index 0000000000..bd25bb2f59 --- /dev/null +++ b/t/t4211/expect.end-of-file @@ -0,0 +1,62 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -20,3 +20,5 @@ + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} ++ ++/* incomplete lines are bad! */ + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -20,3 +20,3 @@ + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -19,3 +19,3 @@ +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +18,3 @@ ++ printf("%d\n", f(15)); ++ return 0; ++} diff --git a/t/t4211/expect.move-support-f b/t/t4211/expect.move-support-f new file mode 100644 index 0000000000..c905e01bc2 --- /dev/null +++ b/t/t4211/expect.move-support-f @@ -0,0 +1,80 @@ +commit 6ce3c4ff690136099bb17e1a8766b75764726ea7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:49:50 2013 +0100 + + another simple change + +diff --git a/b.c b/b.c +--- a/b.c ++++ b/b.c +@@ -4,9 +4,9 @@ + long f(long x) + { + int s = 0; + while (x) { +- x >>= 1; ++ x /= 2; + s++; + } + return s; + } + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,9 +3,9 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,8 +3,9 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,8 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} diff --git a/t/t4211/expect.multiple b/t/t4211/expect.multiple new file mode 100644 index 0000000000..76ad5b598c --- /dev/null +++ b/t/t4211/expect.multiple @@ -0,0 +1,104 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,7 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} ++ ++/* incomplete lines are bad! */ + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,9 +3,9 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } +@@ -17,5 +17,5 @@ + int main () + { +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,8 +3,9 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,8 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} diff --git a/t/t4211/expect.multiple-overlapping b/t/t4211/expect.multiple-overlapping new file mode 100644 index 0000000000..d930b6eec4 --- /dev/null +++ b/t/t4211/expect.multiple-overlapping @@ -0,0 +1,187 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -4,19 +4,21 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* + * This is only an example! + */ + + int main () + { + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} ++ ++/* incomplete lines are bad! */ + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -4,19 +4,19 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* + * This is only an example! + */ + + int main () + { + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:41 2013 +0100 + + touch comment + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,19 +3,19 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* +- * A comment. ++ * This is only an example! + */ + + int main () + { + printf("%ld\n", f(15)); + return 0; + } + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,19 +3,19 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* + * A comment. + */ + + int main () + { +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,18 +3,19 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + + /* + * A comment. + */ + + int main () + { + printf("%d\n", f(15)); + return 0; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,18 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} ++ ++/* ++ * A comment. ++ */ ++ ++int main () ++{ ++ printf("%d\n", f(15)); ++ return 0; ++} diff --git a/t/t4211/expect.multiple-superset b/t/t4211/expect.multiple-superset new file mode 100644 index 0000000000..a1f5bc49c8 --- /dev/null +++ b/t/t4211/expect.multiple-superset @@ -0,0 +1,59 @@ +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,9 +3,9 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,8 +3,9 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,8 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} diff --git a/t/t4211/expect.parallel-change-f-to-main b/t/t4211/expect.parallel-change-f-to-main new file mode 100644 index 0000000000..052def8074 --- /dev/null +++ b/t/t4211/expect.parallel-change-f-to-main @@ -0,0 +1,160 @@ +commit 0469c60bc4837d52d97b1f081dec5f98dea20fed +Merge: ba227c6 6ce3c4f +Author: Thomas Rast <trast@inf.ethz.ch> +Date: Fri Apr 12 16:16:24 2013 +0200 + + Merge across the rename + + +commit 6ce3c4ff690136099bb17e1a8766b75764726ea7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:49:50 2013 +0100 + + another simple change + +diff --git a/b.c b/b.c +--- a/b.c ++++ b/b.c +@@ -4,14 +4,14 @@ + long f(long x) + { + int s = 0; + while (x) { +- x >>= 1; ++ x /= 2; + s++; + } + return s; + } + + /* + * This is only an example! + */ + + +commit ba227c6632349700fbb957dec2b50f5e2358be3f +Author: Thomas Rast <trast@inf.ethz.ch> +Date: Fri Apr 12 16:15:57 2013 +0200 + + change on another line of history while rename happens + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -4,14 +4,14 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* +- * This is only an example! ++ * This is only a short example! + */ + + +commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:41 2013 +0100 + + touch comment + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,14 +3,14 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* +- * A comment. ++ * This is only an example! + */ + + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,14 +3,14 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* + * A comment. + */ + + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,13 +3,14 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + + /* + * A comment. + */ + + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,13 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} ++ ++/* ++ * A comment. ++ */ ++ diff --git a/t/t4211/expect.simple-f b/t/t4211/expect.simple-f new file mode 100644 index 0000000000..a1f5bc49c8 --- /dev/null +++ b/t/t4211/expect.simple-f @@ -0,0 +1,59 @@ +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,9 +3,9 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,8 +3,9 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,8 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} diff --git a/t/t4211/expect.simple-f-to-main b/t/t4211/expect.simple-f-to-main new file mode 100644 index 0000000000..a475768710 --- /dev/null +++ b/t/t4211/expect.simple-f-to-main @@ -0,0 +1,100 @@ +commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:41 2013 +0100 + + touch comment + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,14 +3,14 @@ + long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* +- * A comment. ++ * This is only an example! + */ + + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,14 +3,14 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } + + /* + * A comment. + */ + + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,13 +3,14 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + + /* + * A comment. + */ + + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,13 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} ++ ++/* ++ * A comment. ++ */ ++ diff --git a/t/t4211/expect.simple-main b/t/t4211/expect.simple-main new file mode 100644 index 0000000000..39ce39bebe --- /dev/null +++ b/t/t4211/expect.simple-main @@ -0,0 +1,68 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -17,5 +17,5 @@ + int main () + { +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +16,5 @@ ++int main () ++{ ++ printf("%d\n", f(15)); ++ return 0; ++} diff --git a/t/t4211/expect.simple-main-to-end b/t/t4211/expect.simple-main-to-end new file mode 100644 index 0000000000..8480bd9cc4 --- /dev/null +++ b/t/t4211/expect.simple-main-to-end @@ -0,0 +1,70 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,7 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} ++ ++/* incomplete lines are bad! */ + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -17,5 +17,5 @@ + int main () + { +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +16,5 @@ ++int main () ++{ ++ printf("%d\n", f(15)); ++ return 0; ++} diff --git a/t/t4211/expect.two-ranges b/t/t4211/expect.two-ranges new file mode 100644 index 0000000000..6109aa0dce --- /dev/null +++ b/t/t4211/expect.two-ranges @@ -0,0 +1,102 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} +\ No newline at end of file ++} + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -18,5 +18,5 @@ + int main () + { + printf("%ld\n", f(15)); + return 0; +-} ++} +\ No newline at end of file + +commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:45:16 2013 +0100 + + touch both functions + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,9 +3,9 @@ +-int f(int x) ++long f(long x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; + } +@@ -17,5 +17,5 @@ + int main () + { +- printf("%d\n", f(15)); ++ printf("%ld\n", f(15)); + return 0; + } + +commit f04fb20f2c77850996cba739709acc6faecc58f7 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:55 2013 +0100 + + change f() + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -3,8 +3,9 @@ + int f(int x) + { + int s = 0; + while (x) { + x >>= 1; + s++; + } ++ return s; + } + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +3,8 @@ ++int f(int x) ++{ ++ int s = 0; ++ while (x) { ++ x >>= 1; ++ s++; ++ } ++} diff --git a/t/t4211/expect.vanishes-early b/t/t4211/expect.vanishes-early new file mode 100644 index 0000000000..1f7cd06941 --- /dev/null +++ b/t/t4211/expect.vanishes-early @@ -0,0 +1,39 @@ +commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83 +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:43 2013 +0100 + + change back to complete line + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -22,1 +24,1 @@ +-} +\ No newline at end of file ++/* incomplete lines are bad! */ + +commit 100b61a6f2f720f812620a9d10afb3a960ccb73c +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:48:10 2013 +0100 + + change to an incomplete line at end + +diff --git a/a.c b/a.c +--- a/a.c ++++ b/a.c +@@ -22,1 +22,1 @@ +-} ++} +\ No newline at end of file + +commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a +Author: Thomas Rast <trast@student.ethz.ch> +Date: Thu Feb 28 10:44:48 2013 +0100 + + initial + +diff --git a/a.c b/a.c +--- /dev/null ++++ b/a.c +@@ -0,0 +20,1 @@ ++} diff --git a/t/t4211/history.export b/t/t4211/history.export new file mode 100644 index 0000000000..f9f41e211e --- /dev/null +++ b/t/t4211/history.export @@ -0,0 +1,406 @@ +blob +mark :1 +data 157 +#include <stdio.h> + +int f(int x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } +} + +/* + * A comment. + */ + +int main () +{ + printf("%d\n", f(15)); + return 0; +} + +reset refs/tags/simple +commit refs/tags/simple +mark :2 +author Thomas Rast <trast@student.ethz.ch> 1362044688 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044688 +0100 +data 8 +initial +M 100644 :1 a.c + +blob +mark :3 +data 168 +#include <stdio.h> + +int f(int x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * A comment. + */ + +int main () +{ + printf("%d\n", f(15)); + return 0; +} + +commit refs/tags/simple +mark :4 +author Thomas Rast <trast@student.ethz.ch> 1362044695 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044695 +0100 +data 11 +change f() +from :2 +M 100644 :3 a.c + +blob +mark :5 +data 171 +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * A comment. + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +commit refs/tags/simple +mark :6 +author Thomas Rast <trast@student.ethz.ch> 1362044716 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044716 +0100 +data 21 +touch both functions +from :4 +M 100644 :5 a.c + +blob +mark :7 +data 185 +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +commit refs/tags/simple +mark :8 +author Thomas Rast <trast@student.ethz.ch> 1362044741 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044741 +0100 +data 14 +touch comment +from :6 +M 100644 :7 a.c + +blob +mark :9 +data 205 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +commit refs/tags/simple +mark :10 +author Thomas Rast <trast@student.ethz.ch> 1362044860 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044860 +0100 +data 25 +change at very beginning +from :8 +M 100644 :9 a.c + +blob +mark :11 +data 204 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} +commit refs/tags/simple +mark :12 +author Thomas Rast <trast@student.ethz.ch> 1362044890 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044890 +0100 +data 36 +change to an incomplete line at end +from :10 +M 100644 :11 a.c + +blob +mark :13 +data 238 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +/* incomplete lines are bad! */ + +commit refs/tags/simple +mark :14 +author Thomas Rast <trast@student.ethz.ch> 1362044923 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044923 +0100 +data 29 +change back to complete line +from :12 +M 100644 :13 a.c + +commit refs/tags/move-support +mark :15 +author Thomas Rast <trast@student.ethz.ch> 1362044968 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044968 +0100 +data 10 +move file +from :14 +D a.c +M 100644 :13 b.c + +blob +mark :16 +data 237 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x /= 2; + s++; + } + return s; +} + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +/* incomplete lines are bad! */ + +commit refs/tags/move-support +mark :17 +author Thomas Rast <trast@student.ethz.ch> 1362044990 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362044990 +0100 +data 22 +another simple change +from :15 +M 100644 :16 b.c + +blob +mark :18 +data 254 +#include <unistd.h> +#include <stdio.h> + +long f(long x); + +/* + * This is only an example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +/* incomplete lines are bad! */ + +long f(long x) +{ + int s = 0; + while (x) { + x /= 2; + s++; + } + return s; +} + +commit refs/heads/master +mark :19 +author Thomas Rast <trast@student.ethz.ch> 1362045024 +0100 +committer Thomas Rast <trast@student.ethz.ch> 1362045024 +0100 +data 21 +move within the file +from :17 +M 100644 :18 b.c + +blob +mark :20 +data 243 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x >>= 1; + s++; + } + return s; +} + +/* + * This is only a short example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +/* incomplete lines are bad! */ + +commit refs/heads/parallel-change +mark :21 +author Thomas Rast <trast@inf.ethz.ch> 1365776157 +0200 +committer Thomas Rast <trast@inf.ethz.ch> 1365776157 +0200 +data 55 +change on another line of history while rename happens +from :14 +M 100644 :20 a.c + +blob +mark :22 +data 242 +#include <unistd.h> +#include <stdio.h> + +long f(long x) +{ + int s = 0; + while (x) { + x /= 2; + s++; + } + return s; +} + +/* + * This is only a short example! + */ + +int main () +{ + printf("%ld\n", f(15)); + return 0; +} + +/* incomplete lines are bad! */ + +commit refs/heads/parallel-change +mark :23 +author Thomas Rast <trast@inf.ethz.ch> 1365776184 +0200 +committer Thomas Rast <trast@inf.ethz.ch> 1365776191 +0200 +data 24 +Merge across the rename +from :21 +merge :17 +D a.c +M 100644 :22 b.c + +reset refs/heads/parallel-change +from :23 + diff --git a/t/t4300-merge-tree.sh b/t/t4300-merge-tree.sh index bd43b3d8ef..9015e47654 100755 --- a/t/t4300-merge-tree.sh +++ b/t/t4300-merge-tree.sh @@ -205,6 +205,19 @@ EXPECTED test_cmp expected actual ' +test_expect_success 'file remove A, B (same)' ' + cat >expected <<\EXPECTED && +EXPECTED + + git reset --hard initial && + test_commit "rm-a-b-base" "ONE" "AAA" && + git rm ONE && + git commit -m "rm-a-b" && + git tag "rm-a-b" && + git merge-tree rm-a-b-base rm-a-b rm-a-b >actual && + test_cmp expected actual +' + test_expect_success 'file change A, remove B' ' cat >expected <<\EXPECTED && removed in remote @@ -246,6 +259,57 @@ EXPECTED test_cmp expected actual ' +test_expect_success 'tree add A, B (same)' ' + cat >expect <<-\EOF && + EOF + git reset --hard initial && + mkdir sub && + test_commit "add sub/file" "sub/file" "file" add-tree-A && + git merge-tree initial add-tree-A add-tree-A >actual && + test_cmp expect actual +' + +test_expect_success 'tree add A, B (different)' ' + cat >expect <<-\EOF && + added in both + our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file + their 100644 ba629238ca89489f2b350e196ca445e09d8bb834 sub/file + @@ -1 +1,5 @@ + +<<<<<<< .our + AAA + +======= + +BBB + +>>>>>>> .their + EOF + git reset --hard initial && + mkdir sub && + test_commit "add sub/file" "sub/file" "AAA" add-tree-a-b-A && + git reset --hard initial && + mkdir sub && + test_commit "add sub/file" "sub/file" "BBB" add-tree-a-b-B && + git merge-tree initial add-tree-a-b-A add-tree-a-b-B >actual && + test_cmp expect actual +' + +test_expect_success 'tree unchanged A, removed B' ' + cat >expect <<-\EOF && + removed in remote + base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file + our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file + @@ -1 +0,0 @@ + -AAA + EOF + git reset --hard initial && + mkdir sub && + test_commit "add sub/file" "sub/file" "AAA" tree-remove-b-initial && + git rm sub/file && + test_tick && + git commit -m "remove sub/file" && + git tag tree-remove-b-B && + git merge-tree tree-remove-b-initial tree-remove-b-initial tree-remove-b-B >actual && + test_cmp expect actual +' + test_expect_success 'turn file to tree' ' git reset --hard initial && rm initial-file && diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 3fbd366ec3..c2023b1a3d 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -30,10 +30,76 @@ GUNZIP=${GUNZIP:-gzip -d} SUBSTFORMAT=%H%n +test_lazy_prereq TAR_NEEDS_PAX_FALLBACK ' + ( + mkdir pax && + cd pax && + "$TAR" xf "$TEST_DIRECTORY"/t5000/pax.tar && + test -f PaxHeaders.1791/file + ) +' + +get_pax_header() { + file=$1 + header=$2= + + while read len rest + do + if test "$len" = $(echo "$len $rest" | wc -c) + then + case "$rest" in + $header*) + echo "${rest#$header}" + ;; + esac + fi + done <"$file" +} + +check_tar() { + tarfile=$1.tar + listfile=$1.lst + dir=$1 + dir_with_prefix=$dir/$2 + + test_expect_success ' extract tar archive' ' + (mkdir $dir && cd $dir && "$TAR" xf -) <$tarfile + ' + + test_expect_success TAR_NEEDS_PAX_FALLBACK ' interpret pax headers' ' + ( + cd $dir && + for header in *.paxheader + do + data=${header%.paxheader}.data && + if test -h $data -o -e $data + then + path=$(get_pax_header $header path) && + if test -n "$path" + then + mv "$data" "$path" + fi + fi + done + ) + ' + + test_expect_success ' validate filenames' ' + (cd ${dir_with_prefix}a && find .) | sort >$listfile && + test_cmp a.lst $listfile + ' + + test_expect_success ' validate file contents' ' + diff -r a ${dir_with_prefix}a + ' +} + test_expect_success \ 'populate workdir' \ - 'mkdir a b c && + 'mkdir a && echo simple textfile >a/a && + ten=0123456789 && hundred=$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten && + echo long filename >a/four$hundred && mkdir a/bin && cp /bin/sh a/bin && printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 && @@ -62,6 +128,12 @@ test_expect_success \ git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ git commit-tree $treeid </dev/null)' +test_expect_success 'setup export-subst' ' + echo "substfile?" export-subst >>.git/info/attributes && + git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \ + >a/substfile1 +' + test_expect_success \ 'create bare clone' \ 'git clone --bare . bare.git && @@ -75,13 +147,19 @@ test_expect_success \ 'git archive' \ 'git archive HEAD >b.tar' -test_expect_success \ - 'git tar-tree' \ - 'git tar-tree HEAD >b2.tar' +check_tar b -test_expect_success \ - 'git archive vs. git tar-tree' \ - 'test_cmp b.tar b2.tar' +test_expect_success 'git archive --prefix=prefix/' ' + git archive --prefix=prefix/ HEAD >with_prefix.tar +' + +check_tar with_prefix prefix/ + +test_expect_success 'git-archive --prefix=olde-' ' + git archive --prefix=olde- HEAD >with_olde-prefix.tar +' + +check_tar with_olde-prefix olde- test_expect_success 'git archive on large files' ' test_config core.bigfilethreshold 1 && @@ -118,66 +196,14 @@ test_expect_success \ 'git get-tar-commit-id <b.tar >b.commitid && test_cmp .git/$(git symbolic-ref HEAD) b.commitid' -test_expect_success \ - 'extract tar archive' \ - '(cd b && "$TAR" xf -) <b.tar' - -test_expect_success \ - 'validate filenames' \ - '(cd b/a && find .) | sort >b.lst && - test_cmp a.lst b.lst' - -test_expect_success \ - 'validate file contents' \ - 'diff -r a b/a' - -test_expect_success \ - 'git tar-tree with prefix' \ - 'git tar-tree HEAD prefix >c.tar' - -test_expect_success \ - 'extract tar archive with prefix' \ - '(cd c && "$TAR" xf -) <c.tar' - -test_expect_success \ - 'validate filenames with prefix' \ - '(cd c/prefix/a && find .) | sort >c.lst && - test_cmp a.lst c.lst' - -test_expect_success \ - 'validate file contents with prefix' \ - 'diff -r a c/prefix/a' - -test_expect_success \ - 'create archives with substfiles' \ - 'cp .git/info/attributes .git/info/attributes.before && - echo "substfile?" export-subst >>.git/info/attributes && - git archive HEAD >f.tar && - git archive --prefix=prefix/ HEAD >g.tar && - mv .git/info/attributes.before .git/info/attributes' - -test_expect_success \ - 'extract substfiles' \ - '(mkdir f && cd f && "$TAR" xf -) <f.tar' - -test_expect_success \ - 'validate substfile contents' \ - 'git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \ - >f/a/substfile1.expected && - test_cmp f/a/substfile1.expected f/a/substfile1 && - test_cmp a/substfile2 f/a/substfile2 +test_expect_success 'git tar-tree' ' + git tar-tree HEAD >tar-tree.tar && + test_cmp b.tar tar-tree.tar ' -test_expect_success \ - 'extract substfiles from archive with prefix' \ - '(mkdir g && cd g && "$TAR" xf -) <g.tar' - -test_expect_success \ - 'validate substfile contents from archive with prefix' \ - 'git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \ - >g/prefix/a/substfile1.expected && - test_cmp g/prefix/a/substfile1.expected g/prefix/a/substfile1 && - test_cmp a/substfile2 g/prefix/a/substfile2 +test_expect_success 'git tar-tree with prefix' ' + git tar-tree HEAD prefix >tar-tree_with_prefix.tar && + test_cmp with_prefix.tar tar-tree_with_prefix.tar ' test_expect_success 'git archive with --output, override inferred format' ' @@ -197,18 +223,6 @@ test_expect_success 'clients cannot access unreachable commits' ' test_must_fail git archive --remote=. $sha1 >remote.tar ' -test_expect_success 'git-archive --prefix=olde-' ' - git archive --prefix=olde- >h.tar HEAD && - ( - mkdir h && - cd h && - "$TAR" xf - <../h.tar - ) && - test -d h/olde-a && - test -d h/olde-a/bin && - test -f h/olde-a/bin/sh -' - test_expect_success 'setup tar filters' ' git config tar.tar.foo.command "tr ab ba" && git config tar.bar.command "tr ab ba" && diff --git a/t/t5000/pax.tar b/t/t5000/pax.tar Binary files differnew file mode 100644 index 0000000000..d911737149 --- /dev/null +++ b/t/t5000/pax.tar diff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh index 4e7b05dd23..c72f71eb18 100755 --- a/t/t5003-archive-zip.sh +++ b/t/t5003-archive-zip.sh @@ -37,7 +37,7 @@ check_zip() { test_expect_success \ 'populate workdir' \ - 'mkdir a b c && + 'mkdir a && echo simple textfile >a/a && mkdir a/bin && cp /bin/sh a/bin && diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh index bfdb56a069..67f3b54bed 100755 --- a/t/t5004-archive-corner-cases.sh +++ b/t/t5004-archive-corner-cases.sh @@ -23,17 +23,31 @@ check_dir() { echo "$dir/$i" done } | sort >expect && - find "$dir" -print | sort >actual && + find "$dir" ! -name pax_global_header -print | sort >actual && test_cmp expect actual } -test_expect_success 'tar archive of empty tree is empty' ' - git archive --format=tar HEAD: >empty.tar && + +# bsdtar/libarchive versions before 3.1.3 consider a tar file with a +# global pax header that is not followed by a file record as corrupt. +if "$TAR" tf "$TEST_DIRECTORY"/t5004/empty-with-pax-header.tar >/dev/null 2>&1 +then + test_set_prereq HEADER_ONLY_TAR_OK +fi + +test_expect_success HEADER_ONLY_TAR_OK 'tar archive of commit with empty tree' ' + git archive --format=tar HEAD >empty-with-pax-header.tar && make_dir extract && - "$TAR" xf empty.tar -C extract && + "$TAR" xf empty-with-pax-header.tar -C extract && check_dir extract ' +test_expect_success 'tar archive of empty tree is empty' ' + git archive --format=tar HEAD: >empty.tar && + perl -e "print \"\\0\" x 10240" >10knuls.tar && + test_cmp 10knuls.tar empty.tar +' + test_expect_success 'tar archive of empty tree with prefix' ' git archive --format=tar --prefix=foo/ HEAD >prefix.tar && make_dir extract && diff --git a/t/t5004/empty-with-pax-header.tar b/t/t5004/empty-with-pax-header.tar Binary files differnew file mode 100644 index 0000000000..da9e39e6cf --- /dev/null +++ b/t/t5004/empty-with-pax-header.tar diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh index baa670cea5..ea2e0d4b48 100755 --- a/t/t5407-post-rewrite-hook.sh +++ b/t/t5407-post-rewrite-hook.sh @@ -31,8 +31,8 @@ clear_hook_input () { } verify_hook_input () { - test_cmp "$TRASH_DIRECTORY"/post-rewrite.args expected.args && - test_cmp "$TRASH_DIRECTORY"/post-rewrite.data expected.data + test_cmp expected.args "$TRASH_DIRECTORY"/post-rewrite.args && + test_cmp expected.data "$TRASH_DIRECTORY"/post-rewrite.data } test_expect_success 'git commit --amend' ' diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index d574085696..fd2598e601 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -135,6 +135,13 @@ test_expect_success 'clone shallow depth 1' ' test "`git --git-dir=shallow0/.git rev-list --count HEAD`" = 1 ' +test_expect_success 'clone shallow depth 1 with fsck' ' + git config --global fetch.fsckobjects true && + git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0fsck && + test "`git --git-dir=shallow0fsck/.git rev-list --count HEAD`" = 1 && + git config --global --unset fetch.fsckobjects +' + test_expect_success 'clone shallow' ' git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow ' @@ -373,6 +380,20 @@ test_expect_success 'clone shallow with packed refs' ' test_cmp count8.expected count8.actual ' +test_expect_success 'fetch in shallow repo unreachable shallow objects' ' + ( + git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog && + git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 && + cd no-reflog && + git tag -d TAGB1 TAGB2 && + git update-ref refs/heads/B B~~ && + git gc --prune=now && + cd ../shallow9 && + git fetch origin && + git fsck --no-dangling + ) +' + test_expect_success 'setup tests for the --stdin parameter' ' for head in C D E F do diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 6579a86724..dd10ff053c 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -1003,4 +1003,26 @@ test_expect_success 'remote set-url --delete baz' ' cmp expect actual ' +test_expect_success 'extra args: setup' ' + # add a dummy origin so that this does not trigger failure + git remote add origin . +' + +test_extra_arg () { + test_expect_success "extra args: $*" " + test_must_fail git remote $* bogus_extra_arg 2>actual && + grep '^usage:' actual + " +} + +test_extra_arg add nick url +test_extra_arg rename origin newname +test_extra_arg remove origin +test_extra_arg set-head origin master +# set-branches takes any number of args +test_extra_arg set-url origin newurl oldurl +# show takes any number of args +# prune takes any number of args +# update takes any number of args + test_done diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index d7a19a1829..fde689166a 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -370,30 +370,39 @@ test_expect_success 'bundle should record HEAD correctly' ' ' -test_expect_success 'explicit fetch should not update tracking' ' +test_expect_success 'mark initial state of origin/master' ' + ( + cd three && + git tag base-origin-master refs/remotes/origin/master + ) +' + +test_expect_success 'explicit fetch should update tracking' ' cd "$D" && git branch -f side && ( cd three && + git update-ref refs/remotes/origin/master base-origin-master && o=$(git rev-parse --verify refs/remotes/origin/master) && git fetch origin master && n=$(git rev-parse --verify refs/remotes/origin/master) && - test "$o" = "$n" && + test "$o" != "$n" && test_must_fail git rev-parse --verify refs/remotes/origin/side ) ' -test_expect_success 'explicit pull should not update tracking' ' +test_expect_success 'explicit pull should update tracking' ' cd "$D" && git branch -f side && ( cd three && + git update-ref refs/remotes/origin/master base-origin-master && o=$(git rev-parse --verify refs/remotes/origin/master) && git pull origin master && n=$(git rev-parse --verify refs/remotes/origin/master) && - test "$o" = "$n" && + test "$o" != "$n" && test_must_fail git rev-parse --verify refs/remotes/origin/side ) ' @@ -404,6 +413,7 @@ test_expect_success 'configured fetch updates tracking' ' git branch -f side && ( cd three && + git update-ref refs/remotes/origin/master base-origin-master && o=$(git rev-parse --verify refs/remotes/origin/master) && git fetch origin && n=$(git rev-parse --verify refs/remotes/origin/master) && @@ -412,6 +422,22 @@ test_expect_success 'configured fetch updates tracking' ' ) ' +test_expect_success 'non-matching refspecs do not confuse tracking update' ' + cd "$D" && + git update-ref refs/odd/location HEAD && + ( + cd three && + git update-ref refs/remotes/origin/master base-origin-master && + git config --add remote.origin.fetch \ + refs/odd/location:refs/remotes/origin/odd && + o=$(git rev-parse --verify refs/remotes/origin/master) && + git fetch origin master && + n=$(git rev-parse --verify refs/remotes/origin/master) && + test "$o" != "$n" && + test_must_fail git rev-parse --verify refs/remotes/origin/odd + ) +' + test_expect_success 'pushing nonexistent branch by mistake should not segv' ' cd "$D" && diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh index b23efbbfd9..55a866af80 100755 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@ -209,13 +209,17 @@ test_expect_success EXPENSIVE 'create 50,000 tags in the repo' ' # now assign tags to all the dangling commits we created above tag=$("$PERL_PATH" -e "print \"bla\" x 30") && - sed -e "s/^:\(.\+\) \(.\+\)$/\2 refs\/tags\/$tag-\1/" <marks >>packed-refs + sed -e "s|^:\([^ ]*\) \(.*\)$|\2 refs/tags/$tag-\1|" <marks >>packed-refs ) ' test_expect_success EXPENSIVE 'clone the 50,000 tag repo to check OS command line overflow' ' git clone $HTTPD_URL/smart/repo.git too-many-refs 2>err && - test_line_count = 0 err + test_line_count = 0 err && + ( + cd too-many-refs && + test $(git for-each-ref refs/tags | wc -l) = 50000 + ) ' stop_httpd diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 67869b4813..0629149edd 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -280,4 +280,9 @@ test_expect_success 'clone checking out a tag' ' test_cmp fetch.expected fetch.actual ' +test_expect_success NOT_MINGW,NOT_CYGWIN 'clone local path foo:bar' ' + cp -R src "foo:bar" && + git clone "./foo:bar" foobar +' + test_done diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 69212cdde1..4899af3f7a 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -8,11 +8,6 @@ test_description='Test remote-helper import and export commands' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-gpg.sh -if ! type "${BASH-bash}" >/dev/null 2>&1; then - skip_all='skipping remote-testgit tests, bash not available' - test_done -fi - compare_refs() { git --git-dir="$1/.git" rev-parse --verify $2 >expect && git --git-dir="$3/.git" rev-parse --verify $4 >actual && @@ -101,39 +96,28 @@ test_expect_failure 'push new branch with old:new refspec' ' test_expect_success 'cloning without refspec' ' GIT_REMOTE_TESTGIT_REFSPEC="" \ - git clone "testgit::${PWD}/server" local2 && + git clone "testgit::${PWD}/server" local2 2>error && + grep "This remote helper should implement refspec capability" error && compare_refs local2 HEAD server HEAD ' test_expect_success 'pulling without refspecs' ' (cd local2 && git reset --hard && - GIT_REMOTE_TESTGIT_REFSPEC="" git pull) && + GIT_REMOTE_TESTGIT_REFSPEC="" git pull 2>../error) && + grep "This remote helper should implement refspec capability" error && compare_refs local2 HEAD server HEAD ' -test_expect_failure 'pushing without refspecs' ' +test_expect_success 'pushing without refspecs' ' test_when_finished "(cd local2 && git reset --hard origin)" && (cd local2 && echo content >>file && git commit -a -m ten && - GIT_REMOTE_TESTGIT_REFSPEC="" git push) && - compare_refs local2 HEAD server HEAD -' - -test_expect_success 'pulling with straight refspec' ' - (cd local2 && - GIT_REMOTE_TESTGIT_REFSPEC="*:*" git pull) && - compare_refs local2 HEAD server HEAD -' - -test_expect_failure 'pushing with straight refspec' ' - test_when_finished "(cd local2 && git reset --hard origin)" && - (cd local2 && - echo content >>file && - git commit -a -m eleven && - GIT_REMOTE_TESTGIT_REFSPEC="*:*" git push) && - compare_refs local2 HEAD server HEAD + GIT_REMOTE_TESTGIT_REFSPEC="" && + export GIT_REMOTE_TESTGIT_REFSPEC && + test_must_fail git push 2>../error) && + grep "remote-helper doesn.t support push; refspec needed" error ' test_expect_success 'pulling without marks' ' @@ -186,4 +170,64 @@ test_expect_success GPG 'push signed tag with signed-tags capability' ' compare_refs local signed-tag-2 server signed-tag-2 ' +test_expect_success 'push update refs' ' + (cd local && + git checkout -b update master && + echo update >>file && + git commit -a -m update && + git push origin update && + git rev-parse --verify remotes/origin/update >expect && + git rev-parse --verify testgit/origin/heads/update >actual && + test_cmp expect actual + ) +' + +test_expect_success 'push update refs failure' ' + (cd local && + git checkout update && + echo "update fail" >>file && + git commit -a -m "update fail" && + git rev-parse --verify testgit/origin/heads/update >expect && + GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" && + export GIT_REMOTE_TESTGIT_PUSH_ERROR && + test_expect_code 1 git push origin update && + git rev-parse --verify testgit/origin/heads/update >actual && + test_cmp expect actual + ) +' + +test_expect_success 'proper failure checks for fetching' ' + (GIT_REMOTE_TESTGIT_FAILURE=1 && + export GIT_REMOTE_TESTGIT_FAILURE && + cd local && + test_must_fail git fetch 2> error && + cat error && + grep -q "Error while running fast-import" error + ) +' + +test_expect_success 'proper failure checks for pushing' ' + (GIT_REMOTE_TESTGIT_FAILURE=1 && + export GIT_REMOTE_TESTGIT_FAILURE && + cd local && + test_must_fail git push --all 2> error && + cat error && + grep -q "Reading from helper .git-remote-testgit. failed" error + ) +' + +test_expect_success 'push messages' ' + (cd local && + git checkout -b new_branch master && + echo new >>file && + git commit -a -m new && + git push origin new_branch && + git fetch origin && + echo new >>file && + git commit -a -m new && + git push origin new_branch 2> msg && + ! grep "\[new branch\]" msg + ) +' + test_done diff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh index 39b4cb0ecd..dd5b0e55d2 100755 --- a/t/t6019-rev-list-ancestry-path.sh +++ b/t/t6019-rev-list-ancestry-path.sh @@ -13,6 +13,9 @@ test_description='--ancestry-path' # # D..M -- M.t == M # --ancestry-path D..M -- M.t == M +# +# F...I == F G H I +# --ancestry-path F...I == F H I . ./test-lib.sh @@ -63,13 +66,29 @@ test_expect_success 'rev-list D..M -- M.t' ' test_cmp expect actual ' -test_expect_success 'rev-list --ancestry-patch D..M -- M.t' ' +test_expect_success 'rev-list --ancestry-path D..M -- M.t' ' echo M >expect && git rev-list --ancestry-path --format=%s D..M -- M.t | sed -e "/^commit /d" >actual && test_cmp expect actual ' +test_expect_success 'rev-list F...I' ' + for c in F G H I; do echo $c; done >expect && + git rev-list --format=%s F...I | + sed -e "/^commit /d" | + sort >actual && + test_cmp expect actual +' + +test_expect_success 'rev-list --ancestry-path F...I' ' + for c in F H I; do echo $c; done >expect && + git rev-list --ancestry-path --format=%s F...I | + sed -e "/^commit /d" | + sort >actual && + test_cmp expect actual +' + # b---bc # / \ / # a X diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index f67aa6ff6a..a25729f2a7 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -110,6 +110,9 @@ check_describe tags/e --all HEAD^^^ check_describe B-0-* --long HEAD^^2^ check_describe A-3-* --long HEAD^^2 +check_describe c-7-* --tags +check_describe e-3-* --first-parent --tags + : >err.expect check_describe A --all A^0 test_expect_success 'no warning was displayed for A' ' diff --git a/t/t7201-co.sh b/t/t7201-co.sh index be9672e5a0..0c9ec0ad44 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -431,6 +431,7 @@ test_expect_success 'detach a symbolic link HEAD' ' test_expect_success \ 'checkout with --track fakes a sensible -b <name>' ' + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git update-ref refs/remotes/origin/koala/bear renamer && git checkout --track origin/koala/bear && diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 195e7477d8..99ce36f5ef 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -524,4 +524,17 @@ test_expect_success 'commit a file whose name is a dash' ' test_i18ngrep " changed, 5 insertions" output ' +test_expect_success '--only works on to-be-born branch' ' + # This test relies on having something in the index, as it + # would not otherwise actually prove much. So check this. + test -n "$(git ls-files)" && + git checkout --orphan orphan && + echo foo >newfile && + git add newfile && + git commit --only newfile -m"--only on unborn branch" && + echo newfile >expected && + git ls-tree -r --name-only HEAD >actual && + test_cmp expected actual +' + test_done diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index a4938b1e45..6313da2cdd 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -361,6 +361,23 @@ test_expect_success !AUTOIDENT 'do not fire editor when committer is bogus' ' test_cmp expect .git/result ' +test_expect_success 'do not fire editor if -m <msg> was given' ' + echo tick >file && + git add file && + echo "editor not started" >.git/result && + (GIT_EDITOR="\"$(pwd)/.git/FAKE_EDITOR\"" git commit -m tick) && + test "$(cat .git/result)" = "editor not started" +' + +test_expect_success 'do not fire editor if -m "" was given' ' + echo tock >file && + git add file && + echo "editor not started" >.git/result && + (GIT_EDITOR="\"$(pwd)/.git/FAKE_EDITOR\"" \ + git commit -m "" --allow-empty-message) && + test "$(cat .git/result)" = "editor not started" +' + test_expect_success 'do not fire editor in the presence of conflicts' ' git clean -f && diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index a6bd99eaf5..2418528487 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -356,6 +356,13 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory' ' ) ' +run_dir_diff_test 'difftool --dir-diff when worktree file is missing' ' + test_when_finished git reset --hard && + rm file2 && + git difftool --dir-diff $symlinks --extcmd ls branch master >output && + grep file2 output +' + write_script .git/CHECK_SYMLINKS <<\EOF for f in file file2 sub/sub do @@ -378,6 +385,25 @@ test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstage test_cmp actual expect ' +write_script modify-right-file <<\EOF +echo "new content" >"$2/file" +EOF + +run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' ' + test_when_finished git reset --hard && + echo "orig content" >file && + git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch && + echo "new content" >expect && + test_cmp expect file +' + +run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' ' + test_when_finished git reset --hard && + git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch && + echo "new content" >expect && + test_cmp expect file +' + write_script modify-file <<\EOF echo "new content" >file EOF diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh index 230143cf31..e7cac1db55 100755 --- a/t/t8003-blame-corner-cases.sh +++ b/t/t8003-blame-corner-cases.sh @@ -175,6 +175,12 @@ test_expect_success 'blame -L with invalid end' ' grep "has only 2 lines" errors ' +test_expect_success 'blame parses <end> part of -L' ' + git blame -L1,1 tres >out && + cat out && + test $(wc -l < out) -eq 1 +' + test_expect_success 'indent of line numbers, nine lines' ' git blame nine_lines >actual && test $(grep -c " " actual) = 0 diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index ebd5c5db45..5d2dbe98d5 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -1003,55 +1003,6 @@ test_expect_success $PREREQ 'threading but no chain-reply-to' ' grep "In-Reply-To: " stdout ' -test_expect_success $PREREQ 'warning with an implicit --chain-reply-to' ' - git send-email \ - --dry-run \ - --from="Example <nobody@example.com>" \ - --to=nobody@example.com \ - outdir/000?-*.patch 2>errors >out && - grep "no-chain-reply-to" errors -' - -test_expect_success $PREREQ 'no warning with an explicit --chain-reply-to' ' - git send-email \ - --dry-run \ - --from="Example <nobody@example.com>" \ - --to=nobody@example.com \ - --chain-reply-to \ - outdir/000?-*.patch 2>errors >out && - ! grep "no-chain-reply-to" errors -' - -test_expect_success $PREREQ 'no warning with an explicit --no-chain-reply-to' ' - git send-email \ - --dry-run \ - --from="Example <nobody@example.com>" \ - --to=nobody@example.com \ - --nochain-reply-to \ - outdir/000?-*.patch 2>errors >out && - ! grep "no-chain-reply-to" errors -' - -test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = false' ' - git config sendemail.chainreplyto false && - git send-email \ - --dry-run \ - --from="Example <nobody@example.com>" \ - --to=nobody@example.com \ - outdir/000?-*.patch 2>errors >out && - ! grep "no-chain-reply-to" errors -' - -test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = true' ' - git config sendemail.chainreplyto true && - git send-email \ - --dry-run \ - --from="Example <nobody@example.com>" \ - --to=nobody@example.com \ - outdir/000?-*.patch 2>errors >out && - ! grep "no-chain-reply-to" errors -' - test_expect_success $PREREQ 'sendemail.to works' ' git config --replace-all sendemail.to "Somebody <somebody@ex.com>" && git send-email \ diff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh index 3077851015..f524d2f383 100755 --- a/t/t9114-git-svn-dcommit-merge.sh +++ b/t/t9114-git-svn-dcommit-merge.sh @@ -48,7 +48,7 @@ test_expect_success 'setup svn repository' ' test_expect_success 'setup git mirror and merge' ' git svn init "$svnrepo" -t tags -T trunk -b branches && git svn fetch && - git checkout --track -b svn remotes/trunk && + git checkout -b svn remotes/trunk && git checkout -b merge && echo new file > new_file && git add new_file && diff --git a/t/t9147-git-svn-include-paths.sh b/t/t9147-git-svn-include-paths.sh new file mode 100755 index 0000000000..a90ff58629 --- /dev/null +++ b/t/t9147-git-svn-include-paths.sh @@ -0,0 +1,149 @@ +#!/bin/sh +# +# Copyright (c) 2013 Paul Walmsley - based on t9134 by Vitaly Shukela +# + +test_description='git svn property tests' +. ./lib-git-svn.sh + +test_expect_success 'setup test repository' ' + svn_cmd co "$svnrepo" s && + ( + cd s && + mkdir qqq www xxx && + echo test_qqq > qqq/test_qqq.txt && + echo test_www > www/test_www.txt && + echo test_xxx > xxx/test_xxx.txt && + svn_cmd add qqq && + svn_cmd add www && + svn_cmd add xxx && + svn_cmd commit -m "create some files" && + svn_cmd up && + echo hi >> www/test_www.txt && + svn_cmd commit -m "modify www/test_www.txt" && + svn_cmd up + ) +' + +test_expect_success 'clone an SVN repository with filter to include qqq directory' ' + git svn clone --include-paths="qqq" "$svnrepo" g && + echo test_qqq > expect && + for i in g/*/*.txt; do cat $i >> expect2; done && + test_cmp expect expect2 +' + + +test_expect_success 'init+fetch an SVN repository with included qqq directory' ' + git svn init "$svnrepo" c && + ( cd c && git svn fetch --include-paths="qqq" ) && + rm expect2 && + echo test_qqq > expect && + for i in c/*/*.txt; do cat $i >> expect2; done && + test_cmp expect expect2 +' + +test_expect_success 'verify include-paths config saved by clone' ' + ( + cd g && + git config --get svn-remote.svn.include-paths | fgrep "qqq" + ) +' + +test_expect_success 'SVN-side change outside of www' ' + ( + cd s && + echo b >> qqq/test_qqq.txt && + svn_cmd commit -m "SVN-side change outside of www" && + svn_cmd up && + svn_cmd log -v | fgrep "SVN-side change outside of www" + ) +' + +test_expect_success 'update git svn-cloned repo (config include)' ' + ( + cd g && + git svn rebase && + printf "test_qqq\nb\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_expect_success 'update git svn-cloned repo (option include)' ' + ( + cd c && + git svn rebase --include-paths="qqq" && + printf "test_qqq\nb\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_expect_success 'SVN-side change inside of ignored www' ' + ( + cd s && + echo zaq >> www/test_www.txt + svn_cmd commit -m "SVN-side change inside of www/test_www.txt" && + svn_cmd up && + svn_cmd log -v | fgrep "SVN-side change inside of www/test_www.txt" + ) +' + +test_expect_success 'update git svn-cloned repo (config include)' ' + ( + cd g && + git svn rebase && + printf "test_qqq\nb\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_expect_success 'update git svn-cloned repo (option include)' ' + ( + cd c && + git svn rebase --include-paths="qqq" && + printf "test_qqq\nb\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_expect_success 'SVN-side change in and out of included qqq' ' + ( + cd s && + echo cvf >> www/test_www.txt + echo ygg >> qqq/test_qqq.txt + svn_cmd commit -m "SVN-side change in and out of ignored www" && + svn_cmd up && + svn_cmd log -v | fgrep "SVN-side change in and out of ignored www" + ) +' + +test_expect_success 'update git svn-cloned repo again (config include)' ' + ( + cd g && + git svn rebase && + printf "test_qqq\nb\nygg\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_expect_success 'update git svn-cloned repo again (option include)' ' + ( + cd c && + git svn rebase --include-paths="qqq" && + printf "test_qqq\nb\nygg\n" > expect && + for i in */*.txt; do cat $i >> expect2; done && + test_cmp expect2 expect && + rm expect expect2 + ) +' + +test_done diff --git a/t/t9161-git-svn-mergeinfo-push.sh b/t/t9161-git-svn-mergeinfo-push.sh index 6ef0c0bde3..1eab7015c7 100755 --- a/t/t9161-git-svn-mergeinfo-push.sh +++ b/t/t9161-git-svn-mergeinfo-push.sh @@ -88,7 +88,6 @@ test_expect_success 'check reintegration mergeinfo' ' test "$mergeinfo" = "/branches/svnb1:2-4,7-9,13-18 /branches/svnb2:3,8,16-17 /branches/svnb3:4,9 -/branches/svnb4:5-6,10-12 /branches/svnb5:6,11" ' diff --git a/t/t9167-git-svn-cmd-branch-subproject.sh b/t/t9167-git-svn-cmd-branch-subproject.sh new file mode 100755 index 0000000000..53def876ed --- /dev/null +++ b/t/t9167-git-svn-cmd-branch-subproject.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Copyright (c) 2013 Tobias Schulte +# + +test_description='git svn branch for subproject clones' +. ./lib-git-svn.sh + +test_expect_success 'initialize svnrepo' ' + mkdir import && + ( + cd import && + mkdir -p trunk/project branches tags && + ( + cd trunk/project && + echo foo > foo + ) && + svn_cmd import -m "import for git-svn" . "$svnrepo" >/dev/null + ) && + rm -rf import && + svn_cmd co "$svnrepo"/trunk/project trunk/project && + ( + cd trunk/project && + echo bar >> foo && + svn_cmd ci -m "updated trunk" + ) && + rm -rf trunk +' + +test_expect_success 'import into git' ' + git svn init --trunk=trunk/project --branches=branches/*/project \ + --tags=tags/*/project "$svnrepo" && + git svn fetch && + git checkout remotes/trunk +' + +test_expect_success 'git svn branch tests' ' + test_must_fail git svn branch a && + git svn branch --parents a && + test_must_fail git svn branch -t tag1 && + git svn branch --parents -t tag1 && + test_must_fail git svn branch --tag tag2 && + git svn branch --parents --tag tag2 && + test_must_fail git svn tag tag3 && + git svn tag --parents tag3 +' + +test_done diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 6d9d1418a0..81a1657efb 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -347,4 +347,81 @@ test_expect_success 'send-email' ' test_completion "git send-email ma" "master " ' +test_expect_success 'complete files' ' + git init tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + echo "expected" > .gitignore && + echo "out" >> .gitignore && + + git add .gitignore && + test_completion "git commit " ".gitignore" && + + git commit -m ignore && + + touch new && + test_completion "git add " "new" && + + git add new && + git commit -a -m new && + test_completion "git add " "" && + + git mv new modified && + echo modify > modified && + test_completion "git add " "modified" && + + touch untracked && + + : TODO .gitignore should not be here && + test_completion "git rm " <<-\EOF && + .gitignore + modified + EOF + + test_completion "git clean " "untracked" && + + : TODO .gitignore should not be here && + test_completion "git mv " <<-\EOF && + .gitignore + modified + EOF + + mkdir dir && + touch dir/file-in-dir && + git add dir/file-in-dir && + git commit -m dir && + + mkdir untracked-dir && + + : TODO .gitignore should not be here && + test_completion "git mv modified " <<-\EOF && + .gitignore + dir + modified + untracked + untracked-dir + EOF + + test_completion "git commit " "modified" && + + : TODO .gitignore should not be here && + test_completion "git ls-files " <<-\EOF + .gitignore + dir + modified + EOF + + touch momified && + test_completion "git add mom" "momified" +' + +test_expect_failure 'complete with tilde expansion' ' + git init tmp && cd tmp && + test_when_finished "cd .. && rm -rf tmp" && + + touch ~/tmp/file && + + test_completion "git add ~/tmp/" "~/tmp/file" +' + test_done diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index e147a8d277..15521cc4f9 100755 --- a/t/t9903-bash-prompt.sh +++ b/t/t9903-bash-prompt.sh @@ -28,6 +28,10 @@ test_expect_success 'setup for prompt tests' ' git checkout -b b2 master && echo 0 > file && git commit -m "second b2" file && + echo 00 > file && + git commit -m "another b2" file && + echo 000 > file && + git commit -m "yet another b2" file && git checkout master ' @@ -243,10 +247,12 @@ test_expect_success 'prompt - inside bare repository' ' ' test_expect_success 'prompt - interactive rebase' ' - printf " (b1|REBASE-i)" > expected + printf " (b1|REBASE-i 2/3)" > expected echo "#!$SHELL_PATH" >fake_editor.sh && cat >>fake_editor.sh <<\EOF && -echo "edit $(git log -1 --format="%h")" > "$1" +echo "exec echo" > "$1" +echo "edit $(git log -1 --format="%h")" >> "$1" +echo "exec echo" >> "$1" EOF test_when_finished "rm -f fake_editor.sh" && chmod a+x fake_editor.sh && @@ -260,7 +266,7 @@ EOF ' test_expect_success 'prompt - rebase merge' ' - printf " (b2|REBASE-m)" > expected && + printf " (b2|REBASE-m 1/3)" > expected && git checkout b2 && test_when_finished "git checkout master" && test_must_fail git rebase --merge b1 b2 && @@ -270,7 +276,7 @@ test_expect_success 'prompt - rebase merge' ' ' test_expect_success 'prompt - rebase' ' - printf " ((t2)|REBASE)" > expected && + printf " (b2|REBASE 1/3)" > expected && git checkout b2 && test_when_finished "git checkout master" && test_must_fail git rebase b1 b2 && diff --git a/t/test-lib.sh b/t/test-lib.sh index ca6bdef63d..eff3a653d1 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -54,8 +54,8 @@ done,*) # do not redirect again ;; *' --tee '*|*' --va'*) - mkdir -p test-results - BASE=test-results/$(basename "$0" .sh) + mkdir -p "$TEST_OUTPUT_DIRECTORY/test-results" + BASE="$TEST_OUTPUT_DIRECTORY/test-results/$(basename "$0" .sh)" (GIT_TEST_TEE_STARTED=done ${SHELL_PATH} "$0" "$@" 2>&1; echo $? > $BASE.exit) | tee $BASE.out test "$(cat $BASE.exit)" = 0 diff --git a/t/valgrind/analyze.sh b/t/valgrind/analyze.sh index d8105d9fab..2ffc80f721 100755 --- a/t/valgrind/analyze.sh +++ b/t/valgrind/analyze.sh @@ -1,6 +1,10 @@ #!/bin/sh -out_prefix=$(dirname "$0")/../test-results/valgrind.out +# Get TEST_OUTPUT_DIRECTORY from GIT-BUILD-OPTIONS if it's there... +. "$(dirname "$0")/../../GIT-BUILD-OPTIONS" +# ... otherwise set it to the default value. +: ${TEST_OUTPUT_DIRECTORY=$(dirname "$0")/..} + output= count=0 total_count=0 @@ -115,7 +119,7 @@ handle_one () { finish_output } -for test_script in "$(dirname "$0")"/../test-results/*.out +for test_script in "$TEST_OUTPUT_DIRECTORY"/test-results/*.out do handle_one $test_script done diff --git a/test-chmtime.c b/test-chmtime.c index 1cffa12656..923bf327f8 100644 --- a/test-chmtime.c +++ b/test-chmtime.c @@ -56,7 +56,7 @@ static int timespec_arg(const char *arg, long int *set_time, int *set_eq) return 1; } -int main(int argc, const char *argv[]) +int main(int argc, char *argv[]) { static int verbose; diff --git a/test-index-version.c b/test-index-version.c index bfaad9e09e..05d4699c4a 100644 --- a/test-index-version.c +++ b/test-index-version.c @@ -1,6 +1,6 @@ #include "cache.h" -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct cache_header hdr; int version; diff --git a/test-mergesort.c b/test-mergesort.c index 3f388b4ce0..ea3b959e94 100644 --- a/test-mergesort.c +++ b/test-mergesort.c @@ -22,7 +22,7 @@ static int compare_strings(const void *a, const void *b) return strcmp(x->text, y->text); } -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct line *line, *p = NULL, *lines = NULL; struct strbuf sb = STRBUF_INIT; diff --git a/test-parse-options.c b/test-parse-options.c index 3c9510a701..434e8b8929 100644 --- a/test-parse-options.c +++ b/test-parse-options.c @@ -29,7 +29,7 @@ static int number_callback(const struct option *opt, const char *arg, int unset) return 0; } -int main(int argc, const char **argv) +int main(int argc, char **argv) { const char *prefix = "prefix/"; const char *usage[] = { @@ -81,7 +81,7 @@ int main(int argc, const char **argv) }; int i; - argc = parse_options(argc, argv, prefix, options, usage, 0); + argc = parse_options(argc, (const char **)argv, prefix, options, usage, 0); printf("boolean: %d\n", boolean); printf("integer: %u\n", integer); diff --git a/test-subprocess.c b/test-subprocess.c index f2d4c0d22b..93525eb7be 100644 --- a/test-subprocess.c +++ b/test-subprocess.c @@ -1,7 +1,7 @@ #include "cache.h" #include "run-command.h" -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct child_process cp; int nogit = 0; @@ -15,6 +15,6 @@ int main(int argc, const char **argv) } memset(&cp, 0, sizeof(cp)); cp.git_cmd = 1; - cp.argv = argv + 1; + cp.argv = (const char **)argv + 1; return run_command(&cp); } diff --git a/transport-helper.c b/transport-helper.c index 5f8d075ed8..06c08a1786 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -11,6 +11,7 @@ #include "thread-utils.h" #include "sigchain.h" #include "argv-array.h" +#include "refs.h" static int debug; @@ -47,7 +48,7 @@ static void sendline(struct helper_data *helper, struct strbuf *buffer) die_errno("Full write to remote helper failed"); } -static int recvline_fh(FILE *helper, struct strbuf *buffer) +static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name) { strbuf_reset(buffer); if (debug) @@ -55,7 +56,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer) if (strbuf_getline(buffer, helper, '\n') == EOF) { if (debug) fprintf(stderr, "Debug: Remote helper quit.\n"); - exit(128); + die("Reading from helper 'git-remote-%s' failed", name); } if (debug) @@ -65,7 +66,7 @@ static int recvline_fh(FILE *helper, struct strbuf *buffer) static int recvline(struct helper_data *helper, struct strbuf *buffer) { - return recvline_fh(helper->out, buffer); + return recvline_fh(helper->out, buffer, helper->name); } static void xchgline(struct helper_data *helper, struct strbuf *buffer) @@ -214,10 +215,11 @@ static struct child_process *get_helper(struct transport *transport) int i; data->refspec_nr = refspec_nr; data->refspecs = parse_fetch_refspec(refspec_nr, refspecs); - for (i = 0; i < refspec_nr; i++) { + for (i = 0; i < refspec_nr; i++) free((char *)refspecs[i]); - } free(refspecs); + } else if (data->import || data->bidi_import || data->export) { + warning("This remote helper should implement refspec capability."); } strbuf_release(&buf); if (debug) @@ -474,7 +476,7 @@ static int fetch_with_import(struct transport *transport, * were fetching. * * (If no "refspec" capability was specified, for historical - * reasons we default to *:*.) + * reasons we default to the equivalent of *:*.) * * Store the result in to_fetch[i].old_sha1. Callers such * as "git fetch" can use the value to write feedback to the @@ -541,7 +543,7 @@ static int process_connect_service(struct transport *transport, goto exit; sendline(data, &cmdbuf); - recvline_fh(input, &cmdbuf); + recvline_fh(input, &cmdbuf, name); if (!strcmp(cmdbuf.buf, "")) { data->no_disconnect_req = 1; if (debug) @@ -623,7 +625,7 @@ static int fetch(struct transport *transport, return -1; } -static void push_update_ref_status(struct strbuf *buf, +static int push_update_ref_status(struct strbuf *buf, struct ref **ref, struct ref *remote_refs) { @@ -689,7 +691,7 @@ static void push_update_ref_status(struct strbuf *buf, *ref = find_ref_by_name(remote_refs, refname); if (!*ref) { warning("helper reported unexpected status of %s", refname); - return; + return 1; } if ((*ref)->status != REF_STATUS_NONE) { @@ -698,11 +700,12 @@ static void push_update_ref_status(struct strbuf *buf, * status reported by the remote helper if the latter is 'no match'. */ if (status == REF_STATUS_NONE) - return; + return 1; } (*ref)->status = status; (*ref)->remote_status = msg; + return !(status == REF_STATUS_OK); } static void push_update_refs_status(struct helper_data *data, @@ -711,11 +714,24 @@ static void push_update_refs_status(struct helper_data *data, struct strbuf buf = STRBUF_INIT; struct ref *ref = remote_refs; for (;;) { + char *private; + recvline(data, &buf); if (!buf.len) break; - push_update_ref_status(&buf, &ref, remote_refs); + if (push_update_ref_status(&buf, &ref, remote_refs)) + continue; + + if (!data->refspecs) + continue; + + /* propagate back the update to the remote namespace */ + private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name); + if (!private) + continue; + update_ref("update by helper", private, ref->new_sha1, NULL, 0, 0); + free(private); } strbuf_release(&buf); } @@ -790,6 +806,14 @@ static int push_refs_with_export(struct transport *transport, struct string_list revlist_args = STRING_LIST_INIT_NODUP; struct strbuf buf = STRBUF_INIT; + if (!data->refspecs) + die("remote-helper doesn't support push; refspec needed"); + + if (flags & TRANSPORT_PUSH_DRY_RUN) { + if (set_helper_option(transport, "dry-run", "true") != 0) + die("helper %s does not support dry-run", data->name); + } + helper = get_helper(transport); write_constant(helper->in, "export\n"); @@ -800,22 +824,25 @@ static int push_refs_with_export(struct transport *transport, char *private; unsigned char sha1[20]; - if (!data->refspecs) - continue; + if (ref->deletion) + die("remote-helpers do not support ref deletion"); + private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name); if (private && !get_sha1(private, sha1)) { strbuf_addf(&buf, "^%s", private); string_list_append(&revlist_args, strbuf_detach(&buf, NULL)); + hashcpy(ref->old_sha1, sha1); } free(private); - if (ref->deletion) { + if (ref->deletion) die("remote-helpers do not support ref deletion"); - } - if (ref->peer_ref) + if (ref->peer_ref) { + if (strcmp(ref->peer_ref->name, ref->name)) + die("remote-helpers do not support old:new syntax"); string_list_append(&revlist_args, ref->peer_ref->name); - + } } if (get_exporter(transport, &exporter, &revlist_args)) diff --git a/transport.c b/transport.c index ba5d8afb1b..359a671c8c 100644 --- a/transport.c +++ b/transport.c @@ -534,6 +534,8 @@ static int fetch_refs_via_pack(struct transport *transport, args.quiet = (transport->verbose < 0); args.no_progress = !transport->progress; args.depth = data->options.depth; + args.check_self_contained_and_connected = + data->options.check_self_contained_and_connected; if (!data->got_remote_heads) { connect_setup(transport, 0, 0); @@ -551,6 +553,8 @@ static int fetch_refs_via_pack(struct transport *transport, refs = NULL; data->conn = NULL; data->got_remote_heads = 0; + data->options.self_contained_and_connected = + args.self_contained_and_connected; free_refs(refs_tmp); diff --git a/transport.h b/transport.h index fcb1d25d96..4edebc5355 100644 --- a/transport.h +++ b/transport.h @@ -8,6 +8,8 @@ struct git_transport_options { unsigned thin : 1; unsigned keep : 1; unsigned followtags : 1; + unsigned check_self_contained_and_connected : 1; + unsigned self_contained_and_connected : 1; int depth; const char *uploadpack; const char *receivepack; diff --git a/unpack-trees.c b/unpack-trees.c index ede4299b83..57b40743a1 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -116,14 +116,20 @@ static void do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce, ADD_CACHE_OK_TO_ADD | ADD_CACHE_OK_TO_REPLACE); } -static void add_entry(struct unpack_trees_options *o, struct cache_entry *ce, - unsigned int set, unsigned int clear) +static struct cache_entry *dup_entry(const struct cache_entry *ce) { unsigned int size = ce_size(ce); struct cache_entry *new = xmalloc(size); memcpy(new, ce, size); - do_add_entry(o, new, set, clear); + return new; +} + +static void add_entry(struct unpack_trees_options *o, + const struct cache_entry *ce, + unsigned int set, unsigned int clear) +{ + do_add_entry(o, dup_entry(ce), set, clear); } /* @@ -235,8 +241,11 @@ static int check_updates(struct unpack_trees_options *o) return errs != 0; } -static int verify_uptodate_sparse(struct cache_entry *ce, struct unpack_trees_options *o); -static int verify_absent_sparse(struct cache_entry *ce, enum unpack_trees_error_types, struct unpack_trees_options *o); +static int verify_uptodate_sparse(const struct cache_entry *ce, + struct unpack_trees_options *o); +static int verify_absent_sparse(const struct cache_entry *ce, + enum unpack_trees_error_types, + struct unpack_trees_options *o); static int apply_sparse_checkout(struct cache_entry *ce, struct unpack_trees_options *o) { @@ -291,7 +300,8 @@ static int apply_sparse_checkout(struct cache_entry *ce, struct unpack_trees_opt return 0; } -static inline int call_unpack_fn(struct cache_entry **src, struct unpack_trees_options *o) +static inline int call_unpack_fn(const struct cache_entry * const *src, + struct unpack_trees_options *o) { int ret = o->fn(src, o); if (ret > 0) @@ -320,7 +330,7 @@ static void mark_all_ce_unused(struct index_state *index) index->cache[i]->ce_flags &= ~(CE_UNPACKED | CE_ADDED | CE_NEW_SKIP_WORKTREE); } -static int locate_in_src_index(struct cache_entry *ce, +static int locate_in_src_index(const struct cache_entry *ce, struct unpack_trees_options *o) { struct index_state *index = o->src_index; @@ -388,7 +398,7 @@ static void add_same_unmerged(struct cache_entry *ce, static int unpack_index_entry(struct cache_entry *ce, struct unpack_trees_options *o) { - struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, }; + const struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, }; int ret; src[0] = ce; @@ -590,8 +600,16 @@ static int unpack_nondirectories(int n, unsigned long mask, src[i + o->merge] = create_ce_entry(info, names + i, stage); } - if (o->merge) - return call_unpack_fn(src, o); + if (o->merge) { + int rc = call_unpack_fn((const struct cache_entry * const *)src, + o); + for (i = 0; i < n; i++) { + struct cache_entry *ce = src[i + o->merge]; + if (ce != o->df_conflict_entry) + free(ce); + } + return rc; + } for (i = 0; i < n; i++) if (src[i] && src[i] != o->df_conflict_entry) @@ -995,7 +1013,9 @@ static void mark_new_skip_worktree(struct exclude_list *el, select_flag, skip_wt_flag, el); } -static int verify_absent(struct cache_entry *, enum unpack_trees_error_types, struct unpack_trees_options *); +static int verify_absent(const struct cache_entry *, + enum unpack_trees_error_types, + struct unpack_trees_options *); /* * N-way merge "len" trees. Returns 0 on success, -1 on failure to manipulate the * resulting index, -2 on failure to reflect the changes to the work tree. @@ -1165,12 +1185,13 @@ return_failed: /* Here come the merge functions */ -static int reject_merge(struct cache_entry *ce, struct unpack_trees_options *o) +static int reject_merge(const struct cache_entry *ce, + struct unpack_trees_options *o) { return add_rejected_path(o, ERROR_WOULD_OVERWRITE, ce->name); } -static int same(struct cache_entry *a, struct cache_entry *b) +static int same(const struct cache_entry *a, const struct cache_entry *b) { if (!!a != !!b) return 0; @@ -1187,9 +1208,9 @@ static int same(struct cache_entry *a, struct cache_entry *b) * When a CE gets turned into an unmerged entry, we * want it to be up-to-date */ -static int verify_uptodate_1(struct cache_entry *ce, - struct unpack_trees_options *o, - enum unpack_trees_error_types error_type) +static int verify_uptodate_1(const struct cache_entry *ce, + struct unpack_trees_options *o, + enum unpack_trees_error_types error_type) { struct stat st; @@ -1228,7 +1249,7 @@ static int verify_uptodate_1(struct cache_entry *ce, add_rejected_path(o, error_type, ce->name); } -static int verify_uptodate(struct cache_entry *ce, +static int verify_uptodate(const struct cache_entry *ce, struct unpack_trees_options *o) { if (!o->skip_sparse_checkout && (ce->ce_flags & CE_NEW_SKIP_WORKTREE)) @@ -1236,13 +1257,14 @@ static int verify_uptodate(struct cache_entry *ce, return verify_uptodate_1(ce, o, ERROR_NOT_UPTODATE_FILE); } -static int verify_uptodate_sparse(struct cache_entry *ce, +static int verify_uptodate_sparse(const struct cache_entry *ce, struct unpack_trees_options *o) { return verify_uptodate_1(ce, o, ERROR_SPARSE_NOT_UPTODATE_FILE); } -static void invalidate_ce_path(struct cache_entry *ce, struct unpack_trees_options *o) +static void invalidate_ce_path(const struct cache_entry *ce, + struct unpack_trees_options *o) { if (ce) cache_tree_invalidate_path(o->src_index->cache_tree, ce->name); @@ -1255,16 +1277,16 @@ static void invalidate_ce_path(struct cache_entry *ce, struct unpack_trees_optio * Currently, git does not checkout subprojects during a superproject * checkout, so it is not going to overwrite anything. */ -static int verify_clean_submodule(struct cache_entry *ce, - enum unpack_trees_error_types error_type, - struct unpack_trees_options *o) +static int verify_clean_submodule(const struct cache_entry *ce, + enum unpack_trees_error_types error_type, + struct unpack_trees_options *o) { return 0; } -static int verify_clean_subdirectory(struct cache_entry *ce, - enum unpack_trees_error_types error_type, - struct unpack_trees_options *o) +static int verify_clean_subdirectory(const struct cache_entry *ce, + enum unpack_trees_error_types error_type, + struct unpack_trees_options *o) { /* * we are about to extract "ce->name"; we would not want to lose @@ -1350,7 +1372,7 @@ static int icase_exists(struct unpack_trees_options *o, const char *name, int le } static int check_ok_to_remove(const char *name, int len, int dtype, - struct cache_entry *ce, struct stat *st, + const struct cache_entry *ce, struct stat *st, enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { @@ -1405,9 +1427,9 @@ static int check_ok_to_remove(const char *name, int len, int dtype, * We do not want to remove or overwrite a working tree file that * is not tracked, unless it is ignored. */ -static int verify_absent_1(struct cache_entry *ce, - enum unpack_trees_error_types error_type, - struct unpack_trees_options *o) +static int verify_absent_1(const struct cache_entry *ce, + enum unpack_trees_error_types error_type, + struct unpack_trees_options *o) { int len; struct stat st; @@ -1440,7 +1462,7 @@ static int verify_absent_1(struct cache_entry *ce, } } -static int verify_absent(struct cache_entry *ce, +static int verify_absent(const struct cache_entry *ce, enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { @@ -1449,9 +1471,9 @@ static int verify_absent(struct cache_entry *ce, return verify_absent_1(ce, error_type, o); } -static int verify_absent_sparse(struct cache_entry *ce, - enum unpack_trees_error_types error_type, - struct unpack_trees_options *o) +static int verify_absent_sparse(const struct cache_entry *ce, + enum unpack_trees_error_types error_type, + struct unpack_trees_options *o) { enum unpack_trees_error_types orphaned_error = error_type; if (orphaned_error == ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN) @@ -1460,10 +1482,12 @@ static int verify_absent_sparse(struct cache_entry *ce, return verify_absent_1(ce, orphaned_error, o); } -static int merged_entry(struct cache_entry *merge, struct cache_entry *old, - struct unpack_trees_options *o) +static int merged_entry(const struct cache_entry *ce, + const struct cache_entry *old, + struct unpack_trees_options *o) { int update = CE_UPDATE; + struct cache_entry *merge = dup_entry(ce); if (!old) { /* @@ -1481,8 +1505,11 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old, update |= CE_ADDED; merge->ce_flags |= CE_NEW_SKIP_WORKTREE; - if (verify_absent(merge, ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN, o)) + if (verify_absent(merge, + ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN, o)) { + free(merge); return -1; + } invalidate_ce_path(merge, o); } else if (!(old->ce_flags & CE_CONFLICTED)) { /* @@ -1496,8 +1523,10 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old, copy_cache_entry(merge, old); update = 0; } else { - if (verify_uptodate(old, o)) + if (verify_uptodate(old, o)) { + free(merge); return -1; + } /* Migrate old flags over */ update |= old->ce_flags & (CE_SKIP_WORKTREE | CE_NEW_SKIP_WORKTREE); invalidate_ce_path(old, o); @@ -1510,12 +1539,13 @@ static int merged_entry(struct cache_entry *merge, struct cache_entry *old, invalidate_ce_path(old, o); } - add_entry(o, merge, update, CE_STAGEMASK); + do_add_entry(o, merge, update, CE_STAGEMASK); return 1; } -static int deleted_entry(struct cache_entry *ce, struct cache_entry *old, - struct unpack_trees_options *o) +static int deleted_entry(const struct cache_entry *ce, + const struct cache_entry *old, + struct unpack_trees_options *o) { /* Did it exist in the index? */ if (!old) { @@ -1530,7 +1560,8 @@ static int deleted_entry(struct cache_entry *ce, struct cache_entry *old, return 1; } -static int keep_entry(struct cache_entry *ce, struct unpack_trees_options *o) +static int keep_entry(const struct cache_entry *ce, + struct unpack_trees_options *o) { add_entry(o, ce, 0, 0); return 1; @@ -1552,11 +1583,12 @@ static void show_stage_entry(FILE *o, } #endif -int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o) +int threeway_merge(const struct cache_entry * const *stages, + struct unpack_trees_options *o) { - struct cache_entry *index; - struct cache_entry *head; - struct cache_entry *remote = stages[o->head_idx + 1]; + const struct cache_entry *index; + const struct cache_entry *head; + const struct cache_entry *remote = stages[o->head_idx + 1]; int count; int head_match = 0; int remote_match = 0; @@ -1641,7 +1673,7 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o) if (o->aggressive) { int head_deleted = !head; int remote_deleted = !remote; - struct cache_entry *ce = NULL; + const struct cache_entry *ce = NULL; if (index) ce = index; @@ -1724,11 +1756,12 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o) * "carry forward" rule, please see <Documentation/git-read-tree.txt>. * */ -int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o) +int twoway_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o) { - struct cache_entry *current = src[0]; - struct cache_entry *oldtree = src[1]; - struct cache_entry *newtree = src[2]; + const struct cache_entry *current = src[0]; + const struct cache_entry *oldtree = src[1]; + const struct cache_entry *newtree = src[2]; if (o->merge_size != 2) return error("Cannot do a twoway merge of %d trees", @@ -1790,11 +1823,11 @@ int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o) * Keep the index entries at stage0, collapse stage1 but make sure * stage0 does not have anything there. */ -int bind_merge(struct cache_entry **src, - struct unpack_trees_options *o) +int bind_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o) { - struct cache_entry *old = src[0]; - struct cache_entry *a = src[1]; + const struct cache_entry *old = src[0]; + const struct cache_entry *a = src[1]; if (o->merge_size != 1) return error("Cannot do a bind merge of %d trees", @@ -1814,10 +1847,11 @@ int bind_merge(struct cache_entry **src, * The rule is: * - take the stat information from stage0, take the data from stage1 */ -int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o) +int oneway_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o) { - struct cache_entry *old = src[0]; - struct cache_entry *a = src[1]; + const struct cache_entry *old = src[0]; + const struct cache_entry *a = src[1]; if (o->merge_size != 1) return error("Cannot do a oneway merge of %d trees", diff --git a/unpack-trees.h b/unpack-trees.h index 5e432f576e..36a73a6d00 100644 --- a/unpack-trees.h +++ b/unpack-trees.h @@ -8,7 +8,7 @@ struct unpack_trees_options; struct exclude_list; -typedef int (*merge_fn_t)(struct cache_entry **src, +typedef int (*merge_fn_t)(const struct cache_entry * const *src, struct unpack_trees_options *options); enum unpack_trees_error_types { @@ -77,9 +77,13 @@ struct unpack_trees_options { extern int unpack_trees(unsigned n, struct tree_desc *t, struct unpack_trees_options *options); -int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o); -int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o); -int bind_merge(struct cache_entry **src, struct unpack_trees_options *o); -int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o); +int threeway_merge(const struct cache_entry * const *stages, + struct unpack_trees_options *o); +int twoway_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o); +int bind_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o); +int oneway_merge(const struct cache_entry * const *src, + struct unpack_trees_options *o); #endif diff --git a/upload-pack.c b/upload-pack.c index bfa6279cc4..127e59a603 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -592,7 +592,7 @@ static void receive_needs(void) die("invalid shallow line: %s", line); object = parse_object(sha1); if (!object) - die("did not find object for %s", line); + continue; if (object->type != OBJ_COMMIT) die("invalid shallow object %s", sha1_to_hex(sha1)); if (!(object->flags & CLIENT_SHALLOW)) { @@ -463,8 +463,8 @@ void strbuf_utf8_replace(struct strbuf *sb_src, int pos, int width, w += n; } strbuf_setlen(&sb_dst, dst - sb_dst.buf); - strbuf_attach(sb_src, strbuf_detach(&sb_dst, NULL), - sb_dst.len, sb_dst.alloc); + strbuf_swap(sb_src, &sb_dst); + strbuf_release(&sb_dst); } int is_encoding_utf8(const char *name) @@ -408,18 +408,24 @@ void warn_on_inaccessible(const char *path) warning(_("unable to access '%s': %s"), path, strerror(errno)); } -int access_or_warn(const char *path, int mode) +static int access_error_is_ok(int err, unsigned flag) +{ + return err == ENOENT || err == ENOTDIR || + ((flag & ACCESS_EACCES_OK) && err == EACCES); +} + +int access_or_warn(const char *path, int mode, unsigned flag) { int ret = access(path, mode); - if (ret && errno != ENOENT && errno != ENOTDIR) + if (ret && !access_error_is_ok(errno, flag)) warn_on_inaccessible(path); return ret; } -int access_or_die(const char *path, int mode) +int access_or_die(const char *path, int mode, unsigned flag) { int ret = access(path, mode); - if (ret && errno != ENOENT && errno != ENOTDIR) + if (ret && !access_error_is_ok(errno, flag)) die_errno(_("unable to access '%s'"), path); return ret; } |