summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Documentation/RelNotes/2.1.1.txt44
-rw-r--r--Documentation/RelNotes/2.2.0.txt204
-rw-r--r--Documentation/config.txt3
-rw-r--r--Documentation/git-credential-cache--daemon.txt6
-rw-r--r--Documentation/git-fast-export.txt61
-rw-r--r--Documentation/git-imap-send.txt10
-rw-r--r--Documentation/git-init.txt85
-rw-r--r--Documentation/git-rebase.txt9
-rw-r--r--Documentation/git-rev-list.txt2
-rw-r--r--Documentation/git-rev-parse.txt1
-rw-r--r--Documentation/git-send-pack.txt13
-rw-r--r--Documentation/git-svn.txt17
-rw-r--r--Documentation/git-update-index.txt2
-rw-r--r--Documentation/git.txt8
-rw-r--r--Documentation/gitattributes.txt4
-rw-r--r--Documentation/pretty-formats.txt14
-rw-r--r--Documentation/rev-list-options.txt13
-rw-r--r--Documentation/technical/api-allocation-growing.txt3
-rw-r--r--Documentation/technical/api-config.txt155
-rw-r--r--Documentation/technical/api-run-command.txt8
-rw-r--r--Documentation/technical/api-strbuf.txt14
-rw-r--r--Documentation/technical/pack-protocol.txt2
-rwxr-xr-xGIT-VERSION-GEN2
-rw-r--r--Makefile215
l---------RelNotes2
-rw-r--r--abspath.c124
-rw-r--r--advice.c3
-rw-r--r--alias.c25
-rw-r--r--archive-tar.c7
-rw-r--r--archive.c12
-rw-r--r--attr.c3
-rw-r--r--bisect.c7
-rw-r--r--branch.c55
-rw-r--r--builtin/add.c3
-rw-r--r--builtin/apply.c145
-rw-r--r--builtin/blame.c5
-rw-r--r--builtin/branch.c37
-rw-r--r--builtin/checkout.c6
-rw-r--r--builtin/clean.c2
-rw-r--r--builtin/clone.c9
-rw-r--r--builtin/commit.c171
-rw-r--r--builtin/config.c34
-rw-r--r--builtin/fast-export.c300
-rw-r--r--builtin/fetch.c10
-rw-r--r--builtin/for-each-ref.c11
-rw-r--r--builtin/fsck.c8
-rw-r--r--builtin/gc.c51
-rw-r--r--builtin/hash-object.c103
-rw-r--r--builtin/help.c3
-rw-r--r--builtin/index-pack.c40
-rw-r--r--builtin/init-db.c32
-rw-r--r--builtin/log.c13
-rw-r--r--builtin/ls-files.c2
-rw-r--r--builtin/mailinfo.c18
-rw-r--r--builtin/mailsplit.c17
-rw-r--r--builtin/merge-tree.c18
-rw-r--r--builtin/merge.c9
-rw-r--r--builtin/mv.c174
-rw-r--r--builtin/notes.c5
-rw-r--r--builtin/pack-objects.c4
-rw-r--r--builtin/prune-packed.c1
-rw-r--r--builtin/receive-pack.c43
-rw-r--r--builtin/remote-ext.c3
-rw-r--r--builtin/repack.c26
-rw-r--r--builtin/replace.c18
-rw-r--r--builtin/rev-parse.c11
-rw-r--r--builtin/rm.c2
-rw-r--r--builtin/send-pack.c27
-rw-r--r--builtin/show-branch.c7
-rw-r--r--builtin/tag.c16
-rw-r--r--builtin/unpack-objects.c14
-rw-r--r--builtin/update-ref.c52
-rw-r--r--builtin/verify-pack.c3
-rw-r--r--bundle.c10
-rw-r--r--cache-tree.c19
-rw-r--r--cache-tree.h1
-rw-r--r--cache.h79
-rw-r--r--column.c8
-rw-r--r--combine-diff.c15
-rw-r--r--commit-slab.h3
-rw-r--r--commit.c46
-rw-r--r--commit.h30
-rw-r--r--compat/mingw.h7
-rw-r--r--config.c445
-rw-r--r--config.mak.uname5
-rw-r--r--connect.c24
-rw-r--r--connected.c3
-rw-r--r--contrib/completion/git-completion.bash4
-rw-r--r--contrib/completion/git-prompt.sh3
-rw-r--r--contrib/subtree/Makefile5
-rw-r--r--contrib/svn-fe/Makefile60
-rw-r--r--convert.c3
-rw-r--r--credential-cache--daemon.c25
-rw-r--r--credential-cache.c3
-rw-r--r--credential.c3
-rw-r--r--daemon.c34
-rw-r--r--date.c27
-rw-r--r--diff.c55
-rw-r--r--diffcore-rename.c6
-rw-r--r--diffcore.h4
-rw-r--r--dir.c12
-rw-r--r--editor.c3
-rw-r--r--exec_cmd.c6
-rw-r--r--fast-import.c137
-rw-r--r--fetch-pack.c38
-rw-r--r--fsck.c133
-rw-r--r--fsck.h4
-rwxr-xr-xgit-bisect.sh4
-rw-r--r--git-compat-util.h33
-rwxr-xr-xgit-pull.sh2
-rwxr-xr-xgit-stash.sh17
-rwxr-xr-xgit-svn.perl65
-rw-r--r--git.c40
-rw-r--r--gpg-interface.c6
-rw-r--r--graph.c34
-rw-r--r--help.c2
-rw-r--r--http-backend.c34
-rw-r--r--http-walker.c15
-rw-r--r--http.c15
-rw-r--r--ident.c28
-rw-r--r--imap-send.c160
-rw-r--r--khash.h12
-rw-r--r--line-log.c2
-rw-r--r--ll-merge.c23
-rw-r--r--lockfile.c10
-rw-r--r--log-tree.c47
-rw-r--r--log-tree.h8
-rw-r--r--merge-recursive.c32
-rw-r--r--object.c13
-rw-r--r--object.h3
-rw-r--r--pack-bitmap-write.c3
-rw-r--r--pack-bitmap.c6
-rw-r--r--pack-objects.c3
-rw-r--r--pack-write.c11
-rw-r--r--pager.c42
-rw-r--r--parse-options.c14
-rw-r--r--path.c10
-rw-r--r--po/TEAMS7
-rw-r--r--po/bg.po5132
-rw-r--r--po/ca.po10951
-rw-r--r--po/de.po2980
-rw-r--r--po/fr.po2871
-rw-r--r--po/git.pot2804
-rw-r--r--po/sv.po2871
-rw-r--r--po/vi.po2853
-rw-r--r--po/zh_CN.po2822
-rw-r--r--pretty.c65
-rw-r--r--prompt.c3
-rw-r--r--reachable.c3
-rw-r--r--read-cache.c41
-rw-r--r--reflog-walk.c2
-rw-r--r--reflog-walk.h2
-rw-r--r--refs.c416
-rw-r--r--refs.h82
-rw-r--r--remote-curl.c13
-rw-r--r--remote-testsvn.c3
-rw-r--r--remote.c89
-rw-r--r--remote.h3
-rw-r--r--rerere.c43
-rw-r--r--rerere.h2
-rw-r--r--revision.c6
-rw-r--r--run-command.c37
-rw-r--r--run-command.h3
-rw-r--r--send-pack.c3
-rw-r--r--sequencer.c26
-rw-r--r--server-info.c123
-rw-r--r--setup.c102
-rw-r--r--sh-i18n--envsubst.c5
-rw-r--r--sha1_file.c6
-rw-r--r--sha1_name.c27
-rw-r--r--shallow.c3
-rw-r--r--strbuf.c53
-rw-r--r--strbuf.h4
-rw-r--r--string-list.c3
-rw-r--r--submodule.c21
-rwxr-xr-xt/t0005-signals.sh22
-rwxr-xr-xt/t0008-ignores.sh2
-rwxr-xr-xt/t0026-eol-config.sh20
-rwxr-xr-xt/t0027-auto-crlf.sh220
-rwxr-xr-xt/t0081-line-buffer.sh2
-rwxr-xr-xt/t0090-cache-tree.sh162
-rwxr-xr-xt/t1020-subdirectory.sh2
-rwxr-xr-xt/t1050-large.sh20
-rwxr-xr-xt/t1300-repo-config.sh17
-rwxr-xr-xt/t1303-wacky-config.sh20
-rwxr-xr-xt/t1308-config-set.sh221
-rwxr-xr-xt/t1402-check-ref-format.sh40
-rwxr-xr-xt/t1450-fsck.sh126
-rwxr-xr-xt/t1502-rev-parse-parseopt.sh4
-rwxr-xr-xt/t1503-rev-parse-verify.sh37
-rwxr-xr-xt/t3201-branch-contains.sh29
-rwxr-xr-xt/t3210-pack-refs.sh38
-rwxr-xr-xt/t3302-notes-index-expensive.sh2
-rwxr-xr-xt/t3419-rebase-patch-id.sh2
-rwxr-xr-xt/t3901-i18n-patch.sh10
-rwxr-xr-xt/t3903-stash.sh42
-rwxr-xr-xt/t4038-diff-combined.sh34
-rwxr-xr-xt/t4055-diff-context.sh2
-rwxr-xr-xt/t4119-apply-config.sh17
-rwxr-xr-xt/t4124-apply-ws-rule.sh11
-rwxr-xr-xt/t4201-shortlog.sh6
-rwxr-xr-xt/t4205-log-pretty-formats.sh26
-rwxr-xr-xt/t4210-log-i18n.sh4
-rwxr-xr-xt/t4212-log-corrupt.sh2
-rwxr-xr-xt/t5004-archive-corner-cases.sh5
-rwxr-xr-xt/t5100-mailinfo.sh18
-rw-r--r--t/t5100/embed-from.expect5
-rw-r--r--t/t5100/embed-from.in13
-rw-r--r--t/t5100/quoted-from.expect3
-rw-r--r--t/t5100/quoted-from.in10
-rwxr-xr-xt/t5302-pack-index.sh19
-rwxr-xr-xt/t5304-prune.sh22
-rwxr-xr-xt/t5311-pack-bitmaps-shallow.sh39
-rwxr-xr-xt/t5401-update-hooks.sh13
-rwxr-xr-xt/t5408-send-pack-stdin.sh92
-rwxr-xr-xt/t5541-http-push-smart.sh15
-rwxr-xr-xt/t5601-clone.sh4
-rwxr-xr-xt/t5704-bundle.sh5
-rwxr-xr-xt/t6031-merge-recursive.sh1
-rwxr-xr-xt/t6038-merge-text-auto.sh54
-rwxr-xr-xt/t7201-co.sh17
-rwxr-xr-xt/t7515-status-symlinks.sh43
-rwxr-xr-xt/t8005-blame-i18n.sh8
-rwxr-xr-xt/t9119-git-svn-info.sh30
-rwxr-xr-xt/t9300-fast-import.sh116
-rwxr-xr-xt/t9351-fast-export-anonymize.sh112
-rwxr-xr-xt/t9809-git-p4-client-view.sh4
-rwxr-xr-xt/t9812-git-p4-wildcards.sh14
-rwxr-xr-xt/t9815-git-p4-submit-fail.sh2
-rw-r--r--t/test-lib.sh5
-rwxr-xr-xtemplates/hooks--pre-push.sample2
-rw-r--r--test-config.c152
-rw-r--r--test-date.c10
-rw-r--r--test-dump-cache-tree.c4
-rw-r--r--test-run-command.c4
-rw-r--r--test-subprocess.c3
-rw-r--r--trace.c9
-rw-r--r--transport-helper.c5
-rw-r--r--transport.c12
-rw-r--r--unix-socket.c14
-rw-r--r--unpack-trees.c31
-rw-r--r--upload-pack.c9
-rw-r--r--utf8.c10
-rw-r--r--walker.c90
-rw-r--r--wrapper.c76
-rw-r--r--write_or_die.c15
-rw-r--r--wt-status.c3
248 files changed, 28478 insertions, 12801 deletions
diff --git a/.gitignore b/.gitignore
index 81e12c0..5bfb234 100644
--- a/.gitignore
+++ b/.gitignore
@@ -178,6 +178,7 @@
/gitweb/static/gitweb.min.*
/test-chmtime
/test-ctype
+/test-config
/test-date
/test-delta
/test-dump-cache-tree
diff --git a/Documentation/RelNotes/2.1.1.txt b/Documentation/RelNotes/2.1.1.txt
new file mode 100644
index 0000000..830fc3c
--- /dev/null
+++ b/Documentation/RelNotes/2.1.1.txt
@@ -0,0 +1,44 @@
+Git v2.1.1 Release Notes
+========================
+
+ * Git 2.0 had a regression where "git fetch" into a shallowly
+ cloned repository from a repository with bitmap object index
+ enabled did not work correctly. This has been corrected.
+
+ * Git 2.0 had a regression which broke (rarely used) "git diff-tree
+ -t". This has been corrected.
+
+ * "git log --pretty/format=" with an empty format string did not
+ mean the more obvious "No output whatsoever" but "Use default
+ format", which was counterintuitive. Now it means "nothing shown
+ for the log message part".
+
+ * "git -c section.var command" and "git -c section.var= command"
+ should pass the configuration differently (the former should be a
+ boolean true, the latter should be an empty string), but they
+ didn't work that way. Now it does.
+
+ * Applying a patch not generated by Git in a subdirectory used to
+ check the whitespace breakage using the attributes for incorrect
+ paths. Also whitespace checks were performed even for paths
+ excluded via "git apply --exclude=<path>" mechanism.
+
+ * "git bundle create" with date-range specification were meant to
+ exclude tags outside the range, but it did not work correctly.
+
+ * "git add x" where x that used to be a directory has become a
+ symbolic link to a directory misbehaved.
+
+ * The prompt script checked $GIT_DIR/ref/stash file to see if there
+ is a stash, which was a no-no.
+
+ * "git checkout -m" did not switch to another branch while carrying
+ the local changes forward when a path was deleted from the index.
+
+ * With sufficiently long refnames, fast-import could have overflown
+ an on-stack buffer.
+
+ * After "pack-refs --prune" packed refs at the top-level, it failed
+ to prune them.
+
+ * "git gc --auto" triggered from "git fetch --quiet" was not quiet.
diff --git a/Documentation/RelNotes/2.2.0.txt b/Documentation/RelNotes/2.2.0.txt
new file mode 100644
index 0000000..438f92e
--- /dev/null
+++ b/Documentation/RelNotes/2.2.0.txt
@@ -0,0 +1,204 @@
+Git v2.2 Release Notes
+======================
+
+Updates since v2.1
+------------------
+
+Ports
+
+ * Building on older MacOS X systems automatically sets
+ the necessary NO_APPLE_COMMON_CRYPTO build-time option.
+
+
+UI, Workflows & Features
+
+ * "git config --edit --global" starts from a skeletal per-user
+ configuration file contents, instead of a total blank, when the
+ user does not already have any. This immediately reduces the
+ need for a later "Have you forgotten setting core.user?" and we
+ can add more to the template as we gain more experience.
+
+ * "git stash list -p" used to be almost always a no-op because each
+ stash entry is represented as a merge commit. It learned to show
+ the difference between the base commit version and the working tree
+ version, which is in line with what "git show" gives.
+
+ * Sometimes users want to report a bug they experience on their
+ repository, but they are not at liberty to share the contents of
+ the repository. "fast-export" was taught an "--anonymize" option
+ to replace blob contents, names of people and paths and log
+ messages with bland and simple strings to help them.
+
+ * "log --date=iso" uses a slight variant of ISO 8601 format that is
+ made more human readable. A new "--date=iso-strict" option gives
+ datetime output that is more strictly conformant.
+
+ * A broken reimplementation of Git could write an invalid index that
+ records both stage #0 and higher stage entries for the same path.
+ We now notice and reject such an index, as there is no sensible
+ fallback (we do not know if the broken tool wanted to resolve and
+ forgot to remove higher stage entries, or if it wanted to unresolve
+ and forgot to remove the stage#0 entry).
+
+ * The "pre-receive" and "post-receive" hooks are no longer required
+ to consume their input fully (not following this requirement used
+ to result in intermittent errors in "git push").
+
+ * The pretty-format specifier "%d", which expanded to " (tagname)"
+ for a tagged commit, gained a cousin "%D" that just gives the
+ "tagname" without frills.
+
+Performance, Internal Implementation, etc.
+
+ * The API to manipulate the "refs" is currently undergoing a revamp
+ to make it more transactional, with the eventual goal to allow
+ all-or-none atomic updates and migrating the storage to something
+ other than the traditional filesystem based one (e.g. databases).
+
+ * We no longer attempt to keep track of individual dependencies to
+ the header files in the build procedure, relying on automated
+ dependency generation support from modern compilers.
+
+ * In tests, we have been using NOT_{MINGW,CYGWIN} test prerequisites
+ long before negated prerequisites e.g. !MINGW were invented.
+ The former has been converted to the latter to avoid confusion.
+
+ * Looking up remotes configuration in a repository with very many
+ remotes defined has been optimized.
+
+ * There are cases where you lock and open to write a file, close it
+ to show the updated contents to external processes, and then have
+ to update the file again while still holding the lock, but the
+ lockfile API lacked support for such an access pattern.
+
+ * The API to allocate the structure to keep track of commit
+ decoration has been updated to make it less cumbersome to use.
+
+ * An in-core caching layer to let us avoid reading the same
+ configuration files number of times has been added. A few commands
+ have been converted to use this subsystem.
+
+ * Various code paths have been cleaned up and simplified by using
+ "strbuf", "starts_with()", and "skip_prefix()" APIs more.
+
+ * A few codepaths that died when large blobs that would not fit in
+ core are involved in their operation have been taught to punt
+ instead, by e.g. marking too large a blob as not to be diffed.
+
+ * A few more code paths in "commit" and "checkout" have been taught
+ to repopulate the cache-tree in the index, to help speed up later
+ "write-tree" (used in "commit") and "diff-index --cached" (used in
+ "status").
+
+ * A common programming mistake to assign the same short option name
+ to two separate options is detected by parse_options() API to help
+ developers.
+
+ * The code path to write out the packed-refs file has been optimized,
+ which especially matters in a repository with a large number of
+ refs.
+
+ * The check to see if a ref $F can be created by making sure no
+ existing ref has $F/ as its prefix has been optimized, which
+ especially matters in a repository with a large number of existing
+ refs.
+
+ * "git fsck" was taught to check contents of tag objects a bit more.
+
+ * "git hash-object" was taught a "--literally" option to help
+ debugging.
+
+
+Also contains various documentation updates and code clean-ups.
+
+
+Fixes since v2.1
+----------------
+
+Unless otherwise noted, all the fixes since v2.1 in the maintenance
+track are contained in this release (see the maintenance releases'
+notes for details).
+
+ * "git log --pretty/format=" with an empty format string did not
+ mean the more obvious "No output whatsoever" but "Use default
+ format", which was counterintuitive.
+
+ * Implementations of "tar" that do not understand an extended pax
+ header would extract the contents of it in a regular file; make
+ sure the permission bits of this file follows the same tar.umask
+ configuration setting.
+
+ * "git -c section.var command" and "git -c section.var= command"
+ should pass the configuration differently (the former should be a
+ boolean true, the latter should be an empty string).
+
+ * Applying a patch not generated by Git in a subdirectory used to
+ check the whitespace breakage using the attributes for incorrect
+ paths. Also whitespace checks were performed even for paths
+ excluded via "git apply --exclude=<path>" mechanism.
+
+ * "git bundle create" with date-range specification were meant to
+ exclude tags outside the range, but it didn't.
+
+ * "git add x" where x that used to be a directory has become a
+ symbolic link to a directory misbehaved.
+
+ * The prompt script checked $GIT_DIR/ref/stash file to see if there
+ is a stash, which was a no-no.
+
+ * Pack-protocol documentation had a minor typo.
+
+ * "git checkout -m" did not switch to another branch while carrying
+ the local changes forward when a path was deleted from the index.
+
+ * With sufficiently long refnames, "git fast-import" could have
+ overflown an on-stack buffer.
+
+ * After "pack-refs --prune" packed refs at the top-level, it failed
+ to prune them.
+
+ * Progress output from "git gc --auto" was visible in "git fetch -q".
+
+ * We used to pass -1000 to poll(2), expecting it to also mean "no
+ timeout", which should be spelled as -1.
+
+ * "git rebase" documentation was unclear that it is required to
+ specify on what <upstream> the rebase is to be done when telling it
+ to first check out <branch>.
+ (merge 95c6826 so/rebase-doc later to maint).
+
+ * "git push" over HTTP transport had an artificial limit on number of
+ refs that can be pushed imposed by the command line length.
+ (merge 26be19b jk/send-pack-many-refspecs later to maint).
+
+ * When receiving an invalid pack stream that records the same object
+ twice, multiple threads got confused due to a race.
+ (merge ab791dd jk/index-pack-threading-races later to maint).
+
+ * An attempt to remove the entire tree in the "git fast-import" input
+ stream caused it to misbehave.
+ (merge 2668d69 mb/fast-import-delete-root later to maint).
+
+ * Reachability check (used in "git prune" and friends) did not add a
+ detached HEAD as a starting point to traverse objects still in use.
+ (merge c40fdd0 mk/reachable-protect-detached-head later to maint).
+
+ * "git config --add section.var val" used to lose existing
+ section.var whose value was an empty string.
+ (merge c1063be ta/config-add-to-empty-or-true-fix later to maint).
+
+ * "git fsck" failed to report that it found corrupt objects via its
+ exit status in some cases.
+ (merge 30d1038 jk/fsck-exit-code-fix later to maint).
+
+ * Use of "--verbose" option used to break "git branch --merged".
+ (merge 12994dd jk/maint-branch-verbose-merged later to maint).
+
+ * Some MUAs mangled a line in a message that begins with "From " to
+ ">From " when writing to a mailbox file and feeding such an input
+ to "git am" used to lose such a line.
+ (merge 85de86a jk/mbox-from-line later to maint).
+
+ * "rev-parse --verify --quiet $name" is meant to quietly exit with a
+ non-zero status when $name is not a valid object name, but still
+ gave error messages in some cases.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c55c22a..3b5b24a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -499,7 +499,8 @@ core.bigFileThreshold::
Files larger than this size are stored deflated, without
attempting delta compression. Storing large files without
delta compression avoids excessive memory usage, at the
- slight expense of increased disk usage.
+ slight expense of increased disk usage. Additionally files
+ larger than this size are always treated as binary.
+
Default is 512 MiB on all platforms. This should be reasonable
for most projects as source code and other text files can still
diff --git a/Documentation/git-credential-cache--daemon.txt b/Documentation/git-credential-cache--daemon.txt
index d15db42..7051c6b 100644
--- a/Documentation/git-credential-cache--daemon.txt
+++ b/Documentation/git-credential-cache--daemon.txt
@@ -8,7 +8,7 @@ git-credential-cache--daemon - Temporarily store user credentials in memory
SYNOPSIS
--------
[verse]
-git credential-cache--daemon <socket>
+git credential-cache--daemon [--debug] <socket>
DESCRIPTION
-----------
@@ -21,6 +21,10 @@ for `git-credential-cache` clients. Clients may store and retrieve
credentials. Each credential is held for a timeout specified by the
client; once no credentials are held, the daemon exits.
+If the `--debug` option is specified, the daemon does not close its
+stderr stream, and may output extra diagnostics to it even after it has
+begun listening for clients.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/Documentation/git-fast-export.txt b/Documentation/git-fast-export.txt
index 221506b..dbe9a46 100644
--- a/Documentation/git-fast-export.txt
+++ b/Documentation/git-fast-export.txt
@@ -105,6 +105,11 @@ marks the same across runs.
in the commit (as opposed to just listing the files which are
different from the commit's first parent).
+--anonymize::
+ Anonymize the contents of the repository while still retaining
+ the shape of the history and stored tree. See the section on
+ `ANONYMIZING` below.
+
--refspec::
Apply the specified refspec to each ref exported. Multiple of them can
be specified.
@@ -141,6 +146,62 @@ referenced by that revision range contains the string
'refs/heads/master'.
+ANONYMIZING
+-----------
+
+If the `--anonymize` option is given, git will attempt to remove all
+identifying information from the repository while still retaining enough
+of the original tree and history patterns to reproduce some bugs. The
+goal is that a git bug which is found on a private repository will
+persist in the anonymized repository, and the latter can be shared with
+git developers to help solve the bug.
+
+With this option, git will replace all refnames, paths, blob contents,
+commit and tag messages, names, and email addresses in the output with
+anonymized data. Two instances of the same string will be replaced
+equivalently (e.g., two commits with the same author will have the same
+anonymized author in the output, but bear no resemblance to the original
+author string). The relationship between commits, branches, and tags is
+retained, as well as the commit timestamps (but the commit messages and
+refnames bear no resemblance to the originals). The relative makeup of
+the tree is retained (e.g., if you have a root tree with 10 files and 3
+trees, so will the output), but their names and the contents of the
+files will be replaced.
+
+If you think you have found a git bug, you can start by exporting an
+anonymized stream of the whole repository:
+
+---------------------------------------------------
+$ git fast-export --anonymize --all >anon-stream
+---------------------------------------------------
+
+Then confirm that the bug persists in a repository created from that
+stream (many bugs will not, as they really do depend on the exact
+repository contents):
+
+---------------------------------------------------
+$ git init anon-repo
+$ cd anon-repo
+$ git fast-import <../anon-stream
+$ ... test your bug ...
+---------------------------------------------------
+
+If the anonymized repository shows the bug, it may be worth sharing
+`anon-stream` along with a regular bug report. Note that the anonymized
+stream compresses very well, so gzipping it is encouraged. If you want
+to examine the stream to see that it does not contain any private data,
+you can peruse it directly before sending. You may also want to try:
+
+---------------------------------------------------
+$ perl -pe 's/\d+/X/g' <anon-stream | sort -u | less
+---------------------------------------------------
+
+which shows all of the unique lines (with numbers converted to "X", to
+collapse "User 0", "User 1", etc into "User X"). This produces a much
+smaller output, and it is usually easy to quickly confirm that there is
+no private data in the stream.
+
+
Limitations
-----------
diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt
index 875d283..7d991d9 100644
--- a/Documentation/git-imap-send.txt
+++ b/Documentation/git-imap-send.txt
@@ -38,18 +38,17 @@ Variables
imap.folder::
The folder to drop the mails into, which is typically the Drafts
folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
- "[Gmail]/Drafts". Required to use imap-send.
+ "[Gmail]/Drafts". Required.
imap.tunnel::
Command used to setup a tunnel to the IMAP server through which
commands will be piped instead of using a direct network connection
- to the server. Required when imap.host is not set to use imap-send.
+ to the server. Required when imap.host is not set.
imap.host::
A URL identifying the server. Use a `imap://` prefix for non-secure
connections and a `imaps://` prefix for secure connections.
- Ignored when imap.tunnel is set, but required to use imap-send
- otherwise.
+ Ignored when imap.tunnel is set, but required otherwise.
imap.user::
The username to use when logging in to the server.
@@ -76,7 +75,8 @@ imap.preformattedHTML::
imap.authMethod::
Specify authenticate method for authentication with IMAP server.
- Current supported method is 'CRAM-MD5' only.
+ Current supported method is 'CRAM-MD5' only. If this is not set
+ then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
Examples
~~~~~~~~
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index afd721e..369f889 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -43,7 +43,7 @@ OPTIONS
-q::
--quiet::
-Only print error and warning messages, all other output will be suppressed.
+Only print error and warning messages; all other output will be suppressed.
--bare::
@@ -57,12 +57,12 @@ DIRECTORY" section below.)
--separate-git-dir=<git dir>::
-Instead of initializing the repository where it is supposed to be,
-place a filesytem-agnostic Git symbolic link there, pointing to the
-specified path, and initialize a Git repository at the path. The
-result is Git repository can be separated from working tree. If this
-is reinitialization, the repository will be moved to the specified
-path.
+Instead of initializing the repository as a directory to either `$GIT_DIR` or
+`./.git/`, create a text file there containing the path to the actual
+repository. This file acts as filesystem-agnostic Git symbolic link to the
+repository.
++
+If this is reinitialization, the repository will be moved to the specified path.
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
@@ -72,60 +72,65 @@ repository. When specified, the config variable "core.sharedRepository" is
set so that files and directories under `$GIT_DIR` are created with the
requested permissions. When not specified, Git will use permissions reported
by umask(2).
-
++
The option can have the following values, defaulting to 'group' if no value
is given:
++
+--
+'umask' (or 'false')::
- - 'umask' (or 'false'): Use permissions reported by umask(2). The default,
- when `--shared` is not specified.
+Use permissions reported by umask(2). The default, when `--shared` is not
+specified.
- - 'group' (or 'true'): Make the repository group-writable, (and g+sx, since
- the git group may be not the primary group of all users).
- This is used to loosen the permissions of an otherwise safe umask(2) value.
- Note that the umask still applies to the other permission bits (e.g. if
- umask is '0022', using 'group' will not remove read privileges from other
- (non-group) users). See '0xxx' for how to exactly specify the repository
- permissions.
+'group' (or 'true')::
- - 'all' (or 'world' or 'everybody'): Same as 'group', but make the repository
- readable by all users.
+Make the repository group-writable, (and g+sx, since the git group may be not
+the primary group of all users). This is used to loosen the permissions of an
+otherwise safe umask(2) value. Note that the umask still applies to the other
+permission bits (e.g. if umask is '0022', using 'group' will not remove read
+privileges from other (non-group) users). See '0xxx' for how to exactly specify
+the repository permissions.
- - '0xxx': '0xxx' is an octal number and each file will have mode '0xxx'.
- '0xxx' will override users' umask(2) value (and not only loosen permissions
- as 'group' and 'all' does). '0640' will create a repository which is
- group-readable, but not group-writable or accessible to others. '0660' will
- create a repo that is readable and writable to the current user and group,
- but inaccessible to others.
+'all' (or 'world' or 'everybody')::
-By default, the configuration flag receive.denyNonFastForwards is enabled
+Same as 'group', but make the repository readable by all users.
+
+'0xxx'::
+
+'0xxx' is an octal number and each file will have mode '0xxx'. '0xxx' will
+override users' umask(2) value (and not only loosen permissions as 'group' and
+'all' does). '0640' will create a repository which is group-readable, but not
+group-writable or accessible to others. '0660' will create a repo that is
+readable and writable to the current user and group, but inaccessible to others.
+--
+
+By default, the configuration flag `receive.denyNonFastForwards` is enabled
in shared repositories, so that you cannot force a non fast-forwarding push
into it.
-If you name a (possibly non-existent) directory at the end of the command
-line, the command is run inside the directory (possibly after creating it).
+If you provide a 'directory', the command is run inside it. If this directory
+does not exist, it will be created.
--
-
TEMPLATE DIRECTORY
------------------
The template directory contains files and directories that will be copied to
the `$GIT_DIR` after it is created.
-The template directory used will (in order):
+The template directory will be one of the following (in order):
- - The argument given with the `--template` option.
+ - the argument given with the `--template` option;
- - The contents of the `$GIT_TEMPLATE_DIR` environment variable.
+ - the contents of the `$GIT_TEMPLATE_DIR` environment variable;
- - The `init.templatedir` configuration variable.
+ - the `init.templatedir` configuration variable; or
- - The default template directory: `/usr/share/git-core/templates`.
+ - the default template directory: `/usr/share/git-core/templates`.
-The default template directory includes some directory structure, some
-suggested "exclude patterns", and copies of sample "hook" files.
-The suggested patterns and hook files are all modifiable and extensible.
+The default template directory includes some directory structure, suggested
+"exclude patterns" (see linkgit:gitignore[5]), and sample hook files (see linkgit:githooks[5]).
EXAMPLES
--------
@@ -136,10 +141,12 @@ Start a new Git repository for an existing code base::
$ cd /path/to/my/codebase
$ git init <1>
$ git add . <2>
+$ git commit <3>
----------------
+
-<1> prepare /path/to/my/codebase/.git directory
-<2> add all existing file to the index
+<1> Create a /path/to/my/codebase/.git directory.
+<2> Add all existing files to the index.
+<3> Record the pristine state as the first commit in the history.
GIT
---
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 2a93c64..4138554 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
- [<upstream>] [<branch>]
+ [<upstream> [<branch>]]
'git rebase' [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
--root [<branch>]
'git rebase' --continue | --skip | --abort | --edit-todo
@@ -316,11 +316,8 @@ which makes little sense.
-f::
--force-rebase::
- Force the rebase even if the current branch is a descendant
- of the commit you are rebasing onto. Normally non-interactive rebase will
- exit with the message "Current branch is up to date" in such a
- situation.
- Incompatible with the --interactive option.
+ Force a rebase even if the current branch is up-to-date and
+ the command without `--force` would return without doing anything.
+
You may find this (or --no-ff with an interactive rebase) helpful after
reverting a topic branch merge, as this option recreates the topic branch with
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index 7a1585d..fd7f8b5 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -45,7 +45,7 @@ SYNOPSIS
[ \--regexp-ignore-case | -i ]
[ \--extended-regexp | -E ]
[ \--fixed-strings | -F ]
- [ \--date=(local|relative|default|iso|rfc|short) ]
+ [ \--date=(local|relative|default|iso|iso-strict|rfc|short) ]
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
[ \--pretty | \--header ]
[ \--bisect ]
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 0b84769..fa4a8c3 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -114,6 +114,7 @@ can be used.
Only meaningful in `--verify` mode. Do not output an error
message if the first argument is not a valid object name;
instead exit with non-zero status silently.
+ SHA-1s for valid object names are printed to stdout on success.
--sq::
Usually the output is made one line per flag and
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index dc3a568..2a0de42 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -35,6 +35,16 @@ OPTIONS
Instead of explicitly specifying which refs to update,
update all heads that locally exist.
+--stdin::
+ Take the list of refs from stdin, one per line. If there
+ are refs specified on the command line in addition to this
+ option, then the refs from stdin are processed after those
+ on the command line.
++
+If '--stateless-rpc' is specified together with this option then
+the list of refs must be in packet format (pkt-line). Each ref must
+be in a separate packet, and the list must end with a flush packet.
+
--dry-run::
Do everything except actually send the updates.
@@ -77,7 +87,8 @@ this flag.
Without '--all' and without any '<ref>', the heads that exist
both on the local side and on the remote side are updated.
-When one or more '<ref>' are specified explicitly, it can be either a
+When one or more '<ref>' are specified explicitly (whether on the
+command line or via `--stdin`), it can be either a
single pattern, or a pair of such pattern separated by a colon
":" (this means that a ref name cannot have a colon in it). A
single pattern '<name>' is just a shorthand for '<name>:<name>'.
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 44c970c..ef8ef1c 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -386,11 +386,13 @@ Any other arguments are passed directly to 'git log'
tree-ish to specify which branch should be searched). When given a
tree-ish, returns the corresponding SVN revision number.
+
+-B;;
--before;;
Don't require an exact match if given an SVN revision, instead find
the commit corresponding to the state of the SVN repository (on the
current branch) at the specified revision.
+
+-A;;
--after;;
Don't require an exact match if given an SVN revision; if there is
not an exact match return the closest match searching forward in the
@@ -608,21 +610,6 @@ config key: svn.authorsfile
Make 'git svn' less verbose. Specify a second time to make it
even less verbose.
---repack[=<n>]::
---repack-flags=<flags>::
- These should help keep disk usage sane for large fetches with
- many revisions.
-+
---repack takes an optional argument for the number of revisions
-to fetch before repacking. This defaults to repacking every
-1000 commits fetched if no argument is specified.
-+
---repack-flags are passed directly to 'git repack'.
-+
-[verse]
-config key: svn.repack
-config key: svn.repackflags
-
-m::
--merge::
-s<strategy>::
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index dfc09d9..82eca6f 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -202,7 +202,7 @@ merging.
To pretend you have a file with mode and sha1 at path, say:
----------------
-$ git update-index --cacheinfo mode sha1 path
+$ git update-index --cacheinfo <mode>,<sha1>,<path>
----------------
'--info-only' is used to register files without placing them in the object
diff --git a/Documentation/git.txt b/Documentation/git.txt
index de7b870..8b2c542 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from the 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
-* link:v2.1.0/git.html[documentation for release 2.1]
+* link:v2.1.1/git.html[documentation for release 2.1.1]
* release notes for
+ link:RelNotes/2.1.1.txt[2.1.1],
link:RelNotes/2.1.0.txt[2.1].
* link:v2.0.4/git.html[documentation for release 2.0.4]
@@ -452,6 +453,11 @@ example the following invocations are equivalent:
given will override values from configuration files.
The <name> is expected in the same format as listed by
'git config' (subkeys separated by dots).
++
+Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
+`foo.bar` to the boolean true value (just like `[foo]bar` would in a
+config file). Including the equals but with an empty value (like `git -c
+foo.bar= ...`) sets `foo.bar` to the empty string.
--exec-path[=<path>]::
Path to wherever your core Git programs are installed.
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 643c1ba..9b45bda 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -440,8 +440,8 @@ Unspecified::
A path to which the `diff` attribute is unspecified
first gets its contents inspected, and if it looks like
- text, it is treated as text. Otherwise it would
- generate `Binary files differ`.
+ text and is smaller than core.bigFileThreshold, it is treated
+ as text. Otherwise it would generate `Binary files differ`.
String::
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 85d6353..eecc39d 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -115,19 +115,22 @@ The placeholders are:
- '%aD': author date, RFC2822 style
- '%ar': author date, relative
- '%at': author date, UNIX timestamp
-- '%ai': author date, ISO 8601 format
+- '%ai': author date, ISO 8601-like format
+- '%aI': author date, strict ISO 8601 format
- '%cn': committer name
- '%cN': committer name (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
- '%ce': committer email
- '%cE': committer email (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
-- '%cd': committer date
+- '%cd': committer date (format respects --date= option)
- '%cD': committer date, RFC2822 style
- '%cr': committer date, relative
- '%ct': committer date, UNIX timestamp
-- '%ci': committer date, ISO 8601 format
+- '%ci': committer date, ISO 8601-like format
+- '%cI': committer date, strict ISO 8601 format
- '%d': ref names, like the --decorate option of linkgit:git-log[1]
+- '%D': ref names without the " (", ")" wrapping.
- '%e': encoding
- '%s': subject
- '%f': sanitized subject line, suitable for a filename
@@ -182,8 +185,9 @@ The placeholders are:
NOTE: Some placeholders may depend on other options given to the
revision traversal engine. For example, the `%g*` reflog options will
insert an empty string unless we are traversing reflog entries (e.g., by
-`git log -g`). The `%d` placeholder will use the "short" decoration
-format if `--decorate` was not already provided on the command line.
+`git log -g`). The `%d` and `%D` placeholders will use the "short"
+decoration format if `--decorate` was not already provided on the command
+line.
If you add a `+` (plus sign) after '%' of a placeholder, a line-feed
is inserted immediately before the expansion if and only if the
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index deb8cca..5d311b8 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -677,7 +677,7 @@ include::pretty-options.txt[]
--relative-date::
Synonym for `--date=relative`.
---date=(relative|local|default|iso|rfc|short|raw)::
+--date=(relative|local|default|iso|iso-strict|rfc|short|raw)::
Only takes effect for dates shown in human-readable format, such
as when using `--pretty`. `log.date` config variable sets a default
value for the log command's `--date` option.
@@ -687,7 +687,16 @@ e.g. ``2 hours ago''.
+
`--date=local` shows timestamps in user's local time zone.
+
-`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
+`--date=iso` (or `--date=iso8601`) shows timestamps in a ISO 8601-like format.
+The differences to the strict ISO 8601 format are:
+
+ - a space instead of the `T` date/time delimiter
+ - a space between time and time zone
+ - no colon between hours and minutes of the time zone
+
++
+`--date=iso-strict` (or `--date=iso8601-strict`) shows timestamps in strict
+ISO 8601 format.
+
`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822
format, often found in email messages.
diff --git a/Documentation/technical/api-allocation-growing.txt b/Documentation/technical/api-allocation-growing.txt
index 542946b..5a59b54 100644
--- a/Documentation/technical/api-allocation-growing.txt
+++ b/Documentation/technical/api-allocation-growing.txt
@@ -34,3 +34,6 @@ item[nr++] = value you like;
------------
You are responsible for updating the `nr` variable.
+
+If you need to specify the number of elements to allocate explicitly
+then use the macro `REALLOC_ARRAY(item, alloc)` instead of `ALLOC_GROW`.
diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt
index edd5018..0d8b99b 100644
--- a/Documentation/technical/api-config.txt
+++ b/Documentation/technical/api-config.txt
@@ -77,6 +77,99 @@ To read a specific file in git-config format, use
`git_config_from_file`. This takes the same callback and data parameters
as `git_config`.
+Querying For Specific Variables
+-------------------------------
+
+For programs wanting to query for specific variables in a non-callback
+manner, the config API provides two functions `git_config_get_value`
+and `git_config_get_value_multi`. They both read values from an internal
+cache generated previously from reading the config files.
+
+`int git_config_get_value(const char *key, const char **value)`::
+
+ Finds the highest-priority value for the configuration variable `key`,
+ stores the pointer to it in `value` and returns 0. When the
+ configuration variable `key` is not found, returns 1 without touching
+ `value`. The caller should not free or modify `value`, as it is owned
+ by the cache.
+
+`const struct string_list *git_config_get_value_multi(const char *key)`::
+
+ Finds and returns the value list, sorted in order of increasing priority
+ for the configuration variable `key`. When the configuration variable
+ `key` is not found, returns NULL. The caller should not free or modify
+ the returned pointer, as it is owned by the cache.
+
+`void git_config_clear(void)`::
+
+ Resets and invalidates the config cache.
+
+The config API also provides type specific API functions which do conversion
+as well as retrieval for the queried variable, including:
+
+`int git_config_get_int(const char *key, int *dest)`::
+
+ Finds and parses the value to an integer for the configuration variable
+ `key`. Dies on error; otherwise, stores the value of the parsed integer in
+ `dest` and returns 0. When the configuration variable `key` is not found,
+ returns 1 without touching `dest`.
+
+`int git_config_get_ulong(const char *key, unsigned long *dest)`::
+
+ Similar to `git_config_get_int` but for unsigned longs.
+
+`int git_config_get_bool(const char *key, int *dest)`::
+
+ Finds and parses the value into a boolean value, for the configuration
+ variable `key` respecting keywords like "true" and "false". Integer
+ values are converted into true/false values (when they are non-zero or
+ zero, respectively). Other values cause a die(). If parsing is successful,
+ stores the value of the parsed result in `dest` and returns 0. When the
+ configuration variable `key` is not found, returns 1 without touching
+ `dest`.
+
+`int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest)`::
+
+ Similar to `git_config_get_bool`, except that integers are copied as-is,
+ and `is_bool` flag is unset.
+
+`int git_config_get_maybe_bool(const char *key, int *dest)`::
+
+ Similar to `git_config_get_bool`, except that it returns -1 on error
+ rather than dying.
+
+`int git_config_get_string_const(const char *key, const char **dest)`::
+
+ Allocates and copies the retrieved string into the `dest` parameter for
+ the configuration variable `key`; if NULL string is given, prints an
+ error message and returns -1. When the configuration variable `key` is
+ not found, returns 1 without touching `dest`.
+
+`int git_config_get_string(const char *key, char **dest)`::
+
+ Similar to `git_config_get_string_const`, except that retrieved value
+ copied into the `dest` parameter is a mutable string.
+
+`int git_config_get_pathname(const char *key, const char **dest)`::
+
+ Similar to `git_config_get_string`, but expands `~` or `~user` into
+ the user's home directory when found at the beginning of the path.
+
+`git_die_config(const char *key, const char *err, ...)`::
+
+ First prints the error message specified by the caller in `err` and then
+ dies printing the line number and the file name of the highest priority
+ value for the configuration variable `key`.
+
+`void git_die_config_linenr(const char *key, const char *filename, int linenr)`::
+
+ Helper function which formats the die error message according to the
+ parameters entered. Used by `git_die_config()`. It can be used by callers
+ handling `git_config_get_value_multi()` to print the correct error message
+ for the desired value.
+
+See test-config.c for usage examples.
+
Value Parsing Helpers
---------------------
@@ -134,6 +227,68 @@ int read_file_with_include(const char *file, config_fn_t fn, void *data)
`git_config` respects includes automatically. The lower-level
`git_config_from_file` does not.
+Custom Configsets
+-----------------
+
+A `config_set` can be used to construct an in-memory cache for
+config-like files that the caller specifies (i.e., files like `.gitmodules`,
+`~/.gitconfig` etc.). For example,
+
+---------------------------------------
+struct config_set gm_config;
+git_configset_init(&gm_config);
+int b;
+/* we add config files to the config_set */
+git_configset_add_file(&gm_config, ".gitmodules");
+git_configset_add_file(&gm_config, ".gitmodules_alt");
+
+if (!git_configset_get_bool(gm_config, "submodule.frotz.ignore", &b)) {
+ /* hack hack hack */
+}
+
+/* when we are done with the configset */
+git_configset_clear(&gm_config);
+----------------------------------------
+
+Configset API provides functions for the above mentioned work flow, including:
+
+`void git_configset_init(struct config_set *cs)`::
+
+ Initializes the config_set `cs`.
+
+`int git_configset_add_file(struct config_set *cs, const char *filename)`::
+
+ Parses the file and adds the variable-value pairs to the `config_set`,
+ dies if there is an error in parsing the file. Returns 0 on success, or
+ -1 if the file does not exist or is inaccessible. The user has to decide
+ if he wants to free the incomplete configset or continue using it when
+ the function returns -1.
+
+`int git_configset_get_value(struct config_set *cs, const char *key, const char **value)`::
+
+ Finds the highest-priority value for the configuration variable `key`
+ and config set `cs`, stores the pointer to it in `value` and returns 0.
+ When the configuration variable `key` is not found, returns 1 without
+ touching `value`. The caller should not free or modify `value`, as it
+ is owned by the cache.
+
+`const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key)`::
+
+ Finds and returns the value list, sorted in order of increasing priority
+ for the configuration variable `key` and config set `cs`. When the
+ configuration variable `key` is not found, returns NULL. The caller
+ should not free or modify the returned pointer, as it is owned by the cache.
+
+`void git_configset_clear(struct config_set *cs)`::
+
+ Clears `config_set` structure, removes all saved variable-value pairs.
+
+In addition to above functions, the `config_set` API provides type specific
+functions in the vein of `git_config_get_int` and family but with an extra
+parameter, pointer to struct `config_set`.
+They all behave similarly to the `git_config_get*()` family described in
+"Querying For Specific Variables" above.
+
Writing Config Files
--------------------
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt
index 69510ae..842b838 100644
--- a/Documentation/technical/api-run-command.txt
+++ b/Documentation/technical/api-run-command.txt
@@ -13,6 +13,10 @@ produces in the caller in order to process it.
Functions
---------
+`child_process_init`
+
+ Initialize a struct child_process variable.
+
`start_command`::
Start a sub-process. Takes a pointer to a `struct child_process`
@@ -96,8 +100,8 @@ command to run in a sub-process.
The caller:
-1. allocates and clears (memset(&chld, 0, sizeof(chld));) a
- struct child_process variable;
+1. allocates and clears (using child_process_init() or
+ CHILD_PROCESS_INIT) a struct child_process variable;
2. initializes the members;
3. calls start_command();
4. processes the data;
diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index f9c06a7..cca6543 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -160,6 +160,10 @@ then they will free() it.
Add a single character to the buffer.
+`strbuf_addchars`::
+
+ Add a character the specified number of times to the buffer.
+
`strbuf_insert`::
Insert data to the given position of the buffer. The remaining contents
@@ -307,6 +311,16 @@ same behaviour as well.
use it unless you need the correct position in the file
descriptor.
+`strbuf_getcwd`::
+
+ Set the buffer to the path of the current working directory.
+
+`strbuf_add_absolute_path`
+
+ Add a path to a buffer, converting a relative path to an
+ absolute one in the process. Symbolic links are not
+ resolved.
+
`stripspace`::
Strip whitespace from a buffer. The second parameter controls if
diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt
index 18dea8d..569c48a 100644
--- a/Documentation/technical/pack-protocol.txt
+++ b/Documentation/technical/pack-protocol.txt
@@ -467,7 +467,7 @@ references.
----
update-request = *shallow command-list [pack-file]
- shallow = PKT-LINE("shallow" SP obj-id)
+ shallow = PKT-LINE("shallow" SP obj-id LF)
command-list = PKT-LINE(command NUL capability-list LF)
*PKT-LINE(command LF)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index a4cdfbf..153d55d 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v2.1.0
+DEF_VER=v2.1.0.GIT
LF='
'
diff --git a/Makefile b/Makefile
index 2320de5..f34a2d4 100644
--- a/Makefile
+++ b/Makefile
@@ -14,11 +14,11 @@ all::
# Define INLINE to a suitable substitute (such as '__inline' or '') if git
# fails to compile with errors about undefined inline functions or similar.
#
-# Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()
+# Define SNPRINTF_RETURNS_BOGUS if you are on a system which snprintf()
# or vsnprintf() return -1 instead of number of characters which would
# have been written to the final string if enough space had been available.
#
-# Define FREAD_READS_DIRECTORIES if your are on a system which succeeds
+# Define FREAD_READS_DIRECTORIES if you are on a system which succeeds
# when attempting to read from an fopen'ed directory.
#
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
@@ -317,9 +317,6 @@ all::
# dependency rules. The default is "auto", which means to use computed header
# dependencies if your compiler is detected to support it.
#
-# Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded
-# dependency rules.
-#
# Define NATIVE_CRLF if your platform uses CRLF for line endings.
#
# Define XDL_FAST_HASH to use an alternative line-hashing method in
@@ -432,7 +429,6 @@ XDIFF_OBJS =
VCSSVN_OBJS =
GENERATED_H =
EXTRA_CPPFLAGS =
-LIB_H =
LIB_OBJS =
PROGRAM_OBJS =
PROGRAMS =
@@ -551,6 +547,7 @@ PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
TEST_PROGRAMS_NEED_X += test-chmtime
TEST_PROGRAMS_NEED_X += test-ctype
+TEST_PROGRAMS_NEED_X += test-config
TEST_PROGRAMS_NEED_X += test-date
TEST_PROGRAMS_NEED_X += test-delta
TEST_PROGRAMS_NEED_X += test-dump-cache-tree
@@ -631,131 +628,11 @@ VCSSVN_LIB = vcs-svn/lib.a
GENERATED_H += common-cmds.h
-LIB_H += advice.h
-LIB_H += archive.h
-LIB_H += argv-array.h
-LIB_H += attr.h
-LIB_H += bisect.h
-LIB_H += blob.h
-LIB_H += branch.h
-LIB_H += builtin.h
-LIB_H += bulk-checkin.h
-LIB_H += bundle.h
-LIB_H += cache-tree.h
-LIB_H += cache.h
-LIB_H += color.h
-LIB_H += column.h
-LIB_H += commit.h
-LIB_H += compat/bswap.h
-LIB_H += compat/mingw.h
-LIB_H += compat/obstack.h
-LIB_H += compat/poll/poll.h
-LIB_H += compat/precompose_utf8.h
-LIB_H += compat/terminal.h
-LIB_H += compat/win32/dirent.h
-LIB_H += compat/win32/pthread.h
-LIB_H += compat/win32/syslog.h
-LIB_H += connected.h
-LIB_H += convert.h
-LIB_H += credential.h
-LIB_H += csum-file.h
-LIB_H += decorate.h
-LIB_H += delta.h
-LIB_H += diff.h
-LIB_H += diffcore.h
-LIB_H += dir.h
-LIB_H += exec_cmd.h
-LIB_H += ewah/ewok.h
-LIB_H += ewah/ewok_rlw.h
-LIB_H += fetch-pack.h
-LIB_H += fmt-merge-msg.h
-LIB_H += fsck.h
-LIB_H += gettext.h
-LIB_H += git-compat-util.h
-LIB_H += gpg-interface.h
-LIB_H += graph.h
-LIB_H += grep.h
-LIB_H += hashmap.h
-LIB_H += help.h
-LIB_H += http.h
-LIB_H += kwset.h
-LIB_H += levenshtein.h
-LIB_H += line-log.h
-LIB_H += line-range.h
-LIB_H += list-objects.h
-LIB_H += ll-merge.h
-LIB_H += log-tree.h
-LIB_H += mailmap.h
-LIB_H += merge-blobs.h
-LIB_H += merge-recursive.h
-LIB_H += mergesort.h
-LIB_H += notes-cache.h
-LIB_H += notes-merge.h
-LIB_H += notes-utils.h
-LIB_H += notes.h
-LIB_H += object.h
-LIB_H += pack-objects.h
-LIB_H += pack-revindex.h
-LIB_H += pack.h
-LIB_H += pack-bitmap.h
-LIB_H += parse-options.h
-LIB_H += patch-ids.h
-LIB_H += pathspec.h
-LIB_H += pkt-line.h
-LIB_H += prio-queue.h
-LIB_H += progress.h
-LIB_H += prompt.h
-LIB_H += quote.h
-LIB_H += reachable.h
-LIB_H += reflog-walk.h
-LIB_H += refs.h
-LIB_H += remote.h
-LIB_H += rerere.h
-LIB_H += resolve-undo.h
-LIB_H += revision.h
-LIB_H += run-command.h
-LIB_H += send-pack.h
-LIB_H += sequencer.h
-LIB_H += sha1-array.h
-LIB_H += sha1-lookup.h
-LIB_H += shortlog.h
-LIB_H += sideband.h
-LIB_H += sigchain.h
-LIB_H += strbuf.h
-LIB_H += streaming.h
-LIB_H += string-list.h
-LIB_H += submodule.h
-LIB_H += tag.h
-LIB_H += tar.h
-LIB_H += thread-utils.h
-LIB_H += transport.h
-LIB_H += tree-walk.h
-LIB_H += tree.h
-LIB_H += unpack-trees.h
-LIB_H += unicode_width.h
-LIB_H += url.h
-LIB_H += urlmatch.h
-LIB_H += userdiff.h
-LIB_H += utf8.h
-LIB_H += varint.h
-LIB_H += vcs-svn/fast_export.h
-LIB_H += vcs-svn/line_buffer.h
-LIB_H += vcs-svn/repo_tree.h
-LIB_H += vcs-svn/sliding_window.h
-LIB_H += vcs-svn/svndiff.h
-LIB_H += vcs-svn/svndump.h
-LIB_H += walker.h
-LIB_H += wildmatch.h
-LIB_H += wt-status.h
-LIB_H += xdiff-interface.h
-LIB_H += xdiff/xdiff.h
-LIB_H += xdiff/xdiffi.h
-LIB_H += xdiff/xemit.h
-LIB_H += xdiff/xinclude.h
-LIB_H += xdiff/xmacros.h
-LIB_H += xdiff/xprepare.h
-LIB_H += xdiff/xtypes.h
-LIB_H += xdiff/xutils.h
+LIB_H = $(shell $(FIND) . \
+ -name .git -prune -o \
+ -name t -prune -o \
+ -name Documentation -prune -o \
+ -name '*.h' -print)
LIB_OBJS += abspath.o
LIB_OBJS += advice.o
@@ -1025,11 +902,6 @@ sysconfdir = etc
endif
endif
-ifdef CHECK_HEADER_DEPENDENCIES
-COMPUTE_HEADER_DEPENDENCIES = no
-USE_COMPUTED_HEADER_DEPENDENCIES =
-endif
-
ifndef COMPUTE_HEADER_DEPENDENCIES
COMPUTE_HEADER_DEPENDENCIES = auto
endif
@@ -1381,7 +1253,6 @@ ifdef NO_INET_PTON
endif
ifndef NO_UNIX_SOCKETS
LIB_OBJS += unix-socket.o
- LIB_H += unix-socket.h
PROGRAM_OBJS += credential-cache.o
PROGRAM_OBJS += credential-cache--daemon.o
endif
@@ -1405,12 +1276,10 @@ endif
ifdef BLK_SHA1
SHA1_HEADER = "block-sha1/sha1.h"
LIB_OBJS += block-sha1/sha1.o
- LIB_H += block-sha1/sha1.h
else
ifdef PPC_SHA1
SHA1_HEADER = "ppc/sha1.h"
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
- LIB_H += ppc/sha1.h
else
ifdef APPLE_COMMON_CRYPTO
COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
@@ -1479,6 +1348,9 @@ ifdef NO_REGEX
COMPAT_CFLAGS += -Icompat/regex
COMPAT_OBJS += compat/regex/regex.o
endif
+ifdef NATIVE_CRLF
+ BASIC_CFLAGS += -DNATIVE_CRLF
+endif
ifdef USE_NED_ALLOCATOR
COMPAT_CFLAGS += -Icompat/nedmalloc
@@ -1659,7 +1531,11 @@ endif
profile:: profile-clean
$(MAKE) PROFILE=GEN all
$(MAKE) PROFILE=GEN -j1 test
- $(MAKE) PROFILE=GEN -j1 perf
+ @if test -n "$$GIT_PERF_REPO" || test -d .git; then \
+ $(MAKE) PROFILE=GEN -j1 perf; \
+ else \
+ echo "Skipping profile of perf tests..."; \
+ fi
$(MAKE) PROFILE=USE all
profile-fast: profile-clean
@@ -1933,29 +1809,13 @@ $(dep_dirs):
missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
dep_file = $(dir $@).depend/$(notdir $@).d
dep_args = -MF $(dep_file) -MQ $@ -MMD -MP
-ifdef CHECK_HEADER_DEPENDENCIES
-$(error cannot compute header dependencies outside a normal build. \
-Please unset CHECK_HEADER_DEPENDENCIES and try again)
-endif
endif
ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes)
-ifndef CHECK_HEADER_DEPENDENCIES
dep_dirs =
missing_dep_dirs =
dep_args =
endif
-endif
-
-ifdef CHECK_HEADER_DEPENDENCIES
-ifndef PRINT_HEADER_DEPENDENCIES
-missing_deps = $(filter-out $(notdir $^), \
- $(notdir $(shell $(MAKE) -s $@ \
- CHECK_HEADER_DEPENDENCIES=YesPlease \
- USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \
- PRINT_HEADER_DEPENDENCIES=YesPlease)))
-endif
-endif
ASM_SRC := $(wildcard $(OBJECTS:o=S))
ASM_OBJ := $(ASM_SRC:S=o)
@@ -1963,45 +1823,10 @@ C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS))
.SUFFIXES:
-ifdef PRINT_HEADER_DEPENDENCIES
-$(C_OBJ): %.o: %.c FORCE
- echo $^
-$(ASM_OBJ): %.o: %.S FORCE
- echo $^
-
-ifndef CHECK_HEADER_DEPENDENCIES
-$(error cannot print header dependencies during a normal build. \
-Please set CHECK_HEADER_DEPENDENCIES and try again)
-endif
-endif
-
-ifndef PRINT_HEADER_DEPENDENCIES
-ifdef CHECK_HEADER_DEPENDENCIES
-$(C_OBJ): %.o: %.c $(dep_files) FORCE
- @set -e; echo CHECK $@; \
- missing_deps="$(missing_deps)"; \
- if test "$$missing_deps"; \
- then \
- echo missing dependencies: $$missing_deps; \
- false; \
- fi
-$(ASM_OBJ): %.o: %.S $(dep_files) FORCE
- @set -e; echo CHECK $@; \
- missing_deps="$(missing_deps)"; \
- if test "$$missing_deps"; \
- then \
- echo missing dependencies: $$missing_deps; \
- false; \
- fi
-endif
-endif
-
-ifndef CHECK_HEADER_DEPENDENCIES
$(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
$(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
-endif
%.s: %.c GIT-CFLAGS FORCE
$(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
@@ -2128,9 +1953,9 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \
XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \
--keyword=gettextln --keyword=eval_gettextln
XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl
-LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
-LOCALIZED_SH := $(SCRIPT_SH)
-LOCALIZED_PERL := $(SCRIPT_PERL)
+LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
+LOCALIZED_SH = $(SCRIPT_SH)
+LOCALIZED_PERL = $(SCRIPT_PERL)
ifdef XGETTEXT_INCLUDE_TESTS
LOCALIZED_C += t/t0200/test.c
@@ -2138,7 +1963,7 @@ LOCALIZED_SH += t/t0200/test.sh
LOCALIZED_PERL += t/t0200/test.perl
endif
-po/git.pot: $(LOCALIZED_C)
+po/git.pot: $(GENERATED_H) FORCE
$(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ $(XGETTEXT_FLAGS_C) $(LOCALIZED_C)
$(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ --join-existing $(XGETTEXT_FLAGS_SH) \
$(LOCALIZED_SH)
diff --git a/RelNotes b/RelNotes
index bf76091..c473b35 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.1.0.txt \ No newline at end of file
+Documentation/RelNotes/2.2.0.txt \ No newline at end of file
diff --git a/abspath.c b/abspath.c
index ca33558..5edb4e7 100644
--- a/abspath.c
+++ b/abspath.c
@@ -33,7 +33,7 @@ int is_directory(const char *path)
*/
static const char *real_path_internal(const char *path, int die_on_error)
{
- static char bufs[2][PATH_MAX + 1], *buf = bufs[0], *next_buf = bufs[1];
+ static struct strbuf sb = STRBUF_INIT;
char *retval = NULL;
/*
@@ -41,16 +41,14 @@ static const char *real_path_internal(const char *path, int die_on_error)
* here so that we can chdir() back to it at the end of the
* function:
*/
- char cwd[1024] = "";
-
- int buf_index = 1;
+ struct strbuf cwd = STRBUF_INIT;
int depth = MAXDEPTH;
char *last_elem = NULL;
struct stat st;
/* We've already done it */
- if (path == buf || path == next_buf)
+ if (path == sb.buf)
return path;
if (!*path) {
@@ -60,41 +58,38 @@ static const char *real_path_internal(const char *path, int die_on_error)
goto error_out;
}
- if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) {
- if (die_on_error)
- die("Too long path: %.*s", 60, path);
- else
- goto error_out;
- }
+ strbuf_reset(&sb);
+ strbuf_addstr(&sb, path);
while (depth--) {
- if (!is_directory(buf)) {
- char *last_slash = find_last_dir_sep(buf);
+ if (!is_directory(sb.buf)) {
+ char *last_slash = find_last_dir_sep(sb.buf);
if (last_slash) {
last_elem = xstrdup(last_slash + 1);
- last_slash[1] = '\0';
+ strbuf_setlen(&sb, last_slash - sb.buf + 1);
} else {
- last_elem = xstrdup(buf);
- *buf = '\0';
+ last_elem = xmemdupz(sb.buf, sb.len);
+ strbuf_reset(&sb);
}
}
- if (*buf) {
- if (!*cwd && !getcwd(cwd, sizeof(cwd))) {
+ if (sb.len) {
+ if (!cwd.len && strbuf_getcwd(&cwd)) {
if (die_on_error)
die_errno("Could not get current working directory");
else
goto error_out;
}
- if (chdir(buf)) {
+ if (chdir(sb.buf)) {
if (die_on_error)
- die_errno("Could not switch to '%s'", buf);
+ die_errno("Could not switch to '%s'",
+ sb.buf);
else
goto error_out;
}
}
- if (!getcwd(buf, PATH_MAX)) {
+ if (strbuf_getcwd(&sb)) {
if (die_on_error)
die_errno("Could not get current working directory");
else
@@ -102,48 +97,35 @@ static const char *real_path_internal(const char *path, int die_on_error)
}
if (last_elem) {
- size_t len = strlen(buf);
- if (len + strlen(last_elem) + 2 > PATH_MAX) {
- if (die_on_error)
- die("Too long path name: '%s/%s'",
- buf, last_elem);
- else
- goto error_out;
- }
- if (len && !is_dir_sep(buf[len - 1]))
- buf[len++] = '/';
- strcpy(buf + len, last_elem);
+ if (sb.len && !is_dir_sep(sb.buf[sb.len - 1]))
+ strbuf_addch(&sb, '/');
+ strbuf_addstr(&sb, last_elem);
free(last_elem);
last_elem = NULL;
}
- if (!lstat(buf, &st) && S_ISLNK(st.st_mode)) {
- ssize_t len = readlink(buf, next_buf, PATH_MAX);
+ if (!lstat(sb.buf, &st) && S_ISLNK(st.st_mode)) {
+ struct strbuf next_sb = STRBUF_INIT;
+ ssize_t len = strbuf_readlink(&next_sb, sb.buf, 0);
if (len < 0) {
if (die_on_error)
- die_errno("Invalid symlink '%s'", buf);
- else
- goto error_out;
- }
- if (PATH_MAX <= len) {
- if (die_on_error)
- die("symbolic link too long: %s", buf);
+ die_errno("Invalid symlink '%s'",
+ sb.buf);
else
goto error_out;
}
- next_buf[len] = '\0';
- buf = next_buf;
- buf_index = 1 - buf_index;
- next_buf = bufs[buf_index];
+ strbuf_swap(&sb, &next_sb);
+ strbuf_release(&next_sb);
} else
break;
}
- retval = buf;
+ retval = sb.buf;
error_out:
free(last_elem);
- if (*cwd && chdir(cwd))
- die_errno("Could not change back to '%s'", cwd);
+ if (cwd.len && chdir(cwd.buf))
+ die_errno("Could not change back to '%s'", cwd.buf);
+ strbuf_release(&cwd);
return retval;
}
@@ -158,54 +140,16 @@ const char *real_path_if_valid(const char *path)
return real_path_internal(path, 0);
}
-static const char *get_pwd_cwd(void)
-{
- static char cwd[PATH_MAX + 1];
- char *pwd;
- struct stat cwd_stat, pwd_stat;
- if (getcwd(cwd, PATH_MAX) == NULL)
- return NULL;
- pwd = getenv("PWD");
- if (pwd && strcmp(pwd, cwd)) {
- stat(cwd, &cwd_stat);
- if ((cwd_stat.st_dev || cwd_stat.st_ino) &&
- !stat(pwd, &pwd_stat) &&
- pwd_stat.st_dev == cwd_stat.st_dev &&
- pwd_stat.st_ino == cwd_stat.st_ino) {
- strlcpy(cwd, pwd, PATH_MAX);
- }
- }
- return cwd;
-}
-
/*
* Use this to get an absolute path from a relative one. If you want
* to resolve links, you should use real_path.
- *
- * If the path is already absolute, then return path. As the user is
- * never meant to free the return value, we're safe.
*/
const char *absolute_path(const char *path)
{
- static char buf[PATH_MAX + 1];
-
- if (!*path) {
- die("The empty string is not a valid path");
- } else if (is_absolute_path(path)) {
- if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
- die("Too long path: %.*s", 60, path);
- } else {
- size_t len;
- const char *fmt;
- const char *cwd = get_pwd_cwd();
- if (!cwd)
- die_errno("Cannot determine the current working directory");
- len = strlen(cwd);
- fmt = (len > 0 && is_dir_sep(cwd[len - 1])) ? "%s%s" : "%s/%s";
- if (snprintf(buf, PATH_MAX, fmt, cwd, path) >= PATH_MAX)
- die("Too long path: %.*s", 60, path);
- }
- return buf;
+ static struct strbuf sb = STRBUF_INIT;
+ strbuf_reset(&sb);
+ strbuf_add_absolute_path(&sb, path);
+ return sb.buf;
}
/*
diff --git a/advice.c b/advice.c
index 9b42033..3b8bf3c 100644
--- a/advice.c
+++ b/advice.c
@@ -86,8 +86,7 @@ int error_resolve_conflict(const char *me)
* other commands doing a merge do.
*/
advise(_("Fix them up in the work tree, and then use 'git add/rm <file>'\n"
- "as appropriate to mark resolution and make a commit, or use\n"
- "'git commit -a'."));
+ "as appropriate to mark resolution and make a commit."));
return -1;
}
diff --git a/alias.c b/alias.c
index 758c867..6aa164a 100644
--- a/alias.c
+++ b/alias.c
@@ -1,26 +1,13 @@
#include "cache.h"
-static const char *alias_key;
-static char *alias_val;
-
-static int alias_lookup_cb(const char *k, const char *v, void *cb)
-{
- const char *name;
- if (skip_prefix(k, "alias.", &name) && !strcmp(name, alias_key)) {
- if (!v)
- return config_error_nonbool(k);
- alias_val = xstrdup(v);
- return 0;
- }
- return 0;
-}
-
char *alias_lookup(const char *alias)
{
- alias_key = alias;
- alias_val = NULL;
- git_config(alias_lookup_cb, NULL);
- return alias_val;
+ char *v = NULL;
+ struct strbuf key = STRBUF_INIT;
+ strbuf_addf(&key, "alias.%s", alias);
+ git_config_get_string(key.buf, &v);
+ strbuf_release(&key);
+ return v;
}
#define SPLIT_CMDLINE_BAD_ENDING 1
diff --git a/archive-tar.c b/archive-tar.c
index 719b629..df2f4c8 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -192,7 +192,7 @@ static int write_extended_header(struct archiver_args *args,
unsigned int mode;
memset(&header, 0, sizeof(header));
*header.typeflag = TYPEFLAG_EXT_HEADER;
- mode = 0100666;
+ mode = 0100666 & ~tar_umask;
sprintf(header.name, "%s.paxheader", sha1_to_hex(sha1));
prepare_header(args, &header, mode, size);
write_blocked(&header, sizeof(header));
@@ -300,7 +300,7 @@ static int write_global_extended_header(struct archiver_args *args)
strbuf_append_ext_header(&ext_header, "comment", sha1_to_hex(sha1), 40);
memset(&header, 0, sizeof(header));
*header.typeflag = TYPEFLAG_GLOBAL_HEADER;
- mode = 0100666;
+ mode = 0100666 & ~tar_umask;
strcpy(header.name, "pax_global_header");
prepare_header(args, &header, mode, ext_header.len);
write_blocked(&header, sizeof(header));
@@ -395,7 +395,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
struct archiver_args *args)
{
struct strbuf cmd = STRBUF_INIT;
- struct child_process filter;
+ struct child_process filter = CHILD_PROCESS_INIT;
const char *argv[2];
int r;
@@ -406,7 +406,6 @@ static int write_tar_filter_archive(const struct archiver *ar,
if (args->compression_level >= 0)
strbuf_addf(&cmd, " -%d", args->compression_level);
- memset(&filter, 0, sizeof(filter));
argv[0] = cmd.buf;
argv[1] = NULL;
filter.argv = argv;
diff --git a/archive.c b/archive.c
index 3fc0fb2..952a659 100644
--- a/archive.c
+++ b/archive.c
@@ -402,14 +402,6 @@ static int parse_archive_args(int argc, const char **argv,
return argc;
}
-static int git_default_archive_config(const char *var, const char *value,
- void *cb)
-{
- if (!strcmp(var, "uploadarchive.allowunreachable"))
- remote_allow_unreachable = git_config_bool(var, value);
- return git_default_config(var, value, cb);
-}
-
int write_archive(int argc, const char **argv, const char *prefix,
int setup_prefix, const char *name_hint, int remote)
{
@@ -420,7 +412,9 @@ int write_archive(int argc, const char **argv, const char *prefix,
if (setup_prefix && prefix == NULL)
prefix = setup_git_directory_gently(&nongit);
- git_config(git_default_archive_config, NULL);
+ git_config_get_bool("uploadarchive.allowunreachable", &remote_allow_unreachable);
+ git_config(git_default_config, NULL);
+
init_tar_archiver();
init_zip_archiver();
diff --git a/attr.c b/attr.c
index 734222d..cd54697 100644
--- a/attr.c
+++ b/attr.c
@@ -97,8 +97,7 @@ static struct git_attr *git_attr_internal(const char *name, int len)
a->attr_nr = attr_nr++;
git_attr_hash[pos] = a;
- check_all_attr = xrealloc(check_all_attr,
- sizeof(*check_all_attr) * attr_nr);
+ REALLOC_ARRAY(check_all_attr, attr_nr);
check_all_attr[a->attr_nr].attr = a;
check_all_attr[a->attr_nr].value = ATTR__UNKNOWN;
return a;
diff --git a/bisect.c b/bisect.c
index d6e851d..df09cbc 100644
--- a/bisect.c
+++ b/bisect.c
@@ -215,11 +215,12 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
}
qsort(array, cnt, sizeof(*array), compare_commit_dist);
for (p = list, i = 0; i < cnt; i++) {
- struct name_decoration *r = xmalloc(sizeof(*r) + 100);
+ char buf[100]; /* enough for dist=%d */
struct object *obj = &(array[i].commit->object);
- sprintf(r->name, "dist=%d", array[i].distance);
- r->next = add_decoration(&name_decoration, obj, r);
+ snprintf(buf, sizeof(buf), "dist=%d", array[i].distance);
+ add_name_decoration(DECORATION_NONE, buf, obj);
+
p->item = array[i].commit;
p = p->next;
}
diff --git a/branch.c b/branch.c
index 46e8aa8..9a2228e 100644
--- a/branch.c
+++ b/branch.c
@@ -140,33 +140,17 @@ static int setup_tracking(const char *new_ref, const char *orig_ref,
return 0;
}
-struct branch_desc_cb {
- const char *config_name;
- const char *value;
-};
-
-static int read_branch_desc_cb(const char *var, const char *value, void *cb)
-{
- struct branch_desc_cb *desc = cb;
- if (strcmp(desc->config_name, var))
- return 0;
- free((char *)desc->value);
- return git_config_string(&desc->value, var, value);
-}
-
int read_branch_desc(struct strbuf *buf, const char *branch_name)
{
- struct branch_desc_cb cb;
+ char *v = NULL;
struct strbuf name = STRBUF_INIT;
strbuf_addf(&name, "branch.%s.description", branch_name);
- cb.config_name = name.buf;
- cb.value = NULL;
- if (git_config(read_branch_desc_cb, &cb) < 0) {
+ if (git_config_get_string(name.buf, &v)) {
strbuf_release(&name);
return -1;
}
- if (cb.value)
- strbuf_addstr(buf, cb.value);
+ strbuf_addstr(buf, v);
+ free(v);
strbuf_release(&name);
return 0;
}
@@ -226,7 +210,6 @@ void create_branch(const char *head,
int force, int reflog, int clobber_head,
int quiet, enum branch_track track)
{
- struct ref_lock *lock = NULL;
struct commit *commit;
unsigned char sha1[20];
char *real_ref, msg[PATH_MAX + 20];
@@ -285,15 +268,6 @@ void create_branch(const char *head,
die(_("Not a valid branch point: '%s'."), start_name);
hashcpy(sha1, commit->object.sha1);
- if (!dont_change_ref) {
- lock = lock_any_ref_for_update(ref.buf, NULL, 0, NULL);
- if (!lock)
- die_errno(_("Failed to lock ref for update"));
- }
-
- if (reflog)
- log_all_ref_updates = 1;
-
if (forcing)
snprintf(msg, sizeof msg, "branch: Reset to %s",
start_name);
@@ -301,13 +275,26 @@ void create_branch(const char *head,
snprintf(msg, sizeof msg, "branch: Created from %s",
start_name);
+ if (reflog)
+ log_all_ref_updates = 1;
+
+ if (!dont_change_ref) {
+ struct ref_transaction *transaction;
+ struct strbuf err = STRBUF_INIT;
+
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, ref.buf, sha1,
+ null_sha1, 0, !forcing, &err) ||
+ ref_transaction_commit(transaction, msg, &err))
+ die("%s", err.buf);
+ ref_transaction_free(transaction);
+ strbuf_release(&err);
+ }
+
if (real_ref && track)
setup_tracking(ref.buf + 11, real_ref, track, quiet);
- if (!dont_change_ref)
- if (write_ref_sha1(lock, sha1, msg) < 0)
- die_errno(_("Failed to write ref"));
-
strbuf_release(&ref);
free(real_ref);
}
diff --git a/builtin/add.c b/builtin/add.c
index 4baf3a5..352b85e 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -180,7 +180,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
char *file = git_pathdup("ADD_EDIT.patch");
const char *apply_argv[] = { "apply", "--recount", "--cached",
NULL, NULL };
- struct child_process child;
+ struct child_process child = CHILD_PROCESS_INIT;
struct rev_info rev;
int out;
struct stat st;
@@ -214,7 +214,6 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
if (!st.st_size)
die(_("Empty patch. Aborted."));
- memset(&child, 0, sizeof(child));
child.git_cmd = 1;
child.argv = apply_argv;
if (run_command(&child))
diff --git a/builtin/apply.c b/builtin/apply.c
index be2b4ce..8714a88 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1920,6 +1920,66 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
return used;
}
+static void prefix_one(char **name)
+{
+ char *old_name = *name;
+ if (!old_name)
+ return;
+ *name = xstrdup(prefix_filename(prefix, prefix_length, *name));
+ free(old_name);
+}
+
+static void prefix_patch(struct patch *p)
+{
+ if (!prefix || p->is_toplevel_relative)
+ return;
+ prefix_one(&p->new_name);
+ prefix_one(&p->old_name);
+}
+
+/*
+ * include/exclude
+ */
+
+static struct string_list limit_by_name;
+static int has_include;
+static void add_name_limit(const char *name, int exclude)
+{
+ struct string_list_item *it;
+
+ it = string_list_append(&limit_by_name, name);
+ it->util = exclude ? NULL : (void *) 1;
+}
+
+static int use_patch(struct patch *p)
+{
+ const char *pathname = p->new_name ? p->new_name : p->old_name;
+ int i;
+
+ /* Paths outside are not touched regardless of "--include" */
+ if (0 < prefix_length) {
+ int pathlen = strlen(pathname);
+ if (pathlen <= prefix_length ||
+ memcmp(prefix, pathname, prefix_length))
+ return 0;
+ }
+
+ /* See if it matches any of exclude/include rule */
+ for (i = 0; i < limit_by_name.nr; i++) {
+ struct string_list_item *it = &limit_by_name.items[i];
+ if (!wildmatch(it->string, pathname, 0, NULL))
+ return (it->util != NULL);
+ }
+
+ /*
+ * If we had any include, a path that does not match any rule is
+ * not used. Otherwise, we saw bunch of exclude rules (or none)
+ * and such a path is used.
+ */
+ return !has_include;
+}
+
+
/*
* Read the patch text in "buffer" that extends for "size" bytes; stop
* reading after seeing a single patch (i.e. changes to a single file).
@@ -1935,9 +1995,14 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
if (offset < 0)
return offset;
- patch->ws_rule = whitespace_rule(patch->new_name
- ? patch->new_name
- : patch->old_name);
+ prefix_patch(patch);
+
+ if (!use_patch(patch))
+ patch->ws_rule = 0;
+ else
+ patch->ws_rule = whitespace_rule(patch->new_name
+ ? patch->new_name
+ : patch->old_name);
patchsize = parse_single_patch(buffer + offset + hdrsize,
size - offset - hdrsize, patch);
@@ -2561,7 +2626,7 @@ static void update_image(struct image *img,
* NOTE: this knows that we never call remove_first_line()
* on anything other than pre/post image.
*/
- img->line = xrealloc(img->line, nr * sizeof(*img->line));
+ REALLOC_ARRAY(img->line, nr);
img->line_allocated = img->line;
}
if (preimage_limit != postimage->nr)
@@ -4127,64 +4192,6 @@ static int write_out_results(struct patch *list)
static struct lock_file lock_file;
-static struct string_list limit_by_name;
-static int has_include;
-static void add_name_limit(const char *name, int exclude)
-{
- struct string_list_item *it;
-
- it = string_list_append(&limit_by_name, name);
- it->util = exclude ? NULL : (void *) 1;
-}
-
-static int use_patch(struct patch *p)
-{
- const char *pathname = p->new_name ? p->new_name : p->old_name;
- int i;
-
- /* Paths outside are not touched regardless of "--include" */
- if (0 < prefix_length) {
- int pathlen = strlen(pathname);
- if (pathlen <= prefix_length ||
- memcmp(prefix, pathname, prefix_length))
- return 0;
- }
-
- /* See if it matches any of exclude/include rule */
- for (i = 0; i < limit_by_name.nr; i++) {
- struct string_list_item *it = &limit_by_name.items[i];
- if (!wildmatch(it->string, pathname, 0, NULL))
- return (it->util != NULL);
- }
-
- /*
- * If we had any include, a path that does not match any rule is
- * not used. Otherwise, we saw bunch of exclude rules (or none)
- * and such a path is used.
- */
- return !has_include;
-}
-
-
-static void prefix_one(char **name)
-{
- char *old_name = *name;
- if (!old_name)
- return;
- *name = xstrdup(prefix_filename(prefix, prefix_length, *name));
- free(old_name);
-}
-
-static void prefix_patches(struct patch *p)
-{
- if (!prefix || p->is_toplevel_relative)
- return;
- for ( ; p; p = p->next) {
- prefix_one(&p->new_name);
- prefix_one(&p->old_name);
- }
-}
-
#define INACCURATE_EOF (1<<0)
#define RECOUNT (1<<1)
@@ -4210,8 +4217,6 @@ static int apply_patch(int fd, const char *filename, int options)
break;
if (apply_in_reverse)
reverse_patches(patch);
- if (prefix)
- prefix_patches(patch);
if (use_patch(patch)) {
patch_stats(patch);
*listp = patch;
@@ -4269,13 +4274,11 @@ static int apply_patch(int fd, const char *filename, int options)
return 0;
}
-static int git_apply_config(const char *var, const char *value, void *cb)
+static void git_apply_config(void)
{
- if (!strcmp(var, "apply.whitespace"))
- return git_config_string(&apply_default_whitespace, var, value);
- else if (!strcmp(var, "apply.ignorewhitespace"))
- return git_config_string(&apply_default_ignorewhitespace, var, value);
- return git_default_config(var, value, cb);
+ git_config_get_string_const("apply.whitespace", &apply_default_whitespace);
+ git_config_get_string_const("apply.ignorewhitespace", &apply_default_ignorewhitespace);
+ git_config(git_default_config, NULL);
}
static int option_parse_exclude(const struct option *opt,
@@ -4423,7 +4426,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
prefix = prefix_;
prefix_length = prefix ? strlen(prefix) : 0;
- git_config(git_apply_config, NULL);
+ git_apply_config();
if (apply_default_whitespace)
parse_whitespace_option(apply_default_whitespace);
if (apply_default_ignorewhitespace)
diff --git a/builtin/blame.c b/builtin/blame.c
index 17d30d0..3838be2 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2580,6 +2580,9 @@ parse_done:
case DATE_RFC2822:
blame_date_width = sizeof("Thu, 19 Oct 2006 16:00:04 -0700");
break;
+ case DATE_ISO8601_STRICT:
+ blame_date_width = sizeof("2006-10-19T16:00:04-07:00");
+ break;
case DATE_ISO8601:
blame_date_width = sizeof("2006-10-19 16:00:04 -0700");
break;
@@ -2700,7 +2703,7 @@ parse_done:
* uninteresting.
*/
if (prepare_revision_walk(&revs))
- die("revision walk setup failed");
+ die(_("revision walk setup failed"));
if (is_null_sha1(sb.final->object.sha1)) {
o = sb.final->util;
diff --git a/builtin/branch.c b/builtin/branch.c
index 0591b22..9e4666f 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -280,6 +280,7 @@ struct ref_item {
char *dest;
unsigned int kind, width;
struct commit *commit;
+ int ignore;
};
struct ref_list {
@@ -385,6 +386,7 @@ static int append_ref(const char *refname, const unsigned char *sha1, int flags,
newitem->commit = commit;
newitem->width = utf8_strwidth(refname);
newitem->dest = resolve_symref(orig_refname, prefix);
+ newitem->ignore = 0;
/* adjust for "remotes/" */
if (newitem->kind == REF_REMOTE_BRANCH &&
ref_list->kinds != REF_REMOTE_BRANCH)
@@ -484,17 +486,6 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name,
free(ref);
}
-static int matches_merge_filter(struct commit *commit)
-{
- int is_merged;
-
- if (merge_filter == NO_FILTER)
- return 1;
-
- is_merged = !!(commit->object.flags & UNINTERESTING);
- return (is_merged == (merge_filter == SHOW_MERGED));
-}
-
static void add_verbose_info(struct strbuf *out, struct ref_item *item,
int verbose, int abbrev)
{
@@ -522,10 +513,9 @@ static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
{
char c;
int color;
- struct commit *commit = item->commit;
struct strbuf out = STRBUF_INIT, name = STRBUF_INIT;
- if (!matches_merge_filter(commit))
+ if (item->ignore)
return;
switch (item->kind) {
@@ -575,7 +565,7 @@ static int calc_maxwidth(struct ref_list *refs)
{
int i, w = 0;
for (i = 0; i < refs->index; i++) {
- if (!matches_merge_filter(refs->list[i].commit))
+ if (refs->list[i].ignore)
continue;
if (refs->list[i].width > w)
w = refs->list[i].width;
@@ -618,6 +608,7 @@ static void show_detached(struct ref_list *ref_list)
item.kind = REF_LOCAL_BRANCH;
item.dest = NULL;
item.commit = head_commit;
+ item.ignore = 0;
if (item.width > ref_list->maxwidth)
ref_list->maxwidth = item.width;
print_ref_item(&item, ref_list->maxwidth, ref_list->verbose, ref_list->abbrev, 1, "");
@@ -653,7 +644,23 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
add_pending_object(&ref_list.revs,
(struct object *) filter, "");
ref_list.revs.limited = 1;
- prepare_revision_walk(&ref_list.revs);
+
+ if (prepare_revision_walk(&ref_list.revs))
+ die(_("revision walk setup failed"));
+
+ for (i = 0; i < ref_list.index; i++) {
+ struct ref_item *item = &ref_list.list[i];
+ struct commit *commit = item->commit;
+ int is_merged = !!(commit->object.flags & UNINTERESTING);
+ item->ignore = is_merged != (merge_filter == SHOW_MERGED);
+ }
+
+ for (i = 0; i < ref_list.index; i++) {
+ struct ref_item *item = &ref_list.list[i];
+ clear_commit_marks(item->commit, ALL_REV_FLAGS);
+ }
+ clear_commit_marks(filter, ALL_REV_FLAGS);
+
if (verbose)
ref_list.maxwidth = calc_maxwidth(&ref_list);
}
diff --git a/builtin/checkout.c b/builtin/checkout.c
index f71e745..8afdf2b 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -552,6 +552,12 @@ static int merge_working_tree(const struct checkout_opts *opts,
}
}
+ if (!active_cache_tree)
+ active_cache_tree = cache_tree();
+
+ if (!cache_tree_fully_valid(active_cache_tree))
+ cache_tree_update(&the_index, WRITE_TREE_SILENT | WRITE_TREE_REPAIR);
+
if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
die(_("unable to write new index file"));
diff --git a/builtin/clean.c b/builtin/clean.c
index 1032563..3beeea6 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -67,7 +67,7 @@ struct menu_item {
char hotkey;
const char *title;
int selected;
- int (*fn)();
+ int (*fn)(void);
};
enum menu_stuff_type {
diff --git a/builtin/clone.c b/builtin/clone.c
index bbd169c..3927edf 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -685,9 +685,10 @@ static void write_config(struct string_list *config)
}
}
-static void write_refspec_config(const char* src_ref_prefix,
- const struct ref* our_head_points_at,
- const struct ref* remote_head_points_at, struct strbuf* branch_top)
+static void write_refspec_config(const char *src_ref_prefix,
+ const struct ref *our_head_points_at,
+ const struct ref *remote_head_points_at,
+ struct strbuf *branch_top)
{
struct strbuf key = STRBUF_INIT;
struct strbuf value = STRBUF_INIT;
@@ -1004,5 +1005,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
strbuf_release(&key);
strbuf_release(&value);
junk_mode = JUNK_LEAVE_ALL;
+
+ free(refspec);
return err;
}
diff --git a/builtin/commit.c b/builtin/commit.c
index 5ed6036..b0fe784 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -42,7 +42,20 @@ static const char * const builtin_status_usage[] = {
NULL
};
-static const char implicit_ident_advice[] =
+static const char implicit_ident_advice_noconfig[] =
+N_("Your name and email address were configured automatically based\n"
+"on your username and hostname. Please check that they are accurate.\n"
+"You can suppress this message by setting them explicitly. Run the\n"
+"following command and follow the instructions in your editor to edit\n"
+"your configuration file:\n"
+"\n"
+" git config --global --edit\n"
+"\n"
+"After doing this, you may fix the identity used for this commit with:\n"
+"\n"
+" git commit --amend --reset-author\n");
+
+static const char implicit_ident_advice_config[] =
N_("Your name and email address were configured automatically based\n"
"on your username and hostname. Please check that they are accurate.\n"
"You can suppress this message by setting them explicitly:\n"
@@ -340,6 +353,13 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
discard_cache();
read_cache_from(index_lock.filename);
+ if (update_main_cache_tree(WRITE_TREE_SILENT) == 0) {
+ if (reopen_lock_file(&index_lock) < 0)
+ die(_("unable to write index file"));
+ if (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))
+ die(_("unable to update temporary index"));
+ } else
+ warning(_("Failed to update main cache tree"));
commit_style = COMMIT_NORMAL;
return index_lock.filename;
@@ -380,8 +400,12 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
if (!only && !pathspec.nr) {
hold_locked_index(&index_lock, 1);
refresh_cache_or_die(refresh_flags);
- if (active_cache_changed) {
+ if (active_cache_changed
+ || !cache_tree_fully_valid(active_cache_tree)) {
update_main_cache_tree(WRITE_TREE_SILENT);
+ active_cache_changed = 1;
+ }
+ if (active_cache_changed) {
if (write_locked_index(&the_index, &index_lock,
COMMIT_LOCK))
die(_("unable to write new_index file"));
@@ -431,6 +455,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
hold_locked_index(&index_lock, 1);
add_remove_files(&partial);
refresh_cache(REFRESH_QUIET);
+ update_main_cache_tree(WRITE_TREE_SILENT);
if (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))
die(_("unable to write new_index file"));
@@ -520,77 +545,80 @@ static int sane_ident_split(struct ident_split *person)
return 1;
}
-static int parse_force_date(const char *in, char *out, int len)
+static int parse_force_date(const char *in, struct strbuf *out)
{
- if (len < 1)
- return -1;
- *out++ = '@';
- len--;
+ strbuf_addch(out, '@');
- if (parse_date(in, out, len) < 0) {
+ if (parse_date(in, out) < 0) {
int errors = 0;
unsigned long t = approxidate_careful(in, &errors);
if (errors)
return -1;
- snprintf(out, len, "%lu", t);
+ strbuf_addf(out, "%lu", t);
}
return 0;
}
+static void set_ident_var(char **buf, char *val)
+{
+ free(*buf);
+ *buf = val;
+}
+
+static char *envdup(const char *var)
+{
+ const char *val = getenv(var);
+ return val ? xstrdup(val) : NULL;
+}
+
static void determine_author_info(struct strbuf *author_ident)
{
char *name, *email, *date;
struct ident_split author;
- char date_buf[64];
- name = getenv("GIT_AUTHOR_NAME");
- email = getenv("GIT_AUTHOR_EMAIL");
- date = getenv("GIT_AUTHOR_DATE");
+ name = envdup("GIT_AUTHOR_NAME");
+ email = envdup("GIT_AUTHOR_EMAIL");
+ date = envdup("GIT_AUTHOR_DATE");
if (author_message) {
- const char *a, *lb, *rb, *eol;
+ struct ident_split ident;
size_t len;
+ const char *a;
- a = strstr(author_message_buffer, "\nauthor ");
+ a = find_commit_header(author_message_buffer, "author", &len);
if (!a)
- die(_("invalid commit: %s"), author_message);
-
- lb = strchrnul(a + strlen("\nauthor "), '<');
- rb = strchrnul(lb, '>');
- eol = strchrnul(rb, '\n');
- if (!*lb || !*rb || !*eol)
- die(_("invalid commit: %s"), author_message);
-
- if (lb == a + strlen("\nauthor "))
- /* \nauthor <foo@example.com> */
- name = xcalloc(1, 1);
- else
- name = xmemdupz(a + strlen("\nauthor "),
- (lb - strlen(" ") -
- (a + strlen("\nauthor "))));
- email = xmemdupz(lb + strlen("<"), rb - (lb + strlen("<")));
- len = eol - (rb + strlen("> "));
- date = xmalloc(len + 2);
- *date = '@';
- memcpy(date + 1, rb + strlen("> "), len);
- date[len + 1] = '\0';
+ die(_("commit '%s' lacks author header"), author_message);
+ if (split_ident_line(&ident, a, len) < 0)
+ die(_("commit '%s' has malformed author line"), author_message);
+
+ set_ident_var(&name, xmemdupz(ident.name_begin, ident.name_end - ident.name_begin));
+ set_ident_var(&email, xmemdupz(ident.mail_begin, ident.mail_end - ident.mail_begin));
+
+ if (ident.date_begin) {
+ struct strbuf date_buf = STRBUF_INIT;
+ strbuf_addch(&date_buf, '@');
+ strbuf_add(&date_buf, ident.date_begin, ident.date_end - ident.date_begin);
+ strbuf_addch(&date_buf, ' ');
+ strbuf_add(&date_buf, ident.tz_begin, ident.tz_end - ident.tz_begin);
+ set_ident_var(&date, strbuf_detach(&date_buf, NULL));
+ }
}
if (force_author) {
- const char *lb = strstr(force_author, " <");
- const char *rb = strchr(force_author, '>');
+ struct ident_split ident;
- if (!lb || !rb)
+ if (split_ident_line(&ident, force_author, strlen(force_author)) < 0)
die(_("malformed --author parameter"));
- name = xstrndup(force_author, lb - force_author);
- email = xstrndup(lb + 2, rb - (lb + 2));
+ set_ident_var(&name, xmemdupz(ident.name_begin, ident.name_end - ident.name_begin));
+ set_ident_var(&email, xmemdupz(ident.mail_begin, ident.mail_end - ident.mail_begin));
}
if (force_date) {
- if (parse_force_date(force_date, date_buf, sizeof(date_buf)))
+ struct strbuf date_buf = STRBUF_INIT;
+ if (parse_force_date(force_date, &date_buf))
die(_("invalid date format: %s"), force_date);
- date = date_buf;
+ set_ident_var(&date, strbuf_detach(&date_buf, NULL));
}
strbuf_addstr(author_ident, fmt_ident(name, email, date, IDENT_STRICT));
@@ -600,6 +628,10 @@ static void determine_author_info(struct strbuf *author_ident)
export_one("GIT_AUTHOR_EMAIL", author.mail_begin, author.mail_end, 0);
export_one("GIT_AUTHOR_DATE", author.date_begin, author.tz_end, '@');
}
+
+ free(name);
+ free(email);
+ free(date);
}
static void split_ident_or_die(struct ident_split *id, const struct strbuf *buf)
@@ -1048,7 +1080,8 @@ static const char *find_author_by_nickname(const char *name)
revs.mailmap = &mailmap;
read_mailmap(revs.mailmap, NULL);
- prepare_revision_walk(&revs);
+ if (prepare_revision_walk(&revs))
+ die(_("revision walk setup failed"));
commit = get_revision(&revs);
if (commit) {
struct pretty_print_context ctx = {0};
@@ -1402,6 +1435,24 @@ int cmd_status(int argc, const char **argv, const char *prefix)
return 0;
}
+static const char *implicit_ident_advice(void)
+{
+ char *user_config = NULL;
+ char *xdg_config = NULL;
+ int config_exists;
+
+ home_config_paths(&user_config, &xdg_config, "config");
+ config_exists = file_exists(user_config) || file_exists(xdg_config);
+ free(user_config);
+ free(xdg_config);
+
+ if (config_exists)
+ return _(implicit_ident_advice_config);
+ else
+ return _(implicit_ident_advice_noconfig);
+
+}
+
static void print_summary(const char *prefix, const unsigned char *sha1,
int initial_commit)
{
@@ -1440,7 +1491,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
strbuf_addbuf_percentquote(&format, &committer_ident);
if (advice_implicit_identity) {
strbuf_addch(&format, '\n');
- strbuf_addstr(&format, _(implicit_ident_advice));
+ strbuf_addstr(&format, implicit_ident_advice());
}
}
strbuf_release(&author_ident);
@@ -1508,7 +1559,7 @@ static int run_rewrite_hook(const unsigned char *oldsha1,
{
/* oldsha1 SP newsha1 LF NUL */
static char buf[2*40 + 3];
- struct child_process proc;
+ struct child_process proc = CHILD_PROCESS_INIT;
const char *argv[3];
int code;
size_t n;
@@ -1520,7 +1571,6 @@ static int run_rewrite_hook(const unsigned char *oldsha1,
argv[1] = "amend";
argv[2] = NULL;
- memset(&proc, 0, sizeof(proc));
proc.argv = argv;
proc.in = -1;
proc.stdout_to_stderr = 1;
@@ -1620,11 +1670,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
const char *index_file, *reflog_msg;
char *nl;
unsigned char sha1[20];
- struct ref_lock *ref_lock;
struct commit_list *parents = NULL, **pptr = &parents;
struct stat statbuf;
struct commit *current_head = NULL;
struct commit_extra_header *extra = NULL;
+ struct ref_transaction *transaction;
+ struct strbuf err = STRBUF_INIT;
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(builtin_commit_usage, builtin_commit_options);
@@ -1746,16 +1797,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
strbuf_release(&author_ident);
free_commit_extra_headers(extra);
- ref_lock = lock_any_ref_for_update("HEAD",
- !current_head
- ? NULL
- : current_head->object.sha1,
- 0, NULL);
- if (!ref_lock) {
- rollback_index_files();
- die(_("cannot lock HEAD ref"));
- }
-
nl = strchr(sb.buf, '\n');
if (nl)
strbuf_setlen(&sb, nl + 1 - sb.buf);
@@ -1764,10 +1805,17 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
strbuf_insert(&sb, 0, reflog_msg, strlen(reflog_msg));
strbuf_insert(&sb, strlen(reflog_msg), ": ", 2);
- if (write_ref_sha1(ref_lock, sha1, sb.buf) < 0) {
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, "HEAD", sha1,
+ current_head
+ ? current_head->object.sha1 : NULL,
+ 0, !!current_head, &err) ||
+ ref_transaction_commit(transaction, sb.buf, &err)) {
rollback_index_files();
- die(_("cannot update HEAD ref"));
+ die("%s", err.buf);
}
+ ref_transaction_free(transaction);
unlink(git_path("CHERRY_PICK_HEAD"));
unlink(git_path("REVERT_HEAD"));
@@ -1778,7 +1826,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (commit_index_files())
die (_("Repository has been updated, but unable to write\n"
- "new_index file. Check that disk is not full or quota is\n"
+ "new_index file. Check that disk is not full and quota is\n"
"not exceeded, and then \"git reset HEAD\" to recover."));
rerere(0);
@@ -1796,5 +1844,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
if (!quiet)
print_summary(prefix, sha1, !current_head);
+ strbuf_release(&err);
return 0;
}
diff --git a/builtin/config.c b/builtin/config.c
index fcd8474..37305e9 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -445,6 +445,20 @@ static int get_urlmatch(const char *var, const char *url)
return 0;
}
+static char *default_user_config(void)
+{
+ struct strbuf buf = STRBUF_INIT;
+ strbuf_addf(&buf,
+ _("# This is Git's per-user configuration file.\n"
+ "[core]\n"
+ "# Please adapt and uncomment the following lines:\n"
+ "# user = %s\n"
+ "# email = %s\n"),
+ ident_default_name(),
+ ident_default_email());
+ return strbuf_detach(&buf, NULL);
+}
+
int cmd_config(int argc, const char **argv, const char *prefix)
{
int nongit = !startup_info->have_repository;
@@ -551,6 +565,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
}
}
else if (actions == ACTION_EDIT) {
+ const char *config_file = given_config_source.file ?
+ given_config_source.file : git_path("config");
check_argc(argc, 0, 0);
if (!given_config_source.file && nongit)
die("not in a git directory");
@@ -559,9 +575,18 @@ int cmd_config(int argc, const char **argv, const char *prefix)
if (given_config_source.blob)
die("editing blobs is not supported");
git_config(git_default_config, NULL);
- launch_editor(given_config_source.file ?
- given_config_source.file : git_path("config"),
- NULL, NULL);
+ if (use_global_config) {
+ int fd = open(config_file, O_CREAT | O_EXCL | O_WRONLY, 0666);
+ if (fd) {
+ char *content = default_user_config();
+ write_str_in_full(fd, content);
+ free(content);
+ close(fd);
+ }
+ else if (errno != EEXIST)
+ die_errno(_("cannot create configuration file %s"), config_file);
+ }
+ launch_editor(config_file, NULL, NULL);
}
else if (actions == ACTION_SET) {
int ret;
@@ -586,7 +611,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
check_argc(argc, 2, 2);
value = normalize_value(argv[0], argv[1]);
return git_config_set_multivar_in_file(given_config_source.file,
- argv[0], value, "^$", 0);
+ argv[0], value,
+ CONFIG_REGEX_NONE, 0);
}
else if (actions == ACTION_REPLACE_ALL) {
check_write();
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 92b4624..b8182c2 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -18,6 +18,7 @@
#include "parse-options.h"
#include "quote.h"
#include "remote.h"
+#include "blob.h"
static const char *fast_export_usage[] = {
N_("git fast-export [rev-list-opts]"),
@@ -34,6 +35,7 @@ static int full_tree;
static struct string_list extra_refs = STRING_LIST_INIT_NODUP;
static struct refspec *refspecs;
static int refspecs_nr;
+static int anonymize;
static int parse_opt_signed_tag_mode(const struct option *opt,
const char *arg, int unset)
@@ -81,6 +83,76 @@ static int has_unshown_parent(struct commit *commit)
return 0;
}
+struct anonymized_entry {
+ struct hashmap_entry hash;
+ const char *orig;
+ size_t orig_len;
+ const char *anon;
+ size_t anon_len;
+};
+
+static int anonymized_entry_cmp(const void *va, const void *vb,
+ const void *data)
+{
+ const struct anonymized_entry *a = va, *b = vb;
+ return a->orig_len != b->orig_len ||
+ memcmp(a->orig, b->orig, a->orig_len);
+}
+
+/*
+ * Basically keep a cache of X->Y so that we can repeatedly replace
+ * the same anonymized string with another. The actual generation
+ * is farmed out to the generate function.
+ */
+static const void *anonymize_mem(struct hashmap *map,
+ void *(*generate)(const void *, size_t *),
+ const void *orig, size_t *len)
+{
+ struct anonymized_entry key, *ret;
+
+ if (!map->cmpfn)
+ hashmap_init(map, anonymized_entry_cmp, 0);
+
+ hashmap_entry_init(&key, memhash(orig, *len));
+ key.orig = orig;
+ key.orig_len = *len;
+ ret = hashmap_get(map, &key, NULL);
+
+ if (!ret) {
+ ret = xmalloc(sizeof(*ret));
+ hashmap_entry_init(&ret->hash, key.hash.hash);
+ ret->orig = xstrdup(orig);
+ ret->orig_len = *len;
+ ret->anon = generate(orig, len);
+ ret->anon_len = *len;
+ hashmap_put(map, ret);
+ }
+
+ *len = ret->anon_len;
+ return ret->anon;
+}
+
+/*
+ * We anonymize each component of a path individually,
+ * so that paths a/b and a/c will share a common root.
+ * The paths are cached via anonymize_mem so that repeated
+ * lookups for "a" will yield the same value.
+ */
+static void anonymize_path(struct strbuf *out, const char *path,
+ struct hashmap *map,
+ void *(*generate)(const void *, size_t *))
+{
+ while (*path) {
+ const char *end_of_component = strchrnul(path, '/');
+ size_t len = end_of_component - path;
+ const char *c = anonymize_mem(map, generate, path, &len);
+ strbuf_add(out, c, len);
+ path = end_of_component;
+ if (*path)
+ strbuf_addch(out, *path++);
+ }
+}
+
/* Since intptr_t is C99, we do not use it here */
static inline uint32_t *mark_to_ptr(uint32_t mark)
{
@@ -119,6 +191,26 @@ static void show_progress(void)
printf("progress %d objects\n", counter);
}
+/*
+ * Ideally we would want some transformation of the blob data here
+ * that is unreversible, but would still be the same size and have
+ * the same data relationship to other blobs (so that we get the same
+ * delta and packing behavior as the original). But the first and last
+ * requirements there are probably mutually exclusive, so let's take
+ * the easy way out for now, and just generate arbitrary content.
+ *
+ * There's no need to cache this result with anonymize_mem, since
+ * we already handle blob content caching with marks.
+ */
+static char *anonymize_blob(unsigned long *size)
+{
+ static int counter;
+ struct strbuf out = STRBUF_INIT;
+ strbuf_addf(&out, "anonymous blob %d", counter++);
+ *size = out.len;
+ return strbuf_detach(&out, NULL);
+}
+
static void export_blob(const unsigned char *sha1)
{
unsigned long size;
@@ -137,12 +229,19 @@ static void export_blob(const unsigned char *sha1)
if (object && object->flags & SHOWN)
return;
- buf = read_sha1_file(sha1, &type, &size);
- if (!buf)
- die ("Could not read blob %s", sha1_to_hex(sha1));
- if (check_sha1_signature(sha1, buf, size, typename(type)) < 0)
- die("sha1 mismatch in blob %s", sha1_to_hex(sha1));
- object = parse_object_buffer(sha1, type, size, buf, &eaten);
+ if (anonymize) {
+ buf = anonymize_blob(&size);
+ object = (struct object *)lookup_blob(sha1);
+ eaten = 0;
+ } else {
+ buf = read_sha1_file(sha1, &type, &size);
+ if (!buf)
+ die ("Could not read blob %s", sha1_to_hex(sha1));
+ if (check_sha1_signature(sha1, buf, size, typename(type)) < 0)
+ die("sha1 mismatch in blob %s", sha1_to_hex(sha1));
+ object = parse_object_buffer(sha1, type, size, buf, &eaten);
+ }
+
if (!object)
die("Could not read blob %s", sha1_to_hex(sha1));
@@ -190,7 +289,7 @@ static int depth_first(const void *a_, const void *b_)
return (a->status == 'R') - (b->status == 'R');
}
-static void print_path(const char *path)
+static void print_path_1(const char *path)
{
int need_quote = quote_c_style(path, NULL, NULL, 0);
if (need_quote)
@@ -201,6 +300,43 @@ static void print_path(const char *path)
printf("%s", path);
}
+static void *anonymize_path_component(const void *path, size_t *len)
+{
+ static int counter;
+ struct strbuf out = STRBUF_INIT;
+ strbuf_addf(&out, "path%d", counter++);
+ return strbuf_detach(&out, len);
+}
+
+static void print_path(const char *path)
+{
+ if (!anonymize)
+ print_path_1(path);
+ else {
+ static struct hashmap paths;
+ static struct strbuf anon = STRBUF_INIT;
+
+ anonymize_path(&anon, path, &paths, anonymize_path_component);
+ print_path_1(anon.buf);
+ strbuf_reset(&anon);
+ }
+}
+
+static void *generate_fake_sha1(const void *old, size_t *len)
+{
+ static uint32_t counter = 1; /* avoid null sha1 */
+ unsigned char *out = xcalloc(20, 1);
+ put_be32(out + 16, counter++);
+ return out;
+}
+
+static const unsigned char *anonymize_sha1(const unsigned char *sha1)
+{
+ static struct hashmap sha1s;
+ size_t len = 20;
+ return anonymize_mem(&sha1s, generate_fake_sha1, sha1, &len);
+}
+
static void show_filemodify(struct diff_queue_struct *q,
struct diff_options *options, void *data)
{
@@ -245,7 +381,9 @@ static void show_filemodify(struct diff_queue_struct *q,
*/
if (no_data || S_ISGITLINK(spec->mode))
printf("M %06o %s ", spec->mode,
- sha1_to_hex(spec->sha1));
+ sha1_to_hex(anonymize ?
+ anonymize_sha1(spec->sha1) :
+ spec->sha1));
else {
struct object *object = lookup_object(spec->sha1);
printf("M %06o :%d ", spec->mode,
@@ -279,6 +417,114 @@ static const char *find_encoding(const char *begin, const char *end)
return bol;
}
+static void *anonymize_ref_component(const void *old, size_t *len)
+{
+ static int counter;
+ struct strbuf out = STRBUF_INIT;
+ strbuf_addf(&out, "ref%d", counter++);
+ return strbuf_detach(&out, len);
+}
+
+static const char *anonymize_refname(const char *refname)
+{
+ /*
+ * If any of these prefixes is found, we will leave it intact
+ * so that tags remain tags and so forth.
+ */
+ static const char *prefixes[] = {
+ "refs/heads/",
+ "refs/tags/",
+ "refs/remotes/",
+ "refs/"
+ };
+ static struct hashmap refs;
+ static struct strbuf anon = STRBUF_INIT;
+ int i;
+
+ /*
+ * We also leave "master" as a special case, since it does not reveal
+ * anything interesting.
+ */
+ if (!strcmp(refname, "refs/heads/master"))
+ return refname;
+
+ strbuf_reset(&anon);
+ for (i = 0; i < ARRAY_SIZE(prefixes); i++) {
+ if (skip_prefix(refname, prefixes[i], &refname)) {
+ strbuf_addstr(&anon, prefixes[i]);
+ break;
+ }
+ }
+
+ anonymize_path(&anon, refname, &refs, anonymize_ref_component);
+ return anon.buf;
+}
+
+/*
+ * We do not even bother to cache commit messages, as they are unlikely
+ * to be repeated verbatim, and it is not that interesting when they are.
+ */
+static char *anonymize_commit_message(const char *old)
+{
+ static int counter;
+ return xstrfmt("subject %d\n\nbody\n", counter++);
+}
+
+static struct hashmap idents;
+static void *anonymize_ident(const void *old, size_t *len)
+{
+ static int counter;
+ struct strbuf out = STRBUF_INIT;
+ strbuf_addf(&out, "User %d <user%d@example.com>", counter, counter);
+ counter++;
+ return strbuf_detach(&out, len);
+}
+
+/*
+ * Our strategy here is to anonymize the names and email addresses,
+ * but keep timestamps intact, as they influence things like traversal
+ * order (and by themselves should not be too revealing).
+ */
+static void anonymize_ident_line(const char **beg, const char **end)
+{
+ static struct strbuf buffers[] = { STRBUF_INIT, STRBUF_INIT };
+ static unsigned which_buffer;
+
+ struct strbuf *out;
+ struct ident_split split;
+ const char *end_of_header;
+
+ out = &buffers[which_buffer++];
+ which_buffer %= ARRAY_SIZE(buffers);
+ strbuf_reset(out);
+
+ /* skip "committer", "author", "tagger", etc */
+ end_of_header = strchr(*beg, ' ');
+ if (!end_of_header)
+ die("BUG: malformed line fed to anonymize_ident_line: %.*s",
+ (int)(*end - *beg), *beg);
+ end_of_header++;
+ strbuf_add(out, *beg, end_of_header - *beg);
+
+ if (!split_ident_line(&split, end_of_header, *end - end_of_header) &&
+ split.date_begin) {
+ const char *ident;
+ size_t len;
+
+ len = split.mail_end - split.name_begin;
+ ident = anonymize_mem(&idents, anonymize_ident,
+ split.name_begin, &len);
+ strbuf_add(out, ident, len);
+ strbuf_addch(out, ' ');
+ strbuf_add(out, split.date_begin, split.tz_end - split.date_begin);
+ } else {
+ strbuf_addstr(out, "Malformed Ident <malformed@example.com> 0 -0000");
+ }
+
+ *beg = out->buf;
+ *end = out->buf + out->len;
+}
+
static void handle_commit(struct commit *commit, struct rev_info *rev)
{
int saved_output_format = rev->diffopt.output_format;
@@ -287,6 +533,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
const char *encoding, *message;
char *reencoded = NULL;
struct commit_list *p;
+ const char *refname;
int i;
rev->diffopt.output_format = DIFF_FORMAT_CALLBACK;
@@ -326,13 +573,22 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
if (!S_ISGITLINK(diff_queued_diff.queue[i]->two->mode))
export_blob(diff_queued_diff.queue[i]->two->sha1);
+ refname = commit->util;
+ if (anonymize) {
+ refname = anonymize_refname(refname);
+ anonymize_ident_line(&committer, &committer_end);
+ anonymize_ident_line(&author, &author_end);
+ }
+
mark_next_object(&commit->object);
- if (!is_encoding_utf8(encoding))
+ if (anonymize)
+ reencoded = anonymize_commit_message(message);
+ else if (!is_encoding_utf8(encoding))
reencoded = reencode_string(message, "UTF-8", encoding);
if (!commit->parents)
- printf("reset %s\n", (const char*)commit->util);
+ printf("reset %s\n", refname);
printf("commit %s\nmark :%"PRIu32"\n%.*s\n%.*s\ndata %u\n%s",
- (const char *)commit->util, last_idnum,
+ refname, last_idnum,
(int)(author_end - author), author,
(int)(committer_end - committer), committer,
(unsigned)(reencoded
@@ -363,6 +619,14 @@ static void handle_commit(struct commit *commit, struct rev_info *rev)
show_progress();
}
+static void *anonymize_tag(const void *old, size_t *len)
+{
+ static int counter;
+ struct strbuf out = STRBUF_INIT;
+ strbuf_addf(&out, "tag message %d", counter++);
+ return strbuf_detach(&out, len);
+}
+
static void handle_tail(struct object_array *commits, struct rev_info *revs)
{
struct commit *commit;
@@ -419,6 +683,17 @@ static void handle_tag(const char *name, struct tag *tag)
} else {
tagger++;
tagger_end = strchrnul(tagger, '\n');
+ if (anonymize)
+ anonymize_ident_line(&tagger, &tagger_end);
+ }
+
+ if (anonymize) {
+ name = anonymize_refname(name);
+ if (message) {
+ static struct hashmap tags;
+ message = anonymize_mem(&tags, anonymize_tag,
+ message, &message_size);
+ }
}
/* handle signed tags */
@@ -584,6 +859,8 @@ static void handle_tags_and_duplicates(void)
handle_tag(name, (struct tag *)object);
break;
case OBJ_COMMIT:
+ if (anonymize)
+ name = anonymize_refname(name);
/* create refs pointing to already seen commits */
commit = (struct commit *)object;
printf("reset %s\nfrom :%d\n\n", name,
@@ -719,6 +996,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "no-data", &no_data, N_("Skip output of blob data")),
OPT_STRING_LIST(0, "refspec", &refspecs_list, N_("refspec"),
N_("Apply refspec to exported refs")),
+ OPT_BOOL(0, "anonymize", &anonymize, N_("anonymize output")),
OPT_END()
};
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e8d0cca..159fb7e 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1110,9 +1110,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
struct string_list list = STRING_LIST_INIT_NODUP;
struct remote *remote;
int result = 0;
- static const char *argv_gc_auto[] = {
- "gc", "--auto", NULL,
- };
+ struct argv_array argv_gc_auto = ARGV_ARRAY_INIT;
packet_trace_identity("fetch");
@@ -1198,7 +1196,11 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
list.strdup_strings = 1;
string_list_clear(&list, 0);
- run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
+ argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL);
+ if (verbosity < 0)
+ argv_array_push(&argv_gc_auto, "--quiet");
+ run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD);
+ argv_array_clear(&argv_gc_auto);
return result;
}
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 47bd624..fda0f04 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -138,10 +138,8 @@ static int parse_atom(const char *atom, const char *ep)
/* Add it in, including the deref prefix */
at = used_atom_cnt;
used_atom_cnt++;
- used_atom = xrealloc(used_atom,
- (sizeof *used_atom) * used_atom_cnt);
- used_atom_type = xrealloc(used_atom_type,
- (sizeof(*used_atom_type) * used_atom_cnt));
+ REALLOC_ARRAY(used_atom, used_atom_cnt);
+ REALLOC_ARRAY(used_atom_type, used_atom_cnt);
used_atom[at] = xmemdupz(atom, ep - atom);
used_atom_type[at] = valid_atom[i].cmp_type;
if (*atom == '*')
@@ -633,7 +631,7 @@ static void populate_value(struct refinfo *ref)
unsigned long size;
const unsigned char *tagged;
- ref->value = xcalloc(sizeof(struct atom_value), used_atom_cnt);
+ ref->value = xcalloc(used_atom_cnt, sizeof(struct atom_value));
if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
unsigned char unused1[20];
@@ -870,8 +868,7 @@ static int grab_single_ref(const char *refname, const unsigned char *sha1, int f
ref->flag = flag;
cnt = cb->grab_cnt;
- cb->grab_array = xrealloc(cb->grab_array,
- sizeof(*cb->grab_array) * (cnt + 1));
+ REALLOC_ARRAY(cb->grab_array, cnt + 1);
cb->grab_array[cnt++] = ref;
cb->grab_cnt = cnt;
return 0;
diff --git a/builtin/fsck.c b/builtin/fsck.c
index d42a27d..e9ba576 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -298,7 +298,7 @@ static int fsck_obj(struct object *obj)
if (fsck_walk(obj, mark_used, NULL))
objerror(obj, "broken links");
- if (fsck_object(obj, check_strict, fsck_error_func))
+ if (fsck_object(obj, NULL, 0, check_strict, fsck_error_func))
return -1;
if (obj->type == OBJ_TREE) {
@@ -388,7 +388,8 @@ static void fsck_sha1_list(void)
unsigned char *sha1 = entry->sha1;
sha1_list.entry[i] = NULL;
- fsck_sha1(sha1);
+ if (fsck_sha1(sha1))
+ errors_found |= ERROR_OBJECT;
free(entry);
}
sha1_list.nr = 0;
@@ -488,6 +489,7 @@ static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int f
obj = parse_object(sha1);
if (!obj) {
error("%s: invalid sha1 pointer %s", refname, sha1_to_hex(sha1));
+ errors_found |= ERROR_REACHABLE;
/* We'll continue with the rest despite the error.. */
return 0;
}
@@ -504,7 +506,7 @@ static void get_default_heads(void)
{
if (head_points_at && !is_null_sha1(head_sha1))
fsck_handle_ref("HEAD", head_sha1, 0, NULL);
- for_each_ref(fsck_handle_ref, NULL);
+ for_each_rawref(fsck_handle_ref, NULL);
if (include_reflogs)
for_each_reflog(fsck_handle_reflog, NULL);
diff --git a/builtin/gc.c b/builtin/gc.c
index 8d219d8..ced1456 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -55,44 +55,33 @@ static void remove_pidfile_on_signal(int signo)
raise(signo);
}
-static int gc_config(const char *var, const char *value, void *cb)
+static void gc_config(void)
{
- if (!strcmp(var, "gc.packrefs")) {
+ const char *value;
+
+ if (!git_config_get_value("gc.packrefs", &value)) {
if (value && !strcmp(value, "notbare"))
pack_refs = -1;
else
- pack_refs = git_config_bool(var, value);
- return 0;
- }
- if (!strcmp(var, "gc.aggressivewindow")) {
- aggressive_window = git_config_int(var, value);
- return 0;
- }
- if (!strcmp(var, "gc.aggressivedepth")) {
- aggressive_depth = git_config_int(var, value);
- return 0;
- }
- if (!strcmp(var, "gc.auto")) {
- gc_auto_threshold = git_config_int(var, value);
- return 0;
- }
- if (!strcmp(var, "gc.autopacklimit")) {
- gc_auto_pack_limit = git_config_int(var, value);
- return 0;
+ pack_refs = git_config_bool("gc.packrefs", value);
}
- if (!strcmp(var, "gc.autodetach")) {
- detach_auto = git_config_bool(var, value);
- return 0;
- }
- if (!strcmp(var, "gc.pruneexpire")) {
- if (value && strcmp(value, "now")) {
+
+ git_config_get_int("gc.aggressivewindow", &aggressive_window);
+ git_config_get_int("gc.aggressivedepth", &aggressive_depth);
+ git_config_get_int("gc.auto", &gc_auto_threshold);
+ git_config_get_int("gc.autopacklimit", &gc_auto_pack_limit);
+ git_config_get_bool("gc.autodetach", &detach_auto);
+
+ if (!git_config_get_string_const("gc.pruneexpire", &prune_expire)) {
+ if (strcmp(prune_expire, "now")) {
unsigned long now = approxidate("now");
- if (approxidate(value) >= now)
- return error(_("Invalid %s: '%s'"), var, value);
+ if (approxidate(prune_expire) >= now) {
+ git_die_config("gc.pruneexpire", _("Invalid gc.pruneexpire: '%s'"),
+ prune_expire);
+ }
}
- return git_config_string(&prune_expire, var, value);
}
- return git_default_config(var, value, cb);
+ git_config(git_default_config, NULL);
}
static int too_many_loose_objects(void)
@@ -301,7 +290,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
argv_array_pushl(&prune, "prune", "--expire", NULL );
argv_array_pushl(&rerere, "rerere", "gc", NULL);
- git_config(gc_config, NULL);
+ gc_config();
if (pack_refs < 0)
pack_refs = !is_bare_repository();
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index d7fcf4c..6158363 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -10,35 +10,55 @@
#include "parse-options.h"
#include "exec_cmd.h"
-static void hash_fd(int fd, const char *type, int write_object, const char *path)
+/*
+ * This is to create corrupt objects for debugging and as such it
+ * needs to bypass the data conversion performed by, and the type
+ * limitation imposed by, index_fd() and its callees.
+ */
+static int hash_literally(unsigned char *sha1, int fd, const char *type, unsigned flags)
+{
+ struct strbuf buf = STRBUF_INIT;
+ int ret;
+
+ if (strbuf_read(&buf, fd, 4096) < 0)
+ ret = -1;
+ else if (flags & HASH_WRITE_OBJECT)
+ ret = write_sha1_file(buf.buf, buf.len, type, sha1);
+ else
+ ret = hash_sha1_file(buf.buf, buf.len, type, sha1);
+ strbuf_release(&buf);
+ return ret;
+}
+
+static void hash_fd(int fd, const char *type, const char *path, unsigned flags,
+ int literally)
{
struct stat st;
unsigned char sha1[20];
- unsigned flags = (HASH_FORMAT_CHECK |
- (write_object ? HASH_WRITE_OBJECT : 0));
if (fstat(fd, &st) < 0 ||
- index_fd(sha1, fd, &st, type_from_string(type), path, flags))
- die(write_object
+ (literally
+ ? hash_literally(sha1, fd, type, flags)
+ : index_fd(sha1, fd, &st, type_from_string(type), path, flags)))
+ die((flags & HASH_WRITE_OBJECT)
? "Unable to add %s to database"
: "Unable to hash %s", path);
printf("%s\n", sha1_to_hex(sha1));
maybe_flush_or_die(stdout, "hash to stdout");
}
-static void hash_object(const char *path, const char *type, int write_object,
- const char *vpath)
+static void hash_object(const char *path, const char *type, const char *vpath,
+ unsigned flags, int literally)
{
int fd;
fd = open(path, O_RDONLY);
if (fd < 0)
die_errno("Cannot open '%s'", path);
- hash_fd(fd, type, write_object, vpath);
+ hash_fd(fd, type, vpath, flags, literally);
}
-static int no_filters;
-
-static void hash_stdin_paths(const char *type, int write_objects)
+static void hash_stdin_paths(const char *type, int no_filters, unsigned flags,
+ int literally)
{
struct strbuf buf = STRBUF_INIT, nbuf = STRBUF_INIT;
@@ -49,47 +69,46 @@ static void hash_stdin_paths(const char *type, int write_objects)
die("line is badly quoted");
strbuf_swap(&buf, &nbuf);
}
- hash_object(buf.buf, type, write_objects,
- no_filters ? NULL : buf.buf);
+ hash_object(buf.buf, type, no_filters ? NULL : buf.buf, flags,
+ literally);
}
strbuf_release(&buf);
strbuf_release(&nbuf);
}
-static const char * const hash_object_usage[] = {
- N_("git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>..."),
- N_("git hash-object --stdin-paths < <list-of-paths>"),
- NULL
-};
-
-static const char *type;
-static int write_object;
-static int hashstdin;
-static int stdin_paths;
-static const char *vpath;
-
-static const struct option hash_object_options[] = {
- OPT_STRING('t', NULL, &type, N_("type"), N_("object type")),
- OPT_BOOL('w', NULL, &write_object, N_("write the object into the object database")),
- OPT_COUNTUP( 0 , "stdin", &hashstdin, N_("read the object from stdin")),
- OPT_BOOL( 0 , "stdin-paths", &stdin_paths, N_("read file names from stdin")),
- OPT_BOOL( 0 , "no-filters", &no_filters, N_("store file as is without filters")),
- OPT_STRING( 0 , "path", &vpath, N_("file"), N_("process file as it were from this path")),
- OPT_END()
-};
-
int cmd_hash_object(int argc, const char **argv, const char *prefix)
{
+ static const char * const hash_object_usage[] = {
+ N_("git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>..."),
+ N_("git hash-object --stdin-paths < <list-of-paths>"),
+ NULL
+ };
+ const char *type = blob_type;
+ int hashstdin = 0;
+ int stdin_paths = 0;
+ int no_filters = 0;
+ int literally = 0;
+ unsigned flags = HASH_FORMAT_CHECK;
+ const char *vpath = NULL;
+ const struct option hash_object_options[] = {
+ OPT_STRING('t', NULL, &type, N_("type"), N_("object type")),
+ OPT_BIT('w', NULL, &flags, N_("write the object into the object database"),
+ HASH_WRITE_OBJECT),
+ OPT_COUNTUP( 0 , "stdin", &hashstdin, N_("read the object from stdin")),
+ OPT_BOOL( 0 , "stdin-paths", &stdin_paths, N_("read file names from stdin")),
+ OPT_BOOL( 0 , "no-filters", &no_filters, N_("store file as is without filters")),
+ OPT_BOOL( 0, "literally", &literally, N_("just hash any random garbage to create corrupt objects for debugging Git")),
+ OPT_STRING( 0 , "path", &vpath, N_("file"), N_("process file as it were from this path")),
+ OPT_END()
+ };
int i;
int prefix_length = -1;
const char *errstr = NULL;
- type = blob_type;
-
argc = parse_options(argc, argv, NULL, hash_object_options,
hash_object_usage, 0);
- if (write_object) {
+ if (flags & HASH_WRITE_OBJECT) {
prefix = setup_git_directory();
prefix_length = prefix ? strlen(prefix) : 0;
if (vpath && prefix)
@@ -119,19 +138,19 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix)
}
if (hashstdin)
- hash_fd(0, type, write_object, vpath);
+ hash_fd(0, type, vpath, flags, literally);
for (i = 0 ; i < argc; i++) {
const char *arg = argv[i];
if (0 <= prefix_length)
arg = prefix_filename(prefix, prefix_length, arg);
- hash_object(arg, type, write_object,
- no_filters ? NULL : vpath ? vpath : arg);
+ hash_object(arg, type, no_filters ? NULL : vpath ? vpath : arg,
+ flags, literally);
}
if (stdin_paths)
- hash_stdin_paths(type, write_object);
+ hash_stdin_paths(type, no_filters, flags, literally);
return 0;
}
diff --git a/builtin/help.c b/builtin/help.c
index 1fdefeb..8343b40 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -79,12 +79,11 @@ static const char *get_man_viewer_info(const char *name)
static int check_emacsclient_version(void)
{
struct strbuf buffer = STRBUF_INIT;
- struct child_process ec_process;
+ struct child_process ec_process = CHILD_PROCESS_INIT;
const char *argv_ec[] = { "emacsclient", "--version", NULL };
int version;
/* emacsclient prints its version number on stderr */
- memset(&ec_process, 0, sizeof(ec_process));
ec_process.argv = argv_ec;
ec_process.err = -1;
ec_process.stdout_to_stderr = 1;
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 5568a5b..792c66c 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -112,6 +112,10 @@ static pthread_mutex_t deepest_delta_mutex;
#define deepest_delta_lock() lock_mutex(&deepest_delta_mutex)
#define deepest_delta_unlock() unlock_mutex(&deepest_delta_mutex)
+static pthread_mutex_t type_cas_mutex;
+#define type_cas_lock() lock_mutex(&type_cas_mutex)
+#define type_cas_unlock() unlock_mutex(&type_cas_mutex)
+
static pthread_key_t key;
static inline void lock_mutex(pthread_mutex_t *mutex)
@@ -135,6 +139,7 @@ static void init_thread(void)
init_recursive_mutex(&read_mutex);
pthread_mutex_init(&counter_mutex, NULL);
pthread_mutex_init(&work_mutex, NULL);
+ pthread_mutex_init(&type_cas_mutex, NULL);
if (show_stat)
pthread_mutex_init(&deepest_delta_mutex, NULL);
pthread_key_create(&key, NULL);
@@ -157,6 +162,7 @@ static void cleanup_thread(void)
pthread_mutex_destroy(&read_mutex);
pthread_mutex_destroy(&counter_mutex);
pthread_mutex_destroy(&work_mutex);
+ pthread_mutex_destroy(&type_cas_mutex);
if (show_stat)
pthread_mutex_destroy(&deepest_delta_mutex);
for (i = 0; i < nr_threads; i++)
@@ -773,7 +779,8 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
if (!obj)
die(_("invalid %s"), typename(type));
if (do_fsck_object &&
- fsck_object(obj, 1, fsck_error_function))
+ fsck_object(obj, buf, size, 1,
+ fsck_error_function))
die(_("Error in object"));
if (fsck_walk(obj, mark_link, NULL))
die(_("Not all child objects of %s are reachable"), sha1_to_hex(obj->sha1));
@@ -862,7 +869,6 @@ static void resolve_delta(struct object_entry *delta_obj,
{
void *base_data, *delta_data;
- delta_obj->real_type = base->obj->real_type;
if (show_stat) {
delta_obj->delta_depth = base->obj->delta_depth + 1;
deepest_delta_lock();
@@ -888,6 +894,26 @@ static void resolve_delta(struct object_entry *delta_obj,
counter_unlock();
}
+/*
+ * Standard boolean compare-and-swap: atomically check whether "*type" is
+ * "want"; if so, swap in "set" and return true. Otherwise, leave it untouched
+ * and return false.
+ */
+static int compare_and_swap_type(enum object_type *type,
+ enum object_type want,
+ enum object_type set)
+{
+ enum object_type old;
+
+ type_cas_lock();
+ old = *type;
+ if (old == want)
+ *type = set;
+ type_cas_unlock();
+
+ return old == want;
+}
+
static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct base_data *prev_base)
{
@@ -915,7 +941,10 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct object_entry *child = objects + deltas[base->ref_first].obj_no;
struct base_data *result = alloc_base_data();
- assert(child->real_type == OBJ_REF_DELTA);
+ if (!compare_and_swap_type(&child->real_type, OBJ_REF_DELTA,
+ base->obj->real_type))
+ die("BUG: child->real_type != OBJ_REF_DELTA");
+
resolve_delta(child, base, result);
if (base->ref_first == base->ref_last && base->ofs_last == -1)
free_base_data(base);
@@ -929,6 +958,7 @@ static struct base_data *find_unresolved_deltas_1(struct base_data *base,
struct base_data *result = alloc_base_data();
assert(child->real_type == OBJ_OFS_DELTA);
+ child->real_type = base->obj->real_type;
resolve_delta(child, base, result);
if (base->ofs_first == base->ofs_last)
free_base_data(base);
@@ -1140,9 +1170,7 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
int nr_objects_initial = nr_objects;
if (nr_unresolved <= 0)
die(_("confusion beyond insanity"));
- objects = xrealloc(objects,
- (nr_objects + nr_unresolved + 1)
- * sizeof(*objects));
+ REALLOC_ARRAY(objects, nr_objects + nr_unresolved + 1);
memset(objects + nr_objects + 1, 0,
nr_unresolved * sizeof(*objects));
f = sha1fd(output_fd, curr_pack);
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 56f85e2..587a505 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -330,12 +330,12 @@ int set_git_dir_init(const char *git_dir, const char *real_git_dir,
* moving the target repo later on in separate_git_dir()
*/
git_link = xstrdup(real_path(git_dir));
+ set_git_dir(real_path(real_git_dir));
}
else {
- real_git_dir = real_path(git_dir);
+ set_git_dir(real_path(git_dir));
git_link = NULL;
}
- set_git_dir(real_path(real_git_dir));
return 0;
}
@@ -426,8 +426,9 @@ int init_db(const char *template_dir, unsigned int flags)
static int guess_repository_type(const char *git_dir)
{
- char cwd[PATH_MAX];
const char *slash;
+ char *cwd;
+ int cwd_is_git_dir;
/*
* "GIT_DIR=. git init" is always bare.
@@ -435,9 +436,10 @@ static int guess_repository_type(const char *git_dir)
*/
if (!strcmp(".", git_dir))
return 1;
- if (!getcwd(cwd, sizeof(cwd)))
- die_errno(_("cannot tell cwd"));
- if (!strcmp(git_dir, cwd))
+ cwd = xgetcwd();
+ cwd_is_git_dir = !strcmp(git_dir, cwd);
+ free(cwd);
+ if (cwd_is_git_dir)
return 1;
/*
* "GIT_DIR=.git or GIT_DIR=something/.git is usually not.
@@ -535,10 +537,9 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
usage(init_db_usage[0]);
}
if (is_bare_repository_cfg == 1) {
- static char git_dir[PATH_MAX+1];
-
- setenv(GIT_DIR_ENVIRONMENT,
- getcwd(git_dir, sizeof(git_dir)), argc > 0);
+ char *cwd = xgetcwd();
+ setenv(GIT_DIR_ENVIRONMENT, cwd, argc > 0);
+ free(cwd);
}
if (init_shared_repository != -1)
@@ -572,13 +573,10 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
git_work_tree_cfg = xstrdup(real_path(rel));
free(rel);
}
- if (!git_work_tree_cfg) {
- git_work_tree_cfg = xcalloc(PATH_MAX, 1);
- if (!getcwd(git_work_tree_cfg, PATH_MAX))
- die_errno (_("Cannot access current working directory"));
- }
+ if (!git_work_tree_cfg)
+ git_work_tree_cfg = xgetcwd();
if (work_tree)
- set_git_work_tree(real_path(work_tree));
+ set_git_work_tree(work_tree);
else
set_git_work_tree(git_work_tree_cfg);
if (access(get_git_work_tree(), X_OK))
@@ -587,7 +585,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
}
else {
if (work_tree)
- set_git_work_tree(real_path(work_tree));
+ set_git_work_tree(work_tree);
}
set_git_dir_init(git_dir, real_git_dir, 1);
diff --git a/builtin/log.c b/builtin/log.c
index 4389722..2fb34c7 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -78,7 +78,7 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse
decoration_style = DECORATE_SHORT_REFS;
if (decoration_style < 0)
- die("invalid --decorate option: %s", arg);
+ die(_("invalid --decorate option: %s"), arg);
decoration_given = 1;
@@ -130,7 +130,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
{ OPTION_CALLBACK, 0, "decorate", NULL, NULL, N_("decorate options"),
PARSE_OPT_OPTARG, decorate_callback},
OPT_CALLBACK('L', NULL, &line_cb, "n,m:file",
- "Process line range n,m in file, counting from 1",
+ N_("Process line range n,m in file, counting from 1"),
log_line_range_callback),
OPT_END()
};
@@ -150,7 +150,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
/* Any arguments at this point are not recognized */
if (argc > 1)
- die("unrecognized argument: %s", argv[1]);
+ die(_("unrecognized argument: %s"), argv[1]);
memset(&w, 0, sizeof(w));
userformat_find_requirements(NULL, &w);
@@ -447,13 +447,13 @@ static int show_blob_object(const unsigned char *sha1, struct rev_info *rev, con
return stream_blob_to_fd(1, sha1, NULL, 0);
if (get_sha1_with_context(obj_name, 0, sha1c, &obj_context))
- die("Not a valid object name %s", obj_name);
+ die(_("Not a valid object name %s"), obj_name);
if (!obj_context.path[0] ||
!textconv_object(obj_context.path, obj_context.mode, sha1c, 1, &buf, &size))
return stream_blob_to_fd(1, sha1, NULL, 0);
if (!buf)
- die("git show %s: bad file", obj_name);
+ die(_("git show %s: bad file"), obj_name);
write_or_die(1, buf, size);
return 0;
@@ -864,6 +864,7 @@ static void add_branch_description(struct strbuf *buf, const char *branch_name)
strbuf_addbuf(buf, &desc);
strbuf_addch(buf, '\n');
}
+ strbuf_release(&desc);
}
static char *find_branch_name(struct rev_info *rev)
@@ -1439,7 +1440,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
continue;
nr++;
- list = xrealloc(list, nr * sizeof(list[0]));
+ REALLOC_ARRAY(list, nr);
list[nr - 1] = commit;
}
if (nr == 0)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 47c3880..99cee20 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -474,7 +474,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
OPT_BOOL('k', "killed", &show_killed,
N_("show files on the filesystem that need to be removed")),
OPT_BIT(0, "directory", &dir.flags,
- N_("show 'other' directories' name only"),
+ N_("show 'other' directories' names only"),
DIR_SHOW_OTHER_DIRECTORIES),
OPT_NEGBIT(0, "empty-directory", &dir.flags,
N_("don't show empty directories"),
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index cf11c8d..6a14d29 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -288,6 +288,22 @@ static inline int cmp_header(const struct strbuf *line, const char *hdr)
line->buf[len] == ':' && isspace(line->buf[len + 1]);
}
+static int is_format_patch_separator(const char *line, int len)
+{
+ static const char SAMPLE[] =
+ "From e6807f3efca28b30decfecb1732a56c7db1137ee Mon Sep 17 00:00:00 2001\n";
+ const char *cp;
+
+ if (len != strlen(SAMPLE))
+ return 0;
+ if (!skip_prefix(line, "From ", &cp))
+ return 0;
+ if (strspn(cp, "0123456789abcdef") != 40)
+ return 0;
+ cp += 40;
+ return !memcmp(SAMPLE + (cp - line), cp, strlen(SAMPLE) - (cp - line));
+}
+
static int check_header(const struct strbuf *line,
struct strbuf *hdr_data[], int overwrite)
{
@@ -329,7 +345,7 @@ static int check_header(const struct strbuf *line,
/* for inbody stuff */
if (starts_with(line->buf, ">From") && isspace(line->buf[5])) {
- ret = 1; /* Should this return 0? */
+ ret = is_format_patch_separator(line->buf + 1, line->len - 1);
goto check_header_out;
}
if (starts_with(line->buf, "[PATCH]") && isspace(line->buf[7])) {
diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
index 06296d4..763cda0 100644
--- a/builtin/mailsplit.c
+++ b/builtin/mailsplit.c
@@ -53,14 +53,16 @@ static int keep_cr;
*/
static int split_one(FILE *mbox, const char *name, int allow_bare)
{
- FILE *output = NULL;
+ FILE *output;
int fd;
int status = 0;
int is_bare = !is_from_line(buf.buf, buf.len);
- if (is_bare && !allow_bare)
- goto corrupt;
-
+ if (is_bare && !allow_bare) {
+ unlink(name);
+ fprintf(stderr, "corrupt mailbox\n");
+ exit(1);
+ }
fd = open(name, O_WRONLY | O_CREAT | O_EXCL, 0666);
if (fd < 0)
die_errno("cannot open output file '%s'", name);
@@ -91,13 +93,6 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
}
fclose(output);
return status;
-
- corrupt:
- if (output)
- fclose(output);
- unlink(name);
- fprintf(stderr, "corrupt mailbox\n");
- exit(1);
}
static int populate_maildir_list(struct string_list *list, const char *path)
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 61cbde4..f9ab485 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -25,7 +25,7 @@ static void add_merge_entry(struct merge_list *entry)
merge_result_end = &entry->next;
}
-static void merge_trees_recursive(struct tree_desc t[3], const char *base, int df_conflict);
+static void merge_trees(struct tree_desc t[3], const char *base);
static const char *explanation(struct merge_list *entry)
{
@@ -195,8 +195,8 @@ static void resolve(const struct traverse_info *info, struct name_entry *ours, s
add_merge_entry(final);
}
-static void unresolved_directory(const struct traverse_info *info, struct name_entry n[3],
- int df_conflict)
+static void unresolved_directory(const struct traverse_info *info,
+ struct name_entry n[3])
{
char *newbase;
struct name_entry *p;
@@ -218,7 +218,7 @@ static void unresolved_directory(const struct traverse_info *info, struct name_e
buf2 = fill_tree_descriptor(t+2, ENTRY_SHA1(n + 2));
#undef ENTRY_SHA1
- merge_trees_recursive(t, newbase, df_conflict);
+ merge_trees(t, newbase);
free(buf0);
free(buf1);
@@ -259,7 +259,7 @@ static void unresolved(const struct traverse_info *info, struct name_entry n[3])
dirmask |= (1 << i);
}
- unresolved_directory(info, n, dirmask && (dirmask != mask));
+ unresolved_directory(info, n);
if (dirmask == mask)
return;
@@ -335,21 +335,15 @@ static int threeway_callback(int n, unsigned long mask, unsigned long dirmask, s
return mask;
}
-static void merge_trees_recursive(struct tree_desc t[3], const char *base, int df_conflict)
+static void merge_trees(struct tree_desc t[3], const char *base)
{
struct traverse_info info;
setup_traverse_info(&info, base);
- info.data = &df_conflict;
info.fn = threeway_callback;
traverse_trees(3, t, &info);
}
-static void merge_trees(struct tree_desc t[3], const char *base)
-{
- merge_trees_recursive(t, base, 0);
-}
-
static void *get_tree_descriptor(struct tree_desc *desc, const char *rev)
{
unsigned char sha1[20];
diff --git a/builtin/merge.c b/builtin/merge.c
index ce82eb2..dff043d 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -237,11 +237,10 @@ static void drop_save(void)
static int save_state(unsigned char *stash)
{
int len;
- struct child_process cp;
+ struct child_process cp = CHILD_PROCESS_INIT;
struct strbuf buffer = STRBUF_INIT;
const char *argv[] = {"stash", "create", NULL};
- memset(&cp, 0, sizeof(cp));
cp.argv = argv;
cp.out = -1;
cp.git_cmd = 1;
@@ -557,7 +556,7 @@ static void parse_branch_merge_options(char *bmo)
if (argc < 0)
die(_("Bad branch.%s.mergeoptions string: %s"), branch,
split_cmdline_strerror(argc));
- argv = xrealloc(argv, sizeof(*argv) * (argc + 2));
+ REALLOC_ARRAY(argv, argc + 2);
memmove(argv + 1, argv, sizeof(*argv) * (argc + 1));
argc++;
argv[0] = "branch.*.mergeoptions";
@@ -1144,14 +1143,14 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
*/
if (advice_resolve_conflict)
die(_("You have not concluded your merge (MERGE_HEAD exists).\n"
- "Please, commit your changes before you can merge."));
+ "Please, commit your changes before you merge."));
else
die(_("You have not concluded your merge (MERGE_HEAD exists)."));
}
if (file_exists(git_path("CHERRY_PICK_HEAD"))) {
if (advice_resolve_conflict)
die(_("You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\n"
- "Please, commit your changes before you can merge."));
+ "Please, commit your changes before you merge."));
else
die(_("You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists)."));
}
diff --git a/builtin/mv.c b/builtin/mv.c
index 6ffe540..8883baa 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -61,6 +61,46 @@ static const char *add_slash(const char *path)
static struct lock_file lock_file;
#define SUBMODULE_WITH_GITDIR ((const char *)1)
+static void prepare_move_submodule(const char *src, int first,
+ const char **submodule_gitfile)
+{
+ struct strbuf submodule_dotgit = STRBUF_INIT;
+ if (!S_ISGITLINK(active_cache[first]->ce_mode))
+ die(_("Directory %s is in index and no submodule?"), src);
+ if (!is_staging_gitmodules_ok())
+ die(_("Please stage your changes to .gitmodules or stash them to proceed"));
+ strbuf_addf(&submodule_dotgit, "%s/.git", src);
+ *submodule_gitfile = read_gitfile(submodule_dotgit.buf);
+ if (*submodule_gitfile)
+ *submodule_gitfile = xstrdup(*submodule_gitfile);
+ else
+ *submodule_gitfile = SUBMODULE_WITH_GITDIR;
+ strbuf_release(&submodule_dotgit);
+}
+
+static int index_range_of_same_dir(const char *src, int length,
+ int *first_p, int *last_p)
+{
+ const char *src_w_slash = add_slash(src);
+ int first, last, len_w_slash = length + 1;
+
+ first = cache_name_pos(src_w_slash, len_w_slash);
+ if (first >= 0)
+ die(_("%.*s is in index"), len_w_slash, src_w_slash);
+
+ first = -1 - first;
+ for (last = first; last < active_nr; last++) {
+ const char *path = active_cache[last]->name;
+ if (strncmp(path, src_w_slash, len_w_slash))
+ break;
+ }
+ if (src_w_slash != src)
+ free((char *)src_w_slash);
+ *first_p = first;
+ *last_p = last;
+ return last - first;
+}
+
int cmd_mv(int argc, const char **argv, const char *prefix)
{
int i, gitmodules_modified = 0;
@@ -108,7 +148,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
destination = internal_copy_pathspec(dest_path[0], argv, argc, DUP_BASENAME);
} else {
if (argc != 1)
- die("destination '%s' is not a directory", dest_path[0]);
+ die(_("destination '%s' is not a directory"), dest_path[0]);
destination = dest_path;
}
@@ -131,75 +171,36 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
&& lstat(dst, &st) == 0)
bad = _("cannot move directory over file");
else if (src_is_dir) {
- int first = cache_name_pos(src, length);
- if (first >= 0) {
- struct strbuf submodule_dotgit = STRBUF_INIT;
- if (!S_ISGITLINK(active_cache[first]->ce_mode))
- die (_("Huh? Directory %s is in index and no submodule?"), src);
- if (!is_staging_gitmodules_ok())
- die (_("Please, stage your changes to .gitmodules or stash them to proceed"));
- strbuf_addf(&submodule_dotgit, "%s/.git", src);
- submodule_gitfile[i] = read_gitfile(submodule_dotgit.buf);
- if (submodule_gitfile[i])
- submodule_gitfile[i] = xstrdup(submodule_gitfile[i]);
- else
- submodule_gitfile[i] = SUBMODULE_WITH_GITDIR;
- strbuf_release(&submodule_dotgit);
- } else {
- const char *src_w_slash = add_slash(src);
- int last, len_w_slash = length + 1;
+ int first = cache_name_pos(src, length), last;
- modes[i] = WORKING_DIRECTORY;
+ if (first >= 0)
+ prepare_move_submodule(src, first,
+ submodule_gitfile + i);
+ else if (index_range_of_same_dir(src, length,
+ &first, &last) < 1)
+ bad = _("source directory is empty");
+ else { /* last - first >= 1 */
+ int j, dst_len, n;
- first = cache_name_pos(src_w_slash, len_w_slash);
- if (first >= 0)
- die (_("Huh? %.*s is in index?"),
- len_w_slash, src_w_slash);
-
- first = -1 - first;
- for (last = first; last < active_nr; last++) {
- const char *path = active_cache[last]->name;
- if (strncmp(path, src_w_slash, len_w_slash))
- break;
- }
- if (src_w_slash != src)
- free((char *)src_w_slash);
-
- if (last - first < 1)
- bad = _("source directory is empty");
- else {
- int j, dst_len;
-
- if (last - first > 0) {
- source = xrealloc(source,
- (argc + last - first)
- * sizeof(char *));
- destination = xrealloc(destination,
- (argc + last - first)
- * sizeof(char *));
- modes = xrealloc(modes,
- (argc + last - first)
- * sizeof(enum update_mode));
- submodule_gitfile = xrealloc(submodule_gitfile,
- (argc + last - first)
- * sizeof(char *));
- }
+ modes[i] = WORKING_DIRECTORY;
+ n = argc + last - first;
+ REALLOC_ARRAY(source, n);
+ REALLOC_ARRAY(destination, n);
+ REALLOC_ARRAY(modes, n);
+ REALLOC_ARRAY(submodule_gitfile, n);
- dst = add_slash(dst);
- dst_len = strlen(dst);
+ dst = add_slash(dst);
+ dst_len = strlen(dst);
- for (j = 0; j < last - first; j++) {
- const char *path =
- active_cache[first + j]->name;
- source[argc + j] = path;
- destination[argc + j] =
- prefix_path(dst, dst_len,
- path + length + 1);
- modes[argc + j] = INDEX;
- submodule_gitfile[argc + j] = NULL;
- }
- argc += last - first;
+ for (j = 0; j < last - first; j++) {
+ const char *path = active_cache[first + j]->name;
+ source[argc + j] = path;
+ destination[argc + j] =
+ prefix_path(dst, dst_len, path + length + 1);
+ modes[argc + j] = INDEX;
+ submodule_gitfile[argc + j] = NULL;
}
+ argc += last - first;
}
} else if (cache_name_pos(src, length) < 0)
bad = _("not under version control");
@@ -225,24 +226,22 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
else
string_list_insert(&src_for_dst, dst);
- if (bad) {
- if (ignore_errors) {
- if (--argc > 0) {
- memmove(source + i, source + i + 1,
- (argc - i) * sizeof(char *));
- memmove(destination + i,
- destination + i + 1,
- (argc - i) * sizeof(char *));
- memmove(modes + i, modes + i + 1,
- (argc - i) * sizeof(enum update_mode));
- memmove(submodule_gitfile + i,
- submodule_gitfile + i + 1,
- (argc - i) * sizeof(char *));
- i--;
- }
- } else
- die (_("%s, source=%s, destination=%s"),
- bad, src, dst);
+ if (!bad)
+ continue;
+ if (!ignore_errors)
+ die(_("%s, source=%s, destination=%s"),
+ bad, src, dst);
+ if (--argc > 0) {
+ int n = argc - i;
+ memmove(source + i, source + i + 1,
+ n * sizeof(char *));
+ memmove(destination + i, destination + i + 1,
+ n * sizeof(char *));
+ memmove(modes + i, modes + i + 1,
+ n * sizeof(enum update_mode));
+ memmove(submodule_gitfile + i, submodule_gitfile + i + 1,
+ n * sizeof(char *));
+ i--;
}
}
@@ -254,7 +253,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
printf(_("Renaming %s to %s\n"), src, dst);
if (!show_only && mode != INDEX) {
if (rename(src, dst) < 0 && !ignore_errors)
- die_errno (_("renaming '%s' failed"), src);
+ die_errno(_("renaming '%s' failed"), src);
if (submodule_gitfile[i]) {
if (submodule_gitfile[i] != SUBMODULE_WITH_GITDIR)
connect_work_tree_and_git_dir(dst, submodule_gitfile[i]);
@@ -275,10 +274,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
if (gitmodules_modified)
stage_updated_gitmodules();
- if (active_cache_changed) {
- if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
- die(_("Unable to write new index file"));
- }
+ if (active_cache_changed &&
+ write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
+ die(_("Unable to write new index file"));
return 0;
}
diff --git a/builtin/notes.c b/builtin/notes.c
index 820c341..67d0bb1 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -122,12 +122,11 @@ static void write_commented_object(int fd, const unsigned char *object)
{
const char *show_args[5] =
{"show", "--stat", "--no-notes", sha1_to_hex(object), NULL};
- struct child_process show;
+ struct child_process show = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT;
struct strbuf cbuf = STRBUF_INIT;
/* Invoke "git show --stat --no-notes $object" */
- memset(&show, 0, sizeof(show));
show.argv = show_args;
show.no_stdin = 1;
show.out = -1;
@@ -211,7 +210,7 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
error(_("unable to write note object"));
if (path)
- error(_("The note contents has been left in %s"),
+ error(_("The note contents have been left in %s"),
path);
exit(128);
}
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 238b502..d391934 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -89,8 +89,7 @@ static void index_commit_for_bitmap(struct commit *commit)
{
if (indexed_commits_nr >= indexed_commits_alloc) {
indexed_commits_alloc = (indexed_commits_alloc + 32) * 2;
- indexed_commits = xrealloc(indexed_commits,
- indexed_commits_alloc * sizeof(struct commit *));
+ REALLOC_ARRAY(indexed_commits, indexed_commits_alloc);
}
indexed_commits[indexed_commits_nr++] = commit;
@@ -2494,6 +2493,7 @@ static void get_object_list(int ac, const char **av)
if (get_sha1_hex(line + 10, sha1))
die("not an SHA-1 '%s'", line + 10);
register_shallow(sha1);
+ use_bitmap_index = 0;
continue;
}
die("not a rev '%s'", line);
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index 6879468..d430731 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -68,6 +68,7 @@ void prune_packed_objects(int opts)
rmdir(pathname.buf);
}
stop_progress(&progress);
+ strbuf_release(&pathname);
}
int cmd_prune_packed(int argc, const char **argv, const char *prefix)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index f93ac45..daf0600 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -15,6 +15,7 @@
#include "connected.h"
#include "argv-array.h"
#include "version.h"
+#include "sigchain.h"
static const char receive_pack_usage[] = "git receive-pack <git-dir>";
@@ -255,7 +256,7 @@ static int copy_to_sideband(int in, int out, void *arg)
typedef int (*feed_fn)(void *, const char **, size_t *);
static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_state)
{
- struct child_process proc;
+ struct child_process proc = CHILD_PROCESS_INIT;
struct async muxer;
const char *argv[2];
int code;
@@ -266,7 +267,6 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
argv[1] = NULL;
- memset(&proc, 0, sizeof(proc));
proc.argv = argv;
proc.in = -1;
proc.stdout_to_stderr = 1;
@@ -288,6 +288,8 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
return code;
}
+ sigchain_push(SIGPIPE, SIG_IGN);
+
while (1) {
const char *buf;
size_t n;
@@ -299,6 +301,9 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
close(proc.in);
if (use_sideband)
finish_async(&muxer);
+
+ sigchain_pop(SIGPIPE);
+
return finish_command(&proc);
}
@@ -350,7 +355,7 @@ static int run_receive_hook(struct command *commands, const char *hook_name,
static int run_update_hook(struct command *cmd)
{
const char *argv[5];
- struct child_process proc;
+ struct child_process proc = CHILD_PROCESS_INIT;
int code;
argv[0] = find_hook("update");
@@ -362,7 +367,6 @@ static int run_update_hook(struct command *cmd)
argv[3] = sha1_to_hex(cmd->new_sha1);
argv[4] = NULL;
- memset(&proc, 0, sizeof(proc));
proc.no_stdin = 1;
proc.stdout_to_stderr = 1;
proc.err = use_sideband ? -1 : 0;
@@ -475,7 +479,6 @@ static const char *update(struct command *cmd, struct shallow_info *si)
const char *namespaced_name;
unsigned char *old_sha1 = cmd->old_sha1;
unsigned char *new_sha1 = cmd->new_sha1;
- struct ref_lock *lock;
/* only refs/... are allowed */
if (!starts_with(name, "refs/") || check_refname_format(name + 5, 0)) {
@@ -576,19 +579,27 @@ static const char *update(struct command *cmd, struct shallow_info *si)
return NULL; /* good */
}
else {
+ struct strbuf err = STRBUF_INIT;
+ struct ref_transaction *transaction;
+
if (shallow_update && si->shallow_ref[cmd->index] &&
update_shallow_ref(cmd, si))
return "shallow error";
- lock = lock_any_ref_for_update(namespaced_name, old_sha1,
- 0, NULL);
- if (!lock) {
- rp_error("failed to lock %s", name);
- return "failed to lock";
- }
- if (write_ref_sha1(lock, new_sha1, "push")) {
- return "failed to write"; /* error() already called */
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, namespaced_name,
+ new_sha1, old_sha1, 0, 1, &err) ||
+ ref_transaction_commit(transaction, "push", &err)) {
+ ref_transaction_free(transaction);
+
+ rp_error("%s", err.buf);
+ strbuf_release(&err);
+ return "failed to update ref";
}
+
+ ref_transaction_free(transaction);
+ strbuf_release(&err);
return NULL; /* good */
}
}
@@ -598,7 +609,7 @@ static void run_update_post_hook(struct command *commands)
struct command *cmd;
int argc;
const char **argv;
- struct child_process proc;
+ struct child_process proc = CHILD_PROCESS_INIT;
char *hook;
hook = find_hook("post-update");
@@ -621,7 +632,6 @@ static void run_update_post_hook(struct command *commands)
}
argv[argc] = NULL;
- memset(&proc, 0, sizeof(proc));
proc.no_stdin = 1;
proc.stdout_to_stderr = 1;
proc.err = use_sideband ? -1 : 0;
@@ -911,7 +921,7 @@ static const char *unpack(int err_fd, struct shallow_info *si)
const char *hdr_err;
int status;
char hdr_arg[38];
- struct child_process child;
+ struct child_process child = CHILD_PROCESS_INIT;
int fsck_objects = (receive_fsck_objects >= 0
? receive_fsck_objects
: transfer_fsck_objects >= 0
@@ -933,7 +943,6 @@ static const char *unpack(int err_fd, struct shallow_info *si)
argv_array_pushl(&av, "--shallow-file", alt_shallow_file, NULL);
}
- memset(&child, 0, sizeof(child));
if (ntohl(hdr.hdr_entries) < unpack_limit) {
argv_array_pushl(&av, "unpack-objects", hdr_arg, NULL);
if (quiet)
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c
index 692c834..d699d28 100644
--- a/builtin/remote-ext.c
+++ b/builtin/remote-ext.c
@@ -179,9 +179,8 @@ static void send_git_request(int stdin_fd, const char *serv, const char *repo,
static int run_child(const char *arg, const char *service)
{
int r;
- struct child_process child;
+ struct child_process child = CHILD_PROCESS_INIT;
- memset(&child, 0, sizeof(child));
child.in = -1;
child.out = -1;
child.err = 0;
diff --git a/builtin/repack.c b/builtin/repack.c
index a77e743..2aae05d 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -133,7 +133,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
{".idx"},
{".bitmap", 1},
};
- struct child_process cmd;
+ struct child_process cmd = CHILD_PROCESS_INIT;
struct string_list_item *item;
struct argv_array cmd_args = ARGV_ARRAY_INIT;
struct string_list names = STRING_LIST_INIT_DUP;
@@ -250,7 +250,6 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
argv_array_push(&cmd_args, packtmp);
- memset(&cmd, 0, sizeof(cmd));
cmd.argv = cmd_args.argv;
cmd.git_cmd = 1;
cmd.out = -1;
@@ -378,6 +377,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
/* End of pack replacement. */
if (delete_redundant) {
+ int opts = 0;
sort_string_list(&names);
for_each_string_list_item(item, &existing_packs) {
char *sha1;
@@ -388,25 +388,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
if (!string_list_has_string(&names, sha1))
remove_redundant_pack(packdir, item->string);
}
- argv_array_push(&cmd_args, "prune-packed");
- if (quiet)
- argv_array_push(&cmd_args, "--quiet");
-
- memset(&cmd, 0, sizeof(cmd));
- cmd.argv = cmd_args.argv;
- cmd.git_cmd = 1;
- run_command(&cmd);
- argv_array_clear(&cmd_args);
+ if (!quiet && isatty(2))
+ opts |= PRUNE_PACKED_VERBOSE;
+ prune_packed_objects(opts);
}
- if (!no_update_server_info) {
- argv_array_push(&cmd_args, "update-server-info");
- memset(&cmd, 0, sizeof(cmd));
- cmd.argv = cmd_args.argv;
- cmd.git_cmd = 1;
- run_command(&cmd);
- argv_array_clear(&cmd_args);
- }
+ if (!no_update_server_info)
+ update_server_info(0);
remove_temporary_files();
string_list_clear(&names, 0);
string_list_clear(&rollback, 0);
diff --git a/builtin/replace.c b/builtin/replace.c
index 294b61b..8020db8 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -155,7 +155,8 @@ static int replace_object_sha1(const char *object_ref,
unsigned char prev[20];
enum object_type obj_type, repl_type;
char ref[PATH_MAX];
- struct ref_lock *lock;
+ struct ref_transaction *transaction;
+ struct strbuf err = STRBUF_INIT;
obj_type = sha1_object_info(object, NULL);
repl_type = sha1_object_info(repl, NULL);
@@ -168,12 +169,13 @@ static int replace_object_sha1(const char *object_ref,
check_ref_valid(object, prev, ref, sizeof(ref), force);
- lock = lock_any_ref_for_update(ref, prev, 0, NULL);
- if (!lock)
- die("%s: cannot lock the ref", ref);
- if (write_ref_sha1(lock, repl, NULL) < 0)
- die("%s: cannot update the ref", ref);
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, ref, repl, prev, 0, 1, &err) ||
+ ref_transaction_commit(transaction, NULL, &err))
+ die("%s", err.buf);
+ ref_transaction_free(transaction);
return 0;
}
@@ -197,7 +199,7 @@ static int replace_object(const char *object_ref, const char *replace_ref, int f
static void export_object(const unsigned char *sha1, enum object_type type,
int raw, const char *filename)
{
- struct child_process cmd = { NULL };
+ struct child_process cmd = CHILD_PROCESS_INIT;
int fd;
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
@@ -234,7 +236,7 @@ static void import_object(unsigned char *sha1, enum object_type type,
if (!raw && type == OBJ_TREE) {
const char *argv[] = { "mktree", NULL };
- struct child_process cmd = { argv };
+ struct child_process cmd = CHILD_PROCESS_INIT;
struct strbuf result = STRBUF_INIT;
cmd.argv = argv;
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index d85e08c..35d3c43 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -508,7 +508,9 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
int has_dashdash = 0;
int output_prefix = 0;
unsigned char sha1[20];
+ unsigned int flags = 0;
const char *name = NULL;
+ struct object_context unused;
if (argc > 1 && !strcmp("--parseopt", argv[1]))
return cmd_parseopt(argc - 1, argv + 1, prefix);
@@ -596,6 +598,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
}
if (!strcmp(arg, "--quiet") || !strcmp(arg, "-q")) {
quiet = 1;
+ flags |= GET_SHA1_QUIETLY;
continue;
}
if (!strcmp(arg, "--short") ||
@@ -736,7 +739,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
}
if (!strcmp(arg, "--git-dir")) {
const char *gitdir = getenv(GIT_DIR_ENVIRONMENT);
- static char cwd[PATH_MAX];
+ char *cwd;
int len;
if (gitdir) {
puts(gitdir);
@@ -746,10 +749,10 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
puts(".git");
continue;
}
- if (!getcwd(cwd, PATH_MAX))
- die_errno("unable to get current working directory");
+ cwd = xgetcwd();
len = strlen(cwd);
printf("%s%s.git\n", cwd, len && cwd[len-1] != '/' ? "/" : "");
+ free(cwd);
continue;
}
if (!strcmp(arg, "--resolve-git-dir")) {
@@ -818,7 +821,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
name++;
type = REVERSED;
}
- if (!get_sha1(name, sha1)) {
+ if (!get_sha1_with_context(name, flags, sha1, &unused)) {
if (verify)
revs_count++;
else
diff --git a/builtin/rm.c b/builtin/rm.c
index bc6490b..2b61d3b 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -65,7 +65,7 @@ static void error_removing_concrete_submodules(struct string_list *files, int *e
Q_("the following submodule (or one of its nested "
"submodules)\n"
"uses a .git directory:",
- "the following submodules (or one of its nested "
+ "the following submodules (or one of their nested "
"submodules)\n"
"use a .git directory:", files->nr),
_("\n(use 'rm -rf' if you really want to remove "
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index f420b74..4b1bc0f 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -110,6 +110,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
int flags;
unsigned int reject_reasons;
int progress = -1;
+ int from_stdin = 0;
struct push_cas_option cas = {0};
argv++;
@@ -169,6 +170,10 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
args.stateless_rpc = 1;
continue;
}
+ if (!strcmp(arg, "--stdin")) {
+ from_stdin = 1;
+ continue;
+ }
if (!strcmp(arg, "--helper-status")) {
helper_status = 1;
continue;
@@ -201,6 +206,28 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
}
if (!dest)
usage(send_pack_usage);
+
+ if (from_stdin) {
+ struct argv_array all_refspecs = ARGV_ARRAY_INIT;
+
+ for (i = 0; i < nr_refspecs; i++)
+ argv_array_push(&all_refspecs, refspecs[i]);
+
+ if (args.stateless_rpc) {
+ const char *buf;
+ while ((buf = packet_read_line(0, NULL)))
+ argv_array_push(&all_refspecs, buf);
+ } else {
+ struct strbuf line = STRBUF_INIT;
+ while (strbuf_getline(&line, stdin, '\n') != EOF)
+ argv_array_push(&all_refspecs, line.buf);
+ strbuf_release(&line);
+ }
+
+ refspecs = all_refspecs.argv;
+ nr_refspecs = all_refspecs.argc;
+ }
+
/*
* --all and --mirror are incompatible; neither makes sense
* with any refspecs.
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 298c95e..199b081 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -563,7 +563,7 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
default_arg[default_num++] = "show-branch";
} else if (default_alloc <= default_num + 1) {
default_alloc = default_alloc * 3 / 2 + 20;
- default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
+ REALLOC_ARRAY(default_arg, default_alloc);
}
default_arg[default_num++] = xstrdup(value);
default_arg[default_num] = NULL;
@@ -723,6 +723,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
char nth_desc[256];
char *ref;
int base = 0;
+ unsigned int flags = 0;
if (ac == 0) {
static const char *fake_av[2];
@@ -749,7 +750,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
/* Ah, that is a date spec... */
unsigned long at;
at = approxidate(reflog_base);
- read_ref_at(ref, at, -1, sha1, NULL,
+ read_ref_at(ref, flags, at, -1, sha1, NULL,
NULL, NULL, &base);
}
}
@@ -760,7 +761,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
unsigned long timestamp;
int tz;
- if (read_ref_at(ref, 0, base+i, sha1, &logmsg,
+ if (read_ref_at(ref, flags, 0, base+i, sha1, &logmsg,
&timestamp, &tz, NULL)) {
reflog = i;
break;
diff --git a/builtin/tag.c b/builtin/tag.c
index 19eb747..a81b9e4 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -576,7 +576,6 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
struct strbuf ref = STRBUF_INIT;
unsigned char object[20], prev[20];
const char *object_ref, *tag;
- struct ref_lock *lock;
struct create_tag_options opt;
char *cleanup_arg = NULL;
int annotate = 0, force = 0, lines = -1;
@@ -584,6 +583,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
const char *msgfile = NULL, *keyid = NULL;
struct msg_arg msg = { 0, STRBUF_INIT };
struct commit_list *with_commit = NULL;
+ struct ref_transaction *transaction;
+ struct strbuf err = STRBUF_INIT;
struct option options[] = {
OPT_CMDMODE('l', "list", &cmdmode, N_("list tag names"), 'l'),
{ OPTION_INTEGER, 'n', NULL, &lines, N_("n"),
@@ -729,14 +730,17 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
if (annotate)
create_tag(object, tag, &buf, &opt, prev, object);
- lock = lock_any_ref_for_update(ref.buf, prev, 0, NULL);
- if (!lock)
- die(_("%s: cannot lock the ref"), ref.buf);
- if (write_ref_sha1(lock, object, NULL) < 0)
- die(_("%s: cannot update the ref"), ref.buf);
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, ref.buf, object, prev,
+ 0, 1, &err) ||
+ ref_transaction_commit(transaction, NULL, &err))
+ die("%s", err.buf);
+ ref_transaction_free(transaction);
if (force && !is_null_sha1(prev) && hashcmp(prev, object))
printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev, DEFAULT_ABBREV));
+ strbuf_release(&err);
strbuf_release(&buf);
strbuf_release(&ref);
return 0;
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 99cde45..855d94b 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -164,10 +164,10 @@ static unsigned nr_objects;
* Called only from check_object() after it verified this object
* is Ok.
*/
-static void write_cached_object(struct object *obj)
+static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf)
{
unsigned char sha1[20];
- struct obj_buffer *obj_buf = lookup_object_buffer(obj);
+
if (write_sha1_file(obj_buf->buffer, obj_buf->size, typename(obj->type), sha1) < 0)
die("failed to write object %s", sha1_to_hex(obj->sha1));
obj->flags |= FLAG_WRITTEN;
@@ -180,6 +180,8 @@ static void write_cached_object(struct object *obj)
*/
static int check_object(struct object *obj, int type, void *data)
{
+ struct obj_buffer *obj_buf;
+
if (!obj)
return 1;
@@ -198,11 +200,15 @@ static int check_object(struct object *obj, int type, void *data)
return 0;
}
- if (fsck_object(obj, 1, fsck_error_function))
+ obj_buf = lookup_object_buffer(obj);
+ if (!obj_buf)
+ die("Whoops! Cannot find object '%s'", sha1_to_hex(obj->sha1));
+ if (fsck_object(obj, obj_buf->buffer, obj_buf->size, 1,
+ fsck_error_function))
die("Error in object");
if (fsck_walk(obj, check_object, NULL))
die("Error on reachable objects of %s", sha1_to_hex(obj->sha1));
- write_cached_object(obj);
+ write_cached_object(obj, obj_buf);
return 0;
}
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 3067b11..54a48c0 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -12,11 +12,8 @@ static const char * const git_update_ref_usage[] = {
NULL
};
-static struct ref_transaction *transaction;
-
static char line_termination = '\n';
static int update_flags;
-static struct strbuf err = STRBUF_INIT;
/*
* Parse one whitespace- or NUL-terminated, possibly C-quoted argument
@@ -177,8 +174,10 @@ static int parse_next_sha1(struct strbuf *input, const char **next,
* depending on how line_termination is set.
*/
-static const char *parse_cmd_update(struct strbuf *input, const char *next)
+static const char *parse_cmd_update(struct ref_transaction *transaction,
+ struct strbuf *input, const char *next)
{
+ struct strbuf err = STRBUF_INIT;
char *refname;
unsigned char new_sha1[20];
unsigned char old_sha1[20];
@@ -204,12 +203,15 @@ static const char *parse_cmd_update(struct strbuf *input, const char *next)
update_flags = 0;
free(refname);
+ strbuf_release(&err);
return next;
}
-static const char *parse_cmd_create(struct strbuf *input, const char *next)
+static const char *parse_cmd_create(struct ref_transaction *transaction,
+ struct strbuf *input, const char *next)
{
+ struct strbuf err = STRBUF_INIT;
char *refname;
unsigned char new_sha1[20];
@@ -226,16 +228,21 @@ static const char *parse_cmd_create(struct strbuf *input, const char *next)
if (*next != line_termination)
die("create %s: extra input: %s", refname, next);
- ref_transaction_create(transaction, refname, new_sha1, update_flags);
+ if (ref_transaction_create(transaction, refname, new_sha1,
+ update_flags, &err))
+ die("%s", err.buf);
update_flags = 0;
free(refname);
+ strbuf_release(&err);
return next;
}
-static const char *parse_cmd_delete(struct strbuf *input, const char *next)
+static const char *parse_cmd_delete(struct ref_transaction *transaction,
+ struct strbuf *input, const char *next)
{
+ struct strbuf err = STRBUF_INIT;
char *refname;
unsigned char old_sha1[20];
int have_old;
@@ -256,17 +263,21 @@ static const char *parse_cmd_delete(struct strbuf *input, const char *next)
if (*next != line_termination)
die("delete %s: extra input: %s", refname, next);
- ref_transaction_delete(transaction, refname, old_sha1,
- update_flags, have_old);
+ if (ref_transaction_delete(transaction, refname, old_sha1,
+ update_flags, have_old, &err))
+ die("%s", err.buf);
update_flags = 0;
free(refname);
+ strbuf_release(&err);
return next;
}
-static const char *parse_cmd_verify(struct strbuf *input, const char *next)
+static const char *parse_cmd_verify(struct ref_transaction *transaction,
+ struct strbuf *input, const char *next)
{
+ struct strbuf err = STRBUF_INIT;
char *refname;
unsigned char new_sha1[20];
unsigned char old_sha1[20];
@@ -294,6 +305,7 @@ static const char *parse_cmd_verify(struct strbuf *input, const char *next)
update_flags = 0;
free(refname);
+ strbuf_release(&err);
return next;
}
@@ -307,7 +319,7 @@ static const char *parse_cmd_option(struct strbuf *input, const char *next)
return next + 8;
}
-static void update_refs_stdin(void)
+static void update_refs_stdin(struct ref_transaction *transaction)
{
struct strbuf input = STRBUF_INIT;
const char *next;
@@ -322,13 +334,13 @@ static void update_refs_stdin(void)
else if (isspace(*next))
die("whitespace before command: %s", next);
else if (starts_with(next, "update "))
- next = parse_cmd_update(&input, next + 7);
+ next = parse_cmd_update(transaction, &input, next + 7);
else if (starts_with(next, "create "))
- next = parse_cmd_create(&input, next + 7);
+ next = parse_cmd_create(transaction, &input, next + 7);
else if (starts_with(next, "delete "))
- next = parse_cmd_delete(&input, next + 7);
+ next = parse_cmd_delete(transaction, &input, next + 7);
else if (starts_with(next, "verify "))
- next = parse_cmd_verify(&input, next + 7);
+ next = parse_cmd_verify(transaction, &input, next + 7);
else if (starts_with(next, "option "))
next = parse_cmd_option(&input, next + 7);
else
@@ -362,15 +374,21 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
die("Refusing to perform update with empty message.");
if (read_stdin) {
- transaction = ref_transaction_begin();
+ struct strbuf err = STRBUF_INIT;
+ struct ref_transaction *transaction;
+
+ transaction = ref_transaction_begin(&err);
+ if (!transaction)
+ die("%s", err.buf);
if (delete || no_deref || argc > 0)
usage_with_options(git_update_ref_usage, options);
if (end_null)
line_termination = '\0';
- update_refs_stdin();
+ update_refs_stdin(transaction);
if (ref_transaction_commit(transaction, msg, &err))
die("%s", err.buf);
ref_transaction_free(transaction);
+ strbuf_release(&err);
return 0;
}
diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index 972579f..7747537 100644
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
@@ -8,7 +8,7 @@
static int verify_one_pack(const char *path, unsigned int flags)
{
- struct child_process index_pack;
+ struct child_process index_pack = CHILD_PROCESS_INIT;
const char *argv[] = {"index-pack", NULL, NULL, NULL };
struct strbuf arg = STRBUF_INIT;
int verbose = flags & VERIFY_PACK_VERBOSE;
@@ -32,7 +32,6 @@ static int verify_one_pack(const char *path, unsigned int flags)
strbuf_addstr(&arg, ".pack");
argv[2] = arg.buf;
- memset(&index_pack, 0, sizeof(index_pack));
index_pack.argv = argv;
index_pack.git_cmd = 1;
diff --git a/bundle.c b/bundle.c
index 71a21a6..b2b89fe 100644
--- a/bundle.c
+++ b/bundle.c
@@ -221,8 +221,8 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
line = memmem(buf, size, "\ntagger ", 8);
if (!line++)
return 1;
- lineend = memchr(line, buf + size - line, '\n');
- line = memchr(line, lineend ? lineend - line : buf + size - line, '>');
+ lineend = memchr(line, '\n', buf + size - line);
+ line = memchr(line, '>', lineend ? lineend - line : buf + size - line);
if (!line++)
return 1;
date = strtoul(line, NULL, 10);
@@ -240,7 +240,7 @@ int create_bundle(struct bundle_header *header, const char *path,
int i, ref_count = 0;
struct strbuf buf = STRBUF_INIT;
struct rev_info revs;
- struct child_process rls;
+ struct child_process rls = CHILD_PROCESS_INIT;
FILE *rls_fout;
bundle_to_stdout = !strcmp(path, "-");
@@ -258,7 +258,6 @@ int create_bundle(struct bundle_header *header, const char *path,
init_revisions(&revs, NULL);
/* write prerequisites */
- memset(&rls, 0, sizeof(rls));
argv_array_pushl(&rls.args,
"rev-list", "--boundary", "--pretty=oneline",
NULL);
@@ -417,14 +416,13 @@ int unbundle(struct bundle_header *header, int bundle_fd, int flags)
{
const char *argv_index_pack[] = {"index-pack",
"--fix-thin", "--stdin", NULL, NULL};
- struct child_process ip;
+ struct child_process ip = CHILD_PROCESS_INIT;
if (flags & BUNDLE_VERBOSE)
argv_index_pack[3] = "-v";
if (verify_bundle(header, 0))
return -1;
- memset(&ip, 0, sizeof(ip));
ip.argv = argv_index_pack;
ip.in = bundle_fd;
ip.no_stdout = 1;
diff --git a/cache-tree.c b/cache-tree.c
index c53f7de..75a54fd 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -246,9 +246,12 @@ static int update_one(struct cache_tree *it,
struct strbuf buffer;
int missing_ok = flags & WRITE_TREE_MISSING_OK;
int dryrun = flags & WRITE_TREE_DRY_RUN;
+ int repair = flags & WRITE_TREE_REPAIR;
int to_invalidate = 0;
int i;
+ assert(!(dryrun && repair));
+
*skip_count = 0;
if (0 <= it->entry_count && has_sha1_file(it->sha1))
@@ -320,6 +323,7 @@ static int update_one(struct cache_tree *it,
int pathlen, entlen;
const unsigned char *sha1;
unsigned mode;
+ int expected_missing = 0;
path = ce->name;
pathlen = ce_namelen(ce);
@@ -336,8 +340,10 @@ static int update_one(struct cache_tree *it,
i += sub->count;
sha1 = sub->cache_tree->sha1;
mode = S_IFDIR;
- if (sub->cache_tree->entry_count < 0)
+ if (sub->cache_tree->entry_count < 0) {
to_invalidate = 1;
+ expected_missing = 1;
+ }
}
else {
sha1 = ce->sha1;
@@ -347,6 +353,8 @@ static int update_one(struct cache_tree *it,
}
if (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1)) {
strbuf_release(&buffer);
+ if (expected_missing)
+ return -1;
return error("invalid object %06o %s for '%.*s'",
mode, sha1_to_hex(sha1), entlen+baselen, path);
}
@@ -381,7 +389,14 @@ static int update_one(struct cache_tree *it,
#endif
}
- if (dryrun)
+ if (repair) {
+ unsigned char sha1[20];
+ hash_sha1_file(buffer.buf, buffer.len, tree_type, sha1);
+ if (has_sha1_file(sha1))
+ hashcpy(it->sha1, sha1);
+ else
+ to_invalidate = 1;
+ } else if (dryrun)
hash_sha1_file(buffer.buf, buffer.len, tree_type, it->sha1);
else if (write_sha1_file(buffer.buf, buffer.len, tree_type, it->sha1)) {
strbuf_release(&buffer);
diff --git a/cache-tree.h b/cache-tree.h
index b47ccec..aa7b3e4 100644
--- a/cache-tree.h
+++ b/cache-tree.h
@@ -39,6 +39,7 @@ int update_main_cache_tree(int);
#define WRITE_TREE_IGNORE_CACHE_TREE 2
#define WRITE_TREE_DRY_RUN 4
#define WRITE_TREE_SILENT 8
+#define WRITE_TREE_REPAIR 16
/* error return codes */
#define WRITE_TREE_UNREADABLE_INDEX (-1)
diff --git a/cache.h b/cache.h
index fcb511d..8206039 100644
--- a/cache.h
+++ b/cache.h
@@ -8,6 +8,7 @@
#include "gettext.h"
#include "convert.h"
#include "trace.h"
+#include "string-list.h"
#include SHA1_HEADER
#ifndef git_SHA_CTX
@@ -481,7 +482,7 @@ extern int daemonize(void);
alloc = (nr); \
else \
alloc = alloc_nr(alloc); \
- x = xrealloc((x), alloc * sizeof(*(x))); \
+ REALLOC_ARRAY(x, alloc); \
} \
} while (0)
@@ -585,6 +586,7 @@ extern NORETURN void unable_to_lock_index_die(const char *path, int err);
extern int hold_lock_file_for_update(struct lock_file *, const char *path, int);
extern int hold_lock_file_for_append(struct lock_file *, const char *path, int);
extern int commit_lock_file(struct lock_file *);
+extern int reopen_lock_file(struct lock_file *);
extern void update_index_if_able(struct index_state *, struct lock_file *);
extern int hold_locked_index(struct lock_file *, int);
@@ -1037,6 +1039,7 @@ enum date_mode {
DATE_SHORT,
DATE_LOCAL,
DATE_ISO8601,
+ DATE_ISO8601_STRICT,
DATE_RFC2822,
DATE_RAW
};
@@ -1044,10 +1047,10 @@ enum date_mode {
const char *show_date(unsigned long time, int timezone, enum date_mode mode);
void show_date_relative(unsigned long time, int tz, const struct timeval *now,
struct strbuf *timebuf);
-int parse_date(const char *date, char *buf, int bufsize);
+int parse_date(const char *date, struct strbuf *out);
int parse_date_basic(const char *date, unsigned long *timestamp, int *offset);
int parse_expiry_date(const char *date, unsigned long *timestamp);
-void datestamp(char *buf, int bufsize);
+void datestamp(struct strbuf *out);
#define approxidate(s) approxidate_careful((s), NULL)
unsigned long approxidate_careful(const char *, int *);
unsigned long approxidate_relative(const char *date, const struct timeval *now);
@@ -1061,6 +1064,7 @@ extern const char *git_author_info(int);
extern const char *git_committer_info(int);
extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int);
extern const char *fmt_name(const char *name, const char *email);
+extern const char *ident_default_name(void);
extern const char *ident_default_email(void);
extern const char *git_editor(void);
extern const char *git_pager(int stdout_is_tty);
@@ -1281,6 +1285,8 @@ extern int update_server_info(int);
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7
+#define CONFIG_REGEX_NONE ((void *)1)
+
struct git_config_source {
unsigned int use_stdin:1;
const char *file;
@@ -1294,7 +1300,7 @@ extern int git_config_from_buf(config_fn_t fn, const char *name,
const char *buf, size_t len, void *data);
extern void git_config_push_parameter(const char *text);
extern int git_config_from_parameters(config_fn_t fn, void *data);
-extern int git_config(config_fn_t fn, void *);
+extern void git_config(config_fn_t fn, void *);
extern int git_config_with_options(config_fn_t fn, void *,
struct git_config_source *config_source,
int respect_includes);
@@ -1351,6 +1357,69 @@ extern int parse_config_key(const char *var,
const char **subsection, int *subsection_len,
const char **key);
+struct config_set_element {
+ struct hashmap_entry ent;
+ char *key;
+ struct string_list value_list;
+};
+
+struct configset_list_item {
+ struct config_set_element *e;
+ int value_index;
+};
+
+/*
+ * the contents of the list are ordered according to their
+ * position in the config files and order of parsing the files.
+ * (i.e. key-value pair at the last position of .git/config will
+ * be at the last item of the list)
+ */
+struct configset_list {
+ struct configset_list_item *items;
+ unsigned int nr, alloc;
+};
+
+struct config_set {
+ struct hashmap config_hash;
+ int hash_initialized;
+ struct configset_list list;
+};
+
+extern void git_configset_init(struct config_set *cs);
+extern int git_configset_add_file(struct config_set *cs, const char *filename);
+extern int git_configset_get_value(struct config_set *cs, const char *key, const char **value);
+extern const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key);
+extern void git_configset_clear(struct config_set *cs);
+extern int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest);
+extern int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
+extern int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
+extern int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest);
+extern int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);
+extern int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *is_bool, int *dest);
+extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
+extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);
+
+extern int git_config_get_value(const char *key, const char **value);
+extern const struct string_list *git_config_get_value_multi(const char *key);
+extern void git_config_clear(void);
+extern void git_config_iter(config_fn_t fn, void *data);
+extern int git_config_get_string_const(const char *key, const char **dest);
+extern int git_config_get_string(const char *key, char **dest);
+extern int git_config_get_int(const char *key, int *dest);
+extern int git_config_get_ulong(const char *key, unsigned long *dest);
+extern int git_config_get_bool(const char *key, int *dest);
+extern int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest);
+extern int git_config_get_maybe_bool(const char *key, int *dest);
+extern int git_config_get_pathname(const char *key, const char **dest);
+
+struct key_value_info {
+ const char *filename;
+ int linenr;
+};
+
+extern NORETURN void git_die_config(const char *key, const char *err, ...) __attribute__((format(printf, 2, 3)));
+extern NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr);
+
extern int committer_ident_sufficiently_given(void);
extern int author_ident_sufficiently_given(void);
@@ -1361,6 +1430,8 @@ extern const char *git_mailmap_blob;
/* IO helper functions */
extern void maybe_flush_or_die(FILE *, const char *);
+__attribute__((format (printf, 2, 3)))
+extern void fprintf_or_die(FILE *, const char *fmt, ...);
extern int copy_fd(int ifd, int ofd);
extern int copy_file(const char *dst, const char *src, int mode);
extern int copy_file_with_time(const char *dst, const char *src, int mode);
diff --git a/column.c b/column.c
index ca878bc..8082a94 100644
--- a/column.c
+++ b/column.c
@@ -81,8 +81,7 @@ static void compute_column_width(struct column_data *data)
*/
static void shrink_columns(struct column_data *data)
{
- data->width = xrealloc(data->width,
- sizeof(*data->width) * data->cols);
+ REALLOC_ARRAY(data->width, data->cols);
while (data->rows > 1) {
int x, total_width, cols, rows;
rows = data->rows;
@@ -91,8 +90,7 @@ static void shrink_columns(struct column_data *data)
data->rows--;
data->cols = DIV_ROUND_UP(data->list->nr, data->rows);
if (data->cols != cols)
- data->width = xrealloc(data->width,
- sizeof(*data->width) * data->cols);
+ REALLOC_ARRAY(data->width, data->cols);
compute_column_width(data);
total_width = strlen(data->opts.indent);
@@ -367,7 +365,7 @@ int parseopt_column_callback(const struct option *opt,
}
static int fd_out = -1;
-static struct child_process column_process;
+static struct child_process column_process = CHILD_PROCESS_INIT;
int run_column_filter(int colopts, const struct column_options *opts)
{
diff --git a/combine-diff.c b/combine-diff.c
index f9975d2..91edce5 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -12,6 +12,16 @@
#include "sha1-array.h"
#include "revision.h"
+static int compare_paths(const struct combine_diff_path *one,
+ const struct diff_filespec *two)
+{
+ if (!S_ISDIR(one->mode) && !S_ISDIR(two->mode))
+ return strcmp(one->path, two->path);
+
+ return base_name_compare(one->path, strlen(one->path), one->mode,
+ two->path, strlen(two->path), two->mode);
+}
+
static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr, int n, int num_parent)
{
struct diff_queue_struct *q = &diff_queued_diff;
@@ -52,7 +62,7 @@ static struct combine_diff_path *intersect_paths(struct combine_diff_path *curr,
i = 0;
while ((p = *tail) != NULL) {
cmp = ((i >= q->nr)
- ? -1 : strcmp(p->path, q->queue[i]->two->path));
+ ? -1 : compare_paths(p, q->queue[i]->two));
if (cmp < 0) {
/* p->path not in q->queue[]; drop it */
@@ -1397,7 +1407,8 @@ void diff_tree_combined(const unsigned char *sha1,
show_log(rev);
if (rev->verbose_header && opt->output_format &&
- opt->output_format != DIFF_FORMAT_NO_OUTPUT)
+ opt->output_format != DIFF_FORMAT_NO_OUTPUT &&
+ !commit_format_is_empty(rev->commit_format))
printf("%s%c", diff_line_prefix(opt),
opt->line_termination);
}
diff --git a/commit-slab.h b/commit-slab.h
index 375c9c7..f37ec38 100644
--- a/commit-slab.h
+++ b/commit-slab.h
@@ -90,8 +90,7 @@ static MAYBE_UNUSED elemtype *slabname## _at(struct slabname *s, \
\
if (s->slab_count <= nth_slab) { \
int i; \
- s->slab = xrealloc(s->slab, \
- (nth_slab + 1) * sizeof(*s->slab)); \
+ REALLOC_ARRAY(s->slab, nth_slab + 1); \
stat_ ##slabname## realloc++; \
for (i = s->slab_count; i <= nth_slab; i++) \
s->slab[i] = NULL; \
diff --git a/commit.c b/commit.c
index ae7f2b1..9c4439f 100644
--- a/commit.c
+++ b/commit.c
@@ -584,25 +584,19 @@ define_commit_slab(author_date_slab, unsigned long);
static void record_author_date(struct author_date_slab *author_date,
struct commit *commit)
{
- const char *buf, *line_end, *ident_line;
const char *buffer = get_commit_buffer(commit, NULL);
struct ident_split ident;
+ const char *ident_line;
+ size_t ident_len;
char *date_end;
unsigned long date;
- for (buf = buffer; buf; buf = line_end + 1) {
- line_end = strchrnul(buf, '\n');
- if (!skip_prefix(buf, "author ", &ident_line)) {
- if (!line_end[0] || line_end[1] == '\n')
- return; /* end of header */
- continue;
- }
- if (split_ident_line(&ident,
- ident_line, line_end - ident_line) ||
- !ident.date_begin || !ident.date_end)
- goto fail_exit; /* malformed "author" line */
- break;
- }
+ ident_line = find_commit_header(buffer, "author", &ident_len);
+ if (!ident_line)
+ goto fail_exit; /* no author line */
+ if (split_ident_line(&ident, ident_line, ident_len) ||
+ !ident.date_begin || !ident.date_end)
+ goto fail_exit; /* malformed "author" line */
date = strtoul(ident.date_begin, &date_end, 10);
if (date_end != ident.date_end)
@@ -1256,7 +1250,7 @@ static void parse_gpg_output(struct signature_check *sigc)
}
}
-void check_commit_signature(const struct commit* commit, struct signature_check *sigc)
+void check_commit_signature(const struct commit *commit, struct signature_check *sigc)
{
struct strbuf payload = STRBUF_INIT;
struct strbuf signature = STRBUF_INIT;
@@ -1660,3 +1654,25 @@ void print_commit_list(struct commit_list *list,
printf(format, sha1_to_hex(list->item->object.sha1));
}
}
+
+const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
+{
+ int key_len = strlen(key);
+ const char *line = msg;
+
+ while (line) {
+ const char *eol = strchrnul(line, '\n');
+
+ if (line == eol)
+ return NULL;
+
+ if (eol - line > key_len &&
+ !strncmp(line, key, key_len) &&
+ line[key_len] == ' ') {
+ *out_len = eol - line - key_len - 1;
+ return line + key_len + 1;
+ }
+ line = *eol ? eol + 1 : NULL;
+ }
+ return NULL;
+}
diff --git a/commit.h b/commit.h
index a8cbf52..bc68ccb 100644
--- a/commit.h
+++ b/commit.h
@@ -26,13 +26,25 @@ extern int save_commit_buffer;
extern const char *commit_type;
/* While we can decorate any object with a name, it's only used for commits.. */
-extern struct decoration name_decoration;
struct name_decoration {
struct name_decoration *next;
int type;
- char name[1];
+ char name[FLEX_ARRAY];
};
+enum decoration_type {
+ DECORATION_NONE = 0,
+ DECORATION_REF_LOCAL,
+ DECORATION_REF_REMOTE,
+ DECORATION_REF_TAG,
+ DECORATION_REF_STASH,
+ DECORATION_REF_HEAD,
+ DECORATION_GRAFTED,
+};
+
+void add_name_decoration(enum decoration_type type, const char *name, struct object *obj);
+const struct name_decoration *get_name_decoration(const struct object *obj);
+
struct commit *lookup_commit(const unsigned char *sha1);
struct commit *lookup_commit_reference(const unsigned char *sha1);
struct commit *lookup_commit_reference_gently(const unsigned char *sha1,
@@ -159,6 +171,7 @@ extern void get_commit_format(const char *arg, struct rev_info *);
extern const char *format_subject(struct strbuf *sb, const char *msg,
const char *line_separator);
extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
+extern int commit_format_is_empty(enum cmit_fmt);
extern void format_commit_message(const struct commit *commit,
const char *format, struct strbuf *sb,
const struct pretty_print_context *context);
@@ -313,6 +326,17 @@ extern struct commit_extra_header *read_commit_extra_headers(struct commit *, co
extern void free_commit_extra_headers(struct commit_extra_header *extra);
+/*
+ * Search the commit object contents given by "msg" for the header "key".
+ * Returns a pointer to the start of the header contents, or NULL. The length
+ * of the header, up to the first newline, is returned via out_len.
+ *
+ * Note that some headers (like mergetag) may be multi-line. It is the caller's
+ * responsibility to parse further in this case!
+ */
+extern const char *find_commit_header(const char *msg, const char *key,
+ size_t *out_len);
+
typedef void (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra,
void *cb_data);
@@ -346,7 +370,7 @@ extern void print_commit_list(struct commit_list *list,
* at all. This may allocate memory for sig->gpg_output, sig->gpg_status,
* sig->signer and sig->key.
*/
-extern void check_commit_signature(const struct commit* commit, struct signature_check *sigc);
+extern void check_commit_signature(const struct commit *commit, struct signature_check *sigc);
int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused);
diff --git a/compat/mingw.h b/compat/mingw.h
index df0e320..5e499cf 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -69,7 +69,6 @@ struct sigaction {
sig_handler_t sa_handler;
unsigned sa_flags;
};
-#define sigemptyset(x) (void)0
#define SA_RESTART 0
struct itimerval {
@@ -116,6 +115,12 @@ static inline int fcntl(int fd, int cmd, ...)
}
/* bash cannot reliably detect negative return codes as failure */
#define exit(code) exit((code) & 0xff)
+#define sigemptyset(x) (void)0
+static inline int sigaddset(sigset_t *set, int signum)
+{ return 0; }
+#define SIG_UNBLOCK 0
+static inline int sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
+{ return 0; }
/*
* simple adaptors
diff --git a/config.c b/config.c
index 058505c..a677eb6 100644
--- a/config.c
+++ b/config.c
@@ -9,6 +9,8 @@
#include "exec_cmd.h"
#include "strbuf.h"
#include "quote.h"
+#include "hashmap.h"
+#include "string-list.h"
struct config_source {
struct config_source *prev;
@@ -37,6 +39,13 @@ static struct config_source *cf;
static int zlib_compression_seen;
+/*
+ * Default config_set that contains key-value pairs from the usual set of config
+ * config files (i.e repo specific .git/config, user wide ~/.gitconfig, XDG
+ * config file and the global /etc/gitconfig)
+ */
+static struct config_set the_config_set;
+
static int config_file_fgetc(struct config_source *conf)
{
return fgetc(conf->u.file);
@@ -127,7 +136,6 @@ static int handle_path_include(const char *path, struct config_include_data *inc
int git_config_include(const char *var, const char *value, void *data)
{
struct config_include_data *inc = data;
- const char *type;
int ret;
/*
@@ -138,10 +146,7 @@ int git_config_include(const char *var, const char *value, void *data)
if (ret < 0)
return ret;
- if (!skip_prefix(var, "include.", &type))
- return ret;
-
- if (!strcmp(type, "path"))
+ if (!strcmp(var, "include.path"))
ret = handle_path_include(value, inc);
return ret;
}
@@ -162,19 +167,27 @@ void git_config_push_parameter(const char *text)
int git_config_parse_parameter(const char *text,
config_fn_t fn, void *data)
{
+ const char *value;
struct strbuf **pair;
+
pair = strbuf_split_str(text, '=', 2);
if (!pair[0])
return error("bogus config parameter: %s", text);
- if (pair[0]->len && pair[0]->buf[pair[0]->len - 1] == '=')
+
+ if (pair[0]->len && pair[0]->buf[pair[0]->len - 1] == '=') {
strbuf_setlen(pair[0], pair[0]->len - 1);
+ value = pair[1] ? pair[1]->buf : "";
+ } else {
+ value = NULL;
+ }
+
strbuf_trim(pair[0]);
if (!pair[0]->len) {
strbuf_list_free(pair);
return error("bogus config parameter: %s", text);
}
strbuf_tolower(pair[0]);
- if (fn(pair[0]->buf, pair[1] ? pair[1]->buf : NULL, data) < 0) {
+ if (fn(pair[0]->buf, value, data) < 0) {
strbuf_list_free(pair);
return -1;
}
@@ -229,6 +242,7 @@ static int get_next_char(void)
cf->linenr++;
if (c == EOF) {
cf->eof = 1;
+ cf->linenr++;
c = '\n';
}
return c;
@@ -304,6 +318,7 @@ static int get_value(config_fn_t fn, void *data, struct strbuf *name)
{
int c;
char *value;
+ int ret;
/* Get the full name */
for (;;) {
@@ -326,7 +341,15 @@ static int get_value(config_fn_t fn, void *data, struct strbuf *name)
if (!value)
return -1;
}
- return fn(name->buf, value, data);
+ /*
+ * We already consumed the \n, but we need linenr to point to
+ * the line we just parsed during the call to fn to get
+ * accurate line number in error messages.
+ */
+ cf->linenr--;
+ ret = fn(name->buf, value, data);
+ cf->linenr++;
+ return ret;
}
static int get_extended_base_var(struct strbuf *name, int c)
@@ -442,9 +465,9 @@ static int git_parse_source(config_fn_t fn, void *data)
break;
}
if (cf->die_on_error)
- die("bad config file line %d in %s", cf->linenr, cf->name);
+ die(_("bad config file line %d in %s"), cf->linenr, cf->name);
else
- return error("bad config file line %d in %s", cf->linenr, cf->name);
+ return error(_("bad config file line %d in %s"), cf->linenr, cf->name);
}
static int parse_unit_factor(const char *end, uintmax_t *val)
@@ -560,9 +583,9 @@ static void die_bad_number(const char *name, const char *value)
value = "";
if (cf && cf->name)
- die("bad numeric config value '%s' for '%s' in %s: %s",
+ die(_("bad numeric config value '%s' for '%s' in %s: %s"),
value, name, cf->name, reason);
- die("bad numeric config value '%s' for '%s': %s", value, name, reason);
+ die(_("bad numeric config value '%s' for '%s': %s"), value, name, reason);
}
int git_config_int(const char *name, const char *value)
@@ -647,7 +670,7 @@ int git_config_pathname(const char **dest, const char *var, const char *value)
return config_error_nonbool(var);
*dest = expand_user_path(value);
if (!*dest)
- die("Failed to expand user dir in: '%s'", value);
+ die(_("failed to expand user dir in: '%s'"), value);
return 0;
}
@@ -725,7 +748,7 @@ static int git_default_core_config(const char *var, const char *value)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
- die("bad zlib compression level %d", level);
+ die(_("bad zlib compression level %d"), level);
zlib_compression_level = level;
zlib_compression_seen = 1;
return 0;
@@ -736,7 +759,7 @@ static int git_default_core_config(const char *var, const char *value)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
- die("bad zlib compression level %d", level);
+ die(_("bad zlib compression level %d"), level);
core_compression_level = level;
core_compression_seen = 1;
if (!zlib_compression_seen)
@@ -858,7 +881,7 @@ static int git_default_core_config(const char *var, const char *value)
else if (!strcmp(value, "link"))
object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
else
- die("Invalid mode for object creation: %s", value);
+ die(_("invalid mode for object creation: %s"), value);
return 0;
}
@@ -1158,7 +1181,7 @@ int git_config_early(config_fn_t fn, void *data, const char *repo_config)
switch (git_config_from_parameters(fn, data)) {
case -1: /* error */
- die("unable to parse command-line config");
+ die(_("unable to parse command-line config"));
break;
case 0: /* found nothing */
break;
@@ -1205,9 +1228,365 @@ int git_config_with_options(config_fn_t fn, void *data,
return ret;
}
-int git_config(config_fn_t fn, void *data)
+static void git_config_raw(config_fn_t fn, void *data)
+{
+ if (git_config_with_options(fn, data, NULL, 1) < 0)
+ /*
+ * git_config_with_options() normally returns only
+ * positive values, as most errors are fatal, and
+ * non-fatal potential errors are guarded by "if"
+ * statements that are entered only when no error is
+ * possible.
+ *
+ * If we ever encounter a non-fatal error, it means
+ * something went really wrong and we should stop
+ * immediately.
+ */
+ die(_("unknown error occured while reading the configuration files"));
+}
+
+static void configset_iter(struct config_set *cs, config_fn_t fn, void *data)
+{
+ int i, value_index;
+ struct string_list *values;
+ struct config_set_element *entry;
+ struct configset_list *list = &cs->list;
+ struct key_value_info *kv_info;
+
+ for (i = 0; i < list->nr; i++) {
+ entry = list->items[i].e;
+ value_index = list->items[i].value_index;
+ values = &entry->value_list;
+ if (fn(entry->key, values->items[value_index].string, data) < 0) {
+ kv_info = values->items[value_index].util;
+ git_die_config_linenr(entry->key, kv_info->filename, kv_info->linenr);
+ }
+ }
+}
+
+static void git_config_check_init(void);
+
+void git_config(config_fn_t fn, void *data)
+{
+ git_config_check_init();
+ configset_iter(&the_config_set, fn, data);
+}
+
+static struct config_set_element *configset_find_element(struct config_set *cs, const char *key)
+{
+ struct config_set_element k;
+ struct config_set_element *found_entry;
+ char *normalized_key;
+ int ret;
+ /*
+ * `key` may come from the user, so normalize it before using it
+ * for querying entries from the hashmap.
+ */
+ ret = git_config_parse_key(key, &normalized_key, NULL);
+
+ if (ret)
+ return NULL;
+
+ hashmap_entry_init(&k, strhash(normalized_key));
+ k.key = normalized_key;
+ found_entry = hashmap_get(&cs->config_hash, &k, NULL);
+ free(normalized_key);
+ return found_entry;
+}
+
+static int configset_add_value(struct config_set *cs, const char *key, const char *value)
+{
+ struct config_set_element *e;
+ struct string_list_item *si;
+ struct configset_list_item *l_item;
+ struct key_value_info *kv_info = xmalloc(sizeof(*kv_info));
+
+ e = configset_find_element(cs, key);
+ /*
+ * Since the keys are being fed by git_config*() callback mechanism, they
+ * are already normalized. So simply add them without any further munging.
+ */
+ if (!e) {
+ e = xmalloc(sizeof(*e));
+ hashmap_entry_init(e, strhash(key));
+ e->key = xstrdup(key);
+ string_list_init(&e->value_list, 1);
+ hashmap_add(&cs->config_hash, e);
+ }
+ si = string_list_append_nodup(&e->value_list, value ? xstrdup(value) : NULL);
+
+ ALLOC_GROW(cs->list.items, cs->list.nr + 1, cs->list.alloc);
+ l_item = &cs->list.items[cs->list.nr++];
+ l_item->e = e;
+ l_item->value_index = e->value_list.nr - 1;
+
+ if (cf) {
+ kv_info->filename = strintern(cf->name);
+ kv_info->linenr = cf->linenr;
+ } else {
+ /* for values read from `git_config_from_parameters()` */
+ kv_info->filename = NULL;
+ kv_info->linenr = -1;
+ }
+ si->util = kv_info;
+
+ return 0;
+}
+
+static int config_set_element_cmp(const struct config_set_element *e1,
+ const struct config_set_element *e2, const void *unused)
+{
+ return strcmp(e1->key, e2->key);
+}
+
+void git_configset_init(struct config_set *cs)
+{
+ hashmap_init(&cs->config_hash, (hashmap_cmp_fn)config_set_element_cmp, 0);
+ cs->hash_initialized = 1;
+ cs->list.nr = 0;
+ cs->list.alloc = 0;
+ cs->list.items = NULL;
+}
+
+void git_configset_clear(struct config_set *cs)
+{
+ struct config_set_element *entry;
+ struct hashmap_iter iter;
+ if (!cs->hash_initialized)
+ return;
+
+ hashmap_iter_init(&cs->config_hash, &iter);
+ while ((entry = hashmap_iter_next(&iter))) {
+ free(entry->key);
+ string_list_clear(&entry->value_list, 1);
+ }
+ hashmap_free(&cs->config_hash, 1);
+ cs->hash_initialized = 0;
+ free(cs->list.items);
+ cs->list.nr = 0;
+ cs->list.alloc = 0;
+ cs->list.items = NULL;
+}
+
+static int config_set_callback(const char *key, const char *value, void *cb)
+{
+ struct config_set *cs = cb;
+ configset_add_value(cs, key, value);
+ return 0;
+}
+
+int git_configset_add_file(struct config_set *cs, const char *filename)
+{
+ return git_config_from_file(config_set_callback, filename, cs);
+}
+
+int git_configset_get_value(struct config_set *cs, const char *key, const char **value)
+{
+ const struct string_list *values = NULL;
+ /*
+ * Follows "last one wins" semantic, i.e., if there are multiple matches for the
+ * queried key in the files of the configset, the value returned will be the last
+ * value in the value list for that key.
+ */
+ values = git_configset_get_value_multi(cs, key);
+
+ if (!values)
+ return 1;
+ assert(values->nr > 0);
+ *value = values->items[values->nr - 1].string;
+ return 0;
+}
+
+const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key)
+{
+ struct config_set_element *e = configset_find_element(cs, key);
+ return e ? &e->value_list : NULL;
+}
+
+int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value))
+ return git_config_string(dest, key, value);
+ else
+ return 1;
+}
+
+int git_configset_get_string(struct config_set *cs, const char *key, char **dest)
+{
+ return git_configset_get_string_const(cs, key, (const char **)dest);
+}
+
+int git_configset_get_int(struct config_set *cs, const char *key, int *dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value)) {
+ *dest = git_config_int(key, value);
+ return 0;
+ } else
+ return 1;
+}
+
+int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value)) {
+ *dest = git_config_ulong(key, value);
+ return 0;
+ } else
+ return 1;
+}
+
+int git_configset_get_bool(struct config_set *cs, const char *key, int *dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value)) {
+ *dest = git_config_bool(key, value);
+ return 0;
+ } else
+ return 1;
+}
+
+int git_configset_get_bool_or_int(struct config_set *cs, const char *key,
+ int *is_bool, int *dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value)) {
+ *dest = git_config_bool_or_int(key, value, is_bool);
+ return 0;
+ } else
+ return 1;
+}
+
+int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value)) {
+ *dest = git_config_maybe_bool(key, value);
+ if (*dest == -1)
+ return -1;
+ return 0;
+ } else
+ return 1;
+}
+
+int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest)
+{
+ const char *value;
+ if (!git_configset_get_value(cs, key, &value))
+ return git_config_pathname(dest, key, value);
+ else
+ return 1;
+}
+
+static void git_config_check_init(void)
+{
+ if (the_config_set.hash_initialized)
+ return;
+ git_configset_init(&the_config_set);
+ git_config_raw(config_set_callback, &the_config_set);
+}
+
+void git_config_clear(void)
+{
+ if (!the_config_set.hash_initialized)
+ return;
+ git_configset_clear(&the_config_set);
+}
+
+int git_config_get_value(const char *key, const char **value)
+{
+ git_config_check_init();
+ return git_configset_get_value(&the_config_set, key, value);
+}
+
+const struct string_list *git_config_get_value_multi(const char *key)
+{
+ git_config_check_init();
+ return git_configset_get_value_multi(&the_config_set, key);
+}
+
+int git_config_get_string_const(const char *key, const char **dest)
+{
+ int ret;
+ git_config_check_init();
+ ret = git_configset_get_string_const(&the_config_set, key, dest);
+ if (ret < 0)
+ git_die_config(key, NULL);
+ return ret;
+}
+
+int git_config_get_string(const char *key, char **dest)
+{
+ git_config_check_init();
+ return git_config_get_string_const(key, (const char **)dest);
+}
+
+int git_config_get_int(const char *key, int *dest)
+{
+ git_config_check_init();
+ return git_configset_get_int(&the_config_set, key, dest);
+}
+
+int git_config_get_ulong(const char *key, unsigned long *dest)
+{
+ git_config_check_init();
+ return git_configset_get_ulong(&the_config_set, key, dest);
+}
+
+int git_config_get_bool(const char *key, int *dest)
+{
+ git_config_check_init();
+ return git_configset_get_bool(&the_config_set, key, dest);
+}
+
+int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest)
{
- return git_config_with_options(fn, data, NULL, 1);
+ git_config_check_init();
+ return git_configset_get_bool_or_int(&the_config_set, key, is_bool, dest);
+}
+
+int git_config_get_maybe_bool(const char *key, int *dest)
+{
+ git_config_check_init();
+ return git_configset_get_maybe_bool(&the_config_set, key, dest);
+}
+
+int git_config_get_pathname(const char *key, const char **dest)
+{
+ int ret;
+ git_config_check_init();
+ ret = git_configset_get_pathname(&the_config_set, key, dest);
+ if (ret < 0)
+ git_die_config(key, NULL);
+ return ret;
+}
+
+NORETURN
+void git_die_config_linenr(const char *key, const char *filename, int linenr)
+{
+ if (!filename)
+ die(_("unable to parse '%s' from command-line config"), key);
+ else
+ die(_("bad config variable '%s' in file '%s' at line %d"),
+ key, filename, linenr);
+}
+
+NORETURN __attribute__((format(printf, 2, 3)))
+void git_die_config(const char *key, const char *err, ...)
+{
+ const struct string_list *values;
+ struct key_value_info *kv_info;
+
+ if (err) {
+ va_list params;
+ va_start(params, err);
+ vreportf("error: ", err, params);
+ va_end(params);
+ }
+ values = git_config_get_value_multi(key);
+ kv_info = values->items[values->nr - 1].util;
+ git_die_config_linenr(key, kv_info->filename, kv_info->linenr);
}
/*
@@ -1228,10 +1607,15 @@ static struct {
static int matches(const char *key, const char *value)
{
- return !strcmp(key, store.key) &&
- (store.value_regex == NULL ||
- (store.do_not_match ^
- !regexec(store.value_regex, value, 0, NULL, 0)));
+ if (strcmp(key, store.key))
+ return 0; /* not ours */
+ if (!store.value_regex)
+ return 1; /* always matches */
+ if (store.value_regex == CONFIG_REGEX_NONE)
+ return 0; /* never matches */
+
+ return store.do_not_match ^
+ (value && !regexec(store.value_regex, value, 0, NULL, 0));
}
static int store_aux(const char *key, const char *value, void *cb)
@@ -1243,7 +1627,7 @@ static int store_aux(const char *key, const char *value, void *cb)
case KEY_SEEN:
if (matches(key, value)) {
if (store.seen == 1 && store.multi_replace == 0) {
- warning("%s has multiple values", key);
+ warning(_("%s has multiple values"), key);
}
ALLOC_GROW(store.offset, store.seen + 1,
@@ -1493,6 +1877,8 @@ out_free_ret_1:
/*
* If value==NULL, unset in (remove from) config,
* if value_regex!=NULL, disregard key/value pairs where value does not match.
+ * if value_regex==CONFIG_REGEX_NONE, do not match any existing values
+ * (only add a new one)
* if multi_replace==0, nothing, or only one matching key/value is replaced,
* else all matching key/values (regardless how many) are removed,
* before the new pair is written.
@@ -1576,6 +1962,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
if (value_regex == NULL)
store.value_regex = NULL;
+ else if (value_regex == CONFIG_REGEX_NONE)
+ store.value_regex = CONFIG_REGEX_NONE;
else {
if (value_regex[0] == '!') {
store.do_not_match = 1;
@@ -1607,7 +1995,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
if (git_config_from_file(store_aux, config_filename, NULL)) {
error("invalid config file %s", config_filename);
free(store.key);
- if (store.value_regex != NULL) {
+ if (store.value_regex != NULL &&
+ store.value_regex != CONFIG_REGEX_NONE) {
regfree(store.value_regex);
free(store.value_regex);
}
@@ -1616,7 +2005,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
}
free(store.key);
- if (store.value_regex != NULL) {
+ if (store.value_regex != NULL &&
+ store.value_regex != CONFIG_REGEX_NONE) {
regfree(store.value_regex);
free(store.value_regex);
}
@@ -1705,6 +2095,9 @@ int git_config_set_multivar_in_file(const char *config_filename,
lock = NULL;
ret = 0;
+ /* Invalidate the config cache */
+ git_config_clear();
+
out_free:
if (lock)
rollback_lock_file(lock);
diff --git a/config.mak.uname b/config.mak.uname
index 15ee15e..a2f380f 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -89,8 +89,13 @@ ifeq ($(uname_S),Darwin)
NEEDS_CRYPTO_WITH_SSL = YesPlease
NEEDS_SSL_WITH_CRYPTO = YesPlease
NEEDS_LIBICONV = YesPlease
+ # Note: $(uname_R) gives us the underlying Darwin version.
+ # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.*
+ # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x)
+ # i.e. "begins with [15678] and a dot" means "10.4.* or older".
ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
OLD_ICONV = UnfortunatelyYes
+ NO_APPLE_COMMON_CRYPTO = YesPlease
endif
ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
NO_STRLCPY = YesPlease
diff --git a/connect.c b/connect.c
index 5047402..d47d0ec 100644
--- a/connect.c
+++ b/connect.c
@@ -13,28 +13,24 @@
static char *server_capabilities;
static const char *parse_feature_value(const char *, const char *, int *);
-static int check_ref(const char *name, int len, unsigned int flags)
+static int check_ref(const char *name, unsigned int flags)
{
if (!flags)
return 1;
- if (len < 5 || memcmp(name, "refs/", 5))
+ if (!skip_prefix(name, "refs/", &name))
return 0;
- /* Skip the "refs/" part */
- name += 5;
- len -= 5;
-
/* REF_NORMAL means that we don't want the magic fake tag refs */
if ((flags & REF_NORMAL) && check_refname_format(name, 0))
return 0;
/* REF_HEADS means that we want regular branch heads */
- if ((flags & REF_HEADS) && !memcmp(name, "heads/", 6))
+ if ((flags & REF_HEADS) && starts_with(name, "heads/"))
return 1;
/* REF_TAGS means that we want tags */
- if ((flags & REF_TAGS) && !memcmp(name, "tags/", 5))
+ if ((flags & REF_TAGS) && starts_with(name, "tags/"))
return 1;
/* All type bits clear means that we are ok with anything */
@@ -43,7 +39,7 @@ static int check_ref(const char *name, int len, unsigned int flags)
int check_ref_type(const struct ref *ref, int flags)
{
- return check_ref(ref->name, strlen(ref->name), flags);
+ return check_ref(ref->name, flags);
}
static void die_initial_contact(int got_at_least_one_head)
@@ -167,7 +163,7 @@ struct ref **get_remote_heads(int in, char *src_buf, size_t src_len,
continue;
}
- if (!check_ref(name, name_len, flags))
+ if (!check_ref(name, flags))
continue;
ref = alloc_ref(buffer + 41);
hashcpy(ref->old_sha1, old_sha1);
@@ -537,7 +533,8 @@ static struct child_process *git_proxy_connect(int fd[2], char *host)
get_host_and_port(&host, &port);
- proxy = xcalloc(1, sizeof(*proxy));
+ proxy = xmalloc(sizeof(*proxy));
+ child_process_init(proxy);
argv_array_push(&proxy->args, git_proxy_command);
argv_array_push(&proxy->args, host);
argv_array_push(&proxy->args, port);
@@ -639,7 +636,7 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_host,
return protocol;
}
-static struct child_process no_fork;
+static struct child_process no_fork = CHILD_PROCESS_INIT;
/*
* This returns a dummy child_process if the transport protocol does not
@@ -694,7 +691,8 @@ struct child_process *git_connect(int fd[2], const char *url,
target_host, 0);
free(target_host);
} else {
- conn = xcalloc(1, sizeof(*conn));
+ conn = xmalloc(sizeof(*conn));
+ child_process_init(conn);
strbuf_addstr(&cmd, prog);
strbuf_addch(&cmd, ' ');
diff --git a/connected.c b/connected.c
index dae9c99..299c560 100644
--- a/connected.c
+++ b/connected.c
@@ -25,7 +25,7 @@ static int check_everything_connected_real(sha1_iterate_fn fn,
struct transport *transport,
const char *shallow_file)
{
- struct child_process rev_list;
+ struct child_process rev_list = CHILD_PROCESS_INIT;
const char *argv[9];
char commit[41];
unsigned char sha1[20];
@@ -60,7 +60,6 @@ static int check_everything_connected_real(sha1_iterate_fn fn,
argv[ac++] = "--quiet";
argv[ac] = NULL;
- memset(&rev_list, 0, sizeof(rev_list));
rev_list.argv = argv;
rev_list.git_cmd = 1;
rev_list.in = -1;
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 06bf262..5ea5b82 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1175,8 +1175,8 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
--full-index --binary --abbrev --diff-filter=
--find-copies-harder
--text --ignore-space-at-eol --ignore-space-change
- --ignore-all-space --exit-code --quiet --ext-diff
- --no-ext-diff
+ --ignore-all-space --ignore-blank-lines --exit-code
+ --quiet --ext-diff --no-ext-diff
--no-prefix --src-prefix= --dst-prefix=
--inter-hunk-context=
--patience --histogram --minimal
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 9d684b1..c5473dc 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -468,7 +468,8 @@ __git_ps1 ()
fi
fi
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
- [ -r "$g/refs/stash" ]; then
+ git rev-parse --verify --quiet refs/stash >/dev/null
+ then
s="$"
fi
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index d9a0ce2..c2bd703 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
-include ../../config.mak.autogen
-include ../../config.mak
@@ -34,7 +37,7 @@ GIT_SUBTREE_XML := git-subtree.xml
GIT_SUBTREE_TXT := git-subtree.txt
GIT_SUBTREE_HTML := git-subtree.html
-all: $(GIT_SUBTREE)
+all:: $(GIT_SUBTREE)
$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@
diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile
index 360d8da..e8651aa 100644
--- a/contrib/svn-fe/Makefile
+++ b/contrib/svn-fe/Makefile
@@ -1,18 +1,58 @@
all:: svn-fe$X
-CC = gcc
+CC = cc
RM = rm -f
MV = mv
CFLAGS = -g -O2 -Wall
LDFLAGS =
-ALL_CFLAGS = $(CFLAGS)
-ALL_LDFLAGS = $(LDFLAGS)
-EXTLIBS =
+EXTLIBS = -lz
+
+include ../../config.mak.uname
+-include ../../config.mak.autogen
+-include ../../config.mak
+
+ifeq ($(uname_S),Darwin)
+ ifndef NO_FINK
+ ifeq ($(shell test -d /sw/lib && echo y),y)
+ CFLAGS += -I/sw/include
+ LDFLAGS += -L/sw/lib
+ endif
+ endif
+ ifndef NO_DARWIN_PORTS
+ ifeq ($(shell test -d /opt/local/lib && echo y),y)
+ CFLAGS += -I/opt/local/include
+ LDFLAGS += -L/opt/local/lib
+ endif
+ endif
+endif
+
+ifndef NO_OPENSSL
+ EXTLIBS += -lssl
+ ifdef NEEDS_CRYPTO_WITH_SSL
+ EXTLIBS += -lcrypto
+ endif
+endif
+
+ifndef NO_PTHREADS
+ CFLAGS += $(PTHREADS_CFLAGS)
+ EXTLIBS += $(PTHREAD_LIBS)
+endif
+
+ifdef HAVE_CLOCK_GETTIME
+ CFLAGS += -DHAVE_CLOCK_GETTIME
+ EXTLIBS += -lrt
+endif
+
+ifdef NEEDS_LIBICONV
+ EXTLIBS += -liconv
+endif
GIT_LIB = ../../libgit.a
VCSSVN_LIB = ../../vcs-svn/lib.a
-LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(EXTLIBS)
+XDIFF_LIB = ../../xdiff/lib.a
+
+LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)
QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
QUIET_SUBDIR1 =
@@ -33,12 +73,11 @@ ifndef V
endif
endif
-svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(GIT_LIB)
- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ svn-fe.o \
- $(ALL_LDFLAGS) $(LIBS)
+svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
+ $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)
svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
- $(QUIET_CC)$(CC) -I../../vcs-svn -o $*.o -c $(ALL_CFLAGS) $<
+ $(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<
svn-fe.html: svn-fe.txt
$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
@@ -54,6 +93,9 @@ svn-fe.1: svn-fe.txt
../../vcs-svn/lib.a: FORCE
$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a
+../../xdiff/lib.a: FORCE
+ $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a
+
../../libgit.a: FORCE
$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a
diff --git a/convert.c b/convert.c
index cb5fbb4..aa7a139 100644
--- a/convert.c
+++ b/convert.c
@@ -321,7 +321,7 @@ static int filter_buffer(int in, int out, void *data)
/*
* Spawn cmd and feed the buffer contents through its stdin.
*/
- struct child_process child_process;
+ struct child_process child_process = CHILD_PROCESS_INIT;
struct filter_params *params = (struct filter_params *)data;
int write_err, status;
const char *argv[] = { NULL, NULL };
@@ -344,7 +344,6 @@ static int filter_buffer(int in, int out, void *data)
argv[0] = cmd.buf;
- memset(&child_process, 0, sizeof(child_process));
child_process.argv = argv;
child_process.use_shell = 1;
child_process.in = -1;
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index 3b370ca..c2f0049 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -2,6 +2,7 @@
#include "credential.h"
#include "unix-socket.h"
#include "sigchain.h"
+#include "parse-options.h"
static const char *socket_path;
@@ -201,7 +202,7 @@ static int serve_cache_loop(int fd)
return 1;
}
-static void serve_cache(const char *socket_path)
+static void serve_cache(const char *socket_path, int debug)
{
int fd;
@@ -211,6 +212,10 @@ static void serve_cache(const char *socket_path)
printf("ok\n");
fclose(stdout);
+ if (!debug) {
+ if (!freopen("/dev/null", "w", stderr))
+ die_errno("unable to point stderr to /dev/null");
+ }
while (serve_cache_loop(fd))
; /* nothing */
@@ -252,16 +257,28 @@ static void check_socket_directory(const char *path)
int main(int argc, const char **argv)
{
- socket_path = argv[1];
+ static const char *usage[] = {
+ "git-credential-cache--daemon [opts] <socket_path>",
+ NULL
+ };
+ int debug = 0;
+ const struct option options[] = {
+ OPT_BOOL(0, "debug", &debug,
+ N_("print debugging messages to stderr")),
+ OPT_END()
+ };
+
+ argc = parse_options(argc, argv, NULL, options, usage, 0);
+ socket_path = argv[0];
if (!socket_path)
- die("usage: git-credential-cache--daemon <socket_path>");
+ usage_with_options(usage, options);
check_socket_directory(socket_path);
atexit(cleanup_socket);
sigchain_push_common(cleanup_socket_on_signal);
- serve_cache(socket_path);
+ serve_cache(socket_path, debug);
return 0;
}
diff --git a/credential-cache.c b/credential-cache.c
index 9a03792..8689a15 100644
--- a/credential-cache.c
+++ b/credential-cache.c
@@ -37,12 +37,11 @@ static int send_request(const char *socket, const struct strbuf *out)
static void spawn_daemon(const char *socket)
{
- struct child_process daemon;
+ struct child_process daemon = CHILD_PROCESS_INIT;
const char *argv[] = { NULL, NULL, NULL };
char buf[128];
int r;
- memset(&daemon, 0, sizeof(daemon));
argv[0] = "git-credential-cache--daemon";
argv[1] = socket;
daemon.argv = argv;
diff --git a/credential.c b/credential.c
index 4d79d32..1886ea5 100644
--- a/credential.c
+++ b/credential.c
@@ -205,11 +205,10 @@ static int run_credential_helper(struct credential *c,
const char *cmd,
int want_output)
{
- struct child_process helper;
+ struct child_process helper = CHILD_PROCESS_INIT;
const char *argv[] = { NULL, NULL };
FILE *fp;
- memset(&helper, 0, sizeof(helper));
argv[0] = cmd;
helper.argv = argv;
helper.use_shell = 1;
diff --git a/daemon.c b/daemon.c
index e6b51ed..4dcfff9 100644
--- a/daemon.c
+++ b/daemon.c
@@ -230,23 +230,6 @@ struct daemon_service {
int overridable;
};
-static struct daemon_service *service_looking_at;
-static int service_enabled;
-
-static int git_daemon_config(const char *var, const char *value, void *cb)
-{
- const char *service;
-
- if (skip_prefix(var, "daemon.", &service) &&
- !strcmp(service, service_looking_at->config_name)) {
- service_enabled = git_config_bool(var, value);
- return 0;
- }
-
- /* we are not interested in parsing any other configuration here */
- return 0;
-}
-
static int daemon_error(const char *dir, const char *msg)
{
if (!informative_errors)
@@ -259,7 +242,7 @@ static const char *access_hook;
static int run_access_hook(struct daemon_service *service, const char *dir, const char *path)
{
- struct child_process child;
+ struct child_process child = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT;
const char *argv[8];
const char **arg = argv;
@@ -277,7 +260,6 @@ static int run_access_hook(struct daemon_service *service, const char *dir, cons
*arg = NULL;
#undef STRARG
- memset(&child, 0, sizeof(child));
child.use_shell = 1;
child.argv = argv;
child.no_stdin = 1;
@@ -324,6 +306,7 @@ static int run_service(const char *dir, struct daemon_service *service)
{
const char *path;
int enabled = service->enabled;
+ struct strbuf var = STRBUF_INIT;
loginfo("Request %s for '%s'", service->name, dir);
@@ -354,11 +337,9 @@ static int run_service(const char *dir, struct daemon_service *service)
}
if (service->overridable) {
- service_looking_at = service;
- service_enabled = -1;
- git_config(git_daemon_config, NULL);
- if (0 <= service_enabled)
- enabled = service_enabled;
+ strbuf_addf(&var, "daemon.%s", service->config_name);
+ git_config_get_bool(var.buf, &enabled);
+ strbuf_release(&var);
}
if (!enabled) {
logerror("'%s': service not enabled for '%s'",
@@ -406,9 +387,8 @@ static void copy_to_log(int fd)
static int run_service_command(const char **argv)
{
- struct child_process cld;
+ struct child_process cld = CHILD_PROCESS_INIT;
- memset(&cld, 0, sizeof(cld));
cld.argv = argv;
cld.git_cmd = 1;
cld.err = -1;
@@ -733,7 +713,7 @@ static void check_dead_children(void)
static char **cld_argv;
static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
{
- struct child_process cld = { NULL };
+ struct child_process cld = CHILD_PROCESS_INIT;
char addrbuf[300] = "REMOTE_ADDR=", portbuf[300];
char *env[] = { addrbuf, portbuf, NULL };
diff --git a/date.c b/date.c
index 782de95..59dfe57 100644
--- a/date.c
+++ b/date.c
@@ -200,7 +200,16 @@ const char *show_date(unsigned long time, int tz, enum date_mode mode)
tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec,
tz);
- else if (mode == DATE_RFC2822)
+ else if (mode == DATE_ISO8601_STRICT) {
+ char sign = (tz >= 0) ? '+' : '-';
+ tz = abs(tz);
+ strbuf_addf(&timebuf, "%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
+ tm->tm_year + 1900,
+ tm->tm_mon + 1,
+ tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ sign, tz / 100, tz % 100);
+ } else if (mode == DATE_RFC2822)
strbuf_addf(&timebuf, "%.3s, %d %.3s %d %02d:%02d:%02d %+05d",
weekday_names[tm->tm_wday], tm->tm_mday,
month_names[tm->tm_mon], tm->tm_year + 1900,
@@ -605,7 +614,7 @@ static int match_tz(const char *date, int *offp)
return end - date;
}
-static int date_string(unsigned long date, int offset, char *buf, int len)
+static void date_string(unsigned long date, int offset, struct strbuf *buf)
{
int sign = '+';
@@ -613,7 +622,7 @@ static int date_string(unsigned long date, int offset, char *buf, int len)
offset = -offset;
sign = '-';
}
- return snprintf(buf, len, "%lu %c%02d%02d", date, sign, offset / 60, offset % 60);
+ strbuf_addf(buf, "%lu %c%02d%02d", date, sign, offset / 60, offset % 60);
}
/*
@@ -735,13 +744,14 @@ int parse_expiry_date(const char *date, unsigned long *timestamp)
return errors;
}
-int parse_date(const char *date, char *result, int maxlen)
+int parse_date(const char *date, struct strbuf *result)
{
unsigned long timestamp;
int offset;
if (parse_date_basic(date, &timestamp, &offset))
return -1;
- return date_string(timestamp, offset, result, maxlen);
+ date_string(timestamp, offset, result);
+ return 0;
}
enum date_mode parse_date_format(const char *format)
@@ -751,6 +761,9 @@ enum date_mode parse_date_format(const char *format)
else if (!strcmp(format, "iso8601") ||
!strcmp(format, "iso"))
return DATE_ISO8601;
+ else if (!strcmp(format, "iso8601-strict") ||
+ !strcmp(format, "iso-strict"))
+ return DATE_ISO8601_STRICT;
else if (!strcmp(format, "rfc2822") ||
!strcmp(format, "rfc"))
return DATE_RFC2822;
@@ -766,7 +779,7 @@ enum date_mode parse_date_format(const char *format)
die("unknown date format %s", format);
}
-void datestamp(char *buf, int bufsize)
+void datestamp(struct strbuf *out)
{
time_t now;
int offset;
@@ -776,7 +789,7 @@ void datestamp(char *buf, int bufsize)
offset = tm_to_time_t(localtime(&now)) - now;
offset /= 60;
- date_string(now, offset, buf, bufsize);
+ date_string(now, offset, out);
}
/*
diff --git a/diff.c b/diff.c
index 867f034..d7a5c81 100644
--- a/diff.c
+++ b/diff.c
@@ -376,7 +376,7 @@ static unsigned long diff_filespec_size(struct diff_filespec *one)
{
if (!DIFF_FILE_VALID(one))
return 0;
- diff_populate_filespec(one, 1);
+ diff_populate_filespec(one, CHECK_SIZE_ONLY);
return one->size;
}
@@ -1910,11 +1910,11 @@ static void show_dirstat(struct diff_options *options)
diff_free_filespec_data(p->one);
diff_free_filespec_data(p->two);
} else if (DIFF_FILE_VALID(p->one)) {
- diff_populate_filespec(p->one, 1);
+ diff_populate_filespec(p->one, CHECK_SIZE_ONLY);
copied = added = 0;
diff_free_filespec_data(p->one);
} else if (DIFF_FILE_VALID(p->two)) {
- diff_populate_filespec(p->two, 1);
+ diff_populate_filespec(p->two, CHECK_SIZE_ONLY);
copied = 0;
added = p->two->size;
diff_free_filespec_data(p->two);
@@ -2188,8 +2188,8 @@ int diff_filespec_is_binary(struct diff_filespec *one)
one->is_binary = one->driver->binary;
else {
if (!one->data && DIFF_FILE_VALID(one))
- diff_populate_filespec(one, 0);
- if (one->data)
+ diff_populate_filespec(one, CHECK_BINARY);
+ if (one->is_binary == -1 && one->data)
one->is_binary = buffer_is_binary(one->data,
one->size);
if (one->is_binary == -1)
@@ -2324,6 +2324,19 @@ static void builtin_diff(const char *name_a,
} else if (!DIFF_OPT_TST(o, TEXT) &&
( (!textconv_one && diff_filespec_is_binary(one)) ||
(!textconv_two && diff_filespec_is_binary(two)) )) {
+ if (!one->data && !two->data &&
+ S_ISREG(one->mode) && S_ISREG(two->mode) &&
+ !DIFF_OPT_TST(o, BINARY)) {
+ if (!hashcmp(one->sha1, two->sha1)) {
+ if (must_show_header)
+ fprintf(o->file, "%s", header.buf);
+ goto free_ab_and_return;
+ }
+ fprintf(o->file, "%s", header.buf);
+ fprintf(o->file, "%sBinary files %s and %s differ\n",
+ line_prefix, lbl[0], lbl[1]);
+ goto free_ab_and_return;
+ }
if (fill_mmfile(&mf1, one) < 0 || fill_mmfile(&mf2, two) < 0)
die("unable to read files to diff");
/* Quite common confusing case */
@@ -2668,8 +2681,9 @@ static int diff_populate_gitlink(struct diff_filespec *s, int size_only)
* grab the data for the blob (or file) for our own in-core comparison.
* diff_filespec has data and size fields for this purpose.
*/
-int diff_populate_filespec(struct diff_filespec *s, int size_only)
+int diff_populate_filespec(struct diff_filespec *s, unsigned int flags)
{
+ int size_only = flags & CHECK_SIZE_ONLY;
int err = 0;
/*
* demote FAIL to WARN to allow inspecting the situation
@@ -2724,6 +2738,11 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
}
if (size_only)
return 0;
+ if ((flags & CHECK_BINARY) &&
+ s->size > big_file_threshold && s->is_binary == -1) {
+ s->is_binary = 1;
+ return 0;
+ }
fd = open(s->path, O_RDONLY);
if (fd < 0)
goto err_empty;
@@ -2745,16 +2764,21 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
}
else {
enum object_type type;
- if (size_only) {
+ if (size_only || (flags & CHECK_BINARY)) {
type = sha1_object_info(s->sha1, &s->size);
if (type < 0)
die("unable to read %s", sha1_to_hex(s->sha1));
- } else {
- s->data = read_sha1_file(s->sha1, &type, &s->size);
- if (!s->data)
- die("unable to read %s", sha1_to_hex(s->sha1));
- s->should_free = 1;
+ if (size_only)
+ return 0;
+ if (s->size > big_file_threshold && s->is_binary == -1) {
+ s->is_binary = 1;
+ return 0;
+ }
}
+ s->data = read_sha1_file(s->sha1, &type, &s->size);
+ if (!s->data)
+ die("unable to read %s", sha1_to_hex(s->sha1));
+ s->should_free = 1;
}
return 0;
}
@@ -4688,8 +4712,8 @@ static int diff_filespec_check_stat_unmatch(struct diff_filepair *p)
!DIFF_FILE_VALID(p->two) ||
(p->one->sha1_valid && p->two->sha1_valid) ||
(p->one->mode != p->two->mode) ||
- diff_populate_filespec(p->one, 1) ||
- diff_populate_filespec(p->two, 1) ||
+ diff_populate_filespec(p->one, CHECK_SIZE_ONLY) ||
+ diff_populate_filespec(p->two, CHECK_SIZE_ONLY) ||
(p->one->size != p->two->size) ||
!diff_filespec_is_identical(p->one, p->two)) /* (2) */
p->skip_stat_unmatch_result = 1;
@@ -4931,7 +4955,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
struct diff_tempfile *temp;
const char *argv[3];
const char **arg = argv;
- struct child_process child;
+ struct child_process child = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT;
int err = 0;
@@ -4940,7 +4964,6 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
*arg++ = temp->name;
*arg = NULL;
- memset(&child, 0, sizeof(child));
child.use_shell = 1;
child.argv = argv;
child.out = -1;
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 2e44a37..4e132f1 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -147,9 +147,11 @@ static int estimate_similarity(struct diff_filespec *src,
* is a possible size - we really should have a flag to
* say whether the size is valid or not!)
*/
- if (!src->cnt_data && diff_populate_filespec(src, 1))
+ if (!src->cnt_data &&
+ diff_populate_filespec(src, CHECK_SIZE_ONLY))
return 0;
- if (!dst->cnt_data && diff_populate_filespec(dst, 1))
+ if (!dst->cnt_data &&
+ diff_populate_filespec(dst, CHECK_SIZE_ONLY))
return 0;
max_size = ((src->size > dst->size) ? src->size : dst->size);
diff --git a/diffcore.h b/diffcore.h
index c876dac..33ea2de 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -55,7 +55,9 @@ extern void free_filespec(struct diff_filespec *);
extern void fill_filespec(struct diff_filespec *, const unsigned char *,
int, unsigned short);
-extern int diff_populate_filespec(struct diff_filespec *, int);
+#define CHECK_SIZE_ONLY 1
+#define CHECK_BINARY 2
+extern int diff_populate_filespec(struct diff_filespec *, unsigned int);
extern void diff_free_filespec_data(struct diff_filespec *);
extern void diff_free_filespec_blob(struct diff_filespec *);
extern int diff_filespec_is_binary(struct diff_filespec *);
diff --git a/dir.c b/dir.c
index fcb6872..bd274a7 100644
--- a/dir.c
+++ b/dir.c
@@ -1507,12 +1507,16 @@ int dir_inside_of(const char *subdir, const char *dir)
int is_inside_dir(const char *dir)
{
- char cwd[PATH_MAX];
+ char *cwd;
+ int rc;
+
if (!dir)
return 0;
- if (!getcwd(cwd, sizeof(cwd)))
- die_errno("can't find the current directory");
- return dir_inside_of(cwd, dir) >= 0;
+
+ cwd = xgetcwd();
+ rc = (dir_inside_of(cwd, dir) >= 0);
+ free(cwd);
+ return rc;
}
int is_empty_dir(const char *path)
diff --git a/editor.c b/editor.c
index 0abbd8d..01c644c 100644
--- a/editor.c
+++ b/editor.c
@@ -38,10 +38,9 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
if (strcmp(editor, ":")) {
const char *args[] = { editor, real_path(path), NULL };
- struct child_process p;
+ struct child_process p = CHILD_PROCESS_INIT;
int ret, sig;
- memset(&p, 0, sizeof(p));
p.argv = args;
p.env = env;
p.use_shell = 1;
diff --git a/exec_cmd.c b/exec_cmd.c
index 125fa6f..698e752 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -86,11 +86,7 @@ const char *git_exec_path(void)
static void add_path(struct strbuf *out, const char *path)
{
if (path && *path) {
- if (is_absolute_path(path))
- strbuf_addstr(out, path);
- else
- strbuf_addstr(out, absolute_path(path));
-
+ strbuf_add_absolute_path(out, path);
strbuf_addch(out, PATH_SEP);
}
}
diff --git a/fast-import.c b/fast-import.c
index d73f58c..96b0f42 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -878,7 +878,7 @@ static void start_packfile(void)
pack_size = sizeof(hdr);
object_count = 0;
- all_packs = xrealloc(all_packs, sizeof(*all_packs) * (pack_id + 1));
+ REALLOC_ARRAY(all_packs, pack_id + 1);
all_packs[pack_id] = p;
}
@@ -946,10 +946,12 @@ static void unkeep_all_packs(void)
static void end_packfile(void)
{
- struct packed_git *old_p = pack_data, *new_p;
+ if (!pack_data)
+ return;
clear_delta_base_cache();
if (object_count) {
+ struct packed_git *new_p;
unsigned char cur_pack_sha1[20];
char *idx_name;
int i;
@@ -991,10 +993,11 @@ static void end_packfile(void)
pack_id++;
}
else {
- close(old_p->pack_fd);
- unlink_or_warn(old_p->pack_name);
+ close(pack_data->pack_fd);
+ unlink_or_warn(pack_data->pack_name);
}
- free(old_p);
+ free(pack_data);
+ pack_data = NULL;
/* We can't carry a delta across packfiles. */
strbuf_release(&last_blob.data);
@@ -1419,7 +1422,7 @@ static void mktree(struct tree_content *t, int v, struct strbuf *b)
static void store_tree(struct tree_entry *root)
{
- struct tree_content *t = root->tree;
+ struct tree_content *t;
unsigned int i, j, del;
struct last_object lo = { STRBUF_INIT, 0, 0, /* no_swap */ 1 };
struct object_entry *le = NULL;
@@ -1427,6 +1430,10 @@ static void store_tree(struct tree_entry *root)
if (!is_null_sha1(root->versions[1].sha1))
return;
+ if (!root->tree)
+ load_tree(root);
+ t = root->tree;
+
for (i = 0; i < t->entry_count; i++) {
if (t->entries[i]->tree)
store_tree(t->entries[i]);
@@ -1679,8 +1686,9 @@ found_entry:
static int update_branch(struct branch *b)
{
static const char *msg = "fast-import";
- struct ref_lock *lock;
+ struct ref_transaction *transaction;
unsigned char old_sha1[20];
+ struct strbuf err = STRBUF_INIT;
if (read_ref(b->name, old_sha1))
hashclr(old_sha1);
@@ -1689,29 +1697,33 @@ static int update_branch(struct branch *b)
delete_ref(b->name, old_sha1, 0);
return 0;
}
- lock = lock_any_ref_for_update(b->name, old_sha1, 0, NULL);
- if (!lock)
- return error("Unable to lock %s", b->name);
if (!force_update && !is_null_sha1(old_sha1)) {
struct commit *old_cmit, *new_cmit;
old_cmit = lookup_commit_reference_gently(old_sha1, 0);
new_cmit = lookup_commit_reference_gently(b->sha1, 0);
- if (!old_cmit || !new_cmit) {
- unlock_ref(lock);
+ if (!old_cmit || !new_cmit)
return error("Branch %s is missing commits.", b->name);
- }
if (!in_merge_bases(old_cmit, new_cmit)) {
- unlock_ref(lock);
warning("Not updating %s"
" (new tip %s does not contain %s)",
b->name, sha1_to_hex(b->sha1), sha1_to_hex(old_sha1));
return -1;
}
}
- if (write_ref_sha1(lock, b->sha1, msg) < 0)
- return error("Unable to update %s", b->name);
+ transaction = ref_transaction_begin(&err);
+ if (!transaction ||
+ ref_transaction_update(transaction, b->name, b->sha1, old_sha1,
+ 0, 1, &err) ||
+ ref_transaction_commit(transaction, msg, &err)) {
+ ref_transaction_free(transaction);
+ error("%s", err.buf);
+ strbuf_release(&err);
+ return -1;
+ }
+ ref_transaction_free(transaction);
+ strbuf_release(&err);
return 0;
}
@@ -1730,15 +1742,32 @@ static void dump_tags(void)
{
static const char *msg = "fast-import";
struct tag *t;
- struct ref_lock *lock;
- char ref_name[PATH_MAX];
+ struct strbuf ref_name = STRBUF_INIT;
+ struct strbuf err = STRBUF_INIT;
+ struct ref_transaction *transaction;
+ transaction = ref_transaction_begin(&err);
+ if (!transaction) {
+ failure |= error("%s", err.buf);
+ goto cleanup;
+ }
for (t = first_tag; t; t = t->next_tag) {
- sprintf(ref_name, "tags/%s", t->name);
- lock = lock_ref_sha1(ref_name, NULL);
- if (!lock || write_ref_sha1(lock, t->sha1, msg) < 0)
- failure |= error("Unable to update %s", ref_name);
+ strbuf_reset(&ref_name);
+ strbuf_addf(&ref_name, "refs/tags/%s", t->name);
+
+ if (ref_transaction_update(transaction, ref_name.buf, t->sha1,
+ NULL, 0, 0, &err)) {
+ failure |= error("%s", err.buf);
+ goto cleanup;
+ }
}
+ if (ref_transaction_commit(transaction, msg, &err))
+ failure |= error("%s", err.buf);
+
+ cleanup:
+ ref_transaction_free(transaction);
+ strbuf_release(&ref_name);
+ strbuf_release(&err);
}
static void dump_marks_helper(FILE *f,
@@ -1971,7 +2000,7 @@ static int parse_data(struct strbuf *sb, uintmax_t limit, uintmax_t *len_res)
return 1;
}
-static int validate_raw_date(const char *src, char *result, int maxlen)
+static int validate_raw_date(const char *src, struct strbuf *result)
{
const char *orig_src = src;
char *endp;
@@ -1989,11 +2018,10 @@ static int validate_raw_date(const char *src, char *result, int maxlen)
return -1;
num = strtoul(src + 1, &endp, 10);
- if (errno || endp == src + 1 || *endp || (endp - orig_src) >= maxlen ||
- 1400 < num)
+ if (errno || endp == src + 1 || *endp || 1400 < num)
return -1;
- strcpy(result, orig_src);
+ strbuf_addstr(result, orig_src);
return 0;
}
@@ -2001,7 +2029,7 @@ static char *parse_ident(const char *buf)
{
const char *ltgt;
size_t name_len;
- char *ident;
+ struct strbuf ident = STRBUF_INIT;
/* ensure there is a space delimiter even if there is no name */
if (*buf == '<')
@@ -2020,26 +2048,25 @@ static char *parse_ident(const char *buf)
die("Missing space after > in ident string: %s", buf);
ltgt++;
name_len = ltgt - buf;
- ident = xmalloc(name_len + 24);
- strncpy(ident, buf, name_len);
+ strbuf_add(&ident, buf, name_len);
switch (whenspec) {
case WHENSPEC_RAW:
- if (validate_raw_date(ltgt, ident + name_len, 24) < 0)
+ if (validate_raw_date(ltgt, &ident) < 0)
die("Invalid raw date \"%s\" in ident: %s", ltgt, buf);
break;
case WHENSPEC_RFC2822:
- if (parse_date(ltgt, ident + name_len, 24) < 0)
+ if (parse_date(ltgt, &ident) < 0)
die("Invalid rfc2822 date \"%s\" in ident: %s", ltgt, buf);
break;
case WHENSPEC_NOW:
if (strcmp("now", ltgt))
die("Date in ident must be 'now': %s", buf);
- datestamp(ident + name_len, 24);
+ datestamp(&ident);
break;
}
- return ident;
+ return strbuf_detach(&ident, NULL);
}
static void parse_and_store_blob(
@@ -3274,36 +3301,34 @@ static void parse_option(const char *option)
die("This version of fast-import does not support option: %s", option);
}
-static int git_pack_config(const char *k, const char *v, void *cb)
+static void git_pack_config(void)
{
- if (!strcmp(k, "pack.depth")) {
- max_depth = git_config_int(k, v);
+ int indexversion_value;
+ unsigned long packsizelimit_value;
+
+ if (!git_config_get_ulong("pack.depth", &max_depth)) {
if (max_depth > MAX_DEPTH)
max_depth = MAX_DEPTH;
- return 0;
}
- if (!strcmp(k, "pack.compression")) {
- int level = git_config_int(k, v);
- if (level == -1)
- level = Z_DEFAULT_COMPRESSION;
- else if (level < 0 || level > Z_BEST_COMPRESSION)
- die("bad pack compression level %d", level);
- pack_compression_level = level;
+ if (!git_config_get_int("pack.compression", &pack_compression_level)) {
+ if (pack_compression_level == -1)
+ pack_compression_level = Z_DEFAULT_COMPRESSION;
+ else if (pack_compression_level < 0 ||
+ pack_compression_level > Z_BEST_COMPRESSION)
+ git_die_config("pack.compression",
+ "bad pack compression level %d", pack_compression_level);
pack_compression_seen = 1;
- return 0;
}
- if (!strcmp(k, "pack.indexversion")) {
- pack_idx_opts.version = git_config_int(k, v);
+ if (!git_config_get_int("pack.indexversion", &indexversion_value)) {
+ pack_idx_opts.version = indexversion_value;
if (pack_idx_opts.version > 2)
- die("bad pack.indexversion=%"PRIu32,
- pack_idx_opts.version);
- return 0;
+ git_die_config("pack.indexversion",
+ "bad pack.indexversion=%"PRIu32, pack_idx_opts.version);
}
- if (!strcmp(k, "pack.packsizelimit")) {
- max_packsize = git_config_ulong(k, v);
- return 0;
- }
- return git_default_config(k, v, cb);
+ if (!git_config_get_ulong("pack.packsizelimit", &packsizelimit_value))
+ max_packsize = packsizelimit_value;
+
+ git_config(git_default_config, NULL);
}
static const char fast_import_usage[] =
@@ -3356,7 +3381,7 @@ int main(int argc, char **argv)
setup_git_directory();
reset_pack_idx_option(&pack_idx_opts);
- git_config(git_pack_config, NULL);
+ git_pack_config();
if (!pack_compression_seen && core_compression_seen)
pack_compression_level = core_compression_level;
diff --git a/fetch-pack.c b/fetch-pack.c
index b8a58fa..7487aa7 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -666,7 +666,7 @@ static int get_pack(struct fetch_pack_args *args,
char hdr_arg[256];
const char **av, *cmd_name;
int do_keep = args->keep_pack;
- struct child_process cmd;
+ struct child_process cmd = CHILD_PROCESS_INIT;
int ret;
memset(&demux, 0, sizeof(demux));
@@ -685,7 +685,6 @@ static int get_pack(struct fetch_pack_args *args,
else
demux.out = xd[0];
- memset(&cmd, 0, sizeof(cmd));
cmd.argv = argv;
av = argv;
*hdr_arg = 0;
@@ -869,34 +868,15 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
return ref;
}
-static int fetch_pack_config(const char *var, const char *value, void *cb)
+static void fetch_pack_config(void)
{
- if (strcmp(var, "fetch.unpacklimit") == 0) {
- fetch_unpack_limit = git_config_int(var, value);
- return 0;
- }
-
- if (strcmp(var, "transfer.unpacklimit") == 0) {
- transfer_unpack_limit = git_config_int(var, value);
- return 0;
- }
-
- if (strcmp(var, "repack.usedeltabaseoffset") == 0) {
- prefer_ofs_delta = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "fetch.fsckobjects")) {
- fetch_fsck_objects = git_config_bool(var, value);
- return 0;
- }
-
- if (!strcmp(var, "transfer.fsckobjects")) {
- transfer_fsck_objects = git_config_bool(var, value);
- return 0;
- }
+ git_config_get_int("fetch.unpacklimit", &fetch_unpack_limit);
+ git_config_get_int("transfer.unpacklimit", &transfer_unpack_limit);
+ git_config_get_bool("repack.usedeltabaseoffset", &prefer_ofs_delta);
+ git_config_get_bool("fetch.fsckobjects", &fetch_fsck_objects);
+ git_config_get_bool("transfer.fsckobjects", &transfer_fsck_objects);
- return git_default_config(var, value, cb);
+ git_config(git_default_config, NULL);
}
static void fetch_pack_setup(void)
@@ -904,7 +884,7 @@ static void fetch_pack_setup(void)
static int did_setup;
if (did_setup)
return;
- git_config(fetch_pack_config, NULL);
+ fetch_pack_config();
if (0 <= transfer_unpack_limit)
unpack_limit = transfer_unpack_limit;
else if (0 <= fetch_unpack_limit)
diff --git a/fsck.c b/fsck.c
index 56156ff..2fffa43 100644
--- a/fsck.c
+++ b/fsck.c
@@ -6,6 +6,7 @@
#include "commit.h"
#include "tag.h"
#include "fsck.h"
+#include "refs.h"
static int fsck_walk_tree(struct tree *tree, fsck_walk_func walk, void *data)
{
@@ -237,6 +238,26 @@ static int fsck_tree(struct tree *item, int strict, fsck_error error_func)
return retval;
}
+static int require_end_of_header(const void *data, unsigned long size,
+ struct object *obj, fsck_error error_func)
+{
+ const char *buffer = (const char *)data;
+ unsigned long i;
+
+ for (i = 0; i < size; i++) {
+ switch (buffer[i]) {
+ case '\0':
+ return error_func(obj, FSCK_ERROR,
+ "unterminated header: NUL at offset %d", i);
+ case '\n':
+ if (i + 1 < size && buffer[i + 1] == '\n')
+ return 0;
+ }
+ }
+
+ return error_func(obj, FSCK_ERROR, "unterminated header");
+}
+
static int fsck_ident(const char **ident, struct object *obj, fsck_error error_func)
{
char *end;
@@ -277,13 +298,16 @@ static int fsck_ident(const char **ident, struct object *obj, fsck_error error_f
}
static int fsck_commit_buffer(struct commit *commit, const char *buffer,
- fsck_error error_func)
+ unsigned long size, fsck_error error_func)
{
unsigned char tree_sha1[20], sha1[20];
struct commit_graft *graft;
unsigned parent_count, parent_line_count = 0;
int err;
+ if (require_end_of_header(buffer, size, &commit->object, error_func))
+ return -1;
+
if (!skip_prefix(buffer, "tree ", &buffer))
return error_func(&commit->object, FSCK_ERROR, "invalid format - expected 'tree' line");
if (get_sha1_hex(buffer, tree_sha1) || buffer[40] != '\n')
@@ -322,24 +346,111 @@ static int fsck_commit_buffer(struct commit *commit, const char *buffer,
return 0;
}
-static int fsck_commit(struct commit *commit, fsck_error error_func)
+static int fsck_commit(struct commit *commit, const char *data,
+ unsigned long size, fsck_error error_func)
{
- const char *buffer = get_commit_buffer(commit, NULL);
- int ret = fsck_commit_buffer(commit, buffer, error_func);
- unuse_commit_buffer(commit, buffer);
+ const char *buffer = data ? data : get_commit_buffer(commit, &size);
+ int ret = fsck_commit_buffer(commit, buffer, size, error_func);
+ if (!data)
+ unuse_commit_buffer(commit, buffer);
return ret;
}
-static int fsck_tag(struct tag *tag, fsck_error error_func)
+static int fsck_tag_buffer(struct tag *tag, const char *data,
+ unsigned long size, fsck_error error_func)
+{
+ unsigned char sha1[20];
+ int ret = 0;
+ const char *buffer;
+ char *to_free = NULL, *eol;
+ struct strbuf sb = STRBUF_INIT;
+
+ if (data)
+ buffer = data;
+ else {
+ enum object_type type;
+
+ buffer = to_free =
+ read_sha1_file(tag->object.sha1, &type, &size);
+ if (!buffer)
+ return error_func(&tag->object, FSCK_ERROR,
+ "cannot read tag object");
+
+ if (type != OBJ_TAG) {
+ ret = error_func(&tag->object, FSCK_ERROR,
+ "expected tag got %s",
+ typename(type));
+ goto done;
+ }
+ }
+
+ if (require_end_of_header(buffer, size, &tag->object, error_func))
+ goto done;
+
+ if (!skip_prefix(buffer, "object ", &buffer)) {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid format - expected 'object' line");
+ goto done;
+ }
+ if (get_sha1_hex(buffer, sha1) || buffer[40] != '\n') {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid 'object' line format - bad sha1");
+ goto done;
+ }
+ buffer += 41;
+
+ if (!skip_prefix(buffer, "type ", &buffer)) {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid format - expected 'type' line");
+ goto done;
+ }
+ eol = strchr(buffer, '\n');
+ if (!eol) {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid format - unexpected end after 'type' line");
+ goto done;
+ }
+ if (type_from_string_gently(buffer, eol - buffer, 1) < 0)
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid 'type' value");
+ if (ret)
+ goto done;
+ buffer = eol + 1;
+
+ if (!skip_prefix(buffer, "tag ", &buffer)) {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid format - expected 'tag' line");
+ goto done;
+ }
+ eol = strchr(buffer, '\n');
+ if (!eol) {
+ ret = error_func(&tag->object, FSCK_ERROR, "invalid format - unexpected end after 'type' line");
+ goto done;
+ }
+ strbuf_addf(&sb, "refs/tags/%.*s", (int)(eol - buffer), buffer);
+ if (check_refname_format(sb.buf, 0))
+ error_func(&tag->object, FSCK_WARN, "invalid 'tag' name: %s", buffer);
+ buffer = eol + 1;
+
+ if (!skip_prefix(buffer, "tagger ", &buffer))
+ /* early tags do not contain 'tagger' lines; warn only */
+ error_func(&tag->object, FSCK_WARN, "invalid format - expected 'tagger' line");
+ else
+ ret = fsck_ident(&buffer, &tag->object, error_func);
+
+done:
+ strbuf_release(&sb);
+ free(to_free);
+ return ret;
+}
+
+static int fsck_tag(struct tag *tag, const char *data,
+ unsigned long size, fsck_error error_func)
{
struct object *tagged = tag->tagged;
if (!tagged)
return error_func(&tag->object, FSCK_ERROR, "could not load tagged object");
- return 0;
+
+ return fsck_tag_buffer(tag, data, size, error_func);
}
-int fsck_object(struct object *obj, int strict, fsck_error error_func)
+int fsck_object(struct object *obj, void *data, unsigned long size,
+ int strict, fsck_error error_func)
{
if (!obj)
return error_func(obj, FSCK_ERROR, "no valid object to fsck");
@@ -349,9 +460,11 @@ int fsck_object(struct object *obj, int strict, fsck_error error_func)
if (obj->type == OBJ_TREE)
return fsck_tree((struct tree *) obj, strict, error_func);
if (obj->type == OBJ_COMMIT)
- return fsck_commit((struct commit *) obj, error_func);
+ return fsck_commit((struct commit *) obj, (const char *) data,
+ size, error_func);
if (obj->type == OBJ_TAG)
- return fsck_tag((struct tag *) obj, error_func);
+ return fsck_tag((struct tag *) obj, (const char *) data,
+ size, error_func);
return error_func(obj, FSCK_ERROR, "unknown type '%d' (internal fsck error)",
obj->type);
diff --git a/fsck.h b/fsck.h
index 1e4f527..d1e6387 100644
--- a/fsck.h
+++ b/fsck.h
@@ -28,6 +28,8 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...);
* 0 everything OK
*/
int fsck_walk(struct object *obj, fsck_walk_func walk, void *data);
-int fsck_object(struct object *obj, int strict, fsck_error error_func);
+/* If NULL is passed for data, we assume the object is local and read it. */
+int fsck_object(struct object *obj, void *data, unsigned long size,
+ int strict, fsck_error error_func);
#endif
diff --git a/git-bisect.sh b/git-bisect.sh
index 1e0d602..6cda2b5 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -286,11 +286,11 @@ bisect_next_check() {
if test -s "$GIT_DIR/BISECT_START"
then
- gettextln "You need to give me at least one good and one bad revisions.
+ gettextln "You need to give me at least one good and one bad revision.
(You can use \"git bisect bad\" and \"git bisect good\" for that.)" >&2
else
gettextln "You need to start by \"git bisect start\".
-You then need to give me at least one good and one bad revisions.
+You then need to give me at least one good and one bad revision.
(You can use \"git bisect bad\" and \"git bisect good\" for that.)" >&2
fi
exit 1 ;;
diff --git a/git-compat-util.h b/git-compat-util.h
index f7fae20..fb41118 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -82,6 +82,7 @@
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
#define _NETBSD_SOURCE 1
#define _SGI_SOURCE 1
@@ -264,19 +265,35 @@ extern char *gitbasename(char *);
#endif
#ifndef has_dos_drive_prefix
-#define has_dos_drive_prefix(path) 0
+static inline int git_has_dos_drive_prefix(const char *path)
+{
+ return 0;
+}
+#define has_dos_drive_prefix git_has_dos_drive_prefix
#endif
-#ifndef offset_1st_component
-#define offset_1st_component(path) (is_dir_sep((path)[0]))
+#ifndef is_dir_sep
+static inline int git_is_dir_sep(int c)
+{
+ return c == '/';
+}
+#define is_dir_sep git_is_dir_sep
#endif
-#ifndef is_dir_sep
-#define is_dir_sep(c) ((c) == '/')
+#ifndef offset_1st_component
+static inline int git_offset_1st_component(const char *path)
+{
+ return is_dir_sep(path[0]);
+}
+#define offset_1st_component git_offset_1st_component
#endif
#ifndef find_last_dir_sep
-#define find_last_dir_sep(path) strrchr(path, '/')
+static inline char *git_find_last_dir_sep(const char *path)
+{
+ return strrchr(path, '/');
+}
+#define find_last_dir_sep git_find_last_dir_sep
#endif
#if defined(__HP_cc) && (__HP_cc >= 61000)
@@ -593,6 +610,7 @@ extern try_to_free_t set_try_to_free_routine(try_to_free_t);
extern char *xstrdup(const char *str);
extern void *xmalloc(size_t size);
extern void *xmallocz(size_t size);
+extern void *xmallocz_gently(size_t size);
extern void *xmemdupz(const void *data, size_t len);
extern char *xstrndup(const char *str, size_t len);
extern void *xrealloc(void *ptr, size_t size);
@@ -607,6 +625,9 @@ extern int xmkstemp(char *template);
extern int xmkstemp_mode(char *template, int mode);
extern int odb_mkstemp(char *template, size_t limit, const char *pattern);
extern int odb_pack_keep(char *name, size_t namesz, const unsigned char *sha1);
+extern char *xgetcwd(void);
+
+#define REALLOC_ARRAY(x, alloc) (x) = xrealloc((x), (alloc) * sizeof(*(x)))
static inline size_t xsize_t(off_t len)
{
diff --git a/git-pull.sh b/git-pull.sh
index 18a394f..4d4fc77 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -20,7 +20,7 @@ die_conflict () {
if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
die "$(gettext "Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
-as appropriate to mark resolution, or use 'git commit -a'.")"
+as appropriate to mark resolution and make a commit.")"
else
die "$(gettext "Pull is not possible because you have unmerged files.")"
fi
diff --git a/git-stash.sh b/git-stash.sh
index bcc757b..d4cf818 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -50,7 +50,7 @@ clear_stash () {
then
die "$(gettext "git stash clear with parameters is unimplemented")"
fi
- if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
+ if current=$(git rev-parse --verify --quiet $ref_stash)
then
git update-ref -d $ref_stash $current
fi
@@ -292,12 +292,12 @@ save_stash () {
}
have_stash () {
- git rev-parse --verify $ref_stash >/dev/null 2>&1
+ git rev-parse --verify --quiet $ref_stash >/dev/null
}
list_stash () {
have_stash || return 0
- git log --format="%gd: %gs" -g "$@" $ref_stash --
+ git log --format="%gd: %gs" -g --first-parent -m "$@" $ref_stash --
}
show_stash () {
@@ -392,12 +392,12 @@ parse_flags_and_rev()
;;
esac
- REV=$(git rev-parse --quiet --symbolic --verify "$1" 2>/dev/null) || {
+ REV=$(git rev-parse --symbolic --verify --quiet "$1") || {
reference="$1"
- die "$(eval_gettext "\$reference is not valid reference")"
+ die "$(eval_gettext "\$reference is not a valid reference")"
}
- i_commit=$(git rev-parse --quiet --verify "$REV^2" 2>/dev/null) &&
+ i_commit=$(git rev-parse --verify --quiet "$REV^2") &&
set -- $(git rev-parse "$REV" "$REV^1" "$REV:" "$REV^1:" "$REV^2:" 2>/dev/null) &&
s=$1 &&
w_commit=$1 &&
@@ -409,7 +409,7 @@ parse_flags_and_rev()
test "$ref_stash" = "$(git rev-parse --symbolic-full-name "${REV%@*}")" &&
IS_STASH_REF=t
- u_commit=$(git rev-parse --quiet --verify "$REV^3" 2>/dev/null) &&
+ u_commit=$(git rev-parse --verify --quiet "$REV^3") &&
u_tree=$(git rev-parse "$REV^3:" 2>/dev/null)
}
@@ -531,7 +531,8 @@ drop_stash () {
die "$(eval_gettext "\${REV}: Could not drop stash entry")"
# clear_stash if we just dropped the last stash entry
- git rev-parse --verify "$ref_stash@{0}" >/dev/null 2>&1 || clear_stash
+ git rev-parse --verify --quiet "$ref_stash@{0}" >/dev/null ||
+ clear_stash
}
apply_to_branch () {
diff --git a/git-svn.perl b/git-svn.perl
index 0a32372..b6e2186 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -260,8 +260,8 @@ my %cmd = (
} ],
'find-rev' => [ \&cmd_find_rev,
"Translate between SVN revision numbers and tree-ish",
- { 'before' => \$_before,
- 'after' => \$_after } ],
+ { 'B|before' => \$_before,
+ 'A|after' => \$_after } ],
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
{ 'merge|m|M' => \$_merge,
'verbose|v' => \$_verbose,
@@ -306,13 +306,16 @@ sub readline {
}
package main;
-my $term = eval {
- $ENV{"GIT_SVN_NOTTY"}
- ? new Term::ReadLine 'git-svn', \*STDIN, \*STDOUT
- : new Term::ReadLine 'git-svn';
-};
-if ($@) {
- $term = new FakeTerm "$@: going non-interactive";
+my $term;
+sub term_init {
+ $term = eval {
+ $ENV{"GIT_SVN_NOTTY"}
+ ? new Term::ReadLine 'git-svn', \*STDIN, \*STDOUT
+ : new Term::ReadLine 'git-svn';
+ };
+ if ($@) {
+ $term = new FakeTerm "$@: going non-interactive";
+ }
}
my $cmd;
@@ -424,6 +427,7 @@ sub ask {
my $default = $arg{default};
my $resp;
my $i = 0;
+ term_init() unless $term;
if ( !( defined($term->IN)
&& defined( fileno($term->IN) )
@@ -1161,7 +1165,9 @@ sub cmd_branch {
::_req_svn();
my $ctx = SVN::Client->new(
- auth => Git::SVN::Ra::_auth_providers(),
+ config => SVN::Core::config_get_config(
+ $Git::SVN::Ra::config_dir
+ ),
log_msg => sub {
${ $_[0] } = defined $_message
? $_message
@@ -1475,10 +1481,37 @@ sub cmd_commit_diff {
}
}
-
sub cmd_info {
- my $path = canonicalize_path(defined($_[0]) ? $_[0] : ".");
- my $fullpath = canonicalize_path($cmd_dir_prefix . $path);
+ my $path_arg = defined($_[0]) ? $_[0] : '.';
+ my $path = $path_arg;
+ if (File::Spec->file_name_is_absolute($path)) {
+ $path = canonicalize_path($path);
+
+ my $toplevel = eval {
+ my @cmd = qw/rev-parse --show-toplevel/;
+ command_oneline(\@cmd, STDERR => 0);
+ };
+
+ # remove $toplevel from the absolute path:
+ my ($vol, $dirs, $file) = File::Spec->splitpath($path);
+ my (undef, $tdirs, $tfile) = File::Spec->splitpath($toplevel);
+ my @dirs = File::Spec->splitdir($dirs);
+ my @tdirs = File::Spec->splitdir($tdirs);
+ pop @dirs if $dirs[-1] eq '';
+ pop @tdirs if $tdirs[-1] eq '';
+ push @dirs, $file;
+ push @tdirs, $tfile;
+ while (@tdirs && @dirs && $tdirs[0] eq $dirs[0]) {
+ shift @dirs;
+ shift @tdirs;
+ }
+ $dirs = File::Spec->catdir(@dirs);
+ $path = File::Spec->catpath($vol, $dirs);
+
+ $path = canonicalize_path($path);
+ } else {
+ $path = canonicalize_path($cmd_dir_prefix . $path);
+ }
if (exists $_[1]) {
die "Too many arguments specified\n";
}
@@ -1499,14 +1532,14 @@ sub cmd_info {
# canonicalize_path() will return "" to make libsvn 1.5.x happy,
$path = "." if $path eq "";
- my $full_url = canonicalize_url( add_path_to_url( $url, $fullpath ) );
+ my $full_url = canonicalize_url( add_path_to_url( $url, $path ) );
if ($_url) {
print "$full_url\n";
return;
}
- my $result = "Path: $path\n";
+ my $result = "Path: $path_arg\n";
$result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
$result .= "URL: $full_url\n";
@@ -1537,7 +1570,7 @@ sub cmd_info {
}
my ($lc_author, $lc_rev, $lc_date_utc);
- my @args = Git::SVN::Log::git_svn_log_cmd($rev, $rev, "--", $fullpath);
+ my @args = Git::SVN::Log::git_svn_log_cmd($rev, $rev, "--", $path);
my $log = command_output_pipe(@args);
my $esc_color = qr/(?:\033\[(?:(?:\d+;)*\d*)?m)*/;
while (<$log>) {
diff --git a/git.c b/git.c
index 9c49519..4cebf32 100644
--- a/git.c
+++ b/git.c
@@ -14,13 +14,13 @@ const char git_usage_string[] =
" <command> [<args>]";
const char git_more_info_string[] =
- N_("'git help -a' and 'git help -g' lists available subcommands and some\n"
+ N_("'git help -a' and 'git help -g' list available subcommands and some\n"
"concept guides. See 'git help <command>' or 'git help <concept>'\n"
"to read about a specific subcommand or concept.");
static struct startup_info git_startup_info;
static int use_pager = -1;
-static char orig_cwd[PATH_MAX];
+static char *orig_cwd;
static const char *env_names[] = {
GIT_DIR_ENVIRONMENT,
GIT_WORK_TREE_ENVIRONMENT,
@@ -36,8 +36,7 @@ static void save_env(void)
if (saved_environment)
return;
saved_environment = 1;
- if (!getcwd(orig_cwd, sizeof(orig_cwd)))
- die_errno("cannot getcwd");
+ orig_cwd = xgetcwd();
for (i = 0; i < ARRAY_SIZE(env_names); i++) {
orig_env[i] = getenv(env_names[i]);
if (orig_env[i])
@@ -48,8 +47,9 @@ static void save_env(void)
static void restore_env(void)
{
int i;
- if (*orig_cwd && chdir(orig_cwd))
+ if (orig_cwd && chdir(orig_cwd))
die_errno("could not move to %s", orig_cwd);
+ free(orig_cwd);
for (i = 0; i < ARRAY_SIZE(env_names); i++) {
if (orig_env[i])
setenv(env_names[i], orig_env[i], 1);
@@ -161,9 +161,10 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
if (envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "--bare")) {
- static char git_dir[PATH_MAX+1];
+ char *cwd = xgetcwd();
is_bare_repository_cfg = 1;
- setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 0);
+ setenv(GIT_DIR_ENVIRONMENT, cwd, 0);
+ free(cwd);
setenv(GIT_IMPLICIT_WORK_TREE_ENVIRONMENT, "0", 1);
if (envchanged)
*envchanged = 1;
@@ -281,8 +282,7 @@ static int handle_alias(int *argcp, const char ***argv)
"trace: alias expansion: %s =>",
alias_command);
- new_argv = xrealloc(new_argv, sizeof(char *) *
- (count + *argcp));
+ REALLOC_ARRAY(new_argv, count + *argcp);
/* insert after command name */
memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
@@ -592,6 +592,26 @@ static int run_argv(int *argcp, const char ***argv)
return done_alias;
}
+/*
+ * Many parts of Git have subprograms communicate via pipe, expect the
+ * upstream of a pipe to die with SIGPIPE when the downstream of a
+ * pipe does not need to read all that is written. Some third-party
+ * programs that ignore or block SIGPIPE for their own reason forget
+ * to restore SIGPIPE handling to the default before spawning Git and
+ * break this carefully orchestrated machinery.
+ *
+ * Restore the way SIGPIPE is handled to default, which is what we
+ * expect.
+ */
+static void restore_sigpipe_to_default(void)
+{
+ sigset_t unblock;
+
+ sigemptyset(&unblock);
+ sigaddset(&unblock, SIGPIPE);
+ sigprocmask(SIG_UNBLOCK, &unblock, NULL);
+ signal(SIGPIPE, SIG_DFL);
+}
int main(int argc, char **av)
{
@@ -611,6 +631,8 @@ int main(int argc, char **av)
*/
sanitize_stdfds();
+ restore_sigpipe_to_default();
+
git_setup_gettext();
trace_command_performance(argv);
diff --git a/gpg-interface.c b/gpg-interface.c
index ff07012..1ef73fb 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -55,12 +55,11 @@ const char *get_signing_key(void)
*/
int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key)
{
- struct child_process gpg;
+ struct child_process gpg = CHILD_PROCESS_INIT;
const char *args[4];
ssize_t len;
size_t i, j, bottom;
- memset(&gpg, 0, sizeof(gpg));
gpg.argv = args;
gpg.in = -1;
gpg.out = -1;
@@ -116,7 +115,7 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
const char *signature, size_t signature_size,
struct strbuf *gpg_output, struct strbuf *gpg_status)
{
- struct child_process gpg;
+ struct child_process gpg = CHILD_PROCESS_INIT;
const char *args_gpg[] = {NULL, "--status-fd=1", "--verify", "FILE", "-", NULL};
char path[PATH_MAX];
int fd, ret;
@@ -133,7 +132,6 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
path, strerror(errno));
close(fd);
- memset(&gpg, 0, sizeof(gpg));
gpg.argv = args_gpg;
gpg.in = -1;
gpg.out = -1;
diff --git a/graph.c b/graph.c
index 6404331..c25a09a 100644
--- a/graph.c
+++ b/graph.c
@@ -267,16 +267,10 @@ static void graph_ensure_capacity(struct git_graph *graph, int num_columns)
graph->column_capacity *= 2;
} while (graph->column_capacity < num_columns);
- graph->columns = xrealloc(graph->columns,
- sizeof(struct column) *
- graph->column_capacity);
- graph->new_columns = xrealloc(graph->new_columns,
- sizeof(struct column) *
- graph->column_capacity);
- graph->mapping = xrealloc(graph->mapping,
- sizeof(int) * 2 * graph->column_capacity);
- graph->new_mapping = xrealloc(graph->new_mapping,
- sizeof(int) * 2 * graph->column_capacity);
+ REALLOC_ARRAY(graph->columns, graph->column_capacity);
+ REALLOC_ARRAY(graph->new_columns, graph->column_capacity);
+ REALLOC_ARRAY(graph->mapping, graph->column_capacity * 2);
+ REALLOC_ARRAY(graph->new_mapping, graph->column_capacity * 2);
}
/*
@@ -1145,7 +1139,7 @@ int graph_next_line(struct git_graph *graph, struct strbuf *sb)
static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
{
- int i, j;
+ int i;
if (graph->state != GRAPH_COMMIT) {
graph_next_line(graph, sb);
@@ -1161,21 +1155,11 @@ static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
*/
for (i = 0; i < graph->num_columns; i++) {
struct column *col = &graph->columns[i];
- struct commit *col_commit = col->commit;
- if (col_commit == graph->commit) {
- strbuf_write_column(sb, col, '|');
-
- if (graph->num_parents < 3)
- strbuf_addch(sb, ' ');
- else {
- int num_spaces = ((graph->num_parents - 2) * 2);
- for (j = 0; j < num_spaces; j++)
- strbuf_addch(sb, ' ');
- }
- } else {
- strbuf_write_column(sb, col, '|');
+ strbuf_write_column(sb, col, '|');
+ if (col->commit == graph->commit && graph->num_parents > 2)
+ strbuf_addchars(sb, ' ', (graph->num_parents - 2) * 2);
+ else
strbuf_addch(sb, ' ');
- }
}
graph_pad_horizontally(graph, sb, graph->num_columns);
diff --git a/help.c b/help.c
index 7af65e2..2072a87 100644
--- a/help.c
+++ b/help.c
@@ -305,7 +305,7 @@ const char *help_unknown_cmd(const char *cmd)
add_cmd_list(&main_cmds, &aliases);
add_cmd_list(&main_cmds, &other_cmds);
qsort(main_cmds.names, main_cmds.cnt,
- sizeof(main_cmds.names), cmdname_compare);
+ sizeof(*main_cmds.names), cmdname_compare);
uniq(&main_cmds);
/* This abuses cmdname->len for levenshtein distance */
diff --git a/http-backend.c b/http-backend.c
index 80790bb..404e682 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -219,29 +219,22 @@ static void get_idx_file(char *name)
send_local_file("application/x-git-packed-objects-toc", name);
}
-static int http_config(const char *var, const char *value, void *cb)
+static void http_config(void)
{
- const char *p;
+ int i, value = 0;
+ struct strbuf var = STRBUF_INIT;
- if (!strcmp(var, "http.getanyfile")) {
- getanyfile = git_config_bool(var, value);
- return 0;
- }
+ git_config_get_bool("http.getanyfile", &getanyfile);
- if (skip_prefix(var, "http.", &p)) {
- int i;
-
- for (i = 0; i < ARRAY_SIZE(rpc_service); i++) {
- struct rpc_service *svc = &rpc_service[i];
- if (!strcmp(p, svc->config_name)) {
- svc->enabled = git_config_bool(var, value);
- return 0;
- }
- }
+ for (i = 0; i < ARRAY_SIZE(rpc_service); i++) {
+ struct rpc_service *svc = &rpc_service[i];
+ strbuf_addf(&var, "http.%s", svc->config_name);
+ if (!git_config_get_bool(var.buf, &value))
+ svc->enabled = value;
+ strbuf_reset(&var);
}
- /* we are not interested in parsing any other configuration here */
- return 0;
+ strbuf_release(&var);
}
static struct rpc_service *select_service(const char *name)
@@ -323,7 +316,7 @@ static void run_service(const char **argv)
const char *host = getenv("REMOTE_ADDR");
struct argv_array env = ARGV_ARRAY_INIT;
int gzipped_request = 0;
- struct child_process cld;
+ struct child_process cld = CHILD_PROCESS_INIT;
if (encoding && !strcmp(encoding, "gzip"))
gzipped_request = 1;
@@ -341,7 +334,6 @@ static void run_service(const char **argv)
argv_array_pushf(&env, "GIT_COMMITTER_EMAIL=%s@http.%s",
user, host);
- memset(&cld, 0, sizeof(cld));
cld.argv = argv;
cld.env = env.argv;
if (gzipped_request)
@@ -627,7 +619,7 @@ int main(int argc, char **argv)
access("git-daemon-export-ok", F_OK) )
not_found("Repository not exported: '%s'", dir);
- git_config(http_config, NULL);
+ http_config();
cmd->imp(cmd_arg);
return 0;
}
diff --git a/http-walker.c b/http-walker.c
index dbddfaa..88da546 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -230,7 +230,6 @@ static void process_alternates_response(void *callback_data)
int okay = 0;
int serverlen = 0;
struct alt_base *newalt;
- char *target = NULL;
if (data[i] == '/') {
/*
* This counts
@@ -287,17 +286,15 @@ static void process_alternates_response(void *callback_data)
}
/* skip "objects\n" at end */
if (okay) {
- target = xmalloc(serverlen + posn - i - 6);
- memcpy(target, base, serverlen);
- memcpy(target + serverlen, data + i,
- posn - i - 7);
- target[serverlen + posn - i - 7] = 0;
+ struct strbuf target = STRBUF_INIT;
+ strbuf_add(&target, base, serverlen);
+ strbuf_add(&target, data + i, posn - i - 7);
if (walker->get_verbosely)
- fprintf(stderr,
- "Also look at %s\n", target);
+ fprintf(stderr, "Also look at %s\n",
+ target.buf);
newalt = xmalloc(sizeof(*newalt));
newalt->next = NULL;
- newalt->base = target;
+ newalt->base = strbuf_detach(&target, NULL);
newalt->got_indices = 0;
newalt->packs = NULL;
diff --git a/http.c b/http.c
index c8cd50d..0adcec4 100644
--- a/http.c
+++ b/http.c
@@ -300,6 +300,9 @@ static CURL *get_curl_handle(void)
{
CURL *result = curl_easy_init();
+ if (!result)
+ die("curl_easy_init failed");
+
if (!curl_ssl_verify) {
curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0);
@@ -399,7 +402,8 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
git_config(urlmatch_config_entry, &config);
free(normalized_url);
- curl_global_init(CURL_GLOBAL_ALL);
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
+ die("curl_global_init failed");
http_proactive_auth = proactive_auth;
@@ -417,10 +421,8 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
}
curlm = curl_multi_init();
- if (curlm == NULL) {
- fprintf(stderr, "Error creating curl multi handle.\n");
- exit(1);
- }
+ if (!curlm)
+ die("curl_multi_init failed");
#endif
if (getenv("GIT_SSL_NO_VERIFY"))
@@ -1332,7 +1334,7 @@ int finish_http_pack_request(struct http_pack_request *preq)
struct packed_git **lst;
struct packed_git *p = preq->target;
char *tmp_idx;
- struct child_process ip;
+ struct child_process ip = CHILD_PROCESS_INIT;
const char *ip_argv[8];
close_pack_index(p);
@@ -1355,7 +1357,6 @@ int finish_http_pack_request(struct http_pack_request *preq)
ip_argv[3] = preq->tmpfile;
ip_argv[4] = NULL;
- memset(&ip, 0, sizeof(ip));
ip.argv = ip_argv;
ip.git_cmd = 1;
ip.no_stdin = 1;
diff --git a/ident.c b/ident.c
index 1d9b6e7..5ff1aad 100644
--- a/ident.c
+++ b/ident.c
@@ -9,7 +9,7 @@
static struct strbuf git_default_name = STRBUF_INIT;
static struct strbuf git_default_email = STRBUF_INIT;
-static char git_default_date[50];
+static struct strbuf git_default_date = STRBUF_INIT;
#define IDENT_NAME_GIVEN 01
#define IDENT_MAIL_GIVEN 02
@@ -102,7 +102,7 @@ static void copy_email(const struct passwd *pw, struct strbuf *email)
add_domainname(email);
}
-static const char *ident_default_name(void)
+const char *ident_default_name(void)
{
if (!git_default_name.len) {
copy_gecos(xgetpwuid_self(), &git_default_name);
@@ -129,9 +129,9 @@ const char *ident_default_email(void)
static const char *ident_default_date(void)
{
- if (!git_default_date[0])
- datestamp(git_default_date, sizeof(git_default_date));
- return git_default_date;
+ if (!git_default_date.len)
+ datestamp(&git_default_date);
+ return git_default_date.buf;
}
static int crud(unsigned char c)
@@ -292,7 +292,6 @@ const char *fmt_ident(const char *name, const char *email,
const char *date_str, int flag)
{
static struct strbuf ident = STRBUF_INIT;
- char date[50];
int strict = (flag & IDENT_STRICT);
int want_date = !(flag & IDENT_NO_DATE);
int want_name = !(flag & IDENT_NO_NAME);
@@ -320,15 +319,6 @@ const char *fmt_ident(const char *name, const char *email,
die("unable to auto-detect email address (got '%s')", email);
}
- if (want_date) {
- if (date_str && date_str[0]) {
- if (parse_date(date_str, date, sizeof(date)) < 0)
- die("invalid date format: %s", date_str);
- }
- else
- strcpy(date, ident_default_date());
- }
-
strbuf_reset(&ident);
if (want_name) {
strbuf_addstr_without_crud(&ident, name);
@@ -339,8 +329,14 @@ const char *fmt_ident(const char *name, const char *email,
strbuf_addch(&ident, '>');
if (want_date) {
strbuf_addch(&ident, ' ');
- strbuf_addstr_without_crud(&ident, date);
+ if (date_str && date_str[0]) {
+ if (parse_date(date_str, &ident) < 0)
+ die("invalid date format: %s", date_str);
+ }
+ else
+ strbuf_addstr(&ident, ident_default_date());
}
+
return ident.buf;
}
diff --git a/imap-send.c b/imap-send.c
index 524fbab..70bcc7a 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -69,6 +69,7 @@ struct imap_server_conf {
char *tunnel;
char *host;
int port;
+ char *folder;
char *user;
char *pass;
int use_ssl;
@@ -82,6 +83,7 @@ static struct imap_server_conf server = {
NULL, /* tunnel */
NULL, /* host */
0, /* port */
+ NULL, /* folder */
NULL, /* user */
NULL, /* pass */
0, /* use_ssl */
@@ -128,7 +130,6 @@ struct imap_cmd_cb {
char *data;
int dlen;
int uid;
- unsigned create:1, trycreate:1;
};
struct imap_cmd {
@@ -493,9 +494,9 @@ static int nfsnprintf(char *buf, int blen, const char *fmt, ...)
return ret;
}
-static struct imap_cmd *v_issue_imap_cmd(struct imap_store *ctx,
- struct imap_cmd_cb *cb,
- const char *fmt, va_list ap)
+static struct imap_cmd *issue_imap_cmd(struct imap_store *ctx,
+ struct imap_cmd_cb *cb,
+ const char *fmt, va_list ap)
{
struct imap *imap = ctx->imap;
struct imap_cmd *cmd;
@@ -524,7 +525,7 @@ static struct imap_cmd *v_issue_imap_cmd(struct imap_store *ctx,
if (Verbose) {
if (imap->num_in_progress)
printf("(%d in progress) ", imap->num_in_progress);
- if (memcmp(cmd->cmd, "LOGIN", 5))
+ if (!starts_with(cmd->cmd, "LOGIN"))
printf(">>> %s", buf);
else
printf(">>> %d LOGIN <user> <pass>\n", cmd->tag);
@@ -559,20 +560,6 @@ static struct imap_cmd *v_issue_imap_cmd(struct imap_store *ctx,
}
__attribute__((format (printf, 3, 4)))
-static struct imap_cmd *issue_imap_cmd(struct imap_store *ctx,
- struct imap_cmd_cb *cb,
- const char *fmt, ...)
-{
- struct imap_cmd *ret;
- va_list ap;
-
- va_start(ap, fmt);
- ret = v_issue_imap_cmd(ctx, cb, fmt, ap);
- va_end(ap);
- return ret;
-}
-
-__attribute__((format (printf, 3, 4)))
static int imap_exec(struct imap_store *ctx, struct imap_cmd_cb *cb,
const char *fmt, ...)
{
@@ -580,7 +567,7 @@ static int imap_exec(struct imap_store *ctx, struct imap_cmd_cb *cb,
struct imap_cmd *cmdp;
va_start(ap, fmt);
- cmdp = v_issue_imap_cmd(ctx, cb, fmt, ap);
+ cmdp = issue_imap_cmd(ctx, cb, fmt, ap);
va_end(ap);
if (!cmdp)
return RESP_BAD;
@@ -596,7 +583,7 @@ static int imap_exec_m(struct imap_store *ctx, struct imap_cmd_cb *cb,
struct imap_cmd *cmdp;
va_start(ap, fmt);
- cmdp = v_issue_imap_cmd(ctx, cb, fmt, ap);
+ cmdp = issue_imap_cmd(ctx, cb, fmt, ap);
va_end(ap);
if (!cmdp)
return DRV_STORE_BAD;
@@ -714,8 +701,8 @@ static int parse_response_code(struct imap_store *ctx, struct imap_cmd_cb *cb,
static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
{
struct imap *imap = ctx->imap;
- struct imap_cmd *cmdp, **pcmdp, *ncmdp;
- char *cmd, *arg, *arg1, *p;
+ struct imap_cmd *cmdp, **pcmdp;
+ char *cmd, *arg, *arg1;
int n, resp, resp2, tag;
for (;;) {
@@ -801,39 +788,17 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd)
if (!strcmp("OK", arg))
resp = DRV_OK;
else {
- if (!strcmp("NO", arg)) {
- if (cmdp->cb.create && cmd && (cmdp->cb.trycreate || !memcmp(cmd, "[TRYCREATE]", 11))) { /* SELECT, APPEND or UID COPY */
- p = strchr(cmdp->cmd, '"');
- if (!issue_imap_cmd(ctx, NULL, "CREATE \"%.*s\"", (int)(strchr(p + 1, '"') - p + 1), p)) {
- resp = RESP_BAD;
- goto normal;
- }
- /* not waiting here violates the spec, but a server that does not
- grok this nonetheless violates it too. */
- cmdp->cb.create = 0;
- if (!(ncmdp = issue_imap_cmd(ctx, &cmdp->cb, "%s", cmdp->cmd))) {
- resp = RESP_BAD;
- goto normal;
- }
- free(cmdp->cmd);
- free(cmdp);
- if (!tcmd)
- return 0; /* ignored */
- if (cmdp == tcmd)
- tcmd = ncmdp;
- continue;
- }
+ if (!strcmp("NO", arg))
resp = RESP_NO;
- } else /*if (!strcmp("BAD", arg))*/
+ else /*if (!strcmp("BAD", arg))*/
resp = RESP_BAD;
fprintf(stderr, "IMAP command '%s' returned response (%s) - %s\n",
- memcmp(cmdp->cmd, "LOGIN", 5) ?
+ !starts_with(cmdp->cmd, "LOGIN") ?
cmdp->cmd : "LOGIN <user> <pass>",
arg, cmd ? cmd : "");
}
if ((resp2 = parse_response_code(ctx, &cmdp->cb, cmd)) > resp)
resp = resp2;
- normal:
if (cmdp->cb.done)
cmdp->cb.done(ctx, cmdp, resp);
free(cmdp->cb.data);
@@ -944,7 +909,7 @@ static int auth_cram_md5(struct imap_store *ctx, struct imap_cmd *cmd, const cha
return 0;
}
-static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
+static struct imap_store *imap_open_store(struct imap_server_conf *srvc, char *folder)
{
struct credential cred = CREDENTIAL_INIT;
struct imap_store *ctx;
@@ -954,24 +919,23 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
ctx = xcalloc(1, sizeof(*ctx));
- ctx->imap = imap = xcalloc(sizeof(*imap), 1);
+ ctx->imap = imap = xcalloc(1, sizeof(*imap));
imap->buf.sock.fd[0] = imap->buf.sock.fd[1] = -1;
imap->in_progress_append = &imap->in_progress;
/* open connection to IMAP server */
if (srvc->tunnel) {
- const char *argv[] = { srvc->tunnel, NULL };
- struct child_process tunnel = {NULL};
+ struct child_process tunnel = CHILD_PROCESS_INIT;
imap_info("Starting tunnel '%s'... ", srvc->tunnel);
- tunnel.argv = argv;
+ argv_array_push(&tunnel.args, srvc->tunnel);
tunnel.use_shell = 1;
tunnel.in = -1;
tunnel.out = -1;
if (start_command(&tunnel))
- die("cannot start proxy %s", argv[0]);
+ die("cannot start proxy %s", srvc->tunnel);
imap->buf.sock.fd[0] = tunnel.out;
imap->buf.sock.fd[1] = tunnel.in;
@@ -1156,6 +1120,25 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc)
credential_approve(&cred);
credential_clear(&cred);
+ /* check the target mailbox exists */
+ ctx->name = folder;
+ switch (imap_exec(ctx, NULL, "EXAMINE \"%s\"", ctx->name)) {
+ case RESP_OK:
+ /* ok */
+ break;
+ case RESP_BAD:
+ fprintf(stderr, "IMAP error: could not check mailbox\n");
+ goto out;
+ case RESP_NO:
+ if (imap_exec(ctx, NULL, "CREATE \"%s\"", ctx->name) == RESP_OK) {
+ imap_info("Created missing mailbox\n");
+ } else {
+ fprintf(stderr, "IMAP error: could not create missing mailbox\n");
+ goto out;
+ }
+ break;
+ }
+
ctx->prefix = "";
return ctx;
@@ -1164,6 +1147,7 @@ bail:
credential_reject(&cred);
credential_clear(&cred);
+ out:
imap_close_store(ctx);
return NULL;
}
@@ -1219,7 +1203,6 @@ static int imap_store_msg(struct imap_store *ctx, struct strbuf *msg)
box = ctx->name;
prefix = !strcmp(box, "INBOX") ? "" : ctx->prefix;
- cb.create = 0;
ret = imap_exec_m(ctx, &cb, "APPEND \"%s%s\" ", prefix, box);
imap->caps = imap->rcaps;
if (ret != DRV_OK)
@@ -1324,45 +1307,35 @@ static int split_msg(struct strbuf *all_msgs, struct strbuf *msg, int *ofs)
return 1;
}
-static char *imap_folder;
-
-static int git_imap_config(const char *key, const char *val, void *cb)
+static void git_imap_config(void)
{
- if (!skip_prefix(key, "imap.", &key))
- return 0;
+ const char *val = NULL;
+
+ git_config_get_bool("imap.sslverify", &server.ssl_verify);
+ git_config_get_bool("imap.preformattedhtml", &server.use_html);
+ git_config_get_string("imap.folder", &server.folder);
- /* check booleans first, and barf on others */
- if (!strcmp("sslverify", key))
- server.ssl_verify = git_config_bool(key, val);
- else if (!strcmp("preformattedhtml", key))
- server.use_html = git_config_bool(key, val);
- else if (!val)
- return config_error_nonbool(key);
-
- if (!strcmp("folder", key)) {
- imap_folder = xstrdup(val);
- } else if (!strcmp("host", key)) {
- if (starts_with(val, "imap:"))
- val += 5;
- else if (starts_with(val, "imaps:")) {
- val += 6;
- server.use_ssl = 1;
+ if (!git_config_get_value("imap.host", &val)) {
+ if (!val) {
+ git_die_config("imap.host", "Missing value for 'imap.host'");
+ } else {
+ if (starts_with(val, "imap:"))
+ val += 5;
+ else if (starts_with(val, "imaps:")) {
+ val += 6;
+ server.use_ssl = 1;
+ }
+ if (starts_with(val, "//"))
+ val += 2;
+ server.host = xstrdup(val);
}
- if (starts_with(val, "//"))
- val += 2;
- server.host = xstrdup(val);
- } else if (!strcmp("user", key))
- server.user = xstrdup(val);
- else if (!strcmp("pass", key))
- server.pass = xstrdup(val);
- else if (!strcmp("port", key))
- server.port = git_config_int(key, val);
- else if (!strcmp("tunnel", key))
- server.tunnel = xstrdup(val);
- else if (!strcmp("authmethod", key))
- server.auth_method = xstrdup(val);
+ }
- return 0;
+ git_config_get_string("imap.user", &server.user);
+ git_config_get_string("imap.pass", &server.pass);
+ git_config_get_int("imap.port", &server.port);
+ git_config_get_string("imap.tunnel", &server.tunnel);
+ git_config_get_string("imap.authmethod", &server.auth_method);
}
int main(int argc, char **argv)
@@ -1383,12 +1356,12 @@ int main(int argc, char **argv)
usage(imap_send_usage);
setup_git_directory_gently(&nongit_ok);
- git_config(git_imap_config, NULL);
+ git_imap_config();
if (!server.port)
server.port = server.use_ssl ? 993 : 143;
- if (!imap_folder) {
+ if (!server.folder) {
fprintf(stderr, "no imap store specified\n");
return 1;
}
@@ -1418,14 +1391,13 @@ int main(int argc, char **argv)
}
/* write it to the imap server */
- ctx = imap_open_store(&server);
+ ctx = imap_open_store(&server, server.folder);
if (!ctx) {
fprintf(stderr, "failed to open store\n");
return 1;
}
fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" : "");
- ctx->name = imap_folder;
while (1) {
unsigned percent = n * 100 / total;
diff --git a/khash.h b/khash.h
index 06c7906..376475a 100644
--- a/khash.h
+++ b/khash.h
@@ -121,13 +121,9 @@ static const double __ac_HASH_UPPER = 0.77;
if (!new_flags) return -1; \
memset(new_flags, 0xaa, __ac_fsize(new_n_buckets) * sizeof(khint32_t)); \
if (h->n_buckets < new_n_buckets) { /* expand */ \
- khkey_t *new_keys = (khkey_t*)xrealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \
- if (!new_keys) return -1; \
- h->keys = new_keys; \
+ REALLOC_ARRAY(h->keys, new_n_buckets); \
if (kh_is_map) { \
- khval_t *new_vals = (khval_t*)xrealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \
- if (!new_vals) return -1; \
- h->vals = new_vals; \
+ REALLOC_ARRAY(h->vals, new_n_buckets); \
} \
} /* otherwise shrink */ \
} \
@@ -160,8 +156,8 @@ static const double __ac_HASH_UPPER = 0.77;
} \
} \
if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \
- h->keys = (khkey_t*)xrealloc((void *)h->keys, new_n_buckets * sizeof(khkey_t)); \
- if (kh_is_map) h->vals = (khval_t*)xrealloc((void *)h->vals, new_n_buckets * sizeof(khval_t)); \
+ REALLOC_ARRAY(h->keys, new_n_buckets); \
+ if (kh_is_map) REALLOC_ARRAY(h->vals, new_n_buckets); \
} \
free(h->flags); /* free the working space */ \
h->flags = new_flags; \
diff --git a/line-log.c b/line-log.c
index 1008e72..038c58a 100644
--- a/line-log.c
+++ b/line-log.c
@@ -533,7 +533,7 @@ static void fill_line_ends(struct diff_filespec *spec, long *lines,
}
/* shrink the array to fit the elements */
- ends = xrealloc(ends, cur * sizeof(*ends));
+ REALLOC_ARRAY(ends, cur);
*lines = cur-1;
*line_ends = ends;
}
diff --git a/ll-merge.c b/ll-merge.c
index fb61ea6..8ea03e5 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -225,11 +225,8 @@ static int read_merge_config(const char *var, const char *value, void *cb)
const char *key, *name;
int namelen;
- if (!strcmp(var, "merge.default")) {
- if (value)
- default_ll_merge = xstrdup(value);
- return 0;
- }
+ if (!strcmp(var, "merge.default"))
+ return git_config_string(&default_ll_merge, var, value);
/*
* We are not interested in anything but "merge.<name>.variable";
@@ -254,12 +251,8 @@ static int read_merge_config(const char *var, const char *value, void *cb)
ll_user_merge_tail = &(fn->next);
}
- if (!strcmp("name", key)) {
- if (!value)
- return error("%s: lacks value", var);
- fn->description = xstrdup(value);
- return 0;
- }
+ if (!strcmp("name", key))
+ return git_config_string(&fn->description, var, value);
if (!strcmp("driver", key)) {
if (!value)
@@ -285,12 +278,8 @@ static int read_merge_config(const char *var, const char *value, void *cb)
return 0;
}
- if (!strcmp("recursive", key)) {
- if (!value)
- return error("%s: lacks value", var);
- fn->recursive = xstrdup(value);
- return 0;
- }
+ if (!strcmp("recursive", key))
+ return git_config_string(&fn->recursive, var, value);
return 0;
}
diff --git a/lockfile.c b/lockfile.c
index 2564a7f..2a800ce 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -237,6 +237,16 @@ int close_lock_file(struct lock_file *lk)
return close(fd);
}
+int reopen_lock_file(struct lock_file *lk)
+{
+ if (0 <= lk->fd)
+ die(_("BUG: reopen a lockfile that is still open"));
+ if (!lk->filename[0])
+ die(_("BUG: reopen a lockfile that has been committed"));
+ lk->fd = open(lk->filename, O_WRONLY);
+ return lk->fd;
+}
+
int commit_lock_file(struct lock_file *lk)
{
char result_file[PATH_MAX];
diff --git a/log-tree.c b/log-tree.c
index 0c53dc1..cff7ac1 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -12,17 +12,7 @@
#include "sequencer.h"
#include "line-log.h"
-struct decoration name_decoration = { "object names" };
-
-enum decoration_type {
- DECORATION_NONE = 0,
- DECORATION_REF_LOCAL,
- DECORATION_REF_REMOTE,
- DECORATION_REF_TAG,
- DECORATION_REF_STASH,
- DECORATION_REF_HEAD,
- DECORATION_GRAFTED,
-};
+static struct decoration name_decoration = { "object names" };
static char decoration_colors[][COLOR_MAXLEN] = {
GIT_COLOR_RESET,
@@ -84,15 +74,20 @@ int parse_decorate_color_config(const char *var, const int ofs, const char *valu
#define decorate_get_color_opt(o, ix) \
decorate_get_color((o)->use_color, ix)
-static void add_name_decoration(enum decoration_type type, const char *name, struct object *obj)
+void add_name_decoration(enum decoration_type type, const char *name, struct object *obj)
{
int nlen = strlen(name);
- struct name_decoration *res = xmalloc(sizeof(struct name_decoration) + nlen);
+ struct name_decoration *res = xmalloc(sizeof(*res) + nlen + 1);
memcpy(res->name, name, nlen + 1);
res->type = type;
res->next = add_decoration(&name_decoration, obj, res);
}
+const struct name_decoration *get_name_decoration(const struct object *obj)
+{
+ return lookup_decoration(&name_decoration, obj);
+}
+
static int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)
{
struct object *obj;
@@ -179,24 +174,25 @@ static void show_children(struct rev_info *opt, struct commit *commit, int abbre
}
/*
- * The caller makes sure there is no funny color before
- * calling. format_decorations makes sure the same after return.
+ * The caller makes sure there is no funny color before calling.
+ * format_decorations_extended makes sure the same after return.
*/
-void format_decorations(struct strbuf *sb,
+void format_decorations_extended(struct strbuf *sb,
const struct commit *commit,
- int use_color)
+ int use_color,
+ const char *prefix,
+ const char *separator,
+ const char *suffix)
{
- const char *prefix;
- struct name_decoration *decoration;
+ const struct name_decoration *decoration;
const char *color_commit =
diff_get_color(use_color, DIFF_COMMIT);
const char *color_reset =
decorate_get_color(use_color, DECORATION_NONE);
- decoration = lookup_decoration(&name_decoration, &commit->object);
+ decoration = get_name_decoration(&commit->object);
if (!decoration)
return;
- prefix = " (";
while (decoration) {
strbuf_addstr(sb, color_commit);
strbuf_addstr(sb, prefix);
@@ -205,11 +201,11 @@ void format_decorations(struct strbuf *sb,
strbuf_addstr(sb, "tag: ");
strbuf_addstr(sb, decoration->name);
strbuf_addstr(sb, color_reset);
- prefix = ", ";
+ prefix = separator;
decoration = decoration->next;
}
strbuf_addstr(sb, color_commit);
- strbuf_addch(sb, ')');
+ strbuf_addstr(sb, suffix);
strbuf_addstr(sb, color_reset);
}
@@ -649,7 +645,7 @@ void show_log(struct rev_info *opt)
graph_show_commit_msg(opt->graph, &msgbuf);
else
fwrite(msgbuf.buf, sizeof(char), msgbuf.len, stdout);
- if (opt->use_terminator) {
+ if (opt->use_terminator && !commit_format_is_empty(opt->commit_format)) {
if (!opt->missing_newline)
graph_show_padding(opt->graph);
putchar(opt->diffopt.line_termination);
@@ -676,7 +672,8 @@ int log_tree_diff_flush(struct rev_info *opt)
show_log(opt);
if ((opt->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT) &&
opt->verbose_header &&
- opt->commit_format != CMIT_FMT_ONELINE) {
+ opt->commit_format != CMIT_FMT_ONELINE &&
+ !commit_format_is_empty(opt->commit_format)) {
/*
* When showing a verbose header (i.e. log message),
* and not in --pretty=oneline format, we would want
diff --git a/log-tree.h b/log-tree.h
index d6ecd4d..b26160c 100644
--- a/log-tree.h
+++ b/log-tree.h
@@ -13,7 +13,13 @@ int log_tree_diff_flush(struct rev_info *);
int log_tree_commit(struct rev_info *, struct commit *);
int log_tree_opt_parse(struct rev_info *, const char **, int);
void show_log(struct rev_info *opt);
-void format_decorations(struct strbuf *sb, const struct commit *commit, int use_color);
+void format_decorations_extended(struct strbuf *sb, const struct commit *commit,
+ int use_color,
+ const char *prefix,
+ const char *separator,
+ const char *suffix);
+#define format_decorations(strbuf, commit, color) \
+ format_decorations_extended((strbuf), (commit), (color), " (", ", ", ")")
void show_decorations(struct rev_info *opt, struct commit *commit);
void log_write_email_headers(struct rev_info *opt, struct commit *commit,
const char **subject_p,
diff --git a/merge-recursive.c b/merge-recursive.c
index 1d332b8..8ad4be8 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -163,9 +163,7 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
if (!show(o, v))
return;
- strbuf_grow(&o->obuf, o->call_depth * 2 + 2);
- memset(o->obuf.buf + o->obuf.len, ' ', o->call_depth * 2);
- strbuf_setlen(&o->obuf, o->obuf.len + o->call_depth * 2);
+ strbuf_addchars(&o->obuf, ' ', o->call_depth * 2);
va_start(ap, fmt);
strbuf_vaddf(&o->obuf, fmt, ap);
@@ -1557,7 +1555,7 @@ static int blob_unchanged(const unsigned char *o_sha,
* unchanged since their sha1s have already been compared.
*/
if (renormalize_buffer(path, o.buf, o.len, &o) |
- renormalize_buffer(path, a.buf, o.len, &a))
+ renormalize_buffer(path, a.buf, a.len, &a))
ret = (o.len == a.len && !memcmp(o.buf, a.buf, o.len));
error_return:
@@ -1688,10 +1686,6 @@ static int merge_content(struct merge_options *o,
static int process_entry(struct merge_options *o,
const char *path, struct stage_data *entry)
{
- /*
- printf("processing entry, clean cache: %s\n", index_only ? "yes": "no");
- print_index_entry("\tpath: ", entry);
- */
int clean_merge = 1;
int normalize = o->renormalize;
unsigned o_mode = entry->stages[1].mode;
@@ -2026,22 +2020,12 @@ int merge_recursive_generic(struct merge_options *o,
return clean ? 0 : 1;
}
-static int merge_recursive_config(const char *var, const char *value, void *cb)
+static void merge_recursive_config(struct merge_options *o)
{
- struct merge_options *o = cb;
- if (!strcmp(var, "merge.verbosity")) {
- o->verbosity = git_config_int(var, value);
- return 0;
- }
- if (!strcmp(var, "diff.renamelimit")) {
- o->diff_rename_limit = git_config_int(var, value);
- return 0;
- }
- if (!strcmp(var, "merge.renamelimit")) {
- o->merge_rename_limit = git_config_int(var, value);
- return 0;
- }
- return git_xmerge_config(var, value, cb);
+ git_config_get_int("merge.verbosity", &o->verbosity);
+ git_config_get_int("diff.renamelimit", &o->diff_rename_limit);
+ git_config_get_int("merge.renamelimit", &o->merge_rename_limit);
+ git_config(git_xmerge_config, NULL);
}
void init_merge_options(struct merge_options *o)
@@ -2052,7 +2036,7 @@ void init_merge_options(struct merge_options *o)
o->diff_rename_limit = -1;
o->merge_rename_limit = -1;
o->renormalize = 0;
- git_config(merge_recursive_config, o);
+ merge_recursive_config(o);
if (getenv("GIT_MERGE_VERBOSITY"))
o->verbosity =
strtol(getenv("GIT_MERGE_VERBOSITY"), NULL, 10);
diff --git a/object.c b/object.c
index a16b9f9..ca9d790 100644
--- a/object.c
+++ b/object.c
@@ -33,13 +33,20 @@ const char *typename(unsigned int type)
return object_type_strings[type];
}
-int type_from_string(const char *str)
+int type_from_string_gently(const char *str, ssize_t len, int gentle)
{
int i;
+ if (len < 0)
+ len = strlen(str);
+
for (i = 1; i < ARRAY_SIZE(object_type_strings); i++)
- if (!strcmp(str, object_type_strings[i]))
+ if (!strncmp(str, object_type_strings[i], len))
return i;
+
+ if (gentle)
+ return -1;
+
die("invalid object type \"%s\"", str);
}
@@ -312,7 +319,7 @@ static void add_object_array_with_mode_context(struct object *obj, const char *n
if (nr >= alloc) {
alloc = (alloc + 32) * 2;
- objects = xrealloc(objects, alloc * sizeof(*objects));
+ REALLOC_ARRAY(objects, alloc);
array->alloc = alloc;
array->objects = objects;
}
diff --git a/object.h b/object.h
index 5e8d8ee..e028ced 100644
--- a/object.h
+++ b/object.h
@@ -53,7 +53,8 @@ struct object {
};
extern const char *typename(unsigned int type);
-extern int type_from_string(const char *str);
+extern int type_from_string_gently(const char *str, ssize_t, int gentle);
+#define type_from_string(str) type_from_string_gently(str, -1, 0)
/*
* Return the current number of buckets in the object hashmap.
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 5f1791a..8029ae3 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -111,8 +111,7 @@ static inline void push_bitmapped_commit(struct commit *commit, struct ewah_bitm
{
if (writer.selected_nr >= writer.selected_alloc) {
writer.selected_alloc = (writer.selected_alloc + 32) * 2;
- writer.selected = xrealloc(writer.selected,
- writer.selected_alloc * sizeof(struct bitmapped_commit));
+ REALLOC_ARRAY(writer.selected, writer.selected_alloc);
}
writer.selected[writer.selected_nr].commit = commit;
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 91e4101..a1f3c0d 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -400,10 +400,8 @@ static int ext_index_add_object(struct object *object, const char *name)
if (hash_ret > 0) {
if (eindex->count >= eindex->alloc) {
eindex->alloc = (eindex->alloc + 16) * 3 / 2;
- eindex->objects = xrealloc(eindex->objects,
- eindex->alloc * sizeof(struct object *));
- eindex->hashes = xrealloc(eindex->hashes,
- eindex->alloc * sizeof(uint32_t));
+ REALLOC_ARRAY(eindex->objects, eindex->alloc);
+ REALLOC_ARRAY(eindex->hashes, eindex->alloc);
}
bitmap_pos = eindex->count;
diff --git a/pack-objects.c b/pack-objects.c
index 9992f3e..6398a8a 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -92,8 +92,7 @@ struct object_entry *packlist_alloc(struct packing_data *pdata,
if (pdata->nr_objects >= pdata->nr_alloc) {
pdata->nr_alloc = (pdata->nr_alloc + 1024) * 3 / 2;
- pdata->objects = xrealloc(pdata->objects,
- pdata->nr_alloc * sizeof(*new_entry));
+ REALLOC_ARRAY(pdata->objects, pdata->nr_alloc);
}
new_entry = pdata->objects + pdata->nr_objects++;
diff --git a/pack-write.c b/pack-write.c
index 9ccf804..33293ce 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -288,13 +288,12 @@ char *index_pack_lockfile(int ip_out)
* case, we need it to remove the corresponding .keep file
* later on. If we don't get that then tough luck with it.
*/
- if (read_in_full(ip_out, packname, 46) == 46 && packname[45] == '\n' &&
- memcmp(packname, "keep\t", 5) == 0) {
- char path[PATH_MAX];
+ if (read_in_full(ip_out, packname, 46) == 46 && packname[45] == '\n') {
+ const char *name;
packname[45] = 0;
- snprintf(path, sizeof(path), "%s/pack/pack-%s.keep",
- get_object_directory(), packname + 5);
- return xstrdup(path);
+ if (skip_prefix(packname, "keep\t", &name))
+ return xstrfmt("%s/pack/pack-%s.keep",
+ get_object_directory(), name);
}
return NULL;
}
diff --git a/pager.c b/pager.c
index 8b5cbc5..b2b805a 100644
--- a/pager.c
+++ b/pager.c
@@ -6,19 +6,13 @@
#define DEFAULT_PAGER "less"
#endif
-struct pager_config {
- const char *cmd;
- int want;
- char *value;
-};
-
/*
* This is split up from the rest of git so that we can do
* something different on Windows.
*/
static const char *pager_argv[] = { NULL, NULL };
-static struct child_process pager_process;
+static struct child_process pager_process = CHILD_PROCESS_INIT;
static void wait_for_pager(void)
{
@@ -155,30 +149,22 @@ int decimal_width(int number)
return width;
}
-static int pager_command_config(const char *var, const char *value, void *data)
+/* returns 0 for "no pager", 1 for "use pager", and -1 for "not specified" */
+int check_pager_config(const char *cmd)
{
- struct pager_config *c = data;
- if (starts_with(var, "pager.") && !strcmp(var + 6, c->cmd)) {
- int b = git_config_maybe_bool(var, value);
+ int want = -1;
+ struct strbuf key = STRBUF_INIT;
+ const char *value = NULL;
+ strbuf_addf(&key, "pager.%s", cmd);
+ if (!git_config_get_value(key.buf, &value)) {
+ int b = git_config_maybe_bool(key.buf, value);
if (b >= 0)
- c->want = b;
+ want = b;
else {
- c->want = 1;
- c->value = xstrdup(value);
+ want = 1;
+ pager_program = xstrdup(value);
}
}
- return 0;
-}
-
-/* returns 0 for "no pager", 1 for "use pager", and -1 for "not specified" */
-int check_pager_config(const char *cmd)
-{
- struct pager_config c;
- c.cmd = cmd;
- c.want = -1;
- c.value = NULL;
- git_config(pager_command_config, &c);
- if (c.value)
- pager_program = c.value;
- return c.want;
+ strbuf_release(&key);
+ return want;
}
diff --git a/parse-options.c b/parse-options.c
index e7dafa8..80106c0 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -14,8 +14,12 @@ static int parse_options_usage(struct parse_opt_ctx_t *ctx,
int optbug(const struct option *opt, const char *reason)
{
- if (opt->long_name)
+ if (opt->long_name) {
+ if (opt->short_name)
+ return error("BUG: switch '%c' (--%s) %s",
+ opt->short_name, opt->long_name, reason);
return error("BUG: option '%s' %s", opt->long_name, reason);
+ }
return error("BUG: switch '%c' %s", opt->short_name, reason);
}
@@ -347,12 +351,20 @@ static void check_typos(const char *arg, const struct option *options)
static void parse_options_check(const struct option *opts)
{
int err = 0;
+ char short_opts[128];
+ memset(short_opts, '\0', sizeof(short_opts));
for (; opts->type != OPTION_END; opts++) {
if ((opts->flags & PARSE_OPT_LASTARG_DEFAULT) &&
(opts->flags & PARSE_OPT_OPTARG))
err |= optbug(opts, "uses incompatible flags "
"LASTARG_DEFAULT and OPTARG");
+ if (opts->short_name) {
+ if (0x7F <= opts->short_name)
+ err |= optbug(opts, "invalid short name");
+ else if (short_opts[opts->short_name]++)
+ err |= optbug(opts, "short name already used");
+ }
if (opts->flags & PARSE_OPT_NODASH &&
((opts->flags & PARSE_OPT_OPTARG) ||
!(opts->flags & PARSE_OPT_NOARG) ||
diff --git a/path.c b/path.c
index 3afcdb4..f68df0c 100644
--- a/path.c
+++ b/path.c
@@ -148,10 +148,12 @@ void home_config_paths(char **global, char **xdg, char *file)
*global = mkpathdup("%s/.gitconfig", home);
}
- if (!xdg_home)
- *xdg = NULL;
- else
- *xdg = mkpathdup("%s/git/%s", xdg_home, file);
+ if (xdg) {
+ if (!xdg_home)
+ *xdg = NULL;
+ else
+ *xdg = mkpathdup("%s/git/%s", xdg_home, file);
+ }
free(to_free);
}
diff --git a/po/TEAMS b/po/TEAMS
index f75a174..a33a38e 100644
--- a/po/TEAMS
+++ b/po/TEAMS
@@ -5,12 +5,19 @@ Language: bg (Bulgarian)
Repository: https://github.com/git-l10n/git-po
Leader: Alexander Shopov <ash@kambanaria.org>
+Language: ca (Catalan)
+Repository: https://github.com/alexhenrie/git-po
+Leader: Alex Henrie <alexhenrie24@gmail.com>
+
Language: de (German)
Repository: https://github.com/ralfth/git-po-de
Leader: Ralf Thielow <ralf.thielow@googlemail.com>
Members: Thomas Rast <tr@thomasrast.ch>
Jan Krüger <jk@jk.gs>
Christian Stimming <stimming@tuhh.de>
+ Phillip Szelat <phillip.szelat@gmail.com>
+ Matthias Rüster <matthias.ruester@gmail.com>
+ Magnus Görlitz <magnus.goerlitz@googlemail.com>
Language: fr (French)
Repository: https://github.com/jnavila/git
diff --git a/po/bg.po b/po/bg.po
index e862e10..ef97185 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -18,7 +18,7 @@
# root commit начално подаване
# fixup вкарвам подаване в предното без следа
# remote-tracking branch следящ клон
-# git bundle архив на git
+# git bundle пратка на git
# bisect двоично търсене
# am прилагам поредица от кръпки
# working directory/tree — винаги работно дърво, git следи цялото дърво, а не директории
@@ -39,16 +39,41 @@
# sequence последователност/поредица
# whitespace symbol знаци за интервали
# shortlog съкратения журнал
+# backing store мястото за съхранение
+# reject отхвърлено парче
+# topic branch тематичен клон
+# empty head връх без история
+# tree-ish указател към дърво
+# three-way merge тройно сливане
+# dirty нечист, мръсен (файл, индекс)
+# fallback резервен вариант
+# pathspec magic опция за магически пътища
+# bitmap index индекс на база битови маски
+# mark маркер
+# plumbing команди от системно ниво
+# porcelain команди от потребителско ниво
+# pack [noun] пакетен файл - fixme in glossary
+# mainline базово подаване - при cherry-pick на merge - към коя версия да се изчислява разликата
+#
# ----
# FAILED to parse неуспешен анализ на... -> неразпозната стойност на
-#
+# blob обект BLOB
# ========================
-# „“…—
+# „“…— ●≫ѝ→
+#
+# stressed a
+# форма̀та
+# delta - разлика или делта
+# consistency between stdout - standard output/ stdin - standard input/ stderr - standard error
+# mergetag етикет при сливане
+#
# ========================
# RECHECK
# ------------------------
+# FIXME
# HEAD as a reference vs head of a branch
-#
+# git update-index -h извежда само един ред, а не цялата помощ за опциите
+# git fetch --al работи подобно на --all
# ========================
# GENERATE STATS
# ------------------------
@@ -67,7 +92,7 @@
# ========================
# STRINGS statistics
# ------------------------
-# 1307t,0f,921u
+# 2228t
#
# ========================
# MOST IMPORTANT name asc ordering
@@ -75,40 +100,37 @@
# add, blame, branch, checkout, clone, commit, common-cmds, config, diff, fetch, fsck, gc, git-rebase, git-stash, grep, log, mv, parse-options, push, reflog, remote, reset, revert, rm, wt-status
#
# ========================
-# IMPORTANT strings desc, name asc ordering
+# IMPORTANT strings, name asc ordering
# ------------------------
-# 111 apply 54 git-submodule 30 git-am 13 check-ignore 10 merge-file
-# 97 merge 39 init-db 30 describe 12 pathspec 10 merge-base
-# 64 tag 35 archive 29 git-bisect 12 name-rev 10 ls-tree
-# 55 merge-recursive 32 clean 14 show-ref 11 date 10 hash-object
+# apply, archive, check-ignore, clean, date, describe, git-am, git-bisect, git-submodule, hash-object, init-db, ls-tree, merge, merge-base, merge-file, merge-recursive, name-rev, pathspec, show-ref, tag
#
# ========================
# WHOLE STATISTICS strings desc, name asc ordering
# ------------------------
-# 144 [remote] 47 [push] 26 [revert] 12 checkout-index 6 [prune] 2 [verify-tag]
-# 137 [commit] 46 pack-objects 24 [mv] 11 date 6 [gpg-interface] 2 [update-server-info]
-# 114 [branch] 41 [help] 23 repack 11 column 6 [check-attr] 2 [run-command]
-# 111 apply 39 init-db 21 [rm] 10 urlmatch 5 [write-tree] 2 [rerere]
-# 101 notes 36 [add] 21 [common-cmds] 10 shortlog 5 [sha1_name] 2 [read-cache]
-# 100 [wt-status] 35 [reset] 19 [show-branch] 10 merge-file 5 [rev-parse] 2 [obstack]
-# 97 merge 35 archive 19 read-tree 10 merge-base 4 [wrapper] 2 [advice]
-# 78 [checkout] 34 [config] 19 bundle 10 ls-tree 4 [prune-packed] 1 [unpack-trees]
-# 77 [log] 32 clean 16 [parse-options] 10 hash-object 4 [notes-utils] 1 [unpack-objects]
-# 69 [clone] 30 git-am 15 [fsck] 10 for-each-ref 4 [mktree] 1 [progress]
-# 68 index-pack 30 describe 14 show-ref 10 cat-file 4 [check-mailmap] 1 [precompose_utf8]
+# 144 [remote] 47 [push] 26 [revert] 12 [checkout-index] 6 [prune] 2 [verify-tag]
+# 137 [commit] 46 [pack-objects] 24 [mv] 11 [date] 6 [gpg-interface] 2 [update-server-info]
+# 114 [branch] 41 [help] 23 [repack] 11 [column] 6 [check-attr] 2 [run-command]
+# 111 [apply] 39 [init-db] 21 [rm] 10 [urlmatch] 5 [write-tree] 2 [rerere]
+# 101 [notes] 36 [add] 21 [common-cmds] 10 [shortlog] 5 [sha1_name] 2 [read-cache]
+# 100 [wt-status] 35 [reset] 19 [show-branch] 10 [merge-file] 5 [rev-parse] 2 [obstack]
+# 97 [merge] 35 [archive] 19 [read-tree] 10 [merge-base] 4 [wrapper] 2 [advice]
+# 78 [checkout] 34 [config] 19 [bundle] 10 [ls-tree] 4 [prune-packed] 1 [unpack-trees]
+# 77 [log] 32 [clean] 16 [parse-options] 10 [hash-object] 4 [notes-utils] 1 [unpack-objects]
+# 69 [clone] 30 [git-am] 15 [fsck] 10 [for-each-ref] 4 [mktree] 1 [progress]
+# 68 [index-pack] 30 [describe] 14 [show-ref] 10 [cat-file] 4 [check-mailmap] 1 [precompose_utf8]
# 68 [fetch] 29 [git-stash] 14 [gc] 9 [update-ref] 3 [verify-pack] 1 [object]
-# 64 tag 29 git-bisect 14 fast-export 9 [submodule] 3 [reflog] 1 [git]
-# 64 [grep] 28 update-index 13 [diff] 8 [replace] 3 [pack-refs] 1 [diffcore-rename]
-# 56 sequencer 28 [blame] 13 check-ignore 8 [git-pull] 3 [count-objects] 1 [diffcore-order]
-# 55 merge-recursive 27 ls-files 12 pathspec 8 [fmt-merge-msg] 3 [connected] 1 [attr]
-# 54 git-submodule 27 [git-rebase] 12 name-rev 7 [symbolic-ref] 3 [bisect--helper]
+# 64 [tag] 29 [git-bisect] 14 [fast-export] 9 [submodule] 3 [reflog] 1 [git]
+# 64 [grep] 28 [update-index] 13 [diff] 8 [replace] 3 [pack-refs] 1 [diffcore-rename]
+# 56 [sequencer] 28 [blame] 13 [check-ignore] 8 [git-pull] 3 [count-objects] 1 [diffcore-order]
+# 55 [merge-recursive] 27 [ls-files] 12 [pathspec] 8 [fmt-merge-msg] 3 [connected] 1 [attr]
+# 54 [git-submodule] 27 [git-rebase] 12 [name-rev] 7 [symbolic-ref] 3 [bisect--helper]
#
msgid ""
msgstr ""
"Project-Id-Version: git master\n"
"Report-Msgid-Bugs-To: Git Mailing List <git@vger.kernel.org>\n"
-"POT-Creation-Date: 2014-04-19 12:50+0800\n"
-"PO-Revision-Date: 2014-05-11 17:06+0300\n"
+"POT-Creation-Date: 2014-08-04 14:48+0800\n"
+"PO-Revision-Date: 2014-08-03 13:01+0300\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
"Language: bg\n"
@@ -122,59 +144,60 @@ msgstr ""
msgid "hint: %.*s\n"
msgstr "Подсказка: %.*s\n"
-#: advice.c:85
+# TRANSFER
+#: advice.c:88
msgid ""
-"Fix them up in the work tree,\n"
-"and then use 'git add/rm <file>' as\n"
-"appropriate to mark resolution and make a commit,\n"
-"or use 'git commit -a'."
+"Fix them up in the work tree, and then use 'git add/rm <file>'\n"
+"as appropriate to mark resolution and make a commit, or use\n"
+"'git commit -a'."
msgstr ""
-"Редактирайте ги в работното дърво,\n"
-"и тогава ползвайте „git add/rm <file>“,\n"
-"за да отбележите коригирането им и ги\n"
-"подадете или просто ползвайте „git commit -a“."
+"Редактирайте ги в работното дърво, и тогава ползвайте „git add/rm ФАЙЛ“\n"
+"за да отбележите коригирането им и ги подадете или просто ползвайте:\n"
+"„git commit -a“"
#: archive.c:10
msgid "git archive [options] <tree-ish> [<path>...]"
-msgstr ""
+msgstr "git archive [ОПЦИЯ…] УКАЗАТЕЛ_КЪМ_ДЪРВО [ПЪТ…]"
#: archive.c:11
msgid "git archive --list"
-msgstr ""
+msgstr "git archive --list"
#: archive.c:12
msgid ""
"git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"
msgstr ""
+"git archive --remote ХРАНИЛИЩЕ [--exec КОМАНДА] [ОПЦИЯ…] УКАЗАТЕЛ_КЪМ_ДЪРВО "
+"[ПЪТ…]"
#: archive.c:13
msgid "git archive --remote <repo> [--exec <cmd>] --list"
-msgstr ""
+msgstr "git archive --remote ХРАНИЛИЩЕ [--exec КОМАНДА] --list"
-#: archive.c:243 builtin/add.c:136 builtin/add.c:428 builtin/rm.c:328
+#: archive.c:243 builtin/add.c:136 builtin/add.c:427 builtin/rm.c:328
#, c-format
msgid "pathspec '%s' did not match any files"
msgstr "пътят „%s“ не съвпада с никой файл"
#: archive.c:328
msgid "fmt"
-msgstr ""
+msgstr "ФОРМАТ"
#: archive.c:328
msgid "archive format"
-msgstr ""
+msgstr "ФОРМАТ на архива"
-#: archive.c:329 builtin/log.c:1193
+#: archive.c:329 builtin/log.c:1201
msgid "prefix"
msgstr "префикс"
#: archive.c:330
msgid "prepend prefix to each pathname in the archive"
-msgstr ""
+msgstr "добавяне на този префикс към всеки път в архива"
-#: archive.c:331 builtin/archive.c:88 builtin/blame.c:2258
-#: builtin/blame.c:2259 builtin/config.c:57 builtin/fast-export.c:680
-#: builtin/fast-export.c:682 builtin/grep.c:714 builtin/hash-object.c:77
+#: archive.c:331 builtin/archive.c:88 builtin/blame.c:2517
+#: builtin/blame.c:2518 builtin/config.c:57 builtin/fast-export.c:709
+#: builtin/fast-export.c:711 builtin/grep.c:712 builtin/hash-object.c:77
#: builtin/ls-files.c:489 builtin/ls-files.c:492 builtin/notes.c:412
#: builtin/notes.c:569 builtin/read-tree.c:108 parse-options.h:151
msgid "file"
@@ -182,31 +205,31 @@ msgstr "файл"
#: archive.c:332 builtin/archive.c:89
msgid "write the archive to this file"
-msgstr ""
+msgstr "запазване на архива в този файл"
#: archive.c:334
msgid "read .gitattributes in working directory"
-msgstr ""
+msgstr "изчитане на „.gitattributes“ в работната директория"
#: archive.c:335
msgid "report archived files on stderr"
-msgstr ""
+msgstr "извеждане на архивираните файлове на стандартната грешка"
#: archive.c:336
msgid "store only"
-msgstr ""
+msgstr "само съхранение без компресиране"
#: archive.c:337
msgid "compress faster"
-msgstr ""
+msgstr "бързо компресиране"
#: archive.c:345
msgid "compress better"
-msgstr ""
+msgstr "добро компресиране"
#: archive.c:348
msgid "list supported archive formats"
-msgstr ""
+msgstr "извеждане на списъка с поддържаните формати"
#: archive.c:350 builtin/archive.c:90 builtin/clone.c:84
msgid "repo"
@@ -214,15 +237,15 @@ msgstr "хранилище"
#: archive.c:351 builtin/archive.c:91
msgid "retrieve the archive from remote repository <repo>"
-msgstr ""
+msgstr "изтегляне на архива от отдалеченото ХРАНИЛИЩЕ"
#: archive.c:352 builtin/archive.c:92 builtin/notes.c:491
msgid "command"
-msgstr ""
+msgstr "команда"
#: archive.c:353 builtin/archive.c:93
msgid "path to the remote git-upload-archive command"
-msgstr ""
+msgstr "път към отдалечената команда „git-upload-archive“"
#: attr.c:259
msgid ""
@@ -355,24 +378,24 @@ msgstr "Указателят не може да бъде записан"
#: bundle.c:33
#, c-format
msgid "'%s' does not look like a v2 bundle file"
-msgstr "Файлът „%s“ не изглежда да е архив на git версия 2"
+msgstr "Файлът „%s“ не изглежда да е пратка на git версия 2"
#: bundle.c:60
#, c-format
msgid "unrecognized header: %s%s (%d)"
-msgstr ""
+msgstr "непозната заглавна част: %s%s (%d)"
-#: bundle.c:86 builtin/commit.c:706
+#: bundle.c:86 builtin/commit.c:755
#, c-format
msgid "could not open '%s'"
msgstr "„%s“ не може да се отвори"
#: bundle.c:138
msgid "Repository lacks these prerequisite commits:"
-msgstr ""
+msgstr "В хранилището липсват следните необходими подавания:"
-#: bundle.c:162 sequencer.c:669 sequencer.c:1123 builtin/log.c:332
-#: builtin/log.c:821 builtin/log.c:1418 builtin/log.c:1644 builtin/merge.c:357
+#: bundle.c:162 sequencer.c:630 sequencer.c:1085 builtin/log.c:330
+#: builtin/log.c:821 builtin/log.c:1428 builtin/log.c:1665 builtin/merge.c:357
#: builtin/shortlog.c:158
msgid "revision walk setup failed"
msgstr "неуспешно настройване на обхождането на версиите"
@@ -381,61 +404,65 @@ msgstr "неуспешно настройване на обхождането н
#, c-format
msgid "The bundle contains this ref:"
msgid_plural "The bundle contains these %d refs:"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Пратката съдържа следния указател:"
+msgstr[1] "Пратката съдържа следните %d указатели:"
#: bundle.c:191
msgid "The bundle records a complete history."
-msgstr ""
+msgstr "Пратката съдържа пълна история."
#: bundle.c:193
#, c-format
msgid "The bundle requires this ref:"
msgid_plural "The bundle requires these %d refs:"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Пратката изисква следния указател:"
+msgstr[1] "Пратката изисква следните %d указатели:"
-#: bundle.c:293
+# FIXME better message
+#: bundle.c:289
msgid "rev-list died"
-msgstr ""
+msgstr "Командата „git rev-list“ не завърши успешно"
-#: bundle.c:299 builtin/log.c:1329 builtin/shortlog.c:261
+#: bundle.c:295 builtin/log.c:1339 builtin/shortlog.c:261
#, c-format
msgid "unrecognized argument: %s"
msgstr "непознат аргумент: %s"
-#: bundle.c:334
+#: bundle.c:330
#, c-format
msgid "ref '%s' is excluded by the rev-list options"
msgstr ""
+"указателят „%s“ не е бил включен поради опциите зададени на „git rev-list“"
-#: bundle.c:379
+#: bundle.c:375
msgid "Refusing to create empty bundle."
-msgstr ""
+msgstr "Създаването на празна пратка е невъзможно."
-#: bundle.c:395
+#: bundle.c:390
msgid "Could not spawn pack-objects"
-msgstr ""
+msgstr "Командата „git pack-objects“ не може да бъде стартирана"
-#: bundle.c:413
+# FIXME better message
+#: bundle.c:408
msgid "pack-objects died"
-msgstr ""
+msgstr "Командата „git pack-objects“ не завърши успешно"
-#: bundle.c:416
+#: bundle.c:411
#, c-format
msgid "cannot create '%s'"
-msgstr ""
+msgstr "Файлът „%s“ не може да бъде създаден"
-#: bundle.c:438
+# FIXME better message
+#: bundle.c:433
msgid "index-pack died"
-msgstr ""
+msgstr "Командата „git index-pack“ не завърши успешно"
-#: commit.c:54
+#: commit.c:40
#, c-format
msgid "could not parse %s"
msgstr "„%s“ не може да се анализира"
-#: commit.c:56
+#: commit.c:42
#, c-format
msgid "%s %s is not a commit!"
msgstr "%s %s не е подаване!"
@@ -451,7 +478,7 @@ msgstr "Командата „git rev-list“ не може да бъде изп
#: connected.c:90
#, c-format
msgid "failed write to rev-list: %s"
-msgstr "неуспешен запис в списъка с версиите: %s"
+msgstr "неуспешен запис на списъка с версиите: %s"
#: connected.c:98
#, c-format
@@ -460,99 +487,99 @@ msgstr "стандартният вход на списъка с версиит
#: date.c:95
msgid "in the future"
-msgstr ""
+msgstr "в бъдещето"
#: date.c:101
#, c-format
msgid "%lu second ago"
msgid_plural "%lu seconds ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu секунда"
+msgstr[1] "преди %lu секунди"
#: date.c:108
#, c-format
msgid "%lu minute ago"
msgid_plural "%lu minutes ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu минута"
+msgstr[1] "преди %lu минути"
#: date.c:115
#, c-format
msgid "%lu hour ago"
msgid_plural "%lu hours ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu час"
+msgstr[1] "преди %lu часа"
#: date.c:122
#, c-format
msgid "%lu day ago"
msgid_plural "%lu days ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu ден"
+msgstr[1] "преди %lu дена"
#: date.c:128
#, c-format
msgid "%lu week ago"
msgid_plural "%lu weeks ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu седмица"
+msgstr[1] "преди %lu седмици"
#: date.c:135
#, c-format
msgid "%lu month ago"
msgid_plural "%lu months ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu месец"
+msgstr[1] "преди %lu месеца"
#: date.c:146
#, c-format
msgid "%lu year"
msgid_plural "%lu years"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "%lu година"
+msgstr[1] "%lu години"
#. TRANSLATORS: "%s" is "<n> years"
#: date.c:149
#, c-format
msgid "%s, %lu month ago"
msgid_plural "%s, %lu months ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %s и %lu месец"
+msgstr[1] "преди %s и %lu месеца"
#: date.c:154 date.c:159
#, c-format
msgid "%lu year ago"
msgid_plural "%lu years ago"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "преди %lu година"
+msgstr[1] "преди %lu години"
#: diffcore-order.c:24
#, c-format
msgid "failed to read orderfile '%s'"
msgstr "файлът с подредбата на съответствията „%s“ не може да бъде прочетен"
-#: diffcore-rename.c:517
+#: diffcore-rename.c:514
msgid "Performing inexact rename detection"
msgstr "Търсене на преименувания на обекти съчетани с промени"
-#: diff.c:113
+#: diff.c:114
#, c-format
msgid " Failed to parse dirstat cut-off percentage '%s'\n"
msgstr ""
" Неуспешно разпознаване на „%s“ като процент-праг за статистиката по "
"директории\n"
-#: diff.c:118
+#: diff.c:119
#, c-format
msgid " Unknown dirstat parameter '%s'\n"
msgstr " Непознат параметър „%s“ за статистиката по директории'\n"
-#: diff.c:213
+#: diff.c:214
#, c-format
msgid "Unknown value for 'diff.submodule' config variable: '%s'"
msgstr "Непозната стойност „%s“ за настройката „diff.submodule“"
-#: diff.c:263
+#: diff.c:267
#, c-format
msgid ""
"Found errors in 'diff.dirstat' config variable:\n"
@@ -561,7 +588,17 @@ msgstr ""
"Грешки в настройката „diff.dirstat“:\n"
"%s"
-#: diff.c:3495
+#: diff.c:2934
+#, c-format
+msgid "external diff died, stopping at %s"
+msgstr ""
+"външната програма за разлики завърши неуспешно. Спиране на работата при „%s“"
+
+#: diff.c:3329
+msgid "--follow requires exactly one pathspec"
+msgstr "Опцията „--follow“ изисква точно един път"
+
+#: diff.c:3492
#, c-format
msgid ""
"Failed to parse --dirstat/-X option parameter:\n"
@@ -570,58 +607,58 @@ msgstr ""
"Неразпознат параметър към опцията „--dirstat/-X“:\n"
"%s"
-#: diff.c:3509
+#: diff.c:3506
#, c-format
msgid "Failed to parse --submodule option parameter: '%s'"
msgstr "Неразпознат параметър към опцията „--submodule“: „%s“"
-#: gpg-interface.c:59 gpg-interface.c:131
+#: gpg-interface.c:73 gpg-interface.c:145
msgid "could not run gpg."
msgstr "Програмата „gpg“ не може да бъде стартирана."
-#: gpg-interface.c:71
+#: gpg-interface.c:85
msgid "gpg did not accept the data"
msgstr "Програмата „gpg“ не прие подадените данни."
-#: gpg-interface.c:82
+#: gpg-interface.c:96
msgid "gpg failed to sign the data"
msgstr "Програмата „gpg“ не подписа данните."
-#: gpg-interface.c:115
+#: gpg-interface.c:129
#, c-format
msgid "could not create temporary file '%s': %s"
msgstr "Програмата „gpg“ не успя да създаде временния файл „%s“: %s"
-#: gpg-interface.c:118
+#: gpg-interface.c:132
#, c-format
msgid "failed writing detached signature to '%s': %s"
msgstr "Програмата „gpg“ не успя да запише самостоятелния подпис към „%s“: %s"
-#: grep.c:1698
+#: grep.c:1703
#, c-format
msgid "'%s': unable to read %s"
msgstr "„%s“: файлът сочен от „%s“ не може да бъде прочетен"
-#: grep.c:1715
+#: grep.c:1720
#, c-format
msgid "'%s': %s"
msgstr "„%s“: „%s“"
-#: grep.c:1726
+#: grep.c:1731
#, c-format
msgid "'%s': short read %s"
msgstr "„%s“: изчитането на „%s“ върна по-малко байтове от заявените"
-#: help.c:209
+#: help.c:207
#, c-format
msgid "available git commands in '%s'"
msgstr "налични команди на git от „%s“"
-#: help.c:216
+#: help.c:214
msgid "git commands available from elsewhere on your $PATH"
-msgstr "команди на git от други директории от пътя „$PATH“"
+msgstr "команди на git от други директории от „$PATH“"
-#: help.c:232
+#: help.c:230
msgid "The most commonly used git commands are:"
msgstr "Най-често употребяваните команди на git са:"
@@ -660,7 +697,7 @@ msgstr "след %0.1f секунди…"
msgid "git: '%s' is not a git command. See 'git --help'."
msgstr "git: „%s“ не е команда на git. Вижте изхода от „git --help“."
-#: help.c:384 help.c:443
+#: help.c:384 help.c:444
msgid ""
"\n"
"Did you mean this?"
@@ -674,16 +711,16 @@ msgstr[1] ""
"\n"
"Команди с подобно име са:"
-#: help.c:439
+#: help.c:440
#, c-format
msgid "%s: %s - %s"
msgstr "%s: %s — %s"
-#: merge.c:56
+#: merge.c:40
msgid "failed to read the cache"
-msgstr ""
+msgstr "кешът не може да бъде прочетен"
-#: merge.c:110 builtin/checkout.c:357 builtin/checkout.c:558
+#: merge.c:93 builtin/checkout.c:356 builtin/checkout.c:556
#: builtin/clone.c:661
msgid "unable to write new index file"
msgstr "неуспешно записване на новия индекс"
@@ -691,258 +728,274 @@ msgstr "неуспешно записване на новия индекс"
#: merge-recursive.c:190
#, c-format
msgid "(bad commit)\n"
-msgstr ""
+msgstr "(лошо подаване)\n"
-#: merge-recursive.c:208
+#: merge-recursive.c:210
#, c-format
msgid "addinfo_cache failed for path '%s'"
-msgstr ""
+msgstr "неуспешно изпълнение на „addinfo_cache“ за пътя „%s“"
#: merge-recursive.c:271
msgid "error building trees"
-msgstr ""
+msgstr "грешка при изграждане на дърветата"
-#: merge-recursive.c:675
+#: merge-recursive.c:692
#, c-format
msgid "failed to create path '%s'%s"
-msgstr ""
+msgstr "грешка при създаването на пътя „%s“%s"
-#: merge-recursive.c:686
+#: merge-recursive.c:703
#, c-format
msgid "Removing %s to make room for subdirectory\n"
-msgstr ""
+msgstr "Изтриване на „%s“, за да се освободи място за поддиректория\n"
-#: merge-recursive.c:700 merge-recursive.c:721
+# FIXME better message
+#: merge-recursive.c:717 merge-recursive.c:738
msgid ": perhaps a D/F conflict?"
-msgstr ""
+msgstr ": възможно е да има конфликт директория/файл."
-#: merge-recursive.c:711
+#: merge-recursive.c:728
#, c-format
msgid "refusing to lose untracked file at '%s'"
msgstr ""
+"преустановяване на действието, за да не се изтрие неследеният файл „%s“"
-#: merge-recursive.c:751
+#: merge-recursive.c:768
#, c-format
msgid "cannot read object %s '%s'"
-msgstr ""
+msgstr "обектът „%s“ (%s) не може да бъде прочетен"
-#: merge-recursive.c:753
+#: merge-recursive.c:770
#, c-format
msgid "blob expected for %s '%s'"
-msgstr ""
+msgstr "обектът „%s“ (%s) се очакваше да е BLOB, а не е"
-#: merge-recursive.c:776 builtin/clone.c:317
+#: merge-recursive.c:793 builtin/clone.c:317
#, c-format
msgid "failed to open '%s'"
msgstr "директорията „%s“ не може да бъде отворена"
-#: merge-recursive.c:784
+#: merge-recursive.c:801
#, c-format
msgid "failed to symlink '%s'"
-msgstr ""
+msgstr "неуспешно създаване на символната връзка „%s“"
-#: merge-recursive.c:787
+#: merge-recursive.c:804
#, c-format
msgid "do not know what to do with %06o %s '%s'"
msgstr ""
+"не е ясно какво да се прави с обекта „%2$s“ (%3$s) с права за достъп „%1$06o“"
-#: merge-recursive.c:925
+#: merge-recursive.c:942
msgid "Failed to execute internal merge"
-msgstr ""
+msgstr "Неуспешно вътрешно сливане"
-#: merge-recursive.c:929
+#: merge-recursive.c:946
#, c-format
msgid "Unable to add %s to database"
-msgstr ""
+msgstr "„%s“ не може да се добави в базата с данни"
-#: merge-recursive.c:945
+#: merge-recursive.c:962
msgid "unsupported object type in the tree"
-msgstr ""
+msgstr "в дървото има неподдържан вид обект"
-#: merge-recursive.c:1024 merge-recursive.c:1038
+#: merge-recursive.c:1037 merge-recursive.c:1051
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
"in tree."
msgstr ""
+"КОНФЛИКТ (%s/изтриване): „%s“ е изтрит в %s, а „%s“ в %s. Версия %s на „%s“ "
+"е оставена в дървото."
-#: merge-recursive.c:1030 merge-recursive.c:1043
+#: merge-recursive.c:1043 merge-recursive.c:1056
#, c-format
msgid ""
"CONFLICT (%s/delete): %s deleted in %s and %s in %s. Version %s of %s left "
"in tree at %s."
msgstr ""
+"КОНФЛИКТ (%s/изтриване): „%s“ е изтрит в %s, а „%s“ в %s. Версия %s на „%s“ "
+"е оставена в дървото: %s."
-#: merge-recursive.c:1084
+#: merge-recursive.c:1097
msgid "rename"
-msgstr ""
+msgstr "преименуване"
-#: merge-recursive.c:1084
+#: merge-recursive.c:1097
msgid "renamed"
msgstr "преименуван"
-#: merge-recursive.c:1140
+#: merge-recursive.c:1153
#, c-format
msgid "%s is a directory in %s adding as %s instead"
-msgstr ""
+msgstr "„%s“ е директория в „%s“, затова се добавя като „%s“"
-#: merge-recursive.c:1162
+#: merge-recursive.c:1175
#, c-format
msgid ""
"CONFLICT (rename/rename): Rename \"%s\"->\"%s\" in branch \"%s\" rename \"%s"
"\"->\"%s\" in \"%s\"%s"
msgstr ""
+"КОНФЛИКТ (преименуване/преименуване): „%s“ е преименуван на „%s“ в клон "
+"„%s“, а „%s“ е преименуван на „%s“ в „%s“/%s."
-#: merge-recursive.c:1167
+#: merge-recursive.c:1180
msgid " (left unresolved)"
-msgstr ""
+msgstr " (некоригиран конфликт)"
-#: merge-recursive.c:1221
+#: merge-recursive.c:1234
#, c-format
msgid "CONFLICT (rename/rename): Rename %s->%s in %s. Rename %s->%s in %s"
msgstr ""
+"КОНФЛИКТ (преименуване/преименуване): „%s“ е преименуван на „%s“ в клон "
+"„%s“, а „%s“ е преименуван на „%s“ в „%s“"
-#: merge-recursive.c:1251
+#: merge-recursive.c:1264
#, c-format
msgid "Renaming %s to %s and %s to %s instead"
-msgstr ""
+msgstr "Преименуване на „%s“ на „%s“, а „%s“ на „%s“"
-#: merge-recursive.c:1450
+#: merge-recursive.c:1463
#, c-format
msgid "CONFLICT (rename/add): Rename %s->%s in %s. %s added in %s"
msgstr ""
+"КОНФЛИКТ (преименуване/добавяне): „%s“ е преименуван на „%s“ в клон „%s“, а "
+"„%s“ е добавен в „%s“"
-#: merge-recursive.c:1460
+#: merge-recursive.c:1473
#, c-format
msgid "Adding merged %s"
-msgstr ""
+msgstr "Добавяне на слетия „%s“"
-#: merge-recursive.c:1465 merge-recursive.c:1663
+#: merge-recursive.c:1478 merge-recursive.c:1676
#, c-format
msgid "Adding as %s instead"
-msgstr ""
+msgstr "Добавяне като „%s“"
-#: merge-recursive.c:1516
+#: merge-recursive.c:1529
#, c-format
msgid "cannot read object %s"
-msgstr ""
+msgstr "обектът „%s“ не може да се прочете"
-#: merge-recursive.c:1519
+#: merge-recursive.c:1532
#, c-format
msgid "object %s is not a blob"
-msgstr ""
+msgstr "обектът „%s“ не е BLOB"
-#: merge-recursive.c:1567
+#: merge-recursive.c:1580
msgid "modify"
-msgstr ""
+msgstr "промяна"
-#: merge-recursive.c:1567
+#: merge-recursive.c:1580
msgid "modified"
msgstr "променен"
-#: merge-recursive.c:1577
+#: merge-recursive.c:1590
msgid "content"
-msgstr ""
+msgstr "съдържание"
-#: merge-recursive.c:1584
+#: merge-recursive.c:1597
msgid "add/add"
-msgstr ""
+msgstr "добавяне/добавяне"
-#: merge-recursive.c:1618
+#: merge-recursive.c:1631
#, c-format
msgid "Skipped %s (merged same as existing)"
-msgstr ""
+msgstr "Прескачане на „%s“ (слетият резултат е идентичен със сегашния)"
-#: merge-recursive.c:1632
+#: merge-recursive.c:1645
#, c-format
msgid "Auto-merging %s"
-msgstr ""
+msgstr "Автоматично сливане на „%s“"
-#: merge-recursive.c:1636 git-submodule.sh:1149
+#: merge-recursive.c:1649 git-submodule.sh:1150
msgid "submodule"
msgstr "ПОДМОДУЛ"
-#: merge-recursive.c:1637
+#: merge-recursive.c:1650
#, c-format
msgid "CONFLICT (%s): Merge conflict in %s"
-msgstr ""
+msgstr "КОНФЛИКТ (%s): Конфликт при сливане на „%s“"
-#: merge-recursive.c:1727
+#: merge-recursive.c:1740
#, c-format
msgid "Removing %s"
msgstr "Изтриване на „%s“"
-#: merge-recursive.c:1752
+#: merge-recursive.c:1765
msgid "file/directory"
-msgstr ""
+msgstr "файл/директория"
-#: merge-recursive.c:1758
+#: merge-recursive.c:1771
msgid "directory/file"
-msgstr ""
+msgstr "директория/файл"
-#: merge-recursive.c:1763
+#: merge-recursive.c:1776
#, c-format
msgid "CONFLICT (%s): There is a directory with name %s in %s. Adding %s as %s"
msgstr ""
+"КОНФЛИКТ (%s): Съществува директория на име „%s“ в „%s“. Добавяне на „%s“ "
+"като „%s“"
-#: merge-recursive.c:1773
+#: merge-recursive.c:1786
#, c-format
msgid "Adding %s"
-msgstr ""
+msgstr "Добавяне на „%s“"
-#: merge-recursive.c:1790
+#: merge-recursive.c:1803
msgid "Fatal merge failure, shouldn't happen."
-msgstr ""
+msgstr "Фатална грешка при сливане, а такава не трябва да възниква!"
-#: merge-recursive.c:1809
+#: merge-recursive.c:1822
msgid "Already up-to-date!"
-msgstr ""
+msgstr "Вече е обновено!"
-#: merge-recursive.c:1818
+#: merge-recursive.c:1831
#, c-format
msgid "merging of trees %s and %s failed"
-msgstr ""
+msgstr "неуспешно сливане на дърветата „%s“ и „%s“"
-#: merge-recursive.c:1848
+# FIXME message
+#: merge-recursive.c:1861
#, c-format
msgid "Unprocessed path??? %s"
-msgstr ""
+msgstr "Пътят „%s“ не е обработен, това е грешка в Git."
-#: merge-recursive.c:1893
+#: merge-recursive.c:1906
msgid "Merging:"
-msgstr ""
+msgstr "Сливане:"
-#: merge-recursive.c:1906
+#: merge-recursive.c:1919
#, c-format
msgid "found %u common ancestor:"
msgid_plural "found %u common ancestors:"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "открит е %u общ предшественик:"
+msgstr[1] "открити са %u общи предшественици:"
-#: merge-recursive.c:1943
+#: merge-recursive.c:1956
msgid "merge returned no commit"
-msgstr ""
+msgstr "сливането не върна подаване"
-#: merge-recursive.c:2000
+#: merge-recursive.c:2013
#, c-format
msgid "Could not parse object '%s'"
-msgstr ""
+msgstr "Неуспешен анализ на обекта „%s“"
-#: merge-recursive.c:2012 builtin/merge.c:668
+#: merge-recursive.c:2024 builtin/merge.c:666
msgid "Unable to write index."
-msgstr ""
+msgstr "Индексът не може да бъде прочетен"
-#: notes-utils.c:40
+#: notes-utils.c:41
msgid "Cannot commit uninitialized/unreferenced notes tree"
msgstr ""
"Неинициализирано или нереферирано дърво за бележки не може да бъде подадено"
-#: notes-utils.c:81
+#: notes-utils.c:83
#, c-format
msgid "Bad notes.rewriteMode value: '%s'"
-msgstr "Лоша стойност за „notes.rewriteMode“: „%s“"
+msgstr "Неправилна стойност за „notes.rewriteMode“: „%s“"
-#: notes-utils.c:91
+#: notes-utils.c:93
#, c-format
msgid "Refusing to rewrite notes in %s (outside of refs/notes/)"
msgstr ""
@@ -950,106 +1003,110 @@ msgstr ""
#. TRANSLATORS: The first %s is the name of the
#. environment variable, the second %s is its value
-#: notes-utils.c:118
+#: notes-utils.c:120
#, c-format
msgid "Bad %s value: '%s'"
msgstr "Зададена е лоша стойност на променливата „%s“: „%s“"
-#: object.c:229
+#: object.c:234
#, c-format
msgid "unable to parse object: %s"
msgstr "обектът „%s“ не може да бъде анализиран"
-#: parse-options.c:532
+#: parse-options.c:534
msgid "..."
msgstr "…"
-#: parse-options.c:550
+#: parse-options.c:552
#, c-format
msgid "usage: %s"
msgstr "употреба: %s"
#. TRANSLATORS: the colon here should align with the
#. one in "usage: %s" translation
-#: parse-options.c:554
+#: parse-options.c:556
#, c-format
msgid " or: %s"
msgstr " или: %s"
-#: parse-options.c:557
+#: parse-options.c:559
#, c-format
msgid " %s"
msgstr " %s"
-#: parse-options.c:591
+#: parse-options.c:593
msgid "-NUM"
msgstr "-ЧИСЛО"
#: pathspec.c:133
msgid "global 'glob' and 'noglob' pathspec settings are incompatible"
-msgstr ""
+msgstr "глобалните настройки за пътища „glob“ и „noglob“ са несъвместими"
#: pathspec.c:143
msgid ""
"global 'literal' pathspec setting is incompatible with all other global "
"pathspec settings"
msgstr ""
+"глобалната настройка за дословни пътища „literal“ е несъвместима с всички "
+"други глобални настройки за пътища"
#: pathspec.c:177
msgid "invalid parameter for pathspec magic 'prefix'"
-msgstr ""
+msgstr "неправилен параметър за опцията за магически пътища „prefix“"
#: pathspec.c:183
#, c-format
msgid "Invalid pathspec magic '%.*s' in '%s'"
-msgstr ""
+msgstr "Неправилна стойност за опцията за магически пътища „%.*s“ в „%s“"
#: pathspec.c:187
#, c-format
msgid "Missing ')' at the end of pathspec magic in '%s'"
-msgstr ""
+msgstr "Знакът „)“ липсва в опцията за магически пътища в „%s“"
#: pathspec.c:205
#, c-format
msgid "Unimplemented pathspec magic '%c' in '%s'"
-msgstr ""
+msgstr "Магическите пътища „%c“ са без реализация за „%s“"
#: pathspec.c:230
#, c-format
msgid "%s: 'literal' and 'glob' are incompatible"
-msgstr ""
+msgstr "%s: опциите „literal“ и „glob“ са несъвместими"
#: pathspec.c:241
#, c-format
msgid "%s: '%s' is outside repository"
-msgstr ""
+msgstr "%s: „%s“ е извън хранилището"
#: pathspec.c:291
#, c-format
msgid "Pathspec '%s' is in submodule '%.*s'"
-msgstr ""
+msgstr "Пътят „%s“ е в подмодула „%.*s“"
#: pathspec.c:353
#, c-format
msgid "%s: pathspec magic not supported by this command: %s"
-msgstr ""
+msgstr "%s: магическите пътища не се поддържат от командата „%s“"
-#: pathspec.c:433
+#: pathspec.c:432
#, c-format
msgid "pathspec '%s' is beyond a symbolic link"
-msgstr ""
+msgstr "пътят „%s“ е след символна връзка"
-#: pathspec.c:442
+#: pathspec.c:441
msgid ""
"There is nothing to exclude from by :(exclude) patterns.\n"
"Perhaps you forgot to add either ':/' or '.' ?"
msgstr ""
+"Нищо не се изключва от шаблоните за изключване.\n"
+"Това често се случва, ако сте забравили да добавите „:/“ или „.“."
-#: progress.c:224
+#: progress.c:225
msgid "done"
msgstr "действието завърши"
-#: read-cache.c:1238
+#: read-cache.c:1260
#, c-format
msgid ""
"index.version set, but the value is invalid.\n"
@@ -1058,7 +1115,7 @@ msgstr ""
"Зададена е неправилна стойност на настройката „index.version“.\n"
"Ще се ползва версия %i"
-#: read-cache.c:1248
+#: read-cache.c:1270
#, c-format
msgid ""
"GIT_INDEX_VERSION set, but the value is invalid.\n"
@@ -1068,51 +1125,51 @@ msgstr ""
"„GIT_INDEX_VERSION“.\n"
"Ще се ползва версия %i"
-#: remote.c:758
+#: remote.c:753
#, c-format
msgid "Cannot fetch both %s and %s to %s"
msgstr "Невъзможно е да се доставят едновременно и „%s“, и „%s“ към „%s“"
-#: remote.c:762
+#: remote.c:757
#, c-format
msgid "%s usually tracks %s, not %s"
msgstr "„%s“ обикновено следи „%s“, а не „%s“"
-#: remote.c:766
+#: remote.c:761
#, c-format
msgid "%s tracks both %s and %s"
msgstr "„%s“ следи както „%s“, така и „%s“"
-#: remote.c:774
+#: remote.c:769
msgid "Internal error"
msgstr "Вътрешна грешка"
-#: remote.c:1948
+#: remote.c:1943
#, c-format
msgid "Your branch is based on '%s', but the upstream is gone.\n"
msgstr "Този клон следи „%s“, но следеният клон е изтрит.\n"
-#: remote.c:1952
+#: remote.c:1947
msgid " (use \"git branch --unset-upstream\" to fixup)\n"
msgstr " (за да коригирате това, използвайте „git branch --unset-upstream“)\n"
-#: remote.c:1955
+#: remote.c:1950
#, c-format
msgid "Your branch is up-to-date with '%s'.\n"
-msgstr "Клонът е актуализиран както „%s“.\n"
+msgstr "Клонът е актуализиран към „%s“.\n"
-#: remote.c:1959
+#: remote.c:1954
#, c-format
msgid "Your branch is ahead of '%s' by %d commit.\n"
msgid_plural "Your branch is ahead of '%s' by %d commits.\n"
msgstr[0] "Клонът ви е с %2$d подаване пред „%1$s“.\n"
msgstr[1] "Клонът ви е с %2$d подавания пред „%1$s“.\n"
-#: remote.c:1965
+#: remote.c:1960
msgid " (use \"git push\" to publish your local commits)\n"
msgstr " (публикувайте локалните си промени чрез „git push“)\n"
-#: remote.c:1968
+#: remote.c:1963
#, c-format
msgid "Your branch is behind '%s' by %d commit, and can be fast-forwarded.\n"
msgid_plural ""
@@ -1122,11 +1179,11 @@ msgstr[0] ""
msgstr[1] ""
"Клонът ви е с %2$d подавания след „%1$s“ и може да бъде тривиално слят.\n"
-#: remote.c:1976
+#: remote.c:1971
msgid " (use \"git pull\" to update your local branch)\n"
msgstr " (обновете локалния си клон чрез „git pull“)\n"
-#: remote.c:1979
+#: remote.c:1974
#, c-format
msgid ""
"Your branch and '%s' have diverged,\n"
@@ -1141,7 +1198,7 @@ msgstr[1] ""
"Текущият клон се е отделил от „%s“,\n"
"двата имат съответно по %d и %d несъвпадащи подавания.\n"
-#: remote.c:1989
+#: remote.c:1984
msgid " (use \"git pull\" to merge the remote branch into yours)\n"
msgstr " (слейте отдалечения клон в локалния чрез „git pull“)\n"
@@ -1154,247 +1211,266 @@ msgstr "неуспешно отваряне на „/dev/null“"
msgid "dup2(%d,%d) failed"
msgstr "неуспешно изпълнение на dup2(%d,%d)"
-#: sequencer.c:206 builtin/merge.c:786 builtin/merge.c:899
-#: builtin/merge.c:1009 builtin/merge.c:1019
+#: sequencer.c:171 builtin/merge.c:782 builtin/merge.c:893
+#: builtin/merge.c:1003 builtin/merge.c:1013
#, c-format
msgid "Could not open '%s' for writing"
-msgstr ""
+msgstr "„%s“ не може да бъде отворен за запис"
-#: sequencer.c:208 builtin/merge.c:343 builtin/merge.c:789
-#: builtin/merge.c:1011 builtin/merge.c:1024
+#: sequencer.c:173 builtin/merge.c:343 builtin/merge.c:785
+#: builtin/merge.c:1005 builtin/merge.c:1018
#, c-format
msgid "Could not write to '%s'"
-msgstr ""
+msgstr "„%s“ не може да бъде записан"
-#: sequencer.c:229
+# FIXME git add <path…> for consistence
+#: sequencer.c:194
msgid ""
"after resolving the conflicts, mark the corrected paths\n"
"with 'git add <paths>' or 'git rm <paths>'"
msgstr ""
+"след коригирането на конфликтите, отбележете съответните\n"
+"пътища с „git add ПЪТ…“ или „git rm ПЪТ…“."
-#: sequencer.c:232
+#: sequencer.c:197
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 ""
+"след коригирането на конфликтите, отбележете съответните\n"
+"пътища с „git add ПЪТ…“ или „git rm ПЪТ…“, след което\n"
+"подайте резултата с командата „git commit'“."
-#: sequencer.c:245 sequencer.c:879 sequencer.c:962
+# FIXME - must be the same as Could not write to '%s' above
+#: sequencer.c:210 sequencer.c:841 sequencer.c:924
#, c-format
msgid "Could not write to %s"
-msgstr ""
+msgstr "„%s“ не може да бъде записан"
-#: sequencer.c:248
+# FIXME wrap up as ffinishing the work on, in fact, full stop at end for consistency with below
+#: sequencer.c:213
#, c-format
msgid "Error wrapping up %s"
-msgstr ""
+msgstr "Обработката на „%s“ не завърши успешно."
-#: sequencer.c:263
+#: sequencer.c:228
msgid "Your local changes would be overwritten by cherry-pick."
-msgstr ""
+msgstr "Локалните ви промени ще бъдат презаписани при отбирането на подавания."
-#: sequencer.c:265
+#: sequencer.c:230
msgid "Your local changes would be overwritten by revert."
-msgstr ""
+msgstr "Локалните ви промени ще бъдат презаписани при отмяната на подавания."
-#: sequencer.c:268
+#: sequencer.c:233
msgid "Commit your changes or stash them to proceed."
-msgstr ""
+msgstr "Подайте или скатайте промените, за да продължите"
+
+#: sequencer.c:250
+msgid "Failed to lock HEAD during fast_forward_to"
+msgstr "Указателят „HEAD“ не може да бъде заключен при тривиално сливане"
#. TRANSLATORS: %s will be "revert" or "cherry-pick"
-#: sequencer.c:325
+#: sequencer.c:293
#, c-format
msgid "%s: Unable to write new index file"
msgstr "%s: новият индекс не може да бъде запазен"
-#: sequencer.c:356
+#: sequencer.c:324
msgid "Could not resolve HEAD commit\n"
-msgstr ""
+msgstr "Подаването сочено от указателя „HEAD“ не може да бъде открито\n"
-#: sequencer.c:378
+#: sequencer.c:344
msgid "Unable to update cache tree\n"
-msgstr ""
+msgstr "Дървото на кеша не може да бъде обновено\n"
-#: sequencer.c:430
+#: sequencer.c:391
#, c-format
msgid "Could not parse commit %s\n"
-msgstr ""
+msgstr "Подаването „%s“ не може да бъде анализирано\n"
-#: sequencer.c:435
+#: sequencer.c:396
#, c-format
msgid "Could not parse parent commit %s\n"
-msgstr ""
+msgstr "Родителското подаване „%s“ не може да бъде анализирано\n"
-#: sequencer.c:501
+#: sequencer.c:462
msgid "Your index file is unmerged."
msgstr "Индексът не е слят."
-#: sequencer.c:520
+#: sequencer.c:481
#, c-format
msgid "Commit %s is a merge but no -m option was given."
-msgstr ""
+msgstr "Подаването „%s“ е сливане, но не е дадена опцията „-m“"
-#: sequencer.c:528
+#: sequencer.c:489
#, c-format
msgid "Commit %s does not have parent %d"
-msgstr ""
+msgstr "Подаването „%s“ няма родител %d"
-#: sequencer.c:532
+#: sequencer.c:493
#, c-format
msgid "Mainline was specified but commit %s is not a merge."
-msgstr ""
+msgstr "Указано е базово подаване, но подаването „%s“ не е сливане."
#. TRANSLATORS: The first %s will be "revert" or
#. "cherry-pick", the second %s a SHA1
-#: sequencer.c:545
+#: sequencer.c:506
#, c-format
msgid "%s: cannot parse parent commit %s"
-msgstr ""
+msgstr "%s: неразпозната стойност за родителското подаване „%s“"
-#: sequencer.c:549
+#: sequencer.c:510
#, c-format
msgid "Cannot get commit message for %s"
-msgstr ""
+msgstr "Неуспешно извличане на съобщението за подаване на „%s“"
-#: sequencer.c:635
+#: sequencer.c:596
#, c-format
msgid "could not revert %s... %s"
-msgstr ""
+msgstr "подаването „%s“… не може да бъде отменено: „%s“"
-#: sequencer.c:636
+#: sequencer.c:597
#, c-format
msgid "could not apply %s... %s"
-msgstr ""
+msgstr "подаването „%s“… не може да бъде приложено: „%s“"
-#: sequencer.c:672
+#: sequencer.c:633
msgid "empty commit set passed"
-msgstr ""
+msgstr "зададено е празно множество от подавания"
-#: sequencer.c:680
+#: sequencer.c:641
#, c-format
msgid "git %s: failed to read the index"
-msgstr ""
+msgstr "git %s: неуспешно изчитане на индекса"
-#: sequencer.c:685
+#: sequencer.c:645
#, c-format
msgid "git %s: failed to refresh the index"
-msgstr ""
+msgstr "git %s: неуспешно обновяване на индекса"
-#: sequencer.c:743
+#: sequencer.c:705
#, c-format
msgid "Cannot %s during a %s"
-msgstr ""
+msgstr "По време на „%1$s“ не може да се извърши „%2$s“"
-#: sequencer.c:765
+#: sequencer.c:727
#, c-format
msgid "Could not parse line %d."
-msgstr ""
+msgstr "%d-ят ред не може да се анализира."
-#: sequencer.c:770
+#: sequencer.c:732
msgid "No commits parsed."
-msgstr ""
+msgstr "Никое от подаванията не може да се разпознае."
-#: sequencer.c:783
+# FIXME Could not open %s. - full stop for consistence with next message
+#: sequencer.c:745
#, c-format
msgid "Could not open %s"
-msgstr ""
+msgstr "„%s“ не може да се прочете."
-#: sequencer.c:787
+#: sequencer.c:749
#, c-format
msgid "Could not read %s."
-msgstr ""
+msgstr "„%s“ не може да се отвори."
-#: sequencer.c:794
+#: sequencer.c:756
#, c-format
msgid "Unusable instruction sheet: %s"
-msgstr ""
+msgstr "Файлът с описание на предстоящите действия — „%s“ не може да се ползва"
-#: sequencer.c:824
+#: sequencer.c:786
#, c-format
msgid "Invalid key: %s"
-msgstr ""
+msgstr "Неправилен ключ: „%s“"
-#: sequencer.c:827
+#: sequencer.c:789
#, c-format
msgid "Invalid value for %s: %s"
-msgstr ""
+msgstr "Неправилна стойност за „%s“: „%s“"
-#: sequencer.c:839
+#: sequencer.c:801
#, c-format
msgid "Malformed options sheet: %s"
-msgstr ""
+msgstr "Неправилно съдържание на файла с опции: „%s“"
-#: sequencer.c:860
+#: sequencer.c:822
msgid "a cherry-pick or revert is already in progress"
msgstr ""
+"в момента вече се извършва отбиране на подавания или пребазиране на клона"
-#: sequencer.c:861
+#: sequencer.c:823
msgid "try \"git cherry-pick (--continue | --quit | --abort)\""
-msgstr ""
+msgstr "използвайте „git cherry-pick (--continue | --quit | --abort)“"
-#: sequencer.c:865
+#: sequencer.c:827
#, c-format
msgid "Could not create sequencer directory %s"
-msgstr ""
+msgstr "Директорията за секвенсора „%s“ не може да бъде създадена"
-#: sequencer.c:881 sequencer.c:966
+#: sequencer.c:843 sequencer.c:928
#, c-format
msgid "Error wrapping up %s."
-msgstr ""
+msgstr "Обработката на „%s“ не завърши успешно."
-#: sequencer.c:900 sequencer.c:1036
+#: sequencer.c:862 sequencer.c:998
msgid "no cherry-pick or revert in progress"
msgstr ""
+"в момента не се извършва отбиране на подавания или пребазиране на клона"
-#: sequencer.c:902
+#: sequencer.c:864
msgid "cannot resolve HEAD"
-msgstr ""
+msgstr "Подаването сочено от указателя „HEAD“ не може да бъде открито"
-#: sequencer.c:904
+#: sequencer.c:866
msgid "cannot abort from a branch yet to be born"
msgstr ""
+"действието не може да бъде преустановено, когато сте на клон, който тепърва "
+"предстои да бъде създаден"
-#: sequencer.c:926 builtin/apply.c:4061
+#: sequencer.c:888 builtin/apply.c:4062
#, c-format
msgid "cannot open %s: %s"
-msgstr ""
+msgstr "файлът „%s“ не може да бъде отворен: %s"
-#: sequencer.c:929
+#: sequencer.c:891
#, c-format
msgid "cannot read %s: %s"
-msgstr ""
+msgstr "файлът „%s“ не може да бъде прочетен: %s"
-#: sequencer.c:930
+#: sequencer.c:892
msgid "unexpected end of file"
-msgstr ""
+msgstr "неочакван край на файл"
-#: sequencer.c:936
+#: sequencer.c:898
#, c-format
msgid "stored pre-cherry-pick HEAD file '%s' is corrupt"
msgstr ""
+"запазеният преди започването на отбирането файл за указателя „HEAD“ — „%s“ е "
+"повреден"
-#: sequencer.c:959
+#: sequencer.c:921
#, c-format
msgid "Could not format %s."
-msgstr ""
+msgstr "Файлът „%s“ не може да се форматира по подходящия начин."
-#: sequencer.c:1104
+#: sequencer.c:1066
#, c-format
msgid "%s: can't cherry-pick a %s"
-msgstr ""
+msgstr "%s: не може да се отбере „%s“"
-#: sequencer.c:1107
+#: sequencer.c:1069
#, c-format
msgid "%s: bad revision"
-msgstr ""
+msgstr "%s: неправилна версия"
-#: sequencer.c:1141
+#: sequencer.c:1103
msgid "Can't revert as initial commit"
-msgstr ""
+msgstr "Първоначалното подаване не може да бъде отменено"
-#: sequencer.c:1142
+#: sequencer.c:1104
msgid "Can't cherry-pick into empty head"
-msgstr ""
+msgstr "При празен връх не могат да се отбират подавания"
#: sha1_name.c:439
msgid ""
@@ -1408,34 +1484,33 @@ msgid ""
"examine these refs and maybe delete them. Turn this message off by\n"
"running \"git config advice.objectNameWarning false\""
msgstr ""
-"При нормална работа git никога не създава указатели, които завършват с 40\n"
-"шестнасетични знаци, защото те ще бъдат прескачани, когато указвате \n"
-"шестнайсетични знаци. Една възможност е такива указатели да са създадени\n"
-"по погрешка. Например:\n"
+"При нормална работа Git никога не създава указатели, които завършват с 40\n"
+"шестнадесетични знака, защото стандартно те ще бъдат прескачани.\n"
+"Възможно е такива указатели да са създадени случайно. Например:\n"
"\n"
" git checkout -b $BRANCH $(git rev-parse…)\n"
"\n"
"където стойността на променливата на средата BRANCH е празна, при което се\n"
"създава подобен указател. Прегледайте тези указатели и ги изтрийте. Можете "
"да\n"
-"спрете това съобщение като изпълнете „git config advice.objectNameWarning "
-"false“"
+"спрете това съобщение като изпълните командата:\n"
+"„git config advice.objectNameWarning false“"
-#: sha1_name.c:1072
+#: sha1_name.c:1060
msgid "HEAD does not point to a branch"
msgstr "Указателят „HEAD“ не сочи към клон"
-#: sha1_name.c:1075
+#: sha1_name.c:1063
#, c-format
msgid "No such branch: '%s'"
msgstr "Не съществува клон на име „%s“"
-#: sha1_name.c:1077
+#: sha1_name.c:1065
#, c-format
msgid "No upstream configured for branch '%s'"
msgstr "Не е зададен клон-източник за клона „%s“"
-#: sha1_name.c:1081
+#: sha1_name.c:1069
#, c-format
msgid "Upstream branch '%s' not stored as a remote-tracking branch"
msgstr "Клонът-източник „%s“ не е съхранен като следящ клон"
@@ -1463,67 +1538,67 @@ msgstr "Записът „%s“ във файла „.gitmodules“ не мож
#: submodule.c:120
msgid "staging updated .gitmodules failed"
-msgstr "неуспешно добавяне в индекса на променения файл „.gitmodules“"
+msgstr "неуспешно добавяне на променения файл „.gitmodules“ в индекса"
-#: submodule.c:1121 builtin/init-db.c:363
+#: submodule.c:1118 builtin/init-db.c:363
#, c-format
msgid "Could not create git link %s"
msgstr "Връзката в Git „%s“ не може да бъде създадена"
-#: submodule.c:1132
+#: submodule.c:1129
#, c-format
msgid "Could not set core.worktree in %s"
-msgstr "В „%s“ не може да се зададе настройката „core.worktree“"
+msgstr "Настройката „core.worktree“ не може да се зададе в „%s“"
-#: unpack-trees.c:206
+#: unpack-trees.c:202
msgid "Checking out files"
msgstr "Изтегляне на файлове"
#: urlmatch.c:120
msgid "invalid URL scheme name or missing '://' suffix"
-msgstr ""
+msgstr "неправилна схема за адрес или суфиксът „://“ липсва"
#: urlmatch.c:144 urlmatch.c:297 urlmatch.c:356
#, c-format
msgid "invalid %XX escape sequence"
-msgstr ""
+msgstr "неправилна екранираща последователност „%XX“"
#: urlmatch.c:172
msgid "missing host and scheme is not 'file:'"
-msgstr ""
+msgstr "не е указана машина, а схемата не е „file:“"
#: urlmatch.c:189
msgid "a 'file:' URL may not have a port number"
-msgstr ""
+msgstr "при схема „file:“ не можете да указвате номер на порт"
#: urlmatch.c:199
msgid "invalid characters in host name"
-msgstr ""
+msgstr "неправилни знаци в името на машина"
#: urlmatch.c:244 urlmatch.c:255
msgid "invalid port number"
-msgstr ""
+msgstr "неправилен номер на порт"
#: urlmatch.c:322
msgid "invalid '..' path segment"
-msgstr ""
+msgstr "неправилна част от пътя „..“"
-#: wrapper.c:422
+#: wrapper.c:460
#, c-format
msgid "unable to access '%s': %s"
msgstr "няма достъп до „%s“: %s"
-#: wrapper.c:443
+#: wrapper.c:481
#, c-format
msgid "unable to access '%s'"
msgstr "няма достъп до „%s“"
-#: wrapper.c:454
+#: wrapper.c:492
#, c-format
msgid "unable to look up current user in the passwd file: %s"
msgstr "текущият потребител не може да бъде открит във файла „/etc/passwd“: %s"
-#: wrapper.c:455
+#: wrapper.c:493
msgid "no such user"
msgstr "такъв потребител не съществува"
@@ -1612,7 +1687,7 @@ msgstr "добавени от тях:"
#: wt-status.c:260
msgid "deleted by us:"
-msgstr "изтрити от нас:"
+msgstr "изтрити от вас:"
#: wt-status.c:262
msgid "both added:"
@@ -1676,15 +1751,15 @@ msgstr "неследено съдържание, "
msgid "bug: unhandled diff status %c"
msgstr "грешка: състоянието на промяната „%c“ не може да бъде обработено"
-#: wt-status.c:765
+#: wt-status.c:764
msgid "Submodules changed but not updated:"
msgstr "Подмодулите са променени, но не са обновени:"
-#: wt-status.c:767
+#: wt-status.c:766
msgid "Submodule changes to be committed:"
msgstr "Промени в подмодулите за подаване:"
-#: wt-status.c:846
+#: wt-status.c:845
msgid ""
"Do not touch the line above.\n"
"Everything below will be removed."
@@ -1692,193 +1767,193 @@ msgstr ""
"Не променяйте горния ред.\n"
"Всичко отдолу ще бъде изтрито."
-#: wt-status.c:937
+#: wt-status.c:936
msgid "You have unmerged paths."
msgstr "Някои пътища не са слети."
-#: wt-status.c:940
+#: wt-status.c:939
msgid " (fix conflicts and run \"git commit\")"
msgstr " (коригирайте конфликтите и изпълнете „git commit“)"
-#: wt-status.c:943
+#: wt-status.c:942
msgid "All conflicts fixed but you are still merging."
msgstr "Всички конфликти са решени, но продължавате сливането."
-#: wt-status.c:946
+#: wt-status.c:945
msgid " (use \"git commit\" to conclude merge)"
msgstr " (използвайте „git commit“, за да завършите сливането)"
-#: wt-status.c:956
+#: wt-status.c:955
msgid "You are in the middle of an am session."
msgstr "В момента прилагате поредица от кръпки чрез „git am“."
-#: wt-status.c:959
+#: wt-status.c:958
msgid "The current patch is empty."
msgstr "Текущата кръпка е празна."
-#: wt-status.c:963
+#: wt-status.c:962
msgid " (fix conflicts and then run \"git am --continue\")"
msgstr " (коригирайте конфликтите и изпълнете „git am --continue“)"
-#: wt-status.c:965
+#: wt-status.c:964
msgid " (use \"git am --skip\" to skip this patch)"
msgstr " (използвайте „git am --skip“, за да пропуснете тази кръпка)"
-#: wt-status.c:967
+#: wt-status.c:966
msgid " (use \"git am --abort\" to restore the original branch)"
msgstr ""
" (използвайте „git am --abort“, за да възстановите първоначалния клон)"
-#: wt-status.c:1027 wt-status.c:1044
+#: wt-status.c:1026 wt-status.c:1043
#, c-format
msgid "You are currently rebasing branch '%s' on '%s'."
msgstr "В момента пребазирате клона „%s“ върху „%s“."
-#: wt-status.c:1032 wt-status.c:1049
+#: wt-status.c:1031 wt-status.c:1048
msgid "You are currently rebasing."
msgstr "В момента пребазирате."
-#: wt-status.c:1035
+#: wt-status.c:1034
msgid " (fix conflicts and then run \"git rebase --continue\")"
msgstr " (коригирайте конфликтите и използвайте „git rebase --continue“)"
-#: wt-status.c:1037
+#: wt-status.c:1036
msgid " (use \"git rebase --skip\" to skip this patch)"
msgstr " (използвайте „git rebase --skip“, за да пропуснете тази кръпка)"
-#: wt-status.c:1039
+#: wt-status.c:1038
msgid " (use \"git rebase --abort\" to check out the original branch)"
msgstr ""
" (използвайте „git rebase --abort“, за да възстановите първоначалния клон)"
-#: wt-status.c:1052
+#: wt-status.c:1051
msgid " (all conflicts fixed: run \"git rebase --continue\")"
msgstr " (всички конфликти са коригирани: изпълнете „git rebase --continue“)"
-#: wt-status.c:1056
+#: wt-status.c:1055
#, c-format
msgid ""
"You are currently splitting a commit while rebasing branch '%s' on '%s'."
msgstr "В момента разделяте подаване докато пребазирате клона „%s“ върху „%s“."
-#: wt-status.c:1061
+#: wt-status.c:1060
msgid "You are currently splitting a commit during a rebase."
msgstr "В момента разделяте подаване докато пребазирате."
-#: wt-status.c:1064
+#: wt-status.c:1063
msgid " (Once your working directory is clean, run \"git rebase --continue\")"
msgstr ""
" (След като работното ви дърво стане чисто, използвайте „git rebase --"
"continue“)"
-#: wt-status.c:1068
+#: wt-status.c:1067
#, c-format
msgid "You are currently editing a commit while rebasing branch '%s' on '%s'."
msgstr ""
"В момента редактирате подаване докато пребазирате клона „%s“ върху „%s“."
-#: wt-status.c:1073
+#: wt-status.c:1072
msgid "You are currently editing a commit during a rebase."
msgstr "В момента редактирате подаване докато пребазирате."
-#: wt-status.c:1076
+#: wt-status.c:1075
msgid " (use \"git commit --amend\" to amend the current commit)"
msgstr ""
" (използвайте „git commit --amend“, за да редактирате текущото подаване)"
-#: wt-status.c:1078
+#: wt-status.c:1077
msgid ""
" (use \"git rebase --continue\" once you are satisfied with your changes)"
msgstr ""
" (използвайте „git rebase --continue“, след като завършите промените си)"
-#: wt-status.c:1088
+#: wt-status.c:1087
#, c-format
msgid "You are currently cherry-picking commit %s."
msgstr "В момента отбирате подаването „%s“."
-#: wt-status.c:1093
+#: wt-status.c:1092
msgid " (fix conflicts and run \"git cherry-pick --continue\")"
msgstr " (коригирайте конфликтите и изпълнете „git cherry-pick --continue“)"
-#: wt-status.c:1096
+#: wt-status.c:1095
msgid " (all conflicts fixed: run \"git cherry-pick --continue\")"
msgstr ""
" (всички конфликти са коригирани, изпълнете „git cherry-pick --continue“)"
-#: wt-status.c:1098
+#: wt-status.c:1097
msgid " (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"
msgstr ""
" (използвайте „git cherry-pick --abort“, за да отмените всички действия с "
"отбиране)"
-#: wt-status.c:1107
+#: wt-status.c:1106
#, c-format
msgid "You are currently reverting commit %s."
msgstr "В момента отменяте подаване „%s“."
-#: wt-status.c:1112
+#: wt-status.c:1111
msgid " (fix conflicts and run \"git revert --continue\")"
msgstr " (коригирайте конфликтите и изпълнете „git revert --continue“)"
-#: wt-status.c:1115
+#: wt-status.c:1114
msgid " (all conflicts fixed: run \"git revert --continue\")"
msgstr " (всички конфликти са коригирани, изпълнете „git revert --continue“)"
-#: wt-status.c:1117
+#: wt-status.c:1116
msgid " (use \"git revert --abort\" to cancel the revert operation)"
msgstr ""
" (използвайте „git revert --abort“, за да преустановите отмяната на "
"подаване)"
-#: wt-status.c:1128
+#: wt-status.c:1127
#, c-format
msgid "You are currently bisecting, started from branch '%s'."
msgstr "В момента търсите двоично, като сте стартирали от клон „%s“."
-#: wt-status.c:1132
+#: wt-status.c:1131
msgid "You are currently bisecting."
msgstr "В момента търсите двоично."
-#: wt-status.c:1135
+#: wt-status.c:1134
msgid " (use \"git bisect reset\" to get back to the original branch)"
msgstr ""
" (използвайте „git bisect reset“, за да се върнете към първоначалното "
"състояние и клон)"
-#: wt-status.c:1310
+#: wt-status.c:1309
msgid "On branch "
msgstr "На клон "
-#: wt-status.c:1317
+#: wt-status.c:1316
msgid "rebase in progress; onto "
msgstr "извършвате пребазиране върху "
-#: wt-status.c:1324
+#: wt-status.c:1323
msgid "HEAD detached at "
-msgstr "Указателят „HEAD“ не е свързан и е на подаване "
+msgstr "Указателят „HEAD“ не е свързан и е при подаване "
-#: wt-status.c:1326
+#: wt-status.c:1325
msgid "HEAD detached from "
msgstr "Указателят „HEAD“ не е свързан и е отделѐн от "
-#: wt-status.c:1329
+#: wt-status.c:1328
msgid "Not currently on any branch."
-msgstr "Извън всички клони"
+msgstr "Извън всички клони."
-#: wt-status.c:1346
+#: wt-status.c:1345
msgid "Initial commit"
msgstr "Първоначално подаване"
-#: wt-status.c:1360
+#: wt-status.c:1359
msgid "Untracked files"
msgstr "Неследени файлове"
-#: wt-status.c:1362
+#: wt-status.c:1361
msgid "Ignored files"
msgstr "Игнорирани файлове"
-#: wt-status.c:1366
+#: wt-status.c:1365
#, c-format
msgid ""
"It took %.2f seconds to enumerate untracked files. 'status -uno'\n"
@@ -1887,35 +1962,35 @@ msgid ""
msgstr ""
"Бяха необходими %.2f секунди за изброяването на неследените файлове.\n"
"Добавянето на опцията „-uno“ към командата „git status“, ще ускори\n"
-"нещата, но не трябва да забравяте ръчно да добавяте новите файлове.\n"
+"изпълнението, но не трябва да забравяте ръчно да добавяте новите файлове.\n"
"За повече подробности погледнете „git status help“."
-#: wt-status.c:1372
+#: wt-status.c:1371
#, c-format
msgid "Untracked files not listed%s"
msgstr "Неследените файлове не са изведени%s"
-#: wt-status.c:1374
+#: wt-status.c:1373
msgid " (use -u option to show untracked files)"
msgstr " (използвайте опцията „-u“, за да изведете неследените файлове)"
-#: wt-status.c:1380
+#: wt-status.c:1379
msgid "No changes"
msgstr "Няма промени"
-#: wt-status.c:1385
+#: wt-status.c:1384
#, c-format
msgid "no changes added to commit (use \"git add\" and/or \"git commit -a\")\n"
msgstr ""
"към индекса за подаване не са добавени промени (използвайте „git add“ и/или "
"„git commit -a“)\n"
-#: wt-status.c:1388
+#: wt-status.c:1387
#, c-format
msgid "no changes added to commit\n"
msgstr "към индекса за подаване не са добавени промени\n"
-#: wt-status.c:1391
+#: wt-status.c:1390
#, c-format
msgid ""
"nothing added to commit but untracked files present (use \"git add\" to "
@@ -1924,48 +1999,48 @@ msgstr ""
"към индекса за подаване не са добавени промени, но има нови файлове "
"(използвайте „git add“, за да започне тяхното следене)\n"
-#: wt-status.c:1394
+#: wt-status.c:1393
#, c-format
msgid "nothing added to commit but untracked files present\n"
msgstr "към индекса за подаване не са добавени промени, но има нови файлове\n"
-#: wt-status.c:1397
+#: wt-status.c:1396
#, c-format
msgid "nothing to commit (create/copy files and use \"git add\" to track)\n"
msgstr ""
"липсват каквито и да е промени (създайте или копирайте файлове и използвайте "
"„git add“, за да започне тяхното следене)\n"
-#: wt-status.c:1400 wt-status.c:1405
+#: wt-status.c:1399 wt-status.c:1404
#, c-format
msgid "nothing to commit\n"
msgstr "липсват каквито и да е промени\n"
-#: wt-status.c:1403
+#: wt-status.c:1402
#, c-format
msgid "nothing to commit (use -u to show untracked files)\n"
msgstr ""
"липсват каквито и да е промени (използвайте опцията „-u“, за да се изведат и "
"неследените файлове)\n"
-#: wt-status.c:1407
+#: wt-status.c:1406
#, c-format
msgid "nothing to commit, working directory clean\n"
msgstr "липсват каквито и да е промени, работното дърво е чисто\n"
-#: wt-status.c:1516
+#: wt-status.c:1515
msgid "HEAD (no branch)"
msgstr "HEAD (извън клон)"
-#: wt-status.c:1522
+#: wt-status.c:1521
msgid "Initial commit on "
-msgstr "Първоначално подаване на "
+msgstr "Първоначално подаване на клон"
-#: wt-status.c:1554
+#: wt-status.c:1553
msgid "gone"
msgstr "изтрит"
-#: wt-status.c:1556 wt-status.c:1564
+#: wt-status.c:1555 wt-status.c:1563
msgid "behind "
msgstr "назад с "
@@ -1976,7 +2051,7 @@ msgstr "неуспешно изтриване на „%s“"
#: builtin/add.c:21
msgid "git add [options] [--] <pathspec>..."
-msgstr "git add [ОПЦИИ] [--] ПЪТ…"
+msgstr "git add [ОПЦИЯ…] [--] ПЪТ…"
#: builtin/add.c:64
#, c-format
@@ -1996,7 +2071,7 @@ msgstr "изтриване на „%s“\n"
msgid "Unstaged changes after refreshing the index:"
msgstr "Промени, които и след обновяването на индекса не са добавени към него:"
-#: builtin/add.c:193
+#: builtin/add.c:193 builtin/rev-parse.c:781
msgid "Could not read the index"
msgstr "Индексът не може да бъде прочетен"
@@ -2028,15 +2103,15 @@ msgid "The following paths are ignored by one of your .gitignore files:\n"
msgstr ""
"Следните пътища ще бъдат игнорирани според някой от файловете „.gitignore“:\n"
-#: builtin/add.c:248 builtin/clean.c:876 builtin/fetch.c:93 builtin/mv.c:70
-#: builtin/prune-packed.c:77 builtin/push.c:489 builtin/remote.c:1344
+#: builtin/add.c:248 builtin/clean.c:875 builtin/fetch.c:108 builtin/mv.c:70
+#: builtin/prune-packed.c:77 builtin/push.c:488 builtin/remote.c:1367
#: builtin/rm.c:269
msgid "dry run"
msgstr "пробно изпълнeние"
-#: builtin/add.c:249 builtin/apply.c:4410 builtin/check-ignore.c:19
-#: builtin/commit.c:1256 builtin/count-objects.c:95 builtin/fsck.c:612
-#: builtin/log.c:1592 builtin/mv.c:69 builtin/read-tree.c:113
+#: builtin/add.c:249 builtin/apply.c:4411 builtin/check-ignore.c:19
+#: builtin/commit.c:1328 builtin/count-objects.c:95 builtin/fsck.c:606
+#: builtin/log.c:1613 builtin/mv.c:69 builtin/read-tree.c:113
msgid "be verbose"
msgstr "повече подробности"
@@ -2044,7 +2119,7 @@ msgstr "повече подробности"
msgid "interactive picking"
msgstr "интерактивно отбиране на промени"
-#: builtin/add.c:252 builtin/checkout.c:1108 builtin/reset.c:283
+#: builtin/add.c:252 builtin/checkout.c:1102 builtin/reset.c:285
msgid "select hunks interactively"
msgstr "интерактивен избор на парчета код"
@@ -2092,7 +2167,7 @@ msgstr ""
#: builtin/add.c:286
#, c-format
msgid "Use -f if you really want to add them.\n"
-msgstr "Използвайте опцията „-f“, ако наистина искате да ги добавите.\n"
+msgstr "Използвайте опцията „-f“, за да ги добавите наистина.\n"
#: builtin/add.c:287
msgid "no files added"
@@ -2102,91 +2177,99 @@ msgstr "не са добавени файлове"
msgid "adding files failed"
msgstr "неуспешно добавяне на файлове"
-#: builtin/add.c:330
+#: builtin/add.c:329
msgid "-A and -u are mutually incompatible"
msgstr "опциите „-A“ и „-u“ са несъвместими"
-#: builtin/add.c:337
+#: builtin/add.c:336
msgid "Option --ignore-missing can only be used together with --dry-run"
msgstr "Опцията „--ignore-missing“ е съвместима само с „--dry-run“"
-#: builtin/add.c:358
+#: builtin/add.c:357
#, c-format
msgid "Nothing specified, nothing added.\n"
msgstr "Нищо не е зададено и нищо не е добавено.\n"
-#: builtin/add.c:359
+#: builtin/add.c:358
#, c-format
msgid "Maybe you wanted to say 'git add .'?\n"
msgstr "Вероятно искахте да използвате „git add .“?\n"
-#: builtin/add.c:364 builtin/check-ignore.c:172 builtin/clean.c:920
-#: builtin/commit.c:320 builtin/mv.c:90 builtin/reset.c:234 builtin/rm.c:299
+#: builtin/add.c:363 builtin/check-ignore.c:172 builtin/clean.c:919
+#: builtin/commit.c:319 builtin/mv.c:90 builtin/reset.c:234 builtin/rm.c:299
msgid "index file corrupt"
msgstr "файлът с индекса е повреден"
-#: builtin/add.c:448 builtin/apply.c:4506 builtin/mv.c:280 builtin/rm.c:432
+#: builtin/add.c:446 builtin/apply.c:4506 builtin/mv.c:280 builtin/rm.c:431
msgid "Unable to write new index file"
msgstr "Новият индекс не може да бъде записан"
#: builtin/apply.c:57
msgid "git apply [options] [<patch>...]"
-msgstr ""
+msgstr "git apply [ОПЦИЯ…] [КРЪПКА…]"
#: builtin/apply.c:110
#, c-format
msgid "unrecognized whitespace option '%s'"
-msgstr ""
+msgstr "непозната опция за знаците за интервали „%s“"
#: builtin/apply.c:125
#, c-format
msgid "unrecognized whitespace ignore option '%s'"
-msgstr ""
+msgstr "непозната опция за игнориране на знаците за интервали „%s“"
-#: builtin/apply.c:823
+#: builtin/apply.c:825
#, c-format
msgid "Cannot prepare timestamp regexp %s"
-msgstr ""
+msgstr "Регулярният израз за времето „%s“ не може за бъде компилиран"
-#: builtin/apply.c:832
+#: builtin/apply.c:834
#, c-format
msgid "regexec returned %d for input: %s"
-msgstr ""
+msgstr "Регулярният израз върна %d при подадена последователност „%s“ на входа"
-#: builtin/apply.c:913
+#: builtin/apply.c:915
#, c-format
msgid "unable to find filename in patch at line %d"
-msgstr ""
+msgstr "Липсва име на файл на ред %d от кръпката"
-#: builtin/apply.c:945
+#: builtin/apply.c:947
#, c-format
msgid "git apply: bad git-diff - expected /dev/null, got %s on line %d"
msgstr ""
+"git apply: лош изход от командата „git-diff“ — на ред %2$d се очакваше „/dev/"
+"null“, а бе получен „%1$s“"
-#: builtin/apply.c:949
+#: builtin/apply.c:951
#, c-format
msgid "git apply: bad git-diff - inconsistent new filename on line %d"
msgstr ""
+"git apply: лош изход от командата „git-diff“ — на ред %d бе получено "
+"неправилно име на нов файл"
-#: builtin/apply.c:950
+#: builtin/apply.c:952
#, c-format
msgid "git apply: bad git-diff - inconsistent old filename on line %d"
msgstr ""
+"git apply: лош изход от командата „git-diff“ — на ред %d бе получено "
+"неправилно име на стар файл"
-#: builtin/apply.c:957
+#: builtin/apply.c:959
#, c-format
msgid "git apply: bad git-diff - expected /dev/null on line %d"
msgstr ""
+"git apply: лош изход от командата „git-diff“ — на ред %d се очакваше „/dev/"
+"null“"
#: builtin/apply.c:1422
#, c-format
msgid "recount: unexpected line: %.*s"
-msgstr ""
+msgstr "при повторното преброяване бе получен неочакван ред: „%.*s“"
#: builtin/apply.c:1479
#, c-format
msgid "patch fragment without header at line %d: %.*s"
-msgstr ""
+msgstr "част от кръпка без заглавна част на ред %d: %.*s"
#: builtin/apply.c:1496
#, c-format
@@ -2197,30 +2280,34 @@ msgid_plural ""
"git diff header lacks filename information when removing %d leading pathname "
"components (line %d)"
msgstr[0] ""
+"След съкращаването на %d-та част от компонентите на пътя, в заглавната част "
+"на „git diff“ липсва информация за име на файл (ред: %d)"
msgstr[1] ""
+"След съкращаването на първите %d части от компонентите на пътя, в заглавната "
+"част на „git diff“ липсва информация за име на файл (ред: %d)"
#: builtin/apply.c:1656
msgid "new file depends on old contents"
-msgstr ""
+msgstr "новият файл зависи от старото съдържание на файла"
#: builtin/apply.c:1658
msgid "deleted file still has contents"
-msgstr ""
+msgstr "изтритият файл не е празен"
#: builtin/apply.c:1684
#, c-format
msgid "corrupt patch at line %d"
-msgstr ""
+msgstr "грешка в кръпката на ред %d"
#: builtin/apply.c:1720
#, c-format
msgid "new file %s depends on old contents"
-msgstr ""
+msgstr "новият файл „%s“ зависи от старото съдържание на файла"
#: builtin/apply.c:1722
#, c-format
msgid "deleted file %s still has contents"
-msgstr ""
+msgstr "изтритият файл „%s“ не е празен"
# FIXME - double **??
#: builtin/apply.c:1725
@@ -2231,44 +2318,47 @@ msgstr "●● предупреждение: файлът „%s“ вече е
#: builtin/apply.c:1871
#, c-format
msgid "corrupt binary patch at line %d: %.*s"
-msgstr ""
+msgstr "грешка в двоичната кръпка на ред %d: %.*s"
#: builtin/apply.c:1900
#, c-format
msgid "unrecognized binary patch at line %d"
-msgstr ""
+msgstr "неразпозната двоичната кръпка на ред %d"
#: builtin/apply.c:1986
#, c-format
msgid "patch with only garbage at line %d"
-msgstr ""
+msgstr "кръпката е с изцяло повредени данни на ред %d"
#: builtin/apply.c:2076
#, c-format
msgid "unable to read symlink %s"
-msgstr ""
+msgstr "символната връзка „%s“ не може да бъде прочетена"
#: builtin/apply.c:2080
#, c-format
msgid "unable to open or read %s"
-msgstr ""
+msgstr "файлът „%s“ не може да бъде отворен или прочетен"
#: builtin/apply.c:2688
#, c-format
msgid "invalid start of line: '%c'"
-msgstr ""
+msgstr "неправилно начало на ред: „%c“"
#: builtin/apply.c:2806
#, c-format
msgid "Hunk #%d succeeded at %d (offset %d line)."
msgid_plural "Hunk #%d succeeded at %d (offset %d lines)."
msgstr[0] ""
+"%d-то парче код бе успешно приложено на ред %d (отместване от %d ред)."
msgstr[1] ""
+"%d-то парче код бе успешно приложено на ред %d (отместване от %d реда)."
#: builtin/apply.c:2818
#, c-format
msgid "Context reduced to (%ld/%ld) to apply fragment at %d"
msgstr ""
+"Контекстът е намален на (%ld/%ld) за прилагането на парчето код на ред %d"
#: builtin/apply.c:2824
#, c-format
@@ -2276,100 +2366,105 @@ msgid ""
"while searching for:\n"
"%.*s"
msgstr ""
+"при търсене за:\n"
+"%.*s"
#: builtin/apply.c:2843
#, c-format
msgid "missing binary patch data for '%s'"
-msgstr ""
+msgstr "липсват данните за двоичната кръпка за „%s“"
-#: builtin/apply.c:2946
+#: builtin/apply.c:2944
#, c-format
msgid "binary patch does not apply to '%s'"
-msgstr ""
+msgstr "двоичната кръпка не може да бъде приложена върху „%s“"
-#: builtin/apply.c:2952
+#: builtin/apply.c:2950
#, c-format
msgid "binary patch to '%s' creates incorrect result (expecting %s, got %s)"
msgstr ""
+"двоичната кръпка за „%s“ води до неправилни резултати (очакваше се SHA1: "
+"„%s“, а бе получено: „%s“)"
-#: builtin/apply.c:2973
+#: builtin/apply.c:2971
#, c-format
msgid "patch failed: %s:%ld"
-msgstr ""
+msgstr "неуспешно прилагане на кръпка: „%s:%ld“"
#: builtin/apply.c:3095
#, c-format
msgid "cannot checkout %s"
-msgstr ""
+msgstr "„%s“ не може да се изтегли"
#: builtin/apply.c:3140 builtin/apply.c:3149 builtin/apply.c:3194
#, c-format
msgid "read of %s failed"
-msgstr ""
+msgstr "неуспешно прочитане на „%s“"
#: builtin/apply.c:3174 builtin/apply.c:3396
#, c-format
msgid "path %s has been renamed/deleted"
-msgstr ""
+msgstr "обектът с път „%s“ е преименуван или изтрит"
#: builtin/apply.c:3255 builtin/apply.c:3410
#, c-format
msgid "%s: does not exist in index"
-msgstr ""
+msgstr "„%s“ не съществува в индекса"
#: builtin/apply.c:3259 builtin/apply.c:3402 builtin/apply.c:3424
#, c-format
msgid "%s: %s"
-msgstr ""
+msgstr "„%s“: %s"
#: builtin/apply.c:3264 builtin/apply.c:3418
#, c-format
msgid "%s: does not match index"
-msgstr ""
+msgstr "„%s“ не съответства на индекса"
#: builtin/apply.c:3366
msgid "removal patch leaves file contents"
-msgstr ""
+msgstr "изтриващата кръпка оставя файла непразен"
#: builtin/apply.c:3435
#, c-format
msgid "%s: wrong type"
-msgstr ""
+msgstr "„%s“: неправилен вид"
#: builtin/apply.c:3437
#, c-format
msgid "%s has type %o, expected %o"
-msgstr ""
+msgstr "„%s“ е от вид „%o“, а се очакваше „%o“"
#: builtin/apply.c:3538
#, c-format
msgid "%s: already exists in index"
-msgstr ""
+msgstr "„%s“: вече съществува в индекса"
#: builtin/apply.c:3541
#, c-format
msgid "%s: already exists in working directory"
-msgstr ""
+msgstr "„%s“: вече съществува в работната директория"
#: builtin/apply.c:3561
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o)"
-msgstr ""
+msgstr "новите права за достъп (%o) на „%s“ не съвпадат със старите (%o)"
#: builtin/apply.c:3566
#, c-format
msgid "new mode (%o) of %s does not match old mode (%o) of %s"
msgstr ""
+"новите права за достъп (%o) на „%s“ не съвпадат със старите (%o) на „%s“"
#: builtin/apply.c:3574
#, c-format
msgid "%s: patch does not apply"
-msgstr ""
+msgstr "Кръпката „%s“ не може да бъде приложена"
#: builtin/apply.c:3587
#, c-format
msgid "Checking patch %s..."
-msgstr ""
+msgstr "Проверяване на кръпката „%s“…"
#: builtin/apply.c:3680 builtin/checkout.c:213 builtin/reset.c:134
#, c-format
@@ -2379,255 +2474,261 @@ msgstr "неуспешно създаване на запис в кеша чре
#: builtin/apply.c:3823
#, c-format
msgid "unable to remove %s from index"
-msgstr ""
+msgstr "„%s“ не може да се извади от индекса"
-#: builtin/apply.c:3851
+#: builtin/apply.c:3852
#, c-format
msgid "corrupt patch for submodule %s"
-msgstr ""
+msgstr "повредена кръпка за модула „%s“"
-#: builtin/apply.c:3855
+#: builtin/apply.c:3856
#, c-format
msgid "unable to stat newly created file '%s'"
msgstr ""
+"не може да се получи информация чрез „stat“ за новосъздадения файл „%s“"
-#: builtin/apply.c:3860
+#: builtin/apply.c:3861
#, c-format
msgid "unable to create backing store for newly created file %s"
msgstr ""
+"не може да се за създаде мястото за съхранение на новосъздадения файл „%s“"
-#: builtin/apply.c:3863 builtin/apply.c:3971
+#: builtin/apply.c:3864 builtin/apply.c:3972
#, c-format
msgid "unable to add cache entry for %s"
-msgstr ""
+msgstr "не може да се добави запис в кеша за „%s“"
-#: builtin/apply.c:3896
+#: builtin/apply.c:3897
#, c-format
msgid "closing file '%s'"
-msgstr ""
+msgstr "затваряне на файла „%s“"
-#: builtin/apply.c:3945
+#: builtin/apply.c:3946
#, c-format
msgid "unable to write file '%s' mode %o"
-msgstr ""
+msgstr "файлът „%s“ не може да се запише с режим на достъп „%o“"
-#: builtin/apply.c:4032
+#: builtin/apply.c:4033
#, c-format
msgid "Applied patch %s cleanly."
-msgstr ""
+msgstr "Кръпката „%s“ бе приложена чисто."
-#: builtin/apply.c:4040
+#: builtin/apply.c:4041
msgid "internal error"
-msgstr ""
+msgstr "вътрешна грешка"
-#: builtin/apply.c:4043
+#: builtin/apply.c:4044
#, c-format
msgid "Applying patch %%s with %d reject..."
msgid_plural "Applying patch %%s with %d rejects..."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Прилагане на кръпката „%%s“ с %d отхвърлено парче…"
+msgstr[1] "Прилагане на кръпката „%%s“ с %d отхвърлени парчета…"
-#: builtin/apply.c:4053
+#: builtin/apply.c:4054
#, c-format
msgid "truncating .rej filename to %.*s.rej"
-msgstr ""
+msgstr "съкращаване на името на файла с отхвърлените парчета на „ %.*s.rej“"
-#: builtin/apply.c:4074
+#: builtin/apply.c:4075
#, c-format
msgid "Hunk #%d applied cleanly."
-msgstr ""
+msgstr "%d-то парче бе успешно приложено."
-#: builtin/apply.c:4077
+#: builtin/apply.c:4078
#, c-format
msgid "Rejected hunk #%d."
-msgstr ""
+msgstr "%d-то парче бе отхвърлено."
-#: builtin/apply.c:4227
+#: builtin/apply.c:4228
msgid "unrecognized input"
-msgstr ""
+msgstr "непознат вход"
-#: builtin/apply.c:4238
+#: builtin/apply.c:4239
msgid "unable to read index file"
msgstr "индексът не може да бъде записан"
-#: builtin/apply.c:4357 builtin/apply.c:4360 builtin/clone.c:90
-#: builtin/fetch.c:78
+#: builtin/apply.c:4358 builtin/apply.c:4361 builtin/clone.c:90
+#: builtin/fetch.c:93
msgid "path"
msgstr "път"
-#: builtin/apply.c:4358
+#: builtin/apply.c:4359
msgid "don't apply changes matching the given path"
-msgstr ""
+msgstr "без прилагане на промените напасващи на дадения път"
-#: builtin/apply.c:4361
+#: builtin/apply.c:4362
msgid "apply changes matching the given path"
-msgstr ""
+msgstr "прилагане на промените напасващи на дадения път"
-#: builtin/apply.c:4363
+#: builtin/apply.c:4364
msgid "num"
-msgstr ""
+msgstr "БРОЙ"
-#: builtin/apply.c:4364
+#: builtin/apply.c:4365
msgid "remove <num> leading slashes from traditional diff paths"
-msgstr ""
+msgstr "премахване на този БРОЙ водещи елементи от пътищата в разликата"
-#: builtin/apply.c:4367
+#: builtin/apply.c:4368
msgid "ignore additions made by the patch"
-msgstr ""
+msgstr "игнориране на редовете добавени от тази кръпка"
-#: builtin/apply.c:4369
+#: builtin/apply.c:4370
msgid "instead of applying the patch, output diffstat for the input"
-msgstr ""
+msgstr "извеждане на статистика на промените без прилагане на кръпката"
-#: builtin/apply.c:4373
+#: builtin/apply.c:4374
msgid "show number of added and deleted lines in decimal notation"
-msgstr ""
+msgstr "извеждане на броя на добавените и изтритите редове"
-#: builtin/apply.c:4375
+#: builtin/apply.c:4376
msgid "instead of applying the patch, output a summary for the input"
-msgstr ""
+msgstr "извеждане на статистика на входните данни без прилагане на кръпката"
-#: builtin/apply.c:4377
+#: builtin/apply.c:4378
msgid "instead of applying the patch, see if the patch is applicable"
-msgstr ""
+msgstr "проверка дали кръпката може да се приложи, без действително прилагане"
-#: builtin/apply.c:4379
+#: builtin/apply.c:4380
msgid "make sure the patch is applicable to the current index"
-msgstr ""
+msgstr "проверка дали кръпката може да бъде приложена към текущия индекс"
-#: builtin/apply.c:4381
+#: builtin/apply.c:4382
msgid "apply a patch without touching the working tree"
-msgstr ""
+msgstr "прилагане на кръпката без промяна на работното дърво"
-#: builtin/apply.c:4383
+#: builtin/apply.c:4384
msgid "also apply the patch (use with --stat/--summary/--check)"
msgstr ""
+"кръпката да бъде приложена. Опцията се комбинира с „--check“/„--stat“/„--"
+"summary“"
-#: builtin/apply.c:4385
+#: builtin/apply.c:4386
msgid "attempt three-way merge if a patch does not apply"
-msgstr ""
+msgstr "пробване с тройно сливане, ако кръпката не може да се приложи директно"
-#: builtin/apply.c:4387
+#: builtin/apply.c:4388
msgid "build a temporary index based on embedded index information"
msgstr ""
+"създаване на временен индекс на база на включената информация за индекса"
-#: builtin/apply.c:4389 builtin/checkout-index.c:197 builtin/ls-files.c:455
+#: builtin/apply.c:4390 builtin/checkout-index.c:198 builtin/ls-files.c:455
msgid "paths are separated with NUL character"
msgstr "разделяне на пътищата с нулевия знак „NUL“"
-#: builtin/apply.c:4392
+#: builtin/apply.c:4393
msgid "ensure at least <n> lines of context match"
msgstr "да се осигури контекст от поне такъв БРОЙ съвпадащи редове"
-#: builtin/apply.c:4393
+#: builtin/apply.c:4394
msgid "action"
-msgstr ""
+msgstr "действие"
-#: builtin/apply.c:4394
+#: builtin/apply.c:4395
msgid "detect new or modified lines that have whitespace errors"
-msgstr ""
+msgstr "засичане на нови или променени редове с грешки в знаците за интервали"
-#: builtin/apply.c:4397 builtin/apply.c:4400
+#: builtin/apply.c:4398 builtin/apply.c:4401
msgid "ignore changes in whitespace when finding context"
msgstr ""
+"игнориране на промените в знаците за интервали при откриване на контекста"
-#: builtin/apply.c:4403
+#: builtin/apply.c:4404
msgid "apply the patch in reverse"
-msgstr ""
+msgstr "прилагане на кръпката в обратна посока"
-#: builtin/apply.c:4405
+#: builtin/apply.c:4406
msgid "don't expect at least one line of context"
-msgstr ""
+msgstr "без изискване на дори и един ред контекст"
-#: builtin/apply.c:4407
+#: builtin/apply.c:4408
msgid "leave the rejected hunks in corresponding *.rej files"
-msgstr ""
+msgstr "оставяне на отхвърлените парчета във файлове с разширение „.rej“"
-#: builtin/apply.c:4409
+#: builtin/apply.c:4410
msgid "allow overlapping hunks"
-msgstr ""
+msgstr "позволяване на застъпващи се парчета"
-#: builtin/apply.c:4412
+#: builtin/apply.c:4413
msgid "tolerate incorrectly detected missing new-line at the end of file"
-msgstr ""
+msgstr "пренебрегване на неправилно липсващ знак за нов ред в края на файл"
-#: builtin/apply.c:4415
+#: builtin/apply.c:4416
msgid "do not trust the line counts in the hunk headers"
-msgstr ""
+msgstr "без доверяване на номерата на редовете в заглавните части на парчетата"
-#: builtin/apply.c:4417
+#: builtin/apply.c:4418
msgid "root"
-msgstr ""
+msgstr "НАЧАЛНА_ДИРЕКТОРИЯ"
-#: builtin/apply.c:4418
+#: builtin/apply.c:4419
msgid "prepend <root> to all filenames"
-msgstr ""
+msgstr "добавяне на тази НАЧАЛНА_ДИРЕКТОРИЯ към имената на всички файлове"
-#: builtin/apply.c:4440
+#: builtin/apply.c:4441
msgid "--3way outside a repository"
-msgstr ""
+msgstr "като „--3way“, но извън хранилище"
-#: builtin/apply.c:4448
+#: builtin/apply.c:4449
msgid "--index outside a repository"
-msgstr ""
+msgstr "като „--index“, но извън хранилище"
-#: builtin/apply.c:4451
+#: builtin/apply.c:4452
msgid "--cached outside a repository"
-msgstr ""
+msgstr "като „--cached“, но извън хранилище"
-#: builtin/apply.c:4467
+#: builtin/apply.c:4468
#, c-format
msgid "can't open patch '%s'"
-msgstr ""
+msgstr "кръпката „%s“ не може да бъде отворена"
-#: builtin/apply.c:4481
+#: builtin/apply.c:4482
#, c-format
msgid "squelched %d whitespace error"
msgid_plural "squelched %d whitespace errors"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "пренебрегната е %d грешка в знаците за интервали"
+msgstr[1] "пренебрегнати са %d грешки в знаците за интервали"
-#: builtin/apply.c:4487 builtin/apply.c:4497
+#: builtin/apply.c:4488 builtin/apply.c:4498
#, c-format
msgid "%d line adds whitespace errors."
msgid_plural "%d lines add whitespace errors."
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "%d ред добавя грешки в знаците за интервали."
+msgstr[1] "%d реда добавят грешки в знаците за интервали."
#: builtin/archive.c:17
#, c-format
msgid "could not create archive file '%s'"
-msgstr ""
+msgstr "архивният файл „%s“ не може да бъде създаден"
#: builtin/archive.c:20
msgid "could not redirect output"
-msgstr ""
+msgstr "изходът не може да бъде пренасочен"
#: builtin/archive.c:37
msgid "git archive: Remote with no URL"
-msgstr ""
+msgstr "git archive: Липсва адрес за отдалеченото хранилище"
#: builtin/archive.c:58
msgid "git archive: expected ACK/NAK, got EOF"
-msgstr ""
+msgstr "git archive: очакваше се „ACK“/„NAK“, а бе получен „EOF“"
#: builtin/archive.c:61
#, c-format
msgid "git archive: NACK %s"
-msgstr ""
+msgstr "git archive: получен е „NACK“ — %s"
#: builtin/archive.c:63
#, c-format
msgid "remote error: %s"
-msgstr ""
+msgstr "отдалечена грешка: %s"
#: builtin/archive.c:64
msgid "git archive: protocol error"
-msgstr ""
+msgstr "git archive: протоколна грешка"
#: builtin/archive.c:68
msgid "git archive: expected a flush"
-msgstr ""
+msgstr "git archive: очакваше се изчистване на буферите чрез „flush“"
#: builtin/bisect--helper.c:7
msgid "git bisect--helper --next-all [--no-checkout]"
@@ -2642,139 +2743,150 @@ msgid "update BISECT_HEAD instead of checking out the current commit"
msgstr ""
"обновяване на указателя „BISECT_HEAD“ вместо да се използва текущото подаване"
-#: builtin/blame.c:27
+#: builtin/blame.c:30
msgid "git blame [options] [rev-opts] [rev] [--] file"
-msgstr "git blame [ОПЦИИ] [ОПЦИИ_ЗА_ВЕРСИЯТА] [ВЕРСИЯ] [--] ФАЙЛ"
+msgstr "git blame [ОПЦИЯ…] [ОПЦИИ_ЗА_ВЕРСИЯТА] [ВЕРСИЯ] [--] ФАЙЛ"
-#: builtin/blame.c:32
+#: builtin/blame.c:35
msgid "[rev-opts] are documented in git-rev-list(1)"
msgstr "ОПЦИИте_ЗА_ВЕРСИЯТА са документирани в ръководството git-rev-list(1)"
-#: builtin/blame.c:2242
+#: builtin/blame.c:2501
msgid "Show blame entries as we find them, incrementally"
msgstr "Извеждане на анотациите с намирането им, последователно"
# FIXME SHA-1 -> SHA1
-#: builtin/blame.c:2243
+#: builtin/blame.c:2502
msgid "Show blank SHA-1 for boundary commits (Default: off)"
msgstr ""
"Извеждане на празни суми по SHA1 за граничните подавания (стандартно опцията "
"е изключена)"
-#: builtin/blame.c:2244
+#: builtin/blame.c:2503
msgid "Do not treat root commits as boundaries (Default: off)"
msgstr ""
"Началните подавания да не се считат за гранични (стандартно опцията е "
"изключена)"
-#: builtin/blame.c:2245
+#: builtin/blame.c:2504
msgid "Show work cost statistics"
msgstr "Извеждане на статистика за извършените действия"
-#: builtin/blame.c:2246
+#: builtin/blame.c:2505
msgid "Show output score for blame entries"
msgstr "Извеждане на допълнителна информация за определянето на анотациите"
-#: builtin/blame.c:2247
+#: builtin/blame.c:2506
msgid "Show original filename (Default: auto)"
msgstr ""
"Извеждане на първоначалното име на файл (стандартно това е автоматично)"
-#: builtin/blame.c:2248
+#: builtin/blame.c:2507
msgid "Show original linenumber (Default: off)"
msgstr ""
"Извеждане на първоначалният номер на ред (стандартно опцията е изключена)"
-#: builtin/blame.c:2249
+#: builtin/blame.c:2508
msgid "Show in a format designed for machine consumption"
msgstr "Извеждане във формат за по-нататъшна обработка"
-#: builtin/blame.c:2250
+#: builtin/blame.c:2509
msgid "Show porcelain format with per-line commit information"
msgstr ""
-"Извеждане във формат за по-нататъшна обработка с информация на всеки ред"
+"Извеждане във формат за команди от потребителско ниво с информация на всеки "
+"ред"
-#: builtin/blame.c:2251
+#: builtin/blame.c:2510
msgid "Use the same output mode as git-annotate (Default: off)"
msgstr ""
"Използване на същия формат като „git-annotate“ (стандартно опцията е "
"изключена)"
-#: builtin/blame.c:2252
+#: builtin/blame.c:2511
msgid "Show raw timestamp (Default: off)"
msgstr "Извеждане на неформатирани времена (стандартно опцията е изключена)"
-#: builtin/blame.c:2253
+#: builtin/blame.c:2512
msgid "Show long commit SHA1 (Default: off)"
msgstr "Извеждане на пълните суми по SHA1 (стандартно опцията е изключена)"
-#: builtin/blame.c:2254
+#: builtin/blame.c:2513
msgid "Suppress author name and timestamp (Default: off)"
-msgstr "Без име на автор и време на промяна(стандартно опцията е изключена)"
+msgstr "Без име на автор и време на промяна (стандартно опцията е изключена)"
-#: builtin/blame.c:2255
+#: builtin/blame.c:2514
msgid "Show author email instead of name (Default: off)"
msgstr ""
"Извеждане на е-пощата на автора, а не името му (стандартно опцията е "
"изключена)"
-#: builtin/blame.c:2256
+#: builtin/blame.c:2515
msgid "Ignore whitespace differences"
msgstr "Без разлики в знаците за интервали"
-#: builtin/blame.c:2257
+#: builtin/blame.c:2516
msgid "Spend extra cycles to find better match"
msgstr "Допълнителни изчисления за по-добри резултати"
-#: builtin/blame.c:2258
+#: builtin/blame.c:2517
msgid "Use revisions from <file> instead of calling git-rev-list"
msgstr "Изчитане на версиите от ФАЙЛ, а не чрез изпълнение на „git-rev-list“"
-#: builtin/blame.c:2259
+#: builtin/blame.c:2518
msgid "Use <file>'s contents as the final image"
msgstr "Използване на съдържанието на ФАЙЛа като крайно положение"
-#: builtin/blame.c:2260 builtin/blame.c:2261
+#: builtin/blame.c:2519 builtin/blame.c:2520
msgid "score"
msgstr "напасване на редовете"
-#: builtin/blame.c:2260
+#: builtin/blame.c:2519
msgid "Find line copies within and across files"
msgstr ""
"Търсене на копирани редове както в рамките на един файл, така и от един файл "
"към друг"
-#: builtin/blame.c:2261
+#: builtin/blame.c:2520
msgid "Find line movements within and across files"
msgstr ""
"Търсене на преместени редове както в рамките на един файл, така и от един "
"файл към друг"
-#: builtin/blame.c:2262
+#: builtin/blame.c:2521
msgid "n,m"
msgstr "n,m"
-#: builtin/blame.c:2262
+#: builtin/blame.c:2521
msgid "Process only line range n,m, counting from 1"
msgstr ""
"Информация само за редовете в интервала от n до m включително. Броенето "
"започва от 1"
+#. TRANSLATORS: This string is used to tell us the maximum
+#. display width for a relative timestamp in "git blame"
+#. output. For C locale, "4 years, 11 months ago", which
+#. takes 22 places, is the longest among various forms of
+#. relative timestamps, but your language may need more or
+#. fewer display columns.
+#: builtin/blame.c:2599
+msgid "4 years, 11 months ago"
+msgstr "преди 4 години и 11 месеца"
+
#: builtin/branch.c:24
msgid "git branch [options] [-r | -a] [--merged | --no-merged]"
-msgstr "git branch [ОПЦИИ] [-r | -a] [--merged | --no-merged]"
+msgstr "git branch [ОПЦИЯ…] [-r | -a] [--merged | --no-merged]"
#: builtin/branch.c:25
msgid "git branch [options] [-l] [-f] <branchname> [<start-point>]"
-msgstr "git branch [ОПЦИИ] [-l] [-f] ИМЕ_НА_КЛОН [НАЧАЛО]"
+msgstr "git branch [ОПЦИЯ…] [-l] [-f] ИМЕ_НА_КЛОН [НАЧАЛО]"
#: builtin/branch.c:26
msgid "git branch [options] [-r] (-d | -D) <branchname>..."
-msgstr "git branch [ОПЦИИ] [-r] (-d | -D) ИМЕ_НА_КЛОН…"
+msgstr "git branch [ОПЦИЯ…] [-r] (-d | -D) ИМЕ_НА_КЛОН…"
#: builtin/branch.c:27
msgid "git branch [options] (-m | -M) [<oldbranch>] <newbranch>"
-msgstr "git branch [ОПЦИИ] (-m | -M) [СТАР_КЛОН] НОВ_КЛОН"
+msgstr "git branch [ОПЦИЯ…] (-m | -M) [СТАР_КЛОН] НОВ_КЛОН"
#: builtin/branch.c:150
#, c-format
@@ -2955,11 +3067,11 @@ msgstr "На клона с неправилно име „%s“ е дадено
#: builtin/branch.c:727
#, c-format
msgid "Branch renamed to %s, but HEAD is not updated!"
-msgstr "Клонът е преименуван на „%s“, но указателят „HEAD“ не е преименуван"
+msgstr "Клонът е преименуван на „%s“, но указателят „HEAD“ не е обновен"
#: builtin/branch.c:734
msgid "Branch is renamed, but update of config-file failed"
-msgstr "Клонът е преименуван, но конфигурационният файл не бе обновен"
+msgstr "Клонът е преименуван, но конфигурационният файл не е обновен"
#: builtin/branch.c:749
#, c-format
@@ -3001,9 +3113,9 @@ msgid "act on remote-tracking branches"
msgstr "действие върху следящите клони"
#: builtin/branch.c:817 builtin/branch.c:823 builtin/branch.c:844
-#: builtin/branch.c:850 builtin/commit.c:1494 builtin/commit.c:1495
-#: builtin/commit.c:1496 builtin/commit.c:1497 builtin/tag.c:527
-#: builtin/tag.c:533
+#: builtin/branch.c:850 builtin/commit.c:1573 builtin/commit.c:1574
+#: builtin/commit.c:1575 builtin/commit.c:1576 builtin/tag.c:615
+#: builtin/tag.c:621
msgid "commit"
msgstr "подаване"
@@ -3068,7 +3180,7 @@ msgstr "извеждане по колони"
msgid "Failed to resolve HEAD as a valid ref."
msgstr "Не може да се открие към какво сочи указателят „HEAD“"
-#: builtin/branch.c:872 builtin/clone.c:635
+#: builtin/branch.c:872 builtin/clone.c:636
msgid "HEAD not found below refs/heads!"
msgstr "В директорията „refs/heads“ липсва файл „HEAD“"
@@ -3179,55 +3291,60 @@ msgstr " git branch --set-upstream-to %s\n"
#: builtin/bundle.c:47
#, c-format
msgid "%s is okay\n"
-msgstr ""
+msgstr "Пратката „%s“ е наред\n"
#: builtin/bundle.c:56
msgid "Need a repository to create a bundle."
-msgstr ""
+msgstr "За създаването на пратка е необходимо хранилище."
#: builtin/bundle.c:60
msgid "Need a repository to unbundle."
-msgstr ""
+msgstr "За приемането на пратка е необходимо хранилище."
#: builtin/cat-file.c:331
msgid "git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>"
-msgstr ""
+msgstr "git cat-file (-t|-s|-e|-p|ВИД|--textconv) ОБЕКТ"
#: builtin/cat-file.c:332
msgid "git cat-file (--batch|--batch-check) < <list_of_objects>"
-msgstr ""
+msgstr "git cat-file (--batch|--batch-check) < СПИСЪК_С_ОБЕКТИ"
#: builtin/cat-file.c:369
msgid "<type> can be one of: blob, tree, commit, tag"
msgstr ""
+"ВИДът може да е: „blob“ (обект BLOB), „tree“ (дърво), „commit“ (подаване), "
+"„tag“ (етикет)"
#: builtin/cat-file.c:370
msgid "show object type"
-msgstr ""
+msgstr "извеждане на вида на обект"
#: builtin/cat-file.c:371
msgid "show object size"
-msgstr ""
+msgstr "извеждане на размера на обект"
#: builtin/cat-file.c:373
msgid "exit with zero when there's no error"
-msgstr ""
+msgstr "изход с 0, когато няма грешка"
#: builtin/cat-file.c:374
msgid "pretty-print object's content"
-msgstr ""
+msgstr "форматирано извеждане на съдържанието на обекта"
#: builtin/cat-file.c:376
msgid "for blob objects, run textconv on object's content"
msgstr ""
+"да се стартира програмата зададена в настройката „textconv“ за преобразуване "
+"на съдържанието на обекта"
#: builtin/cat-file.c:378
msgid "show info and content of objects fed from the standard input"
msgstr ""
+"извеждане на информация и съдържание на обектите подадени на стандартния вход"
#: builtin/cat-file.c:381
msgid "show info about objects fed from the standard input"
-msgstr ""
+msgstr "извеждане на информация за обектите подадени на стандартния вход"
#: builtin/check-attr.c:11
msgid "git check-attr [-a | --all | attr...] [--] pathname..."
@@ -3253,45 +3370,48 @@ msgstr "изчитане на имената на файловете от ста
msgid "terminate input and output records by a NUL character"
msgstr "разделяне на входните и изходните записи с нулевия знак „NUL“"
-#: builtin/check-ignore.c:18 builtin/checkout.c:1089 builtin/gc.c:271
+#: builtin/check-ignore.c:18 builtin/checkout.c:1083 builtin/gc.c:285
msgid "suppress progress reporting"
msgstr "без показване на напредъка"
#: builtin/check-ignore.c:26
msgid "show non-matching input paths"
-msgstr ""
+msgstr "извеждане на несъвпадащите пътища"
#: builtin/check-ignore.c:28
msgid "ignore index when checking"
-msgstr ""
+msgstr "прескачане на индекса при проверката"
#: builtin/check-ignore.c:154
msgid "cannot specify pathnames with --stdin"
-msgstr ""
+msgstr "опцията „--stdin“ е несъвместима с имена на пътища"
+# FIXME options
#: builtin/check-ignore.c:157
msgid "-z only makes sense with --stdin"
-msgstr ""
+msgstr "опцията „-z“ изисква „--stdin“"
#: builtin/check-ignore.c:159
msgid "no path specified"
-msgstr ""
+msgstr "не е зададен път"
#: builtin/check-ignore.c:163
msgid "--quiet is only valid with a single pathname"
-msgstr ""
+msgstr "опцията „--quiet“ изисква да е подаден точно един път"
+# FIXME options
#: builtin/check-ignore.c:165
msgid "cannot have both --quiet and --verbose"
-msgstr ""
+msgstr "опциите „--quiet“ и „--verbose“ са несъвместими"
+# FIXME options
#: builtin/check-ignore.c:168
msgid "--non-matching is only valid with --verbose"
-msgstr ""
+msgstr "опцията „--non-matching“ изисква „--verbose“"
#: builtin/check-mailmap.c:8
msgid "git check-mailmap [options] <contact>..."
-msgstr "git check-mailmap [ОПЦИИ] КОНТАКТ…"
+msgstr "git check-mailmap [ОПЦИЯ…] КОНТАКТ…"
#: builtin/check-mailmap.c:13
msgid "also read contacts from stdin"
@@ -3308,55 +3428,55 @@ msgstr "не са указани контакти"
#: builtin/checkout-index.c:126
msgid "git checkout-index [options] [--] [<file>...]"
-msgstr ""
+msgstr "git checkout-index [ОПЦИЯ…] [--] [ФАЙЛ…]"
-#: builtin/checkout-index.c:187
+#: builtin/checkout-index.c:188
msgid "check out all files in the index"
-msgstr ""
+msgstr "изтегляне на всички файлове в индекса"
-#: builtin/checkout-index.c:188
+#: builtin/checkout-index.c:189
msgid "force overwrite of existing files"
-msgstr ""
+msgstr "презаписване на файловете, дори и да съществуват"
-#: builtin/checkout-index.c:190
+#: builtin/checkout-index.c:191
msgid "no warning for existing files and files not in index"
-msgstr ""
+msgstr "без предупреждения при липсващи файлове и файлове не в индекса"
-#: builtin/checkout-index.c:192
+#: builtin/checkout-index.c:193
msgid "don't checkout new files"
-msgstr ""
+msgstr "без изтегляне на нови файлове"
-#: builtin/checkout-index.c:194
+#: builtin/checkout-index.c:195
msgid "update stat information in the index file"
msgstr "обновяване на информацията получена чрез „stat“ за файловете в индекса"
-#: builtin/checkout-index.c:200
+#: builtin/checkout-index.c:201
msgid "read list of paths from the standard input"
-msgstr ""
+msgstr "изчитане на пътищата от стандартния вход"
-#: builtin/checkout-index.c:202
+#: builtin/checkout-index.c:203
msgid "write the content to temporary files"
-msgstr ""
+msgstr "записване на съдържанието във временни файлове"
-#: builtin/checkout-index.c:203 builtin/column.c:30
+#: builtin/checkout-index.c:204 builtin/column.c:30
msgid "string"
-msgstr ""
+msgstr "НИЗ"
-#: builtin/checkout-index.c:204
+#: builtin/checkout-index.c:205
msgid "when creating files, prepend <string>"
-msgstr ""
+msgstr "при създаването на нови файлове да се добавя префикса НИЗ"
-#: builtin/checkout-index.c:207
+#: builtin/checkout-index.c:208
msgid "copy out the files from named stage"
-msgstr ""
+msgstr "копиране на файловете от това състояние на сливане"
#: builtin/checkout.c:25
msgid "git checkout [options] <branch>"
-msgstr "git checkout [ОПЦИИ] КЛОН"
+msgstr "git checkout [ОПЦИЯ…] КЛОН"
#: builtin/checkout.c:26
msgid "git checkout [options] [<branch>] -- <file>..."
-msgstr "git checkout [ОПЦИИ] [КЛОН] -- ФАЙЛ…"
+msgstr "git checkout [ОПЦИЯ…] [КЛОН] -- ФАЙЛ…"
#: builtin/checkout.c:114 builtin/checkout.c:147
#, c-format
@@ -3390,77 +3510,77 @@ msgstr "пътят „%s“ не може да бъде слян"
msgid "Unable to add merge result for '%s'"
msgstr "Резултатът за „%s“ не може да бъде слян"
-#: builtin/checkout.c:232 builtin/checkout.c:235 builtin/checkout.c:238
-#: builtin/checkout.c:241
+#: builtin/checkout.c:231 builtin/checkout.c:234 builtin/checkout.c:237
+#: builtin/checkout.c:240
#, c-format
msgid "'%s' cannot be used with updating paths"
msgstr "Опцията „%s“ е несъвместима с обновяването на пътища"
-#: builtin/checkout.c:244 builtin/checkout.c:247
+#: builtin/checkout.c:243 builtin/checkout.c:246
#, c-format
msgid "'%s' cannot be used with %s"
msgstr "Опцията „%s“ е несъвместима с „%s“"
-#: builtin/checkout.c:250
+#: builtin/checkout.c:249
#, c-format
msgid "Cannot update paths and switch to branch '%s' at the same time."
msgstr ""
"Невъзможно е едновременно да обновявате пътища и да се прехвърлите към клона "
"„%s“."
-#: builtin/checkout.c:261 builtin/checkout.c:450
+#: builtin/checkout.c:260 builtin/checkout.c:449
msgid "corrupt index file"
msgstr "повреден файл на индекса"
-#: builtin/checkout.c:321 builtin/checkout.c:328
+#: builtin/checkout.c:320 builtin/checkout.c:327
#, c-format
msgid "path '%s' is unmerged"
msgstr "пътят „%s“ не е слят"
-#: builtin/checkout.c:472
+#: builtin/checkout.c:471
msgid "you need to resolve your current index first"
msgstr "първо трябва да коригирате индекса си"
-#: builtin/checkout.c:593
+#: builtin/checkout.c:591
#, c-format
msgid "Can not do reflog for '%s'\n"
msgstr "Журналът на указателите за „%s“ не може да бъде създаден\n"
-#: builtin/checkout.c:631
+#: builtin/checkout.c:629
msgid "HEAD is now at"
msgstr "Указателят „HEAD“ в момента сочи към"
-#: builtin/checkout.c:638
+#: builtin/checkout.c:636
#, c-format
msgid "Reset branch '%s'\n"
msgstr "Зануляване на клона „%s“\n"
-#: builtin/checkout.c:641
+#: builtin/checkout.c:639
#, c-format
msgid "Already on '%s'\n"
msgstr "Вече сте на „%s“\n"
-#: builtin/checkout.c:645
+#: builtin/checkout.c:643
#, c-format
msgid "Switched to and reset branch '%s'\n"
msgstr "Преминаване към клона „%s“ и зануляване на промените\n"
-#: builtin/checkout.c:647 builtin/checkout.c:1032
+#: builtin/checkout.c:645 builtin/checkout.c:1026
#, c-format
msgid "Switched to a new branch '%s'\n"
msgstr "Преминахте към новия клон „%s“\n"
-#: builtin/checkout.c:649
+#: builtin/checkout.c:647
#, c-format
msgid "Switched to branch '%s'\n"
msgstr "Преминахте към клона „%s“\n"
-#: builtin/checkout.c:705
+#: builtin/checkout.c:699
#, c-format
msgid " ... and %d more.\n"
msgstr "… и още %d.\n"
-#: builtin/checkout.c:711
+#: builtin/checkout.c:705
#, c-format
msgid ""
"Warning: you are leaving %d commit behind, not connected to\n"
@@ -3482,7 +3602,7 @@ msgstr[1] ""
"\n"
"%s\n"
-#: builtin/checkout.c:729
+#: builtin/checkout.c:723
#, c-format
msgid ""
"If you want to keep them by creating a new branch, this may be a good time\n"
@@ -3491,150 +3611,149 @@ msgid ""
" git branch new_branch_name %s\n"
"\n"
msgstr ""
-"Ако все пак искате да ги запазите, сега вероятно е най-подходящият момент "
-"да\n"
-"създадете нов клон с тях чрез командата:\n"
+"Ако все пак искате да запазите тези промени, сега е най-подходящият\n"
+"момент да създадете нов клон за тях чрез командата:\n"
"\n"
" git branch ИМЕ_НА_НОВИЯ_КЛОН %s\n"
"\n"
-#: builtin/checkout.c:759
+#: builtin/checkout.c:753
msgid "internal error in revision walk"
msgstr "вътрешна грешка при обхождането на версиите"
-#: builtin/checkout.c:763
+#: builtin/checkout.c:757
msgid "Previous HEAD position was"
msgstr "Преди това „HEAD“ сочеше към"
-#: builtin/checkout.c:790 builtin/checkout.c:1027
+#: builtin/checkout.c:784 builtin/checkout.c:1021
msgid "You are on a branch yet to be born"
msgstr "В момента сте на клон, който предстои да бъде създаден"
-#: builtin/checkout.c:934
+#: builtin/checkout.c:928
#, c-format
msgid "only one reference expected, %d given."
msgstr "очакваше се един указател, а сте подали %d."
-#: builtin/checkout.c:973
+#: builtin/checkout.c:967
#, c-format
msgid "invalid reference: %s"
msgstr "неправилен указател: %s"
-#: builtin/checkout.c:1002
+#: builtin/checkout.c:996
#, c-format
msgid "reference is not a tree: %s"
msgstr "указателят не сочи към обект-дърво: %s"
-#: builtin/checkout.c:1041
+#: builtin/checkout.c:1035
msgid "paths cannot be used with switching branches"
msgstr "задаването на път е несъвместимо с преминаването от един клон към друг"
-#: builtin/checkout.c:1044 builtin/checkout.c:1048
+#: builtin/checkout.c:1038 builtin/checkout.c:1042
#, c-format
msgid "'%s' cannot be used with switching branches"
msgstr "опцията „%s“ е несъвместима с преминаването от един клон към друг"
-#: builtin/checkout.c:1052 builtin/checkout.c:1055 builtin/checkout.c:1060
-#: builtin/checkout.c:1063
+#: builtin/checkout.c:1046 builtin/checkout.c:1049 builtin/checkout.c:1054
+#: builtin/checkout.c:1057
#, c-format
msgid "'%s' cannot be used with '%s'"
msgstr "опцията „%s“ е несъвместима с „%s“"
-#: builtin/checkout.c:1068
+#: builtin/checkout.c:1062
#, c-format
msgid "Cannot switch branch to a non-commit '%s'"
msgstr ""
"За да преминете към клон, подайте указател, който сочи към подаване. „%s“ не "
"е такъв"
-#: builtin/checkout.c:1090 builtin/checkout.c:1092 builtin/clone.c:88
+#: builtin/checkout.c:1084 builtin/checkout.c:1086 builtin/clone.c:88
#: builtin/remote.c:159 builtin/remote.c:161
msgid "branch"
msgstr "клон"
-#: builtin/checkout.c:1091
+#: builtin/checkout.c:1085
msgid "create and checkout a new branch"
msgstr "създаване и преминаване към нов клон"
-#: builtin/checkout.c:1093
+#: builtin/checkout.c:1087
msgid "create/reset and checkout a branch"
msgstr "създаване/зануляване на клон и преминаване към него"
-#: builtin/checkout.c:1094
+#: builtin/checkout.c:1088
msgid "create reflog for new branch"
msgstr "създаване на журнал на указателите за нов клон"
-#: builtin/checkout.c:1095
+#: builtin/checkout.c:1089
msgid "detach the HEAD at named commit"
msgstr "отделяне на указателя „HEAD“ към указаното подаване"
-#: builtin/checkout.c:1096
+#: builtin/checkout.c:1090
msgid "set upstream info for new branch"
msgstr "задаване на кой клон бива следен при създаването на новия клон"
-#: builtin/checkout.c:1098
+#: builtin/checkout.c:1092
msgid "new-branch"
msgstr "НОВ_КЛОН"
-#: builtin/checkout.c:1098
+#: builtin/checkout.c:1092
msgid "new unparented branch"
msgstr "нов клон без родител"
-#: builtin/checkout.c:1099
+#: builtin/checkout.c:1093
msgid "checkout our version for unmerged files"
msgstr "изтегляне на вашата версия на неслетите файлове"
-#: builtin/checkout.c:1101
+#: builtin/checkout.c:1095
msgid "checkout their version for unmerged files"
msgstr "изтегляне на чуждата версия на неслетите файлове"
-#: builtin/checkout.c:1103
+#: builtin/checkout.c:1097
msgid "force checkout (throw away local modifications)"
msgstr "принудително изтегляне (вашите промени ще бъдат занулени)"
-#: builtin/checkout.c:1104
+#: builtin/checkout.c:1098
msgid "perform a 3-way merge with the new branch"
msgstr "извършване на тройно сливане с новия клон"
-#: builtin/checkout.c:1105 builtin/merge.c:225
+#: builtin/checkout.c:1099 builtin/merge.c:225
msgid "update ignored files (default)"
msgstr "обновяване на игнорираните файлове (стандартно)"
-#: builtin/checkout.c:1106 builtin/log.c:1228 parse-options.h:245
+#: builtin/checkout.c:1100 builtin/log.c:1236 parse-options.h:245
msgid "style"
msgstr "стил"
-#: builtin/checkout.c:1107
+#: builtin/checkout.c:1101
msgid "conflict style (merge or diff3)"
msgstr "действие при конфликт (сливане или тройна разлика)"
-#: builtin/checkout.c:1110
+#: builtin/checkout.c:1104
msgid "do not limit pathspecs to sparse entries only"
msgstr "без ограничаване на изброените пътища само до частично изтеглените"
-#: builtin/checkout.c:1112
+#: builtin/checkout.c:1106
msgid "second guess 'git checkout no-such-branch'"
msgstr ""
"последващ опит за отгатване след неуспешен опит с „git checkout no-such-"
"branch“"
-#: builtin/checkout.c:1135
+#: builtin/checkout.c:1129
msgid "-b, -B and --orphan are mutually exclusive"
msgstr "Опциите „-b“, „-B“ и „--orphan“ са несъвместими една с друга"
-#: builtin/checkout.c:1152
+#: builtin/checkout.c:1146
msgid "--track needs a branch name"
msgstr "опцията „--track“ изисква име на клон"
-#: builtin/checkout.c:1159
+#: builtin/checkout.c:1153
msgid "Missing branch name; try -b"
msgstr "Липсва име на клон, използвайте опцията „-b“"
-#: builtin/checkout.c:1196
+#: builtin/checkout.c:1190
msgid "invalid path specification"
msgstr "указан е неправилен път"
-#: builtin/checkout.c:1203
+#: builtin/checkout.c:1197
#, c-format
msgid ""
"Cannot update paths and switch to branch '%s' at the same time.\n"
@@ -3643,49 +3762,48 @@ msgstr ""
"Не можете едновременно да обновявате пътища и да преминете към клона „%s“.\n"
"Дали не искате да изтеглите „%s“, който не сочи към подаване?"
-#: builtin/checkout.c:1208
+#: builtin/checkout.c:1202
#, c-format
msgid "git checkout: --detach does not take a path argument '%s'"
msgstr "git checkout: опцията „--detach“ не приема аргумент-път „%s“"
-#: builtin/checkout.c:1212
+#: builtin/checkout.c:1206
msgid ""
"git checkout: --ours/--theirs, --force and --merge are incompatible when\n"
"checking out of the index."
msgstr ""
-"git checkout: опциите „--ours“/„--theirs“, „--force“ и „--merge“ са "
-"несъвместими\n"
-"с изтегляне от индекса."
+"git checkout: опциите „--ours“/„--theirs“, „--force“ и „--merge“\n"
+"са несъвместими с изтегляне от индекса."
#: builtin/clean.c:26
msgid ""
"git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>..."
-msgstr ""
+msgstr "git clean [-d] [-f] [-i] [-n] [-q] [-e ШАБЛОН] [-x | -X] [--] ПЪТ…"
#: builtin/clean.c:30
#, c-format
msgid "Removing %s\n"
-msgstr ""
+msgstr "Изтриване на „%s“\n"
#: builtin/clean.c:31
#, c-format
msgid "Would remove %s\n"
-msgstr ""
+msgstr "Файлът „%s“ ще бъде изтрит\n"
#: builtin/clean.c:32
#, c-format
msgid "Skipping repository %s\n"
-msgstr ""
+msgstr "Прескачане на хранилището „%s“\n"
#: builtin/clean.c:33
#, c-format
msgid "Would skip repository %s\n"
-msgstr ""
+msgstr "Хранилището „%s“ ще бъде прескочено\n"
#: builtin/clean.c:34
#, c-format
msgid "failed to remove %s"
-msgstr ""
+msgstr "файлът „%s“ не може да бъде изтрит"
#: builtin/clean.c:295
msgid ""
@@ -3694,6 +3812,10 @@ msgid ""
"foo - select item based on unique prefix\n"
" - (empty) select nothing"
msgstr ""
+"Подсказка:\n"
+"1 — избор на обект според реда\n"
+"ПРЕФИКС — избор на единствен обект по този уникален префикс\n"
+" — (празно) нищо да не се избира"
#: builtin/clean.c:299
msgid ""
@@ -3706,36 +3828,47 @@ msgid ""
"* - choose all items\n"
" - (empty) finish selecting"
msgstr ""
+"Подсказка:\n"
+"1 — избор на един обект\n"
+"3-5 — интервал за избор на обекти\n"
+"2-3,6-9 — множество интервали за избор на обекти\n"
+"ПРЕФИКС — избор на единствен обект по този уникален префикс\n"
+"-… — отмяна на избора на обекти\n"
+"* — избиране на всички обекти\n"
+" — (празно) завършване на избирането"
+# FIXME WTF does this mean
#: builtin/clean.c:517
#, c-format
msgid "Huh (%s)?"
-msgstr ""
+msgstr "Неправилен избор (%s)"
-#: builtin/clean.c:660
+# FIXME - should we use >> or sth else
+#: builtin/clean.c:659
#, c-format
msgid "Input ignore patterns>> "
-msgstr ""
+msgstr "Шаблони за игнорирани елементи≫ "
-#: builtin/clean.c:697
+#: builtin/clean.c:696
#, c-format
msgid "WARNING: Cannot find items matched by: %s"
-msgstr ""
+msgstr "ПРЕДУПРЕЖДЕНИЕ: Никой обект не напасва на „%s“"
-#: builtin/clean.c:718
+#: builtin/clean.c:717
msgid "Select items to delete"
-msgstr ""
+msgstr "Избиране на обекти за изтриване"
-#: builtin/clean.c:758
+#: builtin/clean.c:757
#, c-format
msgid "remove %s? "
-msgstr ""
+msgstr "Да се изтрие ли „%s“? "
-#: builtin/clean.c:783
+# FIXME improve message
+#: builtin/clean.c:782
msgid "Bye."
-msgstr ""
+msgstr "Изход."
-#: builtin/clean.c:791
+#: builtin/clean.c:790
msgid ""
"clean - start cleaning\n"
"filter by pattern - exclude items from deletion\n"
@@ -3745,81 +3878,94 @@ msgid ""
"help - this screen\n"
"? - help for prompt selection"
msgstr ""
+"clean — начало на изчистването\n"
+"filter by pattern — шаблон за обекти, които да не се трият\n"
+"select by numbers — номера на обекти, които да се трият\n"
+"ask each — потвърждаване на всяко изтриване (подобно на „rm -i“)\n"
+"quit — край на изчистването\n"
+"help — този край\n"
+"? — подсказка за шаблоните"
# FIXME how many ***
-#: builtin/clean.c:818
+#: builtin/clean.c:817
msgid "*** Commands ***"
msgstr "●●● Команди ●●●"
-#: builtin/clean.c:819
+# FIXME improve message
+#: builtin/clean.c:818
msgid "What now"
-msgstr ""
+msgstr "Избор на следващо действие"
-#: builtin/clean.c:827
+#: builtin/clean.c:826
msgid "Would remove the following item:"
msgid_plural "Would remove the following items:"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "Следният обект ще бъде изтрит:"
+msgstr[1] "Следните обекти ще бъдат изтрити:"
-#: builtin/clean.c:844
+#: builtin/clean.c:843
msgid "No more files to clean, exiting."
-msgstr ""
+msgstr "Файловете за изчистване свършиха. Изход от програмата."
-#: builtin/clean.c:875
+#: builtin/clean.c:874
msgid "do not print names of files removed"
-msgstr ""
+msgstr "без извеждане на имената на файловете, които ще бъдат изтрити"
-#: builtin/clean.c:877
+#: builtin/clean.c:876
msgid "force"
-msgstr ""
+msgstr "принудително изтриване"
-#: builtin/clean.c:878
+#: builtin/clean.c:877
msgid "interactive cleaning"
-msgstr ""
+msgstr "интерактивно изтриване"
-#: builtin/clean.c:880
+#: builtin/clean.c:879
msgid "remove whole directories"
-msgstr ""
+msgstr "изтриване на цели директории"
-#: builtin/clean.c:881 builtin/describe.c:415 builtin/grep.c:716
-#: builtin/ls-files.c:486 builtin/name-rev.c:314 builtin/show-ref.c:185
+#: builtin/clean.c:880 builtin/describe.c:406 builtin/grep.c:714
+#: builtin/ls-files.c:486 builtin/name-rev.c:311 builtin/show-ref.c:185
msgid "pattern"
msgstr "шаблон"
-#: builtin/clean.c:882
+#: builtin/clean.c:881
msgid "add <pattern> to ignore rules"
-msgstr ""
+msgstr "добавяне на ШАБЛОН от файлове, които да не се трият"
-#: builtin/clean.c:883
+#: builtin/clean.c:882
msgid "remove ignored files, too"
-msgstr ""
+msgstr "изтриване и на игнорираните файлове"
-#: builtin/clean.c:885
+#: builtin/clean.c:884
msgid "remove only ignored files"
-msgstr ""
+msgstr "изтриване само на игнорирани файлове"
-#: builtin/clean.c:903
+#: builtin/clean.c:902
msgid "-x and -X cannot be used together"
-msgstr ""
+msgstr "опциите „-x“ и „-X“ са несъвместими"
-#: builtin/clean.c:907
+#: builtin/clean.c:906
msgid ""
"clean.requireForce set to true and neither -i, -n, nor -f given; refusing to "
"clean"
msgstr ""
+"Настройката „clean.requireForce“ е зададена като истина, което изисква някоя "
+"от опциите „-i“, „-n“ или „-f“. Няма да се извърши изчистване"
-#: builtin/clean.c:910
+#: builtin/clean.c:909
msgid ""
"clean.requireForce defaults to true and neither -i, -n, nor -f given; "
"refusing to clean"
msgstr ""
+"Настройката „clean.requireForce“ не е зададена, но стандартно е истина, "
+"което изисква някоя от опциите „-i“, „-n“ или „-f“. Няма да се извърши "
+"изчистване"
#: builtin/clone.c:36
msgid "git clone [options] [--] <repo> [<dir>]"
-msgstr "git clone [ОПЦИИ] [--] ХРАНИЛИЩЕ [ДИРЕКТОРИЯ]"
+msgstr "git clone [ОПЦИЯ…] [--] ХРАНИЛИЩЕ [ДИРЕКТОРИЯ]"
-#: builtin/clone.c:64 builtin/fetch.c:97 builtin/merge.c:222
-#: builtin/push.c:504
+#: builtin/clone.c:64 builtin/fetch.c:112 builtin/merge.c:222
+#: builtin/push.c:503
msgid "force progress reporting"
msgstr "извеждане на напредъка"
@@ -3833,7 +3979,8 @@ msgstr "създаване на голо хранилище"
#: builtin/clone.c:71
msgid "create a mirror repository (implies bare)"
-msgstr "създаване на хранилище-огледало (това включва хранилището да е голо)"
+msgstr ""
+"създаване на хранилище-огледало (включва опцията „--bare“ за голо хранилище)"
#: builtin/clone.c:73
msgid "to clone from a local repository"
@@ -3879,7 +4026,7 @@ msgstr "изтегляне на този КЛОН, а не соченият от
msgid "path to git-upload-pack on the remote"
msgstr "път към командата „git-upload-pack“ на отдалеченото хранилище"
-#: builtin/clone.c:92 builtin/fetch.c:98 builtin/grep.c:661
+#: builtin/clone.c:92 builtin/fetch.c:113 builtin/grep.c:659
msgid "depth"
msgstr "ДЪЛБОЧИНА"
@@ -3952,7 +4099,7 @@ msgstr "връзката „%s“ не може да бъде създадена
#: builtin/clone.c:365
#, c-format
msgid "failed to copy file to '%s'"
-msgstr "файлът не можа да бъде копиран като „%s“"
+msgstr "файлът не може да бъде копиран като „%s“"
#: builtin/clone.c:388 builtin/clone.c:565
#, c-format
@@ -3974,152 +4121,153 @@ msgstr ""
#, c-format
msgid "Could not find remote branch %s to clone."
msgstr ""
-"Клонът „%s“ от отдалеченото хранилище което клонирате,\n"
-"който следва да бъде изтеглен, не съществува."
+"Клонът „%s“ от отдалеченото хранилище, което клонирате,\n"
+"и който следва да бъде изтеглен, не съществува."
+# FIXME translator note that the space at end is necesssary
#: builtin/clone.c:560
#, c-format
msgid "Checking connectivity... "
-msgstr "Проверка на връзката…"
+msgstr "Проверка на връзката… "
#: builtin/clone.c:563
msgid "remote did not send all necessary objects"
msgstr "отдалеченото хранилище не изпрати всички необходими обекти."
-#: builtin/clone.c:626
+#: builtin/clone.c:627
msgid "remote HEAD refers to nonexistent ref, unable to checkout.\n"
msgstr ""
"указателят „HEAD“ от отдалеченото хранилище сочи към нещо,\n"
"което не съществува. Не може да се изтегли определен клон.\n"
-#: builtin/clone.c:657
+#: builtin/clone.c:658
msgid "unable to checkout working tree"
msgstr "работното дърво не може да бъде подготвено"
-#: builtin/clone.c:765
+#: builtin/clone.c:768
msgid "Too many arguments."
msgstr "Прекалено много аргументи."
-#: builtin/clone.c:769
+#: builtin/clone.c:772
msgid "You must specify a repository to clone."
msgstr "Трябва да укажете кое хранилище искате да клонирате."
-#: builtin/clone.c:780
+#: builtin/clone.c:783
#, c-format
msgid "--bare and --origin %s options are incompatible."
msgstr "опциите „--bare“ и „--origin %s“ са несъвместими."
-#: builtin/clone.c:783
+#: builtin/clone.c:786
msgid "--bare and --separate-git-dir are incompatible."
msgstr "опциите „--bare“ и „--separate-git-dir“ са несъвместими."
-#: builtin/clone.c:796
+#: builtin/clone.c:799
#, c-format
msgid "repository '%s' does not exist"
msgstr "не съществува хранилище „%s“"
-#: builtin/clone.c:802
-msgid "--depth is ignored in local clones; use file:// instead."
-msgstr ""
-"При локално клониране опцията „--depth“ се игнорира. Ползвайте схемата "
-"„file://“."
-
-#: builtin/clone.c:805
-msgid "source repository is shallow, ignoring --local"
-msgstr "клонираното хранилище е плитко, затова опцията „--local“ се игнорира"
-
-#: builtin/clone.c:810
-msgid "--local is ignored"
-msgstr "опцията „--local“ се игнорира"
-
-#: builtin/clone.c:814 builtin/fetch.c:1119
+#: builtin/clone.c:805 builtin/fetch.c:1143
#, c-format
msgid "depth %s is not a positive number"
msgstr "дълбочината трябва да е положително цяло число, а не „%s“"
-#: builtin/clone.c:824
+#: builtin/clone.c:815
#, c-format
msgid "destination path '%s' already exists and is not an empty directory."
msgstr "целевият път „%s“ съществува и не е празна директория."
-#: builtin/clone.c:834
+#: builtin/clone.c:825
#, c-format
msgid "working tree '%s' already exists."
msgstr "в „%s“ вече съществува работно дърво."
-#: builtin/clone.c:847 builtin/clone.c:859
+#: builtin/clone.c:838 builtin/clone.c:850
#, c-format
msgid "could not create leading directories of '%s'"
msgstr "родителските директории на „%s“ не могат да бъдат създадени"
-#: builtin/clone.c:850
+#: builtin/clone.c:841
#, c-format
msgid "could not create work tree dir '%s'."
msgstr "работното дърво в „%s“ не може да бъде създадено."
-#: builtin/clone.c:869
+#: builtin/clone.c:860
#, c-format
msgid "Cloning into bare repository '%s'...\n"
msgstr "Клониране и създаване на голо хранилище в „%s“…\n"
-#: builtin/clone.c:871
+#: builtin/clone.c:862
#, c-format
msgid "Cloning into '%s'...\n"
msgstr "Клониране и създаване на хранилище в „%s“…\n"
+#: builtin/clone.c:898
+msgid "--depth is ignored in local clones; use file:// instead."
+msgstr ""
+"При локално клониране опцията „--depth“ се игнорира. Ползвайте схемата "
+"„file://“."
+
+#: builtin/clone.c:901
+msgid "source repository is shallow, ignoring --local"
+msgstr "клонираното хранилище е плитко, затова опцията „--local“ се игнорира"
+
#: builtin/clone.c:906
+msgid "--local is ignored"
+msgstr "опцията „--local“ се игнорира"
+
+#: builtin/clone.c:910
#, c-format
msgid "Don't know how to clone %s"
msgstr "Не се поддържа клониране на връзки от вида „%s“ "
-#: builtin/clone.c:957 builtin/clone.c:965
+#: builtin/clone.c:961 builtin/clone.c:969
#, c-format
msgid "Remote branch %s not found in upstream %s"
msgstr "Отдалеченият клон „%s“ липсва в клонираното хранилище „%s“"
-#: builtin/clone.c:968
+#: builtin/clone.c:972
msgid "You appear to have cloned an empty repository."
msgstr "Изглежда клонирахте празно хранилище."
#: builtin/column.c:9
msgid "git column [options]"
-msgstr ""
+msgstr "git column [ОПЦИЯ…]"
#: builtin/column.c:26
msgid "lookup config vars"
-msgstr ""
+msgstr "извеждане на настройките"
#: builtin/column.c:27 builtin/column.c:28
msgid "layout to use"
-msgstr ""
+msgstr "как да се подреди резултата"
#: builtin/column.c:29
msgid "Maximum width"
-msgstr ""
+msgstr "Максимална широчина"
#: builtin/column.c:30
msgid "Padding space on left border"
-msgstr ""
+msgstr "Поле в знаци отляво"
#: builtin/column.c:31
msgid "Padding space on right border"
-msgstr ""
+msgstr "Поле в знаци отдясно"
#: builtin/column.c:32
msgid "Padding space between columns"
-msgstr ""
+msgstr "Поле в знаци между колоните"
#: builtin/column.c:51
msgid "--command must be the first argument"
-msgstr ""
+msgstr "опцията „--command“ трябва да е първият аргумент"
#: builtin/commit.c:36
msgid "git commit [options] [--] <pathspec>..."
-msgstr "git commit [ОПЦИИ] [--] ПЪТ…"
+msgstr "git commit [ОПЦИЯ…] [--] ПЪТ…"
#: builtin/commit.c:41
msgid "git status [options] [--] <pathspec>..."
-msgstr "git status [ОПЦИИ] [--] ПЪТ…"
+msgstr "git status [ОПЦИЯ…] [--] ПЪТ…"
#: builtin/commit.c:46
msgid ""
@@ -4197,90 +4345,99 @@ msgstr ""
msgid "failed to unpack HEAD tree object"
msgstr "неуспешно изваждана на върховото дърво (HEAD tree object) от пакет"
-#: builtin/commit.c:330
+#: builtin/commit.c:328
msgid "unable to create temporary index"
msgstr "неуспешно създаване на временен индекс"
-#: builtin/commit.c:336
+#: builtin/commit.c:334
msgid "interactive add failed"
msgstr "неуспешно интерактивно добавяне"
-#: builtin/commit.c:369 builtin/commit.c:390 builtin/commit.c:440
+#: builtin/commit.c:366 builtin/commit.c:387 builtin/commit.c:435
msgid "unable to write new_index file"
msgstr "неуспешен запис на новия индекс"
-#: builtin/commit.c:421
+#: builtin/commit.c:418
msgid "cannot do a partial commit during a merge."
msgstr "по време на сливане не може да се извърши частично подаване."
-#: builtin/commit.c:423
+#: builtin/commit.c:420
msgid "cannot do a partial commit during a cherry-pick."
msgstr "по време на отбиране не може да се извърши частично подаване."
-#: builtin/commit.c:433
+#: builtin/commit.c:429
msgid "cannot read the index"
msgstr "индексът не може да бъде прочетен"
-#: builtin/commit.c:453
+#: builtin/commit.c:447
msgid "unable to write temporary index file"
msgstr "временният индекс не може да бъде записан"
-#: builtin/commit.c:544 builtin/commit.c:550
+#: builtin/commit.c:557 builtin/commit.c:563
#, c-format
msgid "invalid commit: %s"
msgstr "неправилно подаване: %s"
-#: builtin/commit.c:572
+#: builtin/commit.c:585
msgid "malformed --author parameter"
msgstr "неправилен параметър към опцията „--author“"
#: builtin/commit.c:592
#, c-format
+msgid "invalid date format: %s"
+msgstr "неправилен формат на дата: %s"
+
+#: builtin/commit.c:609
+#, c-format
msgid "Malformed ident string: '%s'"
msgstr "Неправилен низ за идентичност: „%s“"
-#: builtin/commit.c:629 builtin/commit.c:663 builtin/commit.c:1014
+#: builtin/commit.c:642
+msgid ""
+"unable to select a comment character that is not used\n"
+"in the current commit message"
+msgstr ""
+"не може да се избере знак за коментар — в текущото съобщение за подаване са "
+"използвани всички подобни знаци"
+
+#: builtin/commit.c:679 builtin/commit.c:712 builtin/commit.c:1086
#, c-format
msgid "could not lookup commit %s"
msgstr "следното подаване не може да бъде открито: %s"
-#: builtin/commit.c:641 builtin/shortlog.c:273
+#: builtin/commit.c:691 builtin/shortlog.c:273
#, c-format
msgid "(reading log message from standard input)\n"
msgstr "(изчитане на съобщението за подаване от стандартния вход)\n"
-#: builtin/commit.c:643
+#: builtin/commit.c:693
msgid "could not read log from standard input"
msgstr "съобщението за подаване не бе прочетено стандартния вход"
-#: builtin/commit.c:647
+#: builtin/commit.c:697
#, c-format
msgid "could not read log file '%s'"
msgstr "файлът със съобщението за подаване „%s“ не може да бъде прочетен"
-#: builtin/commit.c:654
-msgid "commit has empty message"
-msgstr "подаване с празно съобщение"
-
-#: builtin/commit.c:670
+#: builtin/commit.c:719
msgid "could not read MERGE_MSG"
msgstr "съобщението за сливане MERGE_MSG не може да бъде прочетено"
-#: builtin/commit.c:674
+#: builtin/commit.c:723
msgid "could not read SQUASH_MSG"
msgstr "съобщението за смачкване SQUASH_MSG не може да бъде прочетено"
-#: builtin/commit.c:678
+#: builtin/commit.c:727
#, c-format
msgid "could not read '%s'"
msgstr "файлът „%s“ не може да бъде прочетен"
-#: builtin/commit.c:749
+#: builtin/commit.c:798
msgid "could not write commit template"
msgstr "шаблонът за подаване не може да бъде запазен"
# FIXME
-#: builtin/commit.c:764
+#: builtin/commit.c:816
#, c-format
msgid ""
"\n"
@@ -4296,7 +4453,7 @@ msgstr ""
"и опитайте отново.\n"
# FIXME
-#: builtin/commit.c:769
+#: builtin/commit.c:821
#, c-format
msgid ""
"\n"
@@ -4312,16 +4469,16 @@ msgstr ""
" %s\n"
"и опитайте отново.\n"
-#: builtin/commit.c:782
+#: builtin/commit.c:834
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
"with '%c' will be ignored, and an empty message aborts the commit.\n"
msgstr ""
"Въведете съобщението за подаване на промените. Редовете, които започват\n"
-"с „%c“ ще бъдат филтрирани, а празно съобщение отменя подаването.\n"
+"с „%c“, ще бъдат пропуснати, а празно съобщение преустановява подаването.\n"
-#: builtin/commit.c:789
+#: builtin/commit.c:841
#, c-format
msgid ""
"Please enter the commit message for your changes. Lines starting\n"
@@ -4329,154 +4486,158 @@ msgid ""
"An empty message aborts the commit.\n"
msgstr ""
"Въведете съобщението за подаване на промените. Редовете, които започват\n"
-"с „%c“ НЯМА да бъдат филтрирани, може да ги изтриете вие. Празно \n"
-"съобщение отменя подаването.\n"
+"с „%c“, също ще бъдат включени — може да ги изтриете вие. Празно \n"
+"съобщение преустановява подаването.\n"
-#: builtin/commit.c:802
+#: builtin/commit.c:855
#, c-format
-msgid "%sAuthor: %s"
-msgstr "%sАвтор: %s"
+msgid "%sAuthor: %.*s <%.*s>"
+msgstr "%sАвтор: %.*s <%.*s>"
-#: builtin/commit.c:809
+#: builtin/commit.c:863
#, c-format
-msgid "%sCommitter: %s"
-msgstr "%sПодаващ: %s"
+msgid "%sDate: %s"
+msgstr "%sДата: %s"
-#: builtin/commit.c:829
+#: builtin/commit.c:870
+#, c-format
+msgid "%sCommitter: %.*s <%.*s>"
+msgstr "%sПодаващ: %.*s <%.*s>"
+
+#: builtin/commit.c:888
msgid "Cannot read index"
msgstr "Индексът не може да бъде прочетен"
-#: builtin/commit.c:872
+#: builtin/commit.c:945
msgid "Error building trees"
msgstr "Грешка при изграждане на дърветата"
-#: builtin/commit.c:887 builtin/tag.c:391
+#: builtin/commit.c:960 builtin/tag.c:495
#, c-format
msgid "Please supply the message using either -m or -F option.\n"
msgstr "Подайте съобщението с някоя от опциите „-m“ или „-F“.\n"
-#: builtin/commit.c:989
+#: builtin/commit.c:1061
#, c-format
msgid "No existing author found with '%s'"
msgstr "Не е открит автор с име „%s“."
-#: builtin/commit.c:1004 builtin/commit.c:1244
+#: builtin/commit.c:1076 builtin/commit.c:1316
#, c-format
msgid "Invalid untracked files mode '%s'"
msgstr "Неправилна стойност за неследените файлове: „%s“"
-#: builtin/commit.c:1041
+#: builtin/commit.c:1113
msgid "--long and -z are incompatible"
msgstr "Опциите „--long“ и „-z“ са несъвместими."
-#: builtin/commit.c:1071
+#: builtin/commit.c:1143
msgid "Using both --reset-author and --author does not make sense"
msgstr "Опциите „--reset-author“ и „--author“ са несъвместими."
-#: builtin/commit.c:1080
+#: builtin/commit.c:1152
msgid "You have nothing to amend."
msgstr "Няма какво да бъде поправено."
-#: builtin/commit.c:1083
+#: builtin/commit.c:1155
msgid "You are in the middle of a merge -- cannot amend."
msgstr "В момента се извършва сливане, не можете да поправяте."
-#: builtin/commit.c:1085
+#: builtin/commit.c:1157
msgid "You are in the middle of a cherry-pick -- cannot amend."
msgstr "В момента се извършва отбиране на подаване, не можете да поправяте."
-#: builtin/commit.c:1088
+#: builtin/commit.c:1160
msgid "Options --squash and --fixup cannot be used together"
msgstr "Опциите „--squash“ и „--fixup“ са несъвместими."
-#: builtin/commit.c:1098
+#: builtin/commit.c:1170
msgid "Only one of -c/-C/-F/--fixup can be used."
-msgstr ""
-"Можете да използвате само една от опциите „-c“, „-C“, „-F“ и „--fixup“."
+msgstr "Опциите „-c“, „-C“, „-F“ и „--fixup““ са несъвместими."
-#: builtin/commit.c:1100
+#: builtin/commit.c:1172
msgid "Option -m cannot be combined with -c/-C/-F/--fixup."
msgstr "Опцията „-m“ е несъвместима с „-c“, „-C“, „-F“ и „--fixup“."
-#: builtin/commit.c:1108
+#: builtin/commit.c:1180
msgid "--reset-author can be used only with -C, -c or --amend."
msgstr ""
"Опцията „--reset-author“ може да се използва само заедно с „-C“, „-c“ или\n"
"„--amend“."
-#: builtin/commit.c:1125
+#: builtin/commit.c:1197
msgid "Only one of --include/--only/--all/--interactive/--patch can be used."
msgstr ""
"Опциите „--include“, „--only“, „--all“, „--interactive“ и „--patch“ са\n"
"несъвместими."
-#: builtin/commit.c:1127
+#: builtin/commit.c:1199
msgid "No paths with --include/--only does not make sense."
msgstr "Опциите „--include“ и „--only“ изискват аргументи."
# FIXME bad message
-#: builtin/commit.c:1129
+#: builtin/commit.c:1201
msgid "Clever... amending the last one with dirty index."
msgstr ""
-"Поправяте последното подаване докато индекса има проблеми. Това е лоша идея."
+"Поправяте последното подаване докато индексът има проблеми. Това е лоша идея."
-#: builtin/commit.c:1131
+#: builtin/commit.c:1203
msgid "Explicit paths specified without -i or -o; assuming --only paths..."
msgstr ""
"Зададени са изрични пътища без опциите „-i“ или „-o“. Приема се, че все едно "
"сте\n"
"ползвали опцията „--only“ с ПЪТища…"
-#: builtin/commit.c:1143 builtin/tag.c:639
+#: builtin/commit.c:1215 builtin/tag.c:727
#, c-format
msgid "Invalid cleanup mode %s"
msgstr "Несъществуващ режим на изчистване „%s“"
-#: builtin/commit.c:1148
+#: builtin/commit.c:1220
msgid "Paths with -a does not make sense."
-msgstr "Използването на пътища е несъвместимо със задаването на опцията „-a“."
+msgstr "Опцията „-a“ е несъвместима със задаването на пътища."
-#: builtin/commit.c:1258 builtin/commit.c:1516
+#: builtin/commit.c:1330 builtin/commit.c:1595
msgid "show status concisely"
msgstr "кратка информация за състоянието"
-#: builtin/commit.c:1260 builtin/commit.c:1518
+#: builtin/commit.c:1332 builtin/commit.c:1597
msgid "show branch information"
msgstr "информация за клоните"
-#: builtin/commit.c:1262 builtin/commit.c:1520 builtin/push.c:490
+#: builtin/commit.c:1334 builtin/commit.c:1599 builtin/push.c:489
msgid "machine-readable output"
msgstr "формат на изхода за четене от програма"
-#: builtin/commit.c:1265 builtin/commit.c:1522
+#: builtin/commit.c:1337 builtin/commit.c:1601
msgid "show status in long format (default)"
msgstr "подробна информация за състоянието (стандартно)"
-#: builtin/commit.c:1268 builtin/commit.c:1525
+#: builtin/commit.c:1340 builtin/commit.c:1604
msgid "terminate entries with NUL"
msgstr "разделяне на елементите с нулевия знак „NUL“"
-#: builtin/commit.c:1270 builtin/commit.c:1528 builtin/fast-export.c:674
-#: builtin/fast-export.c:677 builtin/tag.c:514
+#: builtin/commit.c:1342 builtin/commit.c:1607 builtin/fast-export.c:703
+#: builtin/fast-export.c:706 builtin/tag.c:602
msgid "mode"
msgstr "режим"
-#: builtin/commit.c:1271 builtin/commit.c:1528
+#: builtin/commit.c:1343 builtin/commit.c:1607
msgid "show untracked files, optional modes: all, normal, no. (Default: all)"
msgstr ""
"извеждане на неследените файлове. Възможните режими са „all“ (подробна\n"
"информация), „normal“ (кратка информация), „no“ (без неследените файлове).\n"
"Стандартният режим е: „all“."
-#: builtin/commit.c:1274
+#: builtin/commit.c:1346
msgid "show ignored files"
msgstr "извеждане на игнорираните файлове"
-#: builtin/commit.c:1275 parse-options.h:153
+#: builtin/commit.c:1347 parse-options.h:153
msgid "when"
msgstr "кога"
-#: builtin/commit.c:1276
+#: builtin/commit.c:1348
msgid ""
"ignore changes to submodules, optional when: all, dirty, untracked. "
"(Default: all)"
@@ -4485,233 +4646,233 @@ msgstr ""
"една от\n"
"„all“ (всички), „dirty“ (тези с неподадени промени), „untracked“ (неследени)"
-#: builtin/commit.c:1278
+#: builtin/commit.c:1350
msgid "list untracked files in columns"
msgstr "извеждане на неследените файлове в колони"
-#: builtin/commit.c:1347
+#: builtin/commit.c:1419
msgid "couldn't look up newly created commit"
msgstr "току що създаденото подаване не може да бъде открито"
-#: builtin/commit.c:1349
+#: builtin/commit.c:1421
msgid "could not parse newly created commit"
msgstr "току що създаденото подаване не може да бъде анализирано"
-#: builtin/commit.c:1390
+#: builtin/commit.c:1469
msgid "detached HEAD"
-msgstr "несвързан връх HEAD"
+msgstr "несвързан връх „HEAD“"
-#: builtin/commit.c:1392
+#: builtin/commit.c:1471
msgid " (root-commit)"
msgstr " (начално подаване)"
-#: builtin/commit.c:1486
+#: builtin/commit.c:1565
msgid "suppress summary after successful commit"
msgstr "без информация след успешно подаване"
-#: builtin/commit.c:1487
+#: builtin/commit.c:1566
msgid "show diff in commit message template"
msgstr "добавяне на разликата към шаблона за съобщението при подаване"
-#: builtin/commit.c:1489
+#: builtin/commit.c:1568
msgid "Commit message options"
msgstr "Опции за съобщението при подаване"
-#: builtin/commit.c:1490 builtin/tag.c:512
+#: builtin/commit.c:1569 builtin/tag.c:600
msgid "read message from file"
-msgstr "взимане та съобщението от файл"
+msgstr "взимане на съобщението от файл"
-#: builtin/commit.c:1491
+#: builtin/commit.c:1570
msgid "author"
msgstr "автор"
-#: builtin/commit.c:1491
+#: builtin/commit.c:1570
msgid "override author for commit"
msgstr "задаване на автор за подаването"
-#: builtin/commit.c:1492 builtin/gc.c:272
+#: builtin/commit.c:1571 builtin/gc.c:286
msgid "date"
msgstr "дата"
-#: builtin/commit.c:1492
+#: builtin/commit.c:1571
msgid "override date for commit"
msgstr "задаване на дата за подаването"
-#: builtin/commit.c:1493 builtin/merge.c:216 builtin/notes.c:409
-#: builtin/notes.c:566 builtin/tag.c:510
+#: builtin/commit.c:1572 builtin/merge.c:216 builtin/notes.c:409
+#: builtin/notes.c:566 builtin/tag.c:598
msgid "message"
msgstr "съобщение"
-#: builtin/commit.c:1493
+#: builtin/commit.c:1572
msgid "commit message"
msgstr "съобщение при подаване"
-#: builtin/commit.c:1494
+#: builtin/commit.c:1573
msgid "reuse and edit message from specified commit"
msgstr "преизползване и редактиране на съобщението от указаното подаване"
-#: builtin/commit.c:1495
+#: builtin/commit.c:1574
msgid "reuse message from specified commit"
msgstr "преизползване на съобщението от указаното подаване"
-#: builtin/commit.c:1496
+#: builtin/commit.c:1575
msgid "use autosquash formatted message to fixup specified commit"
msgstr ""
"използване на автоматичното съобщение при смачкване за вкарване на "
"указаното\n"
"подаване в предното без следа"
-#: builtin/commit.c:1497
+#: builtin/commit.c:1576
msgid "use autosquash formatted message to squash specified commit"
msgstr ""
"използване на автоматичното съобщение при смачкване за смачкване на "
"указаното\n"
"подаване в предното"
-#: builtin/commit.c:1498
+#: builtin/commit.c:1577
msgid "the commit is authored by me now (used with -C/-c/--amend)"
msgstr ""
"смяна на автора да съвпада с подаващия (използва се с „-C“/„-c“/„--amend“)"
-#: builtin/commit.c:1499 builtin/log.c:1180 builtin/revert.c:86
+#: builtin/commit.c:1578 builtin/log.c:1188 builtin/revert.c:86
msgid "add Signed-off-by:"
msgstr "добавяне на поле за подпис — „Signed-off-by:“"
-#: builtin/commit.c:1500
+#: builtin/commit.c:1579
msgid "use specified template file"
msgstr "използване на указания шаблонен файл"
-#: builtin/commit.c:1501
+#: builtin/commit.c:1580
msgid "force edit of commit"
msgstr "редактиране на подаване"
-#: builtin/commit.c:1502
+#: builtin/commit.c:1581
msgid "default"
msgstr "стандартно"
-#: builtin/commit.c:1502 builtin/tag.c:515
+#: builtin/commit.c:1581 builtin/tag.c:603
msgid "how to strip spaces and #comments from message"
msgstr "кои празни знаци и #коментари да се махат от съобщенията"
-#: builtin/commit.c:1503
+#: builtin/commit.c:1582
msgid "include status in commit message template"
msgstr "вмъкване на състоянието в шаблона за съобщението при подаване"
-#: builtin/commit.c:1504 builtin/merge.c:223 builtin/revert.c:92
-#: builtin/tag.c:516
+#: builtin/commit.c:1583 builtin/merge.c:223 builtin/revert.c:92
+#: builtin/tag.c:604
msgid "key-id"
msgstr "ИДЕНТИФИКАТОР_НА_КЛЮЧ"
-#: builtin/commit.c:1505 builtin/merge.c:224 builtin/revert.c:93
+#: builtin/commit.c:1584 builtin/merge.c:224 builtin/revert.c:93
msgid "GPG sign commit"
msgstr "подписване на подаването с GPG"
-#: builtin/commit.c:1508
+#: builtin/commit.c:1587
msgid "Commit contents options"
msgstr "Опции за избор на файлове при подаване"
-#: builtin/commit.c:1509
+#: builtin/commit.c:1588
msgid "commit all changed files"
msgstr "подаване на всички променени файлове"
-#: builtin/commit.c:1510
+#: builtin/commit.c:1589
msgid "add specified files to index for commit"
msgstr "добавяне на указаните файлове към индекса за подаване"
-#: builtin/commit.c:1511
+#: builtin/commit.c:1590
msgid "interactively add files"
msgstr "интерактивно добавяне на файлове"
-#: builtin/commit.c:1512
+#: builtin/commit.c:1591
msgid "interactively add changes"
msgstr "интерактивно добавяне на промени"
-#: builtin/commit.c:1513
+#: builtin/commit.c:1592
msgid "commit only specified files"
msgstr "подаване само на указаните файлове"
-#: builtin/commit.c:1514
+#: builtin/commit.c:1593
msgid "bypass pre-commit hook"
msgstr "без изпълнение на куката преди подаване (pre-commit)"
-#: builtin/commit.c:1515
+#: builtin/commit.c:1594
msgid "show what would be committed"
msgstr "отпечатване на това, което би било подадено"
-#: builtin/commit.c:1526
+#: builtin/commit.c:1605
msgid "amend previous commit"
msgstr "поправяне на предишното подаване"
-#: builtin/commit.c:1527
+#: builtin/commit.c:1606
msgid "bypass post-rewrite hook"
msgstr "без изпълнение на куката след презаписване (post-rewrite)"
-#: builtin/commit.c:1532
+#: builtin/commit.c:1611
msgid "ok to record an empty change"
msgstr "позволяване на празни подавания"
-#: builtin/commit.c:1534
+#: builtin/commit.c:1613
msgid "ok to record a change with an empty message"
msgstr "позволяване на подавания с празни съобщения"
-#: builtin/commit.c:1562
+#: builtin/commit.c:1641
msgid "could not parse HEAD commit"
msgstr "върховото подаване „HEAD“ не може да бъде прочетено"
-#: builtin/commit.c:1601 builtin/merge.c:518
+#: builtin/commit.c:1680 builtin/merge.c:518
#, c-format
msgid "could not open '%s' for reading"
msgstr "файлът не може да бъде прочетен: „%s“"
-#: builtin/commit.c:1608
+#: builtin/commit.c:1687
#, c-format
msgid "Corrupt MERGE_HEAD file (%s)"
msgstr "Повреден файл за върха за сливането „MERGE_HEAD“ (%s)"
-#: builtin/commit.c:1615
+#: builtin/commit.c:1694
msgid "could not read MERGE_MODE"
msgstr "режимът на сливане „MERGE_MODE“ не може да бъде прочетен"
-#: builtin/commit.c:1634
+#: builtin/commit.c:1713
#, c-format
msgid "could not read commit message: %s"
msgstr "съобщението за подаване не може да бъде прочетено: %s"
-#: builtin/commit.c:1645
+#: builtin/commit.c:1724
#, c-format
msgid "Aborting commit; you did not edit the message.\n"
msgstr "Неизвършване на подаване поради нередактирано съобщение.\n"
-#: builtin/commit.c:1650
+#: builtin/commit.c:1729
#, c-format
msgid "Aborting commit due to empty commit message.\n"
msgstr "Неизвършване на подаване поради празно съобщение.\n"
-#: builtin/commit.c:1665 builtin/merge.c:857 builtin/merge.c:882
+#: builtin/commit.c:1744 builtin/merge.c:851 builtin/merge.c:876
msgid "failed to write commit object"
msgstr "обектът за подаването не може да бъде записан"
-#: builtin/commit.c:1686
+#: builtin/commit.c:1756
msgid "cannot lock HEAD ref"
msgstr "указателят към върха „HEAD“ не може да бъде заключен"
-#: builtin/commit.c:1690
+#: builtin/commit.c:1769
msgid "cannot update HEAD ref"
msgstr "указателят към върха „HEAD“ не може да бъде обновен"
-#: builtin/commit.c:1701
+#: builtin/commit.c:1780
msgid ""
"Repository has been updated, but unable to write\n"
"new_index file. Check that disk is not full or quota is\n"
"not exceeded, and then \"git reset HEAD\" to recover."
msgstr ""
"Хранилището е обновено, но новият файл за индекс „new_index“\n"
-"не е записан. Проверете дали не е препълнен диска или не сте\n"
+"не е записан. Проверете дали дискът не е препълнен или не сте\n"
"превишили дисковата си квота. След това изпълнете „git reset HEAD“."
#: builtin/config.c:8
msgid "git config [options]"
-msgstr "git config [ОПЦИИ]"
+msgstr "git config [ОПЦИЯ…]"
#: builtin/config.c:53
msgid "Config file location"
@@ -4804,12 +4965,11 @@ msgstr "настройка"
#: builtin/config.c:72
msgid "find the color configured: [default]"
-msgstr "извеждане на зададения цвят на настройката: [стандартно]"
+msgstr "извеждане на зададения цвят: [стандартно]"
#: builtin/config.c:73
msgid "find the color setting: [stdout-is-tty]"
-msgstr ""
-"извеждане на зададения цвят на настройката: [стандартният изход е терминал]"
+msgstr "извеждане на зададения цвят: [стандартният изход е терминал]"
#: builtin/config.c:74
msgid "Type"
@@ -4855,135 +5015,144 @@ msgstr "извеждане на размерите на обектите във
# FIXME ... instead of *???
#: builtin/describe.c:16
msgid "git describe [options] <commit-ish>*"
-msgstr "git describe [ОПЦИИ] указател към подаване…"
+msgstr "git describe [ОПЦИЯ…] УКАЗАТЕЛ_КЪМ_ПОДАВАНЕ…"
#: builtin/describe.c:17
msgid "git describe [options] --dirty"
-msgstr ""
+msgstr "git describe [ОПЦИЯ…] --dirty"
-#: builtin/describe.c:225
+#: builtin/describe.c:216
#, c-format
msgid "annotated tag %s not available"
-msgstr ""
+msgstr "не съществува анотиран етикет „%s“"
-#: builtin/describe.c:229
+#: builtin/describe.c:220
#, c-format
msgid "annotated tag %s has no embedded name"
-msgstr ""
+msgstr "в анотирания етикет „%s“ липсва вградено име"
-#: builtin/describe.c:231
+#: builtin/describe.c:222
#, c-format
msgid "tag '%s' is really '%s' here"
-msgstr ""
+msgstr "етикетът „%s“ тук е всъщност „%s“"
-#: builtin/describe.c:258
+#: builtin/describe.c:249
#, c-format
msgid "Not a valid object name %s"
-msgstr ""
+msgstr "Неправилно име на обект „%s“"
-#: builtin/describe.c:261
+#: builtin/describe.c:252
#, c-format
msgid "%s is not a valid '%s' object"
-msgstr ""
+msgstr "„%s“ е неправилен обект „%s“"
-#: builtin/describe.c:278
+#: builtin/describe.c:269
#, c-format
msgid "no tag exactly matches '%s'"
-msgstr ""
+msgstr "никой етикет не напасва точно „%s“"
-#: builtin/describe.c:280
+#: builtin/describe.c:271
#, c-format
msgid "searching to describe %s\n"
-msgstr ""
+msgstr "търсене за описание на „%s“\n"
-#: builtin/describe.c:327
+#: builtin/describe.c:318
#, c-format
msgid "finished search at %s\n"
-msgstr ""
+msgstr "търсенето приключи при „%s“\n"
-#: builtin/describe.c:354
+#: builtin/describe.c:345
#, c-format
msgid ""
"No annotated tags can describe '%s'.\n"
"However, there were unannotated tags: try --tags."
msgstr ""
+"Никой анотиран етикет не описва „%s“.\n"
+"Съществуват и неанотирани етикети. Пробвайте с опцията „--tags“."
-#: builtin/describe.c:358
+#: builtin/describe.c:349
#, c-format
msgid ""
"No tags can describe '%s'.\n"
"Try --always, or create some tags."
msgstr ""
+"Никой етикет не описва „%s“.\n"
+"Пробвайте с опцията „--always“ или създайте етикети."
-#: builtin/describe.c:379
+# FIXME - plural
+#: builtin/describe.c:370
#, c-format
msgid "traversed %lu commits\n"
-msgstr ""
+msgstr "претърсени са %lu подавания\n"
-#: builtin/describe.c:382
+#: builtin/describe.c:373
#, c-format
msgid ""
"more than %i tags found; listed %i most recent\n"
"gave up search at %s\n"
msgstr ""
+"открити са над %i етикета, изведени са последните %i,\n"
+"търсенето бе прекратено при „%s“.\n"
-#: builtin/describe.c:404
+#: builtin/describe.c:395
msgid "find the tag that comes after the commit"
-msgstr ""
+msgstr "откриване на етикета, който следва подаване"
-#: builtin/describe.c:405
+#: builtin/describe.c:396
msgid "debug search strategy on stderr"
msgstr ""
+"извеждане на информация за трасиране на стратегията за търсене на "
+"стандартната грешка"
-#: builtin/describe.c:406
+#: builtin/describe.c:397
msgid "use any ref"
-msgstr ""
+msgstr "използване на произволен указател"
-#: builtin/describe.c:407
+#: builtin/describe.c:398
msgid "use any tag, even unannotated"
-msgstr ""
+msgstr "използване на всеки етикет — включително и неанотираните"
-#: builtin/describe.c:408
+#: builtin/describe.c:399
msgid "always use long format"
-msgstr ""
+msgstr "винаги да се ползва дългият формат"
-#: builtin/describe.c:409
+#: builtin/describe.c:400
msgid "only follow first parent"
-msgstr ""
+msgstr "проследяване само на първия родител"
-#: builtin/describe.c:412
+#: builtin/describe.c:403
msgid "only output exact matches"
-msgstr ""
+msgstr "извеждане само на точните съвпадения"
-#: builtin/describe.c:414
+#: builtin/describe.c:405
msgid "consider <n> most recent tags (default: 10)"
msgstr "да се търси само в този БРОЙ последни етикети (стандартно: 10)"
-#: builtin/describe.c:416
+#: builtin/describe.c:407
msgid "only consider tags matching <pattern>"
-msgstr ""
+msgstr "да се търси само измежду етикетите напасващи този ШАБЛОН"
-#: builtin/describe.c:418 builtin/name-rev.c:321
+#: builtin/describe.c:409 builtin/name-rev.c:318
msgid "show abbreviated commit object as fallback"
-msgstr ""
+msgstr "извеждане на съкратено име на обект като резервен вариант"
-#: builtin/describe.c:419
+#: builtin/describe.c:410
msgid "mark"
-msgstr ""
+msgstr "МАРКЕР"
-#: builtin/describe.c:420
+#: builtin/describe.c:411
msgid "append <mark> on dirty working tree (default: \"-dirty\")"
-msgstr ""
+msgstr "добавяне на такъв МАРКЕР на работното дърво (стандартно е „-dirty“)"
-#: builtin/describe.c:438
+#: builtin/describe.c:429
msgid "--long is incompatible with --abbrev=0"
-msgstr ""
+msgstr "Опциите „--long“ и „--abbrev=0“ са несъвместими"
-#: builtin/describe.c:464
+#: builtin/describe.c:455
msgid "No names found, cannot describe anything."
-msgstr ""
+msgstr "Не са открити имена — нищо не може да бъде описано."
-#: builtin/describe.c:484
+#: builtin/describe.c:475
msgid "--dirty is incompatible with commit-ishes"
msgstr "опцията „--dirty“ е несъвместима с указател към подаване"
@@ -5016,305 +5185,320 @@ msgstr "зададени са повече от 2 обекта: „%s“"
msgid "unhandled object '%s' given."
msgstr "зададен е неподдържан обект „%s“."
-#: builtin/fast-export.c:22
+#: builtin/fast-export.c:23
msgid "git fast-export [rev-list-opts]"
-msgstr ""
+msgstr "git fast-export [ОПЦИИ_ЗА_СПИСЪКА_С_ВЕРСИИ]"
-#: builtin/fast-export.c:673
+#: builtin/fast-export.c:702
msgid "show progress after <n> objects"
-msgstr "съобщение за напредъка на всеки такъв БРОЙ обекта"
+msgstr "Съобщение за напредъка на всеки такъв БРОЙ обекта"
-#: builtin/fast-export.c:675
+#: builtin/fast-export.c:704
msgid "select handling of signed tags"
-msgstr ""
+msgstr "Как да се обработват подписаните етикети"
-#: builtin/fast-export.c:678
+#: builtin/fast-export.c:707
msgid "select handling of tags that tag filtered objects"
-msgstr ""
+msgstr "Как да се обработват етикетите на филтрираните обекти"
-#: builtin/fast-export.c:681
+#: builtin/fast-export.c:710
msgid "Dump marks to this file"
-msgstr ""
+msgstr "Запазване на маркерите в този файл"
-#: builtin/fast-export.c:683
+#: builtin/fast-export.c:712
msgid "Import marks from this file"
-msgstr ""
+msgstr "Внасяне на маркерите от този файл"
-#: builtin/fast-export.c:685
+#: builtin/fast-export.c:714
msgid "Fake a tagger when tags lack one"
-msgstr ""
+msgstr "Да се използва изкуствено име на човек при липса на задаващ етикета"
-#: builtin/fast-export.c:687
+#: builtin/fast-export.c:716
msgid "Output full tree for each commit"
-msgstr ""
+msgstr "Извеждане на цялото дърво за всяко подаване"
-#: builtin/fast-export.c:689
+#: builtin/fast-export.c:718
msgid "Use the done feature to terminate the stream"
-msgstr ""
+msgstr "Използване на маркер за завършване на потока"
-#: builtin/fast-export.c:690
+#: builtin/fast-export.c:719
msgid "Skip output of blob data"
-msgstr ""
+msgstr "Без извеждане на съдържанието на обектите BLOB"
+
+#: builtin/fast-export.c:720
+msgid "refspec"
+msgstr "указател на версия"
+
+#: builtin/fast-export.c:721
+msgid "Apply refspec to exported refs"
+msgstr "Прилагане на указателя на версия към изнесените указатели"
#: builtin/fetch.c:20
msgid "git fetch [<options>] [<repository> [<refspec>...]]"
-msgstr "git fetch [ОПЦИИ] [ХРАНИЛИЩЕ [УКАЗАТЕЛ…]]"
+msgstr "git fetch [ОПЦИЯ…] [ХРАНИЛИЩЕ [УКАЗАТЕЛ…]]"
#: builtin/fetch.c:21
msgid "git fetch [<options>] <group>"
-msgstr "git fetch [ОПЦИИ] ГРУПА"
+msgstr "git fetch [ОПЦИЯ…] ГРУПА"
#: builtin/fetch.c:22
msgid "git fetch --multiple [<options>] [(<repository> | <group>)...]"
-msgstr "git fetch --multiple [ОПЦИИ] [(ХРАНИЛИЩЕ | ГРУПА)…]"
+msgstr "git fetch --multiple [ОПЦИЯ…] [(ХРАНИЛИЩЕ | ГРУПА)…]"
#: builtin/fetch.c:23
msgid "git fetch --all [<options>]"
-msgstr "git fetch --all [ОПЦИИ]"
+msgstr "git fetch --all [ОПЦИЯ…]"
-#: builtin/fetch.c:75
+#: builtin/fetch.c:90
msgid "fetch from all remotes"
msgstr "доставяне от всички отдалечени хранилища"
-#: builtin/fetch.c:77
+#: builtin/fetch.c:92
msgid "append to .git/FETCH_HEAD instead of overwriting"
-msgstr "добавяне към вместо замяна на „.git/FETCH_HEAD“"
+msgstr "добавяне към „.git/FETCH_HEAD“ вместо замяна"
-#: builtin/fetch.c:79
+#: builtin/fetch.c:94
msgid "path to upload pack on remote end"
msgstr "отдалечен път, където да се качи пакетът"
-#: builtin/fetch.c:80
+#: builtin/fetch.c:95
msgid "force overwrite of local branch"
msgstr "принудително презаписване на локалния клон"
-#: builtin/fetch.c:82
+#: builtin/fetch.c:97
msgid "fetch from multiple remotes"
msgstr "доставяне от множество отдалечени хранилища"
-#: builtin/fetch.c:84
+#: builtin/fetch.c:99
msgid "fetch all tags and associated objects"
msgstr "доставяне на всички етикети и принадлежащи обекти"
-#: builtin/fetch.c:86
+#: builtin/fetch.c:101
msgid "do not fetch all tags (--no-tags)"
msgstr "без доставянето на всички етикети „--no-tags“"
-#: builtin/fetch.c:88
+#: builtin/fetch.c:103
msgid "prune remote-tracking branches no longer on remote"
-msgstr "окастряне на клоните следящи вече не съществуващи отдалечени клони"
+msgstr "окастряне на клоните следящи вече несъществуващи отдалечени клони"
-#: builtin/fetch.c:89
+#: builtin/fetch.c:104
msgid "on-demand"
msgstr "при нужда"
-#: builtin/fetch.c:90
+#: builtin/fetch.c:105
msgid "control recursive fetching of submodules"
msgstr "управление на рекурсивното доставяне на подмодулите"
-#: builtin/fetch.c:94
+#: builtin/fetch.c:109
msgid "keep downloaded pack"
msgstr "запазване на изтеглените пакети с обекти"
-#: builtin/fetch.c:96
+#: builtin/fetch.c:111
msgid "allow updating of HEAD ref"
msgstr "позволяване на обновяването на указателя „HEAD“"
-#: builtin/fetch.c:99
+#: builtin/fetch.c:114
msgid "deepen history of shallow clone"
msgstr "задълбочаване на историята на плитко хранилище"
-#: builtin/fetch.c:101
+#: builtin/fetch.c:116
msgid "convert to a complete repository"
msgstr "превръщане в пълно хранилище"
-#: builtin/fetch.c:103 builtin/log.c:1197
+#: builtin/fetch.c:118 builtin/log.c:1205
msgid "dir"
msgstr "директория"
-#: builtin/fetch.c:104
+#: builtin/fetch.c:119
msgid "prepend this to submodule path output"
msgstr "добавяне на това пред пътя на подмодула"
-#: builtin/fetch.c:107
+#: builtin/fetch.c:122
msgid "default mode for recursion"
msgstr "стандартен режим на рекурсия"
-#: builtin/fetch.c:109
+#: builtin/fetch.c:124
msgid "accept refs that update .git/shallow"
msgstr "приемане на указатели, които обновяват „.git/shallow“"
-#: builtin/fetch.c:347
+#: builtin/fetch.c:125
+msgid "refmap"
+msgstr "карта с указатели"
+
+#: builtin/fetch.c:126
+msgid "specify fetch refmap"
+msgstr "указване на картата с указатели за доставяне"
+
+#: builtin/fetch.c:376
msgid "Couldn't find remote ref HEAD"
msgstr "Указателят „HEAD“ в отдалеченото хранилище не може да бъде открит"
-#: builtin/fetch.c:411
+#: builtin/fetch.c:440
#, c-format
msgid "object %s not found"
msgstr "обектът „%s“ липсва"
-#: builtin/fetch.c:416
+#: builtin/fetch.c:445
msgid "[up to date]"
msgstr "[актуализиран]"
-# FIXME - the signs
-#: builtin/fetch.c:430
+#: builtin/fetch.c:459
#, c-format
msgid "! %-*s %-*s -> %s (can't fetch in current branch)"
-msgstr "! %-*s %-*s -> %s (в текущия клон не може да се доставя)"
+msgstr "! %-*s %-*s → %s (в текущия клон не може да се доставя)"
-#: builtin/fetch.c:431 builtin/fetch.c:517
+#: builtin/fetch.c:460 builtin/fetch.c:546
msgid "[rejected]"
msgstr "[отхвърлен]"
-#: builtin/fetch.c:442
+#: builtin/fetch.c:471
msgid "[tag update]"
msgstr "[обновяване на етикетите]"
-#: builtin/fetch.c:444 builtin/fetch.c:479 builtin/fetch.c:497
+#: builtin/fetch.c:473 builtin/fetch.c:508 builtin/fetch.c:526
msgid " (unable to update local ref)"
msgstr " (локалните указатели не могат да бъдат обновени)"
-#: builtin/fetch.c:462
+#: builtin/fetch.c:491
msgid "[new tag]"
msgstr "[нов етикет]"
-#: builtin/fetch.c:465
+#: builtin/fetch.c:494
msgid "[new branch]"
msgstr "[нов клон]"
-#: builtin/fetch.c:468
+#: builtin/fetch.c:497
msgid "[new ref]"
msgstr "[нов указател]"
-#: builtin/fetch.c:513
+#: builtin/fetch.c:542
msgid "unable to update local ref"
msgstr "локален указател не може да бъде обновен"
-#: builtin/fetch.c:513
+#: builtin/fetch.c:542
msgid "forced update"
msgstr "принудително обновяване"
-#: builtin/fetch.c:519
+#: builtin/fetch.c:548
msgid "(non-fast-forward)"
msgstr "(сливането не е тривиално)"
-#: builtin/fetch.c:552 builtin/fetch.c:785
+#: builtin/fetch.c:581 builtin/fetch.c:814
#, c-format
msgid "cannot open %s: %s\n"
msgstr "файлът „%s“ не може да бъде отворен: %s\n"
-#: builtin/fetch.c:561
+#: builtin/fetch.c:590
#, c-format
msgid "%s did not send all necessary objects\n"
msgstr "хранилището „%s“ не изпрати всички необходими обекти\n"
-#: builtin/fetch.c:579
+#: builtin/fetch.c:608
#, c-format
msgid "reject %s because shallow roots are not allowed to be updated"
msgstr ""
"отхвърляне на върха „%s“, защото плитките хранилища не могат да бъдат "
"обновявани"
-#: builtin/fetch.c:667 builtin/fetch.c:750
+#: builtin/fetch.c:696 builtin/fetch.c:779
#, c-format
msgid "From %.*s\n"
msgstr "От %.*s\n"
-#: builtin/fetch.c:678
+# FIXME - is the space necessary
+#: builtin/fetch.c:707
#, c-format
msgid ""
"some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting branches"
msgstr ""
"някои локални указатели не могат да бъдат обновени. Изпълнете командата\n"
-" „git remote prune %s“, за да премахнете остарелите клони, които "
+"„git remote prune %s“, за да премахнете остарелите клони, които\n"
"предизвикват конфликта"
-#: builtin/fetch.c:730
+#: builtin/fetch.c:759
#, c-format
msgid " (%s will become dangling)"
msgstr " (обектът „%s“ ще се окаже извън клон)"
-#: builtin/fetch.c:731
+#: builtin/fetch.c:760
#, c-format
msgid " (%s has become dangling)"
msgstr " (обектът „%s“ вече е извън клон)"
-#: builtin/fetch.c:755
+#: builtin/fetch.c:784
msgid "[deleted]"
msgstr "[изтрит]"
-#: builtin/fetch.c:756 builtin/remote.c:1050
+#: builtin/fetch.c:785 builtin/remote.c:1059
msgid "(none)"
msgstr "(нищо)"
-#: builtin/fetch.c:775
+#: builtin/fetch.c:804
#, c-format
msgid "Refusing to fetch into current branch %s of non-bare repository"
-msgstr ""
-"Не може да изтегляте в текущия клон „%s“, на хранилище, което не е голо"
+msgstr "Не може да изтегляте в текущия клон „%s“ на хранилище, което не е голо"
-#: builtin/fetch.c:794
+#: builtin/fetch.c:823
#, c-format
msgid "Option \"%s\" value \"%s\" is not valid for %s"
msgstr "Стойността „%2$s“ за опцията „%1$s“ не е съвместима с „%3$s“"
-#: builtin/fetch.c:797
+#: builtin/fetch.c:826
#, c-format
msgid "Option \"%s\" is ignored for %s\n"
msgstr "Опцията „%s“ се игнорира при „%s“\n"
-#: builtin/fetch.c:853
+#: builtin/fetch.c:882
#, c-format
msgid "Don't know how to fetch from %s"
msgstr "Не се поддържа доставяне от „%s“"
-#: builtin/fetch.c:1015
+#: builtin/fetch.c:1044
#, c-format
msgid "Fetching %s\n"
msgstr "Доставяне на „%s“\n"
-#: builtin/fetch.c:1017 builtin/remote.c:90
+#: builtin/fetch.c:1046 builtin/remote.c:90
#, c-format
msgid "Could not fetch %s"
msgstr "„%s“ не може да се достави"
-#: builtin/fetch.c:1035
+#: builtin/fetch.c:1064
msgid ""
"No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."
msgstr ""
"Не сте указали отдалечено хранилище. Задайте или адрес, или име\n"
-"на отдалечено хранилище, от където да се доставят новите версии."
+"на отдалечено хранилище, откъдето да се доставят новите версии."
-#: builtin/fetch.c:1059
+#: builtin/fetch.c:1087
msgid "You need to specify a tag name."
msgstr "Трябва да укажете име на етикет."
-#: builtin/fetch.c:1107
+#: builtin/fetch.c:1131
msgid "--depth and --unshallow cannot be used together"
msgstr "опциите „--depth“ и „--unshallow“ са несъвместими"
-#: builtin/fetch.c:1109
+#: builtin/fetch.c:1133
msgid "--unshallow on a complete repository does not make sense"
msgstr "не можете да използвате опцията „--unshallow“ върху пълно хранилище"
-#: builtin/fetch.c:1132
+#: builtin/fetch.c:1156
msgid "fetch --all does not take a repository argument"
-msgstr "към „git fetch --all“ не можете да добавите хранилище аргумент"
+msgstr "към „git fetch --all“ не можете да добавите аргумент — хранилище"
-#: builtin/fetch.c:1134
+#: builtin/fetch.c:1158
msgid "fetch --all does not make sense with refspecs"
msgstr ""
-"към „git fetch --all“ не можете да добавите указател на версия за аргумент"
+"към „git fetch --all“ не можете да добавите аргумент — указател на версия"
-#: builtin/fetch.c:1145
+#: builtin/fetch.c:1169
#, c-format
msgid "No such remote or remote group: %s"
msgstr "Няма нито отдалечено хранилище, нито група от хранилища на име „%s“"
-#: builtin/fetch.c:1153
+#: builtin/fetch.c:1177
msgid "Fetching a group and specifying refspecs does not make sense"
msgstr "Указването на група и указването на версия са несъвместими"
@@ -5322,9 +5506,9 @@ msgstr "Указването на група и указването на вер
msgid "git fmt-merge-msg [-m <message>] [--log[=<n>]|--no-log] [--file <file>]"
msgstr "git fmt-merge-msg [-m СЪОБЩЕНИЕ] [--log[=БРОЙ]|--no-log] [--file ФАЙЛ]"
-#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:700
-#: builtin/merge.c:196 builtin/repack.c:175 builtin/repack.c:179
-#: builtin/show-branch.c:654 builtin/show-ref.c:178 builtin/tag.c:501
+#: builtin/fmt-merge-msg.c:663 builtin/fmt-merge-msg.c:666 builtin/grep.c:698
+#: builtin/merge.c:196 builtin/repack.c:179 builtin/repack.c:183
+#: builtin/show-branch.c:654 builtin/show-ref.c:178 builtin/tag.c:589
#: parse-options.h:132 parse-options.h:239
msgid "n"
msgstr "БРОЙ"
@@ -5351,154 +5535,155 @@ msgstr "за начало на съобщението да се ползва Т
msgid "file to read from"
msgstr "файл, от който да се чете"
-#: builtin/for-each-ref.c:1063
+#: builtin/for-each-ref.c:1051
msgid "git for-each-ref [options] [<pattern>]"
-msgstr ""
+msgstr "git for-each-ref [ОПЦИЯ…] [ШАБЛОН]"
-#: builtin/for-each-ref.c:1078
+#: builtin/for-each-ref.c:1066
msgid "quote placeholders suitably for shells"
-msgstr ""
+msgstr "цитиране подходящо за командни интерпретатори на обвивката"
-#: builtin/for-each-ref.c:1080
+#: builtin/for-each-ref.c:1068
msgid "quote placeholders suitably for perl"
-msgstr ""
+msgstr "цитиране подходящо за perl"
-#: builtin/for-each-ref.c:1082
+#: builtin/for-each-ref.c:1070
msgid "quote placeholders suitably for python"
-msgstr ""
+msgstr "цитиране подходящо за python"
-#: builtin/for-each-ref.c:1084
+#: builtin/for-each-ref.c:1072
msgid "quote placeholders suitably for tcl"
-msgstr ""
+msgstr "цитиране подходящо за tcl"
-#: builtin/for-each-ref.c:1087
+#: builtin/for-each-ref.c:1075
msgid "show only <n> matched refs"
msgstr "извеждане само на този БРОЙ напаснати указатели"
-#: builtin/for-each-ref.c:1088 builtin/replace.c:177
+#: builtin/for-each-ref.c:1076 builtin/replace.c:435
msgid "format"
msgstr "ФОРМАТ"
-#: builtin/for-each-ref.c:1088
+#: builtin/for-each-ref.c:1076
msgid "format to use for the output"
msgstr "ФОРМАТ за изхода"
-#: builtin/for-each-ref.c:1089
+#: builtin/for-each-ref.c:1077
msgid "key"
-msgstr ""
+msgstr "ключ"
-#: builtin/for-each-ref.c:1090
+#: builtin/for-each-ref.c:1078
msgid "field name to sort on"
-msgstr ""
+msgstr "име на полето, по което да е подредбата"
#: builtin/fsck.c:147 builtin/prune.c:172
msgid "Checking connectivity"
msgstr "Проверка на връзката"
-#: builtin/fsck.c:544
+#: builtin/fsck.c:538
msgid "Checking object directories"
msgstr "Проверка на директориите с обекти"
-#: builtin/fsck.c:607
+#: builtin/fsck.c:601
msgid "git fsck [options] [<object>...]"
-msgstr "git fsck [ОПЦИИ] [ОБЕКТ…]"
+msgstr "git fsck [ОПЦИЯ…] [ОБЕКТ…]"
-#: builtin/fsck.c:613
+#: builtin/fsck.c:607
msgid "show unreachable objects"
msgstr "показване на недостижимите обекти"
-#: builtin/fsck.c:614
+#: builtin/fsck.c:608
msgid "show dangling objects"
msgstr "показване на обектите извън клоните"
-#: builtin/fsck.c:615
+#: builtin/fsck.c:609
msgid "report tags"
msgstr "показване на етикетите"
-#: builtin/fsck.c:616
+#: builtin/fsck.c:610
msgid "report root nodes"
msgstr "показване на кореновите възли"
-#: builtin/fsck.c:617
+#: builtin/fsck.c:611
msgid "make index objects head nodes"
msgstr "задаване на обекти от индекса да са коренови"
# FIXME bad message
-#: builtin/fsck.c:618
+#: builtin/fsck.c:612
msgid "make reflogs head nodes (default)"
msgstr "проследяване на указателите от журнала като глави (стандартно)"
-#: builtin/fsck.c:619
+#: builtin/fsck.c:613
msgid "also consider packs and alternate objects"
msgstr "допълнително да се проверяват пакетите и алтернативните обекти"
-#: builtin/fsck.c:620
+#: builtin/fsck.c:614
msgid "enable more strict checking"
msgstr "по-строги проверки"
-#: builtin/fsck.c:622
+#: builtin/fsck.c:616
msgid "write dangling objects in .git/lost-found"
msgstr "запазване на обектите извън клоните в директорията „.git/lost-found“"
-#: builtin/fsck.c:623 builtin/prune.c:144
+#: builtin/fsck.c:617 builtin/prune.c:144
msgid "show progress"
msgstr "показване на напредъка"
-#: builtin/fsck.c:673
+#: builtin/fsck.c:667
msgid "Checking objects"
msgstr "Проверка на обектите"
+# FIXME plural with ...
#: builtin/gc.c:24
msgid "git gc [options]"
-msgstr "git gc [ОПЦИИ]"
+msgstr "git gc [ОПЦИЯ…]"
-#: builtin/gc.c:90
+#: builtin/gc.c:91
#, c-format
msgid "Invalid %s: '%s'"
msgstr "Неправилна стойност за „%s“: „%s“"
-#: builtin/gc.c:117
+#: builtin/gc.c:118
#, c-format
msgid "insanely long object directory %.*s"
msgstr "прекалено дълга директория с обекти „%.*s“"
-#: builtin/gc.c:273
+#: builtin/gc.c:287
msgid "prune unreferenced objects"
msgstr "окастряне на обектите, към които нищо не сочи"
-#: builtin/gc.c:275
+#: builtin/gc.c:289
msgid "be more thorough (increased runtime)"
msgstr "изчерпателно търсене на боклука (за сметка на повече време работа)"
-#: builtin/gc.c:276
+#: builtin/gc.c:290
msgid "enable auto-gc mode"
msgstr "включване на автоматичното събиране на боклука (auto-gc)"
-#: builtin/gc.c:277
+#: builtin/gc.c:291
msgid "force running gc even if there may be another gc running"
msgstr ""
"изрично стартиране на събирането на боклука, дори и ако вече работи друго "
"събиране"
-#: builtin/gc.c:318
+#: builtin/gc.c:332
#, c-format
msgid "Auto packing the repository in background for optimum performance.\n"
msgstr ""
"Автоматично пакетиране на заден фон на хранилището за по-добра "
"производителност.\n"
-#: builtin/gc.c:320
+#: builtin/gc.c:334
#, c-format
msgid "Auto packing the repository for optimum performance.\n"
msgstr "Автоматично пакетиране на хранилището за по-добра производителност.\n"
-#: builtin/gc.c:321
+#: builtin/gc.c:335
#, c-format
msgid "See \"git help gc\" for manual housekeeping.\n"
msgstr ""
"Вижте ръководството за повече информация как да изпълните „git help gc“.\n"
-#: builtin/gc.c:336
+#: builtin/gc.c:353
#, c-format
msgid ""
"gc is already running on machine '%s' pid %<PRIuMAX> (use --force if not)"
@@ -5507,256 +5692,251 @@ msgstr ""
"процеса: %<PRIuMAX> (ако сте сигурни, че това не е вярно, това използвайте\n"
"опцията „--force“)"
-#: builtin/gc.c:361
+#: builtin/gc.c:375
msgid ""
"There are too many unreachable loose objects; run 'git prune' to remove them."
msgstr ""
-"Има прекалено много недостижими, непакетирани обекти. Използвайте „git "
-"prune“, за да\n"
-"ги окастрите."
+"Има прекалено много недостижими, непакетирани обекти.\n"
+"Използвайте „git prune“, за да ги окастрите."
+# FIXME plural ... options
#: builtin/grep.c:23
msgid "git grep [options] [-e] <pattern> [<rev>...] [[--] <path>...]"
-msgstr "git grep [ОПЦИИ] [-e] ШАБЛОН [ВЕРСИЯ…] [[--] ПЪТ…]"
+msgstr "git grep [ОПЦИЯ…] [-e] ШАБЛОН [ВЕРСИЯ…] [[--] ПЪТ…]"
#: builtin/grep.c:218
#, c-format
msgid "grep: failed to create thread: %s"
msgstr "grep: неуспешно създаване на нишка: %s"
-#: builtin/grep.c:365
-#, c-format
-msgid "Failed to chdir: %s"
-msgstr "Неуспешна смяна на директория: %s"
-
-#: builtin/grep.c:443 builtin/grep.c:478
+#: builtin/grep.c:441 builtin/grep.c:476
#, c-format
msgid "unable to read tree (%s)"
msgstr "дървото не може да бъде прочетено (%s)"
-#: builtin/grep.c:493
+#: builtin/grep.c:491
#, c-format
msgid "unable to grep from object of type %s"
msgstr "не може да се изпълни „grep“ от обект от вида %s"
-#: builtin/grep.c:549
+#: builtin/grep.c:547
#, c-format
msgid "switch `%c' expects a numerical value"
msgstr "опцията „%c“ очаква число за аргумент"
-#: builtin/grep.c:566
+#: builtin/grep.c:564
#, c-format
msgid "cannot open '%s'"
msgstr "„%s“ не може да бъде отворен"
-#: builtin/grep.c:640
+#: builtin/grep.c:638
msgid "search in index instead of in the work tree"
msgstr "търсене в индекса, а не в работното дърво"
-#: builtin/grep.c:642
+#: builtin/grep.c:640
msgid "find in contents not managed by git"
msgstr "търсене и във файловете, които не са под управлението на git"
-#: builtin/grep.c:644
+#: builtin/grep.c:642
msgid "search in both tracked and untracked files"
msgstr "търсене и в следените, и в неследените файлове"
-#: builtin/grep.c:646
+#: builtin/grep.c:644
msgid "search also in ignored files"
msgstr "търсене и в игнорираните файлове"
-#: builtin/grep.c:649
+#: builtin/grep.c:647
msgid "show non-matching lines"
msgstr "извеждане на редовете, които не съвпадат"
-#: builtin/grep.c:651
+#: builtin/grep.c:649
msgid "case insensitive matching"
msgstr "без значение на регистъра на буквите (главни/малки)"
-#: builtin/grep.c:653
+#: builtin/grep.c:651
msgid "match patterns only at word boundaries"
msgstr "напасване на шаблоните само по границите на думите"
-#: builtin/grep.c:655
+#: builtin/grep.c:653
msgid "process binary files as text"
msgstr "обработване на двоичните файлове като текстови"
-#: builtin/grep.c:657
+#: builtin/grep.c:655
msgid "don't match patterns in binary files"
msgstr "прескачане на двоичните файлове"
-#: builtin/grep.c:660
+#: builtin/grep.c:658
msgid "process binary files with textconv filters"
msgstr ""
"обработване на двоичните файлове чрез филтри за преобразуване към текст"
-#: builtin/grep.c:662
+#: builtin/grep.c:660
msgid "descend at most <depth> levels"
msgstr "навлизане максимално на тази ДЪЛБОЧИНА в дървото"
-#: builtin/grep.c:666
+#: builtin/grep.c:664
msgid "use extended POSIX regular expressions"
msgstr "разширени регулярни изрази по POSIX"
-#: builtin/grep.c:669
+#: builtin/grep.c:667
msgid "use basic POSIX regular expressions (default)"
msgstr "основни регулярни изрази по POSIX (стандартно)"
-#: builtin/grep.c:672
+#: builtin/grep.c:670
msgid "interpret patterns as fixed strings"
msgstr "шаблоните са дословни низове"
-#: builtin/grep.c:675
+#: builtin/grep.c:673
msgid "use Perl-compatible regular expressions"
msgstr "регулярни изрази на Perl"
-#: builtin/grep.c:678
+#: builtin/grep.c:676
msgid "show line numbers"
msgstr "извеждане на номерата на редовете"
-#: builtin/grep.c:679
+#: builtin/grep.c:677
msgid "don't show filenames"
msgstr "без извеждане на имената на файловете"
-#: builtin/grep.c:680
+#: builtin/grep.c:678
msgid "show filenames"
msgstr "извеждане на имената на файловете"
-#: builtin/grep.c:682
+#: builtin/grep.c:680
msgid "show filenames relative to top directory"
msgstr ""
"извеждане на относителните имена на файловете спрямо основната директория на "
"хранилището"
-#: builtin/grep.c:684
+#: builtin/grep.c:682
msgid "show only filenames instead of matching lines"
msgstr "извеждане само на имената на файловете без напасващите редове"
-#: builtin/grep.c:686
+#: builtin/grep.c:684
msgid "synonym for --files-with-matches"
msgstr "синоним на „--files-with-matches“"
-#: builtin/grep.c:689
+#: builtin/grep.c:687
msgid "show only the names of files without match"
msgstr ""
"извеждане само на имената на файловете, които не съдържат ред, напасващ на "
"шаблона"
-#: builtin/grep.c:691
+#: builtin/grep.c:689
msgid "print NUL after filenames"
msgstr "извеждане на нулевия знак „NUL“ след всяко име на файл"
-#: builtin/grep.c:693
+#: builtin/grep.c:691
msgid "show the number of matches instead of matching lines"
msgstr "извеждане на броя на съвпаденията вместо напасващите редове"
-#: builtin/grep.c:694
+#: builtin/grep.c:692
msgid "highlight matches"
msgstr "оцветяване на напасванията"
-#: builtin/grep.c:696
+#: builtin/grep.c:694
msgid "print empty line between matches from different files"
msgstr "извеждане на празен ред между напасванията от различни файлове"
-#: builtin/grep.c:698
+#: builtin/grep.c:696
msgid "show filename only once above matches from same file"
msgstr ""
"извеждане на името на файла само веднъж за всички напасвания от този файл"
-#: builtin/grep.c:701
+#: builtin/grep.c:699
msgid "show <n> context lines before and after matches"
msgstr "извеждане на такъв БРОЙ редове преди и след напасванията"
-#: builtin/grep.c:704
+#: builtin/grep.c:702
msgid "show <n> context lines before matches"
msgstr "извеждане на такъв БРОЙ редове преди напасванията"
-#: builtin/grep.c:706
+#: builtin/grep.c:704
msgid "show <n> context lines after matches"
msgstr "извеждане на такъв БРОЙ редове след напасванията"
-#: builtin/grep.c:707
+#: builtin/grep.c:705
msgid "shortcut for -C NUM"
msgstr "синоним на „-C БРОЙ“"
-#: builtin/grep.c:710
+#: builtin/grep.c:708
msgid "show a line with the function name before matches"
msgstr "извеждане на ред с името на функцията, в която е напаснат шаблона"
-#: builtin/grep.c:712
+#: builtin/grep.c:710
msgid "show the surrounding function"
msgstr "извеждане на обхващащата функция"
-#: builtin/grep.c:715
+#: builtin/grep.c:713
msgid "read patterns from file"
msgstr "изчитане на шаблоните от файл"
-#: builtin/grep.c:717
+#: builtin/grep.c:715
msgid "match <pattern>"
msgstr "напасване на ШАБЛОН"
-#: builtin/grep.c:719
+#: builtin/grep.c:717
msgid "combine patterns specified with -e"
msgstr "комбиниране на шаблоните указани с опцията „-e“"
-#: builtin/grep.c:731
+#: builtin/grep.c:729
msgid "indicate hit with exit status without output"
msgstr ""
"без извеждане на стандартния изход. Изходният код указва наличието на "
"напасване"
-#: builtin/grep.c:733
+#: builtin/grep.c:731
msgid "show only matches from files that match all patterns"
msgstr ""
"извеждане на редове само от файловете, които напасват на всички шаблони"
-#: builtin/grep.c:735
+#: builtin/grep.c:733
msgid "show parse tree for grep expression"
msgstr "извеждане на дървото за анализ на регулярния израз"
-#: builtin/grep.c:739
+#: builtin/grep.c:737
msgid "pager"
-msgstr "програма за обхождане"
+msgstr "програма за преглед по страници"
-#: builtin/grep.c:739
+#: builtin/grep.c:737
msgid "show matching files in the pager"
-msgstr "извеждане на съвпадащите файлове в програма за обхождане"
+msgstr "извеждане на съвпадащите файлове в програма за преглед по страници"
-#: builtin/grep.c:742
+#: builtin/grep.c:740
msgid "allow calling of grep(1) (ignored by this build)"
msgstr ""
"позволяване на стартирането на grep(1) (текущият компилат пренебрегва тази "
"опция)"
-#: builtin/grep.c:743 builtin/show-ref.c:187
+#: builtin/grep.c:741 builtin/show-ref.c:187
msgid "show usage"
msgstr "извеждане на начина на употреба на командата"
-#: builtin/grep.c:810
+#: builtin/grep.c:808
msgid "no pattern given."
msgstr "липсва шаблон."
-#: builtin/grep.c:868
+#: builtin/grep.c:866
msgid "--open-files-in-pager only works on the worktree"
msgstr ""
"опцията „--open-files-in-pager“ е съвместима само с търсене в работното дърво"
-#: builtin/grep.c:891
+#: builtin/grep.c:892
msgid "--cached or --untracked cannot be used with --no-index."
msgstr "опциите „--cached“ и „--untracked“ са несъвместими с „--no-index“."
-#: builtin/grep.c:896
+#: builtin/grep.c:897
msgid "--no-index or --untracked cannot be used with revs."
msgstr ""
"опциите „--cached“ и „--untracked“ са несъвместими с търсене във версии."
-#: builtin/grep.c:899
+#: builtin/grep.c:900
msgid "--[no-]exclude-standard cannot be used for tracked contents."
msgstr ""
"опциите „--(no-)exclude-standard“ са несъвместими с търсене по следени "
"файлове."
-#: builtin/grep.c:907
+#: builtin/grep.c:908
msgid "both --cached and trees are given."
msgstr "опцията „--cached“ е несъвместима със задаване на дърво."
@@ -5765,34 +5945,36 @@ msgid ""
"git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] "
"<file>..."
msgstr ""
+"git hash-object [-t ВИД] [-w] [--path=ФАЙЛ|--no-filters] [--stdin] [--] ФАЙЛ…"
+# FIXME - list of paths or path...
#: builtin/hash-object.c:61
msgid "git hash-object --stdin-paths < <list-of-paths>"
-msgstr ""
+msgstr "git hash-object --stdin-paths < ПЪТ…"
-#: builtin/hash-object.c:72 builtin/tag.c:521
+#: builtin/hash-object.c:72 builtin/tag.c:609
msgid "type"
-msgstr ""
+msgstr "ВИД"
#: builtin/hash-object.c:72
msgid "object type"
-msgstr ""
+msgstr "вид на обекта"
#: builtin/hash-object.c:73
msgid "write the object into the object database"
-msgstr ""
+msgstr "записване на обекта в базата от данни за обектите"
#: builtin/hash-object.c:74
msgid "read the object from stdin"
-msgstr ""
+msgstr "изчитане на обекта от стандартния вход"
#: builtin/hash-object.c:76
msgid "store file as is without filters"
-msgstr ""
+msgstr "запазване на файла както е — без филтри"
#: builtin/hash-object.c:77
msgid "process file as it were from this path"
-msgstr ""
+msgstr "обработване на файла все едно е с този път"
#: builtin/help.c:41
msgid "print all available commands"
@@ -5847,7 +6029,7 @@ msgid ""
"'%s': path for unsupported man viewer.\n"
"Please consider using 'man.<tool>.cmd' instead."
msgstr ""
-"„%s“: път към неподдържана програма за разглеждане на\n"
+"„%s“: път към неподдържана програма за преглед на\n"
" ръководството. Вместо нея пробвайте „man.<tool>.cmd“."
#: builtin/help.c:228
@@ -5856,7 +6038,7 @@ msgid ""
"'%s': cmd for supported man viewer.\n"
"Please consider using 'man.<tool>.path' instead."
msgstr ""
-"„%s“: команда за поддържана програма за разглеждане на\n"
+"„%s“: команда за поддържана програма за преглед на\n"
" ръководството. Вместо нея пробвайте „man.<tool>.path“."
#: builtin/help.c:353
@@ -5866,11 +6048,13 @@ msgstr "„%s“: непозната програма за преглед на
#: builtin/help.c:370
msgid "no man viewer handled the request"
-msgstr "никоя програма за ръководство не успя да обработи заявката"
+msgstr "никоя програма за преглед на ръководство не успя да обработи заявката"
#: builtin/help.c:378
msgid "no info viewer handled the request"
-msgstr "никоя програма за информационни страници не успя да обработи заявката"
+msgstr ""
+"никоя програма за преглед на информационните страници не успя да обработи "
+"заявката"
#: builtin/help.c:424
msgid "Defining attributes per path"
@@ -5914,367 +6098,394 @@ msgstr "употреба: %s%s"
msgid "`git %s' is aliased to `%s'"
msgstr "„git %s“ е синоним на „%s“"
-#: builtin/index-pack.c:184
+# FIXME merge with next?
+#: builtin/index-pack.c:145
+#, c-format
+msgid "unable to open %s"
+msgstr "обектът „%s“ не може да бъде отворен"
+
+#: builtin/index-pack.c:191
#, c-format
msgid "object type mismatch at %s"
-msgstr ""
+msgstr "неправилен вид на обекта „%s“"
-#: builtin/index-pack.c:204
-msgid "object of unexpected type"
-msgstr ""
+#: builtin/index-pack.c:211
+#, c-format
+msgid "did not receive expected object %s"
+msgstr "очакваният обект „%s“ не бе получен"
-#: builtin/index-pack.c:244
+#: builtin/index-pack.c:214
+#, c-format
+msgid "object %s: expected type %s, found %s"
+msgstr "неправилен вид на обекта „%s“: очакваше се „%s“, а бе получен „%s“"
+
+#: builtin/index-pack.c:256
#, c-format
msgid "cannot fill %d byte"
msgid_plural "cannot fill %d bytes"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "не може да се запълни %d байт"
+msgstr[1] "не може да се запълнят %d байта"
-#: builtin/index-pack.c:254
+#: builtin/index-pack.c:266
msgid "early EOF"
-msgstr ""
+msgstr "неочакван край на файл"
-#: builtin/index-pack.c:255
+#: builtin/index-pack.c:267
msgid "read error on input"
-msgstr ""
+msgstr "грешка при четене на входните данни"
-#: builtin/index-pack.c:267
+#: builtin/index-pack.c:279
msgid "used more bytes than were available"
-msgstr ""
+msgstr "използвани са повече от наличните байтове"
-#: builtin/index-pack.c:274
+#: builtin/index-pack.c:286
msgid "pack too large for current definition of off_t"
-msgstr ""
+msgstr "пакетният файл е прекалено голям за текущата стойност на типа „off_t“"
-#: builtin/index-pack.c:290
+#: builtin/index-pack.c:302
#, c-format
msgid "unable to create '%s'"
-msgstr ""
+msgstr "пакетният файл „%s“ не може да бъде създаден"
-#: builtin/index-pack.c:295
+#: builtin/index-pack.c:307
#, c-format
msgid "cannot open packfile '%s'"
-msgstr ""
+msgstr "пакетният файл „%s“ не може да бъде отворен"
-#: builtin/index-pack.c:309
+#: builtin/index-pack.c:321
msgid "pack signature mismatch"
-msgstr ""
+msgstr "несъответствие в подписа към пакетния файл"
-#: builtin/index-pack.c:311
+#: builtin/index-pack.c:323
#, c-format
msgid "pack version %<PRIu32> unsupported"
-msgstr ""
+msgstr "не се поддържа пакетиране вeрсия „%<PRIu32>“"
-#: builtin/index-pack.c:329
+#: builtin/index-pack.c:341
#, c-format
msgid "pack has bad object at offset %lu: %s"
-msgstr ""
+msgstr "повреден обект в пакетния файл при отместване %lu: %s"
-#: builtin/index-pack.c:451
+#: builtin/index-pack.c:462
#, c-format
msgid "inflate returned %d"
-msgstr ""
+msgstr "декомпресирането с „inflate“ върна %d"
-#: builtin/index-pack.c:500
+#: builtin/index-pack.c:511
msgid "offset value overflow for delta base object"
-msgstr ""
+msgstr "стойността на отместването за обекта-разлика води до препълване"
-#: builtin/index-pack.c:508
+#: builtin/index-pack.c:519
msgid "delta base offset is out of bound"
-msgstr ""
+msgstr "стойността на отместването за обекта-разлика е извън диапазона"
-#: builtin/index-pack.c:516
+#: builtin/index-pack.c:527
#, c-format
msgid "unknown object type %d"
-msgstr ""
+msgstr "непознат вид обект %d"
-#: builtin/index-pack.c:547
+#: builtin/index-pack.c:558
msgid "cannot pread pack file"
-msgstr ""
+msgstr "пакетният файл не може да бъде прочетен"
-#: builtin/index-pack.c:549
+#: builtin/index-pack.c:560
#, 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] ""
+msgstr[0] "неочакван край на файл, липсва %lu байт"
+msgstr[1] "неочакван край на файл, липсват %lu байта"
-#: builtin/index-pack.c:575
+#: builtin/index-pack.c:586
msgid "serious inflate inconsistency"
-msgstr ""
+msgstr "сериозна грешка при декомпресиране с „inflate“"
-#: builtin/index-pack.c:666 builtin/index-pack.c:672 builtin/index-pack.c:695
-#: builtin/index-pack.c:729 builtin/index-pack.c:738
+#: builtin/index-pack.c:677 builtin/index-pack.c:683 builtin/index-pack.c:706
+#: builtin/index-pack.c:740 builtin/index-pack.c:749
#, c-format
msgid "SHA1 COLLISION FOUND WITH %s !"
msgstr ""
+"СЪВПАДЕНИЕ НА СТОЙНОСТИТЕ ЗА СУМИТЕ ЗА SHA1: „%s“ НА ДВА РАЗЛИЧНИ ОБЕКТА!"
-#: builtin/index-pack.c:669 builtin/pack-objects.c:162
+# FIXME merge with next?
+#: builtin/index-pack.c:680 builtin/pack-objects.c:162
#: builtin/pack-objects.c:254
#, c-format
msgid "unable to read %s"
-msgstr ""
+msgstr "обектът „%s“ не може да бъде прочетен"
-#: builtin/index-pack.c:735
+#: builtin/index-pack.c:746
#, c-format
msgid "cannot read existing object %s"
-msgstr ""
+msgstr "съществуващият обект „%s“ не може да бъде прочетен"
-#: builtin/index-pack.c:749
+#: builtin/index-pack.c:760
#, c-format
msgid "invalid blob object %s"
-msgstr ""
+msgstr "неправилен обект BLOB „%s“"
-#: builtin/index-pack.c:763
+# FIXME perhaps invalid object
+#: builtin/index-pack.c:774
#, c-format
msgid "invalid %s"
-msgstr ""
+msgstr "неправилен обект „%s“"
-#: builtin/index-pack.c:766
+#: builtin/index-pack.c:777
msgid "Error in object"
-msgstr ""
+msgstr "Грешка в обекта"
-#: builtin/index-pack.c:768
+#: builtin/index-pack.c:779
#, c-format
msgid "Not all child objects of %s are reachable"
-msgstr ""
+msgstr "Някои обекти, наследници на „%s“, не могат да бъдат достигнати"
-#: builtin/index-pack.c:839 builtin/index-pack.c:869
+#: builtin/index-pack.c:851 builtin/index-pack.c:881
msgid "failed to apply delta"
-msgstr ""
+msgstr "разликата не може да бъде приложена"
-#: builtin/index-pack.c:1010
+#: builtin/index-pack.c:1022
msgid "Receiving objects"
-msgstr ""
+msgstr "Получаване на обекти"
-#: builtin/index-pack.c:1010
+#: builtin/index-pack.c:1022
msgid "Indexing objects"
-msgstr ""
+msgstr "Индексиране на обекти"
-#: builtin/index-pack.c:1036
+#: builtin/index-pack.c:1048
msgid "pack is corrupted (SHA1 mismatch)"
-msgstr ""
+msgstr "пакетният файл е повреден (нееднакви суми по SHA1)"
-#: builtin/index-pack.c:1041
+#: builtin/index-pack.c:1053
msgid "cannot fstat packfile"
-msgstr ""
+msgstr "не може да се получи информация за пакетния файл с „fstat“"
-#: builtin/index-pack.c:1044
+#: builtin/index-pack.c:1056
msgid "pack has junk at the end"
-msgstr ""
+msgstr "в края на пакетния файл има повредени данни"
-#: builtin/index-pack.c:1055
+# FIXME WTF message
+#: builtin/index-pack.c:1067
msgid "confusion beyond insanity in parse_pack_objects()"
-msgstr ""
+msgstr "катастрофална грешка във функцията „parse_pack_objects“"
-#: builtin/index-pack.c:1078
+#: builtin/index-pack.c:1090
msgid "Resolving deltas"
-msgstr ""
+msgstr "Откриване на съответните разлики"
-#: builtin/index-pack.c:1088
+#: builtin/index-pack.c:1100
#, c-format
msgid "unable to create thread: %s"
-msgstr ""
+msgstr "не може да се създаде нишка: %s"
-#: builtin/index-pack.c:1130
+# FIXME WTF message
+#: builtin/index-pack.c:1142
msgid "confusion beyond insanity"
-msgstr ""
+msgstr "катастрофална грешка"
-#: builtin/index-pack.c:1138
+#: builtin/index-pack.c:1150
#, c-format
msgid "completed with %d local objects"
-msgstr ""
+msgstr "действието завърши с %d локални обекта"
-#: builtin/index-pack.c:1148
+#: builtin/index-pack.c:1160
#, c-format
msgid "Unexpected tail checksum for %s (disk corruption?)"
msgstr ""
+"Неочаквана последваща сума за грешки за „%s“ (причината може да е грешка в "
+"диска)"
-#: builtin/index-pack.c:1152
+#: builtin/index-pack.c:1164
#, c-format
msgid "pack has %d unresolved delta"
msgid_plural "pack has %d unresolved deltas"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "в пакета има %d ненапасваща разлика"
+msgstr[1] "в пакета има %d ненапасващи разлики"
-#: builtin/index-pack.c:1177
+#: builtin/index-pack.c:1189
#, c-format
msgid "unable to deflate appended object (%d)"
-msgstr ""
+msgstr "добавеният обект не може да се компресира с „deflate“: %d"
-#: builtin/index-pack.c:1256
+#: builtin/index-pack.c:1268
#, c-format
msgid "local object %s is corrupt"
-msgstr ""
+msgstr "локалният обект „%s“ е повреден"
-#: builtin/index-pack.c:1280
+#: builtin/index-pack.c:1292
msgid "error while closing pack file"
-msgstr ""
+msgstr "грешка при затварянето на пакетния файл"
-#: builtin/index-pack.c:1293
+#: builtin/index-pack.c:1305
#, c-format
msgid "cannot write keep file '%s'"
msgstr ""
+"грешка при записването на файла „%s“, осигуряващ запазване на директория"
-#: builtin/index-pack.c:1301
+#: builtin/index-pack.c:1313
#, c-format
msgid "cannot close written keep file '%s'"
msgstr ""
+"грешка при затварянето на записания файл „%s“, осигуряващ запазване на "
+"директория"
-#: builtin/index-pack.c:1314
+#: builtin/index-pack.c:1326
msgid "cannot store pack file"
-msgstr ""
+msgstr "пакетният файл не може да бъде запазен"
-#: builtin/index-pack.c:1325
+#: builtin/index-pack.c:1337
msgid "cannot store index file"
msgstr "файлът за индекса не може да бъде съхранен"
-#: builtin/index-pack.c:1358
+#: builtin/index-pack.c:1370
#, c-format
msgid "bad pack.indexversion=%<PRIu32>"
-msgstr ""
+msgstr "зададена е неправилна версия пакетиране: „pack.indexversion=%<PRIu32>“"
-#: builtin/index-pack.c:1364
+#: builtin/index-pack.c:1376
#, c-format
msgid "invalid number of threads specified (%d)"
-msgstr ""
+msgstr "зададен е неправилен брой нишки: %d"
-#: builtin/index-pack.c:1368 builtin/index-pack.c:1546
+#: builtin/index-pack.c:1380 builtin/index-pack.c:1559
#, c-format
msgid "no threads support, ignoring %s"
-msgstr ""
+msgstr "липсва поддръжка за нишки. „%s“ ще се пренебрегне"
-#: builtin/index-pack.c:1426
+#: builtin/index-pack.c:1438
#, c-format
msgid "Cannot open existing pack file '%s'"
-msgstr ""
+msgstr "Съществуващият пакетен файл „%s“ не може да бъде отворен"
-#: builtin/index-pack.c:1428
+#: builtin/index-pack.c:1440
#, c-format
msgid "Cannot open existing pack idx file for '%s'"
-msgstr ""
+msgstr "Съществуващият индекс за пакетния файл „%s“ не може да бъде отворен"
-#: builtin/index-pack.c:1475
+#: builtin/index-pack.c:1487
#, c-format
msgid "non delta: %d object"
msgid_plural "non delta: %d objects"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "%d обект не е разлика"
+msgstr[1] "%d обекта не са разлика"
-#: builtin/index-pack.c:1482
+#: builtin/index-pack.c:1494
#, c-format
msgid "chain length = %d: %lu object"
msgid_plural "chain length = %d: %lu objects"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "дължината на веригата е %d: %lu обект"
+msgstr[1] "дължината на веригата е %d: %lu обекта"
-#: builtin/index-pack.c:1510
+# FIXME it is not the cwd it is the previous cwd
+#: builtin/index-pack.c:1523
msgid "Cannot come back to cwd"
-msgstr ""
+msgstr "Процесът не може да се върне към предишната работна директория"
-#: builtin/index-pack.c:1558 builtin/index-pack.c:1561
-#: builtin/index-pack.c:1573 builtin/index-pack.c:1577
+#: builtin/index-pack.c:1571 builtin/index-pack.c:1574
+#: builtin/index-pack.c:1586 builtin/index-pack.c:1590
#, c-format
msgid "bad %s"
-msgstr ""
+msgstr "неправилна стойност „%s“"
-#: builtin/index-pack.c:1591
+#: builtin/index-pack.c:1604
msgid "--fix-thin cannot be used without --stdin"
-msgstr ""
+msgstr "опцията „--fix-thin“ изисква „--stdin“"
-#: builtin/index-pack.c:1595 builtin/index-pack.c:1605
+#: builtin/index-pack.c:1608 builtin/index-pack.c:1617
#, c-format
msgid "packfile name '%s' does not end with '.pack'"
-msgstr ""
+msgstr "името на пакетния файл „%s“ не завършва на „.pack“"
-#: builtin/index-pack.c:1614
+#: builtin/index-pack.c:1625
msgid "--verify with no packfile name given"
-msgstr ""
+msgstr "опцията „--verify“ изисква име на пакетен файл"
#: builtin/init-db.c:35
#, c-format
msgid "Could not make %s writable by group"
-msgstr ""
+msgstr "Не могат да се дадат права за запис в директорията „%s“ на групата"
+# FIXME - bad wording insanely
#: builtin/init-db.c:62
#, c-format
msgid "insanely long template name %s"
-msgstr ""
+msgstr "твърде дълго име на шаблон: „%s“"
#: builtin/init-db.c:67
#, c-format
msgid "cannot stat '%s'"
-msgstr ""
+msgstr "не може да се получи информация чрез „stat“ за директорията „%s“"
#: builtin/init-db.c:73
#, c-format
msgid "cannot stat template '%s'"
-msgstr ""
+msgstr "не може да се получи информация чрез „stat“ за шаблона „%s“"
#: builtin/init-db.c:80
#, c-format
msgid "cannot opendir '%s'"
-msgstr ""
+msgstr "директорията „%s“ не може да бъде отворена"
#: builtin/init-db.c:97
#, c-format
msgid "cannot readlink '%s'"
-msgstr ""
+msgstr "връзката „%s“ не може да бъде прочетена"
+# FIXME - bad wording insanely
#: builtin/init-db.c:99
#, c-format
msgid "insanely long symlink %s"
-msgstr ""
+msgstr "твърде дълго име на символна връзка: „%s“"
#: builtin/init-db.c:102
#, c-format
msgid "cannot symlink '%s' '%s'"
-msgstr ""
+msgstr "не може да се създаде символна връзка „%s“ в „%s“"
#: builtin/init-db.c:106
#, c-format
msgid "cannot copy '%s' to '%s'"
-msgstr ""
+msgstr "„%s“ не може да се копира в „%s“"
#: builtin/init-db.c:110
#, c-format
msgid "ignoring template %s"
-msgstr ""
+msgstr "игнориране на шаблона „%s“"
+# FIXME bad word insanely
#: builtin/init-db.c:133
#, c-format
msgid "insanely long template path %s"
-msgstr ""
+msgstr "твърде дълъг път към шаблон: „%s“"
#: builtin/init-db.c:141
#, c-format
msgid "templates not found %s"
-msgstr ""
+msgstr "директорията с шаблоните не е открита: „%s“"
#: builtin/init-db.c:154
#, c-format
msgid "not copying templates of a wrong format version %d from '%s'"
msgstr ""
+"шаблоните с неправилен номер на формата %d няма да бъдат копирани от „%s“"
#: builtin/init-db.c:192
#, c-format
msgid "insane git directory %s"
-msgstr ""
+msgstr "твърде дълго име на директория на Git: „%s“"
#: builtin/init-db.c:323 builtin/init-db.c:326
#, c-format
msgid "%s already exists"
-msgstr ""
+msgstr "Директорията „%s“ вече съществува"
#: builtin/init-db.c:355
#, c-format
msgid "unable to handle file type %d"
-msgstr ""
+msgstr "файлове от вид %d не се поддържат"
#: builtin/init-db.c:358
#, c-format
msgid "unable to move %s to %s"
-msgstr ""
+msgstr "„%s“ не може да се премести в „%s“"
#. TRANSLATORS: The first '%s' is either "Reinitialized
#. existing" or "Initialized empty", the second " shared" or
@@ -6282,51 +6493,55 @@ msgstr ""
#: builtin/init-db.c:418
#, c-format
msgid "%s%s Git repository in %s%s\n"
-msgstr ""
+msgstr "%s%s хранилище на Git в „%s%s“\n"
#: builtin/init-db.c:419
msgid "Reinitialized existing"
-msgstr ""
+msgstr "Наново инициализирано, съществуващо"
#: builtin/init-db.c:419
msgid "Initialized empty"
-msgstr ""
+msgstr "Инициализирано празно"
#: builtin/init-db.c:420
msgid " shared"
-msgstr ""
+msgstr ", споделено"
#: builtin/init-db.c:439
msgid "cannot tell cwd"
-msgstr ""
+msgstr "текущата директория не може да бъде определена"
#: builtin/init-db.c:465
msgid ""
"git init [-q | --quiet] [--bare] [--template=<template-directory>] [--"
"shared[=<permissions>]] [directory]"
msgstr ""
+"git init [-q | --quiet] [--bare] [--template=ДИРЕКТОРИЯ_С_ШАБЛОНИ] [--"
+"shared[=ПРАВА]] [ДИРЕКТОРИЯ]"
#: builtin/init-db.c:488
msgid "permissions"
-msgstr ""
+msgstr "права"
#: builtin/init-db.c:489
msgid "specify that the git repository is to be shared amongst several users"
msgstr ""
+"указване, че хранилището на Git ще бъде споделено от повече от един "
+"потребител"
-#: builtin/init-db.c:491 builtin/prune-packed.c:79 builtin/repack.c:168
+#: builtin/init-db.c:491 builtin/prune-packed.c:79 builtin/repack.c:172
msgid "be quiet"
msgstr "без извеждане на информация"
#: builtin/init-db.c:523 builtin/init-db.c:528
#, c-format
msgid "cannot mkdir %s"
-msgstr ""
+msgstr "директорията „%s“ не може да бъде създадена"
#: builtin/init-db.c:532
#, c-format
msgid "cannot chdir to %s"
-msgstr ""
+msgstr "не може да се влезе в директорията „%s“"
#: builtin/init-db.c:554
#, c-format
@@ -6334,58 +6549,60 @@ msgid ""
"%s (or --work-tree=<directory>) not allowed without specifying %s (or --git-"
"dir=<directory>)"
msgstr ""
+"%s (или --work-tree=ДИРЕКТОРИЯ) изисква указването на %s (или --git-"
+"dir=ДИРЕКТОРИЯ)"
#: builtin/init-db.c:578
msgid "Cannot access current working directory"
-msgstr ""
+msgstr "Текущата работна директория е недостъпна"
#: builtin/init-db.c:585
#, c-format
msgid "Cannot access work tree '%s'"
-msgstr ""
+msgstr "Работното дърво в „%s“ е недостъпно"
#: builtin/log.c:41
msgid "git log [<options>] [<revision range>] [[--] <path>...]\n"
-msgstr "git log [ОПЦИИ] [ДИАПАЗОН_НА_ВЕРСИИТЕ] [[--] ПЪТ…]\n"
+msgstr "git log [ОПЦИЯ…] [ДИАПАЗОН_НА_ВЕРСИИТЕ] [[--] ПЪТ…]\n"
#: builtin/log.c:42
msgid " or: git show [options] <object>..."
-msgstr " или: git show [ОПЦИИ] ОБЕКТ…"
+msgstr " или: git show [ОПЦИЯ…] ОБЕКТ…"
-#: builtin/log.c:125
+#: builtin/log.c:127
msgid "suppress diff output"
msgstr "без извеждане на разликите"
-#: builtin/log.c:126
+#: builtin/log.c:128
msgid "show source"
msgstr "извеждане на изходния код"
-#: builtin/log.c:127
+#: builtin/log.c:129
msgid "Use mail map file"
msgstr ""
"Използване на файл за съответствията на имената и адресите на е-поща („."
"mailmap“)"
-#: builtin/log.c:128
+#: builtin/log.c:130
msgid "decorate options"
msgstr "настройки на форма̀та на извежданата информация"
-#: builtin/log.c:231
+#: builtin/log.c:229
#, c-format
msgid "Final output: %d %s\n"
msgstr "Резултат: %d %s\n"
-#: builtin/log.c:473 builtin/log.c:565
+#: builtin/log.c:470 builtin/log.c:562
#, c-format
msgid "Could not read object %s"
msgstr "Обектът не може да бъде прочетен: %s"
-#: builtin/log.c:589
+#: builtin/log.c:586
#, c-format
msgid "Unknown type: %d"
msgstr "Неизвестен вид: %d"
-#: builtin/log.c:689
+#: builtin/log.c:687
msgid "format.headers without value"
msgstr "не е зададена стойност на „format.headers“"
@@ -6406,204 +6623,214 @@ msgstr "Трябва да зададете точно един диапазон.
msgid "Not a range."
msgstr "Не е диапазон."
-#: builtin/log.c:911
+#: builtin/log.c:916
msgid "Cover letter needs email format"
msgstr "Придружаващото писмо трябва да е форматирано като е-писмо"
-#: builtin/log.c:987
+# FIXME bad wording insanely
+#: builtin/log.c:995
#, c-format
msgid "insane in-reply-to: %s"
msgstr "неправилен формат на заглавната част за отговор „in-reply-to“: %s"
-#: builtin/log.c:1015
+#: builtin/log.c:1023
msgid "git format-patch [options] [<since> | <revision range>]"
-msgstr "git format-patch [ОПЦИИ] [ОТ | ДИАПАЗОН_НА_ВЕРСИИТЕ]"
+msgstr "git format-patch [ОПЦИЯ…] [ОТ | ДИАПАЗОН_НА_ВЕРСИИТЕ]"
-# FIXME message
-#: builtin/log.c:1060
+# FIXME message WTF why ask it
+#: builtin/log.c:1068
msgid "Two output directories?"
msgstr ""
"Можете да укажете максимум една директория за изход, а сте задали поне две."
-#: builtin/log.c:1175
+#: builtin/log.c:1183
msgid "use [PATCH n/m] even with a single patch"
msgstr "номерация „[PATCH n/m]“ дори и при единствена кръпка"
-#: builtin/log.c:1178
+#: builtin/log.c:1186
msgid "use [PATCH] even with multiple patches"
msgstr "номерация „[PATCH]“ дори и при множество кръпки"
-#: builtin/log.c:1182
+#: builtin/log.c:1190
msgid "print patches to standard out"
msgstr "извеждане на кръпките на стандартния изход"
-#: builtin/log.c:1184
+#: builtin/log.c:1192
msgid "generate a cover letter"
msgstr "създаване на придружаващо писмо"
-#: builtin/log.c:1186
+#: builtin/log.c:1194
msgid "use simple number sequence for output file names"
msgstr "проста числова последователност за имената на файловете-кръпки"
-#: builtin/log.c:1187
+#: builtin/log.c:1195
msgid "sfx"
msgstr "ЗНАЦИ"
-#: builtin/log.c:1188
+#: builtin/log.c:1196
msgid "use <sfx> instead of '.patch'"
msgstr "използване на тези ЗНАЦИ за суфикс вместо „.patch“"
-#: builtin/log.c:1190
+#: builtin/log.c:1198
msgid "start numbering patches at <n> instead of 1"
msgstr "номерирането на кръпките да започва от този БРОЙ, а не с 1"
-#: builtin/log.c:1192
+#: builtin/log.c:1200
msgid "mark the series as Nth re-roll"
msgstr "отбелязване, че това е N-тата поредна редакция на поредицата от кръпки"
-#: builtin/log.c:1194
+#: builtin/log.c:1202
msgid "Use [<prefix>] instead of [PATCH]"
msgstr "Използване на този „[ПРЕФИКС]“ вместо „[PATCH]“"
-#: builtin/log.c:1197
+#: builtin/log.c:1205
msgid "store resulting files in <dir>"
msgstr "запазване на изходните файлове в тази ДИРЕКТОРИЯ"
-#: builtin/log.c:1200
+#: builtin/log.c:1208
msgid "don't strip/add [PATCH]"
msgstr "без добавяне/махане на префикса „[PATCH]“"
-#: builtin/log.c:1203
+#: builtin/log.c:1211
msgid "don't output binary diffs"
msgstr "без извеждане на разлики между двоични файлове"
-#: builtin/log.c:1205
+#: builtin/log.c:1213
msgid "don't include a patch matching a commit upstream"
msgstr "да не се включват кръпки, които присъстват в следения клон"
-#: builtin/log.c:1207
+#: builtin/log.c:1215
msgid "show patch format instead of default (patch + stat)"
msgstr ""
"извеждане във формат за кръпки, а на в стандартния (кръпка и статистика)"
-#: builtin/log.c:1209
+#: builtin/log.c:1217
msgid "Messaging"
msgstr "Опции при изпращане"
-#: builtin/log.c:1210
+#: builtin/log.c:1218
msgid "header"
msgstr "ЗАГЛАВНА_ЧАСТ"
-#: builtin/log.c:1211
+#: builtin/log.c:1219
msgid "add email header"
msgstr "добавяне на тази ЗАГЛАВНА_ЧАСТ"
-#: builtin/log.c:1212 builtin/log.c:1214
+#: builtin/log.c:1220 builtin/log.c:1222
msgid "email"
msgstr "Е-ПОЩА"
-#: builtin/log.c:1212
+#: builtin/log.c:1220
msgid "add To: header"
msgstr "добавяне на заглавна част „To:“ (до)"
-#: builtin/log.c:1214
+#: builtin/log.c:1222
msgid "add Cc: header"
msgstr "добавяне на заглавна част „Cc:“ (и до)"
-#: builtin/log.c:1216
+#: builtin/log.c:1224
msgid "ident"
msgstr "ИДЕНТИЧНОСТ"
-#: builtin/log.c:1217
+#: builtin/log.c:1225
msgid "set From address to <ident> (or committer ident if absent)"
msgstr ""
"задаване на адреса в заглавната част „From“ да е тази ИДЕНТИЧНОСТ. Ако не е "
"зададена такава, се взима адреса на подаващия"
-#: builtin/log.c:1219
+#: builtin/log.c:1227
msgid "message-id"
msgstr "ИДЕНТИФИКАТОР_НА_СЪОБЩЕНИЕ"
-#: builtin/log.c:1220
+#: builtin/log.c:1228
msgid "make first mail a reply to <message-id>"
msgstr ""
"първото съобщение да е в отговор на е-писмото с този "
"ИДЕНТИФИКАТОР_НА_СЪОБЩЕНИЕ"
-#: builtin/log.c:1221 builtin/log.c:1224
+#: builtin/log.c:1229 builtin/log.c:1232
msgid "boundary"
msgstr "граница"
-#: builtin/log.c:1222
+#: builtin/log.c:1230
msgid "attach the patch"
msgstr "прикрепяне на кръпката"
-#: builtin/log.c:1225
+#: builtin/log.c:1233
msgid "inline the patch"
msgstr "включване на кръпката в текста на писмата"
-#: builtin/log.c:1229
+#: builtin/log.c:1237
msgid "enable message threading, styles: shallow, deep"
msgstr ""
"използване на нишки за съобщенията. Стилът е „shallow“ (плитък) или "
"„deep“ (дълбок)"
-#: builtin/log.c:1231
+#: builtin/log.c:1239
msgid "signature"
msgstr "подпис"
-#: builtin/log.c:1232
+#: builtin/log.c:1240
msgid "add a signature"
msgstr "добавяне на поле за подпис"
-#: builtin/log.c:1233
+#: builtin/log.c:1242
+msgid "add a signature from a file"
+msgstr "добавяне на подпис от файл"
+
+#: builtin/log.c:1243
msgid "don't print the patch filenames"
msgstr "без извеждане на имената на кръпките"
-#: builtin/log.c:1307
+#: builtin/log.c:1317
#, c-format
msgid "invalid ident line: %s"
msgstr "грешна идентичност: %s"
-#: builtin/log.c:1322
+#: builtin/log.c:1332
msgid "-n and -k are mutually exclusive."
msgstr "опциите „-n“ и „-k“ са несъвместими."
-#: builtin/log.c:1324
+#: builtin/log.c:1334
msgid "--subject-prefix and -k are mutually exclusive."
msgstr "опциите „--subject-prefix“ и „-k“ са несъвместими."
-#: builtin/log.c:1332
+#: builtin/log.c:1342
msgid "--name-only does not make sense"
msgstr "опцията „--name-only“ е несъвместима с генерирането на кръпки"
-#: builtin/log.c:1334
+#: builtin/log.c:1344
msgid "--name-status does not make sense"
msgstr "опцията „--name-status“ е несъвместима с генерирането на кръпки"
-#: builtin/log.c:1336
+#: builtin/log.c:1346
msgid "--check does not make sense"
msgstr "опцията „--check“ е несъвместима с генерирането на кръпки"
-#: builtin/log.c:1359
+#: builtin/log.c:1369
msgid "standard output, or directory, which one?"
msgstr ""
"изходът може да или стандартният, или да е в директория, но не и двете."
-#: builtin/log.c:1361
+#: builtin/log.c:1371
#, c-format
msgid "Could not create directory '%s'"
-msgstr "Папката „%s“ не може да бъде създадена"
+msgstr "Директорията „%s“ не може да бъде създадена"
-#: builtin/log.c:1509
+#: builtin/log.c:1468
+#, c-format
+msgid "unable to read signature file '%s'"
+msgstr "файлът „%s“ с подпис не може да бъде прочетен"
+
+#: builtin/log.c:1531
msgid "Failed to create output files"
msgstr "Изходните файлове не могат да бъдат създадени"
-#: builtin/log.c:1558
+#: builtin/log.c:1579
msgid "git cherry [-v] [<upstream> [<head> [<limit>]]]"
msgstr "git cherry [-v] [ОТДАЛЕЧЕН_КЛОН [ВРЪХ [ПРЕДЕЛ]]]"
-#: builtin/log.c:1613
+#: builtin/log.c:1634
#, c-format
msgid ""
"Could not find a tracked remote branch, please specify <upstream> manually.\n"
@@ -6611,118 +6838,121 @@ msgstr ""
"Следеният отдалечен клон не бе открит, затова изрично задайте "
"ОТДАЛЕЧЕН_КЛОН.\n"
-#: builtin/log.c:1626 builtin/log.c:1628 builtin/log.c:1640
+#: builtin/log.c:1647 builtin/log.c:1649 builtin/log.c:1661
#, c-format
msgid "Unknown commit %s"
msgstr "Непознато подаване „%s“"
#: builtin/ls-files.c:401
msgid "git ls-files [options] [<file>...]"
-msgstr ""
+msgstr "git ls-files [ОПЦИЯ…] [ФАЙЛ…]"
#: builtin/ls-files.c:458
msgid "identify the file status with tags"
-msgstr ""
+msgstr "извеждане на състоянието на файловете с еднобуквени флагове"
#: builtin/ls-files.c:460
msgid "use lowercase letters for 'assume unchanged' files"
-msgstr ""
+msgstr "малки букви за файловете, които да се счетат за непроменени"
#: builtin/ls-files.c:462
msgid "show cached files in the output (default)"
-msgstr ""
+msgstr "извеждане на кешираните файлове (стандартно)"
#: builtin/ls-files.c:464
msgid "show deleted files in the output"
-msgstr ""
+msgstr "извеждане на изтритите файлове"
#: builtin/ls-files.c:466
msgid "show modified files in the output"
-msgstr ""
+msgstr "извеждане на променените файлове"
#: builtin/ls-files.c:468
msgid "show other files in the output"
-msgstr ""
+msgstr "извеждане на другите файлове"
#: builtin/ls-files.c:470
msgid "show ignored files in the output"
-msgstr ""
+msgstr "извеждане на игнорираните файлове"
#: builtin/ls-files.c:473
msgid "show staged contents' object name in the output"
-msgstr ""
+msgstr "извеждане на името на обекта за съдържанието на индекса"
#: builtin/ls-files.c:475
msgid "show files on the filesystem that need to be removed"
-msgstr ""
+msgstr "извеждане на файловете, които трябва да бъдат изтрити"
#: builtin/ls-files.c:477
msgid "show 'other' directories' name only"
-msgstr ""
+msgstr "извеждане само на името на другите директории"
#: builtin/ls-files.c:480
msgid "don't show empty directories"
-msgstr ""
+msgstr "без извеждане на празните директории"
#: builtin/ls-files.c:483
msgid "show unmerged files in the output"
-msgstr ""
+msgstr "извеждане на неслетите файлове"
+# FIXME not clear about what this option does
#: builtin/ls-files.c:485
msgid "show resolve-undo information"
-msgstr ""
+msgstr "извеждане на информацията за отмяна на разрешените подавания"
#: builtin/ls-files.c:487
msgid "skip files matching pattern"
-msgstr ""
+msgstr "прескачане на файловете напасващи ШАБЛОНа"
#: builtin/ls-files.c:490
msgid "exclude patterns are read from <file>"
-msgstr ""
+msgstr "шаблоните за игнориране да се прочетат от този ФАЙЛ"
#: builtin/ls-files.c:493
msgid "read additional per-directory exclude patterns in <file>"
msgstr ""
+"изчитане на допълнителните шаблони за игнориране по директория от този ФАЙЛ"
#: builtin/ls-files.c:495
msgid "add the standard git exclusions"
-msgstr ""
+msgstr "добавяне на стандартно игнорираните от Git файлове"
#: builtin/ls-files.c:498
msgid "make the output relative to the project top directory"
-msgstr ""
+msgstr "пътищата да са относителни спрямо основната директория на проекта"
#: builtin/ls-files.c:501
msgid "if any <file> is not in the index, treat this as an error"
-msgstr ""
+msgstr "грешка, ако някой от тези ФАЙЛове не е в индекса"
#: builtin/ls-files.c:502
msgid "tree-ish"
-msgstr ""
+msgstr "УКАЗАТЕЛ_КЪМ_ДЪРВО"
#: builtin/ls-files.c:503
msgid "pretend that paths removed since <tree-ish> are still present"
msgstr ""
+"считане, че пътищата изтрити след УКАЗАТЕЛя_КЪМ_ДЪРВО все още съществуват"
#: builtin/ls-files.c:505
msgid "show debugging data"
-msgstr ""
+msgstr "извеждане на информацията за изчистване на грешки"
#: builtin/ls-tree.c:28
msgid "git ls-tree [<options>] <tree-ish> [<path>...]"
-msgstr ""
+msgstr "git ls-tree [ОПЦИЯ…] УКАЗАТЕЛ_КЪМ_ДЪРВО [ПЪТ…]"
#: builtin/ls-tree.c:126
msgid "only show trees"
-msgstr ""
+msgstr "извеждане само на дървета"
#: builtin/ls-tree.c:128
msgid "recurse into subtrees"
-msgstr ""
+msgstr "рекурсивно обхождане поддърветата"
#: builtin/ls-tree.c:130
msgid "show trees when recursing"
-msgstr ""
+msgstr "извеждане на дърветата при рекурсивното обхождане"
#: builtin/ls-tree.c:133
msgid "terminate entries with NUL byte"
@@ -6730,62 +6960,65 @@ msgstr "разделяне на обектите с нулевия знак „N
#: builtin/ls-tree.c:134
msgid "include object size"
-msgstr ""
+msgstr "извеждане на размера на обекта"
#: builtin/ls-tree.c:136 builtin/ls-tree.c:138
msgid "list only filenames"
-msgstr ""
+msgstr "извеждане само имената на файловете"
#: builtin/ls-tree.c:141
msgid "use full path names"
-msgstr ""
+msgstr "използване на пълните имена на пътищата"
#: builtin/ls-tree.c:143
msgid "list entire tree; not just current directory (implies --full-name)"
msgstr ""
+"извеждане на цялото дърво, не само на текущата директория (включва опцията "
+"„--full-name“)"
#: builtin/merge.c:43
msgid "git merge [options] [<commit>...]"
-msgstr ""
+msgstr "git merge [ОПЦИЯ…] [ПОДАВАНЕ…]"
#: builtin/merge.c:44
msgid "git merge [options] <msg> HEAD <commit>"
-msgstr ""
+msgstr "git merge [ОПЦИЯ…] СЪОБЩЕНИЕ HEAD ПОДАВАНЕ"
#: builtin/merge.c:45
msgid "git merge --abort"
-msgstr ""
+msgstr "git merge --abort"
+# FIXME -m rather than just m
#: builtin/merge.c:98
msgid "switch `m' requires a value"
-msgstr ""
+msgstr "опцията „-m“ изисква стойност"
#: builtin/merge.c:135
#, c-format
msgid "Could not find merge strategy '%s'.\n"
-msgstr ""
+msgstr "Няма такава стратегия за сливане: „%s“.\n"
#: builtin/merge.c:136
#, c-format
msgid "Available strategies are:"
-msgstr ""
+msgstr "Наличните стратегии са:"
#: builtin/merge.c:141
#, c-format
msgid "Available custom strategies are:"
-msgstr ""
+msgstr "Допълнителните стратегии са:"
#: builtin/merge.c:191
msgid "do not show a diffstat at the end of the merge"
-msgstr ""
+msgstr "без извеждане на статистиката след завършване на сливане"
#: builtin/merge.c:194
msgid "show a diffstat at the end of the merge"
-msgstr ""
+msgstr "извеждане на статистиката след завършване на сливане"
#: builtin/merge.c:195
msgid "(synonym to --stat)"
-msgstr ""
+msgstr "(синоним на „--stat“)"
#: builtin/merge.c:197
msgid "add (at most <n>) entries from shortlog to merge commit message"
@@ -6795,27 +7028,27 @@ msgstr ""
#: builtin/merge.c:200
msgid "create a single commit instead of doing a merge"
-msgstr ""
+msgstr "създаване на едно подаване вместо извършване на сливане"
#: builtin/merge.c:202
msgid "perform a commit if the merge succeeds (default)"
-msgstr ""
+msgstr "извършване на подаване при успешно сливане (стандартно действие)"
#: builtin/merge.c:204
msgid "edit message before committing"
-msgstr ""
+msgstr "редактиране на съобщението преди подаване"
#: builtin/merge.c:205
msgid "allow fast-forward (default)"
-msgstr ""
+msgstr "позволяване на тривиално сливане (стандартно действие)"
#: builtin/merge.c:207
msgid "abort if fast-forward is not possible"
-msgstr ""
+msgstr "преустановяване, ако сливането не е тривиално"
#: builtin/merge.c:211
msgid "Verify that the named commit has a valid GPG signature"
-msgstr ""
+msgstr "Проверка, че именуваното подаване е с правилен подпис на GPG"
#: builtin/merge.c:212 builtin/notes.c:742 builtin/revert.c:89
msgid "strategy"
@@ -6823,102 +7056,105 @@ msgstr "стратегия"
#: builtin/merge.c:213
msgid "merge strategy to use"
-msgstr ""
+msgstr "стратегия за сливане, която да се ползва"
#: builtin/merge.c:214