diff options
52 files changed, 3323 insertions, 1160 deletions
diff --git a/Documentation/RelNotes/1.7.10.2.txt b/Documentation/RelNotes/1.7.10.2.txt index 04fe29404c..7a7e9d6fd1 100644 --- a/Documentation/RelNotes/1.7.10.2.txt +++ b/Documentation/RelNotes/1.7.10.2.txt @@ -14,6 +14,9 @@ Fixes since v1.7.10.1 * HTTP transport that requires authentication did not work correctly when multiple connections are used simultaneously. + * Minor memory leak during unpack_trees (hence "merge" and "checkout" + to check out another branch) has been plugged. + * In the older days, the header "Conflicts:" in "cherry-pick" and "merge" was separated by a blank line from the list of paths that follow for readability, but when "merge" was rewritten in C, we lost it by @@ -24,6 +27,9 @@ Fixes since v1.7.10.1 be both revision name and a pathname, even though $name can never be a path in the context of the command. + * The "include.path" facility in the configuration mechanism added in + 1.7.10 forgot to interpret "~/path" and "~user/path" as it should. + * "git config --rename-section" to rename an existing section into a bogus one did not check the new name. @@ -33,11 +39,44 @@ Fixes since v1.7.10.1 * The report from "git fetch" said "new branch" even for a non branch ref. + * The http-backend (the server side of the smart http transfer) used + to overwrite GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL with the + value obtained from REMOTE_USER unconditionally, making it + impossible for the server side site-specific customization to use + different identity sources to affect the names logged. It now uses + REMOTE_USER only as a fallback value. + + * "log --graph" was not very friendly with "--stat" option and its + output had line breaks at wrong places. + * Octopus merge strategy did not reduce heads that are recorded in the final commit correctly. + * "git push" over smart-http lost progress output a few releases ago; + this release resurrects it. + + * The error and advice messages given by "git push" when it fails due + to non-ff were not very helpful to new users; it has been broken + into three cases, and each is given a separate advice message. + + * The insn sheet given by "rebase -i" did not make it clear that the + insn lines can be re-ordered to affect the order of the commits in + the resulting history. + + * "git repack" used to write out unreachable objects as loose objects + when repacking, even if such loose objects will immediately pruned + due to its age. + + * A contrib script "rerere-train" did not work out of the box unless + user futzed with her $PATH. + + * "git rev-parse --show-prefix" used to emit nothing when run at the + top-level of the working tree, but now it gives a blank line. + * The i18n of error message "git stash save" was not properly done. + * "git submodule" used a sed script that some platforms mishandled. + * When using a Perl script on a system where "perl" found on user's $PATH could be ancient or otherwise broken, we allow builders to specify the path to a good copy of Perl with $PERL_PATH. The diff --git a/Documentation/RelNotes/1.7.10.3.txt b/Documentation/RelNotes/1.7.10.3.txt new file mode 100644 index 0000000000..9c9ec25946 --- /dev/null +++ b/Documentation/RelNotes/1.7.10.3.txt @@ -0,0 +1,26 @@ +Git v1.7.10.3 Release Notes +=========================== + +Fixes since v1.7.10.2 +--------------------- + + * Running "git checkout" on an unborn branch used to corrupt HEAD. + + * When checking out another commit from an already detached state, we + used to report all commits that are not reachable from any of the + refs as lossage, but some of them might be reachable from the new + HEAD, and there is no need to warn about them. + + * Some time ago, "git clone" lost the progress output for its + "checkout" phase; when run without any "--quiet" option, it should + give progress to the lengthy operation. + + * "log -z --pretty=tformat:..." did not terminate each record with + NUL. The fix is not entirely correct when the output also asks for + --patch and/or --stat, though. + + * The DWIM behaviour for "log --pretty=format:%gd -g" was somewhat + broken and gave undue precedence to configured log.date, causing + "git stash list" to show "stash@{time stamp string}". + +Also contains minor fixes and documentation updates. diff --git a/Documentation/RelNotes/1.7.11.txt b/Documentation/RelNotes/1.7.11.txt index 8dfeddcd68..94c3615ef9 100644 --- a/Documentation/RelNotes/1.7.11.txt +++ b/Documentation/RelNotes/1.7.11.txt @@ -25,13 +25,15 @@ UI, Workflows & Features tracking. Also "branch" learned the "-q"uiet option to squelch informational message. + * Your build platform may support hardlinks but you may prefer not to + use them, e.g. when installing to DESTDIR to make a tarball and + untarring on a filesystem that has poor support for hardlinks. + There is a Makefile option NO_INSTALL_HARDLINKS for you. + * The smart-http backend used to always override GIT_COMMITTER_* variables with REMOTE_USER and REMOTE_ADDR, but these variables are now preserved when set. - * "include.path" mechanism of the configuration files learned to - understand "~/path" and "~user/path". - * "git am" learned the "--include" option, which is an opposite of existing the "--exclude" option. @@ -51,9 +53,6 @@ UI, Workflows & Features * The "fmt-merge-msg" command learns to list the primary contributors involved in the side topic you are merging. - * The cases "git push" fails due to non-ff can be broken into three - categories; each case is given a separate advise message. - * "git rebase" learned to optionally keep commits that do not introduce any change in the original history. @@ -83,27 +82,24 @@ Performance and Internal Implementation (please report possible regressions) * An experimental "version 4" format of the index file has been introduced to reduce on-disk footprint and I/O overhead. + * "git archive" learned to produce its output without reading the + blob object it writes out in memory in its entirety. + + * "git index-pack" that runs when fetching or pushing objects to + complete the packfile on the receiving end learned to use multiple + threads to do its job when available. + * The code to compute hash values for lines used by the internal diff engine was optimized on little-endian machines, using the same trick the kernel folks came up with. * "git apply" had some memory leaks plugged. - * "git repack" used to write out unreachable objects as loose objects - when repacking, even if such loose objects will immediately pruned - due to its age. - * Setting up a revision traversal with many starting points was inefficient as these were placed in a date-order priority queue one-by-one. Now they are collected in the queue unordered first, and sorted immediately before getting used. - * "git rev-parse --show-prefix" used to emit nothing when run at the - top-level of the working tree, but now it gives a blank line. - - * Minor memory leak during unpack_trees (hence "merge" and "checkout" - to check out another branch) has been plugged. - * More lower-level commands learned to use the streaming API to read from the object store without keeping everything in core. @@ -124,22 +120,11 @@ Unless otherwise noted, all the fixes since v1.7.10 in the maintenance releases are contained in this release (see release notes to them for details). + * "git status --porcelain" ignored "--branch" option by mistake. The + output for "git status --branch -z" was also incorrect and did not + terminate the record for the current branch name with NUL as asked. + (merge d4a6bf1 jk/maint-status-porcelain-z-b later to maint). + * "git diff --stat" used to fully count a binary file with modified execution bits whose contents is unmodified, which was not quite right. - - * "log -z --pretty=tformat:..." did not terminate each record with - NUL. The fix is not entirely correct when the output also asks for - --patch and/or --stat, though. - (merge fafd382 jk/maint-tformat-with-z later to maint). - - * "git push" over smart-http lost progress output a few releases ago. - (merge e304aeb jk/maint-push-progress later to maint). - - * A contrib script "rerere-train" did not work out of the box unless - user futzed with her $PATH. - (merge 53876fc jc/rerere-train later to maint). - - * "log --graph" was not very friendly with "--stat" option and its - output had line breaks at wrong places. - (merge bafa16e lp/diffstat-with-graph later to maint). diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 81b03982e3..3f5d216a09 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -44,11 +44,15 @@ a "true" or "false" string for bool), or '--path', which does some path expansion (see '--path' below). If no type specifier is passed, no checks or transformations are performed on the value. -The file-option can be one of '--system', '--global' or '--file' -which specify where the values will be read from or written to. -The default is to assume the config file of the current repository, -.git/config unless defined otherwise with GIT_DIR and GIT_CONFIG -(see <<FILES>>). +When reading, the values are read from the system, global and +repository local configuration files by default, and options +'--system', '--global', '--local' and '--file <filename>' can be +used to tell the command to read from only that location (see <<FILES>>). + +When writing, the new value is written to the repository local +configuration file by default, and options '--system', '--global', +'--file <filename>' can be used to tell the command to write to +that location (you can say '--local' but that is the default). This command will fail (with exit code ret) if: diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt index 909687fed4..39e6d0ddd8 100644 --- a/Documentation/git-index-pack.txt +++ b/Documentation/git-index-pack.txt @@ -74,6 +74,16 @@ OPTIONS --strict:: Die, if the pack contains broken objects or links. +--threads=<n>:: + Specifies the number of threads to spawn when resolving + deltas. This requires that index-pack be compiled with + pthreads otherwise this option is ignored with a warning. + This is meant to reduce packing time on multiprocessor + machines. The required amount of memory for the delta search + window is however multiplied by the number of threads. + Specifying 0 will cause git to auto-detect the number of CPU's + and use maximum 3 threads. + Note ---- diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt index 2883a285ba..67e5f53a9e 100644 --- a/Documentation/git-status.txt +++ b/Documentation/git-status.txt @@ -184,7 +184,7 @@ order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL and the terminating newline (but a space still separates the status field from the first filename). Third, filenames containing special characters are not specially formatted; no quoting or -backslash-escaping is performed. Fourth, there is no branch line. +backslash-escaping is performed. CONFIGURATION ------------- diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index c243ee552b..9e488c0aad 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -43,9 +43,9 @@ if you choose to go that route. Submodules are composed from a so-called `gitlink` tree entry in the main repository that refers to a particular commit object within the inner repository that is completely separate. -A record in the `.gitmodules` file at the root of the source -tree assigns a logical name to the submodule and describes -the default URL the submodule shall be cloned from. +A record in the `.gitmodules` (see linkgit:gitmodules[5]) file at the +root of the source tree assigns a logical name to the submodule and +describes the default URL the submodule shall be cloned from. The logical name can be used for overriding this URL within your local repository configuration (see 'submodule init'). @@ -140,7 +140,8 @@ update:: checkout the commit specified in the index of the containing repository. This will make the submodules HEAD be detached unless `--rebase` or `--merge` is specified or the key `submodule.$name.update` is set to - `rebase`, `merge` or `none`. + `rebase`, `merge` or `none`. `none` can be overriden by specifying + `--checkout`. + If the submodule is not yet initialized, and you just want to use the setting as stored in .gitmodules, you can automatically initialize the @@ -148,10 +149,6 @@ submodule with the `--init` option. + If `--recursive` is specified, this command will recurse into the registered submodules, and update any nested submodules within. -+ -If the configuration key `submodule.$name.update` is set to `none` the -submodule with name `$name` will not be updated by default. This can be -overriden by adding `--checkout` to the command. summary:: Show commit summary between the given commit (defaults to HEAD) and diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 34ee785064..cfe8d2b5df 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -189,18 +189,16 @@ and have no uncommitted changes. last fetched commit from the upstream SVN. 'dcommit':: - Commit each diff from a specified head directly to the SVN + Commit each diff from the current branch directly to the SVN repository, and then rebase or reset (depending on whether or not there is a diff between SVN and head). This will create a revision in SVN for each commit in git. - It is recommended that you run 'git svn' fetch and rebase (not - pull or merge) your commits against the latest changes in the - SVN repository. - An optional revision or branch argument may be specified, and - causes 'git svn' to do all work on that revision/branch - instead of HEAD. - This is advantageous over 'set-tree' (below) because it produces - cleaner, more linear history. ++ +When an optional git branch name (or a git commit object name) +is specified as an argument, the subcommand works on the specified +branch, not on the current branch. ++ +Use of 'dcommit' is preferred to 'set-tree' (below). + --no-rebase;; After committing, do not rebase or reset. @@ -572,6 +570,8 @@ config key: svn.repackflags --merge:: -s<strategy>:: --strategy=<strategy>:: +-p:: +--preserve-merges:: These are only used with the 'dcommit' and 'rebase' commands. + Passed directly to 'git rebase' when using 'dcommit' if a @@ -800,18 +800,19 @@ have each person clone that repository with 'git clone': REBASE VS. PULL/MERGE --------------------- - -Originally, 'git svn' recommended that the 'remotes/git-svn' branch be -pulled or merged from. This is because the author favored +Prefer to use 'git svn rebase' or 'git rebase', rather than +'git pull' or 'git merge' to synchronize unintegrated commits with a 'git svn' +branch. Doing so will keep the history of unintegrated commits linear with +respect to the upstream SVN repository and allow the use of the preferred +'git svn dcommit' subcommand to push unintegrated commits back into SVN. + +Originally, 'git svn' recommended that developers pulled or merged from +the 'git svn' branch. This was because the author favored `git svn set-tree B` to commit a single head rather than the -`git svn set-tree A..B` notation to commit multiple commits. - -If you use `git svn set-tree A..B` to commit several diffs and you do -not have the latest remotes/git-svn merged into my-branch, you should -use `git svn rebase` to update your work branch instead of `git pull` or -`git merge`. `pull`/`merge` can cause non-linear history to be flattened -when committing into SVN, which can lead to merge commits reversing -previous commits in SVN. +`git svn set-tree A..B` notation to commit multiple commits. Use of +'git pull' or 'git merge' with `git svn set-tree A..B` will cause non-linear +history to be flattened when committing into SVN and this can lead to merge +commits unexpectedly reversing previous commits in SVN. MERGE TRACKING -------------- diff --git a/Documentation/git.txt b/Documentation/git.txt index 8527775988..c543213126 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.10.1/git.html[documentation for release 1.7.10.1] +* link:v1.7.10.2/git.html[documentation for release 1.7.10.2] * release notes for + link:RelNotes/1.7.10.2.txt[1.7.10.2], link:RelNotes/1.7.10.1.txt[1.7.10.1], link:RelNotes/1.7.10.txt[1.7.10]. diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index 4e1fd52e7d..4effd78902 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -41,8 +41,11 @@ submodule.<name>.update:: the commit specified in the superproject. If 'merge', the commit specified in the superproject will be merged into the current branch in the submodule. + If 'none', the submodule with name `$name` will not be updated + by default. + This config option is overridden if 'git submodule update' is given - the '--merge' or '--rebase' options. + the '--merge', '--rebase' or '--checkout' options. submodule.<name>.fetchRecurseSubmodules:: This option can be used to control recursive fetching of this diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt index 546980c0a4..49cdc571cd 100644 --- a/Documentation/technical/pack-protocol.txt +++ b/Documentation/technical/pack-protocol.txt @@ -351,7 +351,7 @@ Then the server will start sending its packfile data. A simple clone may look like this (with no 'have' lines): ---- - C: 0054want 74730d410fcb6603ace96f1dc55ea6196122532d\0multi_ack \ + C: 0054want 74730d410fcb6603ace96f1dc55ea6196122532d multi_ack \ side-band-64k ofs-delta\n C: 0032want 7d1665144a3a975c05f1f43902ddaf084e784dbe\n C: 0032want 5a3f6be755bbb7deae50065988cbfa1ffa9ab68a\n @@ -367,7 +367,7 @@ A simple clone may look like this (with no 'have' lines): An incremental update (fetch) response might look like this: ---- - C: 0054want 74730d410fcb6603ace96f1dc55ea6196122532d\0multi_ack \ + C: 0054want 74730d410fcb6603ace96f1dc55ea6196122532d multi_ack \ side-band-64k ofs-delta\n C: 0032want 7d1665144a3a975c05f1f43902ddaf084e784dbe\n C: 0032want 5a3f6be755bbb7deae50065988cbfa1ffa9ab68a\n @@ -247,6 +247,9 @@ all:: # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed # programs as a tar, where bin/ and libexec/ might be on different file systems. # +# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or +# copies to install built-in git commands e.g. git-cat-file. +# # Define USE_NED_ALLOCATOR if you want to replace the platforms default # memory allocators with the nedmalloc allocator written by Niall Douglas. # @@ -1835,6 +1838,10 @@ ifdef ASCIIDOC7 export ASCIIDOC7 endif +ifdef NO_INSTALL_HARDLINKS + export NO_INSTALL_HARDLINKS +endif + ### profile feedback build # @@ -2219,7 +2226,7 @@ builtin/branch.o builtin/checkout.o builtin/clone.o builtin/reset.o branch.o tra builtin/bundle.o bundle.o transport.o: bundle.h builtin/bisect--helper.o builtin/rev-list.o bisect.o: bisect.h builtin/clone.o builtin/fetch-pack.o transport.o: fetch-pack.h -builtin/grep.o builtin/pack-objects.o transport-helper.o thread-utils.o: thread-utils.h +builtin/index-pack.o builtin/grep.o builtin/pack-objects.o transport-helper.o thread-utils.o: thread-utils.h builtin/send-pack.o transport.o: send-pack.h builtin/log.o builtin/shortlog.o: shortlog.h builtin/prune.o builtin/reflog.o reachable.o: reachable.h @@ -2574,19 +2581,21 @@ endif { test "$$bindir/" = "$$execdir/" || \ for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ $(RM) "$$execdir/$$p" && \ - test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ + test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ done; \ } && \ for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ $(RM) "$$bindir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)" && \ ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ done && \ for p in $(BUILT_INS); do \ $(RM) "$$execdir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)" && \ ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ @@ -2594,6 +2603,7 @@ endif remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \ for p in $$remote_curl_aliases; do \ $(RM) "$$execdir/$$p" && \ + test -z "$(NO_INSTALL_HARDLINKS)" && \ ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \ diff --git a/archive-tar.c b/archive-tar.c index 20af0051a3..93387ea336 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -4,6 +4,7 @@ #include "cache.h" #include "tar.h" #include "archive.h" +#include "streaming.h" #include "run-command.h" #define RECORDSIZE (512) @@ -30,10 +31,9 @@ static void write_if_needed(void) * queues up writes, so that all our write(2) calls write exactly one * full block; pads writes to RECORDSIZE */ -static void write_blocked(const void *data, unsigned long size) +static void do_write_blocked(const void *data, unsigned long size) { const char *buf = data; - unsigned long tail; if (offset) { unsigned long chunk = BLOCKSIZE - offset; @@ -54,6 +54,11 @@ static void write_blocked(const void *data, unsigned long size) memcpy(block + offset, buf, size); offset += size; } +} + +static void finish_record(void) +{ + unsigned long tail; tail = offset % RECORDSIZE; if (tail) { memset(block + offset, 0, RECORDSIZE - tail); @@ -62,6 +67,12 @@ static void write_blocked(const void *data, unsigned long size) write_if_needed(); } +static void write_blocked(const void *data, unsigned long size) +{ + do_write_blocked(data, size); + finish_record(); +} + /* * The end of tar archives is marked by 2*512 nul bytes and after that * follows the rest of the block (if any). @@ -78,6 +89,33 @@ static void write_trailer(void) } /* + * queues up writes, so that all our write(2) calls write exactly one + * full block; pads writes to RECORDSIZE + */ +static int stream_blocked(const unsigned char *sha1) +{ + struct git_istream *st; + enum object_type type; + unsigned long sz; + char buf[BLOCKSIZE]; + ssize_t readlen; + + st = open_istream(sha1, &type, &sz, NULL); + if (!st) + return error("cannot stream blob %s", sha1_to_hex(sha1)); + for (;;) { + readlen = read_istream(st, buf, sizeof(buf)); + if (readlen <= 0) + break; + do_write_blocked(buf, readlen); + } + close_istream(st); + if (!readlen) + finish_record(); + return readlen; +} + +/* * pax extended header records have the format "%u %s=%s\n". %u contains * the size of the whole string (including the %u), the first %s is the * keyword, the second one is the value. This function constructs such a @@ -123,56 +161,101 @@ static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen) return i; } +static void prepare_header(struct archiver_args *args, + struct ustar_header *header, + unsigned int mode, unsigned long size) +{ + sprintf(header->mode, "%07o", mode & 07777); + sprintf(header->size, "%011lo", S_ISREG(mode) ? size : 0); + sprintf(header->mtime, "%011lo", (unsigned long) args->time); + + sprintf(header->uid, "%07o", 0); + sprintf(header->gid, "%07o", 0); + strlcpy(header->uname, "root", sizeof(header->uname)); + strlcpy(header->gname, "root", sizeof(header->gname)); + sprintf(header->devmajor, "%07o", 0); + sprintf(header->devminor, "%07o", 0); + + memcpy(header->magic, "ustar", 6); + memcpy(header->version, "00", 2); + + sprintf(header->chksum, "%07o", ustar_header_chksum(header)); +} + +static int write_extended_header(struct archiver_args *args, + const unsigned char *sha1, + const void *buffer, unsigned long size) +{ + struct ustar_header header; + unsigned int mode; + memset(&header, 0, sizeof(header)); + *header.typeflag = TYPEFLAG_EXT_HEADER; + mode = 0100666; + sprintf(header.name, "%s.paxheader", sha1_to_hex(sha1)); + prepare_header(args, &header, mode, size); + write_blocked(&header, sizeof(header)); + write_blocked(buffer, size); + return 0; +} + static int write_tar_entry(struct archiver_args *args, - const unsigned char *sha1, const char *path, size_t pathlen, - unsigned int mode, void *buffer, unsigned long size) + const unsigned char *sha1, + const char *path, size_t pathlen, + unsigned int mode) { struct ustar_header header; struct strbuf ext_header = STRBUF_INIT; + unsigned int old_mode = mode; + unsigned long size; + void *buffer; int err = 0; memset(&header, 0, sizeof(header)); - if (!sha1) { - *header.typeflag = TYPEFLAG_GLOBAL_HEADER; - mode = 0100666; - strcpy(header.name, "pax_global_header"); - } else if (!path) { - *header.typeflag = TYPEFLAG_EXT_HEADER; - mode = 0100666; - sprintf(header.name, "%s.paxheader", sha1_to_hex(sha1)); + if (S_ISDIR(mode) || S_ISGITLINK(mode)) { + *header.typeflag = TYPEFLAG_DIR; + mode = (mode | 0777) & ~tar_umask; + } else if (S_ISLNK(mode)) { + *header.typeflag = TYPEFLAG_LNK; + mode |= 0777; + } else if (S_ISREG(mode)) { + *header.typeflag = TYPEFLAG_REG; + mode = (mode | ((mode & 0100) ? 0777 : 0666)) & ~tar_umask; } else { - if (S_ISDIR(mode) || S_ISGITLINK(mode)) { - *header.typeflag = TYPEFLAG_DIR; - mode = (mode | 0777) & ~tar_umask; - } else if (S_ISLNK(mode)) { - *header.typeflag = TYPEFLAG_LNK; - mode |= 0777; - } else if (S_ISREG(mode)) { - *header.typeflag = TYPEFLAG_REG; - mode = (mode | ((mode & 0100) ? 0777 : 0666)) & ~tar_umask; + return error("unsupported file mode: 0%o (SHA1: %s)", + mode, sha1_to_hex(sha1)); + } + if (pathlen > sizeof(header.name)) { + size_t plen = get_path_prefix(path, pathlen, + sizeof(header.prefix)); + size_t rest = pathlen - plen - 1; + if (plen > 0 && rest <= sizeof(header.name)) { + memcpy(header.prefix, path, plen); + memcpy(header.name, path + plen + 1, rest); } else { - return error("unsupported file mode: 0%o (SHA1: %s)", - mode, sha1_to_hex(sha1)); + sprintf(header.name, "%s.data", + sha1_to_hex(sha1)); + strbuf_append_ext_header(&ext_header, "path", + path, pathlen); } - if (pathlen > sizeof(header.name)) { - size_t plen = get_path_prefix(path, pathlen, - sizeof(header.prefix)); - size_t rest = pathlen - plen - 1; - if (plen > 0 && rest <= sizeof(header.name)) { - memcpy(header.prefix, path, plen); - memcpy(header.name, path + plen + 1, rest); - } else { - sprintf(header.name, "%s.data", - sha1_to_hex(sha1)); - strbuf_append_ext_header(&ext_header, "path", - path, pathlen); - } - } else - memcpy(header.name, path, pathlen); + } else + memcpy(header.name, path, pathlen); + + if (S_ISREG(mode) && !args->convert && + sha1_object_info(sha1, &size) == OBJ_BLOB && + size > big_file_threshold) + buffer = NULL; + else if (S_ISLNK(mode) || S_ISREG(mode)) { + enum object_type type; + buffer = sha1_file_to_archive(args, path, sha1, old_mode, &type, &size); + if (!buffer) + return error("cannot read %s", sha1_to_hex(sha1)); + } else { + buffer = NULL; + size = 0; } - if (S_ISLNK(mode) && buffer) { + if (S_ISLNK(mode)) { if (size > sizeof(header.linkname)) { sprintf(header.linkname, "see %s.paxheader", sha1_to_hex(sha1)); @@ -182,32 +265,25 @@ static int write_tar_entry(struct archiver_args *args, memcpy(header.linkname, buffer, size); } - sprintf(header.mode, "%07o", mode & 07777); - sprintf(header.size, "%011lo", S_ISREG(mode) ? size : 0); - sprintf(header.mtime, "%011lo", (unsigned long) args->time); - - sprintf(header.uid, "%07o", 0); - sprintf(header.gid, "%07o", 0); - strlcpy(header.uname, "root", sizeof(header.uname)); - strlcpy(header.gname, "root", sizeof(header.gname)); - sprintf(header.devmajor, "%07o", 0); - sprintf(header.devminor, "%07o", 0); - - memcpy(header.magic, "ustar", 6); - memcpy(header.version, "00", 2); - - sprintf(header.chksum, "%07o", ustar_header_chksum(&header)); + prepare_header(args, &header, mode, size); if (ext_header.len > 0) { - err = write_tar_entry(args, sha1, NULL, 0, 0, ext_header.buf, - ext_header.len); - if (err) + err = write_extended_header(args, sha1, ext_header.buf, + ext_header.len); + if (err) { + free(buffer); return err; + } } strbuf_release(&ext_header); write_blocked(&header, sizeof(header)); - if (S_ISREG(mode) && buffer && size > 0) - write_blocked(buffer, size); + if (S_ISREG(mode) && size > 0) { + if (buffer) + write_blocked(buffer, size); + else + err = stream_blocked(sha1); + } + free(buffer); return err; } @@ -215,11 +291,18 @@ static int write_global_extended_header(struct archiver_args *args) { const unsigned char *sha1 = args->commit_sha1; struct strbuf ext_header = STRBUF_INIT; - int err; + struct ustar_header header; + unsigned int mode; + int err = 0; strbuf_append_ext_header(&ext_header, "comment", sha1_to_hex(sha1), 40); - err = write_tar_entry(args, NULL, NULL, 0, 0, ext_header.buf, - ext_header.len); + memset(&header, 0, sizeof(header)); + *header.typeflag = TYPEFLAG_GLOBAL_HEADER; + mode = 0100666; + strcpy(header.name, "pax_global_header"); + prepare_header(args, &header, mode, ext_header.len); + write_blocked(&header, sizeof(header)); + write_blocked(ext_header.buf, ext_header.len); strbuf_release(&ext_header); return err; } diff --git a/archive-zip.c b/archive-zip.c index 02d1f3787a..f5af81f904 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -3,6 +3,7 @@ */ #include "cache.h" #include "archive.h" +#include "streaming.h" static int zip_date; static int zip_time; @@ -15,6 +16,7 @@ static unsigned int zip_dir_offset; static unsigned int zip_dir_entries; #define ZIP_DIRECTORY_MIN_SIZE (1024 * 1024) +#define ZIP_STREAM (8) struct zip_local_header { unsigned char magic[4]; @@ -31,6 +33,14 @@ struct zip_local_header { unsigned char _end[1]; }; +struct zip_data_desc { + unsigned char magic[4]; + unsigned char crc32[4]; + unsigned char compressed_size[4]; + unsigned char size[4]; + unsigned char _end[1]; +}; + struct zip_dir_header { unsigned char magic[4]; unsigned char creator_version[2]; @@ -70,6 +80,7 @@ struct zip_dir_trailer { * we're interested in. */ #define ZIP_LOCAL_HEADER_SIZE offsetof(struct zip_local_header, _end) +#define ZIP_DATA_DESC_SIZE offsetof(struct zip_data_desc, _end) #define ZIP_DIR_HEADER_SIZE offsetof(struct zip_dir_header, _end) #define ZIP_DIR_TRAILER_SIZE offsetof(struct zip_dir_trailer, _end) @@ -120,20 +131,59 @@ static void *zlib_deflate(void *data, unsigned long size, return buffer; } +static void write_zip_data_desc(unsigned long size, + unsigned long compressed_size, + unsigned long crc) +{ + struct zip_data_desc trailer; + + copy_le32(trailer.magic, 0x08074b50); + copy_le32(trailer.crc32, crc); + copy_le32(trailer.compressed_size, compressed_size); + copy_le32(trailer.size, size); + write_or_die(1, &trailer, ZIP_DATA_DESC_SIZE); +} + +static void set_zip_dir_data_desc(struct zip_dir_header *header, + unsigned long size, + unsigned long compressed_size, + unsigned long crc) +{ + copy_le32(header->crc32, crc); + copy_le32(header->compressed_size, compressed_size); + copy_le32(header->size, size); +} + +static void set_zip_header_data_desc(struct zip_local_header *header, + unsigned long size, + unsigned long compressed_size, + unsigned long crc) +{ + copy_le32(header->crc32, crc); + copy_le32(header->compressed_size, compressed_size); + copy_le32(header->size, size); +} + +#define STREAM_BUFFER_SIZE (1024 * 16) + static int write_zip_entry(struct archiver_args *args, - const unsigned char *sha1, const char *path, size_t pathlen, - unsigned int mode, void *buffer, unsigned long size) + const unsigned char *sha1, + const char *path, size_t pathlen, + unsigned int mode) { struct zip_local_header header; struct zip_dir_header dirent; unsigned long attr2; unsigned long compressed_size; - unsigned long uncompressed_size; unsigned long crc; unsigned long direntsize; int method; unsigned char *out; void *deflated = NULL; + void *buffer; + struct git_istream *stream = NULL; + unsigned long flags = 0; + unsigned long size; crc = crc32(0, NULL, 0); @@ -146,24 +196,43 @@ static int write_zip_entry(struct archiver_args *args, method = 0; attr2 = 16; out = NULL; - uncompressed_size = 0; + 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); + method = 0; attr2 = S_ISLNK(mode) ? ((mode | 0777) << 16) : (mode & 0111) ? ((mode) << 16) : 0; - if (S_ISREG(mode) && args->compression_level != 0) + if (S_ISREG(mode) && args->compression_level != 0 && size > 0) method = 8; - crc = crc32(crc, buffer, size); - out = buffer; - uncompressed_size = size; compressed_size = size; + + if (S_ISREG(mode) && type == OBJ_BLOB && !args->convert && + size > big_file_threshold) { + stream = open_istream(sha1, &type, &size, NULL); + if (!stream) + return error("cannot stream blob %s", + sha1_to_hex(sha1)); + flags |= ZIP_STREAM; + out = buffer = NULL; + } else { + buffer = sha1_file_to_archive(args, path, sha1, mode, + &type, &size); + if (!buffer) + return error("cannot read %s", + sha1_to_hex(sha1)); + crc = crc32(crc, buffer, size); + out = buffer; + } } else { return error("unsupported file mode: 0%o (SHA1: %s)", mode, sha1_to_hex(sha1)); } - if (method == 8) { + if (buffer && method == 8) { deflated = zlib_deflate(buffer, size, args->compression_level, &compressed_size); if (deflated && compressed_size - 6 < size) { @@ -188,13 +257,11 @@ static int write_zip_entry(struct archiver_args *args, copy_le16(dirent.creator_version, S_ISLNK(mode) || (S_ISREG(mode) && (mode & 0111)) ? 0x0317 : 0); copy_le16(dirent.version, 10); - copy_le16(dirent.flags, 0); + copy_le16(dirent.flags, flags); copy_le16(dirent.compression_method, method); copy_le16(dirent.mtime, zip_time); copy_le16(dirent.mdate, zip_date); - copy_le32(dirent.crc32, crc); - copy_le32(dirent.compressed_size, compressed_size); - copy_le32(dirent.size, uncompressed_size); + set_zip_dir_data_desc(&dirent, size, compressed_size, crc); copy_le16(dirent.filename_length, pathlen); copy_le16(dirent.extra_length, 0); copy_le16(dirent.comment_length, 0); @@ -202,33 +269,120 @@ static int write_zip_entry(struct archiver_args *args, copy_le16(dirent.attr1, 0); copy_le32(dirent.attr2, attr2); copy_le32(dirent.offset, zip_offset); - memcpy(zip_dir + zip_dir_offset, &dirent, ZIP_DIR_HEADER_SIZE); - zip_dir_offset += ZIP_DIR_HEADER_SIZE; - memcpy(zip_dir + zip_dir_offset, path, pathlen); - zip_dir_offset += pathlen; - zip_dir_entries++; copy_le32(header.magic, 0x04034b50); copy_le16(header.version, 10); - copy_le16(header.flags, 0); + copy_le16(header.flags, flags); copy_le16(header.compression_method, method); copy_le16(header.mtime, zip_time); copy_le16(header.mdate, zip_date); - copy_le32(header.crc32, crc); - copy_le32(header.compressed_size, compressed_size); - copy_le32(header.size, uncompressed_size); + if (flags & ZIP_STREAM) + set_zip_header_data_desc(&header, 0, 0, 0); + else + set_zip_header_data_desc(&header, size, compressed_size, crc); copy_le16(header.filename_length, pathlen); copy_le16(header.extra_length, 0); write_or_die(1, &header, ZIP_LOCAL_HEADER_SIZE); zip_offset += ZIP_LOCAL_HEADER_SIZE; write_or_die(1, path, pathlen); zip_offset += pathlen; - if (compressed_size > 0) { + if (stream && method == 0) { + unsigned char buf[STREAM_BUFFER_SIZE]; + ssize_t readlen; + + for (;;) { + readlen = read_istream(stream, buf, sizeof(buf)); + if (readlen <= 0) + break; + crc = crc32(crc, buf, readlen); + write_or_die(1, buf, readlen); + } + close_istream(stream); + if (readlen) + return readlen; + + compressed_size = size; + zip_offset += compressed_size; + + write_zip_data_desc(size, compressed_size, crc); + zip_offset += ZIP_DATA_DESC_SIZE; + + set_zip_dir_data_desc(&dirent, size, compressed_size, crc); + } else if (stream && method == 8) { + unsigned char buf[STREAM_BUFFER_SIZE]; + ssize_t readlen; + git_zstream zstream; + int result; + size_t out_len; + unsigned char compressed[STREAM_BUFFER_SIZE * 2]; + + memset(&zstream, 0, sizeof(zstream)); + git_deflate_init(&zstream, args->compression_level); + + compressed_size = 0; + zstream.next_out = compressed; + zstream.avail_out = sizeof(compressed); + + for (;;) { + readlen = read_istream(stream, buf, sizeof(buf)); + if (readlen <= 0) + break; + crc = crc32(crc, buf, readlen); + + zstream.next_in = buf; + zstream.avail_in = readlen; + result = git_deflate(&zstream, 0); + if (result != Z_OK) + die("deflate error (%d)", result); + out = compressed; + if (!compressed_size) + out += 2; + out_len = zstream.next_out - out; + + if (out_len > 0) { + write_or_die(1, out, out_len); + compressed_size += out_len; + zstream.next_out = compressed; + zstream.avail_out = sizeof(compressed); + } + + } + close_istream(stream); + if (readlen) + return readlen; + + zstream.next_in = buf; + zstream.avail_in = 0; + result = git_deflate(&zstream, Z_FINISH); + if (result != Z_STREAM_END) + die("deflate error (%d)", result); + + git_deflate_end(&zstream); + out = compressed; + if (!compressed_size) + out += 2; + out_len = zstream.next_out - out - 4; + write_or_die(1, out, out_len); + compressed_size += out_len; + zip_offset += compressed_size; + + write_zip_data_desc(size, compressed_size, crc); + zip_offset += ZIP_DATA_DESC_SIZE; + + set_zip_dir_data_desc(&dirent, size, compressed_size, crc); + } else if (compressed_size > 0) { write_or_die(1, out, compressed_size); zip_offset += compressed_size; } free(deflated); + free(buffer); + + memcpy(zip_dir + zip_dir_offset, &dirent, ZIP_DIR_HEADER_SIZE); + zip_dir_offset += ZIP_DIR_HEADER_SIZE; + memcpy(zip_dir + zip_dir_offset, path, pathlen); + zip_dir_offset += pathlen; + zip_dir_entries++; return 0; } @@ -59,12 +59,15 @@ static void format_subst(const struct commit *commit, free(to_free); } -static void *sha1_file_to_archive(const char *path, const unsigned char *sha1, - unsigned int mode, enum object_type *type, - unsigned long *sizep, const struct commit *commit) +void *sha1_file_to_archive(const struct archiver_args *args, + const char *path, const unsigned char *sha1, + unsigned int mode, enum object_type *type, + unsigned long *sizep) { void *buffer; + const struct commit *commit = args->convert ? args->commit : NULL; + path += args->baselen; buffer = read_sha1_file(sha1, type, sizep); if (buffer && S_ISREG(mode)) { struct strbuf buf = STRBUF_INIT; @@ -109,12 +112,9 @@ static int write_archive_entry(const unsigned char *sha1, const char *base, write_archive_entry_fn_t write_entry = c->write_entry; struct git_attr_check check[2]; const char *path_without_prefix; - int convert = 0; int err; - enum object_type type; - unsigned long size; - void *buffer; + args->convert = 0; strbuf_reset(&path); strbuf_grow(&path, PATH_MAX); strbuf_add(&path, args->base, args->baselen); @@ -126,28 +126,22 @@ static int write_archive_entry(const unsigned char *sha1, const char *base, if (!git_check_attr(path_without_prefix, ARRAY_SIZE(check), check)) { if (ATTR_TRUE(check[0].value)) return 0; - convert = ATTR_TRUE(check[1].value); + args->convert = ATTR_TRUE(check[1].value); } if (S_ISDIR(mode) || S_ISGITLINK(mode)) { strbuf_addch(&path, '/'); if (args->verbose) fprintf(stderr, "%.*s\n", (int)path.len, path.buf); - err = write_entry(args, sha1, path.buf, path.len, mode, NULL, 0); + err = write_entry(args, sha1, path.buf, path.len, mode); if (err) return err; return (S_ISDIR(mode) ? READ_TREE_RECURSIVE : 0); } - buffer = sha1_file_to_archive(path_without_prefix, sha1, mode, - &type, &size, convert ? args->commit : NULL); - if (!buffer) - return error("cannot read %s", sha1_to_hex(sha1)); if (args->verbose) fprintf(stderr, "%.*s\n", (int)path.len, path.buf); - err = write_entry(args, sha1, path.buf, path.len, mode, buffer, size); - free(buffer); - return err; + return write_entry(args, sha1, path.buf, path.len, mode); } int write_archive_entries(struct archiver_args *args, @@ -167,7 +161,7 @@ int write_archive_entries(struct archiver_args *args, if (args->verbose) fprintf(stderr, "%.*s\n", (int)len, args->base); err = write_entry(args, args->tree->object.sha1, args->base, - len, 040777, NULL, 0); + len, 040777); if (err) return err; } @@ -11,6 +11,7 @@ struct archiver_args { const char **pathspec; unsigned int verbose : 1; unsigned int worktree_attributes : 1; + unsigned int convert : 1; int compression_level; }; @@ -27,11 +28,18 @@ extern void register_archiver(struct archiver *); extern void init_tar_archiver(void); extern void init_zip_archiver(void); -typedef int (*write_archive_entry_fn_t)(struct archiver_args *args, const unsigned char *sha1, const char *path, size_t pathlen, unsigned int mode, void *buffer, unsigned long size); +typedef int (*write_archive_entry_fn_t)(struct archiver_args *args, + const unsigned char *sha1, + const char *path, size_t pathlen, + unsigned int mode); extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry); extern int write_archive(int argc, const char **argv, const char *prefix, int setup_prefix, const char *name_hint, int remote); const char *archive_format_from_filename(const char *filename); +extern void *sha1_file_to_archive(const struct archiver_args *args, + const char *path, const unsigned char *sha1, + unsigned int mode, enum object_type *type, + unsigned long *sizep); #endif /* ARCHIVE_H */ @@ -833,7 +833,7 @@ static int check_ancestors(const char *prefix) */ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout) { - const char *filename = git_path("BISECT_ANCESTORS_OK"); + char *filename = xstrdup(git_path("BISECT_ANCESTORS_OK")); struct stat st; int fd; @@ -842,11 +842,11 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout) /* Check if file BISECT_ANCESTORS_OK exists. */ if (!stat(filename, &st) && S_ISREG(st.st_mode)) - return; + goto done; /* Bisecting with no good rev is ok. */ if (good_revs.nr == 0) - return; + goto done; /* Check if all good revs are ancestor of the bad rev. */ if (check_ancestors(prefix)) @@ -859,6 +859,8 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout) filename, strerror(errno)); else close(fd); + done: + free(filename); } /* diff --git a/builtin/apply.c b/builtin/apply.c index 725712d788..1793c33ee9 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -919,7 +919,10 @@ static int gitdiff_hdrend(const char *line, struct patch *patch) * their names against any previous information, just * to make sure.. */ -static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, const char *oldnew) +#define DIFF_OLD_NAME 0 +#define DIFF_NEW_NAME 1 + +static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, int side) { if (!orig_name && !isnull) return find_name(line, NULL, p_value, TERM_TAB); @@ -934,7 +937,9 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, die(_("git apply: bad git-diff - expected /dev/null, got %s on line %d"), name, linenr); another = find_name(line, NULL, p_value, TERM_TAB); if (!another || memcmp(another, name, len + 1)) - die(_("git apply: bad git-diff - inconsistent %s filename on line %d"), oldnew, linenr); + die((side == DIFF_NEW_NAME) ? + _("git apply: bad git-diff - inconsistent new filename on line %d") : + _("git apply: bad git-diff - inconsistent old filename on line %d"), linenr); free(another); return orig_name; } @@ -949,7 +954,8 @@ static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, static int gitdiff_oldname(const char *line, struct patch *patch) { char *orig = patch->old_name; - patch->old_name = gitdiff_verify_name(line, patch->is_new, patch->old_name, "old"); + patch->old_name = gitdiff_verify_name(line, patch->is_new, patch->old_name, + DIFF_OLD_NAME); if (orig != patch->old_name) free(orig); return 0; @@ -958,7 +964,8 @@ static int gitdiff_oldname(const char *line, struct patch *patch) static int gitdiff_newname(const char *line, struct patch *patch) { char *orig = patch->new_name; - patch->new_name = gitdiff_verify_name(line, patch->is_delete, patch->new_name, "new"); + patch->new_name = gitdiff_verify_name(line, patch->is_delete, patch->new_name, + DIFF_NEW_NAME); if (orig != patch->new_name) free(orig); return 0; diff --git a/builtin/branch.c b/builtin/branch.c index d51648fee4..0e060f2e4a 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -391,6 +391,7 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name, int show_upstream_ref) { int ours, theirs; + char *ref = NULL; struct branch *branch = branch_get(branch_name); if (!stat_tracking_info(branch, &ours, &theirs)) { @@ -401,16 +402,29 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name, return; } - strbuf_addch(stat, '['); if (show_upstream_ref) - strbuf_addf(stat, "%s: ", - shorten_unambiguous_ref(branch->merge[0]->dst, 0)); - if (!ours) - strbuf_addf(stat, _("behind %d] "), theirs); - else if (!theirs) - strbuf_addf(stat, _("ahead %d] "), ours); - else - strbuf_addf(stat, _("ahead %d, behind %d] "), ours, theirs); + ref = shorten_unambiguous_ref(branch->merge[0]->dst, 0); + if (!ours) { + if (ref) + strbuf_addf(stat, _("[%s: behind %d]"), ref, theirs); + else + strbuf_addf(stat, _("[behind %d]"), theirs); + + } else if (!theirs) { + if (ref) + strbuf_addf(stat, _("[%s: ahead %d]"), ref, ours); + else + strbuf_addf(stat, _("[ahead %d]"), ours); + } else { + if (ref) + strbuf_addf(stat, _("[%s: ahead %d, behind %d]"), + ref, ours, theirs); + else + strbuf_addf(stat, _("[ahead %d, behind %d]"), + ours, theirs); + } + strbuf_addch(stat, ' '); + free(ref); } static int matches_merge_filter(struct commit *commit) diff --git a/builtin/checkout.c b/builtin/checkout.c index 23fc56d88d..3ddda34f7a 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -672,10 +672,10 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs) * HEAD. If it is not reachable from any ref, this is the last chance * for the user to do so without resorting to reflog. */ -static void orphaned_commit_warning(struct commit *commit) +static void orphaned_commit_warning(struct commit *old, struct commit *new) { struct rev_info revs; - struct object *object = &commit->object; + struct object *object = &old->object; struct object_array refs; init_revisions(&revs, NULL); @@ -685,16 +685,17 @@ static void orphaned_commit_warning(struct commit *commit) add_pending_object(&revs, object, sha1_to_hex(object->sha1)); for_each_ref(add_pending_uninteresting_ref, &revs); + add_pending_sha1(&revs, "HEAD", new->object.sha1, UNINTERESTING); refs = revs.pending; revs.leak_pending = 1; if (prepare_revision_walk(&revs)) die(_("internal error in revision walk")); - if (!(commit->object.flags & UNINTERESTING)) - suggest_reattach(commit, &revs); + if (!(old->object.flags & UNINTERESTING)) + suggest_reattach(old, &revs); else - describe_detached_head(_("Previous HEAD position was"), commit); + describe_detached_head(_("Previous HEAD position was"), old); clear_commit_marks_for_object_array(&refs, ALL_REV_FLAGS); free(refs.objects); @@ -731,7 +732,7 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new) } if (!opts->quiet && !old.path && old.commit && new->commit != old.commit) - orphaned_commit_warning(old.commit); + orphaned_commit_warning(old.commit, new->commit); update_refs_for_switch(opts, &old, new); @@ -1091,7 +1092,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) if (opts.writeout_stage) die(_("--ours/--theirs is incompatible with switching branches.")); - if (!new.commit) { + if (!new.commit && opts.new_branch) { unsigned char rev[20]; int flag; diff --git a/builtin/clone.c b/builtin/clone.c index bbd5c96237..a4d8d25ee3 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -569,7 +569,7 @@ static int checkout(void) opts.update = 1; opts.merge = 1; opts.fn = oneway_merge; - opts.verbose_update = (option_verbosity > 0); + opts.verbose_update = (option_verbosity >= 0); opts.src_index = &the_index; opts.dst_index = &the_index; diff --git a/builtin/commit.c b/builtin/commit.c index a876a73e6b..a2ec73d738 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -89,7 +89,6 @@ static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship; static int no_post_rewrite, allow_empty_message; static char *untracked_files_arg, *force_date, *ignore_submodule_arg; static char *sign_commit; -static unsigned int colopts; /* * The default commit message cleanup mode will remove the lines @@ -111,13 +110,11 @@ static int show_ignored_in_status; static const char *only_include_assumed; static struct strbuf message = STRBUF_INIT; -static int null_termination; static enum { STATUS_FORMAT_LONG, STATUS_FORMAT_SHORT, STATUS_FORMAT_PORCELAIN } status_format = STATUS_FORMAT_LONG; -static int status_show_branch; static int opt_parse_m(const struct option *opt, const char *arg, int unset) { @@ -131,59 +128,6 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset) return 0; } -static struct option builtin_commit_options[] = { - OPT__QUIET(&quiet, "suppress summary after successful commit"), - OPT__VERBOSE(&verbose, "show diff in commit message template"), - - OPT_GROUP("Commit message options"), - OPT_FILENAME('F', "file", &logfile, "read message from file"), - OPT_STRING(0, "author", &force_author, "author", "override author for commit"), - OPT_STRING(0, "date", &force_date, "date", "override date for commit"), - OPT_CALLBACK('m', "message", &message, "message", "commit message", opt_parse_m), - OPT_STRING('c', "reedit-message", &edit_message, "commit", "reuse and edit message from specified commit"), - OPT_STRING('C', "reuse-message", &use_message, "commit", "reuse message from specified commit"), - OPT_STRING(0, "fixup", &fixup_message, "commit", "use autosquash formatted message to fixup specified commit"), - OPT_STRING(0, "squash", &squash_message, "commit", "use autosquash formatted message to squash specified commit"), - OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C/-c/--amend)"), - OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), - OPT_FILENAME('t', "template", &template_file, "use specified template file"), - OPT_BOOL('e', "edit", &edit_flag, "force edit of commit"), - OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), - OPT_BOOLEAN(0, "status", &include_status, "include status in commit message template"), - { OPTION_STRING, 'S', "gpg-sign", &sign_commit, "key id", - "GPG sign commit", PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, - /* end commit message options */ - - OPT_GROUP("Commit contents options"), - OPT_BOOLEAN('a', "all", &all, "commit all changed files"), - OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"), - OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"), - OPT_BOOLEAN('p', "patch", &patch_interactive, "interactively add changes"), - OPT_BOOLEAN('o', "only", &only, "commit only specified files"), - OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"), - OPT_BOOLEAN(0, "dry-run", &dry_run, "show what would be committed"), - OPT_SET_INT(0, "short", &status_format, "show status concisely", - STATUS_FORMAT_SHORT), - OPT_BOOLEAN(0, "branch", &status_show_branch, "show branch information"), - OPT_SET_INT(0, "porcelain", &status_format, - "machine-readable output", STATUS_FORMAT_PORCELAIN), - OPT_BOOLEAN('z', "null", &null_termination, - "terminate entries with NUL"), - OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), - OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, "bypass post-rewrite hook"), - { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, - /* end commit contents options */ - - { OPTION_BOOLEAN, 0, "allow-empty", &allow_empty, NULL, - "ok to record an empty change", - PARSE_OPT_NOARG | PARSE_OPT_HIDDEN }, - { OPTION_BOOLEAN, 0, "allow-empty-message", &allow_empty_message, NULL, - "ok to record a change with an empty message", - PARSE_OPT_NOARG | PARSE_OPT_HIDDEN }, - - OPT_END() -}; - static void determine_whence(struct wt_status *s) { if (file_exists(git_path("MERGE_HEAD"))) @@ -501,10 +445,10 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int switch (status_format) { case STATUS_FORMAT_SHORT: - wt_shortstatus_print(s, null_termination, status_show_branch); + wt_shortstatus_print(s); break; case STATUS_FORMAT_PORCELAIN: - wt_porcelain_print(s, null_termination); + wt_porcelain_print(s); break; case STATUS_FORMAT_LONG: wt_status_print(s); @@ -1037,6 +981,7 @@ static const char *read_commit_message(const char *name) } static int parse_and_validate_options(int argc, const char *argv[], + const struct option *options, const char * const usage[], const char *prefix, struct commit *current_head, @@ -1044,8 +989,7 @@ static int parse_and_validate_options(int argc, const char *argv[], { int f = 0; - argc = parse_options(argc, argv, prefix, builtin_commit_options, usage, - 0); + argc = parse_options(argc, argv, prefix, options, usage, 0); if (force_author && !strchr(force_author, '>')) force_author = find_author_by_nickname(force_author); @@ -1130,7 +1074,7 @@ static int parse_and_validate_options(int argc, const char *argv[], if (all && argc > 0) die(_("Paths with -a does not make sense.")); - if (null_termination && status_format == STATUS_FORMAT_LONG) + if (s->null_termination && status_format == STATUS_FORMAT_LONG) status_format = STATUS_FORMAT_PORCELAIN; if (status_format != STATUS_FORMAT_LONG) dry_run = 1; @@ -1176,7 +1120,7 @@ static int git_status_config(const char *k, const char *v, void *cb) struct wt_status *s = cb; if (!prefixcmp(k, "column.")) - return git_column_config(k, v, "status", &colopts); + return git_column_config(k, v, "status", &s->colopts); if (!strcmp(k, "status.submodulesummary")) { int is_bool; s->submodule_summary = git_config_bool_or_int(k, v, &is_bool); @@ -1219,19 +1163,19 @@ static int git_status_config(const char *k, const char *v, void *cb) int cmd_status(int argc, const char **argv, const char *prefix) { - struct wt_status s; + static struct wt_status s; int fd; unsigned char sha1[20]; static struct option builtin_status_options[] = { OPT__VERBOSE(&verbose, "be verbose"), OPT_SET_INT('s', "short", &status_format, "show status concisely", STATUS_FORMAT_SHORT), - OPT_BOOLEAN('b', "branch", &status_show_branch, + OPT_BOOLEAN('b', "branch", &s.show_branch, "show branch information"), OPT_SET_INT(0, "porcelain", &status_format, "machine-readable output", STATUS_FORMAT_PORCELAIN), - OPT_BOOLEAN('z', "null", &null_termination, + OPT_BOOLEAN('z', "null", &s.null_termination, "terminate entries with NUL"), { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", @@ -1242,7 +1186,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) { OPTION_STRING, 0, "ignore-submodules", &ignore_submodule_arg, "when", "ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, - OPT_COLUMN(0, "column", &colopts, "list untracked files in columns"), + OPT_COLUMN(0, "column", &s.colopts, "list untracked files in columns"), OPT_END(), }; @@ -1256,10 +1200,9 @@ int cmd_status(int argc, const char **argv, const char *prefix) argc = parse_options(argc, argv, prefix, builtin_status_options, builtin_status_usage, 0); - finalize_colopts(&colopts, -1); - s.colopts = colopts; + finalize_colopts(&s.colopts, -1); - if (null_termination && status_format == STATUS_FORMAT_LONG) + if (s.null_termination && status_format == STATUS_FORMAT_LONG) status_format = STATUS_FORMAT_PORCELAIN; handle_untracked_files_arg(&s); @@ -1284,10 +1227,10 @@ int cmd_status(int argc, const char **argv, const char *prefix) switch (status_format) { case STATUS_FORMAT_SHORT: - wt_shortstatus_print(&s, null_termination, status_show_branch); + wt_shortstatus_print(&s); break; case STATUS_FORMAT_PORCELAIN: - wt_porcelain_print(&s, null_termination); + wt_porcelain_print(&s); break; case STATUS_FORMAT_LONG: s.verbose = verbose; @@ -1422,6 +1365,60 @@ static int run_rewrite_hook(const unsigned char *oldsha1, int cmd_commit(int argc, const char **argv, const char *prefix) { + static struct wt_status s; + static struct option builtin_commit_options[] = { + OPT__QUIET(&quiet, "suppress summary after successful commit"), + OPT__VERBOSE(&verbose, "show diff in commit message template"), + + OPT_GROUP("Commit message options"), + OPT_FILENAME('F', "file", &logfile, "read message from file"), + OPT_STRING(0, "author", &force_author, "author", "override author for commit"), + OPT_STRING(0, "date", &force_date, "date", "override date for commit"), + OPT_CALLBACK('m', "message", &message, "message", "commit message", opt_parse_m), + OPT_STRING('c', "reedit-message", &edit_message, "commit", "reuse and edit message from specified commit"), + OPT_STRING('C', "reuse-message", &use_message, "commit", "reuse message from specified commit"), + OPT_STRING(0, "fixup", &fixup_message, "commit", "use autosquash formatted message to fixup specified commit"), + OPT_STRING(0, "squash", &squash_message, "commit", "use autosquash formatted message to squash specified commit"), + OPT_BOOLEAN(0, "reset-author", &renew_authorship, "the commit is authored by me now (used with -C/-c/--amend)"), + OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"), + OPT_FILENAME('t', "template", &template_file, "use specified template file"), + OPT_BOOL('e', "edit", &edit_flag, "force edit of commit"), + OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), + OPT_BOOLEAN(0, "status", &include_status, "include status in commit message template"), + { OPTION_STRING, 'S', "gpg-sign", &sign_commit, "key id", + "GPG sign commit", PARSE_OPT_OPTARG, NULL, (intptr_t) "" }, + /* end commit message options */ + + OPT_GROUP("Commit contents options"), + OPT_BOOLEAN('a', "all", &all, "commit all changed files"), + OPT_BOOLEAN('i', "include", &also, "add specified files to index for commit"), + OPT_BOOLEAN(0, "interactive", &interactive, "interactively add files"), + OPT_BOOLEAN('p', "patch", &patch_interactive, "interactively add changes"), + OPT_BOOLEAN('o', "only", &only, "commit only specified files"), + OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"), + OPT_BOOLEAN(0, "dry-run", &dry_run, "show what would be committed"), + OPT_SET_INT(0, "short", &status_format, "show status concisely", + STATUS_FORMAT_SHORT), + OPT_BOOLEAN(0, "branch", &s.show_branch, "show branch information"), + OPT_SET_INT(0, "porcelain", &status_format, + "machine-readable output", STATUS_FORMAT_PORCELAIN), + OPT_BOOLEAN('z', "null", &s.null_termination, + "terminate entries with NUL"), + OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), + OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, "bypass post-rewrite hook"), + { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, + /* end commit contents options */ + + { OPTION_BOOLEAN, 0, "allow-empty", &allow_empty, NULL, + "ok to record an empty change", + PARSE_OPT_NOARG | PARSE_OPT_HIDDEN }, + { OPTION_BOOLEAN, 0, "allow-empty-message", &allow_empty_message, NULL, + "ok to record a change with an empty message", + PARSE_OPT_NOARG | PARSE_OPT_HIDDEN }, + + OPT_END() + }; + struct strbuf sb = STRBUF_INIT; struct strbuf author_ident = STRBUF_INIT; const char *index_file, *reflog_msg; @@ -1431,7 +1428,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix) struct commit_list *parents = NULL, **pptr = &parents; struct stat statbuf; int allow_fast_forward = 1; - struct wt_status s; struct commit *current_head = NULL; struct commit_extra_header *extra = NULL; @@ -1441,6 +1437,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) wt_status_prepare(&s); git_config(git_commit_config, &s); determine_whence(&s); + s.colopts = 0; if (get_sha1("HEAD", sha1)) current_head = NULL; @@ -1449,7 +1446,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix) if (!current_head || parse_commit(current_head)) die(_("could not parse HEAD commit")); } - argc = parse_and_validate_options(argc, argv, builtin_commit_usage, + argc = parse_and_validate_options(argc, argv, builtin_commit_options, + builtin_commit_usage, prefix, current_head, &s); if (dry_run) return dry_run_commit(argc, argv, prefix, current_head, &s); diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 83555e5635..dc2cfe6e6f 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -9,6 +9,7 @@ #include "progress.h" #include "fsck.h" #include "exec_cmd.h" +#include "thread-utils.h" static const char index_pack_usage[] = "git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])"; @@ -38,6 +39,19 @@ struct base_data { int ofs_first, ofs_last; }; +#if !defined(NO_PTHREADS) && defined(NO_PREAD) +/* NO_PREAD uses compat/pread.c, which is not thread-safe. Disable threading. */ +#define NO_PTHREADS +#endif + +struct thread_local { +#ifndef NO_PTHREADS + pthread_t thread; +#endif + struct base_data *base_cache; + size_t base_cache_used; +}; + /* * Even if sizeof(union delta_base) == 24 on 64-bit archs, we really want * to memcmp() only the first 20 bytes. @@ -54,11 +68,11 @@ struct delta_entry { static struct object_entry *objects; static struct delta_entry *deltas; -static struct base_data *base_cache; -static size_t base_cache_used; +static struct thread_local nothread_data; static int nr_objects; static int nr_deltas; static int nr_resolved_deltas; +static int nr_threads; static int from_stdin; static int strict; @@ -75,6 +89,77 @@ static git_SHA_CTX input_ctx; static uint32_t input_crc32; static int input_fd, output_fd, pack_fd; +#ifndef NO_PTHREADS + +static struct thread_local *thread_data; +static int nr_dispatched; +static int threads_active; + +static pthread_mutex_t read_mutex; +#define read_lock() lock_mutex(&read_mutex) +#define read_unlock() unlock_mutex(&read_mutex) + +static pthread_mutex_t counter_mutex; +#define counter_lock() lock_mutex(&counter_mutex) +#define counter_unlock() unlock_mutex(&counter_mutex) + +static pthread_mutex_t work_mutex; +#define work_lock() lock_mutex(&work_mutex) +#define work_unlock() unlock_mutex(&work_mutex) + +static pthread_key_t key; + +static inline void lock_mutex(pthread_mutex_t *mutex) +{ + if (threads_active) + pthread_mutex_lock(mutex); +} + +static inline void unlock_mutex(pthread_mutex_t *mutex) +{ + if (threads_active) + pthread_mutex_unlock(mutex); +} + +/* + * Mutex and conditional variable can't be statically-initialized on Windows. + */ +static void init_thread(void) +{ + init_recursive_mutex(&read_mutex); + pthread_mutex_init(&counter_mutex, NULL); + pthread_mutex_init(&work_mutex, NULL); + pthread_key_create(&key, NULL); + thread_data = xcalloc(nr_threads, sizeof(*thread_data)); + threads_active = 1; +} + +static void cleanup_thread(void) +{ + if (!threads_active) + return; + threads_active = 0; + pthread_mutex_destroy(&read_mutex); + pthread_mutex_destroy(&counter_mutex); + pthread_mutex_destroy(&work_mutex); + pthread_key_delete(key); + free(thread_data); +} + +#else + +#define read_lock() +#define read_unlock() + +#define counter_lock() +#define counter_unlock() + +#define work_lock() +#define work_unlock() + +#endif + + static int mark_link(struct object *obj, int type, void *data) { if (!obj) @@ -226,6 +311,25 @@ static NORETURN void bad_object(unsigned long offset, const char *format, ...) die(_("pack has bad object at offset %lu: %s"), offset, buf); } +static inline struct thread_local *get_thread_data(void) +{ +#ifndef NO_PTHREADS + if (threads_active) + return pthread_getspecific(key); + assert(!threads_active && + "This should only be reached when all threads are gone"); +#endif + return ¬hread_data; +} + +#ifndef NO_PTHREADS +static void set_thread_data(struct thread_local *data) +{ + if (threads_active) + pthread_setspecific(key, data); +} +#endif + static struct base_data *alloc_base_data(void) { struct base_data *base = xmalloc(sizeof(struct base_data)); @@ -240,15 +344,16 @@ static void free_base_data(struct base_data *c) if (c->data) { free(c->data); c->data = NULL; - base_cache_used -= c->size; + get_thread_data()->base_cache_used -= c->size; } } static void prune_base_data(struct base_data *retain) { struct base_data *b; - for (b = base_cache; - base_cache_used > delta_base_cache_limit && b; + struct thread_local *data = get_thread_data(); + for (b = data->base_cache; + data->base_cache_used > delta_base_cache_limit && b; b = b->child) { if (b->data && b != retain) free_base_data(b); @@ -260,12 +365,12 @@ static void link_base_data(struct base_data *base, struct base_data *c) if (base) base->child = c; else - base_cache = c; + get_thread_data()->base_cache = c; c->base = base; c->child = NULL; if (c->data) - base_cache_used += c->size; + get_thread_data()->base_cache_used += c->size; prune_base_data(c); } @@ -275,7 +380,7 @@ static void unlink_base_data(struct base_data *c) if (base) base->child = NULL; else - base_cache = NULL; + get_thread_data()->base_cache = NULL; free_base_data(c); } @@ -467,19 +572,24 @@ static void sha1_object(const void *data, unsigned long size, enum object_type type, unsigned char *sha1) { hash_sha1_file(data, size, typename(type), sha1); + read_lock(); if (has_sha1_file(sha1)) { void *has_data; enum object_type has_type; unsigned long has_size; has_data = read_sha1_file(sha1, &has_type, &has_size); + read_unlock(); if (!has_data) die(_("cannot read existing object %s"), sha1_to_hex(sha1)); if (size != has_size || type != has_type || memcmp(data, has_data, size) != 0) die(_("SHA1 COLLISION FOUND WITH %s !"), sha1_to_hex(sha1)); free(has_data); - } + } else + read_unlock(); + if (strict) { + read_lock(); if (type == OBJ_BLOB) { struct blob *blob = lookup_blob(sha1); if (blob) @@ -513,6 +623,7 @@ static void sha1_object(const void *data, unsigned long size, } obj->flags |= FLAG_CHECKED; } + read_unlock(); } } @@ -558,7 +669,7 @@ static void *get_base_data(struct base_data *c) if (!delta_nr) { c->data = get_data_from_pack(obj); c->size = obj->size; - base_cache_used += c->size; + get_thread_data()->base_cache_used += c->size; prune_base_data(c); } for (; delta_nr > 0; delta_nr--) { @@ -574,7 +685,7 @@ static void *get_base_data(struct base_data *c) free(raw); if (!c->data) bad_object(obj->idx.offset, _("failed to apply delta")); - base_cache_used += c->size; + get_thread_data()->base_cache_used += c->size; prune_base_data(c); } free(delta); @@ -602,7 +713,9 @@ static void resolve_delta(struct object_entry *delta_obj, bad_object(delta_obj->idx.offset, _("failed to apply delta")); sha1_object(result->data, result->size, delta_obj->real_type, delta_obj->idx.sha1); + counter_lock(); nr_resolved_deltas++; + counter_unlock(); } static struct base_data *find_unresolved_deltas_1(struct base_data *base, @@ -688,19 +801,50 @@ static int compare_delta_entry(const void *a, const void *b) objects[delta_b->obj_no].type); } -/* Parse all objects and return the pack content SHA1 hash */ +static void resolve_base(struct object_entry *obj) +{ + struct base_data *base_obj = alloc_base_data(); + base_obj->obj = obj; + base_obj->data = NULL; + find_unresolved_deltas(base_obj); +} + +#ifndef NO_PTHREADS +static void *threaded_second_pass(void *data) +{ + set_thread_data(data); + for (;;) { + int i; + work_lock(); + display_progress(progress, nr_resolved_deltas); + while (nr_dispatched < nr_objects && + is_delta_type(objects[nr_dispatched].type)) + nr_dispatched++; + if (nr_dispatched >= nr_objects) { + work_unlock(); + break; + } + i = nr_dispatched++; + work_unlock(); + + resolve_base(&objects[i]); + } + return NULL; +} +#endif + +/* + * First pass: + * - find locations of all objects; + * - calculate SHA1 of all non-delta objects; + * - remember base (SHA1 or offset) for all deltas. + */ static void parse_pack_objects(unsigned char *sha1) { int i; struct delta_entry *delta = deltas; struct stat st; - /* - * First pass: - * - find locations of all objects; - * - calculate SHA1 of all non-delta objects; - * - remember base (SHA1 or offset) for all deltas. - */ if (verbose) progress = start_progress( from_stdin ? _("Receiving objects") : _("Indexing objects"), @@ -734,6 +878,19 @@ static void parse_pack_objects(unsigned char *sha1) if (S_ISREG(st.st_mode) && lseek(input_fd, 0, SEEK_CUR) - input_len != st.st_size) die(_("pack has junk at the end")); +} + +/* + * Second pass: + * - for all non-delta objects, look if it is used as a base for + * deltas; + * - if used as a base, uncompress the object and apply all deltas, + * recursively checking if the resulting object is used as a base + * for some more deltas. + */ +static void resolve_deltas(void) +{ + int i; if (!nr_deltas) return; @@ -742,29 +899,83 @@ static void parse_pack_objects(unsigned char *sha1) qsort(deltas, nr_deltas, sizeof(struct delta_entry), compare_delta_entry); - /* - * Second pass: - * - for all non-delta objects, look if it is used as a base for - * deltas; - * - if used as a base, uncompress the object and apply all deltas, - * recursively checking if the resulting object is used as a base - * for some more deltas. - */ if (verbose) progress = start_progress(_("Resolving deltas"), nr_deltas); + +#ifndef NO_PTHREADS + nr_dispatched = 0; + if (nr_threads > 1 || getenv("GIT_FORCE_THREADS")) { + init_thread(); + for (i = 0; i < nr_threads; i++) { + int ret = pthread_create(&thread_data[i].thread, NULL, + threaded_second_pass, thread_data + i); + if (ret) + die("unable to create thread: %s", strerror(ret)); + } + for (i = 0; i < nr_threads; i++) + pthread_join(thread_data[i].thread, NULL); + cleanup_thread(); + return; + } +#endif + for (i = 0; i < nr_objects; i++) { struct object_entry *obj = &objects[i]; - struct base_data *base_obj = alloc_base_data(); if (is_delta_type(obj->type)) continue; - base_obj->obj = obj; - base_obj->data = NULL; - find_unresolved_deltas(base_obj); + resolve_base(obj); display_progress(progress, nr_resolved_deltas); } } +/* + * Third pass: + * - append objects to convert thin pack to full pack if required + * - write the final 20-byte SHA-1 + */ +static void fix_unresolved_deltas(struct sha1file *f, int nr_unresolved); +static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned char *pack_sha1) +{ + if (nr_deltas == nr_resolved_deltas) { + stop_progress(&progress); + /* Flush remaining pack final 20-byte SHA1. */ + flush(); + return; + } + + if (fix_thin_pack) { + struct sha1file *f; + unsigned char read_sha1[20], tail_sha1[20]; + char msg[48]; + int nr_unresolved = nr_deltas - nr_resolved_deltas; + int nr_objects_initial = nr_objects; + if (nr_unresolved <= 0) + die(_("confusion beyond insanity")); + objects = xrealloc(objects, + (nr_objects + nr_unresolved + 1) + * sizeof(*objects)); + f = sha1fd(output_fd, curr_pack); + fix_unresolved_deltas(f, nr_unresolved); + sprintf(msg, "completed with %d local objects", + nr_objects - nr_objects_initial); + stop_progress_msg(&progress, msg); + sha1close(f, tail_sha1, 0); + hashcpy(read_sha1, pack_sha1); + fixup_pack_header_footer(output_fd, pack_sha1, + curr_pack, nr_objects, + read_sha1, consumed_bytes-20); + if (hashcmp(read_sha1, tail_sha1) != 0) + die("Unexpected tail checksum for %s " + "(disk corruption?)", curr_pack); + } + if (nr_deltas != nr_resolved_deltas) + die(Q_("pack has %d unresolved delta", + "pack has %d unresolved deltas", + nr_deltas - nr_resolved_deltas), + nr_deltas - nr_resolved_deltas); +} + static int write_compressed(struct sha1file *f, void *in, unsigned int size) { git_zstream stream; @@ -968,6 +1179,18 @@ static int git_index_pack_config(const char *k, const char *v, void *cb) die("bad pack.indexversion=%"PRIu32, opts->version); return 0; } + if (!strcmp(k, "pack.threads")) { + nr_threads = git_config_int(k, v); + if (nr_threads < 0) + die("invalid number of threads specified (%d)", + nr_threads); +#ifdef NO_PTHREADS + if (nr_threads != 1) + warning("no threads support, ignoring %s", k); + nr_threads = 1; +#endif + return 0; + } return git_default_config(k, v, cb); } @@ -1129,6 +1352,17 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) keep_msg = ""; } else if (!prefixcmp(arg, "--keep=")) { keep_msg = arg + 7; + } else if (!prefixcmp(arg, "--threads=")) { + char *end; + nr_threads = strtoul(arg+10, &end, 0); + if (!arg[10] || *end || nr_threads < 0) + usage(index_pack_usage); +#ifdef NO_PTHREADS + if (nr_threads != 1) + warning("no threads support, " + "ignoring %s", arg); + nr_threads = 1; +#endif } else if (!prefixcmp(arg, "--pack_header=")) { struct pack_header *hdr; char *c; @@ -1200,47 +1434,22 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) if (strict) opts.flags |= WRITE_IDX_STRICT; +#ifndef NO_PTHREADS + if (!nr_threads) { + nr_threads = online_cpus(); + /* An experiment showed that more threads does not mean faster */ + if (nr_threads > 3) + nr_threads = 3; + } +#endif + curr_pack = open_pack_file(pack_name); parse_pack_header(); objects = xcalloc(nr_objects + 1, sizeof(struct object_entry)); deltas = xcalloc(nr_objects, sizeof(struct delta_entry)); parse_pack_objects(pack_sha1); - if (nr_deltas == nr_resolved_deltas) { - stop_progress(&progress); - /* Flush remaining pack final 20-byte SHA1. */ - flush(); - } else { - if (fix_thin_pack) { - struct sha1file *f; - unsigned char read_sha1[20], tail_sha1[20]; - char msg[48]; - int nr_unresolved = nr_deltas - nr_resolved_deltas; - int nr_objects_initial = nr_objects; - if (nr_unresolved <= 0) - die(_("confusion beyond insanity")); - objects = xrealloc(objects, - (nr_objects + nr_unresolved + 1) - * sizeof(*objects)); - f = sha1fd(output_fd, curr_pack); - fix_unresolved_deltas(f, nr_unresolved); - sprintf(msg, "completed with %d local objects", - nr_objects - nr_objects_initial); - stop_progress_msg(&progress, msg); - sha1close(f, tail_sha1, 0); - hashcpy(read_sha1, pack_sha1); - fixup_pack_header_footer(output_fd, pack_sha1, - curr_pack, nr_objects, - read_sha1, consumed_bytes-20); - if (hashcmp(read_sha1, tail_sha1) != 0) - die("Unexpected tail checksum for %s " - "(disk corruption?)", curr_pack); - } - if (nr_deltas != nr_resolved_deltas) - die(Q_("pack has %d unresolved delta", - "pack has %d unresolved deltas", - nr_deltas - nr_resolved_deltas), - nr_deltas - nr_resolved_deltas); - } + resolve_deltas(); + conclude_pack(fix_thin_pack, curr_pack, pack_sha1); free(deltas); if (strict) check_objects(); diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 4c4d404afc..ff5a38372d 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -109,6 +109,7 @@ static void show_commit(struct commit *commit, void *data) struct pretty_print_context ctx = {0}; ctx.abbrev = revs->abbrev; ctx.date_mode = revs->date_mode; + ctx.date_mode_explicit = revs->date_mode_explicit; ctx.fmt = revs->commit_format; pretty_print_commit(&ctx, commit, &buf); if (revs->graph) { @@ -84,6 +84,7 @@ struct pretty_print_context { const char *after_subject; int preserve_subject; enum date_mode date_mode; + unsigned date_mode_explicit:1; int need_8bit_cte; int show_notes; struct reflog_walk_info *reflog_info; diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h index 2e20548557..8ad187344f 100644 --- a/compat/win32/pthread.h +++ b/compat/win32/pthread.h @@ -86,6 +86,11 @@ static inline int pthread_key_create(pthread_key_t *keyp, void (*destructor)(voi return (*keyp = TlsAlloc()) == TLS_OUT_OF_INDEXES ? EAGAIN : 0; } +static inline int pthread_key_delete(pthread_key_t key) +{ + return TlsFree(key) ? 0 : EINVAL; +} + static inline int pthread_setspecific(pthread_key_t key, const void *value) { return TlsSetValue(key, (void *)value) ? 0 : EINVAL; diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9f56ec7a6b..cd92322161 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -676,9 +676,7 @@ __git_complete_revlist_file () *) pfx="$ref:$pfx" ;; esac - local IFS=$'\n' - COMPREPLY=($(compgen -P "$pfx" \ - -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ + __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ | sed '/^100... blob /{ s,^.* ,, s,$, , @@ -692,7 +690,7 @@ __git_complete_revlist_file () s,$,/, } s/^.* //')" \ - -- "$cur_")) + "$pfx" "$cur_" "" ;; *...*) pfx="${cur_%...*}..." @@ -2603,21 +2601,6 @@ _git () { local i c=1 command __git_dir - if [[ -n ${ZSH_VERSION-} ]]; then - emulate -L bash - setopt KSH_TYPESET - - # workaround zsh's bug that leaves 'words' as a special - # variable in versions < 4.3.12 - typeset -h words - - # workaround zsh's bug that quotes spaces in the COMPREPLY - # array if IFS doesn't contain spaces. - typeset -h IFS - fi - - local cur words cword prev - _get_comp_words_by_ref -n =: cur words cword prev while [ $c -lt $cword ]; do i="${words[c]}" case "$i" in @@ -2667,22 +2650,6 @@ _git () _gitk () { - if [[ -n ${ZSH_VERSION-} ]]; then - emulate -L bash - setopt KSH_TYPESET - - # workaround zsh's bug that leaves 'words' as a special - # variable in versions < 4.3.12 - typeset -h words - - # workaround zsh's bug that quotes spaces in the COMPREPLY - # array if IFS doesn't contain spaces. - typeset -h IFS - fi - - local cur words cword prev - _get_comp_words_by_ref -n =: cur words cword prev - __git_has_doubledash && return local g="$(__gitdir)" @@ -2703,16 +2670,43 @@ _gitk () __git_complete_revlist } -complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \ - || complete -o default -o nospace -F _git git -complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \ - || complete -o default -o nospace -F _gitk gitk +__git_func_wrap () +{ + if [[ -n ${ZSH_VERSION-} ]]; then + emulate -L bash + setopt KSH_TYPESET + + # workaround zsh's bug that leaves 'words' as a special + # variable in versions < 4.3.12 + typeset -h words + + # workaround zsh's bug that quotes spaces in the COMPREPLY + # array if IFS doesn't contain spaces. + typeset -h IFS + fi + local cur words cword prev + _get_comp_words_by_ref -n =: cur words cword prev + $1 +} + +# Setup completion for certain functions defined above by setting common +# variables and workarounds. +# This is NOT a public function; use at your own risk. +__git_complete () +{ + local wrapper="__git_wrap${2}" + eval "$wrapper () { __git_func_wrap $2 ; }" + complete -o bashdefault -o default -o nospace -F $wrapper $1 2>/dev/null \ + || complete -o default -o nospace -F $wrapper $1 +} + +__git_complete git _git +__git_complete gitk _gitk # The following are necessary only for Cygwin, and only are needed # when the user has tab-completed the executable name and consequently # included the '.exe' suffix. # if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then -complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \ - || complete -o default -o nospace -F _git git.exe +__git_complete git.exe _git fi @@ -873,14 +873,14 @@ enum path_treatment { }; static enum path_treatment treat_one_path(struct dir_struct *dir, - char *path, int *len, + struct strbuf *path, const struct path_simplify *simplify, int dtype, struct dirent *de) { - int exclude = excluded(dir, path, &dtype); + int exclude = excluded(dir, path->buf, &dtype); if (exclude && (dir->flags & DIR_COLLECT_IGNORED) - && exclude_matches_pathspec(path, *len, simplify)) - dir_add_ignored(dir, path, *len); + && exclude_matches_pathspec(path->buf, path->len, simplify)) + dir_add_ignored(dir, path->buf, path->len); /* * Excluded? If we don't explicitly want to show @@ -890,7 +890,7 @@ static enum path_treatment treat_one_path(struct dir_struct *dir, return path_ignored; if (dtype == DT_UNKNOWN) - dtype = get_dtype(de, path, *len); + dtype = get_dtype(de, path->buf, path->len); /* * Do we want to see just the ignored files? @@ -907,9 +907,8 @@ static enum path_treatment treat_one_path(struct dir_struct *dir, default: return path_ignored; case DT_DIR: - memcpy(path + *len, "/", 2); - (*len)++; - switch (treat_directory(dir, path, *len, simplify)) { + strbuf_addch(path, '/'); + switch (treat_directory(dir, path->buf, path->len, simplify)) { case show_directory: if (exclude != !!(dir->flags & DIR_SHOW_IGNORED)) @@ -930,26 +929,21 @@ static enum path_treatment treat_one_path(struct dir_struct *dir, static enum path_treatment treat_path(struct dir_struct *dir, struct dirent *de, - char *path, int path_max, + struct strbuf *path, int baselen, - const struct path_simplify *simplify, - int *len) + const struct path_simplify *simplify) { int dtype; if (is_dot_or_dotdot(de->d_name) || !strcmp(de->d_name, ".git")) return path_ignored; - *len = strlen(de->d_name); - /* Ignore overly long pathnames! */ - if (*len + baselen + 8 > path_max) - return path_ignored; - memcpy(path + baselen, de->d_name, *len + 1); - *len += baselen; - if (simplify_away(path, *len, simplify)) + strbuf_setlen(path, baselen); + strbuf_addstr(path, de->d_name); + if (simplify_away(path->buf, path->len, simplify)) return path_ignored; dtype = DTYPE(de); - return treat_one_path(dir, path, len, simplify, dtype, de); + return treat_one_path(dir, path, simplify, dtype, de); } /* @@ -969,19 +963,19 @@ static int read_directory_recursive(struct dir_struct *dir, DIR *fdir = opendir(*base ? base : "."); int contents = 0; struct dirent *de; - char path[PATH_MAX + 1]; + struct strbuf path = STRBUF_INIT; if (!fdir) return 0; - memcpy(path, base, baselen); + strbuf_add(&path, base, baselen); while ((de = readdir(fdir)) != NULL) { - int len; - switch (treat_path(dir, de, path, sizeof(path), - baselen, simplify, &len)) { + switch (treat_path(dir, de, &path, baselen, simplify)) { case path_recurse: - contents += read_directory_recursive(dir, path, len, 0, simplify); + contents += read_directory_recursive(dir, path.buf, + path.len, 0, + simplify); continue; case path_ignored: continue; @@ -992,10 +986,11 @@ static int read_directory_recursive(struct dir_struct *dir, if (check_only) goto exit_early; else - dir_add_name(dir, path, len); + dir_add_name(dir, path.buf, path.len); } exit_early: closedir(fdir); + strbuf_release(&path); return contents; } @@ -1058,8 +1053,8 @@ static int treat_leading_path(struct dir_struct *dir, const char *path, int len, const struct path_simplify *simplify) { - char pathbuf[PATH_MAX]; - int baselen, blen; + struct strbuf sb = STRBUF_INIT; + int baselen, rc = 0; const char *cp; while (len && path[len - 1] == '/') @@ -1074,19 +1069,22 @@ static int treat_leading_path(struct dir_struct *dir, baselen = len; else baselen = cp - path; - memcpy(pathbuf, path, baselen); - pathbuf[baselen] = '\0'; - if (!is_directory(pathbuf)) - return 0; - if (simplify_away(pathbuf, baselen, simplify)) - return 0; - blen = baselen; - if (treat_one_path(dir, pathbuf, &blen, simplify, + strbuf_setlen(&sb, 0); + strbuf_add(&sb, path, baselen); + if (!is_directory(sb.buf)) + break; + if (simplify_away(sb.buf, sb.len, simplify)) + break; + if (treat_one_path(dir, &sb, simplify, DT_DIR, NULL) == path_ignored) - return 0; /* do not recurse into it */ - if (len <= baselen) - return 1; /* finished checking */ + break; /* do not recurse into it */ + if (len <= baselen) { + rc = 1; + break; /* finished checking */ + } } + strbuf_release(&sb); + return rc; } int read_directory(struct dir_struct *dir, const char *path, int len, const char **pathspec) @@ -1302,7 +1302,7 @@ class P4Submit(Command, P4UserMap): if not m.match(name): if verbose: - print "tag %s does not match regexp %s" % (name, validTagRegexp) + print "tag %s does not match regexp %s" % (name, validLabelRegexp) continue # Get the p4 commit this corresponds to @@ -1451,7 +1451,7 @@ class P4Submit(Command, P4UserMap): rebase.rebase() if gitConfig("git-p4.exportLabels", "--bool") == "true": - self.exportLabels = true + self.exportLabels = True if self.exportLabels: p4Labels = getP4Labels(self.depotPath) @@ -2711,7 +2711,7 @@ class P4Sync(Command, P4UserMap): sys.stdout.write("\n") if gitConfig("git-p4.importLabels", "--bool") == "true": - self.importLabels = true + self.importLabels = True if self.importLabels: p4Labels = getP4Labels(self.depotPaths) diff --git a/git-svn.perl b/git-svn.perl index 31d02b5f70..c84842ff03 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -106,7 +106,7 @@ my ($_stdin, $_help, $_edit, $_message, $_file, $_branch_dest, $_template, $_shared, $_version, $_fetch_all, $_no_rebase, $_fetch_parent, - $_merge, $_strategy, $_dry_run, $_local, + $_merge, $_strategy, $_preserve_merges, $_dry_run, $_local, $_prefix, $_no_checkout, $_url, $_verbose, $_git_format, $_commit_url, $_tag, $_merge_info, $_interactive); $Git::SVN::_follow_parent = 1; @@ -255,6 +255,7 @@ my %cmd = ( 'local|l' => \$_local, 'fetch-all|all' => \$_fetch_all, 'dry-run|n' => \$_dry_run, + 'preserve-merges|p' => \$_preserve_merges, %fc_opts } ], 'commit-diff' => [ \&cmd_commit_diff, 'Commit a diff between two trees', @@ -1592,6 +1593,7 @@ sub rebase_cmd { push @cmd, '-v' if $_verbose; push @cmd, qw/--merge/ if $_merge; push @cmd, "--strategy=$_strategy" if $_strategy; + push @cmd, "--preserve-merges" if $_preserve_merges; @cmd; } @@ -318,7 +318,7 @@ static struct grep_expr *prep_header_patterns(struct grep_opt *opt) if (!opt->header_list) return NULL; - p = opt->header_list; + for (p = opt->header_list; p; p = p->next) { if (p->token != GREP_PATTERN_HEAD) die("bug: a non-header pattern in grep header list."); diff --git a/log-tree.c b/log-tree.c index 44f0268372..376d973176 100644 --- a/log-tree.c +++ b/log-tree.c @@ -629,10 +629,9 @@ void show_log(struct rev_info *opt) * graph info here. */ show_reflog_message(opt->reflog_info, - opt->commit_format == CMIT_FMT_ONELINE, - opt->date_mode_explicit ? - opt->date_mode : - DATE_NORMAL); + opt->commit_format == CMIT_FMT_ONELINE, + opt->date_mode, + opt->date_mode_explicit); if (opt->commit_format == CMIT_FMT_ONELINE) return; } @@ -652,6 +651,7 @@ void show_log(struct rev_info *opt) if (ctx.need_8bit_cte >= 0) ctx.need_8bit_cte = has_non_ascii(opt->add_signoff); ctx.date_mode = opt->date_mode; + ctx.date_mode_explicit = opt->date_mode_explicit; ctx.abbrev = opt->diffopt.abbrev; ctx.after_subject = extra_headers; ctx.preserve_subject = opt->preserve_subject; @@ -8,6 +8,9 @@ Leader: Byrial Jensen <byrial@vip.cybercity.dk> Language: de (German) Repository: https://github.com/ralfth/git-po-de Leader: Ralf Thielow <ralf.thielow@googlemail.com> +Members: Thomas Rast <trast@student.ethz.ch> + Jan Krüger <jk@jk.gs> + Christian Stimming <stimming@tuhh.de> Language: is (Icelandic) Leader: Ævar Arnfjörð Bjarmason <avarab@gmail.com> @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: git 1.7.10\n" "Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n" -"POT-Creation-Date: 2012-04-28 20:17+0800\n" +"POT-Creation-Date: 2012-05-08 15:45+0800\n" "PO-Revision-Date: 2012-03-28 18:46+0200\n" "Last-Translator: Ralf Thielow <ralf.thielow@googlemail.com>\n" "Language-Team: German\n" @@ -34,8 +34,8 @@ msgid "" "or use 'git commit -a'." msgstr "" "Korrigiere dies im Arbeitsbaum,\n" -"und benutze dann 'git add/rm <Datei>' wie\n" -"vorgesehen, um die Auflösung zu markieren und dann einzutragen,\n" +"und benutze dann 'git add/rm <Datei>'\n" +"um die Auflösung entsprechend zu markieren und einzutragen,\n" "oder benutze 'git commit -a'." #: commit.c:48 @@ -54,7 +54,7 @@ msgstr "Speicher verbraucht" #: connected.c:39 msgid "Could not run 'git rev-list'" -msgstr "'git rev-list' konnte nicht ausgeführt werden" +msgstr "Konnte 'git rev-list' nicht ausführen" #: connected.c:48 #, c-format @@ -122,7 +122,7 @@ msgstr "" #: gpg-interface.c:59 msgid "could not run gpg." -msgstr "gpg konnte nicht ausgeführt werden" +msgstr "konnte gpg nicht ausführen" #: gpg-interface.c:71 msgid "gpg did not accept the data" @@ -145,7 +145,7 @@ msgstr "'%s': %s" #: grep.c:1308 #, c-format msgid "'%s': short read %s" -msgstr "'%s': kurz gelesen %s" +msgstr "'%s': read() zu kurz %s" #: help.c:287 #, c-format @@ -169,9 +169,10 @@ msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n" msgid_plural "" "Your branch is behind '%s' by %d commits, and can be fast-forwarded.\n" msgstr[0] "" -"Dein Zweig ist hinter '%s' um %d Version, und kann vorgespult werden.\n" +"Dein Zweig ist zu '%s' um %d Version hinterher, und kann vorgespult werden.\n" msgstr[1] "" -"Dein Zweig ist hinter '%s' um %d Versionen, und kann vorgespult werden.\n" +"Dein Zweig ist zu '%s' um %d Versionen hinterher, und kann vorgespult " +"werden.\n" #: remote.c:1621 #, c-format @@ -259,7 +260,8 @@ msgstr "Du hast keine gültige Zweigspitze (HEAD)" #, c-format msgid "Commit %s is a merge but no -m option was given." msgstr "" -"Version %s ist eine Zusammenführung, aber es wurde keine Option -m angegeben." +"Version %s ist eine Zusammenführung, aber die Option -m wurde nicht " +"angegeben." #: sequencer.c:324 #, c-format @@ -294,8 +296,8 @@ msgstr "Konnte %s nicht zurücksetzen... %s" msgid "could not apply %s... %s" msgstr "Konnte %s nicht anwenden... %s" -#: sequencer.c:450 sequencer.c:909 builtin/log.c:289 builtin/log.c:719 -#: builtin/log.c:1335 builtin/log.c:1554 builtin/merge.c:347 +#: sequencer.c:450 sequencer.c:909 builtin/log.c:288 builtin/log.c:713 +#: builtin/log.c:1329 builtin/log.c:1548 builtin/merge.c:347 #: builtin/shortlog.c:181 msgid "revision walk setup failed" msgstr "Einrichtung des Revisionsgangs fehlgeschlagen" @@ -331,12 +333,12 @@ msgstr "Keine Versionen geparst." #: sequencer.c:591 #, c-format msgid "Could not open %s" -msgstr "%s konnte nicht geöffnet werden." +msgstr "Konnte %s nicht öffnen" #: sequencer.c:595 #, c-format msgid "Could not read %s." -msgstr "%s konnte nicht gelesen werden." +msgstr "Konnte %s nicht lesen." #: sequencer.c:602 #, c-format @@ -360,7 +362,7 @@ msgstr "Fehlerhaftes Optionsblatt: %s" #: sequencer.c:666 msgid "a cherry-pick or revert is already in progress" -msgstr "\"cherry-pick\" oder \"revert\" wird bereits ausgeführt" +msgstr "\"cherry-pick\" oder \"revert\" ist bereits im Gang" #: sequencer.c:667 msgid "try \"git cherry-pick (--continue | --quit | --abort)\"" @@ -378,7 +380,7 @@ msgstr "Fehler beim Einpacken von %s." #: sequencer.c:706 sequencer.c:840 msgid "no cherry-pick or revert in progress" -msgstr "kein \"cherry-pick\" oder \"revert\" in Ausführung" +msgstr "kein \"cherry-pick\" oder \"revert\" im Gang" #: sequencer.c:708 msgid "cannot resolve HEAD" @@ -386,7 +388,7 @@ msgstr "kann Zweigspitze (HEAD) nicht auflösen" #: sequencer.c:710 msgid "cannot abort from a branch yet to be born" -msgstr "kann nicht von einem Zweig abbrechen, der noch geboren wird" +msgstr "kann nicht abbrechen: bin auf einem Zweig, der noch geboren wird" #: sequencer.c:732 #, c-format @@ -462,7 +464,7 @@ msgstr "" #: wt-status.c:143 msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)" msgstr "" -" (benutze \"git add/rm <Datei>...\" wie vorgesehen, um die Auflösung zu " +" (benutze \"git add/rm <Datei>...\" um die Auflösung entsprechend zu " "markieren)" #: wt-status.c:151 @@ -475,12 +477,11 @@ msgstr "Änderungen, die nicht zum Eintragen bereitgestellt sind:" #: wt-status.c:173 msgid " (use \"git add <file>...\" to update what will be committed)" -msgstr " (benutze \"git add <Datei>...\" zur Aktualisierung der Eintragung)" +msgstr " (benutze \"git add <Datei>...\" zum Bereitstellen)" #: wt-status.c:175 msgid " (use \"git add/rm <file>...\" to update what will be committed)" -msgstr "" -" (benutze \"git add/rm <Datei>...\" zur Aktualisierung der Eintragung)" +msgstr " (benutze \"git add/rm <Datei>...\" zum Bereitstellen)" #: wt-status.c:176 msgid "" @@ -492,7 +493,7 @@ msgstr "" #: wt-status.c:178 msgid " (commit or discard the untracked or modified content in submodules)" msgstr "" -" (trage ein oder verwerfe den ungefolgten oder geänderten Inhalt in den " +" (trage ein oder verwerfe den unbeobachteten oder geänderten Inhalt in den " "Unterprojekten)" #: wt-status.c:187 @@ -547,7 +548,7 @@ msgstr "geänderter Inhalt, " #: wt-status.c:252 msgid "untracked content, " -msgstr "unverfolgter Inhalt, " +msgstr "unbeobachteter Inhalt, " #: wt-status.c:266 #, c-format @@ -608,7 +609,7 @@ msgstr "Initiale Version" #: wt-status.c:745 msgid "Untracked" -msgstr "Unverfolgte" +msgstr "Unbeobachtete" #: wt-status.c:747 msgid "Ignored" @@ -617,11 +618,11 @@ msgstr "Ignorierte" #: wt-status.c:749 #, c-format msgid "Untracked files not listed%s" -msgstr "Unverfolgte Dateien nicht aufgelistet%s" +msgstr "Unbeobachtete Dateien nicht aufgelistet%s" #: wt-status.c:751 msgid " (use -u option to show untracked files)" -msgstr " (benutze die Option -u um unverfolgte Dateien anzuzeigen)" +msgstr " (benutze die Option -u um unbeobachteten Dateien anzuzeigen)" #: wt-status.c:757 msgid "No changes" @@ -639,11 +640,12 @@ msgstr " (benutze \"git add\" und/oder \"git commit -a\")" #: wt-status.c:765 #, c-format msgid "nothing added to commit but untracked files present%s\n" -msgstr "nichts zum Eintragen hinzugefügt, aber es gibt unverfolgte Dateien%s\n" +msgstr "" +"nichts zum Eintragen hinzugefügt, aber es gibt unbeobachtete Dateien%s\n" #: wt-status.c:767 msgid " (use \"git add\" to track)" -msgstr " (benutze \"git add\" zum Verfolgen)" +msgstr " (benutze \"git add\" zum Beobachten)" #: wt-status.c:769 wt-status.c:772 wt-status.c:775 #, c-format @@ -652,11 +654,11 @@ msgstr "nichts zum Eintragen%s\n" #: wt-status.c:770 msgid " (create/copy files and use \"git add\" to track)" -msgstr " (Erstelle/Kopiere Dateien und benutze \"git add\" zum Verfolgen)" +msgstr " (Erstelle/Kopiere Dateien und benutze \"git add\" zum Beobachten)" #: wt-status.c:773 msgid " (use -u to show untracked files)" -msgstr " (benutze -u um unverfolgte Dateien anzuzeigen)" +msgstr " (benutze die Option -u um unbeobachtete Dateien anzuzeigen)" #: wt-status.c:776 msgid " (working directory clean)" @@ -672,15 +674,15 @@ msgstr "Initiale Version auf " #: wt-status.c:905 msgid "behind " -msgstr "hinter " +msgstr "hinterher " #: wt-status.c:908 wt-status.c:911 msgid "ahead " -msgstr "über " +msgstr "voraus " #: wt-status.c:913 msgid ", behind " -msgstr ", hinter " +msgstr ", hinterher " #: builtin/add.c:62 #, c-format @@ -689,7 +691,7 @@ msgstr "unerwarteter Differenz-Status %c" #: builtin/add.c:67 builtin/commit.c:298 msgid "updating files failed" -msgstr "Aktualisierung von Dateien fehlgeschlagen" +msgstr "Aktualisierung der Dateien fehlgeschlagen" #: builtin/add.c:77 #, c-format @@ -732,7 +734,7 @@ msgstr "Konnte Patch nicht schreiben" #: builtin/add.c:295 #, c-format msgid "Could not stat '%s'" -msgstr "Verzeichnis '%s' konnte nicht gelesen werden" +msgstr "Konnte Verzeichnis '%s' nicht lesen" #: builtin/add.c:297 msgid "Empty patch. Aborted." @@ -779,7 +781,7 @@ msgstr "Nichts spezifiziert, nichts hinzugefügt.\n" #: builtin/add.c:414 #, c-format msgid "Maybe you wanted to say 'git add .'?\n" -msgstr "Wolltest du vieleicht 'git add .' sagen?\n" +msgstr "Wolltest du vielleicht 'git add .' sagen?\n" #: builtin/add.c:420 builtin/clean.c:95 builtin/commit.c:358 builtin/mv.c:82 #: builtin/rm.c:162 @@ -801,7 +803,7 @@ msgstr "Konnte Ausgabe nicht umleiten." #: builtin/archive.c:37 msgid "git archive: Remote with no URL" -msgstr "git archive: Anderes Archiv ohne URL" +msgstr "git archive: Externes Archiv ohne URL" #: builtin/archive.c:58 msgid "git archive: expected ACK/NAK, got EOF" @@ -815,7 +817,7 @@ msgstr "git archive: NACK %s" #: builtin/archive.c:65 #, c-format msgid "remote error: %s" -msgstr "Versandfehler: %s" +msgstr "Fehler am anderen Ende: %s" #: builtin/archive.c:66 msgid "git archive: protocol error" @@ -831,7 +833,7 @@ msgid "" "deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD." msgstr "" -"entferne Zweig '%s' der zusammengeführt wurde mit\n" +"entferne Zweig '%s', der zusammengeführt wurde mit\n" " '%s', aber noch nicht mit der Zweigspitze (HEAD) zusammengeführt " "wurde." @@ -841,13 +843,13 @@ msgid "" "not deleting branch '%s' that is not yet merged to\n" " '%s', even though it is merged to HEAD." msgstr "" -"entferne nicht Zweig '%s' der noch nicht zusammengeführt wurde mit\n" +"entferne Zweig '%s' nicht, der noch nicht zusammengeführt wurde mit\n" " '%s', obwohl er mit der Zweigspitze (HEAD) zusammengeführt wurde." #. TRANSLATORS: This is "remote " in "remote branch '%s' not found" #: builtin/branch.c:164 msgid "remote " -msgstr "entfernter " +msgstr "externer " #: builtin/branch.c:172 msgid "cannot use -a with -d" @@ -860,7 +862,8 @@ msgstr "Konnte Versionsobjekt für Zweigspitze (HEAD) nicht nachschlagen." #: builtin/branch.c:183 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." -msgstr "Kann Zweig '%s' nicht entfernen auf dem du dich gerade befindest." +msgstr "" +"Kann Zweig '%s' nicht entfernen, da du dich gerade auf diesem befindest." #: builtin/branch.c:193 #, c-format @@ -903,17 +906,17 @@ msgstr "Zweig '%s' zeigt auf keine Version" #: builtin/branch.c:396 #, c-format msgid "behind %d] " -msgstr "hinter %d] " +msgstr "%d hinterher] " #: builtin/branch.c:398 #, c-format msgid "ahead %d] " -msgstr "vor %d] " +msgstr "%d voraus] " #: builtin/branch.c:400 #, c-format msgid "ahead %d, behind %d] " -msgstr "vor %d, hinter %d] " +msgstr "%d voraus, %d hinterher] " #: builtin/branch.c:503 msgid "(no branch)" @@ -921,7 +924,7 @@ msgstr "(kein Zweig)" #: builtin/branch.c:568 msgid "some refs could not be read" -msgstr "einige Referenzen konnten nicht gelesen werden" +msgstr "Konnte einige Referenzen nicht lesen" #: builtin/branch.c:581 msgid "cannot rename the current branch while not on any." @@ -965,7 +968,7 @@ msgstr "Konnte Beschreibungsvorlage für Zweig nicht schreiben: %s\n" #: builtin/branch.c:750 msgid "Failed to resolve HEAD as a valid ref." -msgstr "Zweigspitze (HEAD) konnte nicht als gültige Referenz aufgelöst werden." +msgstr "Konnte Zweigspitze (HEAD) nicht als gültige Referenz auflösen." #: builtin/branch.c:755 builtin/clone.c:558 msgid "HEAD not found below refs/heads!" @@ -988,7 +991,7 @@ msgstr "Um ein Paket zu erstellen wird ein Projektarchiv benötigt." #: builtin/bundle.c:60 msgid "Need a repository to unbundle." -msgstr "Zum Zerlegen wird ein Projektarchiv benötigt." +msgstr "Zum Entpacken wird ein Projektarchiv benötigt." #: builtin/checkout.c:113 builtin/checkout.c:146 #, c-format @@ -1100,12 +1103,12 @@ msgid_plural "" "\n" "%s\n" msgstr[0] "" -"Warnung: Du verlässt %d Version zurückliegend, nicht verbunden zu\n" +"Warnung: Du bist um %d Version hinterher, nicht verbunden zu\n" "einem deiner Zweige:\n" "\n" "%s\n" msgstr[1] "" -"Warnung: Du verlässt %d Versionen zurückliegend, nicht verbunden zu\n" +"Warnung: Du bist um %d Versionen hinterher, nicht verbunden zu\n" "einem deiner Zweige:\n" "\n" "%s\n" @@ -1135,7 +1138,7 @@ msgstr "Vorherige Position der Zweigspitze (HEAD) war" #: builtin/checkout.c:723 msgid "You are on a branch yet to be born" -msgstr "Du bist auf einem Zweig, der noch nicht geboren wurde." +msgstr "du bist auf einem Zweig, der noch geboren wird" #. case (1) #: builtin/checkout.c:854 @@ -1195,16 +1198,16 @@ msgid "" "git checkout: updating paths is incompatible with switching branches.\n" "Did you intend to checkout '%s' which can not be resolved as commit?" msgstr "" -"git checkout: Aktualisierung der Pfade ist inkompatibel mit dem Wechsel von " -"Zweigen.\n" +"git checkout: Die Aktualisierung von Pfaden ist inkompatibel mit dem Wechsel " +"von Zweigen.\n" "Hast du beabsichtigt '%s' auszuchecken, welcher nicht als Version aufgelöst " "werden kann?" #: builtin/checkout.c:1062 msgid "git checkout: updating paths is incompatible with switching branches." msgstr "" -"git checkout: Aktualisierung von Pfaden ist inkompatibel mit dem Wechsel von " -"Zweigen." +"git checkout: Die Aktualisierung von Pfaden ist inkompatibel mit dem Wechsel " +"von Zweigen." #: builtin/checkout.c:1067 msgid "git checkout: --detach does not take a path argument" @@ -1216,7 +1219,7 @@ msgid "" "checking out of the index." msgstr "" "git checkout: --ours/--theirs, --force and --merge sind inkompatibel wenn\n" -"du außerhalb der Bereitstellung auscheckst." +"du aus der Bereitstellung auscheckst." #: builtin/checkout.c:1089 msgid "Cannot switch branch to a non-commit." @@ -1235,7 +1238,7 @@ msgid "" "clean.requireForce set to true and neither -n nor -f given; refusing to clean" msgstr "" "clean.requireForce auf \"true\" gesetzt und weder -n noch -f gegeben; " -"Ablehnung der Reinigung" +"Säuberung verweigert" #: builtin/clean.c:85 msgid "" @@ -1243,12 +1246,12 @@ msgid "" "clean" msgstr "" "clean.requireForce standardmäßig auf \"true\" gesetzt und weder -n noch -f " -"gegeben; Ablehnung der Reinigung" +"gegeben; Säuberung verweigert" #: builtin/clean.c:155 builtin/clean.c:176 #, c-format msgid "Would remove %s\n" -msgstr "Würde entfernen %s\n" +msgstr "Würde %s entfernen\n" #: builtin/clean.c:159 builtin/clean.c:179 #, c-format @@ -1288,7 +1291,7 @@ msgstr "Fehler beim Erstellen von Verzeichnis '%s'" #: builtin/clone.c:308 builtin/diff.c:75 #, c-format msgid "failed to stat '%s'" -msgstr "'%s' konnte nicht gelesen werden" +msgstr "Konnte '%s' nicht lesen" #: builtin/clone.c:310 #, c-format @@ -1298,22 +1301,22 @@ msgstr "%s existiert und ist kein Verzeichnis" #: builtin/clone.c:324 #, c-format msgid "failed to stat %s\n" -msgstr "%s konnte nicht gelesen werden\n" +msgstr "Konnte %s nicht lesen\n" #: builtin/clone.c:341 #, c-format msgid "failed to unlink '%s'" -msgstr "Verknüpfung von '%s' konnte nicht aufgehoben werden." +msgstr "Konnte '%s' nicht entfernen" #: builtin/clone.c:346 #, c-format msgid "failed to create link '%s'" -msgstr "Verknüpfung '%s' konnte nicht erstellt werden." +msgstr "Konnte Verknüpfung '%s' nicht erstellen" #: builtin/clone.c:350 #, c-format msgid "failed to copy file to '%s'" -msgstr "Datei konnte nicht nach '%s' kopiert werden." +msgstr "Konnte Datei nicht nach '%s' kopieren" #: builtin/clone.c:373 #, c-format @@ -1323,13 +1326,13 @@ msgstr "Fertig.\n" #: builtin/clone.c:440 #, c-format msgid "Could not find remote branch %s to clone." -msgstr "Entfernter Zweig %s konnte nicht zum Klonen gefunden werden." +msgstr "Konnte zu klonenden externer Zweig %s nicht finden." #: builtin/clone.c:549 msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n" msgstr "" -"Entfernte Zweigspitze (HEAD) bezieht sich auf eine nicht existierende " -"Referenz und kann nicht ausgecheckt werden.\n" +"Externe Zweigspitze (HEAD) bezieht sich auf eine nicht existierende Referenz " +"und kann nicht ausgecheckt werden.\n" #: builtin/clone.c:639 msgid "Too many arguments." @@ -1337,7 +1340,7 @@ msgstr "Zu viele Argumente." #: builtin/clone.c:643 msgid "You must specify a repository to clone." -msgstr "Du musst ein Projektarchiv zum Klonen spezifizieren." +msgstr "Du musst ein Projektarchiv zum Klonen angeben." #: builtin/clone.c:654 #, c-format @@ -1376,7 +1379,7 @@ msgstr "Konnte Arbeitsverzeichnis '%s' nicht erstellen." #: builtin/clone.c:728 #, c-format msgid "Cloning into bare repository '%s'...\n" -msgstr "Klone in leeres Projektarchiv '%s'...\n" +msgstr "Klone in bloßes Projektarchiv '%s'...\n" #: builtin/clone.c:730 #, c-format @@ -1391,7 +1394,7 @@ msgstr "Weiß nicht wie %s zu klonen ist." #: builtin/clone.c:835 #, c-format msgid "Remote branch %s not found in upstream %s" -msgstr "entfernter Zweig %s nicht im anderen Projektarchiv gefunden %s" +msgstr "externer Zweig %s nicht im anderen Projektarchiv %s gefunden" #: builtin/clone.c:842 msgid "You appear to have cloned an empty repository." @@ -1477,7 +1480,7 @@ msgstr "Konnte new_index Datei nicht schreiben" #: builtin/commit.c:457 #, c-format msgid "cannot do a partial commit during a %s." -msgstr "Kann keine partielle Eintragung während eines %s durchführen." +msgstr "Kann keine partielle Eintragung durchführen, während %s im Gange ist." #: builtin/commit.c:466 msgid "cannot read the index" @@ -1570,8 +1573,8 @@ msgid "" " Lines starting\n" "with '#' will be ignored, and an empty message aborts the commit.\n" msgstr "" -" Zeilen beginnend\n" -"mit '#' werden ignoriert, und eine leere Versionsbeschreibung bricht die " +" Zeilen, die mit '#'\n" +"beginnen, werden ignoriert, und eine leere Versionsbeschreibung bricht die " "Eintragung ab.\n" #: builtin/commit.c:820 @@ -1580,8 +1583,8 @@ msgid "" "with '#' will be kept; you may remove them yourself if you want to.\n" "An empty message aborts the commit.\n" msgstr "" -" Zeilen beginnend\n" -"mit '#' werden beibehalten; wenn du möchtest, kannst du diese entfernen.\n" +" Zeilen, die mit '#'\n" +"beginnen, werden beibehalten; wenn du möchtest, kannst du diese entfernen.\n" "Eine leere Versionsbeschreibung bricht die Eintragung ab.\n" #: builtin/commit.c:832 @@ -1600,7 +1603,7 @@ msgstr "Kann Bereitstellung nicht lesen" #: builtin/commit.c:896 msgid "Error building trees" -msgstr "Fehler beim Erzeugen der Bäume" +msgstr "Fehler beim Erzeugen der Zweige" #: builtin/commit.c:911 builtin/tag.c:357 #, c-format @@ -1615,7 +1618,7 @@ msgstr "Kein existierender Autor mit '%s' gefunden." #: builtin/commit.c:1023 builtin/commit.c:1217 #, c-format msgid "Invalid untracked files mode '%s'" -msgstr "Ungültiger Modus '%s' für unverfolgte Dateien" +msgstr "Ungültiger Modus '%s' für unbeobachtete Dateien" #: builtin/commit.c:1063 msgid "Using both --reset-author and --author does not make sense" @@ -1628,7 +1631,7 @@ msgstr "Du hast nichts zum nachbessern." #: builtin/commit.c:1076 #, c-format msgid "You are in the middle of a %s -- cannot amend." -msgstr "Du bist in der Mitte eines %s -- kann nicht nachbessern." +msgstr "%s ist im Gange -- kann nicht nachbessern." #: builtin/commit.c:1078 msgid "Options --squash and --fixup cannot be used together" @@ -1660,12 +1663,12 @@ msgstr "--include/--only machen ohne Pfade keinen Sinn." #: builtin/commit.c:1119 msgid "Clever... amending the last one with dirty index." msgstr "" -"Klug... nachbessern der letzten Version mit einem unsauberen Bereitstellung." +"Klug... die letzte Version mit einer unsauberen Bereitstellung nachbessern." #: builtin/commit.c:1121 msgid "Explicit paths specified without -i nor -o; assuming --only paths..." msgstr "" -"Explizite Pfade ohne -i oder -o spezifiziert; unter der Annahme von --only " +"Explizite Pfade ohne -i oder -o angegeben; unter der Annahme von --only " "Pfaden..." #: builtin/commit.c:1131 builtin/tag.c:556 @@ -1762,12 +1765,12 @@ msgstr "annotierte Markierung %s hat keinen eingebetteten Namen" #: builtin/describe.c:240 #, c-format msgid "tag '%s' is really '%s' here" -msgstr "Markierung '%s' ist wirklich '%s' hier" +msgstr "Markierung '%s' ist eigentlich '%s' hier" #: builtin/describe.c:267 #, c-format msgid "Not a valid object name %s" -msgstr "kein gültiger Objekt-Name %s" +msgstr "%s ist kein gültiger Objekt-Name" #: builtin/describe.c:270 #, c-format @@ -1782,7 +1785,7 @@ msgstr "kein Markierung entspricht exakt '%s'" #: builtin/describe.c:289 #, c-format msgid "searching to describe %s\n" -msgstr "suche um zu beschreiben %s\n" +msgstr "suche zur Beschreibung von %s\n" #: builtin/describe.c:329 #, c-format @@ -1810,7 +1813,7 @@ msgstr "" #: builtin/describe.c:378 #, c-format msgid "traversed %lu commits\n" -msgstr "verarbeitete %lu Versionen\n" +msgstr "%lu Versionen durchlaufen\n" #: builtin/describe.c:381 #, c-format @@ -1818,7 +1821,7 @@ msgid "" "more than %i tags found; listed %i most recent\n" "gave up search at %s\n" msgstr "" -"mehr als %i Markierungen gefunden; Führe die %i jüngsten auf\n" +"mehr als %i Markierungen gefunden; Führe die ersten %i auf\n" "Suche bei %s aufgegeben\n" #: builtin/describe.c:436 @@ -1831,7 +1834,7 @@ msgstr "Keine Namen gefunden, kann nichts beschreiben." #: builtin/describe.c:482 msgid "--dirty is incompatible with committishes" -msgstr "--dirty ist inkompatibel mit \"committish\"-Werten" +msgstr "--dirty ist inkompatibel mit Versionen" #: builtin/diff.c:77 #, c-format @@ -1850,26 +1853,26 @@ msgstr "Kein Git-Projektarchiv" #: builtin/diff.c:347 #, c-format msgid "invalid object '%s' given." -msgstr "Ungültiges Objekt '%s' gegeben." +msgstr "Objekt '%s' ist ungültig." #: builtin/diff.c:352 #, c-format msgid "more than %d trees given: '%s'" -msgstr "Mehr als %d Bäume gegeben: '%s'" +msgstr "Mehr als %d Zweige angegeben: '%s'" #: builtin/diff.c:362 #, c-format msgid "more than two blobs given: '%s'" -msgstr "Mehr als zwei Blobs gegeben: '%s'" +msgstr "Mehr als zwei Blobs angegeben: '%s'" #: builtin/diff.c:370 #, c-format msgid "unhandled object '%s' given." -msgstr "unbehandeltes Objekt '%s' gegeben" +msgstr "unbehandeltes Objekt '%s' angegeben" #: builtin/fetch.c:200 msgid "Couldn't find remote ref HEAD" -msgstr "Konnte entfernte Referenz der Zweigspitze (HEAD) nicht finden." +msgstr "Konnte externe Referenz der Zweigspitze (HEAD) nicht finden." #: builtin/fetch.c:253 #, c-format @@ -1948,7 +1951,7 @@ msgstr "" #: builtin/fetch.c:549 #, c-format msgid " (%s will become dangling)\n" -msgstr " (%s wird unreferenziert werden)\n" +msgstr " (%s wird unreferenziert)\n" #: builtin/fetch.c:550 #, c-format @@ -1961,14 +1964,14 @@ msgstr "[gelöscht]" #: builtin/fetch.c:558 msgid "(none)" -msgstr "(keine)" +msgstr "(nichts)" #: builtin/fetch.c:675 #, c-format msgid "Refusing to fetch into current branch %s of non-bare repository" msgstr "" -"Ablehnung des Anforderns in aktuellen Zweig %s von einem nicht-leeren " -"Projektarchiv" +"Das Anfordern in den aktuellen Zweig %s von einem nicht-bloßen" +"\"Projektarchiv wurde verweigert." #: builtin/fetch.c:709 #, c-format @@ -1988,29 +1991,29 @@ msgstr "Option \"%s\" wird ignoriert für %s\n" #: builtin/fetch.c:888 #, c-format msgid "Fetching %s\n" -msgstr "Hole %s ab\n" +msgstr "Fordere an von %s\n" #: builtin/fetch.c:890 #, c-format msgid "Could not fetch %s" -msgstr "Konnte %s nicht anfordern" +msgstr "Konnte nicht von %s anfordern" #: builtin/fetch.c:907 msgid "" "No remote repository specified. Please, specify either a URL or a\n" "remote name from which new revisions should be fetched." msgstr "" -"Kein entferntes Projektarchiv spezifiziert. Bitte spezifiziere entweder\n" -"eine URL oder einen Entfernungsname, von welchem neue Revisionen angefordert " -"werden sollen." +"Kein externes Projektarchiv angegeben. Bitte gebe entweder eine URL\n" +"oder den Namen des externen Archivs an, von welchem neue\n" +"Versionen angefordert werden sollen." #: builtin/fetch.c:927 msgid "You need to specify a tag name." -msgstr "Du musst den Namen der Markierung spezifizieren." +msgstr "Du musst den Namen der Markierung angeben." #: builtin/fetch.c:979 msgid "fetch --all does not take a repository argument" -msgstr "fetch -all nimmt kein Projektarchiv als Argument" +msgstr "fetch --all akzeptiert kein Projektarchiv als Argument" #: builtin/fetch.c:981 msgid "fetch --all does not make sense with refspecs" @@ -2019,7 +2022,7 @@ msgstr "fetch --all macht keinen Sinn mit Referenzspezifikationen" #: builtin/fetch.c:992 #, c-format msgid "No such remote or remote group: %s" -msgstr "Keine solche Entfernung oder Entfernungsgruppe: %s" +msgstr "Kein externes Archiv (einzeln oder Gruppe): %s" #: builtin/fetch.c:1000 msgid "Fetching a group and specifying refspecs does not make sense" @@ -2034,17 +2037,19 @@ msgstr "Ungültiger %s: '%s'" #: builtin/gc.c:78 msgid "Too many options specified" -msgstr "Zu viele Optionen spezifiziert" +msgstr "Zu viele Optionen angegeben" #: builtin/gc.c:103 #, c-format msgid "insanely long object directory %.*s" -msgstr "wahnsinnig langes Objekt-Verzeichnis %.*s" +msgstr "zu langes Objekt-Verzeichnis %.*s" #: builtin/gc.c:223 #, c-format msgid "Auto packing the repository for optimum performance.\n" -msgstr "Automatische Paketierung des Repositories für optimale Leitung.\n" +msgstr "" +"Die Datenbank des Projektarchivs wird für eine optimale Performance " +"komprimiert.\n" #: builtin/gc.c:226 #, c-format @@ -2052,17 +2057,16 @@ msgid "" "Auto packing the repository for optimum performance. You may also\n" "run \"git gc\" manually. See \"git help gc\" for more information.\n" msgstr "" -"Automatische Paketierung des Repositories für optimale Leitung. Du darfst " -"auch\n" -"\"git gc\" manuell ausführen. Siehe \"git help gc\" für weitere " -"Informationen.\n" +"Die Datenbank des Projektarchivs wird für eine optimale Performance\n" +"komprimiert. Du kannst auch \"git gc\" manuell ausführen. Siehe \"git help gc" +"\" für weitere Informationen.\n" #: builtin/gc.c:256 msgid "" "There are too many unreachable loose objects; run 'git prune' to remove them." msgstr "" -"Es gibt zu viele unerreichbare, verlorene Objekte; führe 'git prune' aus um " -"diese zu entfernen." +"Es gibt zu viele unerreichbare lose Objekte; führe 'git prune' aus, um diese " +"zu entfernen." #: builtin/grep.c:216 #, c-format @@ -2077,12 +2081,12 @@ msgstr "Fehler beim Verzeichniswechsel: %s" #: builtin/grep.c:478 builtin/grep.c:512 #, c-format msgid "unable to read tree (%s)" -msgstr "konnte Baum (%s) nicht lesen" +msgstr "konnte Zweig (%s) nicht lesen" #: builtin/grep.c:526 #, c-format msgid "unable to grep from object of type %s" -msgstr "kann \"grep\" nicht mit Objekt des Typs \"%s\" durchführen" +msgstr "kann \"grep\" nicht mit Objekten des Typs \"%s\" durchführen" #: builtin/grep.c:584 #, c-format @@ -2101,7 +2105,7 @@ msgstr "keine Muster gegeben" #: builtin/grep.c:902 #, c-format msgid "bad object %s" -msgstr "schlechtes Objekt %s" +msgstr "ungültiges Objekt %s" #: builtin/grep.c:943 msgid "--open-files-in-pager only works on the worktree" @@ -2118,11 +2122,11 @@ msgstr "--no-index oder --untracked kann nicht mit Revisionen benutzt werden" #: builtin/grep.c:974 msgid "--[no-]exclude-standard cannot be used for tracked contents." msgstr "" -"--[no-]exlude-standard kann nicht mit verfolgten Inhalten benutzt werden" +"--[no-]exlude-standard kann nicht mit beobachteten Inhalten benutzt werden" #: builtin/grep.c:982 msgid "both --cached and trees are given." -msgstr "sowohl --cached als auch Bäume gegeben" +msgstr "sowohl --cached als auch Zweige gegeben" #: builtin/init-db.c:35 #, c-format @@ -2132,12 +2136,12 @@ msgstr "Konnte %s nicht schreibbar für Gruppen machen" #: builtin/init-db.c:62 #, c-format msgid "insanely long template name %s" -msgstr "verrückt langer Vorlagen-Name %s" +msgstr "zu langer Vorlagen-Name %s" #: builtin/init-db.c:67 #, c-format msgid "cannot stat '%s'" -msgstr "'%s' kann nicht gelesen werden" +msgstr "Kann '%s' nicht lesen" #: builtin/init-db.c:73 #, c-format @@ -2157,12 +2161,12 @@ msgstr "kann Verknüfpung '%s' nicht lesen" #: builtin/init-db.c:99 #, c-format msgid "insanely long symlink %s" -msgstr "verrückt lange symbolische Verknüpfung %s" +msgstr "zu lange symbolische Verknüpfung %s" #: builtin/init-db.c:102 #, c-format msgid "cannot symlink '%s' '%s'" -msgstr "kann '%s' '%s' nicht symbolisch verknüpfen" +msgstr "kann '%s' nicht mit '%s' symbolisch verknüpfen" #: builtin/init-db.c:106 #, c-format @@ -2177,12 +2181,12 @@ msgstr "ignoriere Vorlage %s" #: builtin/init-db.c:133 #, c-format msgid "insanely long template path %s" -msgstr "verrückt langer Vorlagen-Pfad %s" +msgstr "zu langer Vorlagen-Pfad %s" #: builtin/init-db.c:141 #, c-format msgid "templates not found %s" -msgstr "Vorlagen nicht gefunden %s" +msgstr "keine Vorlagen in '%s' gefunden" #: builtin/init-db.c:154 #, c-format @@ -2192,7 +2196,7 @@ msgstr "kopiere keine Vorlagen mit einer falschen Formatversion %d von '%s'" #: builtin/init-db.c:192 #, c-format msgid "insane git directory %s" -msgstr "verrücktes git Verzeichnis %s" +msgstr "ungültiges git Verzeichnis %s" #: builtin/init-db.c:322 builtin/init-db.c:325 #, c-format @@ -2202,12 +2206,12 @@ msgstr "%s existiert bereits" #: builtin/init-db.c:354 #, c-format msgid "unable to handle file type %d" -msgstr "kann Dateityp %d nicht behandeln" +msgstr "kann nicht mit Dateityp %d umgehen" #: builtin/init-db.c:357 #, c-format msgid "unable to move %s to %s" -msgstr "konnte %s nicht nach %s verschieben" +msgstr "Konnte %s nicht nach %s verschieben" #: builtin/init-db.c:362 #, c-format @@ -2234,11 +2238,11 @@ msgstr "Initialisierte leeres" #: builtin/init-db.c:421 msgid " shared" -msgstr " geteilt" +msgstr " geteiltes" #: builtin/init-db.c:440 msgid "cannot tell cwd" -msgstr "kann nicht \"cwd\" sagen" +msgstr "kann aktuelles Verzeichnis nicht bestimmen" #: builtin/init-db.c:521 builtin/init-db.c:528 #, c-format @@ -2248,7 +2252,7 @@ msgstr "kann Verzeichnis %s nicht erstellen" #: builtin/init-db.c:532 #, c-format msgid "cannot chdir to %s" -msgstr "kann nicht zu Verzeichnis %s wechseln" +msgstr "kann nicht in Verzeichnis %s wechseln" #: builtin/init-db.c:554 #, c-format @@ -2298,15 +2302,15 @@ msgstr "Kann Patch-Datei %s nicht öffnen" #: builtin/log.c:700 msgid "Need exactly one range." -msgstr "Brauche genau einen Bereich." +msgstr "Brauche genau einen Versionsbereich." #: builtin/log.c:708 msgid "Not a range." -msgstr "Kein Bereich." +msgstr "Kein Versionsbereich." #: builtin/log.c:745 msgid "Could not extract email from committer identity." -msgstr "Konnte E-Mail von der Intentität des Einreichers nicht extrahieren." +msgstr "Konnte E-Mail-Adresse des Einreichers nicht extrahieren." #: builtin/log.c:791 msgid "Cover letter needs email format" @@ -2315,7 +2319,7 @@ msgstr "Anschreiben benötigt E-Mail-Format" #: builtin/log.c:885 #, c-format msgid "insane in-reply-to: %s" -msgstr "verrücktes in-reply-to: %s" +msgstr "ungültiges in-reply-to: %s" #: builtin/log.c:958 msgid "Two output directories?" @@ -2328,11 +2332,11 @@ msgstr "unechte Einreicher-Informationen %s" #: builtin/log.c:1224 msgid "-n and -k are mutually exclusive." -msgstr "-n und -k sind zueinander exklusiv" +msgstr "-n und -k schliessen sich gegenseitig aus" #: builtin/log.c:1226 msgid "--subject-prefix and -k are mutually exclusive." -msgstr "--subject-prefix und -k sind zueinander exklusiv" +msgstr "--subject-prefix und -k schliessen sich gegenseitig aus" #: builtin/log.c:1231 builtin/shortlog.c:284 #, c-format @@ -2369,8 +2373,8 @@ msgstr "Fehler beim Erstellen der Ausgabedateien." msgid "" "Could not find a tracked remote branch, please specify <upstream> manually.\n" msgstr "" -"Konnte gefolgten, entfernten Zweig nicht finden, bitte spezifiziere " -"<upstream> manuell.\n" +"Konnte gefolgten, externen Zweig nicht finden, bitte gebe <upstream> manuell " +"an.\n" #: builtin/log.c:1536 builtin/log.c:1538 builtin/log.c:1550 #, c-format @@ -2420,7 +2424,7 @@ msgstr " (nichts zu quetschen)" #: builtin/merge.c:329 #, c-format msgid "Squash commit -- not updating HEAD\n" -msgstr "Quetsche Version -- aktualisiere Zweigspitze (HEAD) nicht\n" +msgstr "Quetsche Version -- Zweigspitze (HEAD) wird nicht aktualisiert\n" #: builtin/merge.c:361 msgid "Writing SQUASH_MSG" @@ -2434,7 +2438,8 @@ msgstr "Schließe SQUASH_MSG ab" #, c-format msgid "No merge message -- not updating HEAD\n" msgstr "" -"Keine Zusammenführungsbeschreibung -- aktualisiere Zweigspitze (HEAD) nicht\n" +"Keine Zusammenführungsbeschreibung -- Zweigspitze (HEAD) wird nicht " +"aktualisiert\n" #: builtin/merge.c:437 #, c-format @@ -2444,7 +2449,7 @@ msgstr "'%s' zeigt auf keine Version" #: builtin/merge.c:536 #, c-format msgid "Bad branch.%s.mergeoptions string: %s" -msgstr "Schlechter branch.%s.mergeoptions String: %s" +msgstr "Ungültiger branch.%s.mergeoptions String: %s" #: builtin/merge.c:629 msgid "git write-tree failed to write a tree" @@ -2460,7 +2465,7 @@ msgstr "Konnte Bereitstellung nicht schreiben." #: builtin/merge.c:710 msgid "Not handling anything other than two heads merge." -msgstr "Behandle nichts anderes als die Zusammenführung von zwei Köpfen." +msgstr "Es wird nur die Zusammenführung von zwei Zweigen behandelt." #: builtin/merge.c:724 #, c-format @@ -2481,7 +2486,7 @@ msgstr "konnte nicht von '%s' lesen" #, c-format msgid "Not committing merge; use 'git commit' to complete the merge.\n" msgstr "" -"Zusammenführung nicht eingetragen; benutze 'git commit' um die " +"Zusammenführung wurde nicht eingetragen; benutze 'git commit' um die " "Zusammenführung abzuschließen.\n" #: builtin/merge.c:892 @@ -2494,7 +2499,7 @@ msgid "" msgstr "" "Bitte gebe eine Versionsbeschreibung ein um zu erklären, warum diese " "Zusammenführung erforderlich ist,\n" -"insbesondere wenn es einen aktualisierten entfernten Zweig mit einem Thema-" +"insbesondere wenn es einen aktualisierten, externen Zweig mit einem Thema-" "Zweig zusammenführt.\n" "\n" "Zeilen beginnend mit '#' werden ignoriert, und eine leere Beschreibung " @@ -2523,21 +2528,22 @@ msgstr "'%s' ist keine Version" #: builtin/merge.c:1050 msgid "No current branch." -msgstr "Kein aktueller Zweig." +msgstr "Du befindest dich auf keinem Zweig." #: builtin/merge.c:1052 msgid "No remote for the current branch." -msgstr "Kein anderes Archiv für den aktuellen Zweig." +msgstr "Kein externes Archiv für den aktuellen Zweig." #: builtin/merge.c:1054 msgid "No default upstream defined for the current branch." msgstr "" -"Kein entferntes Standard-Projektarchiv für den aktuellen Zweig definiert." +"Es ist kein externes Standard-Projektarchiv für den aktuellen Zweig " +"definiert." #: builtin/merge.c:1059 #, c-format msgid "No remote tracking branch for %s from %s" -msgstr "Kein entfernter Ãœbernahmezweig für %s von %s" +msgstr "Kein externer Ãœbernahmezweig für %s von %s" #: builtin/merge.c:1146 builtin/merge.c:1303 #, c-format @@ -2566,15 +2572,13 @@ msgid "" "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n" "Please, commit your changes before you can merge." msgstr "" -"Du hast deinen \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD " -"existiert).\n" +"Du hast \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD existiert).\n" "Bitte trage deine Änderungen ein, bevor du zusammenführen kannst." #: builtin/merge.c:1240 msgid "You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)." msgstr "" -"Du hast deinen \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD " -"existiert)." +"Du hast \"cherry-pick\" nicht abgeschlossen (CHERRY_PICK_HEAD existiert)." #: builtin/merge.c:1249 msgid "You cannot combine --squash with --no-ff." @@ -2586,20 +2590,19 @@ msgstr "Du kannst --no-ff nicht mit --ff--only kombinieren." #: builtin/merge.c:1261 msgid "No commit specified and merge.defaultToUpstream not set." -msgstr "Keine Version spezifiziert und merge.defaultToUpstream nicht gesetzt." +msgstr "Keine Version angegeben und merge.defaultToUpstream ist nicht gesetzt." #: builtin/merge.c:1293 msgid "Can merge only exactly one commit into empty head" -msgstr "Kann nur exakt eine Version in einem leeren Kopf zusammenführen." +msgstr "Kann nur exakt eine Version in einem leeren Zweig zusammenführen." #: builtin/merge.c:1296 msgid "Squash commit into empty head not supported yet" -msgstr "" -"Quetschen einer Version in einen leeren Kopf wird momentan nicht unterstützt." +msgstr "Bin auf einem Zweig, der noch geboren wird; kann nicht quetschen." #: builtin/merge.c:1298 msgid "Non-fast-forward commit does not make sense into an empty head" -msgstr "nicht vorzuspulende Version macht in einem leeren Kopf keinen Sinn" +msgstr "nicht vorzuspulende Version macht in einem leeren Zweig keinen Sinn" #: builtin/merge.c:1413 #, c-format @@ -2623,7 +2626,7 @@ msgstr "Vorspulen nicht möglich, breche ab." #: builtin/merge.c:1513 builtin/merge.c:1592 #, c-format msgid "Rewinding the tree to pristine...\n" -msgstr "Rücklauf des Baumes bis zum Ursprung...\n" +msgstr "Rücklauf des Zweiges bis zum Ursprung...\n" #: builtin/merge.c:1517 #, c-format @@ -2633,7 +2636,7 @@ msgstr "Probiere Zusammenführungsstrategie %s...\n" #: builtin/merge.c:1583 #, c-format msgid "No merge strategy handled the merge.\n" -msgstr "Keine Zusammenführungsstrategie behandelt die Zusammenführung.\n" +msgstr "Keine Zusammenführungsstrategie behandelt diese Zusammenführung.\n" #: builtin/merge.c:1585 #, c-format @@ -2649,17 +2652,17 @@ msgstr "Benutze \"%s\" um die Auflösung per Hand vorzubereiten.\n" #, c-format msgid "Automatic merge went well; stopped before committing as requested\n" msgstr "" -"Automatische Zusammenführung gut gegangen; stoppe, wie angefragt, vor der " -"Eintragung\n" +"Automatische Zusammenführung abgeschlossen; halte, wie gewünscht, vor der " +"Eintragung an\n" #: builtin/mv.c:108 #, c-format msgid "Checking rename of '%s' to '%s'\n" -msgstr "Prüfe Umbenennen von '%s' nach '%s'\n" +msgstr "Prüfe Umbenennung von '%s' nach '%s'\n" #: builtin/mv.c:112 msgid "bad source" -msgstr "schlechte Quelle" +msgstr "ungültige Quelle" #: builtin/mv.c:115 msgid "can not move directory into itself" @@ -2684,7 +2687,7 @@ msgstr "nicht unter Versionskontrolle" #: builtin/mv.c:173 msgid "destination exists" -msgstr "Ziel existiert" +msgstr "Ziel existiert bereits" #: builtin/mv.c:181 #, c-format @@ -2712,7 +2715,7 @@ msgstr "Benenne %s nach %s um\n" #: builtin/mv.c:215 #, c-format msgid "renaming '%s' failed" -msgstr "Umbenennen von '%s' fehlgeschlagen" +msgstr "Umbenennung von '%s' fehlgeschlagen" #: builtin/notes.c:139 #, c-format @@ -2726,12 +2729,12 @@ msgstr "konnte Datei-Deskriptor für Ausgabe von 'show' nicht öffnen" #: builtin/notes.c:155 #, c-format msgid "failed to close pipe to 'show' for object '%s'" -msgstr "Schließen der Pipe zu 'show' für Objekt '%s' fehlgeschlagen." +msgstr "Schließen der Verbindung zu 'show' ist für Objekt '%s' fehlgeschlagen." #: builtin/notes.c:158 #, c-format msgid "failed to finish 'show' for object '%s'" -msgstr "'show' konnte für Objekt '%s' nicht abgeschlossen werden" +msgstr "konnte 'show' für Objekt '%s' nicht abschließen" #: builtin/notes.c:175 builtin/tag.c:343 #, c-format @@ -2772,7 +2775,7 @@ msgstr "konnte '%s' nicht öffnen oder lesen" #: builtin/notes.c:968 builtin/reset.c:293 builtin/tag.c:537 #, c-format msgid "Failed to resolve '%s' as a valid ref." -msgstr "'%s' konnte nicht als gültige Referenz aufgelöst werden." +msgstr "Konnte '%s' nicht als gültige Referenz auflösen." #: builtin/notes.c:275 #, c-format @@ -2786,7 +2789,7 @@ msgstr "Kann uninitialisierten/unreferenzierten Notiz-Baum nicht eintragen." #: builtin/notes.c:340 #, c-format msgid "Bad notes.rewriteMode value: '%s'" -msgstr "Schlechter notes.rewriteMode Wert: '%s'" +msgstr "Ungültiger notes.rewriteMode Wert: '%s'" #: builtin/notes.c:350 #, c-format @@ -2799,7 +2802,7 @@ msgstr "" #: builtin/notes.c:377 #, c-format msgid "Bad %s value: '%s'" -msgstr "Schlechter %s Wert: '%s'" +msgstr "Ungültiger %s Wert: '%s'" #: builtin/notes.c:441 #, c-format @@ -2852,7 +2855,7 @@ msgstr "" #: builtin/notes.c:668 #, c-format msgid "Missing notes on source object %s. Cannot copy." -msgstr "Vermisse Notizen für Quell-Objekt %s. Kann nicht kopieren." +msgstr "Keine Notizen für Quell-Objekt %s. Kopie nicht möglich." #: builtin/notes.c:717 #, c-format @@ -2860,7 +2863,7 @@ msgid "" "The -m/-F/-c/-C options have been deprecated for the 'edit' subcommand.\n" "Please use 'git notes add -f -m/-F/-c/-C' instead.\n" msgstr "" -"Die Optionen -m/-F/-c/-C sind veraltet für das 'edit' Unterkommando.\n" +"Die Optionen -m/-F/-c/-C sind für das Unterkommando 'edit' veraltet.\n" "Bitte benutze stattdessen 'git notes add -f -m/-F/-c/-C'.\n" #: builtin/notes.c:971 @@ -2881,7 +2884,7 @@ msgstr "Nicht unterstützte Bereitstellungsversion %s" #: builtin/pack-objects.c:2314 #, c-format msgid "bad index version '%s'" -msgstr "Schlechte Bereitstellungsversion '%s'" +msgstr "Ungültige Bereitstellungsversion '%s'" #: builtin/pack-objects.c:2322 #, c-format @@ -2891,7 +2894,7 @@ msgstr "Option %s akzeptiert keine negative Form" #: builtin/pack-objects.c:2326 #, c-format msgid "unable to parse value '%s' for option %s" -msgstr "konnte Wert '%s' für Option %s nicht analysieren" +msgstr "konnte Wert '%s' für Option %s nicht parsen" #: builtin/push.c:45 msgid "tag shorthand without <tag>" @@ -2914,7 +2917,7 @@ msgstr "" "Um die Historie, führend zum aktuellen (freistehende Zweigspitze (HEAD))\n" "Status zu versenden, benutze\n" "\n" -" git push %s HEAD:<Name-des-entfernten-Zweiges>\n" +" git push %s HEAD:<Name-des-externen-Zweiges>\n" #: builtin/push.c:91 #, c-format @@ -2924,17 +2927,16 @@ msgid "" "\n" " git push --set-upstream %s %s\n" msgstr "" -"Der aktuelle Zweig %s hat keinen Zweig im entfernten Projektarchiv.\n" -"Um den aktuellen Zweig zu versenden und die Entfernung als entferntes\n" -"Projektarchiv zu setzen, benutze\n" +"Der aktuelle Zweig %s hat keinen Zweig im externen Projektarchiv.\n" +"Um den aktuellen Zweig zu versenden und das Fernarchiv als externes\n" +"Projektarchiv zu verwenden, benutze\n" "\n" " git push --set-upstream %s %s\n" #: builtin/push.c:99 #, c-format msgid "The current branch %s has multiple upstream branches, refusing to push." -msgstr "" -"Der aktuelle Zweig %s hat mehrere entfernte Zweige, Versand verweigert." +msgstr "Der aktuelle Zweig %s hat mehrere externe Zweige, Versand verweigert." #: builtin/push.c:102 #, c-format @@ -2943,16 +2945,16 @@ msgid "" "your current branch '%s', without telling me what to push\n" "to update which remote branch." msgstr "" -"Du versendest nach '%s', welches kein entferntes Projektarchiv deines\n" +"Du versendest nach '%s', welches kein externes Projektarchiv deines\n" "aktuellen Zweiges '%s' ist, ohne mir mitzuteilen, was ich versenden\n" -"soll um welchen entfernten Zweig zu aktualisieren." +"soll, um welchen externen Zweig zu aktualisieren." #: builtin/push.c:131 msgid "" "You didn't specify any refspecs to push, and push.default is \"nothing\"." msgstr "" -"Du hast keine Referenzspezifikationen zum Versenden spezifiziert, und push." -"default ist \"nothing\"." +"Du hast keine Referenzspezifikationen zum Versenden angegeben, und " +"push.default ist \"nothing\"." #: builtin/push.c:138 msgid "" @@ -2997,17 +2999,30 @@ msgstr "" #: builtin/push.c:190 #, c-format msgid "Pushing to %s\n" -msgstr "Schiebe zu %s\n" +msgstr "Versende nach %s\n" #: builtin/push.c:194 #, c-format msgid "failed to push some refs to '%s'" msgstr "Fehler beim Versenden einiger Referenzen nach '%s'" -#: builtin/push.c:226 +#: builtin/push.c:159 +#, c-format +msgid "" +"To prevent you from losing history, non-fast-forward updates were rejected\n" +"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n" +"'Note about fast-forwards' section of 'git push --help' for details.\n" +msgstr "" +"Um dich vor Verlust von Historie zu bewahren, wurden nicht vorzuspulende " +"Aktualisierungen zurückgewiesen.\n" +"Führe die externen Änderungen zusammen (z.B. 'git pull') bevor du erneut " +"versendest. Siehe auch die 'Note about fast-forwards' Sektion von \n" +"'git push --help' für weitere Details.\n" + +#: builtin/push.c:176 #, c-format msgid "bad repository '%s'" -msgstr "schlechtes Projektarchiv '%s'" +msgstr "ungültiges Projektarchiv '%s'" #: builtin/push.c:227 msgid "" @@ -3023,7 +3038,7 @@ msgid "" msgstr "" "Kein Ziel zum Versenden konfiguriert.\n" "Entweder spezifizierst du die URL von der Kommandozeile oder konfigurierst " -"ein entferntes Projektarchiv unter Benutzung von\n" +"ein externes Projektarchiv unter Benutzung von\n" "\n" " git remote add <Name> <URL>\n" "\n" @@ -3057,23 +3072,23 @@ msgstr "--delete ist inkompatibel mit --all, --mirror und --tags" #: builtin/push.c:344 msgid "--delete doesn't make sense without any refs" -msgstr "--delete macht ohne irgendeine Referenz ohne keinen Sinn" +msgstr "--delete macht ohne irgendeine Referenz keinen Sinn" #: builtin/reset.c:33 msgid "mixed" -msgstr "gemischt" +msgstr "mixed" #: builtin/reset.c:33 msgid "soft" -msgstr "weich" +msgstr "soft" #: builtin/reset.c:33 msgid "hard" -msgstr "hart" +msgstr "hard" #: builtin/reset.c:33 msgid "keep" -msgstr "halten" +msgstr "keep" #: builtin/reset.c:77 msgid "You do not have a valid HEAD." @@ -3109,7 +3124,8 @@ msgstr "Nicht bereitgestellte Änderungen nach Zurücksetzung:" #, c-format msgid "Cannot do a %s reset in the middle of a merge." msgstr "" -"Kann keine %s Zurücksetzung innerhalb einer Zusammenführung durchführen." +"Kann keine '%s' Zurücksetzung durchführen, während eine Zusammenführung im " +"Gange ist." #: builtin/reset.c:297 #, c-format @@ -3128,17 +3144,17 @@ msgstr "" #: builtin/reset.c:313 #, c-format msgid "Cannot do %s reset with paths." -msgstr "Kann keine %s Zurücksetzung mit Pfaden machen." +msgstr "Eine '%s' Zurücksetzung mit Pfaden ist nicht möglich." #: builtin/reset.c:325 #, c-format msgid "%s reset is not allowed in a bare repository" -msgstr "%s Zurücksetzung ist in einem leeren Projektarchiv nicht erlaubt" +msgstr "'%s' Zurücksetzung ist in einem bloßen Projektarchiv nicht erlaubt" #: builtin/reset.c:341 #, c-format msgid "Could not reset index file to revision '%s'." -msgstr "Konnte Bereitstellungsdatei nicht zu Revision '%s' zurücksetzen." +msgstr "Konnte Bereitstellungsdatei nicht zu Version '%s' zurücksetzen." #: builtin/revert.c:70 builtin/revert.c:92 #, c-format @@ -3149,11 +3165,11 @@ msgstr "%s: %s kann nicht mit %s benutzt werden" msgid "program error" msgstr "Programmfehler" -#: builtin/revert.c:213 +#: builtin/revert.c:212 msgid "revert failed" msgstr "\"revert\" fehlgeschlagen" -#: builtin/revert.c:228 +#: builtin/revert.c:227 msgid "cherry-pick failed" msgstr "\"cherry-pick\" fehlgeschlagen" @@ -3189,7 +3205,7 @@ msgstr "" #: builtin/rm.c:194 #, c-format msgid "not removing '%s' recursively without -r" -msgstr "entferne '%s' nicht rekursiv ohne -r" +msgstr "'%s' wird nicht ohne -r rekursiv entfernt" #: builtin/rm.c:230 #, c-format @@ -3237,7 +3253,7 @@ msgstr "" "\n" "#\n" "# Gebe eine Markierungsbeschreibung ein\n" -"# Zeilen beginnend mit '#' werden ignoriert.\n" +"# Zeilen, die mit '#' beginnen, werden ignoriert.\n" "#\n" #: builtin/tag.c:254 @@ -3252,8 +3268,8 @@ msgstr "" "\n" "#\n" "# Gebe eine Markierungsbeschreibung ein\n" -"# Zeilen beginnend mit '#' werden behalten; du darfst diese selbst entfernen " -"wenn du möchtest.\n" +"# Zeilen, die mit '#' beginnen, werden behalten; du darfst diese\n" +"# selbst entfernen wenn du möchtest.\n" "#\n" #: builtin/tag.c:294 @@ -3266,7 +3282,7 @@ msgstr "konnte Markierungsdatei nicht schreiben" #: builtin/tag.c:321 msgid "bad object type." -msgstr "schlechter Objekt-Typ" +msgstr "ungültiger Objekt-Typ" #: builtin/tag.c:334 msgid "tag header too big." @@ -3283,7 +3299,7 @@ msgstr "Die Markierungsbeschreibung wurde gelassen in %s\n" #: builtin/tag.c:421 msgid "switch 'points-at' requires an object" -msgstr "Wechseln von 'points-at' erfordert ein Objekt" +msgstr "Option 'points-at' erfordert ein Objekt" #: builtin/tag.c:423 #, c-format @@ -3351,8 +3367,7 @@ msgid "" "It does not apply to blobs recorded in its index." msgstr "" "Hast du den Patch per Hand editiert?\n" -"Er kann nicht auf aufgezeichnete Blobs in seiner Bereitstellung angewendet " -"werden." +"Er kann nicht auf die Blobs in seiner 'index' Zeile angewendet werden." #: git-am.sh:163 msgid "Falling back to patching base and 3-way merge..." @@ -3388,7 +3403,7 @@ msgstr "Bitte werde dir klar. --skip oder --abort?" #: git-am.sh:513 msgid "Resolve operation not in progress, we are not resuming." -msgstr "keine Auflösung in Durchführung, wir setzen nicht fort." +msgstr "Es ist keine Auflösung im Gange, es wird nicht fortgesetzt." #: git-am.sh:579 #, sh-format @@ -3399,8 +3414,8 @@ msgstr "" #: git-am.sh:755 msgid "cannot be interactive without stdin connected to a terminal." msgstr "" -"Kann nicht interaktiv sein, ohne das die Standard-Eingabe mit einem Terminal " -"verbunden ist." +"Kann nicht interaktiv sein, ohne dass die Standard-Eingabe mit einem " +"Terminal verbunden ist." #. TRANSLATORS: Make sure to include [y], [n], [e], [v] and [a] #. in your translation. The program will only accept English @@ -3437,11 +3452,11 @@ msgstr "nicht erkannte Option: '$arg'" #: git-bisect.sh:99 #, sh-format msgid "'$arg' does not appear to be a valid revision" -msgstr "'$arg' scheint keine gültige Option zu sein" +msgstr "'$arg' scheint keine gültige Version zu sein" #: git-bisect.sh:117 msgid "Bad HEAD - I need a HEAD" -msgstr "Schlechte Zweigspitze (HEAD) - Ich brauche eine Zweigspitze (HEAD)" +msgstr "Ungültige Zweigspitze (HEAD) - Zweigspitze (HEAD) wird benötigt" #: git-bisect.sh:130 #, sh-format @@ -3453,30 +3468,30 @@ msgstr "" #: git-bisect.sh:140 msgid "won't bisect on seeked tree" -msgstr "werde nicht auf gesuchtem Baum halbieren" +msgstr "\"bisect\" auf gesuchtem Zweig nicht möglich" #: git-bisect.sh:144 msgid "Bad HEAD - strange symbolic ref" -msgstr "Schlechte Zweigspitze (HEAD) - merkwürdige symbolische Referenz" +msgstr "Ungültige Zweigspitze (HEAD) - merkwürdige symbolische Referenz" #: git-bisect.sh:189 #, sh-format msgid "Bad bisect_write argument: $state" -msgstr "Schlechtes \"bisect_write\" Argument: $state" +msgstr "Ungültiges \"bisect_write\" Argument: $state" #: git-bisect.sh:218 #, sh-format msgid "Bad rev input: $arg" -msgstr "Schlechte Referenz-Eingabe: $arg" +msgstr "Ungültige Referenz-Eingabe: $arg" #: git-bisect.sh:232 msgid "Please call 'bisect_state' with at least one argument." -msgstr "Bitte rufe 'bisect_state' mit mindestens einem Argument." +msgstr "Bitte rufe 'bisect_state' mit mindestens einem Argument auf." #: git-bisect.sh:244 #, sh-format msgid "Bad rev input: $rev" -msgstr "Schlechte Referenz-Eingabe: $rev" +msgstr "Ungültige Referenz-Eingabe: $rev" #: git-bisect.sh:250 msgid "'git bisect bad' can take only one argument." @@ -3500,7 +3515,7 @@ msgid "" "Could not check out original HEAD '$branch'.\n" "Try 'git bisect reset <commit>'." msgstr "" -"Konnte die originale Zweigspitze (HEAD) '$branch' nicht auschecken.\n" +"Konnte die ursprüngliche Zweigspitze (HEAD) '$branch' nicht auschecken.\n" "Versuche 'git bisect reset <Version>'." #: git-bisect.sh:390 @@ -3526,9 +3541,9 @@ msgid "" "Please, fix them up in the work tree, and then use 'git add/rm <file>'\n" "as appropriate to mark resolution, or use 'git commit -a'." msgstr "" -"\"pull\" ist nicht möglich weil du nicht zusammengeführte Dateien hast.\n" +"\"pull\" ist nicht möglich, weil du nicht zusammengeführte Dateien hast.\n" "Bitte korrigiere dies im Arbeitsbaum und benutze dann 'git add/rm <Datei>'\n" -"wie vorgesehen, um die Auflösung zu markieren, oder benutze 'git commit -a'." +"um die Auflösung entsprechend zu markieren, oder benutze 'git commit -a'." #: git-pull.sh:25 msgid "Pull is not possible because you have unmerged files." @@ -3543,7 +3558,7 @@ msgstr "" #: git-pull.sh:253 msgid "Cannot merge multiple branches into empty head" -msgstr "Kann nicht mehrere Zweige in einen leeren Kopf zusammenführen" +msgstr "Kann nicht mehrere Zweige in einen ungeborenen Zweig zusammenführen" #: git-pull.sh:257 msgid "Cannot rebase onto multiple branches" @@ -3600,7 +3615,7 @@ msgstr "Kein \"stash\" gefunden." #: git-stash.sh:359 #, sh-format msgid "Too many revisions specified: $REV" -msgstr "Zu viele Revisionen spezifiziert: $REV" +msgstr "Zu viele Revisionen angegeben: $REV" #: git-stash.sh:365 #, sh-format @@ -3610,7 +3625,7 @@ msgstr "$reference ist keine gültige Referenz" #: git-stash.sh:393 #, sh-format msgid "'$args' is not a stash-like commit" -msgstr "'$args' ist keine \"stash\"-artiger Version" +msgstr "'$args' ist keine \"stash\"-artige Version" #: git-stash.sh:404 #, sh-format @@ -3623,7 +3638,8 @@ msgstr "unfähig die Bereitstellung zu aktualisieren" #: git-stash.sh:416 msgid "Cannot apply a stash in the middle of a merge" -msgstr "Kann keinen \"stash\" innerhalb einer Zusammenführung anwenden" +msgstr "" +"Kann \"stash\" nicht anwenden, solang eine Zusammenführung im Gange ist" #: git-stash.sh:424 msgid "Conflicts in index. Try without --index." @@ -3653,12 +3669,12 @@ msgstr "Kein Zweigname spezifiziert" #: git-stash.sh:570 msgid "(To restore them type \"git stash apply\")" -msgstr "(Um es wiederherzustellen schreibe \"git stash apply\")" +msgstr "(Zur Wiederherstellung gebe \"git stash apply\" ein)" #: git-submodule.sh:56 #, sh-format msgid "cannot strip one component off url '$remoteurl'" -msgstr "Kann eine Komponente von URL '$remoteurl' nicht abstreifen" +msgstr "Kann eine Komponente von URL '$remoteurl' nicht extrahieren" #: git-submodule.sh:109 #, sh-format @@ -3674,7 +3690,7 @@ msgstr "Klonen von '$url' in Unterprojekt-Pfad '$sm_path' fehlgeschlagen" #, sh-format msgid "Gitdir '$a' is part of the submodule path '$b' or vice versa" msgstr "" -"Git-Verzeichnis '$a' ist Teil des Unterprojekt-Pfades '$b' oder umgekehrt" +"Git-Verzeichnis '$a' ist Teil des Unterprojekt-Pfades '$b', oder umgekehrt" #: git-submodule.sh:249 #, sh-format @@ -3724,19 +3740,18 @@ msgstr "Keine URL für Unterprojekt-Pfad '$sm_path' in .gitmodules gefunden" #: git-submodule.sh:414 #, sh-format msgid "Failed to register url for submodule path '$sm_path'" -msgstr "Fehler beim Registrieren der URL für Unterprojekt-Pfad '$sm_path'" +msgstr "Registrierung der URL für Unterprojekt-Pfad '$sm_path' fehlgeschlagen" #: git-submodule.sh:422 #, sh-format msgid "Failed to register update mode for submodule path '$sm_path'" -msgstr "" -"Fehler beim Registrieren des Aktualisierungsmodus für Unterprojekt-Pfad " -"'$sm_path'" +msgstr "Registrierung des Aktualisierungsmodus für Unterprojekt-Pfad " +"'$sm_path' fehlgeschlagen" #: git-submodule.sh:424 #, sh-format msgid "Submodule '$name' ($url) registered for path '$sm_path'" -msgstr "Unterprojekt '$name' ($url) registriert für Pfad '$sm_path'" +msgstr "Unterprojekt '$name' ($url) ist für Pfad '$sm_path' registriert" #: git-submodule.sh:523 #, sh-format @@ -3744,13 +3759,13 @@ msgid "" "Submodule path '$sm_path' not initialized\n" "Maybe you want to use 'update --init'?" msgstr "" -"Unterprojekt-Pfad '$sm_path' nicht initialisiert\n" +"Unterprojekt-Pfad '$sm_path' ist nicht initialisiert\n" "Vielleicht möchtest du 'update --init' benutzen?" #: git-submodule.sh:536 #, sh-format msgid "Unable to find current revision in submodule path '$sm_path'" -msgstr "Konnte aktuelle Revision in Unterprojekt-Pfad '$sm_path' nicht finden" +msgstr "Konnte aktuelle Version in Unterprojekt-Pfad '$sm_path' nicht finden" #: git-submodule.sh:555 #, sh-format @@ -3770,7 +3785,8 @@ msgstr "Unterprojekt-Pfad '$sm_path': neu aufgebaut in '$sha1'" #: git-submodule.sh:575 #, sh-format msgid "Unable to merge '$sha1' in submodule path '$sm_path'" -msgstr "Konnte '$sha1' nicht in Unterprojekt-Pfad '$sm_path' zusammenführen" +msgstr "" +"Zusammenführung von '$sha1' in Unterprojekt-Pfad '$sm_path' fehlgeschlagen" #: git-submodule.sh:576 #, sh-format @@ -3809,7 +3825,8 @@ msgstr " Warnung: $name beinhaltet nicht Version $sha1_dst" #: git-submodule.sh:776 #, sh-format msgid " Warn: $name doesn't contain commits $sha1_src and $sha1_dst" -msgstr " Warnung: $name beinhaltet nich die Versionen $sha1_src und $sha1_dst" +msgstr "" +" Warnung: $name beinhaltet nicht die Versionen $sha1_src und $sha1_dst" #: git-submodule.sh:801 msgid "blob" diff --git a/po/git.pot b/po/git.pot index 730cac7b83..33a6052752 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: 2012-04-28 20:17+0800\n" +"POT-Creation-Date: 2012-05-08 16:06+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" @@ -35,6 +35,80 @@ msgid "" "or use 'git commit -a'." msgstr "" +#: bundle.c:36 +#, c-format +msgid "'%s' does not look like a v2 bundle file" +msgstr "" + +#: bundle.c:63 +#, c-format +msgid "unrecognized header: %s%s (%d)" +msgstr "" + +#: bundle.c:89 builtin/commit.c:753 +#, c-format +msgid "could not open '%s'" +msgstr "" + +#: bundle.c:140 +msgid "Repository lacks these prerequisite commits:" +msgstr "" + +#: bundle.c:164 sequencer.c:533 sequencer.c:965 builtin/log.c:289 +#: builtin/log.c:719 builtin/log.c:1335 builtin/log.c:1554 builtin/merge.c:347 +#: builtin/shortlog.c:181 +msgid "revision walk setup failed" +msgstr "" + +#: bundle.c:186 +#, c-format +msgid "The bundle contains %d ref" +msgid_plural "The bundle contains %d refs" +msgstr[0] "" +msgstr[1] "" + +#: bundle.c:192 +#, c-format +msgid "The bundle requires this ref" +msgid_plural "The bundle requires these %d refs" +msgstr[0] "" +msgstr[1] "" + +#: bundle.c:290 +msgid "rev-list died" +msgstr "" + +#: bundle.c:296 builtin/log.c:1231 builtin/shortlog.c:284 +#, c-format +msgid "unrecognized argument: %s" +msgstr "" + +#: bundle.c:331 +#, c-format +msgid "ref '%s' is excluded by the rev-list options" +msgstr "" + +#: bundle.c:376 +msgid "Refusing to create empty bundle." +msgstr "" + +#: bundle.c:394 +msgid "Could not spawn pack-objects" +msgstr "" + +#: bundle.c:412 +msgid "pack-objects died" +msgstr "" + +#: bundle.c:415 +#, c-format +msgid "cannot create '%s'" +msgstr "" + +#: bundle.c:437 +msgid "index-pack died" +msgstr "" + #: commit.c:48 #, c-format msgid "could not parse %s" @@ -63,6 +137,73 @@ msgstr "" msgid "failed to close rev-list's stdin: %s" msgstr "" +#: date.c:95 +msgid "in the future" +msgstr "" + +#: date.c:101 +#, c-format +msgid "%lu second ago" +msgid_plural "%lu seconds ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:108 +#, c-format +msgid "%lu minute ago" +msgid_plural "%lu minutes ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:115 +#, c-format +msgid "%lu hour ago" +msgid_plural "%lu hours ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:122 +#, c-format +msgid "%lu day ago" +msgid_plural "%lu days ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:128 +#, c-format +msgid "%lu week ago" +msgid_plural "%lu weeks ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:135 +#, c-format +msgid "%lu month ago" +msgid_plural "%lu months ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:146 +#, c-format +msgid "%lu year" +msgid_plural "%lu years" +msgstr[0] "" +msgstr[1] "" + +#: date.c:149 +#, c-format +msgid "%s, %lu month ago" +msgid_plural "%s, %lu months ago" +msgstr[0] "" +msgstr[1] "" + +#: date.c:154 date.c:159 +#, c-format +msgid "%lu year ago" +msgid_plural "%lu years ago" +msgstr[0] "" +msgstr[1] "" + #: diff.c:105 #, c-format msgid " Failed to parse dirstat cut-off percentage '%.*s'\n" @@ -105,7 +246,7 @@ msgid_plural ", %d deletions(-)" msgstr[0] "" msgstr[1] "" -#: diff.c:3435 +#: diff.c:3478 #, c-format msgid "" "Failed to parse --dirstat/-X option parameter:\n" @@ -139,13 +280,53 @@ msgstr "" msgid "'%s': short read %s" msgstr "" -#: help.c:287 +#: help.c:207 +#, c-format +msgid "available git commands in '%s'" +msgstr "" + +#: help.c:214 +msgid "git commands available from elsewhere on your $PATH" +msgstr "" + +#: help.c:270 #, c-format msgid "" "'%s' appears to be a git command, but we were not\n" "able to execute it. Maybe git-%s is broken?" msgstr "" +#: help.c:327 +msgid "Uh oh. Your system reports no Git commands at all." +msgstr "" + +#: help.c:349 +#, c-format +msgid "" +"WARNING: You called a Git command named '%s', which does not exist.\n" +"Continuing under the assumption that you meant '%s'" +msgstr "" + +#: help.c:354 +#, c-format +msgid "in %0.1f seconds automatically..." +msgstr "" + +#: help.c:361 +#, c-format +msgid "git: '%s' is not a git command. See 'git --help'." +msgstr "" + +#: help.c:365 +msgid "" +"\n" +"Did you mean this?" +msgid_plural "" +"\n" +"Did you mean one of these?" +msgstr[0] "" +msgstr[1] "" + #: remote.c:1607 #, c-format msgid "Your branch is ahead of '%s' by %d commit.\n" @@ -172,227 +353,239 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: sequencer.c:120 builtin/merge.c:865 builtin/merge.c:978 +#: sequencer.c:121 builtin/merge.c:865 builtin/merge.c:978 #: builtin/merge.c:1088 builtin/merge.c:1098 #, c-format msgid "Could not open '%s' for writing" msgstr "" -#: sequencer.c:122 builtin/merge.c:333 builtin/merge.c:868 +#: sequencer.c:123 builtin/merge.c:333 builtin/merge.c:868 #: builtin/merge.c:1090 builtin/merge.c:1103 #, c-format msgid "Could not write to '%s'" msgstr "" -#: sequencer.c:143 +#: sequencer.c:144 msgid "" "after resolving the conflicts, mark the corrected paths\n" "with 'git add <paths>' or 'git rm <paths>'" msgstr "" -#: sequencer.c:146 +#: sequencer.c:147 msgid "" "after resolving the conflicts, mark the corrected paths\n" "with 'git add <paths>' or 'git rm <paths>'\n" "and commit the result with 'git commit'" msgstr "" -#: sequencer.c:159 sequencer.c:685 sequencer.c:768 +#: sequencer.c:160 sequencer.c:741 sequencer.c:824 #, c-format msgid "Could not write to %s" msgstr "" -#: sequencer.c:162 +#: sequencer.c:163 #, c-format msgid "Error wrapping up %s" msgstr "" -#: sequencer.c:177 +#: sequencer.c:178 msgid "Your local changes would be overwritten by cherry-pick." msgstr "" -#: sequencer.c:179 +#: sequencer.c:180 msgid "Your local changes would be overwritten by revert." msgstr "" -#: sequencer.c:182 +#: sequencer.c:183 msgid "Commit your changes or stash them to proceed." msgstr "" #. TRANSLATORS: %s will be "revert" or "cherry-pick" -#: sequencer.c:232 +#: sequencer.c:233 #, c-format msgid "%s: Unable to write new index file" msgstr "" -#: sequencer.c:298 +#: sequencer.c:261 +msgid "Could not resolve HEAD commit\n" +msgstr "" + +#: sequencer.c:282 +msgid "Unable to update cache tree\n" +msgstr "" + +#: sequencer.c:323 +#, c-format +msgid "Could not parse commit %s\n" +msgstr "" + +#: sequencer.c:328 +#, c-format +msgid "Could not parse parent commit %s\n" +msgstr "" + +#: sequencer.c:358 msgid "Your index file is unmerged." msgstr "" -#: sequencer.c:301 +#: sequencer.c:361 msgid "You do not have a valid HEAD" msgstr "" -#: sequencer.c:316 +#: sequencer.c:376 #, c-format msgid "Commit %s is a merge but no -m option was given." msgstr "" -#: sequencer.c:324 +#: sequencer.c:384 #, c-format msgid "Commit %s does not have parent %d" msgstr "" -#: sequencer.c:328 +#: sequencer.c:388 #, c-format msgid "Mainline was specified but commit %s is not a merge." msgstr "" #. TRANSLATORS: The first %s will be "revert" or #. "cherry-pick", the second %s a SHA1 -#: sequencer.c:339 +#: sequencer.c:399 #, c-format msgid "%s: cannot parse parent commit %s" msgstr "" -#: sequencer.c:343 +#: sequencer.c:403 #, c-format msgid "Cannot get commit message for %s" msgstr "" -#: sequencer.c:427 +#: sequencer.c:491 #, c-format msgid "could not revert %s... %s" msgstr "" -#: sequencer.c:428 +#: sequencer.c:492 #, c-format msgid "could not apply %s... %s" msgstr "" -#: sequencer.c:450 sequencer.c:909 builtin/log.c:289 builtin/log.c:719 -#: builtin/log.c:1335 builtin/log.c:1554 builtin/merge.c:347 -#: builtin/shortlog.c:181 -msgid "revision walk setup failed" -msgstr "" - -#: sequencer.c:453 +#: sequencer.c:536 msgid "empty commit set passed" msgstr "" -#: sequencer.c:461 +#: sequencer.c:544 #, c-format msgid "git %s: failed to read the index" msgstr "" -#: sequencer.c:466 +#: sequencer.c:549 #, c-format msgid "git %s: failed to refresh the index" msgstr "" -#: sequencer.c:551 +#: sequencer.c:607 #, c-format msgid "Cannot %s during a %s" msgstr "" -#: sequencer.c:573 +#: sequencer.c:629 #, c-format msgid "Could not parse line %d." msgstr "" -#: sequencer.c:578 +#: sequencer.c:634 msgid "No commits parsed." msgstr "" -#: sequencer.c:591 +#: sequencer.c:647 #, c-format msgid "Could not open %s" msgstr "" -#: sequencer.c:595 +#: sequencer.c:651 #, c-format msgid "Could not read %s." msgstr "" -#: sequencer.c:602 +#: sequencer.c:658 #, c-format msgid "Unusable instruction sheet: %s" msgstr "" -#: sequencer.c:630 +#: sequencer.c:686 #, c-format msgid "Invalid key: %s" msgstr "" -#: sequencer.c:633 +#: sequencer.c:689 #, c-format msgid "Invalid value for %s: %s" msgstr "" -#: sequencer.c:645 +#: sequencer.c:701 #, c-format msgid "Malformed options sheet: %s" msgstr "" -#: sequencer.c:666 +#: sequencer.c:722 msgid "a cherry-pick or revert is already in progress" msgstr "" -#: sequencer.c:667 +#: sequencer.c:723 msgid "try \"git cherry-pick (--continue | --quit | --abort)\"" msgstr "" -#: sequencer.c:671 +#: sequencer.c:727 #, c-format msgid "Could not create sequencer directory %s" msgstr "" -#: sequencer.c:687 sequencer.c:772 +#: sequencer.c:743 sequencer.c:828 #, c-format msgid "Error wrapping up %s." msgstr "" -#: sequencer.c:706 sequencer.c:840 +#: sequencer.c:762 sequencer.c:896 msgid "no cherry-pick or revert in progress" msgstr "" -#: sequencer.c:708 +#: sequencer.c:764 msgid "cannot resolve HEAD" msgstr "" -#: sequencer.c:710 +#: sequencer.c:766 msgid "cannot abort from a branch yet to be born" msgstr "" -#: sequencer.c:732 +#: sequencer.c:788 builtin/apply.c:3682 #, c-format msgid "cannot open %s: %s" msgstr "" -#: sequencer.c:735 +#: sequencer.c:791 #, c-format msgid "cannot read %s: %s" msgstr "" -#: sequencer.c:736 +#: sequencer.c:792 msgid "unexpected end of file" msgstr "" -#: sequencer.c:742 +#: sequencer.c:798 #, c-format msgid "stored pre-cherry-pick HEAD file '%s' is corrupt" msgstr "" -#: sequencer.c:765 +#: sequencer.c:821 #, c-format msgid "Could not format %s." msgstr "" -#: sequencer.c:927 +#: sequencer.c:983 msgid "Can't revert as initial commit" msgstr "" -#: sequencer.c:928 +#: sequencer.c:984 msgid "Can't cherry-pick into empty head" msgstr "" @@ -415,232 +608,232 @@ msgstr "" msgid "Upstream branch '%s' not stored as a remote-tracking branch" msgstr "" -#: wt-status.c:134 +#: wt-status.c:135 msgid "Unmerged paths:" msgstr "" -#: wt-status.c:140 wt-status.c:157 +#: wt-status.c:141 wt-status.c:158 #, c-format msgid " (use \"git reset %s <file>...\" to unstage)" msgstr "" -#: wt-status.c:142 wt-status.c:159 +#: wt-status.c:143 wt-status.c:160 msgid " (use \"git rm --cached <file>...\" to unstage)" msgstr "" -#: wt-status.c:143 +#: wt-status.c:144 msgid " (use \"git add/rm <file>...\" as appropriate to mark resolution)" msgstr "" -#: wt-status.c:151 +#: wt-status.c:152 msgid "Changes to be committed:" msgstr "" -#: wt-status.c:169 +#: wt-status.c:170 msgid "Changes not staged for commit:" msgstr "" -#: wt-status.c:173 +#: wt-status.c:174 msgid " (use \"git add <file>...\" to update what will be committed)" msgstr "" -#: wt-status.c:175 +#: wt-status.c:176 msgid " (use \"git add/rm <file>...\" to update what will be committed)" msgstr "" -#: wt-status.c:176 +#: wt-status.c:177 msgid "" " (use \"git checkout -- <file>...\" to discard changes in working directory)" msgstr "" -#: wt-status.c:178 +#: wt-status.c:179 msgid " (commit or discard the untracked or modified content in submodules)" msgstr "" -#: wt-status.c:187 +#: wt-status.c:188 #, c-format msgid "%s files:" msgstr "" -#: wt-status.c:190 +#: wt-status.c:191 #, c-format msgid " (use \"git %s <file>...\" to include in what will be committed)" msgstr "" -#: wt-status.c:207 +#: wt-status.c:208 msgid "bug" msgstr "" -#: wt-status.c:212 +#: wt-status.c:213 msgid "both deleted:" msgstr "" -#: wt-status.c:213 +#: wt-status.c:214 msgid "added by us:" msgstr "" -#: wt-status.c:214 +#: wt-status.c:215 msgid "deleted by them:" msgstr "" -#: wt-status.c:215 +#: wt-status.c:216 msgid "added by them:" msgstr "" -#: wt-status.c:216 +#: wt-status.c:217 msgid "deleted by us:" msgstr "" -#: wt-status.c:217 +#: wt-status.c:218 msgid "both added:" msgstr "" -#: wt-status.c:218 +#: wt-status.c:219 msgid "both modified:" msgstr "" -#: wt-status.c:248 +#: wt-status.c:249 msgid "new commits, " msgstr "" -#: wt-status.c:250 +#: wt-status.c:251 msgid "modified content, " msgstr "" -#: wt-status.c:252 +#: wt-status.c:253 msgid "untracked content, " msgstr "" -#: wt-status.c:266 +#: wt-status.c:267 #, c-format msgid "new file: %s" msgstr "" -#: wt-status.c:269 +#: wt-status.c:270 #, c-format msgid "copied: %s -> %s" msgstr "" -#: wt-status.c:272 +#: wt-status.c:273 #, c-format msgid "deleted: %s" msgstr "" -#: wt-status.c:275 +#: wt-status.c:276 #, c-format msgid "modified: %s" msgstr "" -#: wt-status.c:278 +#: wt-status.c:279 #, c-format msgid "renamed: %s -> %s" msgstr "" -#: wt-status.c:281 +#: wt-status.c:282 #, c-format msgid "typechange: %s" msgstr "" -#: wt-status.c:284 +#: wt-status.c:285 #, c-format msgid "unknown: %s" msgstr "" -#: wt-status.c:287 +#: wt-status.c:288 #, c-format msgid "unmerged: %s" msgstr "" -#: wt-status.c:290 +#: wt-status.c:291 #, c-format msgid "bug: unhandled diff status %c" msgstr "" -#: wt-status.c:713 +#: wt-status.c:737 msgid "On branch " msgstr "" -#: wt-status.c:720 +#: wt-status.c:744 msgid "Not currently on any branch." msgstr "" -#: wt-status.c:731 +#: wt-status.c:755 msgid "Initial commit" msgstr "" -#: wt-status.c:745 +#: wt-status.c:769 msgid "Untracked" msgstr "" -#: wt-status.c:747 +#: wt-status.c:771 msgid "Ignored" msgstr "" -#: wt-status.c:749 +#: wt-status.c:773 #, c-format msgid "Untracked files not listed%s" msgstr "" -#: wt-status.c:751 +#: wt-status.c:775 msgid " (use -u option to show untracked files)" msgstr "" -#: wt-status.c:757 +#: wt-status.c:781 msgid "No changes" msgstr "" -#: wt-status.c:761 +#: wt-status.c:785 #, c-format msgid "no changes added to commit%s\n" msgstr "" -#: wt-status.c:763 +#: wt-status.c:787 msgid " (use \"git add\" and/or \"git commit -a\")" msgstr "" -#: wt-status.c:765 +#: wt-status.c:789 #, c-format msgid "nothing added to commit but untracked files present%s\n" msgstr "" -#: wt-status.c:767 +#: wt-status.c:791 msgid " (use \"git add\" to track)" msgstr "" -#: wt-status.c:769 wt-status.c:772 wt-status.c:775 +#: wt-status.c:793 wt-status.c:796 wt-status.c:799 #, c-format msgid "nothing to commit%s\n" msgstr "" -#: wt-status.c:770 +#: wt-status.c:794 msgid " (create/copy files and use \"git add\" to track)" msgstr "" -#: wt-status.c:773 +#: wt-status.c:797 msgid " (use -u to show untracked files)" msgstr "" -#: wt-status.c:776 +#: wt-status.c:800 msgid " (working directory clean)" msgstr "" -#: wt-status.c:884 +#: wt-status.c:908 msgid "HEAD (no branch)" msgstr "" -#: wt-status.c:890 +#: wt-status.c:914 msgid "Initial commit on " msgstr "" -#: wt-status.c:905 +#: wt-status.c:929 msgid "behind " msgstr "" -#: wt-status.c:908 wt-status.c:911 +#: wt-status.c:932 wt-status.c:935 msgid "ahead " msgstr "" -#: wt-status.c:913 +#: wt-status.c:937 msgid ", behind " msgstr "" @@ -649,7 +842,7 @@ msgstr "" msgid "unexpected diff status %c" msgstr "" -#: builtin/add.c:67 builtin/commit.c:298 +#: builtin/add.c:67 builtin/commit.c:282 msgid "updating files failed" msgstr "" @@ -739,15 +932,354 @@ msgstr "" msgid "Maybe you wanted to say 'git add .'?\n" msgstr "" -#: builtin/add.c:420 builtin/clean.c:95 builtin/commit.c:358 builtin/mv.c:82 +#: builtin/add.c:420 builtin/clean.c:95 builtin/commit.c:342 builtin/mv.c:82 #: builtin/rm.c:162 msgid "index file corrupt" msgstr "" -#: builtin/add.c:476 builtin/mv.c:229 builtin/rm.c:260 +#: builtin/add.c:476 builtin/apply.c:4093 builtin/mv.c:229 builtin/rm.c:260 msgid "Unable to write new index file" msgstr "" +#: builtin/apply.c:106 +#, c-format +msgid "unrecognized whitespace option '%s'" +msgstr "" + +#: builtin/apply.c:121 +#, c-format +msgid "unrecognized whitespace ignore option '%s'" +msgstr "" + +#: builtin/apply.c:815 +#, c-format +msgid "Cannot prepare timestamp regexp %s" +msgstr "" + +#: builtin/apply.c:824 +#, c-format +msgid "regexec returned %d for input: %s" +msgstr "" + +#: builtin/apply.c:905 +#, c-format +msgid "unable to find filename in patch at line %d" +msgstr "" + +#: builtin/apply.c:934 +#, c-format +msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d" +msgstr "" + +#: builtin/apply.c:937 +#, c-format +msgid "git apply: bad git-diff - inconsistent %s filename on line %d" +msgstr "" + +#: builtin/apply.c:944 +#, c-format +msgid "git apply: bad git-diff - expected /dev/null on line %d" +msgstr "" + +#: builtin/apply.c:1387 +#, c-format +msgid "recount: unexpected line: %.*s" +msgstr "" + +#: builtin/apply.c:1444 +#, c-format +msgid "patch fragment without header at line %d: %.*s" +msgstr "" + +#: builtin/apply.c:1461 +#, c-format +msgid "" +"git diff header lacks filename information when removing %d leading pathname " +"component (line %d)" +msgid_plural "" +"git diff header lacks filename information when removing %d leading pathname " +"components (line %d)" +msgstr[0] "" +msgstr[1] "" + +#: builtin/apply.c:1621 +msgid "new file depends on old contents" +msgstr "" + +#: builtin/apply.c:1623 +msgid "deleted file still has contents" +msgstr "" + +#: builtin/apply.c:1649 +#, c-format +msgid "corrupt patch at line %d" +msgstr "" + +#: builtin/apply.c:1685 +#, c-format +msgid "new file %s depends on old contents" +msgstr "" + +#: builtin/apply.c:1687 +#, c-format +msgid "deleted file %s still has contents" +msgstr "" + +#: builtin/apply.c:1690 +#, c-format +msgid "** warning: file %s becomes empty but is not deleted" +msgstr "" + +#: builtin/apply.c:1836 +#, c-format +msgid "corrupt binary patch at line %d: %.*s" +msgstr "" + +#. there has to be one hunk (forward hunk) +#: builtin/apply.c:1865 +#, c-format +msgid "unrecognized binary patch at line %d" +msgstr "" + +#: builtin/apply.c:1951 +#, c-format +msgid "patch with only garbage at line %d" +msgstr "" + +#: builtin/apply.c:2041 +#, c-format +msgid "unable to read symlink %s" +msgstr "" + +#: builtin/apply.c:2045 +#, c-format +msgid "unable to open or read %s" +msgstr "" + +#: builtin/apply.c:2116 +msgid "oops" +msgstr "" + +#: builtin/apply.c:2638 +#, c-format +msgid "invalid start of line: '%c'" +msgstr "" + +#: builtin/apply.c:2756 +#, c-format +msgid "Hunk #%d succeeded at %d (offset %d line)." +msgid_plural "Hunk #%d succeeded at %d (offset %d lines)." +msgstr[0] "" +msgstr[1] "" + +#: builtin/apply.c:2768 +#, c-format +msgid "Context reduced to (%ld/%ld) to apply fragment at %d" +msgstr "" + +#: builtin/apply.c:2774 +#, c-format +msgid "" +"while searching for:\n" +"%.*s" +msgstr "" + +#: builtin/apply.c:2793 +#, c-format +msgid "missing binary patch data for '%s'" +msgstr "" + +#: builtin/apply.c:2896 +#, c-format +msgid "binary patch does not apply to '%s'" +msgstr "" + +#: builtin/apply.c:2902 +#, c-format +msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)" +msgstr "" + +#: builtin/apply.c:2923 +#, c-format +msgid "patch failed: %s:%ld" +msgstr "" + +#: builtin/apply.c:3038 +#, c-format +msgid "patch %s has been renamed/deleted" +msgstr "" + +#: builtin/apply.c:3045 builtin/apply.c:3062 +#, c-format +msgid "read of %s failed" +msgstr "" + +#: builtin/apply.c:3077 +msgid "removal patch leaves file contents" +msgstr "" + +#: builtin/apply.c:3098 +#, c-format +msgid "%s: already exists in working directory" +msgstr "" + +#: builtin/apply.c:3136 +#, c-format +msgid "%s: has been deleted/renamed" +msgstr "" + +#: builtin/apply.c:3141 builtin/apply.c:3172 +#, c-format +msgid "%s: %s" +msgstr "" + +#: builtin/apply.c:3152 +#, c-format +msgid "%s: does not exist in index" +msgstr "" + +#: builtin/apply.c:3166 +#, c-format +msgid "%s: does not match index" +msgstr "" + +#: builtin/apply.c:3183 +#, c-format +msgid "%s: wrong type" +msgstr "" + +#: builtin/apply.c:3185 +#, c-format +msgid "%s has type %o, expected %o" +msgstr "" + +#: builtin/apply.c:3240 +#, c-format +msgid "%s: already exists in index" +msgstr "" + +#: builtin/apply.c:3259 +#, c-format +msgid "new mode (%o) of %s does not match old mode (%o)%s%s" +msgstr "" + +#: builtin/apply.c:3265 +#, c-format +msgid "%s: patch does not apply" +msgstr "" + +#: builtin/apply.c:3278 +#, c-format +msgid "Checking patch %s..." +msgstr "" + +#: builtin/apply.c:3333 builtin/checkout.c:212 builtin/reset.c:158 +#, c-format +msgid "make_cache_entry failed for path '%s'" +msgstr "" + +#: builtin/apply.c:3476 +#, c-format +msgid "unable to remove %s from index" +msgstr "" + +#: builtin/apply.c:3503 +#, c-format +msgid "corrupt patch for subproject %s" +msgstr "" + +#: builtin/apply.c:3507 +#, c-format +msgid "unable to stat newly created file '%s'" +msgstr "" + +#: builtin/apply.c:3512 +#, c-format +msgid "unable to create backing store for newly created file %s" +msgstr "" + +#: builtin/apply.c:3515 +#, c-format +msgid "unable to add cache entry for %s" +msgstr "" + +#: builtin/apply.c:3548 +#, c-format +msgid "closing file '%s'" +msgstr "" + +#: builtin/apply.c:3597 +#, c-format +msgid "unable to write file '%s' mode %o" +msgstr "" + +#: builtin/apply.c:3653 +#, c-format +msgid "Applied patch %s cleanly." +msgstr "" + +#: builtin/apply.c:3661 +msgid "internal error" +msgstr "" + +#. Say this even without --verbose +#: builtin/apply.c:3664 +#, c-format +msgid "Applying patch %%s with %d reject..." +msgid_plural "Applying patch %%s with %d rejects..." +msgstr[0] "" +msgstr[1] "" + +#: builtin/apply.c:3674 +#, c-format +msgid "truncating .rej filename to %.*s.rej" +msgstr "" + +#: builtin/apply.c:3695 +#, c-format +msgid "Hunk #%d applied cleanly." +msgstr "" + +#: builtin/apply.c:3698 +#, c-format +msgid "Rejected hunk #%d." +msgstr "" + +#: builtin/apply.c:3829 +msgid "unrecognized input" +msgstr "" + +#: builtin/apply.c:3840 +msgid "unable to read index file" +msgstr "" + +#: builtin/apply.c:4035 +msgid "--index outside a repository" +msgstr "" + +#: builtin/apply.c:4038 +msgid "--cached outside a repository" +msgstr "" + +#: builtin/apply.c:4054 +#, c-format +msgid "can't open patch '%s'" +msgstr "" + +#: builtin/apply.c:4068 +#, c-format +msgid "squelched %d whitespace error" +msgid_plural "squelched %d whitespace errors" +msgstr[0] "" +msgstr[1] "" + +#: builtin/apply.c:4074 builtin/apply.c:4084 +#, c-format +msgid "%d line adds whitespace errors." +msgid_plural "%d lines add whitespace errors." +msgstr[0] "" +msgstr[1] "" + #: builtin/archive.c:17 #, c-format msgid "could not create archive file '%s'" @@ -783,143 +1315,157 @@ msgstr "" msgid "git archive: expected a flush" msgstr "" -#: builtin/branch.c:137 +#: builtin/branch.c:144 #, c-format msgid "" "deleting branch '%s' that has been merged to\n" " '%s', but not yet merged to HEAD." msgstr "" -#: builtin/branch.c:141 +#: builtin/branch.c:148 #, c-format msgid "" "not deleting branch '%s' that is not yet merged to\n" " '%s', even though it is merged to HEAD." msgstr "" -#. TRANSLATORS: This is "remote " in "remote branch '%s' not found" -#: builtin/branch.c:164 -msgid "remote " -msgstr "" - -#: builtin/branch.c:172 +#: builtin/branch.c:180 msgid "cannot use -a with -d" msgstr "" -#: builtin/branch.c:178 +#: builtin/branch.c:186 msgid "Couldn't look up commit object for HEAD" msgstr "" -#: builtin/branch.c:183 +#: builtin/branch.c:191 #, c-format msgid "Cannot delete the branch '%s' which you are currently on." msgstr "" -#: builtin/branch.c:193 +#: builtin/branch.c:202 #, c-format -msgid "%sbranch '%s' not found." +msgid "remote branch '%s' not found." msgstr "" -#: builtin/branch.c:201 +#: builtin/branch.c:203 +#, c-format +msgid "branch '%s' not found." +msgstr "" + +#: builtin/branch.c:210 #, c-format msgid "Couldn't look up commit object for '%s'" msgstr "" -#: builtin/branch.c:207 +#: builtin/branch.c:216 #, 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:215 +#: builtin/branch.c:225 #, c-format -msgid "Error deleting %sbranch '%s'" +msgid "Error deleting remote branch '%s'" msgstr "" -#: builtin/branch.c:221 +#: builtin/branch.c:226 #, c-format -msgid "Deleted %sbranch %s (was %s).\n" +msgid "Error deleting branch '%s'" msgstr "" -#: builtin/branch.c:226 +#: builtin/branch.c:233 +#, c-format +msgid "Deleted remote branch %s (was %s).\n" +msgstr "" + +#: builtin/branch.c:234 +#, c-format +msgid "Deleted branch %s (was %s).\n" +msgstr "" + +#: builtin/branch.c:239 msgid "Update of config-file failed" msgstr "" -#: builtin/branch.c:324 +#: builtin/branch.c:337 #, c-format msgid "branch '%s' does not point at a commit" msgstr "" -#: builtin/branch.c:396 +#: builtin/branch.c:409 #, c-format msgid "behind %d] " msgstr "" -#: builtin/branch.c:398 +#: builtin/branch.c:411 #, c-format msgid "ahead %d] " msgstr "" -#: builtin/branch.c:400 +#: builtin/branch.c:413 #, c-format msgid "ahead %d, behind %d] " msgstr "" -#: builtin/branch.c:503 +#: builtin/branch.c:521 msgid "(no branch)" msgstr "" -#: builtin/branch.c:568 +#: builtin/branch.c:586 msgid "some refs could not be read" msgstr "" -#: builtin/branch.c:581 +#: builtin/branch.c:599 msgid "cannot rename the current branch while not on any." msgstr "" -#: builtin/branch.c:591 +#: builtin/branch.c:609 #, c-format msgid "Invalid branch name: '%s'" msgstr "" -#: builtin/branch.c:606 +#: builtin/branch.c:624 msgid "Branch rename failed" msgstr "" -#: builtin/branch.c:610 +#: builtin/branch.c:628 #, c-format msgid "Renamed a misnamed branch '%s' away" msgstr "" -#: builtin/branch.c:614 +#: builtin/branch.c:632 #, c-format msgid "Branch renamed to %s, but HEAD is not updated!" msgstr "" -#: builtin/branch.c:621 +#: builtin/branch.c:639 msgid "Branch is renamed, but update of config-file failed" msgstr "" -#: builtin/branch.c:636 +#: builtin/branch.c:654 #, c-format msgid "malformed object name %s" msgstr "" -#: builtin/branch.c:660 +#: builtin/branch.c:678 #, c-format -msgid "could not write branch description template: %s\n" +msgid "could not write branch description template: %s" msgstr "" -#: builtin/branch.c:750 +#: builtin/branch.c:769 msgid "Failed to resolve HEAD as a valid ref." msgstr "" -#: builtin/branch.c:755 builtin/clone.c:558 +#: builtin/branch.c:774 builtin/clone.c:558 msgid "HEAD not found below refs/heads!" msgstr "" -#: builtin/branch.c:813 +#: builtin/branch.c:794 +msgid "--column and --verbose are incompatible" +msgstr "" + +#: builtin/branch.c:843 msgid "-a and -r options to 'git branch' do not make sense with a branch name" msgstr "" @@ -966,11 +1512,6 @@ msgstr "" msgid "Unable to add merge result for '%s'" msgstr "" -#: builtin/checkout.c:212 builtin/reset.c:158 -#, c-format -msgid "make_cache_entry failed for path '%s'" -msgstr "" - #: builtin/checkout.c:234 builtin/checkout.c:392 msgid "corrupt index file" msgstr "" @@ -1316,7 +1857,11 @@ msgstr "" msgid "You appear to have cloned an empty repository." msgstr "" -#: builtin/commit.c:42 +#: builtin/column.c:51 +msgid "--command must be the first argument" +msgstr "" + +#: builtin/commit.c:43 msgid "" "Your name and email address were configured automatically based\n" "on your username and hostname. Please check that they are accurate.\n" @@ -1330,14 +1875,14 @@ msgid "" " git commit --amend --reset-author\n" msgstr "" -#: builtin/commit.c:54 +#: builtin/commit.c:55 msgid "" "You asked to amend the most recent commit, but doing so would make\n" "it empty. You can repeat your command with --allow-empty, or you can\n" "remove the commit entirely with \"git reset HEAD^\".\n" msgstr "" -#: builtin/commit.c:59 +#: builtin/commit.c:60 msgid "" "The previous cherry-pick is now empty, possibly due to conflict resolution.\n" "If you wish to commit it anyway, use:\n" @@ -1347,213 +1892,212 @@ msgid "" "Otherwise, please use 'git reset'\n" msgstr "" -#: builtin/commit.c:205 builtin/reset.c:33 -msgid "merge" -msgstr "" - -#: builtin/commit.c:208 -msgid "cherry-pick" -msgstr "" - -#: builtin/commit.c:325 +#: builtin/commit.c:309 msgid "failed to unpack HEAD tree object" msgstr "" -#: builtin/commit.c:367 +#: builtin/commit.c:351 msgid "unable to create temporary index" msgstr "" -#: builtin/commit.c:373 +#: builtin/commit.c:357 msgid "interactive add failed" msgstr "" -#: builtin/commit.c:406 builtin/commit.c:427 builtin/commit.c:473 +#: builtin/commit.c:390 builtin/commit.c:411 builtin/commit.c:461 msgid "unable to write new_index file" msgstr "" -#: builtin/commit.c:457 -#, c-format -msgid "cannot do a partial commit during a %s." +#: builtin/commit.c:442 +msgid "cannot do a partial commit during a merge." msgstr "" -#: builtin/commit.c:466 +#: builtin/commit.c:444 +msgid "cannot do a partial commit during a cherry-pick." +msgstr "" + +#: builtin/commit.c:454 msgid "cannot read the index" msgstr "" -#: builtin/commit.c:486 +#: builtin/commit.c:474 msgid "unable to write temporary index file" msgstr "" -#: builtin/commit.c:561 builtin/commit.c:567 +#: builtin/commit.c:549 builtin/commit.c:555 #, c-format msgid "invalid commit: %s" msgstr "" -#: builtin/commit.c:590 +#: builtin/commit.c:578 msgid "malformed --author parameter" msgstr "" -#: builtin/commit.c:651 +#: builtin/commit.c:639 #, c-format msgid "Malformed ident string: '%s'" msgstr "" -#: builtin/commit.c:689 builtin/commit.c:722 builtin/commit.c:1033 +#: builtin/commit.c:677 builtin/commit.c:710 builtin/commit.c:1024 #, c-format msgid "could not lookup commit %s" msgstr "" -#: builtin/commit.c:701 builtin/shortlog.c:296 +#: builtin/commit.c:689 builtin/shortlog.c:296 #, c-format msgid "(reading log message from standard input)\n" msgstr "" -#: builtin/commit.c:703 +#: builtin/commit.c:691 msgid "could not read log from standard input" msgstr "" -#: builtin/commit.c:707 +#: builtin/commit.c:695 #, c-format msgid "could not read log file '%s'" msgstr "" -#: builtin/commit.c:713 +#: builtin/commit.c:701 msgid "commit has empty message" msgstr "" -#: builtin/commit.c:729 +#: builtin/commit.c:717 msgid "could not read MERGE_MSG" msgstr "" -#: builtin/commit.c:733 +#: builtin/commit.c:721 msgid "could not read SQUASH_MSG" msgstr "" -#: builtin/commit.c:737 +#: builtin/commit.c:725 #, c-format msgid "could not read '%s'" msgstr "" -#: builtin/commit.c:765 -#, c-format -msgid "could not open '%s'" -msgstr "" - -#: builtin/commit.c:789 +#: builtin/commit.c:777 msgid "could not write commit template" msgstr "" -#: builtin/commit.c:799 +#: builtin/commit.c:788 #, c-format msgid "" "\n" -"It looks like you may be committing a %s.\n" +"It looks like you may be committing a merge.\n" "If this is not correct, please remove the file\n" "\t%s\n" "and try again.\n" msgstr "" -#: builtin/commit.c:812 -msgid "Please enter the commit message for your changes." +#: builtin/commit.c:793 +#, c-format +msgid "" +"\n" +"It looks like you may be committing a cherry-pick.\n" +"If this is not correct, please remove the file\n" +"\t%s\n" +"and try again.\n" msgstr "" -#: builtin/commit.c:815 +#: builtin/commit.c:805 msgid "" -" Lines starting\n" +"Please enter the commit message for your changes. Lines starting\n" "with '#' will be ignored, and an empty message aborts the commit.\n" msgstr "" -#: builtin/commit.c:820 +#: builtin/commit.c:810 msgid "" -" Lines starting\n" +"Please enter the commit message for your changes. Lines starting\n" "with '#' will be kept; you may remove them yourself if you want to.\n" "An empty message aborts the commit.\n" msgstr "" -#: builtin/commit.c:832 +#: builtin/commit.c:823 #, c-format msgid "%sAuthor: %s" msgstr "" -#: builtin/commit.c:839 +#: builtin/commit.c:830 #, c-format msgid "%sCommitter: %s" msgstr "" -#: builtin/commit.c:859 +#: builtin/commit.c:850 msgid "Cannot read index" msgstr "" -#: builtin/commit.c:896 +#: builtin/commit.c:887 msgid "Error building trees" msgstr "" -#: builtin/commit.c:911 builtin/tag.c:357 +#: builtin/commit.c:902 builtin/tag.c:361 #, c-format msgid "Please supply the message using either -m or -F option.\n" msgstr "" -#: builtin/commit.c:1008 +#: builtin/commit.c:999 #, c-format msgid "No existing author found with '%s'" msgstr "" -#: builtin/commit.c:1023 builtin/commit.c:1217 +#: builtin/commit.c:1014 builtin/commit.c:1214 #, c-format msgid "Invalid untracked files mode '%s'" msgstr "" -#: builtin/commit.c:1063 +#: builtin/commit.c:1054 msgid "Using both --reset-author and --author does not make sense" msgstr "" -#: builtin/commit.c:1074 +#: builtin/commit.c:1065 msgid "You have nothing to amend." msgstr "" -#: builtin/commit.c:1076 -#, c-format -msgid "You are in the middle of a %s -- cannot amend." +#: builtin/commit.c:1068 +msgid "You are in the middle of a merge -- cannot amend." msgstr "" -#: builtin/commit.c:1078 +#: builtin/commit.c:1070 +msgid "You are in the middle of a cherry-pick -- cannot amend." +msgstr "" + +#: builtin/commit.c:1073 msgid "Options --squash and --fixup cannot be used together" msgstr "" -#: builtin/commit.c:1088 +#: builtin/commit.c:1083 msgid "Only one of -c/-C/-F/--fixup can be used." msgstr "" -#: builtin/commit.c:1090 +#: builtin/commit.c:1085 msgid "Option -m cannot be combined with -c/-C/-F/--fixup." msgstr "" -#: builtin/commit.c:1098 +#: builtin/commit.c:1093 msgid "--reset-author can be used only with -C, -c or --amend." msgstr "" -#: builtin/commit.c:1115 +#: builtin/commit.c:1110 msgid "Only one of --include/--only/--all/--interactive/--patch can be used." msgstr "" -#: builtin/commit.c:1117 +#: builtin/commit.c:1112 msgid "No paths with --include/--only does not make sense." msgstr "" -#: builtin/commit.c:1119 +#: builtin/commit.c:1114 msgid "Clever... amending the last one with dirty index." msgstr "" -#: builtin/commit.c:1121 +#: builtin/commit.c:1116 msgid "Explicit paths specified without -i nor -o; assuming --only paths..." msgstr "" -#: builtin/commit.c:1131 builtin/tag.c:556 +#: builtin/commit.c:1126 builtin/tag.c:577 #, c-format msgid "Invalid cleanup mode %s" msgstr "" -#: builtin/commit.c:1136 +#: builtin/commit.c:1131 msgid "Paths with -a does not make sense." msgstr "" @@ -1815,19 +2359,19 @@ msgstr "" #: builtin/fetch.c:549 #, c-format -msgid " (%s will become dangling)\n" +msgid " (%s will become dangling)" msgstr "" #: builtin/fetch.c:550 #, c-format -msgid " (%s has become dangling)\n" +msgid " (%s has become dangling)" msgstr "" #: builtin/fetch.c:557 msgid "[deleted]" msgstr "" -#: builtin/fetch.c:558 +#: builtin/fetch.c:558 builtin/remote.c:1055 msgid "(none)" msgstr "" @@ -1856,7 +2400,7 @@ msgstr "" msgid "Fetching %s\n" msgstr "" -#: builtin/fetch.c:890 +#: builtin/fetch.c:890 builtin/remote.c:100 #, c-format msgid "Could not fetch %s" msgstr "" @@ -1893,28 +2437,24 @@ msgstr "" msgid "Invalid %s: '%s'" msgstr "" -#: builtin/gc.c:78 -msgid "Too many options specified" -msgstr "" - -#: builtin/gc.c:103 +#: builtin/gc.c:90 #, c-format msgid "insanely long object directory %.*s" msgstr "" -#: builtin/gc.c:223 +#: builtin/gc.c:221 #, c-format msgid "Auto packing the repository for optimum performance.\n" msgstr "" -#: builtin/gc.c:226 +#: builtin/gc.c:224 #, c-format msgid "" "Auto packing the repository for optimum performance. You may also\n" "run \"git gc\" manually. See \"git help gc\" for more information.\n" msgstr "" -#: builtin/gc.c:256 +#: builtin/gc.c:251 msgid "" "There are too many unreachable loose objects; run 'git prune' to remove them." msgstr "" @@ -1978,6 +2518,306 @@ msgstr "" msgid "both --cached and trees are given." msgstr "" +#: builtin/help.c:59 +#, c-format +msgid "unrecognized help format '%s'" +msgstr "" + +#: builtin/help.c:87 +msgid "Failed to start emacsclient." +msgstr "" + +#: builtin/help.c:100 +msgid "Failed to parse emacsclient version." +msgstr "" + +#: builtin/help.c:108 +#, c-format +msgid "emacsclient version '%d' too old (< 22)." +msgstr "" + +#: builtin/help.c:126 builtin/help.c:154 builtin/help.c:163 builtin/help.c:171 +#, c-format +msgid "failed to exec '%s': %s" +msgstr "" + +#: builtin/help.c:211 +#, c-format +msgid "" +"'%s': path for unsupported man viewer.\n" +"Please consider using 'man.<tool>.cmd' instead." +msgstr "" + +#: builtin/help.c:223 +#, c-format +msgid "" +"'%s': cmd for supported man viewer.\n" +"Please consider using 'man.<tool>.path' instead." +msgstr "" + +#: builtin/help.c:287 +msgid "The most commonly used git commands are:" +msgstr "" + +#: builtin/help.c:355 +#, c-format +msgid "'%s': unknown man viewer." +msgstr "" + +#: builtin/help.c:372 +msgid "no man viewer handled the request" +msgstr "" + +#: builtin/help.c:380 +msgid "no info viewer handled the request" +msgstr "" + +#: builtin/help.c:391 +#, c-format +msgid "'%s': not a documentation directory." +msgstr "" + +#: builtin/help.c:432 builtin/help.c:439 +#, c-format +msgid "usage: %s%s" +msgstr "" + +#: builtin/help.c:453 +#, c-format +msgid "`git %s' is aliased to `%s'" +msgstr "" + +#: builtin/index-pack.c:84 +#, c-format +msgid "object type mismatch at %s" +msgstr "" + +#: builtin/index-pack.c:104 +msgid "object of unexpected type" +msgstr "" + +#: builtin/index-pack.c:141 +#, c-format +msgid "cannot fill %d byte" +msgid_plural "cannot fill %d bytes" +msgstr[0] "" +msgstr[1] "" + +#: builtin/index-pack.c:151 +msgid "early EOF" +msgstr "" + +#: builtin/index-pack.c:152 +msgid "read error on input" +msgstr "" + +#: builtin/index-pack.c:164 +msgid "used more bytes than were available" +msgstr "" + +#: builtin/index-pack.c:171 +msgid "pack too large for current definition of off_t" +msgstr "" + +#: builtin/index-pack.c:187 +#, c-format +msgid "unable to create '%s'" +msgstr "" + +#: builtin/index-pack.c:192 +#, c-format +msgid "cannot open packfile '%s'" +msgstr "" + +#: builtin/index-pack.c:206 +msgid "pack signature mismatch" +msgstr "" + +#: builtin/index-pack.c:226 +#, c-format +msgid "pack has bad object at offset %lu: %s" +msgstr "" + +#: builtin/index-pack.c:300 +#, c-format +msgid "inflate returned %d" +msgstr "" + +#: builtin/index-pack.c:345 +msgid "offset value overflow for delta base object" +msgstr "" + +#: builtin/index-pack.c:353 +msgid "delta base offset is out of bound" +msgstr "" + +#: builtin/index-pack.c:361 +#, c-format +msgid "unknown object type %d" +msgstr "" + +#: builtin/index-pack.c:390 +msgid "cannot pread pack file" +msgstr "" + +#: builtin/index-pack.c:392 +#, c-format +msgid "premature end of pack file, %lu byte missing" +msgid_plural "premature end of pack file, %lu bytes missing" +msgstr[0] "" +msgstr[1] "" + +#: builtin/index-pack.c:405 +msgid "serious inflate inconsistency" +msgstr "" + +#: builtin/index-pack.c:476 +#, c-format +msgid "cannot read existing object %s" +msgstr "" + +#: builtin/index-pack.c:479 +#, c-format +msgid "SHA1 COLLISION FOUND WITH %s !" +msgstr "" + +#: builtin/index-pack.c:488 +#, c-format +msgid "invalid blob object %s" +msgstr "" + +#: builtin/index-pack.c:500 +#, c-format +msgid "invalid %s" +msgstr "" + +#: builtin/index-pack.c:502 +msgid "Error in object" +msgstr "" + +#: builtin/index-pack.c:504 +#, c-format +msgid "Not all child objects of %s are reachable" +msgstr "" + +#: builtin/index-pack.c:576 builtin/index-pack.c:602 +msgid "failed to apply delta" +msgstr "" + +#: builtin/index-pack.c:706 +msgid "Receiving objects" +msgstr "" + +#: builtin/index-pack.c:706 +msgid "Indexing objects" +msgstr "" + +#: builtin/index-pack.c:728 +msgid "pack is corrupted (SHA1 mismatch)" +msgstr "" + +#: builtin/index-pack.c:733 +msgid "cannot fstat packfile" +msgstr "" + +#: builtin/index-pack.c:736 +msgid "pack has junk at the end" +msgstr "" + +#: builtin/index-pack.c:754 +msgid "Resolving deltas" +msgstr "" + +#: builtin/index-pack.c:787 +#, c-format +msgid "unable to deflate appended object (%d)" +msgstr "" + +#: builtin/index-pack.c:866 +#, c-format +msgid "local object %s is corrupt" +msgstr "" + +#: builtin/index-pack.c:890 +msgid "error while closing pack file" +msgstr "" + +#: builtin/index-pack.c:903 +#, c-format +msgid "cannot write keep file '%s'" +msgstr "" + +#: builtin/index-pack.c:911 +#, c-format +msgid "cannot close written keep file '%s'" +msgstr "" + +#: builtin/index-pack.c:924 +msgid "cannot store pack file" +msgstr "" + +#: builtin/index-pack.c:935 +msgid "cannot store index file" +msgstr "" + +#: builtin/index-pack.c:1024 +#, c-format +msgid "Cannot open existing pack file '%s'" +msgstr "" + +#: builtin/index-pack.c:1026 +#, c-format +msgid "Cannot open existing pack idx file for '%s'" +msgstr "" + +#: builtin/index-pack.c:1073 +#, c-format +msgid "non delta: %d object" +msgid_plural "non delta: %d objects" +msgstr[0] "" +msgstr[1] "" + +#: builtin/index-pack.c:1080 +#, c-format +msgid "chain length = %d: %lu object" +msgid_plural "chain length = %d: %lu objects" +msgstr[0] "" +msgstr[1] "" + +#: builtin/index-pack.c:1107 +msgid "Cannot come back to cwd" +msgstr "" + +#: builtin/index-pack.c:1140 builtin/index-pack.c:1143 +#: builtin/index-pack.c:1155 builtin/index-pack.c:1159 +#, c-format +msgid "bad %s" +msgstr "" + +#: builtin/index-pack.c:1173 +msgid "--fix-thin cannot be used without --stdin" +msgstr "" + +#: builtin/index-pack.c:1177 builtin/index-pack.c:1187 +#, c-format +msgid "packfile name '%s' does not end with '.pack'" +msgstr "" + +#: builtin/index-pack.c:1196 +msgid "--verify with no packfile name given" +msgstr "" + +#: builtin/index-pack.c:1220 +msgid "confusion beyond insanity" +msgstr "" + +#: builtin/index-pack.c:1239 +#, c-format +msgid "pack has %d unresolved delta" +msgid_plural "pack has %d unresolved deltas" +msgstr[0] "" +msgstr[1] "" + #: builtin/init-db.c:35 #, c-format msgid "Could not make %s writable by group" @@ -2186,11 +3026,6 @@ msgstr "" msgid "--subject-prefix and -k are mutually exclusive." msgstr "" -#: builtin/log.c:1231 builtin/shortlog.c:284 -#, c-format -msgid "unrecognized argument: %s" -msgstr "" - #: builtin/log.c:1234 msgid "--name-only does not make sense" msgstr "" @@ -2535,7 +3370,7 @@ msgstr "" msgid "Renaming %s to %s\n" msgstr "" -#: builtin/mv.c:215 +#: builtin/mv.c:215 builtin/remote.c:731 #, c-format msgid "renaming '%s' failed" msgstr "" @@ -2559,7 +3394,7 @@ msgstr "" msgid "failed to finish 'show' for object '%s'" msgstr "" -#: builtin/notes.c:175 builtin/tag.c:343 +#: builtin/notes.c:175 builtin/tag.c:347 #, c-format msgid "could not create file '%s'" msgstr "" @@ -2582,12 +3417,12 @@ msgstr "" msgid "The note contents has been left in %s" msgstr "" -#: builtin/notes.c:251 builtin/tag.c:521 +#: builtin/notes.c:251 builtin/tag.c:542 #, c-format msgid "cannot read '%s'" msgstr "" -#: builtin/notes.c:253 builtin/tag.c:524 +#: builtin/notes.c:253 builtin/tag.c:545 #, c-format msgid "could not open or read '%s'" msgstr "" @@ -2595,7 +3430,7 @@ msgstr "" #: builtin/notes.c:272 builtin/notes.c:445 builtin/notes.c:447 #: builtin/notes.c:507 builtin/notes.c:561 builtin/notes.c:644 #: builtin/notes.c:649 builtin/notes.c:724 builtin/notes.c:766 -#: builtin/notes.c:968 builtin/reset.c:293 builtin/tag.c:537 +#: builtin/notes.c:968 builtin/reset.c:293 builtin/tag.c:558 #, c-format msgid "Failed to resolve '%s' as a valid ref." msgstr "" @@ -2687,27 +3522,27 @@ msgstr "" msgid "Object %s has no note\n" msgstr "" -#: builtin/notes.c:1103 +#: builtin/notes.c:1103 builtin/remote.c:1598 #, c-format msgid "Unknown subcommand: %s" msgstr "" -#: builtin/pack-objects.c:2310 +#: builtin/pack-objects.c:2315 #, c-format msgid "unsupported index version %s" msgstr "" -#: builtin/pack-objects.c:2314 +#: builtin/pack-objects.c:2319 #, c-format msgid "bad index version '%s'" msgstr "" -#: builtin/pack-objects.c:2322 +#: builtin/pack-objects.c:2342 #, c-format msgid "option %s does not accept negative form" msgstr "" -#: builtin/pack-objects.c:2326 +#: builtin/pack-objects.c:2346 #, c-format msgid "unable to parse value '%s' for option %s" msgstr "" @@ -2720,7 +3555,28 @@ msgstr "" msgid "--delete only accepts plain target ref names" msgstr "" -#: builtin/push.c:84 +#: builtin/push.c:99 +msgid "" +"\n" +"To choose either option permanently, see push.default in 'git help config'." +msgstr "" + +#: builtin/push.c:102 +#, c-format +msgid "" +"The upstream branch of your current branch does not match\n" +"the name of your current branch. To push to the upstream branch\n" +"on the remote, use\n" +"\n" +" git push %s HEAD:%s\n" +"\n" +"To push to the branch of the same name on the remote, use\n" +"\n" +" git push %s %s\n" +"%s" +msgstr "" + +#: builtin/push.c:121 #, c-format msgid "" "You are not currently on a branch.\n" @@ -2730,7 +3586,7 @@ msgid "" " git push %s HEAD:<name-of-remote-branch>\n" msgstr "" -#: builtin/push.c:91 +#: builtin/push.c:128 #, c-format msgid "" "The current branch %s has no upstream branch.\n" @@ -2739,12 +3595,12 @@ msgid "" " git push --set-upstream %s %s\n" msgstr "" -#: builtin/push.c:99 +#: builtin/push.c:136 #, c-format msgid "The current branch %s has multiple upstream branches, refusing to push." msgstr "" -#: builtin/push.c:102 +#: builtin/push.c:139 #, c-format msgid "" "You are pushing to remote '%s', which is not the upstream of\n" @@ -2752,12 +3608,12 @@ msgid "" "to update which remote branch." msgstr "" -#: builtin/push.c:131 +#: builtin/push.c:174 msgid "" "You didn't specify any refspecs to push, and push.default is \"nothing\"." msgstr "" -#: builtin/push.c:138 +#: builtin/push.c:181 msgid "" "Updates were rejected because the tip of your current branch is behind\n" "its remote counterpart. Merge the remote changes (e.g. 'git pull')\n" @@ -2765,7 +3621,7 @@ msgid "" "See the 'Note about fast-forwards' in 'git push --help' for details." msgstr "" -#: builtin/push.c:144 +#: builtin/push.c:187 msgid "" "Updates were rejected because a pushed branch tip is behind its remote\n" "counterpart. If you did not intend to push that branch, you may want to\n" @@ -2773,7 +3629,7 @@ msgid "" "variable to 'current' or 'upstream' to push only the current branch." msgstr "" -#: builtin/push.c:150 +#: builtin/push.c:193 msgid "" "Updates were rejected because a pushed branch tip is behind its remote\n" "counterpart. Check out this branch and merge the remote changes\n" @@ -2781,22 +3637,22 @@ msgid "" "See the 'Note about fast-forwards' in 'git push --help' for details." msgstr "" -#: builtin/push.c:190 +#: builtin/push.c:233 #, c-format msgid "Pushing to %s\n" msgstr "" -#: builtin/push.c:194 +#: builtin/push.c:237 #, c-format msgid "failed to push some refs to '%s'" msgstr "" -#: builtin/push.c:226 +#: builtin/push.c:269 #, c-format msgid "bad repository '%s'" msgstr "" -#: builtin/push.c:227 +#: builtin/push.c:270 msgid "" "No configured push destination.\n" "Either specify the URL from the command-line or configure a remote " @@ -2809,34 +3665,377 @@ msgid "" " git push <name>\n" msgstr "" -#: builtin/push.c:242 +#: builtin/push.c:285 msgid "--all and --tags are incompatible" msgstr "" -#: builtin/push.c:243 +#: builtin/push.c:286 msgid "--all can't be combined with refspecs" msgstr "" -#: builtin/push.c:248 +#: builtin/push.c:291 msgid "--mirror and --tags are incompatible" msgstr "" -#: builtin/push.c:249 +#: builtin/push.c:292 msgid "--mirror can't be combined with refspecs" msgstr "" -#: builtin/push.c:254 +#: builtin/push.c:297 msgid "--all and --mirror are incompatible" msgstr "" -#: builtin/push.c:342 +#: builtin/push.c:385 msgid "--delete is incompatible with --all, --mirror and --tags" msgstr "" -#: builtin/push.c:344 +#: builtin/push.c:387 msgid "--delete doesn't make sense without any refs" msgstr "" +#: builtin/remote.c:98 +#, c-format +msgid "Updating %s" +msgstr "" + +#: builtin/remote.c:130 +msgid "" +"--mirror is dangerous and deprecated; please\n" +"\t use --mirror=fetch or --mirror=push instead" +msgstr "" + +#: builtin/remote.c:147 +#, c-format +msgid "unknown mirror argument: %s" +msgstr "" + +#: builtin/remote.c:185 +msgid "specifying a master branch makes no sense with --mirror" +msgstr "" + +#: builtin/remote.c:187 +msgid "specifying branches to track makes sense only with fetch mirrors" +msgstr "" + +#: builtin/remote.c:195 builtin/remote.c:646 +#, c-format +msgid "remote %s already exists." +msgstr "" + +#: builtin/remote.c:199 builtin/remote.c:650 +#, c-format +msgid "'%s' is not a valid remote name" +msgstr "" + +#: builtin/remote.c:243 +#, c-format +msgid "Could not setup master '%s'" +msgstr "" + +#: builtin/remote.c:299 +#, c-format +msgid "more than one %s" +msgstr "" + +#: builtin/remote.c:339 +#, c-format +msgid "Could not get fetch map for refspec %s" +msgstr "" + +#: builtin/remote.c:440 builtin/remote.c:448 +msgid "(matching)" +msgstr "" + +#: builtin/remote.c:452 +msgid "(delete)" +msgstr "" + +#: builtin/remote.c:595 builtin/remote.c:601 builtin/remote.c:607 +#, c-format +msgid "Could not append '%s' to '%s'" +msgstr "" + +#: builtin/remote.c:639 builtin/remote.c:792 builtin/remote.c:890 +#, c-format +msgid "No such remote: %s" +msgstr "" + +#: builtin/remote.c:656 +#, c-format +msgid "Could not rename config section '%s' to '%s'" +msgstr "" + +#: builtin/remote.c:662 builtin/remote.c:799 +#, c-format +msgid "Could not remove config section '%s'" +msgstr "" + +#: builtin/remote.c:677 +#, c-format +msgid "" +"Not updating non-default fetch respec\n" +"\t%s\n" +"\tPlease update the configuration manually if necessary." +msgstr "" + +#: builtin/remote.c:683 +#, c-format +msgid "Could not append '%s'" +msgstr "" + +#: builtin/remote.c:694 +#, c-format +msgid "Could not set '%s'" +msgstr "" + +#: builtin/remote.c:716 +#, c-format +msgid "deleting '%s' failed" +msgstr "" + +#: builtin/remote.c:750 +#, c-format +msgid "creating '%s' failed" +msgstr "" + +#: builtin/remote.c:764 +#, c-format +msgid "Could not remove branch %s" +msgstr "" + +#: builtin/remote.c:834 +msgid "" +"Note: A branch outside the refs/remotes/ hierarchy was not removed;\n" +"to delete it, use:" +msgid_plural "" +"Note: Some branches outside the refs/remotes/ hierarchy were not removed;\n" +"to delete them, use:" +msgstr[0] "" +msgstr[1] "" + +#: builtin/remote.c:943 +#, c-format +msgid " new (next fetch will store in remotes/%s)" +msgstr "" + +#: builtin/remote.c:946 +msgid " tracked" +msgstr "" + +#: builtin/remote.c:948 +msgid " stale (use 'git remote prune' to remove)" +msgstr "" + +#: builtin/remote.c:950 +msgid " ???" +msgstr "" + +#: builtin/remote.c:991 +#, c-format +msgid "invalid branch.%s.merge; cannot rebase onto > 1 branch" +msgstr "" + +#: builtin/remote.c:998 +#, c-format +msgid "rebases onto remote %s" +msgstr "" + +#: builtin/remote.c:1001 +#, c-format +msgid " merges with remote %s" +msgstr "" + +#: builtin/remote.c:1002 +msgid " and with remote" +msgstr "" + +#: builtin/remote.c:1004 +#, c-format +msgid "merges with remote %s" +msgstr "" + +#: builtin/remote.c:1005 +msgid " and with remote" +msgstr "" + +#: builtin/remote.c:1051 +msgid "create" +msgstr "" + +#: builtin/remote.c:1054 +msgid "delete" +msgstr "" + +#: builtin/remote.c:1058 +msgid "up to date" +msgstr "" + +#: builtin/remote.c:1061 +msgid "fast-forwardable" +msgstr "" + +#: builtin/remote.c:1064 +msgid "local out of date" +msgstr "" + +#: builtin/remote.c:1071 +#, c-format +msgid " %-*s forces to %-*s (%s)" +msgstr "" + +#: builtin/remote.c:1074 +#, c-format +msgid " %-*s pushes to %-*s (%s)" +msgstr "" + +#: builtin/remote.c:1078 +#, c-format +msgid " %-*s forces to %s" +msgstr "" + +#: builtin/remote.c:1081 +#, c-format +msgid " %-*s pushes to %s" +msgstr "" + +#: builtin/remote.c:1118 +#, c-format +msgid "* remote %s" +msgstr "" + +#: builtin/remote.c:1119 +#, c-format +msgid " Fetch URL: %s" +msgstr "" + +#: builtin/remote.c:1120 builtin/remote.c:1285 +msgid "(no URL)" +msgstr "" + +#: builtin/remote.c:1129 builtin/remote.c:1131 +#, c-format +msgid " Push URL: %s" +msgstr "" + +#: builtin/remote.c:1133 builtin/remote.c:1135 builtin/remote.c:1137 +#, c-format +msgid " HEAD branch: %s" +msgstr "" + +#: builtin/remote.c:1139 +#, c-format +msgid "" +" HEAD branch (remote HEAD is ambiguous, may be one of the following):\n" +msgstr "" + +#: builtin/remote.c:1151 +#, c-format +msgid " Remote branch:%s" +msgid_plural " Remote branches:%s" +msgstr[0] "" +msgstr[1] "" + +#: builtin/remote.c:1154 builtin/remote.c:1181 +msgid " (status not queried)" +msgstr "" + +#: builtin/remote.c:1163 +msgid " Local branch configured for 'git pull':" +msgid_plural " Local branches configured for 'git pull':" +msgstr[0] "" +msgstr[1] "" + +#: builtin/remote.c:1171 +msgid " Local refs will be mirrored by 'git push'" +msgstr "" + +#: builtin/remote.c:1178 +#, c-format +msgid " Local ref configured for 'git push'%s:" +msgid_plural " Local refs configured for 'git push'%s:" +msgstr[0] "" +msgstr[1] "" + +#: builtin/remote.c:1216 +msgid "Cannot determine remote HEAD" +msgstr "" + +#: builtin/remote.c:1218 +msgid "Multiple remote HEAD branches. Please choose one explicitly with:" +msgstr "" + +#: builtin/remote.c:1228 +#, c-format +msgid "Could not delete %s" +msgstr "" + +#: builtin/remote.c:1236 +#, c-format +msgid "Not a valid ref: %s" +msgstr "" + +#: builtin/remote.c:1238 +#, c-format +msgid "Could not setup %s" +msgstr "" + +#: builtin/remote.c:1274 +#, c-format +msgid " %s will become dangling!" +msgstr "" + +#: builtin/remote.c:1275 +#, c-format +msgid " %s has become dangling!" +msgstr "" + +#: builtin/remote.c:1281 +#, c-format +msgid "Pruning %s" +msgstr "" + +#: builtin/remote.c:1282 +#, c-format +msgid "URL: %s" +msgstr "" + +#: builtin/remote.c:1295 +#, c-format +msgid " * [would prune] %s" +msgstr "" + +#: builtin/remote.c:1298 +#, c-format +msgid " * [pruned] %s" +msgstr "" + +#: builtin/remote.c:1387 builtin/remote.c:1461 +#, c-format +msgid "No such remote '%s'" +msgstr "" + +#: builtin/remote.c:1414 +msgid "no remote specified" +msgstr "" + +#: builtin/remote.c:1447 +msgid "--add --delete doesn't make sense" +msgstr "" + +#: builtin/remote.c:1487 +#, c-format +msgid "Invalid old URL pattern: %s" +msgstr "" + +#: builtin/remote.c:1495 +#, c-format +msgid "No such URL found: %s" +msgstr "" + +#: builtin/remote.c:1497 +msgid "Will not delete all non-push URLs" +msgstr "" + #: builtin/reset.c:33 msgid "mixed" msgstr "" @@ -2850,6 +4049,10 @@ msgid "hard" msgstr "" #: builtin/reset.c:33 +msgid "merge" +msgstr "" + +#: builtin/reset.c:33 msgid "keep" msgstr "" @@ -2921,15 +4124,15 @@ msgstr "" msgid "%s: %s cannot be used with %s" msgstr "" -#: builtin/revert.c:127 +#: builtin/revert.c:131 msgid "program error" msgstr "" -#: builtin/revert.c:213 +#: builtin/revert.c:221 msgid "revert failed" msgstr "" -#: builtin/revert.c:228 +#: builtin/revert.c:236 msgid "cherry-pick failed" msgstr "" @@ -2969,32 +4172,32 @@ msgstr "" msgid "Missing author: %s" msgstr "" -#: builtin/tag.c:58 +#: builtin/tag.c:60 #, c-format msgid "malformed object at '%s'" msgstr "" -#: builtin/tag.c:205 +#: builtin/tag.c:207 #, c-format msgid "tag name too long: %.*s..." msgstr "" -#: builtin/tag.c:210 +#: builtin/tag.c:212 #, c-format msgid "tag '%s' not found." msgstr "" -#: builtin/tag.c:225 +#: builtin/tag.c:227 #, c-format msgid "Deleted tag '%s' (was %s)\n" msgstr "" -#: builtin/tag.c:237 +#: builtin/tag.c:239 #, c-format msgid "could not verify the tag '%s'" msgstr "" -#: builtin/tag.c:247 +#: builtin/tag.c:249 msgid "" "\n" "#\n" @@ -3003,7 +4206,7 @@ msgid "" "#\n" msgstr "" -#: builtin/tag.c:254 +#: builtin/tag.c:256 msgid "" "\n" "#\n" @@ -3013,85 +4216,177 @@ msgid "" "#\n" msgstr "" -#: builtin/tag.c:294 +#: builtin/tag.c:298 msgid "unable to sign the tag" msgstr "" -#: builtin/tag.c:296 +#: builtin/tag.c:300 msgid "unable to write tag file" msgstr "" -#: builtin/tag.c:321 +#: builtin/tag.c:325 msgid "bad object type." msgstr "" -#: builtin/tag.c:334 +#: builtin/tag.c:338 msgid "tag header too big." msgstr "" -#: builtin/tag.c:366 +#: builtin/tag.c:370 msgid "no tag message?" msgstr "" -#: builtin/tag.c:372 +#: builtin/tag.c:376 #, c-format msgid "The tag message has been left in %s\n" msgstr "" -#: builtin/tag.c:421 +#: builtin/tag.c:425 msgid "switch 'points-at' requires an object" msgstr "" -#: builtin/tag.c:423 +#: builtin/tag.c:427 #, c-format msgid "malformed object name '%s'" msgstr "" -#: builtin/tag.c:502 +#: builtin/tag.c:506 +msgid "--column and -n are incompatible" +msgstr "" + +#: builtin/tag.c:523 msgid "-n option is only allowed with -l." msgstr "" -#: builtin/tag.c:504 +#: builtin/tag.c:525 msgid "--contains option is only allowed with -l." msgstr "" -#: builtin/tag.c:506 +#: builtin/tag.c:527 msgid "--points-at option is only allowed with -l." msgstr "" -#: builtin/tag.c:514 +#: builtin/tag.c:535 msgid "only one -F or -m option is allowed." msgstr "" -#: builtin/tag.c:534 +#: builtin/tag.c:555 msgid "too many params" msgstr "" -#: builtin/tag.c:540 +#: builtin/tag.c:561 #, c-format msgid "'%s' is not a valid tag name." msgstr "" -#: builtin/tag.c:545 +#: builtin/tag.c:566 #, c-format msgid "tag '%s' already exists" msgstr "" -#: builtin/tag.c:563 +#: builtin/tag.c:584 #, c-format msgid "%s: cannot lock the ref" msgstr "" -#: builtin/tag.c:565 +#: builtin/tag.c:586 #, c-format msgid "%s: cannot update the ref" msgstr "" -#: builtin/tag.c:567 +#: builtin/tag.c:588 #, c-format msgid "Updated tag '%s' (was %s)\n" msgstr "" +#: git.c:16 +msgid "See 'git help <command>' for more information on a specific command." +msgstr "" + +#: common-cmds.h:8 +msgid "Add file contents to the index" +msgstr "" + +#: common-cmds.h:9 +msgid "Find by binary search the change that introduced a bug" +msgstr "" + +#: common-cmds.h:10 +msgid "List, create, or delete branches" +msgstr "" + +#: common-cmds.h:11 +msgid "Checkout a branch or paths to the working tree" +msgstr "" + +#: common-cmds.h:12 +msgid "Clone a repository into a new directory" +msgstr "" + +#: common-cmds.h:13 +msgid "Record changes to the repository" +msgstr "" + +#: common-cmds.h:14 +msgid "Show changes between commits, commit and working tree, etc" +msgstr "" + +#: common-cmds.h:15 +msgid "Download objects and refs from another repository" +msgstr "" + +#: common-cmds.h:16 +msgid "Print lines matching a pattern" +msgstr "" + +#: common-cmds.h:17 +msgid "Create an empty git repository or reinitialize an existing one" +msgstr "" + +#: common-cmds.h:18 +msgid "Show commit logs" +msgstr "" + +#: common-cmds.h:19 +msgid "Join two or more development histories together" +msgstr "" + +#: common-cmds.h:20 +msgid "Move or rename a file, a directory, or a symlink" +msgstr "" + +#: common-cmds.h:21 +msgid "Fetch from and merge with another repository or a local branch" +msgstr "" + +#: common-cmds.h:22 +msgid "Update remote refs along with associated objects" +msgstr "" + +#: common-cmds.h:23 +msgid "Forward-port local commits to the updated upstream head" +msgstr "" + +#: common-cmds.h:24 +msgid "Reset current HEAD to the specified state" +msgstr "" + +#: common-cmds.h:25 +msgid "Remove files from the working tree and from the index" +msgstr "" + +#: common-cmds.h:26 +msgid "Show various types of objects" +msgstr "" + +#: common-cmds.h:27 +msgid "Show the working tree status" +msgstr "" + +#: common-cmds.h:28 +msgid "Create, list, delete or verify a tag object signed with GPG" +msgstr "" + #: git-am.sh:50 msgid "You need to set your committer info first" msgstr "" @@ -1010,6 +1010,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder, get_reflog_selector(sb, c->pretty_ctx->reflog_info, c->pretty_ctx->date_mode, + c->pretty_ctx->date_mode_explicit, (placeholder[1] == 'd')); return 2; case 's': /* reflog message */ diff --git a/reflog-walk.c b/reflog-walk.c index 86d18843f5..b2fbdb2392 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -126,7 +126,12 @@ static void add_commit_info(struct commit *commit, void *util, } struct commit_reflog { - int flag, recno; + int recno; + enum selector_type { + SELECTOR_NONE, + SELECTOR_INDEX, + SELECTOR_DATE + } selector; struct complete_reflogs *reflogs; }; @@ -150,6 +155,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info, struct complete_reflogs *reflogs; char *branch, *at = strchr(name, '@'); struct commit_reflog *commit_reflog; + enum selector_type selector = SELECTOR_NONE; if (commit->object.flags & UNINTERESTING) die ("Cannot walk reflogs for %s", name); @@ -162,7 +168,10 @@ int add_reflog_for_walk(struct reflog_walk_info *info, if (*ep != '}') { recno = -1; timestamp = approxidate(at + 2); + selector = SELECTOR_DATE; } + else + selector = SELECTOR_INDEX; } else recno = 0; @@ -200,7 +209,6 @@ int add_reflog_for_walk(struct reflog_walk_info *info, commit_reflog = xcalloc(sizeof(struct commit_reflog), 1); if (recno < 0) { - commit_reflog->flag = 1; commit_reflog->recno = get_reflog_recno_by_time(reflogs, timestamp); if (commit_reflog->recno < 0) { free(branch); @@ -209,6 +217,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info, } } else commit_reflog->recno = reflogs->nr - recno - 1; + commit_reflog->selector = selector; commit_reflog->reflogs = reflogs; add_commit_info(commit, commit_reflog, &info->reflogs); @@ -247,7 +256,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit) void get_reflog_selector(struct strbuf *sb, struct reflog_walk_info *reflog_info, - enum date_mode dmode, + enum date_mode dmode, int force_date, int shorten) { struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog; @@ -267,7 +276,8 @@ void get_reflog_selector(struct strbuf *sb, } strbuf_addf(sb, "%s@{", printed_ref); - if (commit_reflog->flag || dmode) { + if (commit_reflog->selector == SELECTOR_DATE || + (commit_reflog->selector == SELECTOR_NONE && force_date)) { info = &commit_reflog->reflogs->items[commit_reflog->recno+1]; strbuf_addstr(sb, show_date(info->timestamp, info->tz, dmode)); } else { @@ -308,7 +318,7 @@ const char *get_reflog_ident(struct reflog_walk_info *reflog_info) } void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline, - enum date_mode dmode) + enum date_mode dmode, int force_date) { if (reflog_info && reflog_info->last_commit_reflog) { struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog; @@ -316,7 +326,7 @@ void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline, struct strbuf selector = STRBUF_INIT; info = &commit_reflog->reflogs->items[commit_reflog->recno+1]; - get_reflog_selector(&selector, reflog_info, dmode, 0); + get_reflog_selector(&selector, reflog_info, dmode, force_date, 0); if (oneline) { printf("%s: %s", selector.buf, info->message); } diff --git a/reflog-walk.h b/reflog-walk.h index afb1ae3fde..50265f51c5 100644 --- a/reflog-walk.h +++ b/reflog-walk.h @@ -11,13 +11,13 @@ extern int add_reflog_for_walk(struct reflog_walk_info *info, extern void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit); extern void show_reflog_message(struct reflog_walk_info *info, int, - enum date_mode); + enum date_mode, int force_date); extern void get_reflog_message(struct strbuf *sb, struct reflog_walk_info *reflog_info); extern const char *get_reflog_ident(struct reflog_walk_info *reflog_info); extern void get_reflog_selector(struct strbuf *sb, struct reflog_walk_info *reflog_info, - enum date_mode dmode, + enum date_mode dmode, int force_date, int shorten); #endif @@ -101,11 +101,45 @@ int check_refname_format(const char *refname, int flags) struct ref_entry; +/* + * Information used (along with the information in ref_entry) to + * describe a single cached reference. This data structure only + * occurs embedded in a union in struct ref_entry, and only when + * (ref_entry->flag & REF_DIR) is zero. + */ struct ref_value { unsigned char sha1[20]; unsigned char peeled[20]; }; +struct ref_cache; + +/* + * Information used (along with the information in ref_entry) to + * describe a level in the hierarchy of references. This data + * structure only occurs embedded in a union in struct ref_entry, and + * only when (ref_entry.flag & REF_DIR) is set. In that case, + * (ref_entry.flag & REF_INCOMPLETE) determines whether the references + * in the directory have already been read: + * + * (ref_entry.flag & REF_INCOMPLETE) unset -- a directory of loose + * or packed references, already read. + * + * (ref_entry.flag & REF_INCOMPLETE) set -- a directory of loose + * references that hasn't been read yet (nor has any of its + * subdirectories). + * + * Entries within a directory are stored within a growable array of + * pointers to ref_entries (entries, nr, alloc). Entries 0 <= i < + * sorted are sorted by their component name in strcmp() order and the + * remaining entries are unsorted. + * + * Loose references are read lazily, one directory at a time. When a + * directory of loose references is read, then all of the references + * in that directory are stored, and REF_INCOMPLETE stubs are created + * for any subdirectories, but the subdirectories themselves are not + * read. The reading is triggered by get_ref_dir(). + */ struct ref_dir { int nr, alloc; @@ -117,24 +151,41 @@ struct ref_dir { */ int sorted; + /* A pointer to the ref_cache that contains this ref_dir. */ + struct ref_cache *ref_cache; + struct ref_entry **entries; }; /* ISSYMREF=0x01, ISPACKED=0x02, and ISBROKEN=0x04 are public interfaces */ #define REF_KNOWS_PEELED 0x08 + +/* ref_entry represents a directory of references */ #define REF_DIR 0x10 /* + * Entry has not yet been read from disk (used only for REF_DIR + * entries representing loose references) + */ +#define REF_INCOMPLETE 0x20 + +/* * A ref_entry represents either a reference or a "subdirectory" of - * references. Each directory in the reference namespace is - * represented by a ref_entry with (flags & REF_DIR) set and - * containing a subdir member that holds the entries in that - * directory. References are represented by a ref_entry with (flags & - * REF_DIR) unset and a value member that describes the reference's - * value. The flag member is at the ref_entry level, but it is also - * needed to interpret the contents of the value field (in other - * words, a ref_value object is not very much use without the - * enclosing ref_entry). + * references. + * + * Each directory in the reference namespace is represented by a + * ref_entry with (flags & REF_DIR) set and containing a subdir member + * that holds the entries in that directory that have been read so + * far. If (flags & REF_INCOMPLETE) is set, then the directory and + * its subdirectories haven't been read yet. REF_INCOMPLETE is only + * used for loose reference directories. + * + * References are represented by a ref_entry with (flags & REF_DIR) + * unset and a value member that describes the reference's value. The + * flag member is at the ref_entry level, but it is also needed to + * interpret the contents of the value field (in other words, a + * ref_value object is not very much use without the enclosing + * ref_entry). * * Reference names cannot end with slash and directories' names are * always stored with a trailing slash (except for the top-level @@ -171,6 +222,20 @@ struct ref_entry { char name[FLEX_ARRAY]; }; +static void read_loose_refs(const char *dirname, struct ref_dir *dir); + +static struct ref_dir *get_ref_dir(struct ref_entry *entry) +{ + struct ref_dir *dir; + assert(entry->flag & REF_DIR); + dir = &entry->u.subdir; + if (entry->flag & REF_INCOMPLETE) { + read_loose_refs(entry->name, dir); + entry->flag &= ~REF_INCOMPLETE; + } + return dir; +} + static struct ref_entry *create_ref_entry(const char *refname, const unsigned char *sha1, int flag, int check_name) @@ -195,7 +260,7 @@ static void clear_ref_dir(struct ref_dir *dir); static void free_ref_entry(struct ref_entry *entry) { if (entry->flag & REF_DIR) - clear_ref_dir(&entry->u.subdir); + clear_ref_dir(get_ref_dir(entry)); free(entry); } @@ -228,13 +293,15 @@ static void clear_ref_dir(struct ref_dir *dir) * dirname is the name of the directory with a trailing slash (e.g., * "refs/heads/") or "" for the top-level directory. */ -static struct ref_entry *create_dir_entry(const char *dirname) +static struct ref_entry *create_dir_entry(struct ref_cache *ref_cache, + const char *dirname, int incomplete) { struct ref_entry *direntry; int len = strlen(dirname); direntry = xcalloc(1, sizeof(struct ref_entry) + len + 1); memcpy(direntry->name, dirname, len + 1); - direntry->flag = REF_DIR; + direntry->u.subdir.ref_cache = ref_cache; + direntry->flag = REF_DIR | (incomplete ? REF_INCOMPLETE : 0); return direntry; } @@ -250,7 +317,7 @@ static void sort_ref_dir(struct ref_dir *dir); /* * 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. + * such entry is found. dir must already be complete. */ static struct ref_entry *search_ref_dir(struct ref_dir *dir, const char *refname) { @@ -277,38 +344,60 @@ static struct ref_entry *search_ref_dir(struct ref_dir *dir, const char *refname } /* + * Search for a directory entry directly within dir (without + * recursing). Sort dir if necessary. subdirname must be a directory + * name (i.e., end in '/'). If mkdir is set, then create the + * directory if it is missing; otherwise, return NULL if the desired + * directory cannot be found. dir must already be complete. + */ +static struct ref_dir *search_for_subdir(struct ref_dir *dir, + const char *subdirname, int mkdir) +{ + struct ref_entry *entry = search_ref_dir(dir, subdirname); + if (!entry) { + if (!mkdir) + return NULL; + /* + * Since dir is complete, the absence of a subdir + * means that the subdir really doesn't exist; + * therefore, create an empty record for it but mark + * the record complete. + */ + entry = create_dir_entry(dir->ref_cache, subdirname, 0); + add_entry_to_dir(dir, entry); + } + return get_ref_dir(entry); +} + +/* * If refname is a reference name, find the ref_dir within the dir * tree that should hold refname. If refname is a directory name * (i.e., ends in '/'), then return that ref_dir itself. dir must - * represent the top-level directory. Sort ref_dirs and recurse into - * subdirectories as necessary. If mkdir is set, then create any - * missing directories; otherwise, return NULL if the desired - * directory cannot be found. + * represent the top-level directory and must already be complete. + * Sort ref_dirs and recurse into subdirectories as necessary. If + * mkdir is set, then create any missing directories; otherwise, + * return NULL if the desired directory cannot be found. */ static struct ref_dir *find_containing_dir(struct ref_dir *dir, const char *refname, int mkdir) { - char *refname_copy = xstrdup(refname); - char *slash; - struct ref_entry *entry; - for (slash = strchr(refname_copy, '/'); slash; slash = strchr(slash + 1, '/')) { - char tmp = slash[1]; - slash[1] = '\0'; - entry = search_ref_dir(dir, refname_copy); - if (!entry) { - if (!mkdir) { - dir = NULL; - break; - } - entry = create_dir_entry(refname_copy); - add_entry_to_dir(dir, entry); + struct strbuf dirname; + const char *slash; + strbuf_init(&dirname, PATH_MAX); + for (slash = strchr(refname, '/'); slash; slash = strchr(slash + 1, '/')) { + struct ref_dir *subdir; + strbuf_add(&dirname, + refname + dirname.len, + (slash + 1) - (refname + dirname.len)); + subdir = search_for_subdir(dir, dirname.buf, mkdir); + if (!subdir) { + dir = NULL; + break; } - slash[1] = tmp; - assert(entry->flag & REF_DIR); - dir = &entry->u.subdir; + dir = subdir; } - free(refname_copy); + strbuf_release(&dirname); return dir; } @@ -434,8 +523,9 @@ static int do_for_each_ref_in_dir(struct ref_dir *dir, int offset, struct ref_entry *entry = dir->entries[i]; int retval; if (entry->flag & REF_DIR) { - sort_ref_dir(&entry->u.subdir); - retval = do_for_each_ref_in_dir(&entry->u.subdir, 0, + 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); } else { retval = do_one_ref(base, fn, trim, flags, cb_data, entry); @@ -480,10 +570,12 @@ static int do_for_each_ref_in_dirs(struct ref_dir *dir1, if (cmp == 0) { if ((e1->flag & REF_DIR) && (e2->flag & REF_DIR)) { /* Both are directories; descend them in parallel. */ - sort_ref_dir(&e1->u.subdir); - sort_ref_dir(&e2->u.subdir); + struct ref_dir *subdir1 = get_ref_dir(e1); + struct ref_dir *subdir2 = get_ref_dir(e2); + sort_ref_dir(subdir1); + sort_ref_dir(subdir2); retval = do_for_each_ref_in_dirs( - &e1->u.subdir, &e2->u.subdir, + subdir1, subdir2, base, fn, trim, flags, cb_data); i1++; i2++; @@ -506,9 +598,10 @@ static int do_for_each_ref_in_dirs(struct ref_dir *dir1, i2++; } if (e->flag & REF_DIR) { - sort_ref_dir(&e->u.subdir); + struct ref_dir *subdir = get_ref_dir(e); + sort_ref_dir(subdir); retval = do_for_each_ref_in_dir( - &e->u.subdir, 0, + subdir, 0, base, fn, trim, flags, cb_data); } else { retval = do_one_ref(base, fn, trim, flags, cb_data, e); @@ -592,26 +685,26 @@ static int is_refname_available(const char *refname, const char *oldrefname, */ static struct ref_cache { struct ref_cache *next; - char did_loose; - char did_packed; - struct ref_dir loose; - struct ref_dir packed; + struct ref_entry *loose; + struct ref_entry *packed; /* The submodule name, or "" for the main repo. */ char name[FLEX_ARRAY]; } *ref_cache; static void clear_packed_ref_cache(struct ref_cache *refs) { - if (refs->did_packed) - clear_ref_dir(&refs->packed); - refs->did_packed = 0; + if (refs->packed) { + free_ref_entry(refs->packed); + refs->packed = NULL; + } } static void clear_loose_ref_cache(struct ref_cache *refs) { - if (refs->did_loose) - clear_ref_dir(&refs->loose); - refs->did_loose = 0; + if (refs->loose) { + free_ref_entry(refs->loose); + refs->loose = NULL; + } } static struct ref_cache *create_ref_cache(const char *submodule) @@ -725,22 +818,22 @@ static void read_packed_refs(FILE *f, struct ref_dir *dir) static struct ref_dir *get_packed_refs(struct ref_cache *refs) { - if (!refs->did_packed) { + if (!refs->packed) { const char *packed_refs_file; FILE *f; + refs->packed = create_dir_entry(refs, "", 0); if (*refs->name) packed_refs_file = git_path_submodule(refs->name, "packed-refs"); else packed_refs_file = git_path("packed-refs"); f = fopen(packed_refs_file, "r"); if (f) { - read_packed_refs(f, &refs->packed); + read_packed_refs(f, get_ref_dir(refs->packed)); fclose(f); } - refs->did_packed = 1; } - return &refs->packed; + return get_ref_dir(refs->packed); } void add_packed_ref(const char *refname, const unsigned char *sha1) @@ -749,76 +842,89 @@ void add_packed_ref(const char *refname, const unsigned char *sha1) create_ref_entry(refname, sha1, REF_ISPACKED, 1)); } -static void get_ref_dir(struct ref_cache *refs, const char *base, - struct ref_dir *dir) +/* + * Read the loose references from the namespace dirname into dir + * (without recursing). dirname must end with '/'. dir must be the + * directory entry corresponding to dirname. + */ +static void read_loose_refs(const char *dirname, struct ref_dir *dir) { + struct ref_cache *refs = dir->ref_cache; DIR *d; const char *path; + struct dirent *de; + int dirnamelen = strlen(dirname); + struct strbuf refname; if (*refs->name) - path = git_path_submodule(refs->name, "%s", base); + path = git_path_submodule(refs->name, "%s", dirname); else - path = git_path("%s", base); + path = git_path("%s", dirname); d = opendir(path); - if (d) { - struct dirent *de; - int baselen = strlen(base); - char *refname = xmalloc(baselen + 257); - - memcpy(refname, base, baselen); - if (baselen && base[baselen-1] != '/') - refname[baselen++] = '/'; - - while ((de = readdir(d)) != NULL) { - unsigned char sha1[20]; - struct stat st; - int flag; - int namelen; - const char *refdir; - - if (de->d_name[0] == '.') - continue; - namelen = strlen(de->d_name); - if (namelen > 255) - continue; - if (has_extension(de->d_name, ".lock")) - continue; - memcpy(refname + baselen, de->d_name, namelen+1); - refdir = *refs->name - ? git_path_submodule(refs->name, "%s", refname) - : git_path("%s", refname); - if (stat(refdir, &st) < 0) - continue; - if (S_ISDIR(st.st_mode)) { - get_ref_dir(refs, refname, dir); - continue; - } + if (!d) + return; + + strbuf_init(&refname, dirnamelen + 257); + strbuf_add(&refname, dirname, dirnamelen); + + while ((de = readdir(d)) != NULL) { + unsigned char sha1[20]; + struct stat st; + int flag; + const char *refdir; + + if (de->d_name[0] == '.') + continue; + if (has_extension(de->d_name, ".lock")) + continue; + strbuf_addstr(&refname, de->d_name); + refdir = *refs->name + ? git_path_submodule(refs->name, "%s", refname.buf) + : git_path("%s", refname.buf); + if (stat(refdir, &st) < 0) { + ; /* silently ignore */ + } else if (S_ISDIR(st.st_mode)) { + strbuf_addch(&refname, '/'); + add_entry_to_dir(dir, + create_dir_entry(refs, refname.buf, 1)); + } else { if (*refs->name) { hashclr(sha1); flag = 0; - if (resolve_gitlink_ref(refs->name, refname, sha1) < 0) { + if (resolve_gitlink_ref(refs->name, refname.buf, sha1) < 0) { hashclr(sha1); flag |= REF_ISBROKEN; } - } else if (read_ref_full(refname, sha1, 1, &flag)) { + } else if (read_ref_full(refname.buf, sha1, 1, &flag)) { hashclr(sha1); flag |= REF_ISBROKEN; } - add_ref(dir, create_ref_entry(refname, sha1, flag, 1)); + add_entry_to_dir(dir, + create_ref_entry(refname.buf, sha1, flag, 1)); } - free(refname); - closedir(d); + strbuf_setlen(&refname, dirnamelen); } + strbuf_release(&refname); + closedir(d); } static struct ref_dir *get_loose_refs(struct ref_cache *refs) { - if (!refs->did_loose) { - get_ref_dir(refs, "refs", &refs->loose); - refs->did_loose = 1; + if (!refs->loose) { + /* + * Mark the top-level directory complete because we + * are about to read the only subdirectory that can + * hold references: + */ + refs->loose = create_dir_entry(refs, "", 0); + /* + * Create an incomplete entry for "refs/": + */ + add_entry_to_dir(get_ref_dir(refs->loose), + create_dir_entry(refs, "refs/", 1)); } - return &refs->loose; + return get_ref_dir(refs->loose); } /* We allow "recursive" symbolic refs. Only within reason, though */ @@ -2224,57 +2330,59 @@ int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_dat return for_each_recent_reflog_ent(refname, fn, 0, cb_data); } -static int do_for_each_reflog(const char *base, each_ref_fn fn, void *cb_data) +/* + * Call fn for each reflog in the namespace indicated by name. name + * must be empty or end with '/'. Name will be used as a scratch + * space, but its contents will be restored before return. + */ +static int do_for_each_reflog(struct strbuf *name, each_ref_fn fn, void *cb_data) { - DIR *d = opendir(git_path("logs/%s", base)); + DIR *d = opendir(git_path("logs/%s", name->buf)); int retval = 0; + struct dirent *de; + int oldlen = name->len; - if (d) { - struct dirent *de; - int baselen = strlen(base); - char *log = xmalloc(baselen + 257); + if (!d) + return name->len ? errno : 0; - memcpy(log, base, baselen); - if (baselen && base[baselen-1] != '/') - log[baselen++] = '/'; - - while ((de = readdir(d)) != NULL) { - struct stat st; - int namelen; + while ((de = readdir(d)) != NULL) { + struct stat st; - if (de->d_name[0] == '.') - continue; - namelen = strlen(de->d_name); - if (namelen > 255) - continue; - if (has_extension(de->d_name, ".lock")) - continue; - memcpy(log + baselen, de->d_name, namelen+1); - if (stat(git_path("logs/%s", log), &st) < 0) - continue; + if (de->d_name[0] == '.') + continue; + if (has_extension(de->d_name, ".lock")) + continue; + strbuf_addstr(name, de->d_name); + if (stat(git_path("logs/%s", name->buf), &st) < 0) { + ; /* silently ignore */ + } else { if (S_ISDIR(st.st_mode)) { - retval = do_for_each_reflog(log, fn, cb_data); + strbuf_addch(name, '/'); + retval = do_for_each_reflog(name, fn, cb_data); } else { unsigned char sha1[20]; - if (read_ref_full(log, sha1, 0, NULL)) - retval = error("bad ref for %s", log); + if (read_ref_full(name->buf, sha1, 0, NULL)) + retval = error("bad ref for %s", name->buf); else - retval = fn(log, sha1, 0, cb_data); + retval = fn(name->buf, sha1, 0, cb_data); } if (retval) break; } - free(log); - closedir(d); + strbuf_setlen(name, oldlen); } - else if (*base) - return errno; + closedir(d); return retval; } int for_each_reflog(each_ref_fn fn, void *cb_data) { - return do_for_each_reflog("", fn, cb_data); + int retval; + struct strbuf name; + strbuf_init(&name, PATH_MAX); + retval = do_for_each_reflog(&name, fn, cb_data); + strbuf_release(&name); + return retval; } int update_ref(const char *action, const char *refname, diff --git a/streaming.c b/streaming.c index 7e7ee2be6f..3a3cd1206a 100644 --- a/streaming.c +++ b/streaming.c @@ -99,7 +99,7 @@ int close_istream(struct git_istream *st) return r; } -ssize_t read_istream(struct git_istream *st, char *buf, size_t sz) +ssize_t read_istream(struct git_istream *st, void *buf, size_t sz) { return st->vtbl->read(st, buf, sz); } diff --git a/streaming.h b/streaming.h index 3e827709c8..1d05c2a465 100644 --- a/streaming.h +++ b/streaming.h @@ -10,7 +10,7 @@ struct git_istream; extern struct git_istream *open_istream(const unsigned char *, enum object_type *, unsigned long *, struct stream_filter *); extern int close_istream(struct git_istream *); -extern ssize_t read_istream(struct git_istream *, char *, size_t); +extern ssize_t read_istream(struct git_istream *, void *, size_t); extern int stream_blob_to_fd(int fd, const unsigned char *, struct stream_filter *, int can_seek); diff --git a/t/perf/p5302-pack-index.sh b/t/perf/p5302-pack-index.sh new file mode 100755 index 0000000000..6cb5b0d55b --- /dev/null +++ b/t/perf/p5302-pack-index.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +test_description="Tests index-pack performance" + +. ./perf-lib.sh + +test_perf_large_repo + +test_expect_success 'repack' ' + git repack -ad && + PACK=`ls .git/objects/pack/*.pack | head -n1` && + test -f "$PACK" && + export PACK +' + +test_perf 'index-pack 0 threads' ' + GIT_DIR=t1 git index-pack --threads=1 --stdin < $PACK +' + +test_perf 'index-pack 1 thread ' ' + GIT_DIR=t2 GIT_FORCE_THREADS=1 git index-pack --threads=1 --stdin < $PACK +' + +test_perf 'index-pack 2 threads' ' + GIT_DIR=t3 git index-pack --threads=2 --stdin < $PACK +' + +test_perf 'index-pack 4 threads' ' + GIT_DIR=t4 git index-pack --threads=4 --stdin < $PACK +' + +test_perf 'index-pack 8 threads' ' + GIT_DIR=t5 git index-pack --threads=8 --stdin < $PACK +' + +test_perf 'index-pack default number of threads' ' + GIT_DIR=t6 git index-pack --stdin < $PACK +' + +test_done diff --git a/t/t1050-large.sh b/t/t1050-large.sh index 4d127f19b7..55ed955cef 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -134,4 +134,16 @@ test_expect_success 'repack' ' git repack -ad ' +test_expect_success 'tar achiving' ' + git archive --format=tar HEAD >/dev/null +' + +test_expect_success 'zip achiving, store only' ' + git archive --format=zip -0 HEAD >/dev/null +' + +test_expect_success 'zip achiving, deflate' ' + git archive --format=zip HEAD >/dev/null +' + test_done diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh index caa687b5b4..9a105fe21f 100755 --- a/t/t1411-reflog-show.sh +++ b/t/t1411-reflog-show.sh @@ -65,20 +65,73 @@ test_expect_success 'using @{now} syntax shows reflog date (oneline)' ' ' cat >expect <<'EOF' -Reflog: HEAD@{1112911993 -0700} (C O Mitter <committer@example.com>) +HEAD@{Thu Apr 7 15:13:13 2005 -0700} +EOF +test_expect_success 'using @{now} syntax shows reflog date (format=%gd)' ' + git log -g -1 --format=%gd HEAD@{now} >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +Reflog: HEAD@{Thu Apr 7 15:13:13 2005 -0700} (C O Mitter <committer@example.com>) Reflog message: commit (initial): one EOF test_expect_success 'using --date= shows reflog date (multiline)' ' - git log -g -1 --date=raw >tmp && + git log -g -1 --date=default >tmp && grep ^Reflog <tmp >actual && test_cmp expect actual ' cat >expect <<'EOF' -e46513e HEAD@{1112911993 -0700}: commit (initial): one +e46513e HEAD@{Thu Apr 7 15:13:13 2005 -0700}: commit (initial): one EOF test_expect_success 'using --date= shows reflog date (oneline)' ' - git log -g -1 --oneline --date=raw >actual && + git log -g -1 --oneline --date=default >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +HEAD@{1112911993 -0700} +EOF +test_expect_success 'using --date= shows reflog date (format=%gd)' ' + git log -g -1 --format=%gd --date=raw >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +Reflog: HEAD@{0} (C O Mitter <committer@example.com>) +Reflog message: commit (initial): one +EOF +test_expect_success 'log.date does not invoke "--date" magic (multiline)' ' + test_config log.date raw && + git log -g -1 >tmp && + grep ^Reflog <tmp >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +e46513e HEAD@{0}: commit (initial): one +EOF +test_expect_success 'log.date does not invoke "--date" magic (oneline)' ' + test_config log.date raw && + git log -g -1 --oneline >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +HEAD@{0} +EOF +test_expect_success 'log.date does not invoke "--date" magic (format=%gd)' ' + test_config log.date raw && + git log -g -1 --format=%gd >actual && + test_cmp expect actual +' + +cat >expect <<'EOF' +HEAD@{0} +EOF +test_expect_success '--date magic does not override explicit @{0} syntax' ' + git log -g -1 --format=%gd --date=raw HEAD@{0} >actual && test_cmp expect actual ' diff --git a/t/t2015-checkout-unborn.sh b/t/t2015-checkout-unborn.sh index 6352b74e2e..37bdcedcc9 100755 --- a/t/t2015-checkout-unborn.sh +++ b/t/t2015-checkout-unborn.sh @@ -46,4 +46,15 @@ test_expect_success 'checking out another branch from unborn state' ' test_cmp expect actual ' +test_expect_success 'checking out in a newly created repo' ' + test_create_repo empty && + ( + cd empty && + git symbolic-ref HEAD >expect && + test_must_fail git checkout && + git symbolic-ref HEAD >actual && + test_cmp expect actual + ) +' + test_done diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh index b37ce25c42..81005373d7 100755 --- a/t/t2020-checkout-detach.sh +++ b/t/t2020-checkout-detach.sh @@ -11,14 +11,13 @@ check_not_detached () { git symbolic-ref -q HEAD >/dev/null } -ORPHAN_WARNING='you are leaving .* commit.*behind' PREV_HEAD_DESC='Previous HEAD position was' check_orphan_warning() { - test_i18ngrep "$ORPHAN_WARNING" "$1" && + test_i18ngrep "you are leaving $2 behind" "$1" && test_i18ngrep ! "$PREV_HEAD_DESC" "$1" } check_no_orphan_warning() { - test_i18ngrep ! "$ORPHAN_WARNING" "$1" && + test_i18ngrep ! "you are leaving .* commit.*behind" "$1" && test_i18ngrep "$PREV_HEAD_DESC" "$1" } @@ -110,12 +109,24 @@ test_expect_success 'checkout warns on orphan commits' ' git checkout --detach two && echo content >orphan && git add orphan && - git commit -a -m orphan && + git commit -a -m orphan1 && + echo new content >orphan && + git commit -a -m orphan2 && + orphan2=$(git rev-parse HEAD) && git checkout master 2>stderr ' test_expect_success 'checkout warns on orphan commits: output' ' - check_orphan_warning stderr + check_orphan_warning stderr "2 commits" +' + +test_expect_success 'checkout warns orphaning 1 of 2 commits' ' + git checkout "$orphan2" && + git checkout HEAD^ 2>stderr +' + +test_expect_success 'checkout warns orphaning 1 of 2 commits: output' ' + check_orphan_warning stderr "1 commit" ' test_expect_success 'checkout does not warn leaving ref tip' ' diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 527c9e7548..ecf00edab2 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -31,6 +31,26 @@ GUNZIP=${GUNZIP:-gzip -d} SUBSTFORMAT=%H%n +check_zip() { + zipfile=$1.zip + listfile=$1.lst + dir=$1 + dir_with_prefix=$dir/$2 + + test_expect_success UNZIP " extract ZIP archive" " + (mkdir $dir && cd $dir && $UNZIP ../$zipfile) + " + + test_expect_success UNZIP " validate filenames" " + (cd ${dir_with_prefix}a && find .) | sort >$listfile && + test_cmp a.lst $listfile + " + + test_expect_success UNZIP " validate file contents" " + diff -r a ${dir_with_prefix}a + " +} + test_expect_success \ 'populate workdir' \ 'mkdir a b c && @@ -84,6 +104,12 @@ test_expect_success \ 'git archive vs. git tar-tree' \ 'test_cmp b.tar b2.tar' +test_expect_success 'git archive on large files' ' + test_config core.bigfilethreshold 1 && + git archive HEAD >b3.tar && + test_cmp b.tar b3.tar +' + test_expect_success \ 'git archive in a bare repo' \ '(cd bare.git && git archive HEAD) >b3.tar' @@ -175,10 +201,19 @@ test_expect_success \ test_cmp a/substfile2 g/prefix/a/substfile2 ' +$UNZIP -v >/dev/null 2>&1 +if [ $? -eq 127 ]; then + say "Skipping ZIP tests, because unzip was not found" +else + test_set_prereq UNZIP +fi + test_expect_success \ 'git archive --format=zip' \ 'git archive --format=zip HEAD >d.zip' +check_zip d + test_expect_success \ 'git archive --format=zip in a bare repo' \ '(cd bare.git && git archive --format=zip HEAD) >d1.zip' @@ -201,42 +236,25 @@ test_expect_success 'git archive with --output, override inferred format' ' test_cmp b.tar d4.zip ' -$UNZIP -v >/dev/null 2>&1 -if [ $? -eq 127 ]; then - say "Skipping ZIP tests, because unzip was not found" -else - test_set_prereq UNZIP -fi - -test_expect_success UNZIP \ - 'extract ZIP archive' \ - '(mkdir d && cd d && $UNZIP ../d.zip)' - -test_expect_success UNZIP \ - 'validate filenames' \ - '(cd d/a && find .) | sort >d.lst && - test_cmp a.lst d.lst' - -test_expect_success UNZIP \ - 'validate file contents' \ - 'diff -r a d/a' - test_expect_success \ 'git archive --format=zip with prefix' \ 'git archive --format=zip --prefix=prefix/ HEAD >e.zip' -test_expect_success UNZIP \ - 'extract ZIP archive with prefix' \ - '(mkdir e && cd e && $UNZIP ../e.zip)' +check_zip e prefix/ -test_expect_success UNZIP \ - 'validate filenames with prefix' \ - '(cd e/prefix/a && find .) | sort >e.lst && - test_cmp a.lst e.lst' +test_expect_success 'git archive -0 --format=zip on large files' ' + test_config core.bigfilethreshold 1 && + git archive -0 --format=zip HEAD >large.zip +' -test_expect_success UNZIP \ - 'validate file contents with prefix' \ - 'diff -r a e/prefix/a' +check_zip large + +test_expect_success 'git archive --format=zip on large files' ' + test_config core.bigfilethreshold 1 && + git archive --format=zip HEAD >large-compressed.zip +' + +check_zip large-compressed test_expect_success \ 'git archive --list outside of a git repo' \ diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 8f5cfac331..28e184829c 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -295,6 +295,15 @@ test_expect_success 'status -s -b' ' ' +test_expect_success 'status -s -z -b' ' + tr "\\n" Q <expect >expect.q && + mv expect.q expect && + git status -s -z -b >output && + nul_to_q <output >output.q && + mv output.q output && + test_cmp expect output +' + test_expect_success 'setup dir3' ' mkdir dir3 && : >dir3/untracked1 && @@ -671,9 +680,14 @@ test_expect_success 'status --porcelain ignores color.status' ' git config --unset color.status git config --unset color.ui -test_expect_success 'status --porcelain ignores -b' ' +test_expect_success 'status --porcelain respects -b' ' git status --porcelain -b >output && + { + echo "## master" && + cat expect + } >tmp && + mv tmp expect && test_cmp expect output ' diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh index fb00ffab24..095238fffe 100755 --- a/t/t9811-git-p4-label-import.sh +++ b/t/t9811-git-p4-label-import.sh @@ -195,6 +195,26 @@ test_expect_success 'tag that cannot be exported' ' ) ' +test_expect_success 'use git config to enable import/export of tags' ' + git p4 clone --verbose --dest="$git" //depot@all && + ( + cd "$git" && + git config git-p4.exportLabels true && + git config git-p4.importLabels true && + git tag CFG_A_GIT_TAG && + git p4 rebase --verbose && + git p4 submit --verbose && + git tag && + git tag | grep TAG_F1_1 + ) && + ( + cd "$cli" && + p4 labels && + p4 labels | grep CFG_A_GIT_TAG + ) +' + + test_expect_success 'kill p4d' ' kill_p4d ' diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 5bda6b6e18..0f09fd6109 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -63,7 +63,7 @@ run_completion () local _cword _words=( $1 ) (( _cword = ${#_words[@]} - 1 )) - _git && print_comp + __git_wrap_git && print_comp } test_completion () diff --git a/wt-status.c b/wt-status.c index eeef17e7b6..dd6d8c4106 100644 --- a/wt-status.c +++ b/wt-status.c @@ -801,7 +801,7 @@ void wt_status_print(struct wt_status *s) } } -static void wt_shortstatus_unmerged(int null_termination, struct string_list_item *it, +static void wt_shortstatus_unmerged(struct string_list_item *it, struct wt_status *s) { struct wt_status_change_data *d = it->util; @@ -817,7 +817,7 @@ static void wt_shortstatus_unmerged(int null_termination, struct string_list_ite case 7: how = "UU"; break; /* both modified */ } color_fprintf(s->fp, color(WT_STATUS_UNMERGED, s), "%s", how); - if (null_termination) { + if (s->null_termination) { fprintf(stdout, " %s%c", it->string, 0); } else { struct strbuf onebuf = STRBUF_INIT; @@ -828,7 +828,7 @@ static void wt_shortstatus_unmerged(int null_termination, struct string_list_ite } } -static void wt_shortstatus_status(int null_termination, struct string_list_item *it, +static void wt_shortstatus_status(struct string_list_item *it, struct wt_status *s) { struct wt_status_change_data *d = it->util; @@ -842,7 +842,7 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item else putchar(' '); putchar(' '); - if (null_termination) { + if (s->null_termination) { fprintf(stdout, "%s%c", it->string, 0); if (d->head_path) fprintf(stdout, "%s%c", d->head_path, 0); @@ -870,10 +870,10 @@ static void wt_shortstatus_status(int null_termination, struct string_list_item } } -static void wt_shortstatus_other(int null_termination, struct string_list_item *it, +static void wt_shortstatus_other(struct string_list_item *it, struct wt_status *s, const char *sign) { - if (null_termination) { + if (s->null_termination) { fprintf(stdout, "%s %s%c", sign, it->string, 0); } else { struct strbuf onebuf = STRBUF_INIT; @@ -913,8 +913,8 @@ static void wt_shortstatus_print_tracking(struct wt_status *s) if (s->is_initial) color_fprintf(s->fp, header_color, _("Initial commit on ")); if (!stat_tracking_info(branch, &num_ours, &num_theirs)) { - color_fprintf_ln(s->fp, branch_color_local, - "%s", branch_name); + color_fprintf(s->fp, branch_color_local, "%s", branch_name); + fputc(s->null_termination ? '\0' : '\n', s->fp); return; } @@ -938,14 +938,15 @@ static void wt_shortstatus_print_tracking(struct wt_status *s) color_fprintf(s->fp, branch_color_remote, "%d", num_theirs); } - color_fprintf_ln(s->fp, header_color, "]"); + color_fprintf(s->fp, header_color, "]"); + fputc(s->null_termination ? '\0' : '\n', s->fp); } -void wt_shortstatus_print(struct wt_status *s, int null_termination, int show_branch) +void wt_shortstatus_print(struct wt_status *s) { int i; - if (show_branch) + if (s->show_branch) wt_shortstatus_print_tracking(s); for (i = 0; i < s->change.nr; i++) { @@ -955,28 +956,28 @@ void wt_shortstatus_print(struct wt_status *s, int null_termination, int show_br it = &(s->change.items[i]); d = it->util; if (d->stagemask) - wt_shortstatus_unmerged(null_termination, it, s); + wt_shortstatus_unmerged(it, s); else - wt_shortstatus_status(null_termination, it, s); + wt_shortstatus_status(it, s); } for (i = 0; i < s->untracked.nr; i++) { struct string_list_item *it; it = &(s->untracked.items[i]); - wt_shortstatus_other(null_termination, it, s, "??"); + wt_shortstatus_other(it, s, "??"); } for (i = 0; i < s->ignored.nr; i++) { struct string_list_item *it; it = &(s->ignored.items[i]); - wt_shortstatus_other(null_termination, it, s, "!!"); + wt_shortstatus_other(it, s, "!!"); } } -void wt_porcelain_print(struct wt_status *s, int null_termination) +void wt_porcelain_print(struct wt_status *s) { s->use_color = 0; s->relative_paths = 0; s->prefix = NULL; - wt_shortstatus_print(s, null_termination, 0); + wt_shortstatus_print(s); } diff --git a/wt-status.h b/wt-status.h index 6dd7207e25..14aa9f7e13 100644 --- a/wt-status.h +++ b/wt-status.h @@ -56,7 +56,9 @@ struct wt_status { enum untracked_status_type show_untracked_files; const char *ignore_submodule_arg; char color_palette[WT_STATUS_MAXSLOT][COLOR_MAXLEN]; - int colopts; + unsigned colopts; + int null_termination; + int show_branch; /* These are computed during processing of the individual sections */ int commitable; @@ -73,8 +75,8 @@ void wt_status_prepare(struct wt_status *s); void wt_status_print(struct wt_status *s); void wt_status_collect(struct wt_status *s); -void wt_shortstatus_print(struct wt_status *s, int null_termination, int show_branch); -void wt_porcelain_print(struct wt_status *s, int null_termination); +void wt_shortstatus_print(struct wt_status *s); +void wt_porcelain_print(struct wt_status *s); void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, ...) ; |